6#ifndef YARP_DEV_BATTERYWRAPPER_H
7#define YARP_DEV_BATTERYWRAPPER_H
39#define DEFAULT_THREAD_PERIOD 0.02
80 bool close()
override;
89 std::unique_ptr<IBatteryMsgsImpl> m_msgsImpl;
92 std::string m_streamingPortName;
93 std::string m_rpcPortName;
98 double m_battery_charge = std::nan(
"");
99 double m_battery_voltage = std::nan(
"");
100 double m_battery_current = std::nan(
"");
101 double m_battery_temperature = std::nan(
"");
106 std::string m_sensorId;
109 char m_log_buffer[1024];
110 FILE *m_logFile=
nullptr;
118 bool detach()
override;
122 void notify_message(std::string msg);
123 void emergency_shutdown(std::string msg);
124 void check_battery_status(
double battery_charge);
125 void stop_robot(std::string quit_port);
contains the definition of a Vector type
This class is the parameters parser for class Battery_nws_yarp.
Battery_nws_yarp: Device that expose a battery sensor (using the IBattery interface) on the YARP netw...
bool open(yarp::os::Searchable ¶ms) override
Open the DeviceDriver.
void threadRelease() override
Release method.
bool threadInit() override
Initialization method.
void run() override
Loop function.
bool close() override
Close the DeviceDriver.
return_get_BatteryInfo getBatteryInfoRPC() override
~IBatteryMsgsImpl()=default
Interface implemented by all device drivers.
A generic battery interface.
A container for a device driver.
Helper interface for an object that can wrap/or "attach" to a single other device.
A mini-server for performing network communication in the background.
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.