batteryClient
: The client side of any IBattery capable device.
More...
#include <batteryClient/BatteryClient.h>
Public Member Functions | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. More... | |
bool | close () override |
Close the DeviceDriver. More... | |
yarp::os::Stamp | getLastInputStamp () override |
Get the time stamp for the last read data. More... | |
bool | getBatteryVoltage (double &voltage) override |
Get the instantaneous voltage measurement. More... | |
bool | getBatteryCurrent (double ¤t) override |
Get the instantaneous current measurement. More... | |
bool | getBatteryCharge (double &charge) override |
get the battery status of charge More... | |
bool | getBatteryStatus (Battery_status &status) override |
get the battery status More... | |
bool | getBatteryInfo (std::string &battery_info) override |
get the battery hardware charactestics (e.g. More... | |
bool | getBatteryTemperature (double &temperature) override |
get the battery temperature More... | |
Public Member Functions inherited from yarp::dev::DeviceDriver | |
~DeviceDriver () override=default | |
Destructor. More... | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. More... | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. More... | |
Public Member Functions inherited from yarp::os::IConfig | |
virtual | ~IConfig () |
Destructor. More... | |
virtual bool | configure (Searchable &config) |
Change online parameters. More... | |
Public Member Functions inherited from yarp::dev::IPreciselyTimed | |
virtual | ~IPreciselyTimed () |
Public Member Functions inherited from yarp::dev::IBattery | |
virtual | ~IBattery () |
Protected Attributes | |
BatteryInputPortProcessor | inputPort |
yarp::os::Port | rpcPort |
std::string | local |
std::string | remote |
yarp::os::Stamp | lastTs |
std::string | deviceId |
Additional Inherited Members | |
Public Types inherited from yarp::dev::IBattery | |
enum | Battery_status { BATTERY_OK_STANBY = 0, BATTERY_OK_IN_CHARGE = 1, BATTERY_OK_IN_USE = 2, BATTERY_GENERAL_ERROR = 3, BATTERY_TIMEOUT = 4, BATTERY_LOW_WARNING = 5, BATTERY_CRITICAL_WARNING = 6 } |
batteryClient
: The client side of any IBattery capable device.
Still single thread! concurrent access is unsafe.
Definition at line 84 of file BatteryClient.h.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 244 of file BatteryClient.cpp.
|
overridevirtual |
get the battery status of charge
charge | the charge measurement (0-100%) |
Implements yarp::dev::IBattery.
Definition at line 263 of file BatteryClient.cpp.
|
overridevirtual |
Get the instantaneous current measurement.
current | the current measurement |
Implements yarp::dev::IBattery.
Definition at line 257 of file BatteryClient.cpp.
|
overridevirtual |
get the battery hardware charactestics (e.g.
max voltage etc)
a | string containing the battery infos |
Implements yarp::dev::IBattery.
Definition at line 281 of file BatteryClient.cpp.
|
overridevirtual |
get the battery status
status | the battery status |
Implements yarp::dev::IBattery.
Definition at line 269 of file BatteryClient.cpp.
|
overridevirtual |
get the battery temperature
temprature | the battery temperature |
Implements yarp::dev::IBattery.
Definition at line 275 of file BatteryClient.cpp.
|
overridevirtual |
Get the instantaneous voltage measurement.
voltage | the voltage measurement |
Implements yarp::dev::IBattery.
Definition at line 251 of file BatteryClient.cpp.
|
overridevirtual |
Get the time stamp for the last read data.
Implements yarp::dev::IPreciselyTimed.
Definition at line 295 of file BatteryClient.cpp.
|
overridevirtual |
Open the DeviceDriver.
config | is a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 186 of file BatteryClient.cpp.
|
protected |
Definition at line 95 of file BatteryClient.h.
|
protected |
Definition at line 90 of file BatteryClient.h.
|
protected |
Definition at line 94 of file BatteryClient.h.
|
protected |
Definition at line 92 of file BatteryClient.h.
|
protected |
Definition at line 93 of file BatteryClient.h.
|
protected |
Definition at line 91 of file BatteryClient.h.