![]() |
VR-Link API Documentation for DIS
|
This file serves an an example of how to re-configure VR-Link to interpret FOM attributes and parameters differently.
Specifically, after calling the configVrl function defined below on a DtExerciseConn, a VR-Link-based application will assume that the "Position" atttribute of the "BaseEntity" object class (and its subclasses) should be encoded in outgoing messages and interpreted in incoming messages as three doubles in the order: Z, Y, X, rather than the standard X, Y, Z. The same will be true for the "FiringLocation" parameter of the "WeaponFire" interaction.
To demonstrate modifying the FOM to replace existing attributes or parameters, you can edit the .fed file to replace "Position" and "FiringLocation" with different attribute and parameter names, such as "ReversePosition" and "ReverseFiringLocation". If you do this, you will need to replace the names in this file as well (in the calls to addAttributeEncoder, addAttributeDecoder, addParameterEncoder and addParameterDecoder), so that the encoding and decoding functions will be associated with the correct parameter and attribute names.
This file is commented out and not part of the default f18. To add this functionality, compile with DtReverse defined.