CHG: removed the sourcetype out of the basic message
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user