![]() |
VR-Link API Documentation for DIS
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 #pragma once 00006 #if DtHLA 00007 00008 #include <vl/fomMapper.h> 00009 #include "myEsr.h" 00010 #include "myFireInter.h" 00011 00012 // This function registers new encoding, decoding, and checking functions with 00013 // a FOM Mapper for the new attribute of the "BaseEntity" object class called 00014 // "Mass". It also registers encoding and decoding functions for a new 00015 // parameter of the "WeaponFire" interaction class called "Temperature". 00016 void configFomMapper(DtFomMapper* mapper); 00017 00018 // The encoding, decoding and checking functions that configFomMapper 00019 // registers: 00020 00021 // Encoding function to be used for the "Temperature" parameter. 00022 void encodeTemperature(const MyFireInteraction& fire, 00023 RTI::ParameterHandleValuePairSet* pvList, 00024 RTI::ParameterHandle handle); 00025 00026 // Decoding function to be used for the "Temperature" parameter. 00027 void decodeTemperature(MyFireInteraction* fire, 00028 const RTI::ParameterHandleValuePairSet& pvlist, 00029 int pairSetIndex); 00030 00031 // Encoding function to be used for the "Mass" attribute. 00032 void encodeMass(const MyEntityStateRep& stateRep, 00033 RTI::AttributeHandleValuePairSet* avList, 00034 RTI::AttributeHandle handle); 00035 00036 // Decoding function to be used for the "Mass" attribute. 00037 void decodeMass(MyEntityStateRep* stateRep, 00038 const RTI::AttributeHandleValuePairSet& avlist, 00039 int pairSetIndex); 00040 00041 // Checking function to be used for the "Mass" attribute (checks whether 00042 // update condition has been met). 00043 bool needMass( 00044 const MyEntityStateRep& stateRep, 00045 const MyEntityStateRep& asSeenByRemote); 00046 00047 #endif 00048