FIX: fixed some bugs
ADD: added raw_track message frame
This commit is contained in:
@@ -27,7 +27,7 @@ namespace WHISPER {
|
||||
}
|
||||
|
||||
|
||||
Message::Message(std::int32_t deviceId,std::uint32_t topic, MsgType Type,SourceType src):topic_(topic),sourceType_(src),msgType_(Type){
|
||||
Message::Message(std::int32_t deviceId, MsgTopics topic, MsgType Type,SourceType src):topic_(topic),sourceType_(src),msgType_(Type){
|
||||
msg = messages::header::Message();
|
||||
|
||||
if(msg.IsInitialized())
|
||||
@@ -37,6 +37,11 @@ namespace WHISPER {
|
||||
msg.set_sourcetype(sourceType_);
|
||||
msg.set_msgtype(msgType_);
|
||||
}
|
||||
deviceId_ = deviceId;
|
||||
topic_ = topic;
|
||||
sourceType_ = src;
|
||||
msgType_ = Type;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -49,11 +54,7 @@ namespace WHISPER {
|
||||
void Message::addPayLoad(std::shared_ptr<google::protobuf::Any> payload){
|
||||
payload_ = payload;
|
||||
|
||||
LOG_S(INFO)<< "pack any size in message class "<<payload_->ByteSizeLong();
|
||||
|
||||
msg.add_payload()->CopyFrom(*payload_);
|
||||
|
||||
LOG_S(INFO)<< "pack any size in message class "<<payload_->ByteSizeLong();
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +66,6 @@ namespace WHISPER {
|
||||
if (msg.IsInitialized()) {
|
||||
serializedMessage = msg.SerializeAsString();
|
||||
}
|
||||
|
||||
return serializedMessage;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user