Configuring Faster Playback
There are some processes that you can modify so that the Logger can play back files more quickly at the expense of some data or feature loss. In certain cases, the data loss is acceptable and the improved performance is required because of the density of data or packets in the tape. For example, in some HLA federations, there are entity heartbeats and timeouts. So if you drop some entity state information or miss the removal of an entity, that information can be retrieved by subsequent state updates or entity timeouts.
The loss of data is likely to have a greater effect on HLA federations, which usually do not have an entity heartbeat mechanism. In HLA the object management services inform federates about object discoveries and removals and there are services for requesting missing data. As a result, if the Logger skips data, there is no certainty that future updates will provide the missing data. More importantly, since in HLA the Logger only removes entities when it processes a removal packet, if one is skipped, an object that should have been removed will erroneously continue to persist in the federation.
In HLA, all skipped interactions are lost. Since interactions are normally transient events, they can often be missed without great impact. However, if the exchange of interactions contains some state information, a missed interaction may leave the transaction in a bad state.
The Logger uses the following commands to configure fast playback:
SetEntityTrackingSetFastJumpsWithoutDiffSetPlaybackReadTimeLimit.
In conjunction with fast playback, in HLA the following commands let you configure the Logger to perform entity heartbeats and timeouts and support federations that have these requirements:
SetHeartbeatIntervalsSetTimeoutIntervals.
The SetEntityTracking Command
The SetEntityTracking command enables or disables the entity tracking process during playback. Entity tracking keeps track of the entities in a logger file and supplies the list of entities for the entity filter. The entity tracker is periodically updated. Eliminating this overhead speeds up playback. However, entity filtering depends on the entity tracker information and no entities are displayed when entity tracking is disabled. Default: entity tracking is enabled.
The syntax for this command in the text interface is:
SetEntityTracking isEnabledValue
For example:
SetEntityTracking false
The syntax for using this command from the command-line is:
logger -r "SetEntityTracking isEnabledValue"
For example:
logger -r "SetEntityTracking false"
The SetFastJumpsWithoutDiff Command
The SetFastJumpsWithoutDiff command changes how the Logger jumps to a particular time in the file during playback. The default behavior is to first get the nearest checkpoint data. This establishes the initial conditions of the jump (that is, current entities and their state). The Logger then processes the packets from the checkpoint time up to the jump time; however, the output is disabled. The result is that the internal object state is updated, but no data is sent to the network. This two step process establishes the current state of the entities at the selected jump time. When SetFastJumpsWithoutDiff is enabled, the Logger jumps immediately from the checkpoint to the jump time without processing intermediate packets. Playback in DIS can handle this fast jump because of entity state updates and entity timeouts. Default: fast jumps are disabled.
The syntax for this command in the text interface is:
SetFastJumpsWithoutDiff isEnabledValue
For example:
SetFastJumpsWithoutDiff true
The syntax for using this command from the command-line is:
logger -r "SetFastJumpsWithoutDiff isEnabledValue"
For example:
logger -r "SetFastJumpsWithoutDiff true"
The SetPlaybackReadTimeLimit Command
The SetPlaybackReadTimeLimit command limits the time the Logger can read packets from a file and drops the remaining packets up to the current time. The Logger records each packet with a relative timestamp from the beginning of the file. When playing back a tape, the Logger reads all of the packets that have timestamps less than or equal to the current time. There is no time limit for the length of this read operation. It is possible that the density of a tape may be such that the Logger takes too long to read all of the packets. The result is that the Logger begins to lag behind the selected playback speed.
A simple example of how this can happen is if the Logger playback speed is increased such that the Logger cannot read all the packets and maintain the selected speed. This lagging behavior could also happen if a very fast machine records the tape and a slow machine is used to play it back or a lightly loaded and then heavily loaded machine. In any case, if the file or playback speed is consistently too dense for the Logger to play back, it falls farther and farther behind.
Setting a read time limit causes the Logger to cut off the read time if needed to maintain the selected speed. However, like the fast jump, the Logger discards data and it should only be employed when dropped data is not a concern or can be recovered by subsequent updates. This trade-off is a bit more drastic in that the Logger may continually drop packets, and while unlikely, the distribution of the packets in the file may be such that some entities may get updated sporadically or not at all. The default configuration disables the read time limit and allows the Logger to take whatever time necessary to read all the packets up to the current time.
When you set the read time limit, it is important to consider the tick rate. The Logger uses the tick rate (really a tick interval) to periodically schedule Logger activity. The Logger starts a read operation (which includes playback of those packets) and when complete, it sleeps a period of time. The sleep allows other processes to run, like the Logger GUI. The sleep interval is established by the tick rate minus the time required to process the read operation. In this way, the Logger performs reads at regular intervals. A candidate value for the read time limit is a value slightly less than the tick rate. In this way, the Logger is assured of completing the read operation before the next scheduled tick time.
This command takes a floating point argument. A value less than or equal to zero disables the behavior. The syntax for this command in the text interface is:
SetPlaybackReadTimeLimit timeLimitValue
For example:
SetPlaybackReadTimeLimit 0.2
The syntax for using this command from the command-line is:
logger -r "SetPlaybackReadTimeLimit timeLimitValue"
For example:
logger -r "SetPlaybackReadTimeLimit 0.2"
Configuring HLA Heartbeating
HLA entity heartbeating sends a complete update of all the object attributes at a specified interval. The Logger will perform dead-reckoning for entity and aggregate publishers if it is using the internal RPR FOM Mapper or a FOM Mapper library that maps to these publishers. If not, the last known values are used.
HLA heartbeating is configured with the SetHeartbeatIntervals command. SetHeartbeatIntervals takes as an argument a space-separated set of class heartbeat intervals. Each interval is specified in the form "className:interval:inheritable", for instance "ObjectRoot:5.0:true".
The Logger sends a heartbeat for each object as specified by its class interval parameter. If an interval is not specified for an object class, the Logger uses the closest parent class for which there is an interval and the class specified inheritable as true. For example, if all classes are a subclass of ObjectRoot and you want all classes to heartbeat every 5.0 seconds, "ObjectRoot:5.0:true" configures this without requiring every class to be individually listed.
If an object’s class specifies a zero interval or the interval is not specified and there is no inheritable interval available, objects of that class do not heartbeat.
The syntax for this command in the text interface is:
SetHeartbeatIntervals "className:interval:inheritable ..."
You can specify as many classes as needed. Each specification must be separated by a space. For example:
SetHeartbeatIntervals "ObjectRoot:5.0:true ObjectRoot.BaseEntity.PhysicalEntity:4.0:true"
Configuring HLA Timeouts
You can configure the HLA Logger to timeout entities. When recording, if the Logger does not receive an update from a known entity within its timeout interval, it acts as if the entity has been removed. The timeout interval is conventionally the heartbeat interval multiplied by 2.5.
To configure HLA timeouts use the SetTimeoutIntervals command. This command takes as an argument a space-separated set of class timeout intervals. Each interval is specified in the form "className:interval:inheritable", for instance "ObjectRoot:12.5:true".
The Logger removes known objects based on the object’s class timeout parameter. If a timeout is not specified for an object class, the Logger uses the closet parent class for which there is a timeout and the class specified inheritable as true. For example, if all classes are a subclass of ObjectRoot and you want all classes to timeout after 12.5 seconds, "ObjectRoot:12.5:true" specifies this without requiring every class to be individually listed.
If an object’s class specifies a zero timeout or the timeout is not specified and there is no inheritable timeout available, objects of that class do not timeout.
The syntax for this command in the text interface is:
SetTimeoutIntervals "className:interval:inheritable ..."
You can specify as many classes as needed. Each specification must be separated by a space. For example:
SetTimeoutIntervals "ObjectRoot:12.5:true ObjectRoot.BaseEntity.PhysicalEntity:15.0:true"