#include <utils.h>
Public Member Functions | |
MsgData (const ProtoVariable *msg) | |
void | setData (const std::string &d) |
template<typename T > | |
void | setData (const std::vector< T > &data) |
MetaData | getMetaData () |
std::string | _data () |
template<typename T > | |
std::vector< T > | getData () |
void | toMutableProtoVariable (ProtoVariable *var) |
bool | isValid () |
Static Public Member Functions | |
template<typename T > | |
static MsgData | createNewMsgData (MetaData meta_data, std::vector< T > data) |
static MsgData | createNewMsgData (MetaData meta_data, std::string data) |
static MsgData | createNewMsgData (MetaData meta_data) |
static MsgData | invalidMsgData () |
Friends | |
std::ostream & | operator<< (std::ostream &output, const MsgData &msg_data) |
Class to store a DataMessage including a MetaData object and a string for the bytes of data.
Definition at line 225 of file AERA/IODevices/TCP/AERA_Protobuf/utils.h.
|
inline |
Constructor for MsgData objects. Converts a ProtoVariable message to a MsgData object.
msg | The message used to convert and create a MsgData object from. |
Definition at line 237 of file AERA/IODevices/TCP/AERA_Protobuf/utils.h.
|
inline |
Casts the data from the byte representation stored as a string to the template type.
Definition at line 304 of file AERA/IODevices/TCP/AERA_Protobuf/utils.h.
|
inline |
Returns the MetaData object corresponding to this MsgData.
Definition at line 295 of file AERA/IODevices/TCP/AERA_Protobuf/utils.h.
|
inline |
Setter for the data of the message. Data is stored as a byte representation in form of a std::string.
d | The byte representation of the data in form of a std::string. |
Definition at line 276 of file AERA/IODevices/TCP/AERA_Protobuf/utils.h.