CHG: removed the sourcetype out of the basic message

This commit is contained in:
Henry Winkel
2023-08-11 10:59:48 +02:00
parent 1c35c0cf67
commit 8eaf6e529c
21 changed files with 122 additions and 388 deletions

View File

@@ -33,15 +33,23 @@ namespace WHISPER
{
// Add datatypes here
class whispercomm{
public:
whispercomm(std::string id):ownID_(id)
{};
void connect(std::shared_ptr<threadSafeQueue<WHISPER::Message>> receiver);
void publish(std::string msg,std::string topic);
void disconnect();
void subscribe(std::string topic);
void unsubscribe(std::string topic);
std::string getOwnID();
// SourceType getOwnDeviceType();
private:
/// device ID
std::uint32_t ownID_;
std::string ownID_;
/// device ID
std::uint32_t parentID_;
/// device Type
SourceType ownDeviceType_;
/// show if the service is connected or not
std::atomic<bool> connected;
@@ -62,18 +70,6 @@ namespace WHISPER
void receive();
public:
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);
void disconnect();
void subscribe(std::string topic);
void unsubscribe(std::string topic);
std::uint32_t getOwnID();
std::uint32_t getParentID();
SourceType getOwnDeviceType();
protected: