chrono::synchrono::SynCopterDescriptionMessage Class Reference

Description

Description class that holds description information for a SynCopter.

#include <SynCopterMessage.h>

Inheritance diagram for chrono::synchrono::SynCopterDescriptionMessage:
Collaboration diagram for chrono::synchrono::SynCopterDescriptionMessage:

Public Member Functions

 SynCopterDescriptionMessage (SynAgentID source_id, SynAgentID destination_id)
 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 SetVisualizationFiles (const std::string &chassis_vis_file, const std::string &prop_vis_file)
 Set the visualization files used for zombie visualization. More...
 
void SetNumProps (int num_props)
 Set the total number of propellers for this copter. More...
 
int GetNumProps () const
 Get the number of propellers for this copter.
 
- Public Member Functions inherited from chrono::synchrono::SynMessage
virtual ~SynMessage ()
 Destroy the SynMessage object.
 
unsigned int GetSourceID () const
 Get the id of the source of this message. More...
 
void SetSourceID (unsigned int source_id)
 Set the id of the source of this message. More...
 
unsigned int GetDestinationID () const
 Get the id of the destination for this message. More...
 
SynFlatBuffers::Type GetMessageType ()
 
void SetMessageType (SynFlatBuffers::Type msg_type)
 

Public Attributes

std::string chassis_vis_file = ""
 file name for chassis zombie visualization
 
std::string propeller_vis_file = ""
 file name for propeller zombie visualization
 
int num_props = 0
 number of propellers the zombie copter has
 
- Public Attributes inherited from chrono::synchrono::SynMessage
double time
 simulation time
 

Additional Inherited Members

- Protected Member Functions inherited from chrono::synchrono::SynMessage
 SynMessage (unsigned int source_id, unsigned int destination_id)
 Constructor. More...
 
- Protected Attributes inherited from chrono::synchrono::SynMessage
unsigned int m_source_id
 id for the source which sent this message
 
unsigned int m_destination_id
 id for the destination of this message
 
SynFlatBuffers::Type m_msg_type
 Type of message that we contain.
 

Constructor & Destructor Documentation

◆ SynCopterDescriptionMessage()

chrono::synchrono::SynCopterDescriptionMessage::SynCopterDescriptionMessage ( SynAgentID  source_id,
SynAgentID  destination_id 
)

Constructor.

Parameters
source_idthe id of the source to which the message is sent from
destination_idthe id of the destination to which the message is sent to

Member Function Documentation

◆ ConvertFromFlatBuffers()

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

Converts a received flatbuffer message to a SynMessage.

Generate agent description from FlatBuffers message.

Parameters
messagethe flatbuffer message to convert to a SynMessage

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

Implements chrono::synchrono::SynMessage.

◆ ConvertToFlatBuffers()

FlatBufferMessage chrono::synchrono::SynCopterDescriptionMessage::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.

◆ SetNumProps()

void chrono::synchrono::SynCopterDescriptionMessage::SetNumProps ( int  num_props)

Set the total number of propellers for this copter.

Parameters
num_propsthe total number of propellers on the copter

◆ SetVisualizationFiles()

void chrono::synchrono::SynCopterDescriptionMessage::SetVisualizationFiles ( const std::string &  chassis_vis_file,
const std::string &  prop_vis_file 
)

Set the visualization files used for zombie visualization.

Parameters
chassis_vis_filefilename for the chassis zombie visualization
prop_vis_filefilename for the propellers zombie visualization

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