Battery_nwc_yarp
: The client side of any IBattery capable device.
More...
#include <battery_nwc_yarp/battery_nwc_yarp.h>
Public Member Functions | |
bool | open (yarp::os::Searchable &config) override |
Initialize the object. | |
bool | close () override |
Shut the object down. | |
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 | |
Public Member Functions inherited from yarp::dev::DeviceDriver | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
~DeviceDriver () override | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. | |
bool | close () override |
Close the 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. | |
Public Member Functions inherited from yarp::os::IConfig | |
virtual | ~IConfig () |
Destructor. | |
virtual bool | configure (Searchable &config) |
Change online parameters. | |
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 |
std::string | m_carrier |
yarp::os::Stamp | lastTs |
std::string | deviceId |
Additional Inherited Members | |
Public Types inherited from yarp::dev::IBattery | |
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 } |
Battery_nwc_yarp
: The client side of any IBattery capable device.
Still single thread! concurrent access is unsafe.
Parameters required by this device are:
Parameter name | SubParameter | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|---|
local | - | string | - | - | Yes | Full port name opened by the batteryClient device. | |
remote | - | string | - | - | Yes | Full port name of the port opened on the server side, to which the batteryClient connects to. | |
carrier | - | string | - | tcp | No | The carier used for the connection with the server. |
Definition at line 79 of file battery_nwc_yarp.h.
|
overridevirtual |
Shut the object down.
You should override this.
Reimplemented from yarp::os::IConfig.
Definition at line 234 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 253 of file battery_nwc_yarp.cpp.
Get the instantaneous current measurement.
current | the current measurement |
Implements yarp::dev::IBattery.
Definition at line 247 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 271 of file battery_nwc_yarp.cpp.
|
overridevirtual |
get the battery status
status | the battery status |
Implements yarp::dev::IBattery.
Definition at line 259 of file battery_nwc_yarp.cpp.
get the battery temperature
temprature | the battery temperature |
Implements yarp::dev::IBattery.
Definition at line 265 of file battery_nwc_yarp.cpp.
Get the instantaneous voltage measurement.
voltage | the voltage measurement |
Implements yarp::dev::IBattery.
Definition at line 241 of file battery_nwc_yarp.cpp.
|
overridevirtual |
Get the time stamp for the last read data.
Implements yarp::dev::IPreciselyTimed.
Definition at line 285 of file battery_nwc_yarp.cpp.
|
overridevirtual |
Initialize the object.
You should override this.
config | is a list of parameters for the object. Which parameters are effective for your object can vary. |
Reimplemented from yarp::os::IConfig.
Definition at line 175 of file battery_nwc_yarp.cpp.
|
protected |
Definition at line 91 of file battery_nwc_yarp.h.
|
protected |
Definition at line 85 of file battery_nwc_yarp.h.
|
protected |
Definition at line 90 of file battery_nwc_yarp.h.
|
protected |
Definition at line 87 of file battery_nwc_yarp.h.
|
protected |
Definition at line 89 of file battery_nwc_yarp.h.
|
protected |
Definition at line 88 of file battery_nwc_yarp.h.
|
protected |
Definition at line 86 of file battery_nwc_yarp.h.