12 const double period = 0.1):
13 ifw::ccf::mptk::
Thread(thread_name, message_bus, period) {
22 if (
MsgBus().ReceiveMessage(
GetName(), 1, timed_out, message)) {
24 response(message,
"OK", fmt::format(
"{} received msg# {}. Data: {}",
25 GetName().c_str(), ++m_msg_count,
26 message.
Data().c_str()));
Definition testThreadHelper.cpp:8
TestThread1(const std::string &thread_name, ifw::ccf::mptk::MessageBus &message_bus, const double period=0.1)
Definition testThreadHelper.cpp:10
~TestThread1()
Definition testThreadHelper.cpp:17
void UserLogic()
User provided business logic. The UserLogic method need not execute an internal loop....
Definition testThreadHelper.cpp:19
IFW CTD Multiprocessing Toolkit Message Bus.
Definition messageBus.hpp:91
void SendResponse(Response &response)
Send a response to a message received on the Message Bus.
Definition messageBus.cpp:149
IFW CTD Multiprocessing Toolkit Message class.
Definition message.hpp:24
const std::string & Data() const
Return data (payload) of message.
Definition message.cpp:89
IFW CTD Multiprocessing Toolkit Response class.
Definition response.hpp:20
IFW CTD Multiprocessing Toolkit Thread base class.
Definition thread.hpp:30
MessageBus & MsgBus()
Get acces to the MessageBus associated with this thread object.
Definition thread.cpp:279
std::string GetName() const
Return the thread Name.
Definition thread.cpp:72
Thread(const std::string &thread_name, MessageBus &message_bus, const double period=0.1)
Constructor method, setting up the internal members.
Definition thread.cpp:41