#include "api/LCDSensor.h"
Inheritance diagram for LCDSensor:
A sensor should implement waitForChange and getCurrentValue. It can use some methods defined here for convenience.
Definition at line 55 of file LCDSensor.h.
Public Member Functions | |
virtual void | waitForChange ()=0 |
Returns when a change occured on the measured value. | |
virtual std::string | getCurrentValue ()=0 |
Get the current value measured by the sensor. | |
std::string | intToString (int value) |
Convert an integer to a string. | |
std::string | executeCommand (const std::string &cmd) |
Execute an external command. | |
void | addOnChangeWidget (LCDWidget *widget) |
Add a new widget that must be set when the sensor value changes. | |
void | addOnTimeOutWidget (LCDWidget *widget, int timeOut) |
Add a new widget that must be changed regularly. | |
void | removeOnChangeWidget (LCDWidget *widget) |
Remove a widget that was added with addOnChangeWidget. | |
void | removeOnChangeWidget (std::string id) |
Remove a widget that was added with addOnChangeWidget. | |
void | removeOnTimeOutWidget (LCDWidget *widget) |
Remove a widget that was added with addOnTimeOutWidget. | |
void | removeOnTimeOutWidget (std::string id) |
Remove a widget that was added with addOnTimeOutWidget. |
|
This method is used to associate a wiget to a sensor. When the sensor value change, the widget value will be changed accordingly.
Definition at line 108 of file LCDSensor.cpp. |
|
This method is used to associate a wiget to a sensor. Each time the specified timeout ellapsed, widget value is changed.
Definition at line 137 of file LCDSensor.cpp. |
|
This method can be used to invoke another program and get its output. Only the first line is returned.
Definition at line 88 of file LCDSensor.cpp. |
|
This virtual function should be implemented by a real sensor. It should return the current value as a string.
Implemented in LCDCpuSensor, LCDKdeMultimediaSensor, LCDSystemSensor, and LCDTimeSensor. |
|
Utility function to convert an integer to a string so it can be returned by getCurrentValue. It should return the current value as a string.
Definition at line 83 of file LCDSensor.cpp. |
|
This method is used to delete the association between a wiget and a sensor.
Definition at line 124 of file LCDSensor.cpp. |
|
This method is used to delete the association between a wiget and a sensor.
Definition at line 119 of file LCDSensor.cpp. |
|
This method is used to delete the association between a wiget and a sensor.
Definition at line 155 of file LCDSensor.cpp. |
|
This method is used to delete the association between a wiget and a sensor.
Definition at line 150 of file LCDSensor.cpp. |
|
This virtual function should be implemented by a real sensor. It should wait for the value to change and then just return. Implemented in LCDCpuSensor, LCDKdeMultimediaSensor, LCDSystemSensor, and LCDTimeSensor. |