Serializer is specific to a single LcmMessage type, and translates between LCM message bytes and drake::Value<LcmMessage> objects.
LcmMessage | message type to serialize, e.g., lcmt_drake_signal. |
#include <drake/systems/lcm/serializer.h>
Public Member Functions | |
Serializer ()=default | |
~Serializer () override=default | |
std::unique_ptr< AbstractValue > | CreateDefaultValue () const override |
Creates a value-initialized (zeroed) instance of the message object. More... | |
void | Deserialize (const void *message_bytes, int message_length, AbstractValue *abstract_value) const override |
Translates LCM message bytes into a drake::AbstractValue object. More... | |
void | Serialize (const AbstractValue &abstract_value, std::vector< uint8_t > *message_bytes) const override |
Translates a drake::AbstractValue object into LCM message bytes. More... | |
Does not allow copy, move, or assignment | |
Serializer (const Serializer &)=delete | |
Serializer & | operator= (const Serializer &)=delete |
Serializer (Serializer &&)=delete | |
Serializer & | operator= (Serializer &&)=delete |
Public Member Functions inherited from SerializerInterface | |
virtual | ~SerializerInterface () |
SerializerInterface (const SerializerInterface &)=delete | |
SerializerInterface & | operator= (const SerializerInterface &)=delete |
SerializerInterface (SerializerInterface &&)=delete | |
SerializerInterface & | operator= (SerializerInterface &&)=delete |
Additional Inherited Members | |
Protected Member Functions inherited from SerializerInterface | |
SerializerInterface ()=default | |
|
delete |
|
delete |
|
default |
|
overridedefault |
|
overridevirtual |
Creates a value-initialized (zeroed) instance of the message object.
The result can be used as the output object filled in by Deserialize.
Implements SerializerInterface.
|
overridevirtual |
Translates LCM message bytes into a drake::AbstractValue object.
Implements SerializerInterface.
|
delete |
|
delete |
|
overridevirtual |
Translates a drake::AbstractValue object into LCM message bytes.
Implements SerializerInterface.