MAK RTIspy API Documentation for HLA 1.3
The simpleDDM Example

The simpleDDM example is an adaptation of the rtisimple example program that incorporates DDM. (For a definition of DDM, please see "Data Distribution Management," on page 3-4. For details about how the MAK RTI implements DDM, please see Chapter 10, Data Distribution Management.) It performs the same typical federation calls as rtisimple (join, create, and so on) with the exception that when an object is registered, it is done so "with Region."

Implementation Details

The example has an object attribute and an interaction that is published and subscribed with region. To see the effects and features of the example, you must create two federates. One federate must be a publisher (-isPublisher 1) and the other a subscriber (-isPublisher 0). The regions in the example are conceptualized in one dimension as seconds along a 12 hour axis (ranging from 0 seconds to 43200) and in another dimension as a global time zone.

The published object represents the current time of the publisher and the published interaction represents an hourly chime. One chime (quarterlyChime) occurs at 12, 3, 6 and 9 o'clock; another chime occurs at the other hours. The timeZone dimension ranges from 0 to 23. It represents the different time zones around the world. It can only be changed in the publisher on the command line (-timeZone time_zone.) The subscriber GUI lets you change it dynamically.

The GUI displays clock hands, which for the publishing federate show the current time, and for the subscribing federate show the last reflected position of the publisher. (The subscriber's hands are not displayed prior to object discovery.) The GUI displays (as an arced segment around the dial) the region in the seconds dimension. It also displays a horizontal timeline at the bottom of the dial representing the 12 hour extent, a horizontal line representing the subscribed region, and the current position or last reflected position.

Compiling the simpleDDM Example

The example includes project and workspace files for Windows and makefiles for UNIX.

Windows

The project solution is in ./examples/simpleDDM/mkwin32/. The files used by GUIDLL.vcproj are specific to the GUI and require Qt. The format of the solution file and project files (.vcproj) corresponds to the compiler version of the installed RTI package. Open the solution file in your development environment and build the targets. The example includes project and source files for the visualization segment. If you want to change the visualization segment of the example and you have a developer’s license for QT, set the QTDIR environment variable to the appropriate version of Qt, as specified in the MAK RTI Release Notes, and you should be able to do so.

The binaries built by the simpleDDMGUI project are simpleDDMGUI13(d).exe, simpleDDMGUI1516(d).exe, and GUIdll.dll (where "d" is appended to the base name to designate debug version).

UNIX

To compile the simpleDDM example, in the ./src directory, enter:

make install

To exclude compilation of HLA1_3 you can enter:

make NO_HLA13=1 && make install NO_HLA13=1

To exclude compilation of HLA1516, enter:

make NO_HLA1516=1 && make install NO_HLA1516=1

This makes the binary and, if it is successful, copies the binary to ../bin. The example includes the sources for the visualization segment. If you want to change the visualization segment of the example, you must have a developer’s license for QT, and have the QTDIR environment variable set to the appropriate version of Qt, as specified in the MAK RTI Release Notes. The make system will automatically rebuild the visualization segment of the project.

Running the simpleDDM Example

After you build the simpleDDM example, the executables are in the example's bin directory. It also has the FED and FDD file used to create the federation execution and a version of rid.mtl that enables RTI_dataDistMgmt and RTI_useRtiExec. The following command lines generate a useful example:

simpleDDMGUI13.exe -isPublisher 1 -increment 10 -multiplier 10 -range 50

This creates a publishing federate. It increments 10 seconds at a time with a range of 50 seconds.

simpleDDMGUI13.exe -minSubscribeH 2 -maxSubscribeH 4

This creates a subscribing federate (the default when -isPublisher is not specified). Its region is between 2 and 4 hours on the displayed clock. It does not display clock hands until the publisher's region intersects the subscriber's region. You cannot change the seconds dimension of the subscriber after you start. However, you can change the time zone. If the subscriber's time zone does not match the publisher's, no attributes are received.

You can close the GUI and continue to receive updates through the console. You cannot restart the GUI without shutting down the federate and restarting it.

A readme file in the example directory contains more details about the functioning of the example.

simpleDDM Command Line Options

Command line parameters specify the behavior of the federate as follows:

-fedFile filename specifies the FED file. The default for HLA 1.3 is MAKSimpleDDM.fed; for HLA 1516 the default is MAKSimpleDDM.xml.

Subscriber Parameters
Note:
Simple DDM uses just one extent and dimension.
Display Options

Source Code

The simpleDDM code:



Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)