ADD: added new function to unpack a SimTrack message from a string

This commit is contained in:
Henry Winkel
2023-07-05 15:50:15 +02:00
parent d2542eeef5
commit 4c1fb526b1
2 changed files with 46 additions and 7 deletions

View File

@@ -9,6 +9,7 @@
#include <SimCore/data.hpp>
#include <SimCore/Messages/Emission.hpp>
#include <memory>
namespace SimCore
{
@@ -52,13 +53,18 @@ namespace SimCore
/// @brief return a WHISPER Message out of a simtrack object
/// @param parentID
/// @return WHISPER::Message
WHISPER::Message buildMessage(SimCore::Identifier parentID);
WHISPER::Message buildMessage();
/// @brief creates a SimTrack out of a whisper message
/// @param msg
/// @return SimTrack Oject
static SimTrack unpack(WHISPER::Message msg);
/// @brief creates a SimTrack out of a string message
/// @param msg
/// @return SimTrack Oject
static std::unique_ptr<SimCore::SimTrack> unpack(std::string msg);
public:
Data<double> Speed;
Data<double> Course;