![]() |
VR-Forces 4.7 Class Documentation
|
All messages are sent using the following generic procedure:
The communication interface fills in the proper data for the message sender.
Messages can be addressed to a specific simulation object by specifying its name in the recipient field, or addressed to every simulation object by setting the recipient string to "DtBroadcast".
Example SM-1 constructs a message with a DtTextReport (textReport.h) message content that is ready to send to an object named "receiverObject".
To send the message in Example SM-1 using the simulation internal message system, make the following call:
An object can have multiple radios, so when you send messages using the radio system, you must choose which radio to send the message on. You can specify the radio by name, ID, or as the default radio. The radio name is the string that identifies the desired radio in the entity’s OPE file. The radio ID is the index of the radio on the local simulation object, starting with 0, and reflects the order the radios are defined in the entity’s OPE file. The default radio is always the first radio listed in the OPE file, and is equivalent to radio ID 0.
To send the message in Example SM-1 using the default radio, use the following call:
To send the message with a named radio, use the following call:
To send the message with a specific radio ID, use the following call:
The default configuration for most VR-Forces simulation objects has one radio, so it is usually appropriate to send messages using the default radio.
[<< Overview of Simulation Object Communication] [Home] [Top of Page] [Receiving Messages >>]