chrono::synchrono::SynTrackedVehicleDescriptionMessage Class Reference

Description

Description class that holds description information for a SynTrackedVehicle.

#include <SynTrackedVehicleMessage.h>

Inheritance diagram for chrono::synchrono::SynTrackedVehicleDescriptionMessage:
Collaboration diagram for chrono::synchrono::SynTrackedVehicleDescriptionMessage:

Public Member Functions

 SynTrackedVehicleDescriptionMessage (AgentKey source_key=AgentKey(), AgentKey destination_key=AgentKey(), const std::string &json="")
 Constructor. More...
 
virtual void ConvertFromFlatBuffers (const SynFlatBuffers::Message *message) override
 Converts a received flatbuffer message to a SynMessage. More...
 
virtual FlatBufferMessage ConvertToFlatBuffers (flatbuffers::FlatBufferBuilder &builder) const override
 Converts this object to a flatbuffer message. More...
 
void SetZombieVisualizationFilesFromJSON (const std::string &filename)
 Set the visualization files from a JSON specification file. More...
 
void SetVisualizationFiles (const std::string &chassis_vis_file, const std::string &track_shoe_vis_file, const std::string &left_sprocket_vis_file, const std::string &right_sprocket_vis_file, const std::string &left_idler_vis_file, const std::string &right_idler_vis_file, const std::string &left_road_wheel_vis_file, const std::string &right_road_wheel_vis_file)
 Set the visualization files. More...
 
void SetNumAssemblyComponents (int num_track_shoes, int num_sprockets, int num_idlers, int num_road_wheels)
 Set the number of each assembly component. More...
 
- Public Member Functions inherited from chrono::synchrono::SynMessage
virtual ~SynMessage ()
 Destroy the SynMessage object.
 
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

std::string json = ""
 the json specification file that is used to create an agent
 
std::string chassis_vis_file = ""
 file name for chassis zombie visualization
 
std::string track_shoe_vis_file = ""
 file name for track shoe zombie visualization
 
std::string left_sprocket_vis_file = ""
 file name for the left sprocket zombie visualization
 
std::string right_sprocket_vis_file = ""
 file name for the right sprocket zombie visualization
 
std::string left_idler_vis_file = ""
 file name for the left idler zombie visualization
 
std::string right_idler_vis_file = ""
 file name for the right idler zombie visualization
 
std::string left_road_wheel_vis_file = ""
 file name for the left road wheel zombie visualization
 
std::string right_road_wheel_vis_file = ""
 file name for the right road wheel zombie visualization
 
int num_track_shoes = 0
 number of track shoes the zombie vehicle has
 
int num_sprockets = 0
 number of sprockets the zombie vehicle has
 
int num_idlers = 0
 number of idlers the zombie vehicle has
 
int num_road_wheels = 0
 number of road wheels the zombie vehicle has
 
- Public Attributes inherited from chrono::synchrono::SynMessage
double time
 simulation time
 

Additional Inherited Members

- Protected Member Functions inherited from chrono::synchrono::SynMessage
 SynMessage (AgentKey source_key=AgentKey(), AgentKey destination_key=AgentKey())
 Constructor. More...
 
- Protected Attributes inherited from chrono::synchrono::SynMessage
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

◆ SynTrackedVehicleDescriptionMessage()

chrono::synchrono::SynTrackedVehicleDescriptionMessage::SynTrackedVehicleDescriptionMessage ( AgentKey  source_key = AgentKey(),
AgentKey  destination_key = AgentKey(),
const std::string &  json = "" 
)

Constructor.

Parameters
source_keythe id of the source to which the message is sent from
destination_keythe id of the destination to which the message is sent to
jsonthe json specification file used to create an agent

Member Function Documentation

◆ ConvertFromFlatBuffers()

void chrono::synchrono::SynTrackedVehicleDescriptionMessage::ConvertFromFlatBuffers ( const SynFlatBuffers::Message *  message)
overridevirtual

Converts a received flatbuffer message to a SynMessage.

Generate description from FlatBuffers message.

Parameters
messagethe flatbuffer message to convert to a SynMessage

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

Implements chrono::synchrono::SynMessage.

◆ ConvertToFlatBuffers()

FlatBufferMessage chrono::synchrono::SynTrackedVehicleDescriptionMessage::ConvertToFlatBuffers ( flatbuffers::FlatBufferBuilder &  builder) const
overridevirtual

Converts this object to a flatbuffer message.

Generate FlatBuffers message from this agent's description.

Parameters
buildera flatbuffer builder to construct the message with
Returns
FlatBufferMessage the constructed flatbuffer message

Implements chrono::synchrono::SynMessage.

◆ SetNumAssemblyComponents()

void chrono::synchrono::SynTrackedVehicleDescriptionMessage::SetNumAssemblyComponents ( int  num_track_shoes,
int  num_sprockets,
int  num_idlers,
int  num_road_wheels 
)

Set the number of each assembly component.

Parameters
num_track_shoesnumber of track shoes the zombie vehicle has
num_sprocketsnumber of sprockets the zombie vehicle has
num_idlersnumber of idlers the zombie vehicle has
num_road_wheelsnumber of road wheels the zombie vehicle has

◆ SetVisualizationFiles()

void chrono::synchrono::SynTrackedVehicleDescriptionMessage::SetVisualizationFiles ( const std::string &  chassis_vis_file,
const std::string &  track_shoe_vis_file,
const std::string &  left_sprocket_vis_file,
const std::string &  right_sprocket_vis_file,
const std::string &  left_idler_vis_file,
const std::string &  right_idler_vis_file,
const std::string &  left_road_wheel_vis_file,
const std::string &  right_road_wheel_vis_file 
)

Set the visualization files.

Parameters
chassis_vis_filefile name for chassis zombie visualization
track_shoe_vis_filefile name for track shoe zombie visualization
left_sprocket_vis_filefile name for the left sprocket zombie visualization
right_sprocket_vis_filefile name for the right sprocket zombie visualization
left_idler_vis_filefile name for the left idler zombie visualization
right_idler_vis_filefile name for the right idler zombie visualization
left_road_wheel_vis_filefile name for the left road wheel zombie visualization
right_road_wheel_vis_filefile name for the right road wheel zombie visualization

◆ SetZombieVisualizationFilesFromJSON()

void chrono::synchrono::SynTrackedVehicleDescriptionMessage::SetZombieVisualizationFilesFromJSON ( const std::string &  filename)

Set the visualization files from a JSON specification file.

Parameters
filenamethe json specification file

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