19 #ifndef YARP_DEV_BATTERYWRAPPER_H
20 #define YARP_DEV_BATTERYWRAPPER_H
101 #define DEFAULT_THREAD_PERIOD 0.02
114 bool close()
override;
130 std::string m_streamingPortName;
131 std::string m_rpcPortName;
132 std::string m_quitPortName;
137 double m_battery_charge = std::nan(
"");
138 double m_battery_voltage = std::nan(
"");
139 double m_battery_current = std::nan(
"");
140 double m_battery_temperature = std::nan(
"");
146 std::string m_sensorId;
149 bool m_enable_shutdown;
153 char m_log_buffer[1024];
166 void notify_message(std::string msg);
167 void emergency_shutdown(std::string msg);
168 void check_battery_status(
double battery_charge);
169 void stop_robot(std::string quit_port);
const int BATTERY_TIMEOUT
contains the definition of a Vector type
bool attachAll(const yarp::dev::PolyDriverList &p) override
Attach to a list of objects.
void run() override
Loop function.
bool threadInit() override
Initialization method.
bool detachAll() override
Detach the object (you must have first called attach).
bool close() override
Close the DeviceDriver.
void threadRelease() override
Release method.
bool open(yarp::os::Searchable ¶ms) override
Open the DeviceDriver.
Interface implemented by all device drivers.
A generic battery interface.
Interface for an object that can wrap/attach to to another.
A container for a device driver.
An interface for reading from a network connection.
An abstraction for a periodic thread.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
A mini-server for network communication.
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.