Using Data Distribution Management

The Logger can record and play back using HLA Data Distribution Management (DDM). There are two general use cases for configuring DDM with the Logger. The first case uses the HLA DDM conveyed region information to record and play back using DDM regions. The second case supports creating a plug-in to inspect the simulation data to create and update regions. The DDM configuration parameters control which of these approaches is supported and they allow some variation in how they are supported.

In both cases, you can configure the Logger to use either global region subscriptions (subscribeMode = SubscribeRegionsAreGlobal) or specific region subscriptions (subscribeMode = SubscribeRegionsAreSpecified). When the Logger subscribes using global regions, it uses an appropriate region with global extents for each class subscription to receive all possible data from the federation. This subscription mode requires no further configuration other than setting the subscribeMode parameter in the SetDdmParameters command.

You can configure the Logger with specific region subscriptions to restrict the data that the Logger records, or segregate the data among several Loggers, each specifying different region extents. This subscription mode requires a subscription specification file, as described in Specifying Subscription Regions.

Specifying Subscription Regions

The specification of subscription regions can be read from a configuration file using the LoadSubscriptionListFile command. This command can be included in the Logger configuration file in the startup section, as follows:

<command domain="Simulation" protocol="HLA 13" command="LoadSubscriptionListFile">
   <param name="filename" var="subscriptionListFile"></param>
</command>

A subscription list file has a list of region descriptors, a list of region sets, and a list of associations between region sets and object and interaction classes. Region descriptors specify the lower and upper bounds of each dimension in the region. The bound values are the normalized values used by the RTI. For the HLA 1.3 specification, the region descriptor includes the routing space name and must specify the bounds for all the dimensions in the routing space.

The following example configuration associates regions with object and interaction classes:

<?xml version="1.0" encoding="utf-8"?>
<subscriptionList>
   <regionList name="subRegionList">
      <region name="Region1">
         <space>RoutingSpaceName</space>
         <extent>
            <dimension name="Dim1">
               <lowerBound>0</lowerBound>
               <upperBound>20000</upperBound>
            </dimension>
            <dimension name="Dim2">
               <lowerBound>0</lowerBound>
               <upperBound>20000</upperBound>
            </dimension>
         </extent>
      </region>
      <region name="GlobalRegion">
         <space> RoutingSpaceName </space>
         <extent>
            <dimension name="Dim1">
               <lowerBound>0</lowerBound>
               <upperBound>4294967293</upperBound>
            </dimension>
            <dimension name="Dim2">
               <lowerBound>0</lowerBound>
               <upperBound>4294967293</upperBound>
            </dimension>
         </extent>
      </region>
   </regionList>

<!-- Each region set contains one or more regions. -->

   <regionSetList name="subRegionSetList">
      <regionSet name="Region1Set">
         <region>Region1</region>
      </regionSet>

      <regionSet name="GlobalRegionSet">
         <region>GlobalRegion</region>
      </regionSet>
   </regionSetList>

<!-- In the object and interaction class lists, if a class is not -->
<!-- associated with a specific region set, it uses the region set -->
<!-- specified by allObjectClasses or allInteractionClasses. -->
<!-- If the all*Classes parameter is omitted, and SetDdmParameters -->
<!-- subscribeUnspecifiedAttributes is disabled, only those classes -->
<!-- that are explicitly associated with a region set are subscribed. -->

   <classList name="objectClassList">
      <allObjectClasses regionSet="GlobalRegionSet"/>
      <objectClass regionSet="RegionSet1">ObjectRoot.Class1</objectClass>
      <objectClass regionSet="RegionSet1"> ObjectRoot.Class2</objectClass>
   </classList>

   <classList name="interactionClassList">
      <allInteractionClasses regionSet="GlobalRegionSet"/>
      <interactionClass regionSet="RegionSet1">InteractionRoot.Class1 </interactionClass>
      <interactionClass regionSet="RegionSet1">InteractionRoot.Class2 </interactionClass>
   </classList>
</subscriptionList>

If individual attributes of a class must be associated with specific regions, then the regions can specify those attributes, as follows:

<region name="Region1">
   <space>RoutingSpaceName</space>
   extent>
      <dimension name="Dim1">
         <lowerBound>0</lowerBound>
         <upperBound>20000</upperBound>
      </dimension>
      <dimension name="Dim2">
         <lowerBound>0</lowerBound>
         <upperBound>20000</upperBound>
      </dimension>
   /extent>
   attribute class="ObjectRoot.Class1" name="Attribute1"/>
   attribute class="ObjectRoot.Class1" name=" Attribute2"/>
   attribute class="ObjectRoot.Class1" name=" Attribute3"/>
</region>

You must define a separate region for each set of class attributes for a given class and the class must still be associated with the region in the object class list. The class is subscribed with the specified list of attributes and region. If any attributes of the class are left unspecified, and the subscribeUnspecifiedAttributes parameter is disabled, they are not subscribed.

Using Conveyed Regions

The HLA DDM service supports the concept of conveyed regions, which provides to the receiving federate the region extents associated with the reflected attributes or received interactions at the time the data was sent. By recording these conveyed region extents, the Logger can reproduce the regions during playback.

You can configure the Logger to record the conveyed region information. This region information can then be used during playback to create regions, update regions, and switch object attributes between regions. The conveyed regions provided by the RTI during Federate Ambassador callbacks specify the region extents that were active when the object instance attributes were updated or the interaction was sent. The Logger records these region extents with the received data. When playing back a file with region information, the Logger can send the data using the recorded region extents. Because the region information was provided by the RTI and recorded by the Logger, it is not necessary to inspect the data in order to create and update regions. The Logger replicates the same region extents as when the data was sent by the original federate.

Note: To record conveyed region information, the RTI must be configured to deliver the conveyed region information in the Federate Ambassador callbacks. See the appropriate RTI documentation for enabling this HLA feature.

Using Simulation Data

The Logger plug-in API provides class methods used in the playback process that can be overridden to inspect the outgoing data to create and update regions to support DDM. DDM regions are used to send interactions and they are associated with object instance attributes. The interaction data can be inspected to select a region and then the region extents can be modified prior to sending the interaction. The object data can be inspected when the object publisher is created in order to select the regions used to register the object. As the object is updated, the region extents can be modified or the attributes can be associated with different regions.

Configuring DDM

The DDM settings are set using the SetDdmParameters command in the Logger configuration file, text interface, or on the command line. The syntax for this command in the text interface is:

SetDdmParameters enableDdm playbackMode subscribeMode playbackDynamicAssociation playbackDynamicExtents allowPlaybackWithoutRegions recordConveyedRegions requestUpdates subscribeUnspecifiedAttributes

For example:

SetDdmParameters true PlaybackRegionsUseConveyedExtents SubscribeRegionsAreGlobal true false true true true true

The parameters for the SetDdmParameters command are as follows:

  • enableDdm. Enable record and playback using DDM. Default: false.

  • playbackMode. Supported modes are:

    • PlaybackRegionsUseConveyedExtents. During playback, regions are created and updated using recorded region data.
    • PlaybackRegionsUseData. Regions are created and updated by inspecting simulation data. (Requires plug-in extension.)
    • PlaybackRegionNotEnabled (default). Updates and interactions are sent without regions.
  • subscribeMode. Supported modes:

    • SubscribeRegionsAreGlobal. DDM subscriptions are made with global regions with extents of global min and max.
    • SubscribeRegionsAreSpecified. The regions are specified through subscription configuration files. (For details, please see the LoadSubscriptionListFile command.)
    • SubscribeRegionNotEnabled (default). Subscriptions are performed without regions.
  • playbackDynamicAssociation. During playback, the association of regions with object instance attributes can be fixed or dynamic. If it is known that region associations with attribute instances never change, the overhead of checking for changes can be eliminated. This parameter should be disabled if possible. Default: false.

  • playbackDynamicExtents. During playback, the region extents can be fixed or dynamic. The conventional notion of DDM regions regards them as dynamically changing extents to reflect the state of simulation data (for example, surrounding an entity’s position). An alternative approach is for the regions to be fixed and the object attribute instances move from region to region. If it is known that region extents never change, the overhead of checking for changes can be eliminated. This parameter should be disabled if possible. Default: false.

  • allowPlaybackWithoutRegions. During playback, it may happen that a region association cannot be established. In these cases, the Logger sends the data without region association. Disable this parameter if the federation agreement requires that all data must be transmitted with associated regions. Default: true.

  • recordConveyedRegions. Enable this parameter to record conveyed regions. Default: True.

  • requestUpdates. Requesting updates can result in spikes in network traffic, especially since it is often performed by late joining federates when the exercise is already populated with many objects. In some DDM federations, object heartbeats are used instead of update requests. Disable this parameter to prevent the Logger from making requests for updates.

    **Note—**The Logger does not use region information to perform update requests. The default value is True.

  • subscribeUnspecifiedAttributes. The Logger may not be able to determine a region association to apply to an interaction class or object class attribute subscription. This situation may occur if the interaction or class does not specify a routing space or dimension in the FOM. It can also happen if the subscribeMode is configured as SubscribeRegionsAreSpecified, but some classes or attributes are left unspecified. By default, the Logger subscribes to these interaction classes and object class attributes without using a region association (in effect a global subscription). Disable this parameter if the Logger should only subscribe when a region association can be used. Default: true.

Configuring DDM in lgrConfig.xml

The following is an example of configuring DDM in the Logger configuration file:

<defaults>
*
*
*
   <var name="playbackModeString" type="string" value="PlaybackRegionsUseConveyedExtents"/>
   <!-- <var name="playbackModeString" type="string" value="PlaybackRegionUsesData"/> -->
   <var name="subscribeModeString" type="string" value="SubscribeRegionsAreGlobal"/>
   <!-- <var name="subscribeModeString" type="string" value="SubscribeRegionsAreSpecified"/> -->
   <var name="True" type="bool" value="true"/>
   <var name="False" type="bool" value="false"/>
</defaults>

<commands name="startup">
*
*
*
   <command domain="Simulation" protocol="HLA 13" command="SetDdmParameters">
   <param name="enableDdm" var="False"></param>
   <param name="playbackMode" var="playbackModeString"></param>
   <param name="subscribeMode" var="subscribeModeString"></param>
   <param name="playbackDynamicAssociation" var="True"></param>
   <param name="playbackDynamicExtents" var="False"></param>
   <param name="allowPlaybackWithouRegions" var="True"></param>
   <param name="recordConveyedRegions" var="True"></param>
   <param name="requestUpdates" var="True"></param>
   <param name="subscribeUnspecifiedAttributes" var="True"></param>
   </command>
</commands>

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com