File control/src/utils/SensorEvent.hpp

Go to the source code of this file

Sensor Events.

class SensorEvent : public Event
#include <SensorEvent.hpp>

Events when sensor data capture is done.

Public Functions

SensorEvent(double time, int name)

constructor with time value as a parameter

Parameters
  • time: the starting time of the Event
  • name: the type of the Event

~SensorEvent()

destructor

void process(Simulation &sim)

Call the capture method of the linked Sensor.

Parameters
  • sim: a SP::Simulation (ignored).

SP::Sensor sensor() const

get the Sensor linked to this Event

Return
a pointer to the Sensor

void setSensorPtr(SP::Sensor newSensor)

set the Sensor linked to this Event

Parameters
  • newSensor: the SP::Sensor

Private Functions

SensorEvent()

Default constructor.

ACCEPT_SERIALIZATION(SensorEvent)

serialization hooks

Private Members

SP::Sensor _sensor

The sensor linked to the present event.