cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Types | Protected Attributes | List of all members
mtsStateData< _elementType > Class Template Reference

#include <mtsStateData.h>

Public Member Functions

void Get (const mtsStateIndex &when, value_type &data) const
 
void GetLatest (value_type &obj) const
 
void GetHistory (const mtsStateIndex &end, mtsVector< value_type > &data) const
 
void Set (const value_type &obj)
 
 mtsStateData ()
 
 ~mtsStateData ()
 
ThisTypeoperator= (value_type data)
 
 operator value_type & (void)
 
void AddToStateTable (mtsStateTable &table, const std::string &dataName="")
 
void AddReadCommandToInterface (mtsInterfaceProvided *interfaceProvided, const std::string &commandName)
 
void AddWriteCommandToInterface (mtsInterfaceProvided *interfaceProvided, const std::string &commandName)
 

Public Attributes

value_type Data
 

Protected Types

typedef mtsStateData
< _elementType > 
ThisType
 
typedef
mtsStateTable::Accessor
< _elementType > 
AccessorType
 
typedef _elementType value_type
 

Protected Attributes

mtsStateDataId Id
 
mtsStateTableTable
 
const AccessorTypeAccessor
 

Member Typedef Documentation

template<class _elementType >
typedef mtsStateTable::Accessor<_elementType> mtsStateData< _elementType >::AccessorType
protected
template<class _elementType >
typedef mtsStateData<_elementType> mtsStateData< _elementType >::ThisType
protected
template<class _elementType >
typedef _elementType mtsStateData< _elementType >::value_type
protected

Constructor & Destructor Documentation

template<class _elementType >
mtsStateData< _elementType >::mtsStateData ( )
inline
template<class _elementType >
mtsStateData< _elementType >::~mtsStateData ( )
inline

Member Function Documentation

template<class _elementType >
void mtsStateData< _elementType >::AddReadCommandToInterface ( mtsInterfaceProvided interfaceProvided,
const std::string &  commandName 
)
inline

Adds command objects to the specified device interface. Note that there are two command objects: a 'read' command to get the latest value, and a 'qualified read' command to get the value at the specified time. This is normally called from the constructor, and the commandName would typically be GetXXX, where XXX is the name of the state data.

template<class _elementType >
void mtsStateData< _elementType >::AddToStateTable ( mtsStateTable table,
const std::string &  dataName = "" 
)
inline

Adds a new element (array) for this state data to the state table. This is normally called from the constructor. The dataName is optional.

template<class _elementType >
void mtsStateData< _elementType >::AddWriteCommandToInterface ( mtsInterfaceProvided interfaceProvided,
const std::string &  commandName 
)
inline

Add write command to the specified task interface. Note that this must be a task so that the write is thread-safe.

template<class _elementType >
void mtsStateData< _elementType >::Get ( const mtsStateIndex when,
value_type data 
) const
inline
template<class _elementType >
void mtsStateData< _elementType >::GetHistory ( const mtsStateIndex end,
mtsVector< value_type > &  data 
) const
inline
template<class _elementType >
void mtsStateData< _elementType >::GetLatest ( value_type obj) const
inline
template<class _elementType >
mtsStateData< _elementType >::operator value_type & ( void  )
inline

Cast operator. This allows to assign to an object of the actual type without explicitly referencing the public data member "Data".

template<class _elementType >
ThisType& mtsStateData< _elementType >::operator= ( value_type  data)
inline

Conversion assignment. This allows to assign from an object of the actual type without explicitly referencing the public member "Data".

template<class _elementType >
void mtsStateData< _elementType >::Set ( const value_type obj)
inline

Member Data Documentation

template<class _elementType >
const AccessorType* mtsStateData< _elementType >::Accessor
protected
template<class _elementType >
value_type mtsStateData< _elementType >::Data
template<class _elementType >
mtsStateDataId mtsStateData< _elementType >::Id
protected
template<class _elementType >
mtsStateTable* mtsStateData< _elementType >::Table
protected

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