Preparing a Riverbed Federate Using a Mapping File
When using the DMSO RTI 1.3, you can avoid the need to create a C++ class for your Federate Ambassador. Instead, you can define the interactions between the Riverbed federate and the federation by creating a text-based class mapping file.
Using this approach, the Riverbed federate contains some additional elements not needed by the typical (code-based) case:
- A set of Modeler packet formats used to represent interactions handled or generated by the federate.
- A class mapping file specifying translation between:
- FOM (Federation Object Model) object classes and Modeler object types
- FOM class attributes and Modeler object attributes
- FOM interactions and Modeler packet formats
- FOM parameters and Modeler packet fields
The HLA interface node in this approach uses the “HLA_Interface” node model, which contains the “hla13_cosim_compat” process model (the HLA-PM). Together, they contain a complete factory function and Federate Ambassador that provide backward compatibility with High-Level Architecture releases prior to 14.5.
When using the mapping file approach, the HLA interface node has a somewhat different purpose than when used to provide a Federate Ambassador. Here, the main functions of the HLA interface node are
- Mapping the correspondence between HLA objects and Modeler simulation elements.
- Managing the naming conversion between HLA and Modeler object attributes, and applying or generating appropriate attribute updates.
- Receiving HLA interactions, converting the interactions to Modeler packets, then delivering the packets to the appropriate Modeler process models.
- Allowing Modeler’s simulations to send HLA interactions to other federates.
When used with a mapping file, the HLA interface node is not responsible for:
- Generating the federate’s SOM file, the federation’s FOM file, or the related .
fedfile. You must prepare these files yourself. - Creating the Modeler network model and the process models that implement the federate’s actions and SOM-specified behavior. You must create these models yourself.
- Defining the packet data structures Modeler uses to represent interactions. You must define these packets yourself.
- Performing the computation triggered by the reception of an interaction. The computation is performed by the destination process model (the model that ultimately receives the interaction). The interaction has, by then, been converted to an Modeler packet.
Although the mapping file approach can simplify the process of preparing a Riverbed federate—by reducing the amount and complexity of code that must be developed—it is very inefficient. HLA interactions are transferred between the HLA interface node and the simulation nodes by converting to and from packets, a time-consuming process that can slow down the simulation significantly. Whenever possible, you should use the approach described in “Preparing a Riverbed Federate Using Code” on page 15.