Medical Imaging Interaction Toolkit  2018.4.99-eed36131
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)
 
Pointer Clone () const
 
void PushSendMessage (mitk::IGTLMessage::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 ()
 
mitk::IGTLMessage::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 EnableNoBufferingMode (bool enable)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 IGTLMessageQueue ()
 
 ~IGTLMessageQueue () override
 

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< mitk::IGTLMessage::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 39 of file mitkIGTLMessageQueue.h.

Member Enumeration Documentation

◆ BufferingType

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 51 of file mitkIGTLMessageQueue.h.

Constructor & Destructor Documentation

◆ IGTLMessageQueue()

mitk::IGTLMessageQueue::IGTLMessageQueue ( )
protected

Definition at line 299 of file mitkIGTLMessageQueue.cpp.

References m_BufferingType, m_Mutex, and NoBuffering.

◆ ~IGTLMessageQueue()

mitk::IGTLMessageQueue::~IGTLMessageQueue ( )
overrideprotected

Definition at line 305 of file mitkIGTLMessageQueue.cpp.

References m_Mutex.

Member Function Documentation

◆ Clone()

Pointer mitk::IGTLMessageQueue::Clone ( ) const

◆ EnableNoBufferingMode()

void mitk::IGTLMessageQueue::EnableNoBufferingMode ( bool  enable)

Definition at line 289 of file mitkIGTLMessageQueue.cpp.

References m_BufferingType, and m_Mutex.

◆ GetLatestMsgDeviceType()

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

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

Definition at line 267 of file mitkIGTLMessageQueue.cpp.

References m_Latest_Message, and m_Mutex.

◆ GetLatestMsgInformationString()

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

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

Definition at line 250 of file mitkIGTLMessageQueue.cpp.

References m_Latest_Message, and m_Mutex.

◆ GetNextMsgDeviceType()

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

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

Definition at line 234 of file mitkIGTLMessageQueue.cpp.

References m_Latest_Message, and m_Mutex.

◆ GetNextMsgInformationString()

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

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

Definition at line 217 of file mitkIGTLMessageQueue.cpp.

References m_Latest_Message, and m_Mutex.

◆ GetSize()

int mitk::IGTLMessageQueue::GetSize ( )

Get the number of messages in the queue.

Definition at line 283 of file mitkIGTLMessageQueue.cpp.

References m_CommandQueue, m_Image2dQueue, m_Image3dQueue, m_MiscQueue, m_StringQueue, m_TrackingDataQueue, and m_TransformQueue.

◆ mitkClassMacroItkParent()

mitk::IGTLMessageQueue::mitkClassMacroItkParent ( mitk::IGTLMessageQueue  ,
itk::Object   
)

◆ New()

static Pointer mitk::IGTLMessageQueue::New ( )
static

◆ PullCommandMessage()

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

Definition at line 178 of file mitkIGTLMessageQueue.cpp.

References m_CommandQueue, and m_Mutex.

◆ PullImage2dMessage()

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

Definition at line 139 of file mitkIGTLMessageQueue.cpp.

References m_Image2dQueue, and m_Mutex.

◆ PullImage3dMessage()

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

Definition at line 152 of file mitkIGTLMessageQueue.cpp.

References m_Image3dQueue, and m_Mutex.

◆ PullMiscMessage()

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

Returns and removes the oldest message from the queue.

Definition at line 126 of file mitkIGTLMessageQueue.cpp.

References m_MiscQueue, and m_Mutex.

◆ PullSendMessage()

mitk::IGTLMessage::Pointer mitk::IGTLMessageQueue::PullSendMessage ( )

Definition at line 113 of file mitkIGTLMessageQueue.cpp.

References m_Mutex, and m_SendQueue.

◆ PullStringMessage()

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

Definition at line 191 of file mitkIGTLMessageQueue.cpp.

References m_Mutex, and m_StringQueue.

◆ PullTrackingMessage()

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

Definition at line 165 of file mitkIGTLMessageQueue.cpp.

References m_Mutex, and m_TrackingDataQueue.

◆ PullTransformMessage()

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

Definition at line 204 of file mitkIGTLMessageQueue.cpp.

References m_Mutex, and m_TransformQueue.

◆ PushCommandMessage()

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

Adds the message to the queue.

Definition at line 27 of file mitkIGTLMessageQueue.cpp.

References m_BufferingType, m_CommandQueue, m_Mutex, and NoBuffering.

◆ PushMessage()

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

◆ PushSendMessage()

void mitk::IGTLMessageQueue::PushSendMessage ( mitk::IGTLMessage::Pointer  message)

Definition at line 17 of file mitkIGTLMessageQueue.cpp.

References m_BufferingType, m_Mutex, m_SendQueue, and NoBuffering.

Member Data Documentation

◆ m_BufferingType

BufferingType mitk::IGTLMessageQueue::m_BufferingType
protected

defines the kind of buffering

Definition at line 135 of file mitkIGTLMessageQueue.h.

Referenced by EnableNoBufferingMode(), IGTLMessageQueue(), PushCommandMessage(), PushMessage(), and PushSendMessage().

◆ m_CommandQueue

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

the queue that stores pointer to the inserted messages

Definition at line 120 of file mitkIGTLMessageQueue.h.

Referenced by GetSize(), PullCommandMessage(), and PushCommandMessage().

◆ m_Image2dQueue

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

Definition at line 121 of file mitkIGTLMessageQueue.h.

Referenced by GetSize(), PullImage2dMessage(), and PushMessage().

◆ m_Image3dQueue

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

Definition at line 122 of file mitkIGTLMessageQueue.h.

Referenced by GetSize(), PullImage3dMessage(), and PushMessage().

◆ m_Latest_Message

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

◆ m_MiscQueue

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

Definition at line 126 of file mitkIGTLMessageQueue.h.

Referenced by GetSize(), PullMiscMessage(), and PushMessage().

◆ m_Mutex

◆ m_SendQueue

std::deque< mitk::IGTLMessage::Pointer > mitk::IGTLMessageQueue::m_SendQueue
protected

Definition at line 128 of file mitkIGTLMessageQueue.h.

Referenced by PullSendMessage(), and PushSendMessage().

◆ m_StringQueue

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

Definition at line 125 of file mitkIGTLMessageQueue.h.

Referenced by GetSize(), PullStringMessage(), and PushMessage().

◆ m_TrackingDataQueue

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

Definition at line 124 of file mitkIGTLMessageQueue.h.

Referenced by GetSize(), PullTrackingMessage(), and PushMessage().

◆ m_TransformQueue

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

Definition at line 123 of file mitkIGTLMessageQueue.h.

Referenced by GetSize(), PullTransformMessage(), and PushMessage().


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