ADD: added new basic messages and added the parentID as an part of the identifier

This commit is contained in:
Henry Winkel
2023-01-19 16:03:58 +01:00
parent 49bdb28535
commit 73b15d235a
32 changed files with 2140 additions and 140 deletions

View File

@@ -31,7 +31,9 @@ namespace WHISPER {
/// raw track message
RAW_TRACK,
/// simple data
SIMPLE
SIMPLE,
///
STRINGDATA
}; // enum class EventType
@@ -83,7 +85,7 @@ namespace WHISPER {
public:
Message()=default;
Message(std::int32_t deviceId, MsgTopics topic, MsgType Type,SourceType src);
Message(std::uint32_t parentId,std::uint32_t deviceId, MsgTopics topic, MsgType Type,SourceType src);
Message(std::string msg);
/**
@@ -95,11 +97,13 @@ namespace WHISPER {
///topic of the message for pub sub
std::uint32_t topic_;
/// WHISPER::MsgType ot the payload
std::int32_t msgType_;
std::uint32_t msgType_;
/// WHISPER::SourceType of the sender
std::int32_t sourceType_;
std::uint32_t sourceType_;
/// id of the sender
std::int32_t deviceId_;
std::uint32_t deviceId_;
/// parent id of the sender 0 if its the manager
std::uint32_t parentId_;
/**
* @brief returns the serialized message