6 #ifndef YARP_DEV_BATTERYWRAPPER_H
7 #define YARP_DEV_BATTERYWRAPPER_H
34 #define DEFAULT_THREAD_PERIOD 0.02
99 bool close()
override;
115 std::string m_streamingPortName;
116 std::string m_rpcPortName;
117 std::string m_quitPortName;
122 double m_battery_charge = std::nan(
"");
123 double m_battery_voltage = std::nan(
"");
124 double m_battery_current = std::nan(
"");
125 double m_battery_temperature = std::nan(
"");
131 std::string m_sensorId;
134 bool m_enable_shutdown;
138 char m_log_buffer[1024];
151 void notify_message(std::string msg);
152 void emergency_shutdown(std::string msg);
153 void check_battery_status(
double battery_charge);
154 void stop_robot(std::string quit_port);
const int BATTERY_TIMEOUT
contains the definition of a Vector type
batteryWrapper: Device that expose a battery sensor (using the IBattery interface) on the YARP networ...
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.