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

#include <mtsComponentState.h>

Public Types

enum  Enum {
  CONSTRUCTED, INITIALIZING, READY, ACTIVE,
  FINISHING, FINISHED
}
 
typedef mtsComponentState ThisType
 

Public Member Functions

 mtsComponentState (void)
 
 mtsComponentState (const mtsComponentState &other)
 
 ~mtsComponentState ()
 
void GetState (mtsComponentState::Enum &placeHolder) const
 
void SetState (const mtsComponentState::Enum &newValue)
 
const mtsComponentState::EnumState (void) const
 
mtsComponentState::EnumState (void)
 
const ThisTypeoperator= (const Enum &value)
 
bool operator== (const ThisType &state) const
 
bool operator!= (const ThisType &state) const
 
bool operator< (const ThisType &state) const
 
bool operator<= (const ThisType &state) const
 
bool operator> (const ThisType &state) const
 
bool operator>= (const ThisType &state) const
 
 mtsComponentState (const mtsComponentState::Enum &newState)
 
void SerializeRaw (std::ostream &outputStream) const
 
void DeSerializeRaw (std::istream &inputStream)
 
void ToStream (std::ostream &outputStream) const
 
void ToStreamRaw (std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const
 
void Copy (const mtsComponentState &source)
 
void SerializeBinary (std::ostream &outputStream) const throw (std::runtime_error)
 
void DeSerializeBinary (std::istream &inputStream, const cmnDataFormat &localFormat, const cmnDataFormat &remoteFormat) throw (std::runtime_error)
 
void SerializeText (std::ostream &outputStream, const char delimiter= ',') const throw (std::runtime_error)
 
std::string SerializeDescription (const char delimiter= ',', const std::string &userDescription="") const
 
void DeSerializeText (std::istream &inputStream, const char delimiter= ',') throw (std::runtime_error)
 
std::string HumanReadable (void) const
 
bool ScalarNumberIsFixed (void) const
 
size_t ScalarNumber (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)
 

Static Public Member Functions

static std::string EnumToString (const Enum &value) throw (std::runtime_error)
 
static Enum EnumFromString (const std::string &value) throw (std::runtime_error)
 

Protected Attributes

mtsComponentState::Enum mState
 

Member Typedef Documentation

Member Enumeration Documentation

The possible component states: CONSTRUCTED – Initial state set by mtsTask constructor. INITIALIZING – Set by mtsComponent::Create. The task stays in this state until the thread calls mtsTask::RunInternal, which calls mtsTask::StartupInternal and the user-supplied mtsTask::Startup. If a new thread is created, the call to mtsTask::RunInternal happens some time after the call to mtsTask::Create. READY – Set by mtsTask::StartupInternal. This means that the task is ready to be used (i.e., all interfaces have been initialized). Also, a task can return to the READY state (from the ACTIVE state) in response to a call to mtsTask::Suspend. ACTIVE – Set by mtsTask::Start. This is the normal running state, where the task is calling the user-supplied mtsTask::Run method. FINISHING – Set by mtsTask::Kill. If the mtsTask::Run method is currently executing, it will finish, but no further calls will be made. The task will then call mtsTask::CleanupInternal, which calls the user-supplied mtsTask::Cleanup. The state will then be set to FINISHED. FINISHED – The task has finished.

Enumerator
CONSTRUCTED 
INITIALIZING 
READY 
ACTIVE 
FINISHING 
FINISHED 

Constructor & Destructor Documentation

mtsComponentState::mtsComponentState ( void  )
mtsComponentState::mtsComponentState ( const mtsComponentState other)
mtsComponentState::~mtsComponentState ( )
mtsComponentState::mtsComponentState ( const mtsComponentState::Enum newState)

Member Function Documentation

void mtsComponentState::Copy ( const mtsComponentState source)
void mtsComponentState::DeSerializeBinary ( std::istream &  inputStream,
const cmnDataFormat localFormat,
const cmnDataFormat remoteFormat 
)
throw (std::runtime_error
)
void mtsComponentState::DeSerializeRaw ( std::istream &  inputStream)
void mtsComponentState::DeSerializeText ( std::istream &  inputStream,
const char  delimiter = ',' 
)
throw (std::runtime_error
)
static Enum mtsComponentState::EnumFromString ( const std::string &  value)
throw (std::runtime_error
)
static
static std::string mtsComponentState::EnumToString ( const Enum value)
throw (std::runtime_error
)
static
void mtsComponentState::GetState ( mtsComponentState::Enum placeHolder) const
std::string mtsComponentState::HumanReadable ( void  ) const
bool mtsComponentState::operator!= ( const ThisType state) const
bool mtsComponentState::operator< ( const ThisType state) const

Lesser or equal operators

bool mtsComponentState::operator<= ( const ThisType state) const
const ThisType& mtsComponentState::operator= ( const Enum value)

Assignment operator.

bool mtsComponentState::operator== ( const ThisType state) const

Equality operators

bool mtsComponentState::operator> ( const ThisType state) const

Greater or equal operators

bool mtsComponentState::operator>= ( const ThisType state) const
double mtsComponentState::Scalar ( const size_t  index) const
throw (std::out_of_range
)
std::string mtsComponentState::ScalarDescription ( const size_t  index,
const std::string &  userDescription = "" 
) const
throw (std::out_of_range
)
size_t mtsComponentState::ScalarNumber ( void  ) const
bool mtsComponentState::ScalarNumberIsFixed ( void  ) const
void mtsComponentState::SerializeBinary ( std::ostream &  outputStream) const
throw (std::runtime_error
)
std::string mtsComponentState::SerializeDescription ( const char  delimiter = ',',
const std::string &  userDescription = "" 
) const
void mtsComponentState::SerializeRaw ( std::ostream &  outputStream) const
void mtsComponentState::SerializeText ( std::ostream &  outputStream,
const char  delimiter = ',' 
) const
throw (std::runtime_error
)
void mtsComponentState::SetState ( const mtsComponentState::Enum newValue)
const mtsComponentState::Enum& mtsComponentState::State ( void  ) const
mtsComponentState::Enum& mtsComponentState::State ( void  )
void mtsComponentState::ToStream ( std::ostream &  outputStream) const
void mtsComponentState::ToStreamRaw ( std::ostream &  outputStream,
const char  delimiter = ' ',
bool  headerOnly = false,
const std::string &  headerPrefix = "" 
) const

Member Data Documentation

mtsComponentState::Enum mtsComponentState::mState
protected

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