The basic interface for a simulated sensor. More...
#include <sensor.h>
Public Member Functions | |
virtual | ~CSimulatedSensor () |
Class destructor. More... | |
virtual void | SetRobot (CComposableEntity &c_entity)=0 |
Sets the entity associated to this sensor. More... | |
virtual void | Update ()=0 |
Updates the state of the entity associated to this sensor, if the sensor is currently enabled. More... | |
The basic interface for a simulated sensor.
To implement the simulated model of an sensor, you must define a class that inherits from both the control interface and this class.
|
inlinevirtual |
|
pure virtual |
Sets the entity associated to this sensor.
When a controller is created, all the sensors and actuators are created, too. This function is called right before the Init()
method of the sensor is called.
c_entity | The entity to associate to this sensor. |
Implemented in argos::CPrototypeJointsDefaultSensor, argos::CRangeAndBearingMediumSensor, argos::CRadiosDefaultSensor, argos::CProximityDefaultSensor, argos::CPositioningDefaultSensor, argos::CLightDefaultSensor, argos::CGroundRotZOnlySensor, argos::CDifferentialSteeringDefaultSensor, argos::CColoredBlobPerspectiveCameraDefaultSensor, argos::CColoredBlobOmnidirectionalCameraRotZOnlySensor, argos::CCameraDefaultSensor, argos::CBatteryDefaultSensor, argos::CFootBotTurretEncoderDefaultSensor, argos::CFootBotProximityDefaultSensor, argos::CFootBotMotorGroundRotZOnlySensor, argos::CFootBotLightRotZOnlySensor, argos::CFootBotDistanceScannerRotZOnlySensor, argos::CFootBotBaseGroundRotZOnlySensor, argos::CEyeBotProximityDefaultSensor, argos::CEyeBotLightRotZOnlySensor, and argos::CEPuckProximityDefaultSensor.
|
pure virtual |
Updates the state of the entity associated to this sensor, if the sensor is currently enabled.
If it is disabled, then this function should do nothing.
Implemented in argos::CPrototypeJointsDefaultSensor, argos::CRangeAndBearingMediumSensor, argos::CRadiosDefaultSensor, argos::CProximityDefaultSensor, argos::CPositioningDefaultSensor, argos::CLightDefaultSensor, argos::CGroundRotZOnlySensor, argos::CDifferentialSteeringDefaultSensor, argos::CColoredBlobPerspectiveCameraDefaultSensor, argos::CColoredBlobOmnidirectionalCameraRotZOnlySensor, argos::CCameraDefaultSensor, argos::CBatteryDefaultSensor, argos::CFootBotTurretEncoderDefaultSensor, argos::CFootBotProximityDefaultSensor, argos::CFootBotMotorGroundRotZOnlySensor, argos::CFootBotLightRotZOnlySensor, argos::CFootBotDistanceScannerRotZOnlySensor, argos::CFootBotBaseGroundRotZOnlySensor, argos::CEyeBotProximityDefaultSensor, argos::CEyeBotLightRotZOnlySensor, and argos::CEPuckProximityDefaultSensor.