SerializerInterface translates between LCM message bytes and drake::AbstractValue objects that contain LCM messages, e.g., a Value<lcmt_drake_signal>.
All const
methods are threadsafe. See Serializer for a message-specific concrete subclass.
#include <drake/systems/lcm/serializer.h>
Public Member Functions | |
virtual | ~SerializerInterface () |
virtual std::unique_ptr< AbstractValue > | CreateDefaultValue () const =0 |
Creates a value-initialized (zeroed) instance of the message object. More... | |
virtual void | Deserialize (const void *message_bytes, int message_length, AbstractValue *abstract_value) const =0 |
Translates LCM message bytes into a drake::AbstractValue object. More... | |
virtual void | Serialize (const AbstractValue &abstract_value, std::vector< uint8_t > *message_bytes) const =0 |
Translates a drake::AbstractValue object into LCM message bytes. More... | |
Does not allow copy, move, or assignment | |
SerializerInterface (const SerializerInterface &)=delete | |
SerializerInterface & | operator= (const SerializerInterface &)=delete |
SerializerInterface (SerializerInterface &&)=delete | |
SerializerInterface & | operator= (SerializerInterface &&)=delete |
Protected Member Functions | |
SerializerInterface ()=default | |
|
delete |
|
delete |
|
virtual |
|
protecteddefault |
|
pure virtual |
Creates a value-initialized (zeroed) instance of the message object.
The result can be used as the output object filled in by Deserialize.
Implemented in Serializer< LcmMessage >.
|
pure virtual |
Translates LCM message bytes into a drake::AbstractValue object.
Implemented in Serializer< LcmMessage >.
|
delete |
|
delete |
|
pure virtual |
Translates a drake::AbstractValue object into LCM message bytes.
Implemented in Serializer< LcmMessage >.