Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::IGTLMessageQueue Class Reference

Thread safe message queue to store OpenIGTLink messages. More...

#include <mitkIGTLMessageQueue.h>

Inheritance diagram for mitk::IGTLMessageQueue:
Collaboration diagram for mitk::IGTLMessageQueue:

Public Types

enum  BufferingType { Infinit, NoBuffering }
 Different buffering types Infinit buffering means that you can push as many messages as you want NoBuffering means that the queue just stores a single message. More...
 

Public Member Functions

 mitkClassMacroItkParent (mitk::IGTLMessageQueue, itk::Object) static Pointer New()
 
Pointer Clone () const
 
void PushSendMessage (igtl::MessageBase::Pointer message)
 
void PushMessage (igtl::MessageBase::Pointer message)
 Adds the message to the queue. More...
 
void PushCommandMessage (igtl::MessageBase::Pointer message)
 Adds the message to the queue. More...
 
igtl::MessageBase::Pointer PullMiscMessage ()
 Returns and removes the oldest message from the queue. More...
 
igtl::ImageMessage::Pointer PullImage2dMessage ()
 
igtl::ImageMessage::Pointer PullImage3dMessage ()
 
igtl::TrackingDataMessage::Pointer PullTrackingMessage ()
 
igtl::MessageBase::Pointer PullCommandMessage ()
 
igtl::StringMessage::Pointer PullStringMessage ()
 
igtl::TransformMessage::Pointer PullTransformMessage ()
 
igtl::MessageBase::Pointer PullSendMessage ()
 
int GetSize ()
 Get the number of messages in the queue. More...
 
std::string GetNextMsgInformationString ()
 Returns a string with information about the oldest message in the queue. More...
 
std::string GetNextMsgDeviceType ()
 Returns the device type of the oldest message in the queue. More...
 
std::string GetLatestMsgInformationString ()
 Returns a string with information about the oldest message in the queue. More...
 
std::string GetLatestMsgDeviceType ()
 Returns the device type of the oldest message in the queue. More...
 
void EnableInfiniteBuffering (bool enable)
 Sets infinite buffering on/off. Initiale value is enabled. More...
 

Protected Member Functions

 IGTLMessageQueue ()
 
virtual ~IGTLMessageQueue ()
 

Protected Attributes

itk::FastMutexLock::Pointer m_Mutex
 Mutex to take car of the queue. More...
 
std::deque< igtl::MessageBase::Pointer > m_CommandQueue
 the queue that stores pointer to the inserted messages More...
 
std::deque< igtl::ImageMessage::Pointer > m_Image2dQueue
 
std::deque< igtl::ImageMessage::Pointer > m_Image3dQueue
 
std::deque< igtl::TransformMessage::Pointer > m_TransformQueue
 
std::deque< igtl::TrackingDataMessage::Pointer > m_TrackingDataQueue
 
std::deque< igtl::StringMessage::Pointer > m_StringQueue
 
std::deque< igtl::MessageBase::Pointer > m_MiscQueue
 
std::deque< igtl::MessageBase::Pointer > m_SendQueue
 
igtl::MessageBase::Pointer m_Latest_Message
 
BufferingType m_BufferingType
 defines the kind of buffering More...
 

Detailed Description

Thread safe message queue to store OpenIGTLink messages.

Definition at line 42 of file mitkIGTLMessageQueue.h.

Member Enumeration Documentation

Different buffering types Infinit buffering means that you can push as many messages as you want NoBuffering means that the queue just stores a single message.

Enumerator
Infinit 
NoBuffering 

Definition at line 54 of file mitkIGTLMessageQueue.h.

Constructor & Destructor Documentation

mitk::IGTLMessageQueue::IGTLMessageQueue ( )
protected

Definition at line 303 of file mitkIGTLMessageQueue.cpp.

References Infinit, and mitk::New().

mitk::IGTLMessageQueue::~IGTLMessageQueue ( )
protectedvirtual

Definition at line 309 of file mitkIGTLMessageQueue.cpp.

Member Function Documentation

Pointer mitk::IGTLMessageQueue::Clone ( ) const
void mitk::IGTLMessageQueue::EnableInfiniteBuffering ( bool  enable)

Sets infinite buffering on/off. Initiale value is enabled.

Definition at line 293 of file mitkIGTLMessageQueue.cpp.

std::string mitk::IGTLMessageQueue::GetLatestMsgDeviceType ( )

Returns the device type of the oldest message in the queue.

Definition at line 271 of file mitkIGTLMessageQueue.cpp.

std::string mitk::IGTLMessageQueue::GetLatestMsgInformationString ( )

Returns a string with information about the oldest message in the queue.

Definition at line 254 of file mitkIGTLMessageQueue.cpp.

std::string mitk::IGTLMessageQueue::GetNextMsgDeviceType ( )

Returns the device type of the oldest message in the queue.

Definition at line 238 of file mitkIGTLMessageQueue.cpp.

std::string mitk::IGTLMessageQueue::GetNextMsgInformationString ( )

Returns a string with information about the oldest message in the queue.

Definition at line 221 of file mitkIGTLMessageQueue.cpp.

int mitk::IGTLMessageQueue::GetSize ( )

Get the number of messages in the queue.

Definition at line 287 of file mitkIGTLMessageQueue.cpp.

mitk::IGTLMessageQueue::mitkClassMacroItkParent ( mitk::IGTLMessageQueue  ,
itk::Object   
)
igtl::MessageBase::Pointer mitk::IGTLMessageQueue::PullCommandMessage ( )

Definition at line 182 of file mitkIGTLMessageQueue.cpp.

igtl::ImageMessage::Pointer mitk::IGTLMessageQueue::PullImage2dMessage ( )

Definition at line 143 of file mitkIGTLMessageQueue.cpp.

igtl::ImageMessage::Pointer mitk::IGTLMessageQueue::PullImage3dMessage ( )

Definition at line 156 of file mitkIGTLMessageQueue.cpp.

igtl::MessageBase::Pointer mitk::IGTLMessageQueue::PullMiscMessage ( )

Returns and removes the oldest message from the queue.

Definition at line 130 of file mitkIGTLMessageQueue.cpp.

igtl::MessageBase::Pointer mitk::IGTLMessageQueue::PullSendMessage ( )

Definition at line 117 of file mitkIGTLMessageQueue.cpp.

igtl::StringMessage::Pointer mitk::IGTLMessageQueue::PullStringMessage ( )

Definition at line 195 of file mitkIGTLMessageQueue.cpp.

igtl::TrackingDataMessage::Pointer mitk::IGTLMessageQueue::PullTrackingMessage ( )

Definition at line 169 of file mitkIGTLMessageQueue.cpp.

igtl::TransformMessage::Pointer mitk::IGTLMessageQueue::PullTransformMessage ( )

Definition at line 208 of file mitkIGTLMessageQueue.cpp.

void mitk::IGTLMessageQueue::PushCommandMessage ( igtl::MessageBase::Pointer  message)

Adds the message to the queue.

Definition at line 31 of file mitkIGTLMessageQueue.cpp.

References Infinit.

void mitk::IGTLMessageQueue::PushMessage ( igtl::MessageBase::Pointer  message)

Adds the message to the queue.

Definition at line 41 of file mitkIGTLMessageQueue.cpp.

References Infinit, and MITK_INFO.

void mitk::IGTLMessageQueue::PushSendMessage ( igtl::MessageBase::Pointer  message)

Definition at line 21 of file mitkIGTLMessageQueue.cpp.

References Infinit, m_BufferingType, m_Mutex, and m_SendQueue.

Member Data Documentation

BufferingType mitk::IGTLMessageQueue::m_BufferingType
protected

defines the kind of buffering

Definition at line 140 of file mitkIGTLMessageQueue.h.

Referenced by PushSendMessage().

std::deque< igtl::MessageBase::Pointer > mitk::IGTLMessageQueue::m_CommandQueue
protected

the queue that stores pointer to the inserted messages

Definition at line 125 of file mitkIGTLMessageQueue.h.

std::deque< igtl::ImageMessage::Pointer > mitk::IGTLMessageQueue::m_Image2dQueue
protected

Definition at line 126 of file mitkIGTLMessageQueue.h.

std::deque< igtl::ImageMessage::Pointer > mitk::IGTLMessageQueue::m_Image3dQueue
protected

Definition at line 127 of file mitkIGTLMessageQueue.h.

igtl::MessageBase::Pointer mitk::IGTLMessageQueue::m_Latest_Message
protected

Definition at line 135 of file mitkIGTLMessageQueue.h.

std::deque< igtl::MessageBase::Pointer > mitk::IGTLMessageQueue::m_MiscQueue
protected

Definition at line 131 of file mitkIGTLMessageQueue.h.

itk::FastMutexLock::Pointer mitk::IGTLMessageQueue::m_Mutex
protected

Mutex to take car of the queue.

Definition at line 120 of file mitkIGTLMessageQueue.h.

Referenced by PushSendMessage().

std::deque< igtl::MessageBase::Pointer> mitk::IGTLMessageQueue::m_SendQueue
protected

Definition at line 133 of file mitkIGTLMessageQueue.h.

Referenced by PushSendMessage().

std::deque< igtl::StringMessage::Pointer > mitk::IGTLMessageQueue::m_StringQueue
protected

Definition at line 130 of file mitkIGTLMessageQueue.h.

std::deque< igtl::TrackingDataMessage::Pointer > mitk::IGTLMessageQueue::m_TrackingDataQueue
protected

Definition at line 129 of file mitkIGTLMessageQueue.h.

std::deque< igtl::TransformMessage::Pointer > mitk::IGTLMessageQueue::m_TransformQueue
protected

Definition at line 128 of file mitkIGTLMessageQueue.h.


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