VR-Link API Documentation for DIS
7.1 - Introduction to the Code Generator

Table of Contents

The VR-Link Code Generator is a tool that can help you extend VR-Link to handle HLA objects and interactions that are not part of its internal object model, that is, objects that are not part of the RPR FOM.

You would do this if you want to use a FOM that is so dissimilar from the RPR FOM that creating a FOM Mapper would not be a sensible option.

Note
The VR-Link Code generator produces code for HLA. It does not extend the protocol-independent API.

VR-Link provides a rich set of objects and interactions to represent simulated data. Implementations of these built-in objects and interactions are provided for DIS and HLA. VR-Link's FOM-agile design means applications written using the built-in object and interaction set can work with different FOM variations, as long as the FOM supports objects and interactions similar to those built into VR-Link. Application developers should always try to use the built-in object set in order to effectively leverage the protocol-independent API. However, there are times when you need an expanded set of objects and interactions. When you need an expanded object set or a completely new object set, you can write the new classes by hand, as described in the FOM agility examples in the VR-Link class documentation, or you can generate them with the VR-Link Code Generator.

When you extend VR-Link, you make several tradeoffs. You now have a much richer set of objects and interactions to work with, however by using these objects and interactions you lose your ability to easily recompile the code to support a new protocol. You do not lose FOM-agility. You can create a FOM Mapper for this new object and interaction set.

The VR-Link Code Generator generates classes based on a FOM definition file (OMT or XML). It produces C++ code, along with a project file or Makefile. You can use this code to build a dynamic library, which you can then build into application code.

The classes generated know which object or interaction they correspond to, so no extra FOM mapping needs to be done. FOM mapping is taken care of inside the generated code. In other words, if you extend VR-Link using the VR-Link Code Generator, you do not have to create separate FOM Mappers.

7.1.1 Code Generator Limitations

The VR-Link Code Generator is designed to assist customers with the extension of VR-Link for HLA (and in an experimental capacity for DIS). FOMs are frequently complex. They may contain many complex data types, and often have object definitions that computers cannot interpret. In many circumstances the Code Generator will not be able to fully generate the code required to extend VR-Link for your FOM. In such cases the Code Generator will produce mostly complete extensions, which require minor hand editing. However, it is possible to produce a FOM that is so complex that major hand editing is required.

MAK wishes to make our Code Generator as complete as possible, however we expect that most FOMs will not fully generate out-of-the-box. We believe that, on average, over 90% of the work will be done automatically with a few attributes requiring hand editing. MAK is committed to improving the Code Generator. If you discover issues with your FOM and would like us to take a look, we would be happy to examine your FOM and provide advice as part of standard support. However, we cannot promise that we can fix all problems, or provide code for incomplete encoders and decoders. Solutions will be provided on a case-by-case basis. Please contact suppo.nosp@m.rt@m.nosp@m.ak.co.nosp@m.m for further details.

7.1.2 Installing the VR-Link Code Generator

The VR-Link Code Generator is installed as part of the VR-Link package in ./bin.

[Home] [Top of Page] [Starting the VR-Link Code Generator >>]


Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)