cisst-saw
|
Base class for data object in cisstMultiTask. More...
#include <mtsGenericObject.h>
Public Member Functions | |
mtsGenericObject (void) | |
mtsGenericObject (double timestamp, bool automaticTimestamp, bool valid) | |
mtsGenericObject (const mtsGenericObject &other) | |
virtual | ~mtsGenericObject (void) |
bool | SetTimestampIfAutomatic (double timestamp) |
virtual void | ToStream (std::ostream &outputStream) const |
virtual void | ToStreamRaw (std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const |
virtual bool | FromStreamRaw (std::istream &inputStream, const char delimiter= ' ') |
virtual void | SerializeRaw (std::ostream &outputStream) const |
virtual void | DeSerializeRaw (std::istream &inputStream) |
size_t | ScalarNumber (void) const |
bool | ScalarNumberIsFixed (void) const |
double | Scalar (const size_t index) const throw (std::out_of_range) |
std::string | ScalarDescription (const size_t index, const std::string &userDescription="") const throw (std::out_of_range) |
![]() | |
virtual | ~cmnGenericObject (void) |
virtual const cmnClassServicesBase * | Services (void) const =0 |
bool | ReconstructFrom (const cmnGenericObject &other) |
std::string | ToString (void) const |
virtual cmnLogger::StreamBufType * | GetLogMultiplexer (void) const |
virtual double | Scalar (const size_t CMN_UNUSED(index)) const throw (std::out_of_range) |
virtual std::string | ScalarDescription (const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const |
Base class for data object in cisstMultiTask.
|
inline |
Constructor, initialize Timestamp to 0 and Valid flag to false.
|
inline |
Constructor with initialization for each member
|
inline |
Copy constructor
|
inlinevirtual |
Destructor. Does nothing specific.
|
virtual |
Binary deserialization
Reimplemented from cmnGenericObject.
Reimplemented in mtsGenericObjectProxyRef< _elementType >, mtsGenericObjectProxy< _elementType >, mtsGenericObjectProxy< double >, mtsGenericObjectProxy< std::string >, mtsGenericObjectProxy< float >, mtsGenericObjectProxy< int >, mtsGenericObjectProxy< bool >, svlSampleImageCustom< _ValueType, _DataChannels, _VideoChannels >, svlSampleImageCustom< float, 3, 1 >, svlSampleImageCustom< unsigned char, 3, 1 >, prmPositionCartesianSet, prmVelocityCartesianSet, prmFixtureGainCartesianSet, svlSampleMatrixCustom< _ValueType >, svlSampleMatrixCustom< float >, mtsStateIndex, mtsIntervalStatistics, prmActuatorState, mtsMatrix< _elementType >, mtsMatrix< double >, prmMaskedVector< _elementType >, prmGainParameters, mtsVector< _elementType >, mtsVector< double >, mtsVector< short >, mtsVector< unsigned char >, mtsVector< bool >, mtsSocketProxyInitData, mtsStealthTool, prmVelocityCartesianGet, prmVelocityJointSet, mtsFixedSizeVector< _elementType, _size >, mtsLogMessage, prmIMUSensors, prmStateJoint, prmMotionBase, prmPositionJointSet, prmForceCartesianSet, prmVelocityJointGet, mtsConnection, prmForceCartesianGet, prmPositionCartesianGet, prmActuatorParameters, prmEventButton, prmForceTorqueJointSet, prmPositionJointGet, mtsStealthTool, mtsComponentConstructorNameAndArg< T >, prmRobotState, mtsEventHandlerList, svlSampleCameraGeometry, mtsQtApplicationConstructorArg, mtsSocketProxyServerConstructorArg, ireTaskConstructorArg, mtsSocketProxyClientConstructorArg, mtsTaskPeriodicConstructorArg, svlSampleImage, mtsTaskContinuousConstructorArg, svlSampleMatrix, svlSampleBlobs, svlSampleTargets, svlSampleText, svlSampleTransform3D, svlSample, and svlSampleCUDAImage.
|
virtual |
Read from an unformatted text input (e.g., one created by ToStreamRaw). Returns true if successful.
Reimplemented from cmnGenericObject.
Reimplemented in mtsGenericObjectProxyRef< _elementType >, mtsGenericObjectProxy< _elementType >, mtsGenericObjectProxy< double >, mtsGenericObjectProxy< std::string >, mtsGenericObjectProxy< float >, mtsGenericObjectProxy< int >, mtsGenericObjectProxy< bool >, mtsSocketProxyInitData, mtsComponentConstructorNameAndArg< T >, mtsQtApplicationConstructorArg, mtsSocketProxyServerConstructorArg, ireTaskConstructorArg, mtsSocketProxyClientConstructorArg, mtsTaskPeriodicConstructorArg, and mtsTaskContinuousConstructorArg.
double mtsGenericObject::Scalar | ( | const size_t | index | ) | const |
throw | ( | std::out_of_range | |||
) |
std::string mtsGenericObject::ScalarDescription | ( | const size_t | index, |
const std::string & | userDescription = "" |
||
) | const | ||
throw | ( | std::out_of_range | |
) |
|
virtual |
Methods for data visualization. Derived classes should override the following methods in order to be properly processed by the data visualizer of the global component manager.
Return a number of data (which can be visualized, i.e., type-casted to double)
Reimplemented from cmnGenericObject.
Reimplemented in prmFixtureGainCartesianSet, prmIMUSensors, prmStateJoint, prmPositionCartesianGet, and prmPositionJointGet.
|
virtual |
Indicates if this object has a fixed number of scalars. This is used for arrays of object in order to optimize random access for a given scalar. When defining an object with a fixed number of scalars, overloading this method to return true allows some optimizations.
Reimplemented from cmnGenericObject.
Reimplemented in prmFixtureGainCartesianSet, prmIMUSensors, prmStateJoint, prmPositionCartesianGet, and prmPositionJointGet.
|
virtual |
Binary serialization
Reimplemented from cmnGenericObject.
Reimplemented in mtsGenericObjectProxyRef< _elementType >, mtsGenericObjectProxy< _elementType >, mtsGenericObjectProxy< double >, mtsGenericObjectProxy< std::string >, mtsGenericObjectProxy< float >, mtsGenericObjectProxy< int >, mtsGenericObjectProxy< bool >, svlSampleImageCustom< _ValueType, _DataChannels, _VideoChannels >, svlSampleImageCustom< float, 3, 1 >, svlSampleImageCustom< unsigned char, 3, 1 >, prmPositionCartesianSet, prmVelocityCartesianSet, prmFixtureGainCartesianSet, svlSampleMatrixCustom< _ValueType >, svlSampleMatrixCustom< float >, mtsStateIndex, mtsIntervalStatistics, prmActuatorState, mtsMatrix< _elementType >, mtsMatrix< double >, prmMaskedVector< _elementType >, mtsSocketProxyInitData, mtsStealthTool, mtsVector< _elementType >, mtsVector< double >, mtsVector< short >, mtsVector< unsigned char >, mtsVector< bool >, mtsLogMessage, prmVelocityCartesianGet, prmVelocityJointSet, prmGainParameters, prmIMUSensors, mtsFixedSizeVector< _elementType, _size >, prmStateJoint, prmMotionBase, prmPositionJointSet, prmForceCartesianSet, prmVelocityJointGet, mtsConnection, prmForceCartesianGet, prmPositionCartesianGet, prmPositionJointGet, prmActuatorParameters, prmEventButton, prmForceTorqueJointSet, mtsStealthTool, mtsEventHandlerList, svlSampleCameraGeometry, prmRobotState, mtsComponentConstructorNameAndArg< T >, mtsQtApplicationConstructorArg, mtsSocketProxyServerConstructorArg, ireTaskConstructorArg, mtsSocketProxyClientConstructorArg, mtsTaskPeriodicConstructorArg, svlSampleImage, mtsTaskContinuousConstructorArg, svlSampleMatrix, svlSampleBlobs, svlSampleTargets, svlSampleText, svlSampleTransform3D, svlSample, and svlSampleCUDAImage.
bool mtsGenericObject::SetTimestampIfAutomatic | ( | double | timestamp | ) |
Set timestamp if AutomaticTimeStamp is set to true. This is only meaningful if the derived class contains a timestamp and overrides this method.
timeStamp | time stamp in seconds |
|
virtual |
Human readable text output. This method only streams the data members of mtsGenericObject, i.e. the Timestamp and Valid flag. It should be called by any derived class re-implementing ToStream.
Reimplemented from cmnGenericObject.
Reimplemented in mtsGenericObjectProxyRef< _elementType >, mtsGenericObjectProxy< _elementType >, mtsGenericObjectProxy< double >, mtsGenericObjectProxy< std::string >, mtsGenericObjectProxy< float >, mtsGenericObjectProxy< int >, mtsGenericObjectProxy< bool >, mtsStealthProbeCal, prmFixtureGainCartesianSet, mtsStealthRegistration, mtsStealthProbeCal, mtsStealthFrame, mtsStateIndex, mtsStealthRegistration, prmActuatorState, mtsIntervalStatistics, mtsSocketProxyInitData, mtsHistory< _elementType >, prmMaskedVector< _elementType >, mtsStealthTool, mtsStealthFrame, mtsLogMessage, mtsMatrix< _elementType >, mtsMatrix< double >, prmIMUSensors, prmStateJoint, prmVelocityCartesianGet, mtsVector< _elementType >, mtsVector< double >, mtsVector< short >, mtsVector< unsigned char >, mtsVector< bool >, prmGainParameters, mtsComponentConstructorNameAndArg< T >, mtsConnection, mtsFixedSizeVector< _elementType, _size >, prmPositionCartesianGet, prmPositionJointGet, prmForceCartesianSet, prmVelocityJointGet, prmForceCartesianGet, mtsStealthTool, mtsEventHandlerList, mtsQtApplicationConstructorArg, prmEventButton, mtsSocketProxyServerConstructorArg, ireTaskConstructorArg, prmRobotState, mtsSocketProxyClientConstructorArg, mtsTaskPeriodicConstructorArg, and mtsTaskContinuousConstructorArg.
|
virtual |
Raw text output to stream
Reimplemented from cmnGenericObject.
Reimplemented in mtsGenericObjectProxyRef< _elementType >, mtsGenericObjectProxy< _elementType >, mtsGenericObjectProxy< double >, mtsGenericObjectProxy< std::string >, mtsGenericObjectProxy< float >, mtsGenericObjectProxy< int >, mtsGenericObjectProxy< bool >, mtsStealthProbeCal, prmFixtureGainCartesianSet, mtsStealthRegistration, mtsStealthProbeCal, mtsStealthFrame, mtsStateIndex, mtsStealthRegistration, mtsIntervalStatistics, mtsSocketProxyInitData, mtsHistory< _elementType >, mtsStealthTool, mtsStealthFrame, mtsMatrix< _elementType >, mtsMatrix< double >, prmIMUSensors, mtsVector< _elementType >, mtsVector< double >, mtsVector< short >, mtsVector< unsigned char >, mtsVector< bool >, prmVelocityCartesianGet, prmStateJoint, mtsFixedSizeVector< _elementType, _size >, mtsComponentConstructorNameAndArg< T >, mtsStateTable::IndexRange, prmPositionCartesianGet, prmForceCartesianSet, prmVelocityJointGet, prmPositionJointGet, prmForceCartesianGet, mtsStealthTool, mtsQtApplicationConstructorArg, prmEventButton, mtsSocketProxyServerConstructorArg, ireTaskConstructorArg, mtsSocketProxyClientConstructorArg, mtsTaskPeriodicConstructorArg, and mtsTaskContinuousConstructorArg.