13 const double period = 0.1):
14 ifw::ccf::mptk::
Thread(thread_name, message_bus, period) {
23 std::map<std::string, std::string>
24 receiver_threads = {{
"ThreadA",
"ThreadB"}, {
"ThreadB",
"ThreadC"},
25 {
"ThreadC",
"ThreadD"}, {
"ThreadD",
"MainThread"}};
28 if (
MsgBus().ReceiveMessage(
GetName(), 1, timed_out, message)) {
29 std::string data = fmt::format(
"{}/{}. Data: {}",
GetName().c_str(),
30 ++m_msg_count, message.
Data().c_str());
32 receiver_threads[
GetName()], data);
TestThread(const std::string &thread_name, ifw::ccf::mptk::MessageBus &message_bus, const double period=0.1)
Definition testManagerHelper.cpp:11
void UserLogic()
User provided business logic. The UserLogic method need not execute an internal loop....
Definition testManagerHelper.cpp:22
~TestThread()
Definition testManagerHelper.cpp:18
IFW CTD Multiprocessing Toolkit Message Bus.
Definition messageBus.hpp:92
void SendMessage(const Message &message)
Send a message on the Message Bus.
Definition messageBus.cpp:83
IFW CTD Multiprocessing Toolkit Message class.
Definition message.hpp:25
const std::string & Data() const
Return data (payload) of message.
Definition message.cpp:90
IFW CTD Multiprocessing Toolkit Thread base class.
Definition thread.hpp:31
MessageBus & MsgBus()
Get acces to the MessageBus associated with this thread object.
Definition thread.cpp:236
std::string GetName() const
Return the thread Name.
Definition thread.cpp:73
Thread(const std::string &thread_name, MessageBus &message_bus, const double period=0.1)
Constructor method, setting up the internal members.
Definition thread.cpp:42
@ HIGH
Definition message.hpp:19
Definition appBase.cpp:10