File control/src/Sensor/ControlSensor.hpp

Go to the source code of this file

A generic control sensor.

class ControlSensor : public Sensor
#include <ControlSensor.hpp>

Generic control Sensor to get the output of the system.

A generic control sensor

Subclassed by LinearSensor

Public Functions

virtual void capture() = 0

capture data when the SensorEvent is processed => set data[SensorEvent]=…

unsigned int getYDim() const

Get the dimension of the output.


an unsigned int

virtual void initialize(const NonSmoothDynamicalSystem &nsds)

get all the data saved for this sensor


a DataSet initialize sensor data.

  • nsds: the Model

const SiconosVector &y() const

Get a pointer to the output.


SP::SiconosVector to the output

SP::SiconosVector yTk() const

Protected Functions


Default constructor.

ControlSensor(unsigned int type, SP::DynamicalSystem ds, double delay = 0)

Simple Constructor.

  • type: the type of the Sensor

  • ds: the SP::DynamicalSystem it observes

  • delay: the delay between the measurement and the avaibility of the data

Protected Attributes

boost::circular_buffer<SP::SiconosVector> _bufferY

A buffer to store the value of \(y_k\) if there is a delay.

double _delay

delay between the measurement on the DynamicalSystem and the avaibility of the value

SP::SiconosVector _storedY

A vector for the current value of the output.

Private Functions


serialization hooks