ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ctd::mptk::MessageBus Class Reference

IFW CTD Multiprocessing Toolkit Message Bus. More...

#include <MessageBus.hpp>

Public Member Functions

 MessageBus ()
 
 ~MessageBus ()
 
MessageBusRegisterThread (const std::string &thread_id)
 Register thread which will send/receive messages on the Message Bus. More...
 
void SendMessage (const Message &message)
 Send a message on the Message Bus. More...
 
bool ReceiveMessage (const std::string &receiver_thread_id, const double time_out, bool &timed_out, Message &message)
 Check for a message for this thread. Returns true if message available. More...
 
void SendResponse (Response &response)
 Send a response to a message received on the Message Bus. More...
 
bool ReceiveResponse (const std::string &receiver_thread_id, const double time_out, bool &timed_out, Response &response)
 Check for a message for this thread. Returns true if message available. More...
 
std::string Print () const
 Generate ASCII output providing a status of the object (to the extend possible). More...
 
 MessageBus ()
 
 ~MessageBus ()
 
MessageBusRegisterThread (const std::string &thread_id)
 Register thread which will send/receive messages on the Message Bus. More...
 
void SendMessage (const Message &message)
 Send a message on the Message Bus. More...
 
bool ReceiveMessage (const std::string &receiver_thread_id, const double time_out, bool &timed_out, Message &message)
 Check for a message for this thread. Returns true if message available. More...
 
void SendResponse (Response &response)
 Send a response to a message received on the Message Bus. More...
 
bool ReceiveResponse (const std::string &receiver_thread_id, const double time_out, bool &timed_out, Response &response)
 Check for a message for this thread. Returns true if message available. More...
 
std::string Print () const
 Generate ASCII output providing a status of the object (to the extend possible). More...
 
 MessageBus ()
 
 ~MessageBus ()
 
MessageBusRegisterThread (const std::string &thread_id)
 Register thread which will send/receive messages on the Message Bus. More...
 
void SendMessage (const Message &message)
 Send a message on the Message Bus. More...
 
bool ReceiveMessage (const std::string &receiver_thread_id, const double time_out, bool &timed_out, Message &message)
 Check for a message for this thread. Returns true if message available. More...
 
void SendResponse (Response &response)
 Send a response to a message received on the Message Bus. More...
 
bool ReceiveResponse (const std::string &receiver_thread_id, const double time_out, bool &timed_out, Response &response)
 Check for a message for this thread. Returns true if message available. More...
 
std::string Print () const
 Generate ASCII output providing a status of the object (to the extend possible). More...
 

Detailed Description

IFW CTD Multiprocessing Toolkit Message Bus.

Constructor & Destructor Documentation

ctd::mptk::MessageBus::MessageBus ( )
ctd::mptk::MessageBus::~MessageBus ( )
ctd::mptk::MessageBus::MessageBus ( )
ctd::mptk::MessageBus::~MessageBus ( )
ctd::mptk::MessageBus::MessageBus ( )
ctd::mptk::MessageBus::~MessageBus ( )

Member Function Documentation

std::string ctd::mptk::MessageBus::Print ( ) const

Generate ASCII output providing a status of the object (to the extend possible).

std::string ctd::mptk::MessageBus::Print ( ) const

Generate ASCII output providing a status of the object (to the extend possible).

std::string ctd::mptk::MessageBus::Print ( ) const

Generate ASCII output providing a status of the object (to the extend possible).

bool ctd::mptk::MessageBus::ReceiveMessage ( const std::string &  receiver_thread_id,
const double  time_out,
bool &  timed_out,
Message message 
)

Check for a message for this thread. Returns true if message available.

Parameters
thread_idThread ID of receiver (thread checking for messages).
time_outTimeout to apply (NO_TIMEOUT, 0: return immediately, >0: Timeout in seconds).
timed_outTrue if waiting for a message timed out.
messageMessage received (if any).
Returns
True if a message is available for the given thread.
bool ctd::mptk::MessageBus::ReceiveMessage ( const std::string &  receiver_thread_id,
const double  time_out,
bool &  timed_out,
Message message 
)

Check for a message for this thread. Returns true if message available.

Parameters
thread_idThread ID of receiver (thread checking for messages).
time_outTimeout to apply (NO_TIMEOUT, 0: return immediately, >0: Timeout in seconds).
timed_outTrue if waiting for a message timed out.
messageMessage received (if any).
Returns
True if a message is available for the given thread.
Todo:
: Handle priority.
Todo:
: Handle priority.
bool ctd::mptk::MessageBus::ReceiveMessage ( const std::string &  receiver_thread_id,
const double  time_out,
bool &  timed_out,
Message message 
)

Check for a message for this thread. Returns true if message available.

Parameters
thread_idThread ID of receiver (thread checking for messages).
time_outTimeout to apply (NO_TIMEOUT, 0: return immediately, >0: Timeout in seconds).
timed_outTrue if waiting for a message timed out.
messageMessage received (if any).
Returns
True if a message is available for the given thread.
bool ctd::mptk::MessageBus::ReceiveResponse ( const std::string &  receiver_thread_id,
const double  time_out,
bool &  timed_out,
Response response 
)

Check for a message for this thread. Returns true if message available.

See Also
ctd::mptk::MessageBus::ReceiveMessage().
bool ctd::mptk::MessageBus::ReceiveResponse ( const std::string &  receiver_thread_id,
const double  time_out,
bool &  timed_out,
Response response 
)

Check for a message for this thread. Returns true if message available.

See Also
ctd::mptk::MessageBus::ReceiveMessage().
Todo:
: Handle priority.
Todo:
: Handle priority.
bool ctd::mptk::MessageBus::ReceiveResponse ( const std::string &  receiver_thread_id,
const double  time_out,
bool &  timed_out,
Response response 
)

Check for a message for this thread. Returns true if message available.

See Also
ctd::mptk::MessageBus::ReceiveMessage().
MessageBus & ctd::mptk::MessageBus::RegisterThread ( const std::string &  thread_id)

Register thread which will send/receive messages on the Message Bus.

MessageBus& ctd::mptk::MessageBus::RegisterThread ( const std::string &  thread_id)

Register thread which will send/receive messages on the Message Bus.

MessageBus& ctd::mptk::MessageBus::RegisterThread ( const std::string &  thread_id)

Register thread which will send/receive messages on the Message Bus.

void ctd::mptk::MessageBus::SendMessage ( const Message message)

Send a message on the Message Bus.

void ctd::mptk::MessageBus::SendMessage ( const Message message)

Send a message on the Message Bus.

void ctd::mptk::MessageBus::SendMessage ( const Message message)

Send a message on the Message Bus.

void ctd::mptk::MessageBus::SendResponse ( Response response)

Send a response to a message received on the Message Bus.

void ctd::mptk::MessageBus::SendResponse ( Response response)

Send a response to a message received on the Message Bus.

void ctd::mptk::MessageBus::SendResponse ( Response response)

Send a response to a message received on the Message Bus.


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