![]() |
DI-Guy SDK Documentation
13.8
|
DI-Guy supports HLA (High Level Architecture) interoperation for HLA1.3, HLA 1516, and HLA Evolved.
DI-Guy subscribes to and publishes standard RPR FOM (Real-time Platform Reference Federation Object Model) attributes, fire and detonation interactions, and DI-Guy Custom attributes described in this section.
The RPR FOM, augmented with the DI-Guy Custom attributes (FOM extensions), defines the DI-Guy-Enhanced FOM. The DI-Guy-Enhanced FOM allows more realistic simulation of humans than the RPR FOM.
DI-Guy does not include an RTI. To use HLA, you must obtain an RTI, such as the MÄK RTI, from an RTI vendor. To install an RTI, please follow the instructions provided by your RTI supplier. Usually your RTI will come with some simple test software. Make sure you get your RTI working independently before using the DI-Guy FOM.
Perform the following steps to configure DI-Guy to use HLA networking:
Verify that the RTI DLLs are in your path. Once the RTI is installed, along with any other third party networking software, check to see if the installation has altered your $PATH environment variable. Your $PATH environment variable should contain the directory where the RTI’s DLLs reside, specifically, libFedTime.dll and libRTI-NG.dll.
For the MÄK RTI, the name resembles C:\MAK\makRti4.2\lib.
Choose a RID file. Most RTIs require a RID (RTI Initialization Data) file. Use a RID file appropriate to your RTI. The RID file contains parameters for the configuration of the RTI. In practice, the name of the RID file need not end with .rid. For example, rid.mtl is the default name of the RID file for the MÄK RTI.
The RTI finds its RID file by looking at the environment variable RTI_RID_FILE. The value of the variable is the full path to the RID file, including the file name.
If DI-Guy finds that RTI_RID_FILE is not defined, it will ask you to define the environment variable. ./config/diguy has some sample RID files.
Choose a FED file or FDD file.
In HLA 1.3, a FED file (Federation Execution Data) is a list of object attributes that will be transmitted over the HLA network for a given federation execution. DI-Guy requires a FED file that is RPR-FOM compatible. In HLA 1516 and HLA Evolved, the equivalent file is an FDD file.
DI-Guy recommends a FED file that includes the DI-Guy FOM Extensions.
The DI-Guy FOM Extensions are provided in ./config/diguy/DI-Guy.fed for HLA 1.3; ./config/diguy/DI-Guy.xml for HLA1516 and HLA Evolved.
The RTI finds its FED file by looking in the directory specified by the environment variable RTI_CONFIG. Set RTI_CONFIG to indicate the FED file’s directory, but not the file name.
If DI-Guy finds that RTI_CONFIG is not defined, it assumes a value of ./config/diguy/networking.
The FED file name used by the RTI is specified by the federation_name line in ./config/diguy/scenario/network.cfg.
By default, the value on this line is DI-Guy. This specification causes the federation execution to be named DI-Guy.
When DI-Guy is not running, you may edit this line to change the name of the federation execution and the FED file name.
Once you have set up your computer for HLA networking as described in 5.3.2 Setting up DI-Guy to use HLA, start networking by performing the following steps.
Before the scenario object is constructed, call:
To join the exercise once it is constructed, call:
During your simulation, periodically call:
When you want to leave the exercise, call:
At least once after calling diguy_net_module->go_offline() and before calling diguy_module_net_deinitialize(), call:
This allows the offline command to be executed, thus freeing up objects so that they can be safely destroyed in step 6.
After the scenario object has been destroyed, call:
\note The diguyNetInterface class acts as a wrapper around either a DIS or a HLA (HLA 1.3/HLA 1516) network interface, the type of interface that is created depends on which library is linked against.
Please see diguy_module_hla.h for more information about these functions, as well as a listing of other HLA-related functions.
If DI-Guy fails to join the exercise, it is usually because the RTI has failed to find the FED file or the RID file. Be sure that you have named your FED file based on the federation name, and that you have placed it in directory specified by RTI_CONFIG.
Under HLA, the RTI largely determines when DI-Guy updates entity attributes. DI-Guy forces the maximum update interval of entities according to the following line in networking.cfg:
where:
Please consult your RTI documentation for more details.
It is recommended that applications use the custom DI-Guy FOM extension for realistic human simulation.
If DI-Guy is broadcasting or receiving attributes from applications that do not use the DI-Guy custom FOM, DI-Guy uses the same entity mapping scheme as described in 5.2.3 DI-Guy Entity Mapping in the Absence of Custom PDUs.
DI-Guy publishes and subscribes to the following attributes and parameters of the RPR FOM:
DI-Guy includes two custom FOMs, one for HLA 1.3 and HLA 1516, and one for HLA Evolved. The DI-Guy FOM extensions define DI-Guy custom attributes that allow DI-Guy to subscribe to and publish data that enables high fidelity networked human simulation. This information describes character appearance, actions, and other useful information.
For details about the FOMs, you can view them in a text editor or XML editor. They are in ./config/diguy/networking.
If you are having problems running an HLA application with DI-Guy, try the following:
Here is an example batch file for setting critical environment variables:
[<< DIS Networking Using the SDK] [Home] [Top of Page] [Fire and Detonate Interactions in DI-Guy >>]