Description
SynMessage is the base class for all messages Basically wraps the FlatBuffer methods to better handle the SynChrono message passing system Will be inherited from to create new message types.
#include <SynMessage.h>
Public Member Functions | |
virtual | ~SynMessage () |
Destroy the SynMessage object. | |
virtual void | ConvertFromFlatBuffers (const SynFlatBuffers::Message *message)=0 |
Converts a received flatbuffer message to a SynMessage. More... | |
virtual FlatBufferMessage | ConvertToFlatBuffers (flatbuffers::FlatBufferBuilder &builder) const =0 |
Converts this object to a flatbuffer message. More... | |
AgentKey | GetSourceKey () |
Get the key of the source of this message. More... | |
void | SetSourceKey (AgentKey source_key) |
Set the key of the source of this message. More... | |
AgentKey | GetDestinationKey () |
Get the key of the destination for this message. More... | |
SynFlatBuffers::Type | GetMessageType () |
void | SetMessageType (SynFlatBuffers::Type msg_type) |
Public Attributes | |
double | time |
simulation time | |
Protected Member Functions | |
SynMessage (AgentKey source_key=AgentKey(), AgentKey destination_key=AgentKey()) | |
Constructor. More... | |
Protected Attributes | |
AgentKey | m_source_key |
key for the source which sent this message | |
AgentKey | m_destination_key |
key for the destination of this message | |
SynFlatBuffers::Type | m_msg_type |
Type of message that we contain. | |
Constructor & Destructor Documentation
◆ SynMessage()
|
inlineprotected |
Constructor.
- Parameters
-
source_key the key of the source to which the message is sent from destination_key the key of the destination to which the message is sent to
Member Function Documentation
◆ ConvertFromFlatBuffers()
|
pure virtual |
Converts a received flatbuffer message to a SynMessage.
- Parameters
-
message the flatbuffer message to convert to a SynMessage
Implemented in chrono::synchrono::SynTrackedVehicleDescriptionMessage, chrono::synchrono::SynWheeledVehicleDescriptionMessage, chrono::synchrono::SynCopterDescriptionMessage, chrono::synchrono::SynSPATMessage, chrono::synchrono::SynApproachMessage, chrono::synchrono::SynEnvironmentMessage, chrono::synchrono::SynMAPMessage, chrono::synchrono::SynSimulationMessage, chrono::synchrono::SynSCMMessage, chrono::synchrono::SynWheeledVehicleStateMessage, chrono::synchrono::SynCopterStateMessage, and chrono::synchrono::SynTrackedVehicleStateMessage.
◆ ConvertToFlatBuffers()
|
pure virtual |
Converts this object to a flatbuffer message.
- Parameters
-
builder a flatbuffer builder to construct the message with
- Returns
- FlatBufferMessage the constructed flatbuffer message
Implemented in chrono::synchrono::SynTrackedVehicleDescriptionMessage, chrono::synchrono::SynWheeledVehicleDescriptionMessage, chrono::synchrono::SynCopterDescriptionMessage, chrono::synchrono::SynSPATMessage, chrono::synchrono::SynApproachMessage, chrono::synchrono::SynEnvironmentMessage, chrono::synchrono::SynMAPMessage, chrono::synchrono::SynSimulationMessage, chrono::synchrono::SynSCMMessage, chrono::synchrono::SynWheeledVehicleStateMessage, chrono::synchrono::SynCopterStateMessage, and chrono::synchrono::SynTrackedVehicleStateMessage.
◆ GetDestinationKey()
|
inline |
Get the key of the destination for this message.
- Returns
- AgentKey the destination key
◆ GetSourceKey()
|
inline |
Get the key of the source of this message.
- Returns
- AgentKey the source key
◆ SetSourceKey()
|
inline |
Set the key of the source of this message.
- Parameters
-
source_key AgentKey the source key
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono_synchrono/flatbuffer/message/SynMessage.h