Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
SerializerInterface Class Referenceabstract

Detailed Description

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< AbstractValueCreateDefaultValue () const =0
 Creates a value-initialized (zeroed) instance of the message object.
virtual void Deserialize (const void *message_bytes, int message_length, AbstractValue *abstract_value) const =0
 Translates LCM message bytes into a drake::AbstractValue object.
virtual void Serialize (const AbstractValue &abstract_value, std::vector< uint8_t > *message_bytes) const =0
 Translates a drake::AbstractValue object into LCM message bytes.
Does not allow copy, move, or assignment
 SerializerInterface (const SerializerInterface &)=delete
SerializerInterfaceoperator= (const SerializerInterface &)=delete
 SerializerInterface (SerializerInterface &&)=delete
SerializerInterfaceoperator= (SerializerInterface &&)=delete

Protected Member Functions

 SerializerInterface ()=default

Constructor & Destructor Documentation

◆ SerializerInterface() [1/3]

◆ SerializerInterface() [2/3]

◆ ~SerializerInterface()

virtual ~SerializerInterface ( )
virtual

◆ SerializerInterface() [3/3]

SerializerInterface ( )
protecteddefault

Member Function Documentation

◆ CreateDefaultValue()

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

◆ Deserialize()

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

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

Implemented in Serializer< LcmMessage >.

◆ operator=() [1/2]

SerializerInterface & operator= ( const SerializerInterface & )
delete

◆ operator=() [2/2]

SerializerInterface & operator= ( SerializerInterface && )
delete

◆ Serialize()

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

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

Implemented in Serializer< LcmMessage >.


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