chrono::synchrono::SynWheeledVehicleMessage Class Reference

Description

Wraps data from a wheeled vehicle state message into a corresponding C++ object.

#include <SynWheeledVehicleMessage.h>

Inheritance diagram for chrono::synchrono::SynWheeledVehicleMessage:
Collaboration diagram for chrono::synchrono::SynWheeledVehicleMessage:

Public Member Functions

 SynWheeledVehicleMessage (int rank, std::string json="", std::shared_ptr< SynWheeledVehicleState > state=nullptr, std::shared_ptr< SynWheeledVehicleDescription > description=nullptr)
 Construct a new SynWheeledVehicleMessage object. More...
 
 SynWheeledVehicleMessage (int rank, std::shared_ptr< SynWheeledVehicleState > state, std::shared_ptr< SynWheeledVehicleDescription > description=nullptr)
 Construct a new SynWheeledVehicleMessage object Initialize with the passed state and agent description. More...
 
virtual void StateFromMessage (const SynFlatBuffers::Message *message) override
 Generates and sets the state of this message from flatbuffer message. More...
 
virtual FlatBufferMessage MessageFromState (flatbuffers::FlatBufferBuilder &builder) override
 Generates a SynFlatBuffers::Message from the message state. More...
 
virtual std::shared_ptr< SynMessageStateGetState () override
 Get the SynMessageState object. More...
 
std::shared_ptr< SynWheeledVehicleStateGetWheeledState ()
 Get the SynWheeledVehicleState object. More...
 
virtual void DescriptionFromMessage (const SynFlatBuffers::Message *message) override
 Generates and sets the agent description from a flatbuffer message. More...
 
virtual FlatBufferMessage MessageFromDescription (flatbuffers::FlatBufferBuilder &builder) override
 Generates a SynFlatBuffers::Message from the agent description. More...
 
std::shared_ptr< SynWheeledVehicleDescriptionGetWheeledDescription ()
 Get the SynWheeledVehicleDescription object. More...
 
- Public Member Functions inherited from chrono::synchrono::SynAgentMessage
 SynAgentMessage (int rank, SynMessageType type, std::string json="")
 Construct a new SynAgentMessage object. More...
 
std::shared_ptr< SynAgentDescriptionGetDescription ()
 Get the SynAgentDescription object. More...
 
void SetJSON (const std::string &json)
 
- Public Member Functions inherited from chrono::synchrono::SynMessage
 SynMessage (int rank, SynMessageType type)
 Construct a new SynMessage object. More...
 
virtual ~SynMessage ()
 Destroy the SynMessage object.
 
SynMessageType GetType ()
 Get the SynMessageType object. More...
 
unsigned int GetRank ()
 Get the rank from which this message originates. More...
 

Additional Inherited Members

- Protected Attributes inherited from chrono::synchrono::SynAgentMessage
std::shared_ptr< SynAgentDescriptionm_description
 handle to the agent description
 
- Protected Attributes inherited from chrono::synchrono::SynMessage
int m_rank
 rank of which sent or maintains this message
 
SynMessageType m_type
 type of which this message is
 

Constructor & Destructor Documentation

◆ SynWheeledVehicleMessage() [1/2]

chrono::synchrono::SynWheeledVehicleMessage::SynWheeledVehicleMessage ( int  rank,
std::string  json = "",
std::shared_ptr< SynWheeledVehicleState state = nullptr,
std::shared_ptr< SynWheeledVehicleDescription description = nullptr 
)

Construct a new SynWheeledVehicleMessage object.

Constructors.

Parameters
rankthe rank of this message

◆ SynWheeledVehicleMessage() [2/2]

chrono::synchrono::SynWheeledVehicleMessage::SynWheeledVehicleMessage ( int  rank,
std::shared_ptr< SynWheeledVehicleState state,
std::shared_ptr< SynWheeledVehicleDescription description = nullptr 
)

Construct a new SynWheeledVehicleMessage object Initialize with the passed state and agent description.

Parameters
rankthe rank of this message
statethe state of the agent
descriptionthe agent description

Member Function Documentation

◆ DescriptionFromMessage()

void chrono::synchrono::SynWheeledVehicleMessage::DescriptionFromMessage ( const SynFlatBuffers::Message *  message)
overridevirtual

Generates and sets the agent description from a flatbuffer message.

Generate agent description from FlatBuffers message.

Parameters
messagethe flatbuffer message to convert to a SynAgentDescription object

Cast from SynFlatBuffers::Message to SynFlatBuffers::Agent::WheeledVehicle::Description

Reimplemented from chrono::synchrono::SynAgentMessage.

◆ GetState()

virtual std::shared_ptr<SynMessageState> chrono::synchrono::SynWheeledVehicleMessage::GetState ( )
inlineoverridevirtual

Get the SynMessageState object.

Returns
std::shared_ptr<SynMessageState> the state associated with this message

Implements chrono::synchrono::SynMessage.

◆ GetWheeledDescription()

std::shared_ptr<SynWheeledVehicleDescription> chrono::synchrono::SynWheeledVehicleMessage::GetWheeledDescription ( )
inline

Get the SynWheeledVehicleDescription object.

Returns
std::shared_ptr<SynWheeledVehicleDescription> the description associated with this message

◆ GetWheeledState()

std::shared_ptr<SynWheeledVehicleState> chrono::synchrono::SynWheeledVehicleMessage::GetWheeledState ( )
inline

Get the SynWheeledVehicleState object.

Returns
std::shared_ptr<SynWheeledVehicleState> the state associated with this message

◆ MessageFromDescription()

FlatBufferMessage chrono::synchrono::SynWheeledVehicleMessage::MessageFromDescription ( flatbuffers::FlatBufferBuilder &  builder)
overridevirtual

Generates a SynFlatBuffers::Message from the agent description.

Generate FlatBuffers message from this agent's description.

Parameters
builderthe flatbuffer builder used to construct messages
Returns
flatbuffers::Offset<SynFlatBuffers::Message> the generated message

Implements chrono::synchrono::SynAgentMessage.

◆ MessageFromState()

FlatBufferMessage chrono::synchrono::SynWheeledVehicleMessage::MessageFromState ( flatbuffers::FlatBufferBuilder &  builder)
overridevirtual

Generates a SynFlatBuffers::Message from the message state.

Generate FlatBuffers message from this message's state.

Parameters
builderthe flatbuffer builder used to construct messages
Returns
flatbuffers::Offset<SynFlatBuffers::Message> the generated message

Implements chrono::synchrono::SynMessage.

◆ StateFromMessage()

void chrono::synchrono::SynWheeledVehicleMessage::StateFromMessage ( const SynFlatBuffers::Message *  message)
overridevirtual

Generates and sets the state of this message from flatbuffer message.

Parameters
messagethe flatbuffer message to convert to a MessageState object

Reimplemented from chrono::synchrono::SynAgentMessage.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_synchrono/flatbuffer/message/SynWheeledVehicleMessage.h
  • /builds/uwsbel/chrono/src/chrono_synchrono/flatbuffer/message/SynWheeledVehicleMessage.cpp