5 #ifndef IFW_CTD_MPTK_MESSAGE_BUS_HPP_
6 #define IFW_CTD_MPTK_MESSAGE_BUS_HPP_
12 #include "ctd/defines/defines.hpp"
14 #include "ctd/mptk/Message.hpp"
15 #include "ctd/mptk/Response.hpp"
44 const double time_out,
54 const double time_out,
59 std::string
Print()
const;
65 std::map<std::string, std::list<Message> > m_message_registry;
68 std::map<std::string, std::list<Response> > m_response_registry;
76 #endif // IFW_CTD_MPTK_MESSAGE_BUS_HPP_
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.
Definition: MessageBus.cpp:47
MessageBus()
Definition: MessageBus.cpp:15
void SendResponse(Response &response)
Send a response to a message received on the Message Bus.
Definition: MessageBus.cpp:77
~MessageBus()
Definition: MessageBus.cpp:23
MessageBus & RegisterThread(const std::string &thread_id)
Register thread which will send/receive messages on the Message Bus.
Definition: MessageBus.cpp:27
void SendMessage(const Message &message)
Send a message on the Message Bus.
Definition: MessageBus.cpp:39
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.
Definition: MessageBus.cpp:85
std::string Print() const
Generate ASCII output providing a status of the object (to the extend possible).