Project Chrono: chrono::synchrono::SynWheeledVehicleDescriptionMessage Class Reference

Public Member Functions | Public Attributes | List of all members
chrono::synchrono::SynWheeledVehicleDescriptionMessage Class Reference
SYNCHRONO module » Flatbuffer Messages

## Description

Description class that holds description information for a SynWheeledVehicle.

`#include <SynWheeledVehicleMessage.h>`

Inheritance diagram for chrono::synchrono::SynWheeledVehicleDescriptionMessage:
[legend]
Collaboration diagram for chrono::synchrono::SynWheeledVehicleDescriptionMessage:
[legend]

## Public Member Functions
| SynWheeledVehicleDescriptionMessage (AgentKey source_key=AgentKey(), AgentKey destination_key=AgentKey(), const std::string &json="")
| Constructor.
virtual void | ConvertFromFlatBuffers (const SynFlatBuffers::Message *message) override
| Converts a received flatbuffer message to a SynMessage.
virtual FlatBufferMessage | ConvertToFlatBuffers (flatbuffers::FlatBufferBuilder &builder) const override
| Converts this object to a flatbuffer message.
void | SetZombieVisualizationFilesFromJSON (const std::string &filename)
| Set the visualization files from a JSON specification file.
void | SetVisualizationFiles (const std::string &chassis_vis_file, const std::string &wheel_vis_file, const std::string &tire_vis_file)
| Set the visualization files used for zombie visualization.
void | SetNumWheels (int num_wheels)
| Set the total number of wheels for this vehicle.
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.
void | SetSourceKey (AgentKey source_key)
| Set the key of the source of this message.
AgentKey | GetDestinationKey ()
| Get the key of the destination for this message.
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 | wheel_vis_file = ""
| file name for wheel zombie visualization
std::string | tire_vis_file = ""
| file name for tire zombie visualization
int | num_wheels = 0
| number of 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.
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

## ◆ SynWheeledVehicleDescriptionMessage()

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

Constructor.

Parameters

  source_key | the id of the source to which the message is sent from
  destination_key | the id of the destination to which the message is sent to
  json | the json specification file used to create an agent

## Member Function Documentation

## ◆ ConvertFromFlatBuffers()

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

Converts a received flatbuffer message to a SynMessage.

Generate agent description from FlatBuffers message.

Parameters

  message | the flatbuffer message to convert to a SynMessage

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

Implements chrono::synchrono::SynMessage.

## ◆ ConvertToFlatBuffers()

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

Converts this object to a flatbuffer message.

Generate FlatBuffers message from this agent's description.

Parameters

  builder | a flatbuffer builder to construct the message with

Returns
  FlatBufferMessage the constructed flatbuffer message

Implements chrono::synchrono::SynMessage.

## ◆ SetNumWheels()

void chrono::synchrono::SynWheeledVehicleDescriptionMessage::SetNumWheels | ( | int | num_wheels | ) |

Set the total number of wheels for this vehicle.

Parameters

  num_wheels | the total number of wheels on the vehicle

## ◆ SetVisualizationFiles()

void chrono::synchrono::SynWheeledVehicleDescriptionMessage::SetVisualizationFiles | ( | const std::string & | chassis_vis_file,
|  | const std::string & | wheel_vis_file,
|  | const std::string & | tire_vis_file )

Set the visualization files used for zombie visualization.

Parameters

  chassis_vis_file | filename for the chassis zombie visualization
  wheel_vis_file | filename for the wheel zombie visualization
  tire_vis_file | filename for the tire zombie visualization

## ◆ SetZombieVisualizationFilesFromJSON()

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

Set the visualization files from a JSON specification file.

Parameters

  filename | the json specification file

The documentation for this class was generated from the following files:

- D:/W/B/src/chrono-9.0.1/src/chrono_synchrono/flatbuffer/message/SynWheeledVehicleMessage.h
- D:/W/B/src/chrono-9.0.1/src/chrono_synchrono/flatbuffer/message/SynWheeledVehicleMessage.cpp