chrono::synchrono::SynMAPMessage Class Reference


Store the Map information in the simulation.

Currently only used for traffic light. A Map has Intersections which have approaches which have lanes

#include <SynMAPMessage.h>

Inheritance diagram for chrono::synchrono::SynMAPMessage:
Collaboration diagram for chrono::synchrono::SynMAPMessage:

Public Member Functions

 SynMAPMessage (int rank, std::shared_ptr< SynMAPMessageState > state=nullptr)
 Construct a new SynMAPMessage object. 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 int AddLane (int intersection, int approach, ApproachLane lane)
 Add the lane to environment. More...
virtual std::shared_ptr< SynMessageStateGetState () override
 Get the SynMessageState object. More...
std::shared_ptr< SynMAPMessageStateGetMAPState ()
 Get the SynMAPMessageState object. More...
- 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::SynMessage
int m_rank
 rank of which sent or maintains this message
SynMessageType m_type
 type of which this message is

Constructor & Destructor Documentation

◆ SynMAPMessage()

chrono::synchrono::SynMAPMessage::SynMAPMessage ( int  rank,
std::shared_ptr< SynMAPMessageState state = nullptr 

Construct a new SynMAPMessage object.

rankthe rank of this message

Member Function Documentation

◆ AddLane()

int chrono::synchrono::SynMAPMessage::AddLane ( int  intersection,
int  approach,
ApproachLane  lane 

Add the lane to environment.

The lane's position in that approach

◆ GetMAPState()

std::shared_ptr<SynMAPMessageState> chrono::synchrono::SynMAPMessage::GetMAPState ( )

Get the SynMAPMessageState object.

std::shared_ptr<SynMAPMessageState> the state associated with this message

◆ GetState()

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

Get the SynMessageState object.

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

Implements chrono::synchrono::SynMessage.

◆ MessageFromState()

FlatBufferMessage chrono::synchrono::SynMAPMessage::MessageFromState ( flatbuffers::FlatBufferBuilder &  builder)

Generates a SynFlatBuffers::Message from the message state.

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

Implements chrono::synchrono::SynMessage.

◆ StateFromMessage()

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

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

messagethe flatbuffer message to convert to a MessageState object

Implements chrono::synchrono::SynMessage.

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