cisst-saw
Loading...
Searching...
No Matches
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

◆ AccessorType

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

◆ ThisType

template<class _elementType>
typedef mtsStateData<_elementType> mtsStateData< _elementType >::ThisType
protected

◆ value_type

template<class _elementType>
typedef _elementType mtsStateData< _elementType >::value_type
protected

Constructor & Destructor Documentation

◆ mtsStateData()

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

◆ ~mtsStateData()

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

Member Function Documentation

◆ AddReadCommandToInterface()

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.

◆ AddToStateTable()

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.

◆ AddWriteCommandToInterface()

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.

◆ Get()

template<class _elementType>
void mtsStateData< _elementType >::Get ( const mtsStateIndex & when,
value_type & data ) const
inline

◆ GetHistory()

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

◆ GetLatest()

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

◆ operator value_type &()

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".

◆ operator=()

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".

◆ Set()

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

Member Data Documentation

◆ Accessor

template<class _elementType>
const AccessorType* mtsStateData< _elementType >::Accessor
protected

◆ Data

template<class _elementType>
value_type mtsStateData< _elementType >::Data

◆ Id

template<class _elementType>
mtsStateDataId mtsStateData< _elementType >::Id
protected

◆ Table

template<class _elementType>
mtsStateTable* mtsStateData< _elementType >::Table
protected

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