SensorController Class Reference
The base abstract class for sensor controllers. More...

Public Member Functions | |
| SensorController (World *world) | |
| Constructor. | |
| virtual | ~SensorController () |
| Destructor. | |
| bool | isEnabled () |
| Returns true is if the sensor is enabled. | |
| void | setEnabled (bool b) |
| Enables/Disables this sensor controller. | |
| virtual void | update ()=0 |
| Updates the sensor reading. | |
| World * | world () |
| Returns the world. | |
Detailed Description
The base abstract class for sensor controllers.
- Motivation
- Common interface among sensor controllers hierachy
- Description
- Warnings
- The world hasn't a list of sensors, so they must be destroyed by the owner or by the creator
Definition at line 42 of file sensorcontrollers.h.
Constructor & Destructor Documentation
| SensorController | ( | World * | world | ) |
Constructor.
- Parameters:
-
world The world in which we live
Definition at line 32 of file sensorcontrollers.cpp.
| ~SensorController | ( | ) | [virtual] |
Destructor.
Definition at line 39 of file sensorcontrollers.cpp.
Member Function Documentation
| bool isEnabled | ( | ) | [inline] |
Returns true is if the sensor is enabled.
A disabled sensor should not be updated
- Returns:
- true is if the sensor is enabled
Definition at line 71 of file sensorcontrollers.h.
Referenced by PhyMarXbot::postUpdate().
| void setEnabled | ( | bool | b | ) | [inline] |
Enables/Disables this sensor controller.
A disabled sensor should not be updated
- Parameters:
-
b true to enable the controller, false to disable it
Definition at line 82 of file sensorcontrollers.h.
| virtual void update | ( | ) | [pure virtual] |
Updates the sensor reading.
This is a pure virtual method implemented by actual sensor controllers that apply the logic of controller
Implemented in SimulatedIRProximitySensorController, and SimulatedIRGroundSensorController.
| World* world | ( | ) | [inline] |
The documentation for this class was generated from the following files:
- worldsim/include/sensorcontrollers.h
- worldsim/src/sensorcontrollers.cpp