class
#include <iDynTree/Sensors.h>
SensorsList Structure representing a group of sensors associated with an UndirectedTree.
Public types
- class ConstIterator
- class ConstTypedIterator
- class Iterator
- class TypedIterator
- using typed_iterator = TypedIterator
- using const_typed_iterator = ConstTypedIterator
- using iterator = Iterator
- using const_iterator = ConstIterator
Constructors, destructors, conversion operators
- SensorsList()
- Constructor.
- SensorsList(const SensorsList& other)
- Copy constructor.
- ~SensorsList() virtual
- Destructor.
Public functions
- auto operator=(const SensorsList& other) -> SensorsList&
- Copy operator.
- auto addSensor(const Sensor& sensor) -> std::ptrdiff_t
- Add a sensor to the SensorsTree.
- auto setSerialization(const SensorType& sensor_type, const std::vector<std::string>& serializaton) -> bool
- Change the serialization of a specific sensor type.
- auto getSerialization(const SensorType& sensor_type, std::vector<std::string>& serializaton) -> bool
- Get the serialization of a specific sensor type.
- auto getNrOfSensors(const SensorType& sensor_type) const -> std::size_t
- Get the number of sensors of type sensor_type in this SensorsList .
- auto getSensorIndex(const SensorType& sensor_type, const std::string& _sensor_name, std::ptrdiff_t& sensor_index) const -> bool
- Get the index of a sensor of type sensor_type in this SensorList.
- auto getSensorIndex(const SensorType& sensor_type, const std::string& _sensor_name) const -> std::ptrdiff_t
- Get the index of a sensor of type sensor_type and with name sensor_name.
- auto getSizeOfAllSensorsMeasurements() const -> size_t
- Get the total size of sensor measurements.
- auto getSensor(const SensorType& sensor_type, std::ptrdiff_t sensor_index) const -> Sensor*
- Get the pointer to the sensor of index sensor_index and of type sensor_type.
- auto isConsistent(const Model& model) const -> bool
- Check if all the sensors in the list are consistent with the specified model.
- auto removeSensor(const SensorType& sensor_type, const std::string& _sensor_name) -> bool
- auto removeSensor(const SensorType& sensor_type, const std::ptrdiff_t sensor_index) -> bool
- auto removeAllSensorsOfType(const SensorType& sensor_type) -> bool
- auto allSensorsIterator() -> iterator
-
auto allSensorsIterator() const -> const_
iterator -
auto sensorsIteratorForType(const iDynTree::SensorType& sensor_type) -> typed_
iterator -
auto sensorsIteratorForType(const iDynTree::SensorType& sensor_type) const -> const_
typed_ iterator
Function documentation
std::ptrdiff_t iDynTree:: SensorsList:: addSensor(const Sensor& sensor)
Add a sensor to the SensorsTree.
Parameters | |
---|---|
sensor in | constant reference to the Sensor to add. |
Returns | the sensor index of the newly added sensor, or -1 in case of error. |
The initial sensor index will depend on the order in which the sensor are added to the sensorsTree. The sensor index can then be changed with a call to the setSerialization method.
The passed sensor will be dynamic casted to the specified sensor type, and will be copied in the sensors tree only if the dynamic cast will be successful.
std::size_t iDynTree:: SensorsList:: getNrOfSensors(const SensorType& sensor_type) const
Get the number of sensors of type sensor_type in this SensorsList .
Returns | the number of sensors of type sensor_type |
---|
bool iDynTree:: SensorsList:: getSensorIndex(const SensorType& sensor_type,
const std::string& _sensor_name,
std::ptrdiff_t& sensor_index) const
Get the index of a sensor of type sensor_type in this SensorList.
Returns | true if the sensor name is found, false otherwise. |
---|
std::ptrdiff_t iDynTree:: SensorsList:: getSensorIndex(const SensorType& sensor_type,
const std::string& _sensor_name) const
Get the index of a sensor of type sensor_type and with name sensor_name.
Returns | the sensor index if the sensor_name is found, -1 otherwise. |
---|