Drake
Drake C++ Documentation
Serializer< LcmMessage > Class Template Reference

Detailed Description

template<typename LcmMessage>
class drake::systems::lcm::Serializer< LcmMessage >

Serializer is specific to a single LcmMessage type, and translates between LCM message bytes and drake::Value<LcmMessage> objects.

Template Parameters
LcmMessagemessage 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< AbstractValueCreateDefaultValue () 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
 
Serializeroperator= (const Serializer &)=delete
 
 Serializer (Serializer &&)=delete
 
Serializeroperator= (Serializer &&)=delete
 
- Public Member Functions inherited from SerializerInterface
virtual ~SerializerInterface ()
 
 SerializerInterface (const SerializerInterface &)=delete
 
SerializerInterfaceoperator= (const SerializerInterface &)=delete
 
 SerializerInterface (SerializerInterface &&)=delete
 
SerializerInterfaceoperator= (SerializerInterface &&)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from SerializerInterface
 SerializerInterface ()=default
 

Constructor & Destructor Documentation

◆ Serializer() [1/3]

Serializer ( const Serializer< LcmMessage > &  )
delete

◆ Serializer() [2/3]

Serializer ( Serializer< LcmMessage > &&  )
delete

◆ Serializer() [3/3]

Serializer ( )
default

◆ ~Serializer()

~Serializer ( )
overridedefault

Member Function Documentation

◆ CreateDefaultValue()

std::unique_ptr<AbstractValue> CreateDefaultValue ( ) const
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.

◆ Deserialize()

void Deserialize ( const void *  message_bytes,
int  message_length,
AbstractValue abstract_value 
) const
overridevirtual

Translates LCM message bytes into a drake::AbstractValue object.

Implements SerializerInterface.

◆ operator=() [1/2]

Serializer& operator= ( Serializer< LcmMessage > &&  )
delete

◆ operator=() [2/2]

Serializer& operator= ( const Serializer< LcmMessage > &  )
delete

◆ Serialize()

void Serialize ( const AbstractValue abstract_value,
std::vector< uint8_t > *  message_bytes 
) const
overridevirtual

Translates a drake::AbstractValue object into LCM message bytes.

Implements SerializerInterface.


The documentation for this class was generated from the following file: