NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgSpringCableActuatorSensor Class Reference

#include <tgSpringCableActuatorSensor.h>

Inheritance diagram for tgSpringCableActuatorSensor:
Collaboration diagram for tgSpringCableActuatorSensor:

Public Member Functions

 tgSpringCableActuatorSensor (tgSpringCableActuator *pSCA)
 
virtual ~tgSpringCableActuatorSensor ()
 
virtual std::vector< std::string > getSensorDataHeadings ()
 
virtual std::vector< std::string > getSensorData ()
 

Protected Attributes

tgSenseablem_pSens
 

Detailed Description

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.

Constructor & Destructor Documentation

tgSpringCableActuatorSensor::tgSpringCableActuatorSensor ( tgSpringCableActuator pSCA)

The constructor for tgSpringCableActuatorSensor, will be same as tgSensor, but now with a more specific pointer.

Parameters
[in]pSCAa 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.

tgSpringCableActuatorSensor::~tgSpringCableActuatorSensor ( )
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.

Member Function Documentation

std::vector< std::string > tgSpringCableActuatorSensor::getSensorData ( )
virtual

The method that collects the actual data from this tgSpringCableActuator.

Implements tgSensor.

Definition at line 115 of file tgSpringCableActuatorSensor.cpp.

std::vector< std::string > tgSpringCableActuatorSensor::getSensorDataHeadings ( )
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.

Member Data Documentation

tgSenseable* tgSensor::m_pSens
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.


The documentation for this class was generated from the following files: