NTRT Simulator
Version: Master
|
#include <tgSpringCableActuatorSensor.h>
Public Member Functions | |
tgSpringCableActuatorSensor (tgSpringCableActuator *pSCA) | |
virtual | ~tgSpringCableActuatorSensor () |
virtual std::vector< std::string > | getSensorDataHeadings () |
virtual std::vector< std::string > | getSensorData () |
Protected Attributes | |
tgSenseable * | m_pSens |
This class extends tgSensor to sense a tgSpringCableActuator. Its functionality is similar to what was hard-coded in earlier work on tgDataLogger/Observer.
Definition at line 39 of file tgSpringCableActuatorSensor.h.
tgSpringCableActuatorSensor::tgSpringCableActuatorSensor | ( | tgSpringCableActuator * | pSCA | ) |
The constructor for tgSpringCableActuatorSensor, will be same as tgSensor, but now with a more specific pointer.
[in] | pSCA | a pointer to a tgSpringCableActuator that this sensor will attach itself to. |
This class is a sensor for tgSpringCableActuators. Its constructor just calls tgSensor's constructor.
Definition at line 48 of file tgSpringCableActuatorSensor.cpp.
|
virtual |
A class with virtual member functions must have a virtual destructor. Note that management of the pointer to the tgSpringCableActuator (tgSenseable) is managed by the destructor for tgSensor.
Definition at line 62 of file tgSpringCableActuatorSensor.cpp.
|
virtual |
The method that collects the actual data from this tgSpringCableActuator.
Implements tgSensor.
Definition at line 115 of file tgSpringCableActuatorSensor.cpp.
|
virtual |
Similarly, this class will implement the two data colleciton methods.
The two methods from tgSensor. A tgSpringCableActuator can return its rest length, current length, and tension. TO-DO: somehow include the config for a specific tgSCA, like spring constant and damping constant.
Headings should have the following form: The type of sensor, then an open parenthesis "(" and the tags of the specific tgSenseable object, then a ")." and a label for the specific field that will be output in that row. For example, if sensor will be sensing a rod with tags "t4 t5", its label for the X position might be "rod(t4 t5).X"
Implements tgSensor.
Definition at line 72 of file tgSpringCableActuatorSensor.cpp.
|
protectedinherited |
This class stores a pointer to its tgSenseable object. Note that it is protected so that subclasses can access it, but children will still need to cast it against their specific type of tgSenseable (e.g., rod, cable, etc.)
Definition at line 102 of file tgSensor.h.