upowerBattery
: A device to view the battery of a linux laptop in YARP using the yarp::dev::IBattery
interface.
More...
#include <upowerBattery/upowerBattery.h>
Public Member Functions | |
UpowerBattery ()=default | |
UpowerBattery (const UpowerBattery &)=delete | |
UpowerBattery (UpowerBattery &&)=delete | |
UpowerBattery & | operator= (const UpowerBattery &)=delete |
UpowerBattery & | operator= (UpowerBattery &&)=delete |
~UpowerBattery () override=default | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. | |
bool | close () override |
Close the DeviceDriver. | |
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 &info) override |
get the battery hardware characteristics (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 | |
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::IBattery | |
virtual | ~IBattery () |
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 } |
upowerBattery
: A device to view the battery of a linux laptop in YARP using the yarp::dev::IBattery
interface.
Documentation to be added
Definition at line 22 of file upowerBattery.h.
|
default |
|
delete |
|
delete |
|
overridedefault |
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 45 of file upowerBattery.cpp.
get the battery status of charge
charge | the charge measurement (0-100%) |
Implements yarp::dev::IBattery.
Definition at line 69 of file upowerBattery.cpp.
Get the instantaneous current measurement.
current | the current measurement |
Implements yarp::dev::IBattery.
Definition at line 57 of file upowerBattery.cpp.
|
overridevirtual |
get the battery hardware characteristics (e.g.
max voltage etc)
a | string containing the battery infos |
Implements yarp::dev::IBattery.
Definition at line 126 of file upowerBattery.cpp.
|
overridevirtual |
get the battery status
status | the battery status |
Implements yarp::dev::IBattery.
Definition at line 75 of file upowerBattery.cpp.
get the battery temperature
temperature | the battery temperature |
Implements yarp::dev::IBattery.
Definition at line 120 of file upowerBattery.cpp.
Get the instantaneous voltage measurement.
voltage | the voltage measurement |
Implements yarp::dev::IBattery.
Definition at line 51 of file upowerBattery.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 29 of file upowerBattery.cpp.
|
delete |
|
delete |