![]() |
VR-Forces 4.3.1 Class Documentation
|
You can send an interface message to a VR-Forces application using the DtVrfMessageInterface's createAndDeliver() member function.
The specification of the member function is:
The following example shows an application sending a create object message to a back-end, telling it to create a new phase line. Since the DtIfCreateVrfObject is declared on the stack, it will be deleted automatically.
The recipient portion of a DtSimInterfaceMessage directs the message to a particular VR-Forces application. Specific objects within a VR-Forces application receive messages by registering callbacks for them. Interface messages are addressed to a VR-Forces application by its DtSimulationAddress (hostStructs.h). The simulation address is the site ID:application number pair that uniquely identifies an application participating in a simulation exercise.
You can broadcast an interface message to all VR-Forces applications by specifying the address DtSimSendToAll. It represents the simulation address (site ID: -1 application number: -1), indicating all VR-Forces applications on the network.
In a VR-Forces application, you can get your own simulation address through the Simulation Manager, for example:
In an application using the Remote Control API (such as a GUI), you can get the simulation address of all VR-Forces applications currently participating in an exercise through the DtVrfRemoteController. The DtVrfRemoteController class has a backend() member function that returns a DtList of simulation addresses of all of the VR-Forces applications on the network in the same session. For example, to print out the addresses of all of the VR-Forces applications currently participating in an exercise:
[<< The Message Interface] [Home] [Top of Page] [Receiving Interface Messages >>]