Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SensorInfo Struct Reference

Base class for sensor descriptions, actual subclass name stored in sensorType. More...

#include <SensorInfo.h>

Inheritance diagram for SensorInfo:

Detailed Description

Base class for sensor descriptions, actual subclass name stored in sensorType.

Definition at line 10 of file SensorInfo.h.

List of all members.

Public Member Functions

virtual void declareValues (DynamicRobotState &values)=0
 Subclass should add name/value pairs to the dictionary to allow variable number of values per Sensor, as well as fast filtering and serialization to subscribers.
virtual void reclaimValues (DynamicRobotState &values)=0
 Subclass should remove values added via previous declareValues().
virtual SensorInfoclone () const __attribute__((warn_unused_result))=0
 clone implementation for Dictionary

Public Attributes

plist::Primitive< std::string > sensorType
 Name of sensor class, with "Sensor" prefix removed; see KinematicJoint::SensorInfo subclasses.

Protected Member Functions

 SensorInfo (const std::string &type)
 Constructor, pass the name of the subclass, minus the "Sensor" prefix — this is used to recreate the subtype via a factory (so you should also do the autoRegister thing and pass that here).
 SensorInfo (const SensorInfo &si)
 Copy constructor for cloning.
void init ()
 performs common initialization

Constructor & Destructor Documentation

SensorInfo::SensorInfo ( const std::string &  type  )  [explicit, protected]

Constructor, pass the name of the subclass, minus the "Sensor" prefix — this is used to recreate the subtype via a factory (so you should also do the autoRegister thing and pass that here).

Definition at line 25 of file SensorInfo.h.

SensorInfo::SensorInfo ( const SensorInfo si  )  [protected]

Copy constructor for cloning.

Definition at line 27 of file SensorInfo.h.


Member Function Documentation

virtual SensorInfo* SensorInfo::clone (  )  const [pure virtual]

clone implementation for Dictionary

implements the clone function for dictionary

Reimplemented from plist::DictionaryOf< PO, Alloc >.

Implemented in SensorRangeFinder, SensorContact, SensorFeedback, GPSSensor, and OdometrySensor.

virtual void SensorInfo::declareValues ( DynamicRobotState values  )  [pure virtual]

Subclass should add name/value pairs to the dictionary to allow variable number of values per Sensor, as well as fast filtering and serialization to subscribers.

A reference to a permanent plist::Primitive<float> instance should be added, this is how values are extracted from the sensor via this shared value.

Implemented in SensorRangeFinder, SensorContact, SensorFeedback, GPSSensor, and OdometrySensor.

void SensorInfo::init (  )  [protected]

performs common initialization

Reimplemented in SensorRangeFinder, SensorContact, SensorFeedback, GPSSensor, and OdometrySensor.

Definition at line 29 of file SensorInfo.h.

Referenced by SensorInfo().

virtual void SensorInfo::reclaimValues ( DynamicRobotState values  )  [pure virtual]

Subclass should remove values added via previous declareValues().

Implemented in SensorRangeFinder, SensorContact, SensorFeedback, GPSSensor, and OdometrySensor.


Member Data Documentation

Name of sensor class, with "Sensor" prefix removed; see KinematicJoint::SensorInfo subclasses.

Definition at line 19 of file SensorInfo.h.

Referenced by init().


The documentation for this struct was generated from the following file:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:16 2016 by Doxygen 1.6.3