A simulator or other HLA/DIS application performs several tasks in order to interact with other players in a virtual world.
These tasks typically include:
-
Connecting to an exercise. The application must create an object through which it can send and receive simulation data. That object should provide an efficient way to direct incoming data to other parts of the application.
-
Managing state information. The application must inform other exercise participants about the states of its locally generated objects, such as entities, aggregates, transmitters, and so on. The application typically must receive, process, and manage state information about remote objects.
-
Managing information about events. The application must inform other participants about interactions such as collisions or fire/detonations involving a locally simulated entity, and receive and process events and interactions sent by other applications.
VR-Link provides classes that facilitate these tasks.
2.3.1 VR-Link's Protocol-Independent Classes
VR-Link provides the following categories of protocol-independent classes:
-
Exercise Connection – A class that serves as the application's interface to the RTI or to the DIS network.
-
Object management classes – Classes that maintain state information of local and remote objects, and handle the sending and receiving of state updates.
-
Interaction classes – Classes that provide a protocol-independent API to either HLA interactions or DIS PDUs that represent events.
VR-Link also provides protocol-specific classes and features. However, in most cases, your code does not need to interact directly with them.
To make the job of writing an application easier, VR-Link includes conversion routines, mathematical functions, and other useful functions. These are described in 13 - VR-Link Utility Classes and the vrlExamples page.
The figure shows how classes in a VR-Link application interact. Your application code can interact with classes at any level, and with the RTI or DIS network directly. However, for most applications, you can rely on the protocol-independent classes, which are generally easier to use. VR-Link utilities, such as the coordinate conversion utilities are also available to application code and VR-Link classes.
Structure of a typical VR-Link application
2.3.1.1 Protocol-Independent Object Management Classes
VR-Link provides a protocol-independent interface to various logical types of objects that are typically simulated in real-time platform-level simulations. For each logical type of object (entities, aggregates, transmitters, and so on), the following classes provide this interface:
-
An object publisher class, for example, DtEntityPublisher, which manages the sending of updates for a locally simulated object to the exercise through its DtExerciseConn. Object publishers are derived from DtObjectPublisher.
-
A reflected object class, for example, DtReflectedEntity, which represents a remote object. A DtReflectedEntity maintains the current state of the object based on updates received from the exercise through its DtExerciseConn. Reflected objects are derived from DtReflectedObject.
-
A reflected object list class, for example, DtReflectedEntityList, which keeps track of remote objects. It creates and destroys reflected objects based on information received from the exercise through its DtExerciseConn. Reflected object lists are derived from DtReflectedObjectList.
-
A state repository class, for example, DtEntityStateRepository, which is used by both publishers and reflected objects to store the state of the object they represent. State repositories are derived from DtStateRepository. DtEntityStateRepository and DtAggregateStateRepository are derived from a common class DtBaseEntityStateRepository. DtBaseEntityStateRepository is derived from the general base class DtStateRepository.
Below the protocol-independent interface are many lower-level objects that help manage objects in HLA. The lower-level objects are for the most part hidden by the higher-level interface and do not typically need to be used by application code directly. These lower-level objects are described in 5 - The HLA-Specific Interface.
[<< HLA, DIS, and Protocol Independence] [Home] [Top of Page] [Connecting to an Exercise >>]