VR-Exchange 2.7 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pDamageAssessmentInter.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pInteraction.h>
13 #include <vlpi/articulatedPartCollection.h>
14 #include <vlutil/vlNetTypes.h>
15 #include <vlutil/vlString.h>
16 #include <matrix/vlVector.h>
17 
18 namespace MAKVrExchange
19 {
20 
21  class DtPortalConnection;
22 
25  //
29  : public DtPortalInteraction
30  {
31  public:
32 
33  typedef void (*DtPortalDamageAssessmentInteractionCb) (
34  const DtPortalDamageAssessmentInteraction& inter, void* usr );
35 
38 
41 
43  static void addCallback( DtPortalConnection* conn,
44  DtPortalDamageAssessmentInteractionCb cb, void* usr );
45 
47  static void removeCallback( DtPortalConnection* conn,
48  DtPortalDamageAssessmentInteractionCb cb, void* usr );
49 
52 
54  DtDEC_ATTRIBUTE(DtU32, DamageResultReason, damageResultReason);
55 
57  DtDEC_ATTRIBUTE(DtU32, ComputedDamageResult, computedDamageResult);
58 
60  DtDEC_ATTRIBUTE(DtString, MissionID, missionID);
61 
64  DtDEC_ATTRIBUTE(DtU32, DamageCode, damageCode);
65 
67  DtDEC_ATTRIBUTE(DtU8, RepairLevel, repairLevel);
68 
70  DtDEC_ATTRIBUTE(DtU32, RepairTime, repairTime);
71 
73  // size is DamageCount
74  DtDEC_ATTRIBUTE(std::vector<DtU16>, DamageMethod, damageMethod);
75 
77  DtDEC_ATTRIBUTE(DtU32, NewDamageState, newDamageState);
78 
80  DtDEC_ATTRIBUTE(DtU16, DamageCount, damageCount);
81 
84  DtDEC_ATTRIBUTE(DtString, EventIdentifier, eventIdentifier);
85 
87  DtDEC_ATTRIBUTE(DtU32, PreviousDamageState, previousDamageState);
88 
90  DtDEC_ATTRIBUTE(DtString, ReportingObjectIdentifier, reportingObjectIdentifier);
91 
93  DtDEC_ATTRIBUTE(DtEntityType, MunitionType, munitionType);
94 
96  DtDEC_ATTRIBUTE(DtU16, QuantityFired, quantityFired);
97 
99  DtDEC_ATTRIBUTE(DtFloat32, PercentEquipmentLost, percentEquipmentLost);
100 
102  DtDEC_ATTRIBUTE(DtSilentEntityArray, EquipmentLost, equipmentLost);
103 
105 
107  public:
108 
110 
111  static DtPortalMessage* create();
112 
113  virtual unsigned int netSize() const;
114  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
115  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
116 
117  virtual std::ostream& printDataToStream( std::ostream& str ) const;
118 
119  };
120 
121 
123  {
125  }
126 
127 }
Represents a battle damage assessment event.
Definition: pDamageAssessmentInter.h:28
std::vector< DtSilentEntity > DtSilentEntityArray
Definition: aggregateTypes.h:132
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
#define DtDEC_ATTRIBUTE(T, N, n)
A Macro to define an attribute; as well as make an accessor and mutator for that attribute.
Definition: addAttribute.h:49
The base class for all messages passed through the portal.
Definition: pMessage.h:65
Contains the DtPortalInteraction class declaration.
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
static DtPortalMessage * create()
Definition: pDamageAssessmentInter.h:122
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23
static const DtPortalMessageKind theKind
NOTE: DtDEC_ATTRIBUTE resets the access specifier to protected.
Definition: pDamageAssessmentInter.h:109

Document ID: Generated on Mon Apr 19 15:55:22 EDT 2021 from SVN revision 227909
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)