VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
2.5 - Managing State Information

Table of Contents

A VR-Link application usually must maintain information about objects being simulated locally and communicate this information to other participants in an exercise.

The application must also obtain information about remote objects and represent them locally.

The figure illustrates how a VR-Link application manages state information. The elements of the figure are described in the remainder of this section. In a DIS exercise, locally simulated entities are included in the reflected entity list.

Note
In the remainder of this chapter, we talk about concepts primarily in the context of entities. However, most aspects of entity management apply to other objects, such as aggregates and transmitters, as well.

managingstateinformation.png
Managing State Information

2.5.1 Managing Locally Simulated Entities

Each locally simulated entity is represented by a DtEntityPublisher, which maintains state information in a DtEntityStateRepository. The DtEntityPublisher sends state update messages to the other exercise participants through the exercise connection. The previous figure illustrates a DtEntityPublisher sending information through an exercise connection. The DtEntityStateRepository class has functions that let you inspect the components of an entity's state and change its state.

The frequency with which your application sends updates to the exercise depends on your protocol.

In a DIS exercise, state updates are sent when the state of an entity changes and at regular intervals (heartbeats), regardless of whether there are any changes to the entity.

The HLA seeks to minimize unnecessary network traffic. Therefore in an HLA federation execution, state updates are sent only under the following conditions:

For more information about managing local entities, please see 4.4 - Working with Entities.

2.5.2 Managing Remote Entities

A VR-Link application receives information about remote entities through the exercise connection. The function DtExerciseConn::drainInput() causes VR-Link to read and process input. VR-Link maintains a list of remote entities in a DtReflectedEntityList. Each entity known to the DtReflectedEntityList has a DtReflectedEntity to represent it. The DtReflectedEntity maintains the state of the entity in a DtEntityStateRepository. As with locally simulated entities, you can inspect the components of an entity's state. VR-Link also provides functions to track when entities join or leave an exercise.

The previous figure illustrates a DtReflectedEntityList and DtReflectedEntities.

For more information about remote entities, please see 4.6 - Working with Remote Entities.

Note
You may have noticed that the class names we use for managing entities reflect the terminology used by HLA, that is, publishing and reflecting. Although we use this terminology for our protocol-independent classes, for DIS, VR-Link sends the proper PDUs for state updates or interactions.

[<< Connecting to An Exercise] [Home] [Top of Page] [Managing Information about Events >>]


Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)