MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitk::IGTLMessageQueue Class Reference

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

#include <mitkIGTLMessageQueue.h>

Inheritance 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)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
void PushSendMessage (mitk::IGTLMessage::Pointer message)
 
void PushMessage (igtl::MessageBase::Pointer message)
 Adds the message to the queue.
 
void PushCommandMessage (igtl::MessageBase::Pointer message)
 Adds the message to the queue.
 
igtl::MessageBase::Pointer PullMiscMessage ()
 Returns and removes the oldest message from the queue.
 
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.
 
std::string GetNextMsgInformationString ()
 Returns a string with information about the oldest message in the queue.
 
std::string GetNextMsgDeviceType ()
 Returns the device type of the oldest message in the queue.
 
std::string GetLatestMsgInformationString ()
 Returns a string with information about the oldest message in the queue.
 
std::string GetLatestMsgDeviceType ()
 Returns the device type of the oldest message in the queue.
 
void EnableNoBufferingMode (bool enable)
 

Protected Member Functions

 IGTLMessageQueue ()
 
 ~IGTLMessageQueue () override
 

Protected Attributes

std::mutex m_Mutex
 Mutex to take car of the queue.
 
std::deque< igtl::MessageBase::Pointer > m_CommandQueue
 the queue that stores pointer to the inserted messages
 
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
 

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.

◆ ~IGTLMessageQueue()

mitk::IGTLMessageQueue::~IGTLMessageQueue ( )
overrideprotected

Definition at line 304 of file mitkIGTLMessageQueue.cpp.

Member Function Documentation

◆ EnableNoBufferingMode()

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

Definition at line 289 of file mitkIGTLMessageQueue.cpp.

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

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

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

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

◆ GetSize()

int mitk::IGTLMessageQueue::GetSize ( )

Get the number of messages in the queue.

Definition at line 283 of file mitkIGTLMessageQueue.cpp.

◆ itkCloneMacro()

mitk::IGTLMessageQueue::itkCloneMacro ( Self )

◆ itkFactorylessNewMacro()

mitk::IGTLMessageQueue::itkFactorylessNewMacro ( Self )

◆ mitkClassMacroItkParent()

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

◆ PullCommandMessage()

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

Definition at line 178 of file mitkIGTLMessageQueue.cpp.

◆ PullImage2dMessage()

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

Definition at line 139 of file mitkIGTLMessageQueue.cpp.

◆ PullImage3dMessage()

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

Definition at line 152 of file mitkIGTLMessageQueue.cpp.

◆ PullMiscMessage()

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

Returns and removes the oldest message from the queue.

Definition at line 126 of file mitkIGTLMessageQueue.cpp.

◆ PullSendMessage()

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

Definition at line 113 of file mitkIGTLMessageQueue.cpp.

◆ PullStringMessage()

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

Definition at line 191 of file mitkIGTLMessageQueue.cpp.

◆ PullTrackingMessage()

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

Definition at line 165 of file mitkIGTLMessageQueue.cpp.

◆ PullTransformMessage()

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

Definition at line 204 of file mitkIGTLMessageQueue.cpp.

◆ PushCommandMessage()

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

Adds the message to the queue.

Definition at line 27 of file mitkIGTLMessageQueue.cpp.

◆ PushMessage()

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

Adds the message to the queue.

Definition at line 37 of file mitkIGTLMessageQueue.cpp.

◆ PushSendMessage()

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

Definition at line 17 of file mitkIGTLMessageQueue.cpp.

Member Data Documentation

◆ m_BufferingType

BufferingType mitk::IGTLMessageQueue::m_BufferingType
protected

defines the kind of buffering

Definition at line 135 of file mitkIGTLMessageQueue.h.

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

◆ m_Image2dQueue

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

Definition at line 121 of file mitkIGTLMessageQueue.h.

◆ m_Image3dQueue

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

Definition at line 122 of file mitkIGTLMessageQueue.h.

◆ m_Latest_Message

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

Definition at line 130 of file mitkIGTLMessageQueue.h.

◆ m_MiscQueue

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

Definition at line 126 of file mitkIGTLMessageQueue.h.

◆ m_Mutex

std::mutex mitk::IGTLMessageQueue::m_Mutex
protected

Mutex to take car of the queue.

Definition at line 115 of file mitkIGTLMessageQueue.h.

◆ m_SendQueue

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

Definition at line 128 of file mitkIGTLMessageQueue.h.

◆ m_StringQueue

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

Definition at line 125 of file mitkIGTLMessageQueue.h.

◆ m_TrackingDataQueue

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

Definition at line 124 of file mitkIGTLMessageQueue.h.

◆ m_TransformQueue

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

Definition at line 123 of file mitkIGTLMessageQueue.h.


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