DelegateMQ
Loading...
Searching...
No Matches
stdlib/ThreadMsg.h
Go to the documentation of this file.
1#ifndef _THREAD_MSG_H
2#define _THREAD_MSG_H
3
6class ThreadMsg
7{
8public:
16 ThreadMsg(int id, std::shared_ptr<dmq::DelegateMsg> data) :
17 m_id(id),
18 m_data(data)
19 {
20 }
21
22 int GetId() const { return m_id; }
23
24 std::shared_ptr<dmq::DelegateMsg> GetData() const { return m_data; }
25
27 return m_data ? m_data->GetPriority() : dmq::Priority::NORMAL;
28 }
29
30private:
31 int m_id;
32 std::shared_ptr<dmq::DelegateMsg> m_data;
33};
34
35#endif
A class to hold a platform-specific thread messsage that will be passed through the OS message queue.
Definition freertos/ThreadMsg.h:7
ThreadMsg(int id, std::shared_ptr< dmq::DelegateMsg > data)
Definition stdlib/ThreadMsg.h:16
dmq::Priority GetPriority() const
Definition stdlib/ThreadMsg.h:26
int GetId() const
Definition stdlib/ThreadMsg.h:22
std::shared_ptr< dmq::DelegateMsg > GetData() const
Definition stdlib/ThreadMsg.h:24
Priority
Definition DelegateMsg.h:21