FIX: fixed some bugs

ADD: added raw_track message frame
This commit is contained in:
Henry Winkel
2022-11-15 15:55:24 +01:00
parent cf1800ffba
commit 8fcf4244b0
25 changed files with 1799 additions and 158 deletions

View File

@@ -15,6 +15,7 @@ namespace WHISPER {
sourceType_ = msg.sourcetype();
msgType_ = msg.msgtype();
joinMessage = messages::join::Join();
deviceId_ = msg.sourceid();
if ( msg.payload_size()) {
if (msg.payload().begin()->Is<messages::join::Join>()) {
@@ -33,17 +34,16 @@ namespace WHISPER {
}
WHISPER::Join::Join(std::uint32_t deviceID,std::uint32_t topic, MsgType Type, SourceType src,std::uint32_t port, std::string addr):
Message(deviceID,topic,Type,src),port(port),sourceAddr(addr)
WHISPER::Join::Join(std::uint32_t deviceID, SourceType src,std::uint32_t port, std::string addr):
Message(deviceID,WHISPER::MsgTopics::MANAGEMENT,WHISPER::JOIN,src),port(port),sourceAddr(addr)
{
joinMessage = messages::join::Join();
joinMessage.set_port(port);
joinMessage.set_srcaddress(sourceAddr);
LOG_S(INFO)<< "join message befor packing:" << joinMessage.ByteSizeLong();
auto test = std::make_shared<google::protobuf::Any>();
test->PackFrom(joinMessage);
addPayLoad(test);
auto payloadMessage = std::make_shared<google::protobuf::Any>();
payloadMessage->PackFrom(joinMessage);
addPayLoad(payloadMessage);
}