数据交互是HLA实现分布式仿真系统互操作的一个重要方面,正确的数据编码方法是联邦成员之间实现互操作能力,提高联邦集成效率的有效保障手段之一。首先在HLA1516 OMT规范的基础上,研究了规范定义的数据编码标准,分析了数据的分类、编码影响要素和预定义的编码方法;接着在此基础上提出了一种通用的数据编码方法(GDEM),不仅针对规范所描述的各种预定义的编码规则提出了相应的实现方法,而且还提供自定义的编码接口便于使用者的扩展,并通过该接口支持了HLA1.3数据编码的兼容;最后在应用上,与Encoding Helpers API方法和DTEL API方法相比,GDEM API方法在数据类型的声明、使用、语法表达和类型转换等方面,更为简单和易用。
Data interaction is one of key roles for HLA to implement the interoperability of distributed simulations.Correct data encoding in accordance with federation agreements is critical to successful interoperability between federates and to the improvement of federation integrations.Firstly,based on the HLA1516 OMT specification,the standard data encoding with the categorical data,data encoding effects and predefined encoding methods was studied.Secondly,a Generically Data Encoding Method(GDEM) was proposed,which implemented all predefined data encoding described by HLA1516 OMT specification and provided the custom encoding interfaces for users to support the compatibility of HLA1.3 data encoding.Finally,compared with the Encoding Helpers API and the DTEL API,it has proved that GDEM API gives simplicity and convenience in the application,including data declaration,usage and syntax description,type safety and so on.