Drake
TrajectoryCarStateTranslator Class Reference

Translates between LCM message objects and VectorBase objects for the TrajectoryCarState type. More...

#include <drake/automotive/gen/trajectory_car_state_translator.h>

Inheritance diagram for TrajectoryCarStateTranslator:
[legend]
Collaboration diagram for TrajectoryCarStateTranslator:
[legend]

Public Member Functions

 TrajectoryCarStateTranslator ()
 
std::unique_ptr< systems::BasicVector< double > > AllocateOutputVector () const override
 Allocates the vector storage for an output port of our LCM message type, in case special storage is needed. More...
 
void Deserialize (const void *lcm_message_bytes, int lcm_message_length, systems::VectorBase< double > *vector_base) const override
 Translates LCM message bytes into a drake::systems::VectorBase object. More...
 
void Serialize (double time, const systems::VectorBase< double > &vector_base, std::vector< uint8_t > *lcm_message_bytes) const override
 Translates a drake::systems::VectorBase object into LCM message bytes. More...
 
- Public Member Functions inherited from LcmAndVectorBaseTranslator
 LcmAndVectorBaseTranslator (int size)
 The constructor. More...
 
virtual ~LcmAndVectorBaseTranslator ()
 
int get_vector_size () const
 Returns the size of the vector in the drake::systems::VectorBase object. More...
 
 LcmAndVectorBaseTranslator (const LcmAndVectorBaseTranslator &)=delete
 
LcmAndVectorBaseTranslatoroperator= (const LcmAndVectorBaseTranslator &)=delete
 
 LcmAndVectorBaseTranslator (LcmAndVectorBaseTranslator &&)=delete
 
LcmAndVectorBaseTranslatoroperator= (LcmAndVectorBaseTranslator &&)=delete
 

Detailed Description

Translates between LCM message objects and VectorBase objects for the TrajectoryCarState type.

Constructor & Destructor Documentation

Here is the call graph for this function:

Member Function Documentation

std::unique_ptr< systems::BasicVector< double > > AllocateOutputVector ( ) const
overridevirtual

Allocates the vector storage for an output port of our LCM message type, in case special storage is needed.

A result of nullptr indicates that no special vector is needed; the calling code can and should use a default vector implementation such as BasicVector.

The default implementation in this class returns nullptr. Subclasses that require custom VectorBase subtypes should override it.

Reimplemented from LcmAndVectorBaseTranslator.

Here is the caller graph for this function:

void Deserialize ( const void *  lcm_message_bytes,
int  lcm_message_length,
systems::VectorBase< double > *  vector_base 
) const
overridevirtual

Translates LCM message bytes into a drake::systems::VectorBase object.

Parameters
[in]lcm_message_bytesA pointer to a buffer holding the LCM message's data.
[in]lcm_message_lengthThe number of bytes pointed to by the lcm_message_bytes.
[out]vector_baseA pointer to where the translation of the LCM message should be stored. This pointer must not be nullptr.
Exceptions
runtime_errorIf a received LCM message failed to be decoded, or if the decoded LCM message is incompatible with the vector_base. This often occurs when the size of the vector_base does not equal or is incompatible with the size of the decoded LCM message.

Implements LcmAndVectorBaseTranslator.

Here is the caller graph for this function:

void Serialize ( double  time,
const systems::VectorBase< double > &  vector_base,
std::vector< uint8_t > *  lcm_message_bytes 
) const
overridevirtual

Translates a drake::systems::VectorBase object into LCM message bytes.

Parameters
[in]timeThe current time in seconds. This value is typically obtained from drake::systems::Context::get_time().
[in]vector_baseThe object to convert into an LCM message.
[out]lcm_message_bytesThe LCM message bytes. This pointer must not be nullptr.

Implements LcmAndVectorBaseTranslator.

Here is the caller graph for this function:


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