HLAClient Plugin
High Level Architecture (HLA) is a general purpose architecture for distributed computer simulation systems. Rather than a networking protocol (wire standard) like DIS, HLA defines an architecture with a set of API (Application Programmer's Interface) Standards. Simulation applications (known as federates in HLA) communicate by making calls to the HLA APIs. A piece of software known as the RTI (Run-time Infrastructure) implements the HLA API, and is responsible for transporting data from one federate to another. Like DIS, the HLA Standards are owned by IEEE.
Run-Time Infrastructure
RTI is the fundamental component of HLA. It provides a set of software services that are necessary to support federates to coordinate their operations and data exchange during a runtime execution. In other sense, it is the implementation of the HLA interface specification but is not itself part of specification. Modern RTI implementations conform to the IEEE 1516 and/or HLA 1.3 API specifications. These specifications do not include a network protocol for RTI. It is up to the implementors of an RTI to create a specification.
The CERTI
HLAClient plugin currently uses the CERTI, an open-source RTI, distrubuted under the GPL/LGPL licence, that fully supports HLA 1.3, and partly IEEE 1516. The CERTI provides, among others, HLA implementations for C++ and Python.
The CERTI implementation of HLA is based on a process, the RTIG (RTI Gateway), that manages the simulation and transfers messages between federates. An RTIA process is automatically launched close to each federate, and manages the interaction between the federates and the RTIG.
UNIGINE's implementation of HLA is experimental and currently supports its common functionality (version 1.3).
The HLAClient plugin enables to use HLA protocol in a UNIGINE application and offers the following features:
- Communication with other HLA Clients.
- Time management.
- Synchronization points.
- C++ API
Using HLAClient
The basic workflow is as follows:
- Implement HLA logic for your application.
-
Prepare your environment.
It is recommended to use a 100 Mb LAN. Otherwise, you may experience network lags .
Run your HLA Client application.
You should launch the HLAClient plugin via the extern_plugin command-line option at the start-up of your application, e.g.:
<your_app_name> -extern_plugin HLAClient
For successful launching of the plugin, the following libraries are required:- On Windows: CERTI.dll, FedTime.dll, HLA.dll, RTI-NG.dll.
- On Linux: libCERTI.so*, libFedTime.so*, libHLA.so*, libRTI-NG.so*.
Compiling HLAClient
Plugin compilation is required if you change its source code (for example, add new API functions).
CERTI-3.5.1 is required for recompiling the HLAClient plugin:
- Get the CERTI-3.5.1 source code. To build the CERTI libraries and executables from the source code, follow the instructions.
- Set the path to the lib folder with the built libraries in the HLA_RTI environment variable.
- Compile the plugin in one of the following ways:
The RTI-NG.lib and FedTime.lib libraries are required for plugin compilation.
- By using the build script:
C:\UnigineSDK\source>build.py --plugin HLAClient
- Manually with Scons: go to the <UnigineSDK>\source via the command line, type scons and the plugin name and press ENTER:
C:\UnigineSDK\source>scons HLAClient
- Via Microsoft Visual Studio: go to the <UnigineSDK>\source\plugins\Network\HLAClient, open the hlaclient_vs2013.vcxproj or hlaclient_vs2015.vcxproj project and build it.
- By using the build script: