Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl::StatusMessage Class Reference

#include <igtlStatusMessage.h>

Inheritance diagram for igtl::StatusMessage:
igtl::MessageBase igtl::Object igtl::LightObject

Public Types

enum  {
  STATUS_INVALID = 0,
  STATUS_OK = 1,
  STATUS_UNKNOWN_ERROR = 2,
  STATUS_PANICK_MODE = 3,
  STATUS_NOT_FOUND = 4,
  STATUS_ACCESS_DENIED = 5,
  STATUS_BUSY = 6,
  STATUS_TIME_OUT = 7,
  STATUS_OVERFLOW = 8,
  STATUS_CHECKSUM_ERROR = 9,
  STATUS_CONFIG_ERROR = 10,
  STATUS_RESOURCE_ERROR = 11,
  STATUS_UNKNOWN_INSTRUCTION = 12,
  STATUS_NOT_READY = 13,
  STATUS_MANUAL_MODE = 14,
  STATUS_DISABLED = 15,
  STATUS_NOT_PRESENT = 16,
  STATUS_UNKNOWN_VERSION = 17,
  STATUS_HARDWARE_FAILURE = 18,
  STATUS_SHUT_DOWN = 19,
  STATUS_NUM_TYPES = 20
}
enum  {
  UNPACK_UNDEF = 0x0000,
  UNPACK_HEADER = 0x0001,
  UNPACK_BODY = 0x0002
}
typedef SmartPointer< const SelfConstPointer
typedef SmartPointer< SelfPointer
typedef StatusMessage Self
typedef MessageBase Superclass

Public Member Functions

void AllocatePack ()
int Copy (const MessageBase *mb)
virtual LightObject::Pointer CreateAnother () const
virtual void DebugOff () const
virtual void DebugOn () const
virtual void Delete ()
int GetBodySizeToRead ()
const char * GetBodyType ()
int GetCode ()
bool GetDebug () const
const char * GetDeviceName ()
const char * GetDeviceType ()
const char * GetErrorName ()
virtual const char * GetNameOfClass () const
void * GetPackBodyPointer ()
int GetPackBodySize ()
void * GetPackPointer ()
int GetPackSize ()
virtual int GetReferenceCount () const
const char * GetStatusString ()
igtlInt64 GetSubCode ()
int GetTimeStamp (unsigned int *sec, unsigned int *frac)
void GetTimeStamp (igtl::TimeStamp::Pointer &ts)
 igtlNewMacro (igtl::StatusMessage)
 igtlTypeMacro (igtl::StatusMessage, igtl::MessageBase)
 igtlTypeMacro (Object, LightObject)
void InitPack ()
int Pack ()
void Print (std::ostream &os) const
virtual void Register () const
void SetCode (int code)
void SetDebug (bool debugFlag) const
void SetDeviceName (const char *name)
void SetErrorName (const char *name)
virtual int SetMessageHeader (const MessageHeader *mb)
virtual void SetReferenceCount (int)
void SetStatusString (const char *str)
void SetSubCode (igtlInt64 subcode)
int SetTimeStamp (unsigned int sec, unsigned int frac)
void SetTimeStamp (igtl::TimeStamp::Pointer &ts)
int Unpack (int crccheck=0)
virtual void UnRegister () const

Static Public Member Functions

static void BreakOnError ()
static Pointer New ()
static void SetGlobalWarningDisplay (bool flag)
static bool GetGlobalWarningDisplay ()
static void GlobalWarningDisplayOn ()
static void GlobalWarningDisplayOff ()

Protected Member Functions

void AllocatePack (int bodySize)
int CopyBody (const MessageBase *mb)
int CopyHeader (const MessageBase *mb)
virtual int GetBodyPackSize ()
virtual int PackBody ()
virtual void PrintSelf (std::ostream &os) const
 StatusMessage ()
virtual int UnpackBody ()
 ~StatusMessage ()
virtual void PrintHeader (std::ostream &os) const
virtual void PrintTrailer (std::ostream &os) const

Protected Attributes

unsigned char * m_Body
int m_BodySizeToRead
std::string m_BodyType
igtlUint16 m_Code
std::string m_DefaultBodyType
std::string m_DeviceName
char m_ErrorName [20]
unsigned char * m_Header
int m_IsBodyUnpacked
int m_IsHeaderUnpacked
int m_PackSize
volatile int m_ReferenceCount
SimpleFastMutexLock m_ReferenceCountLock
unsigned char * m_StatusHeader
char * m_StatusMessage
std::string m_StatusMessageString
igtlInt64 m_SubCode
unsigned int m_TimeStampSec
unsigned int m_TimeStampSecFraction

Detailed Description

Definition at line 29 of file igtlStatusMessage.h.

Member Typedef Documentation

Definition at line 35 of file igtlStatusMessage.h.

Definition at line 32 of file igtlStatusMessage.h.

Member Enumeration Documentation

anonymous enum
Enumerator:
STATUS_INVALID 
STATUS_OK 
STATUS_UNKNOWN_ERROR 
STATUS_PANICK_MODE 
STATUS_NOT_FOUND 
STATUS_ACCESS_DENIED 
STATUS_BUSY 
STATUS_TIME_OUT 
STATUS_OVERFLOW 
STATUS_CHECKSUM_ERROR 
STATUS_CONFIG_ERROR 
STATUS_RESOURCE_ERROR 
STATUS_UNKNOWN_INSTRUCTION 
STATUS_NOT_READY 
STATUS_MANUAL_MODE 
STATUS_DISABLED 
STATUS_NOT_PRESENT 
STATUS_UNKNOWN_VERSION 
STATUS_HARDWARE_FAILURE 
STATUS_SHUT_DOWN 
STATUS_NUM_TYPES 

Definition at line 43 of file igtlStatusMessage.h.

anonymous enum
inherited
Enumerator:
UNPACK_UNDEF 
UNPACK_HEADER 
UNPACK_BODY 

Definition at line 72 of file igtlMessageBase.h.

Constructor & Destructor Documentation

igtl::StatusMessage::StatusMessage ( )
protected
igtl::StatusMessage::~StatusMessage ( )
protected

Member Function Documentation

void igtl::MessageBase::AllocatePack ( )
inherited
void igtl::MessageBase::AllocatePack ( int  bodySize)
protectedinherited
static void igtl::LightObject::BreakOnError ( )
staticinherited

This method is called when igtlExceptionMacro executes. It allows the debugger to break on error.

int igtl::MessageBase::Copy ( const MessageBase mb)
inherited
int igtl::MessageBase::CopyBody ( const MessageBase mb)
protectedinherited
int igtl::MessageBase::CopyHeader ( const MessageBase mb)
protectedinherited
virtual LightObject::Pointer igtl::Object::CreateAnother ( ) const
virtualinherited

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from igtl::LightObject.

virtual void igtl::Object::DebugOff ( ) const
virtualinherited

Turn debugging output off.

virtual void igtl::Object::DebugOn ( ) const
virtualinherited

Turn debugging output on.

virtual void igtl::LightObject::Delete ( )
virtualinherited

Delete an igtl object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.

virtual int igtl::StatusMessage::GetBodyPackSize ( )
protectedvirtual

Reimplemented from igtl::MessageBase.

int igtl::MessageBase::GetBodySizeToRead ( )
inlineinherited

Definition at line 131 of file igtlMessageBase.h.

const char* igtl::MessageBase::GetBodyType ( )
inlineinherited

Definition at line 114 of file igtlMessageBase.h.

int igtl::StatusMessage::GetCode ( )
bool igtl::Object::GetDebug ( ) const
inherited

Get the value of the debug flag.

const char* igtl::MessageBase::GetDeviceName ( )
inherited
const char* igtl::MessageBase::GetDeviceType ( )
inherited
const char* igtl::StatusMessage::GetErrorName ( )
static bool igtl::Object::GetGlobalWarningDisplay ( )
staticinherited

This is a global flag that controls whether any debug, warning or error messages are displayed.

virtual const char* igtl::LightObject::GetNameOfClass ( ) const
inlinevirtualinherited

Return the name of this class as a string. Used by the object factory (implemented in New()) to instantiate objects of a named type. Also used for debugging and other output information.

Definition at line 86 of file igtlLightObject.h.

void* igtl::MessageBase::GetPackBodyPointer ( )
inherited
int igtl::MessageBase::GetPackBodySize ( )
inherited
void* igtl::MessageBase::GetPackPointer ( )
inherited
int igtl::MessageBase::GetPackSize ( )
inherited
virtual int igtl::LightObject::GetReferenceCount ( ) const
inlinevirtualinherited

Gets the reference count on this object.

Definition at line 112 of file igtlLightObject.h.

const char* igtl::StatusMessage::GetStatusString ( )
igtlInt64 igtl::StatusMessage::GetSubCode ( )
int igtl::MessageBase::GetTimeStamp ( unsigned int *  sec,
unsigned int *  frac 
)
inherited
void igtl::MessageBase::GetTimeStamp ( igtl::TimeStamp::Pointer ts)
inherited
static void igtl::Object::GlobalWarningDisplayOff ( )
inlinestaticinherited

This is a global flag that controls whether any debug, warning or error messages are displayed.

Definition at line 118 of file igtlObject.h.

References igtl::Object::SetGlobalWarningDisplay().

static void igtl::Object::GlobalWarningDisplayOn ( )
inlinestaticinherited

This is a global flag that controls whether any debug, warning or error messages are displayed.

Definition at line 116 of file igtlObject.h.

References igtl::Object::SetGlobalWarningDisplay().

igtl::StatusMessage::igtlNewMacro ( igtl::StatusMessage  )
igtl::StatusMessage::igtlTypeMacro ( igtl::StatusMessage  ,
igtl::MessageBase   
)
igtl::Object::igtlTypeMacro ( Object  ,
LightObject   
)
inherited

Standard part of all igtl objects.

void igtl::MessageBase::InitPack ( )
inherited
static Pointer igtl::Object::New ( )
staticinherited

Method for creation through the object factory.

Reimplemented from igtl::LightObject.

Referenced by igtl::CreateObjectFunction< T >::CreateObject().

int igtl::MessageBase::Pack ( )
inherited
virtual int igtl::StatusMessage::PackBody ( )
protectedvirtual

Reimplemented from igtl::MessageBase.

void igtl::LightObject::Print ( std::ostream &  os) const
inherited

Cause the object to print itself out.

virtual void igtl::LightObject::PrintHeader ( std::ostream &  os) const
protectedvirtualinherited

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

virtual void igtl::Object::PrintSelf ( std::ostream &  os) const
protectedvirtualinherited

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from igtl::LightObject.

Reimplemented in igtl::MultiThreader, igtl::MutexLock, igtl::ObjectFactoryBase, igtl::Socket, igtl::FastMutexLock, igtl::ServerSocket, igtl::TimeStamp, and igtl::ClientSocket.

virtual void igtl::LightObject::PrintTrailer ( std::ostream &  os) const
protectedvirtualinherited

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

virtual void igtl::Object::Register ( ) const
virtualinherited

Return this objects modified time. Update the modification time for this object. Many filters rely on the modification time to determine if they need to recompute their data. Increase the reference count (mark as used by another object).

Reimplemented from igtl::LightObject.

void igtl::StatusMessage::SetCode ( int  code)
void igtl::Object::SetDebug ( bool  debugFlag) const
inherited

Set the value of the debug flag. A non-zero value turns debugging on.

void igtl::MessageBase::SetDeviceName ( const char *  name)
inherited
void igtl::StatusMessage::SetErrorName ( const char *  name)
static void igtl::Object::SetGlobalWarningDisplay ( bool  flag)
staticinherited

This is a global flag that controls whether any debug, warning or error messages are displayed.

Referenced by igtl::Object::GlobalWarningDisplayOff(), and igtl::Object::GlobalWarningDisplayOn().

virtual int igtl::MessageBase::SetMessageHeader ( const MessageHeader mb)
inlinevirtualinherited

Reimplemented in igtl::PositionMessage.

Definition at line 130 of file igtlMessageBase.h.

virtual void igtl::Object::SetReferenceCount ( int  )
virtualinherited

Sets the reference count (use with care)

Reimplemented from igtl::LightObject.

void igtl::StatusMessage::SetStatusString ( const char *  str)
void igtl::StatusMessage::SetSubCode ( igtlInt64  subcode)
int igtl::MessageBase::SetTimeStamp ( unsigned int  sec,
unsigned int  frac 
)
inherited
void igtl::MessageBase::SetTimeStamp ( igtl::TimeStamp::Pointer ts)
inherited
int igtl::MessageBase::Unpack ( int  crccheck = 0)
inherited
virtual int igtl::StatusMessage::UnpackBody ( )
protectedvirtual

Reimplemented from igtl::MessageBase.

virtual void igtl::Object::UnRegister ( ) const
virtualinherited

Decrease the reference count (release by another object).

Reimplemented from igtl::LightObject.

Member Data Documentation

unsigned char* igtl::MessageBase::m_Body
protectedinherited

Definition at line 161 of file igtlMessageBase.h.

int igtl::MessageBase::m_BodySizeToRead
protectedinherited

Definition at line 163 of file igtlMessageBase.h.

std::string igtl::MessageBase::m_BodyType
protectedinherited

Definition at line 167 of file igtlMessageBase.h.

igtlUint16 igtl::StatusMessage::m_Code
protected

Definition at line 90 of file igtlStatusMessage.h.

std::string igtl::MessageBase::m_DefaultBodyType
protectedinherited

Definition at line 166 of file igtlMessageBase.h.

std::string igtl::MessageBase::m_DeviceName
protectedinherited

Definition at line 168 of file igtlMessageBase.h.

char igtl::StatusMessage::m_ErrorName[20]
protected

Definition at line 92 of file igtlStatusMessage.h.

unsigned char* igtl::MessageBase::m_Header
protectedinherited

Definition at line 160 of file igtlMessageBase.h.

int igtl::MessageBase::m_IsBodyUnpacked
protectedinherited

Definition at line 175 of file igtlMessageBase.h.

int igtl::MessageBase::m_IsHeaderUnpacked
protectedinherited

Definition at line 174 of file igtlMessageBase.h.

int igtl::MessageBase::m_PackSize
protectedinherited

Definition at line 159 of file igtlMessageBase.h.

volatile int igtl::LightObject::m_ReferenceCount
mutableprotectedinherited

Number of uses of this object by other objects.

Definition at line 133 of file igtlLightObject.h.

SimpleFastMutexLock igtl::LightObject::m_ReferenceCountLock
mutableprotectedinherited

Mutex lock to protect modification to the reference count

Definition at line 136 of file igtlLightObject.h.

unsigned char* igtl::StatusMessage::m_StatusHeader
protected

Definition at line 98 of file igtlStatusMessage.h.

char* igtl::StatusMessage::m_StatusMessage
protected

Definition at line 99 of file igtlStatusMessage.h.

std::string igtl::StatusMessage::m_StatusMessageString
protected

Definition at line 95 of file igtlStatusMessage.h.

igtlInt64 igtl::StatusMessage::m_SubCode
protected

Definition at line 91 of file igtlStatusMessage.h.

unsigned int igtl::MessageBase::m_TimeStampSec
protectedinherited

Definition at line 170 of file igtlMessageBase.h.

unsigned int igtl::MessageBase::m_TimeStampSecFraction
protectedinherited

Definition at line 171 of file igtlMessageBase.h.


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

Generated at Thu Mar 20 2014 16:32:07 for OpenIGTLink by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2000