Battery_nwc_yarp
: The client side of any IBattery capable device.
More...
#include <networkWrappers/battery_nwc_yarp/Battery_nwc_yarp.h>
Public Member Functions | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. | |
bool | close () override |
Close the DeviceDriver. | |
yarp::os::Stamp | getLastInputStamp () override |
Get the time stamp for the last read data. | |
bool | getBatteryVoltage (double &voltage) override |
Get the instantaneous voltage measurement. | |
bool | getBatteryCurrent (double ¤t) override |
Get the instantaneous current measurement. | |
bool | getBatteryCharge (double &charge) override |
get the battery status of charge | |
bool | getBatteryStatus (Battery_status &status) override |
get the battery status | |
bool | getBatteryInfo (std::string &battery_info) override |
get the battery hardware charactestics (e.g. | |
bool | getBatteryTemperature (double &temperature) override |
get the battery temperature | |
![]() | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
virtual | ~DeviceDriver () |
virtual std::string | id () const |
Return the id assigned to the PolyDriver. | |
virtual void | setId (const std::string &id) |
Set the id for this device. | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. | |
![]() | |
virtual | ~IPreciselyTimed () |
![]() | |
virtual | ~IBattery () |
![]() | |
Battery_nwc_yarp_ParamsParser () | |
~Battery_nwc_yarp_ParamsParser () override=default | |
bool | parseParams (const yarp::os::Searchable &config) override |
Parse the DeviceDriver parameters. | |
std::string | getDeviceClassName () const override |
Get the name of the DeviceDriver class. | |
std::string | getDeviceName () const override |
Get the name of the device (i.e. | |
std::string | getDocumentationOfDeviceParams () const override |
Get the documentation of the DeviceDriver's parameters. | |
std::vector< std::string > | getListOfParams () const override |
Return a list of all params used by the device. | |
![]() | |
virtual | ~IDeviceDriverParams () |
Protected Attributes | |
BatteryInputPortProcessor | inputPort |
yarp::os::Port | rpcPort |
yarp::os::Stamp | lastTs |
std::string | deviceId |
Additional Inherited Members | |
![]() | |
enum | Battery_status { BATTERY_OK_STANDBY = 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 } |
![]() | |
const std::string | m_device_classname = {"Battery_nwc_yarp"} |
const std::string | m_device_name = {"battery_nwc_yarp"} |
bool | m_parser_is_strict = false |
const parser_version_type | m_parser_version = {} |
const std::string | m_local_defaultValue = {""} |
const std::string | m_remote_defaultValue = {""} |
const std::string | m_carrier_defaultValue = {"tcp"} |
std::string | m_local = {} |
std::string | m_remote = {} |
std::string | m_carrier = {"tcp"} |
Battery_nwc_yarp
: The client side of any IBattery capable device.
Parameters required by this device are shown in class: Battery_nwc_yarp_ParamsParser
Definition at line 73 of file Battery_nwc_yarp.h.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 218 of file Battery_nwc_yarp.cpp.
get the battery status of charge
charge | the charge measurement (0-100%) |
Implements yarp::dev::IBattery.
Definition at line 237 of file Battery_nwc_yarp.cpp.
Get the instantaneous current measurement.
current | the current measurement |
Implements yarp::dev::IBattery.
Definition at line 231 of file Battery_nwc_yarp.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 255 of file Battery_nwc_yarp.cpp.
|
overridevirtual |
get the battery status
status | the battery status |
Implements yarp::dev::IBattery.
Definition at line 243 of file Battery_nwc_yarp.cpp.
get the battery temperature
temprature | the battery temperature |
Implements yarp::dev::IBattery.
Definition at line 249 of file Battery_nwc_yarp.cpp.
Get the instantaneous voltage measurement.
voltage | the voltage measurement |
Implements yarp::dev::IBattery.
Definition at line 225 of file Battery_nwc_yarp.cpp.
|
overridevirtual |
Get the time stamp for the last read data.
Implements yarp::dev::IPreciselyTimed.
Definition at line 269 of file Battery_nwc_yarp.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 175 of file Battery_nwc_yarp.cpp.
|
protected |
Definition at line 83 of file Battery_nwc_yarp.h.
|
protected |
Definition at line 80 of file Battery_nwc_yarp.h.
|
protected |
Definition at line 82 of file Battery_nwc_yarp.h.
|
protected |
Definition at line 81 of file Battery_nwc_yarp.h.