Sample Wrappers

This page describes the sample wrappers provided with the EODiSP environment. In the EODiSP, wrappers are used to transform generic simulation packages into HLA-compliant federates. The wrappers presented in this page cover some typical cases of simulation packages that users might want to integrate with the EODiSP.

All the sample wrappers described in this page are integrated in and are used for the EarthCARE Simulator which was developed as a demonstrator for the EODiSP. The wrapper code can be accessed from the download page of the EarthCARE Simulator web site.

Contents

Excel Spreadsheet Wrapper

The sim_controller federate of the EarthCARE Simulator provides an example of a wrapper for an excel spreadsheet. The excel spreadsheet serves two purposes:

  • It acts as a centralized repository for the configuration parameters for the simulation models and it allows the user to inspect and update the values of these parameters.
  • It provides an interface through which the status of a simulation can be displayed and controlled.

This wrapper illustrates how excel cells can be mapped to HLA attributes and how the execution of excel macros can be commanded through the HLA interface.

The excel spreadsheet is accessed as a COM object. This sample wrapper therefore also serves as a template of how COM objects can be wrapped as HLA federates and included in EODiSP simulations. The wrapper is built around a Java-COM bridge (recall that the EODiSP infrastructure is implemented in Java). The wrapper uses the Java-COM bridge implementation provided with the Standard Widget Toolkit of the Eclipse platform.

Source Code Wrapper

The orbit_propagator federate of the EarthCARE Simulator provides an example of a wrapper for a model implemented as source code. More specifically, the model is represented by a simple Java class and the wrapper maps the properties of this class to HLA attributes.

The EODiSP infrastructure is implemented in Java. The fact that the model is implemented in Java therefore simplifies its interface to the EODiSP infrastructure. If the model were implemented in some other language, then it should first be wrapped as a Java class and should then be integrated with the EODiSP as a Java class.

Binary Executable Wrapper

The lid_filter federate of the EarthCARE Simulator provides an example of a wrapper for a model implemented as a binary executable. This executable interfaces with its environment exclusively through input and output files. The wrapper illustrates how file-based input and output data can be handled through an HLA interface. Several approaches are possible.

In a first approach, input and output files are handled as streams of bytes. Since the HLA does not directly support data streams, each file is mapped to an HLA attribute of type 'array of bytes'. In order to handle files of very large size, the stream is broken up into chunks of fixed size that are transmitted in sequence.

An alternative approach for handling input and output files through the HLA would be to see the file as a URL. In this case, the HLA attribute to which the file is mapped is simply a string that holds the file's URL. This approach is not implemented in the sample wrapper.

The third approach is useful when the file contains a list of parameters. This is typically the case of initialization files that define the configuration parameters for an executable program. In this case, the individual parameters are mapped to HLA attributes and the wrapper is responsible for serializing them to a file or for reading them from a file.

The execution of the program implementing the model is controlled by the wrapper. The wrapper encodes the logic that determines when the program execution should be triggered.