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>

Inheritance diagram for chrono::synchrono::SynMessage:

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()

chrono::synchrono::SynMessage::SynMessage ( AgentKey  source_key = AgentKey(),
AgentKey  destination_key = AgentKey() 
)
inlineprotected

Constructor.

Parameters
source_keythe key of the source to which the message is sent from
destination_keythe key of the destination to which the message is sent to

Member Function Documentation

◆ ConvertFromFlatBuffers()

◆ ConvertToFlatBuffers()

virtual FlatBufferMessage chrono::synchrono::SynMessage::ConvertToFlatBuffers ( flatbuffers::FlatBufferBuilder &  builder) const
pure virtual

◆ GetDestinationKey()

AgentKey chrono::synchrono::SynMessage::GetDestinationKey ( )
inline

Get the key of the destination for this message.

Returns
AgentKey the destination key

◆ GetSourceKey()

AgentKey chrono::synchrono::SynMessage::GetSourceKey ( )
inline

Get the key of the source of this message.

Returns
AgentKey the source key

◆ SetSourceKey()

void chrono::synchrono::SynMessage::SetSourceKey ( AgentKey  source_key)
inline

Set the key of the source of this message.

Parameters
source_keyAgentKey the source key

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