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

@@ -37,6 +37,8 @@ namespace WHISPER
private:
/// device ID
std::uint32_t ownID_;
/// device ID
std::uint32_t parentID_;
/// device Type
SourceType ownDeviceType_;
@@ -61,7 +63,7 @@ namespace WHISPER
public:
whispercomm(std::uint32_t id, SourceType owndevicetype):ownID_(id),ownDeviceType_(owndevicetype)
whispercomm(std::uint32_t parentid,std::uint32_t id, SourceType owndevicetype):parentID_(parentid),ownID_(id),ownDeviceType_(owndevicetype)
{};
void connect(std::shared_ptr<threadSafeQueue<WHISPER::Message>> receiver);
void publish(std::string msg,std::string topic);
@@ -70,6 +72,7 @@ namespace WHISPER
void unsubscribe(std::string topic);
std::uint32_t getOwnID();
std::uint32_t getParentID();
SourceType getOwnDeviceType();
protected: