Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Thread safe message queue to store OpenIGTLink messages. More...
#include <mitkIGTLMessageQueue.h>
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... | |
Thread safe message queue to store OpenIGTLink messages.
Definition at line 39 of file mitkIGTLMessageQueue.h.
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.
|
protected |
Definition at line 299 of file mitkIGTLMessageQueue.cpp.
References m_BufferingType, m_Mutex, and NoBuffering.
|
overrideprotected |
Definition at line 305 of file mitkIGTLMessageQueue.cpp.
References m_Mutex.
Pointer mitk::IGTLMessageQueue::Clone | ( | ) | const |
void mitk::IGTLMessageQueue::EnableNoBufferingMode | ( | bool | enable | ) |
Definition at line 289 of file mitkIGTLMessageQueue.cpp.
References m_BufferingType, and m_Mutex.
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.
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.
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.
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.
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.
mitk::IGTLMessageQueue::mitkClassMacroItkParent | ( | mitk::IGTLMessageQueue | , |
itk::Object | |||
) |
|
static |
Referenced by mitk::IGTLDevice::IGTLDevice().
igtl::MessageBase::Pointer mitk::IGTLMessageQueue::PullCommandMessage | ( | ) |
Definition at line 178 of file mitkIGTLMessageQueue.cpp.
References m_CommandQueue, and m_Mutex.
igtl::ImageMessage::Pointer mitk::IGTLMessageQueue::PullImage2dMessage | ( | ) |
Definition at line 139 of file mitkIGTLMessageQueue.cpp.
References m_Image2dQueue, and m_Mutex.
igtl::ImageMessage::Pointer mitk::IGTLMessageQueue::PullImage3dMessage | ( | ) |
Definition at line 152 of file mitkIGTLMessageQueue.cpp.
References m_Image3dQueue, and m_Mutex.
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.
mitk::IGTLMessage::Pointer mitk::IGTLMessageQueue::PullSendMessage | ( | ) |
Definition at line 113 of file mitkIGTLMessageQueue.cpp.
References m_Mutex, and m_SendQueue.
igtl::StringMessage::Pointer mitk::IGTLMessageQueue::PullStringMessage | ( | ) |
Definition at line 191 of file mitkIGTLMessageQueue.cpp.
References m_Mutex, and m_StringQueue.
igtl::TrackingDataMessage::Pointer mitk::IGTLMessageQueue::PullTrackingMessage | ( | ) |
Definition at line 165 of file mitkIGTLMessageQueue.cpp.
References m_Mutex, and m_TrackingDataQueue.
igtl::TransformMessage::Pointer mitk::IGTLMessageQueue::PullTransformMessage | ( | ) |
Definition at line 204 of file mitkIGTLMessageQueue.cpp.
References m_Mutex, and m_TransformQueue.
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.
void mitk::IGTLMessageQueue::PushMessage | ( | igtl::MessageBase::Pointer | message | ) |
Adds the message to the queue.
Definition at line 37 of file mitkIGTLMessageQueue.cpp.
References m_BufferingType, m_Image2dQueue, m_Image3dQueue, m_Latest_Message, m_MiscQueue, m_Mutex, m_StringQueue, m_TrackingDataQueue, m_TransformQueue, and NoBuffering.
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.
|
protected |
defines the kind of buffering
Definition at line 135 of file mitkIGTLMessageQueue.h.
Referenced by EnableNoBufferingMode(), IGTLMessageQueue(), PushCommandMessage(), PushMessage(), and PushSendMessage().
|
protected |
the queue that stores pointer to the inserted messages
Definition at line 120 of file mitkIGTLMessageQueue.h.
Referenced by GetSize(), PullCommandMessage(), and PushCommandMessage().
|
protected |
Definition at line 121 of file mitkIGTLMessageQueue.h.
Referenced by GetSize(), PullImage2dMessage(), and PushMessage().
|
protected |
Definition at line 122 of file mitkIGTLMessageQueue.h.
Referenced by GetSize(), PullImage3dMessage(), and PushMessage().
|
protected |
Definition at line 130 of file mitkIGTLMessageQueue.h.
Referenced by GetLatestMsgDeviceType(), GetLatestMsgInformationString(), GetNextMsgDeviceType(), GetNextMsgInformationString(), and PushMessage().
|
protected |
Definition at line 126 of file mitkIGTLMessageQueue.h.
Referenced by GetSize(), PullMiscMessage(), and PushMessage().
|
protected |
Mutex to take car of the queue.
Definition at line 115 of file mitkIGTLMessageQueue.h.
Referenced by EnableNoBufferingMode(), GetLatestMsgDeviceType(), GetLatestMsgInformationString(), GetNextMsgDeviceType(), GetNextMsgInformationString(), IGTLMessageQueue(), PullCommandMessage(), PullImage2dMessage(), PullImage3dMessage(), PullMiscMessage(), PullSendMessage(), PullStringMessage(), PullTrackingMessage(), PullTransformMessage(), PushCommandMessage(), PushMessage(), PushSendMessage(), and ~IGTLMessageQueue().
|
protected |
Definition at line 128 of file mitkIGTLMessageQueue.h.
Referenced by PullSendMessage(), and PushSendMessage().
|
protected |
Definition at line 125 of file mitkIGTLMessageQueue.h.
Referenced by GetSize(), PullStringMessage(), and PushMessage().
|
protected |
Definition at line 124 of file mitkIGTLMessageQueue.h.
Referenced by GetSize(), PullTrackingMessage(), and PushMessage().
|
protected |
Definition at line 123 of file mitkIGTLMessageQueue.h.
Referenced by GetSize(), PullTransformMessage(), and PushMessage().