VR-Exchange 2.2 API Documentation
pDamageAssessmentInter.h
Go to the documentation of this file.
1 /*********************************************************************
2  ** Copyright (c) 1992-2010 VT MAK
3  ** All rights reserved.
4  *********************************************************************/
5 
6 #pragma once
7 
11 
12 
14 #include <vlutil/vlString.h>
15 #include <vlutil/vlNetTypes.h>
16 #include <matrix/vlVector.h>
17 #include <vlpi/articulatedPartCollection.h>
18 
19 
20 namespace MAKVrExchange {
21 
22 class DtPortalConnection;
23 
26 //
30 {
31 public:
32 
33  typedef void (*DtPortalDamageAssessmentInteractionCb)
34  (const DtPortalDamageAssessmentInteraction &inter, void *usr);
35 
36 public:
37 
40 
43 
46 
48  //
49  DtDEC_ATTRIBUTE(DtU32, DamageResultReason, damageResultReason);
50  // <dataType>DamageReasonEnum32</dataType>
51 
53  //
54  DtDEC_ATTRIBUTE(DtU32, ComputedDamageResult, computedDamageResult);
55  // <dataType>DISDamageStatusEnum32</dataType>
56 
58  //
59  DtDEC_ATTRIBUTE(DtString, MissionID, missionID);
60  // <dataType>NullTerminatedASCIIString</dataType>
61 
64  //
65  DtDEC_ATTRIBUTE(DtU32, DamageCode, damageCode);
66  // <dataType>Integer32</dataType>
67 
69  //
70  DtDEC_ATTRIBUTE(DtU8, RepairLevel, repairLevel);
71  // <dataType>RepairLevelEnum8</dataType>
72 
74  //
75  DtDEC_ATTRIBUTE(DtU32, RepairTime, repairTime);
76  // <dataType>Time_Minutes32</dataType>
77 
79  // size is DamageCount
80  //
81  DtDEC_ATTRIBUTE(std::vector<DtU16>, DamageMethod, damageMethod);
82  // <dataType>AttritionDamageEnum16Array</dataType>
83 
85  //
86  DtDEC_ATTRIBUTE(DtU32, NewDamageState, newDamageState);
87  // <dataType>DISDamageStatusEnum32</dataType>
88 
90  //
91  DtDEC_ATTRIBUTE(DtU16, DamageCount, damageCount);
92  // <dataType>UnsignedInteger16</dataType>
93 
96  //
97  DtDEC_ATTRIBUTE(DtString, EventIdentifier, eventIdentifier);
98  // <dataType>EventIdentifierStruct</dataType>
99 
101  //
102  DtDEC_ATTRIBUTE(DtU32, PreviousDamageState, previousDamageState);
103  // <dataType>DISDamageStatusEnum32</dataType>
104 
106  //
107  DtDEC_ATTRIBUTE(DtString, ReportingObjectIdentifier, reportingObjectIdentifier);
108  // <dataType>RTIObjectIdStruct</dataType>
109 
111  //
112  DtDEC_ATTRIBUTE(DtEntityType, MunitionType, munitionType);
113  // <dataType>EntityTypeStruct</dataType>
114 
116  //
117  DtDEC_ATTRIBUTE(DtU16, QuantityFired, quantityFired);
118  // <dataType>UnsignedInteger16</dataType>
119 
121  //
122  DtDEC_ATTRIBUTE(DtFloat32, PercentEquipmentLost, percentEquipmentLost);
123  // <dataType>Percent_Float32</dataType>
124 
126  //
127  DtDEC_ATTRIBUTE(DtSilentEntityArray, EquipmentLost, equipmentLost);
128  // <dataType>SilentEntityArray</dataType>
129 
131 
132 public:
133 
134  virtual DtPortalMessageKind kind() const;
135  virtual const char * interactionKindName() const { return "DamageAssessment"; }
136  virtual unsigned int netSize() const;
137  virtual void writeSelfToBuffer(void *buffer) const ;
138  virtual void readSelfFromBuffer(const void *buffer);
139  virtual std::ostream &printDataToStream(std::ostream &str) const;
140 
141 
142 
143 public:
144 
146 
147  static DtPortalMessage *create();
148 
149  static void addCallback(DtPortalConnection *conn,
150  DtPortalDamageAssessmentInteractionCb cb, void *usr);
151  static void removeCallback(DtPortalConnection *conn,
152  DtPortalDamageAssessmentInteractionCb cb, void *usr);
153 
154 };
155 }

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)