open-dis-cpp
DirectedEnergyDamage.h
1 #pragma once
2 
3 #include <dis7/Vector3Float.h>
4 #include <dis7/EventIdentifier.h>
5 #include <dis7/utils/DataStream.h>
6 #include <dis7/opendis7_export.h>
7 
8 
9 namespace DIS
10 {
11 // Damage sustained by an entity due to directed energy. Location of the damage based on a relative x,y,z location from the center of the entity. Section 6.2.17.2
12 
13 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
14 //
15 // @author DMcG, jkg
16 
17 class OPENDIS7_EXPORT DirectedEnergyDamage
18 {
19 protected:
21  unsigned int _recordType;
22 
24  unsigned short _recordLength;
25 
27  unsigned short _padding;
28 
31 
34 
36  float _temperature;
37 
39  unsigned char _componentIdentification;
40 
42  unsigned char _componentDamageStatus;
43 
46 
49 
52 
54  unsigned short _padding2;
55 
56 
57  public:
59  virtual ~DirectedEnergyDamage();
60 
61  virtual void marshal(DataStream& dataStream) const;
62  virtual void unmarshal(DataStream& dataStream);
63 
64  unsigned int getRecordType() const;
65  void setRecordType(unsigned int pX);
66 
67  unsigned short getRecordLength() const;
68  void setRecordLength(unsigned short pX);
69 
70  unsigned short getPadding() const;
71  void setPadding(unsigned short pX);
72 
73  Vector3Float& getDamageLocation();
74  const Vector3Float& getDamageLocation() const;
75  void setDamageLocation(const Vector3Float &pX);
76 
77  float getDamageDiameter() const;
78  void setDamageDiameter(float pX);
79 
80  float getTemperature() const;
81  void setTemperature(float pX);
82 
83  unsigned char getComponentIdentification() const;
84  void setComponentIdentification(unsigned char pX);
85 
86  unsigned char getComponentDamageStatus() const;
87  void setComponentDamageStatus(unsigned char pX);
88 
89  unsigned char getComponentVisualDamageStatus() const;
90  void setComponentVisualDamageStatus(unsigned char pX);
91 
92  unsigned char getComponentVisualSmokeColor() const;
93  void setComponentVisualSmokeColor(unsigned char pX);
94 
95  EventIdentifier& getFireEventID();
96  const EventIdentifier& getFireEventID() const;
97  void setFireEventID(const EventIdentifier &pX);
98 
99  unsigned short getPadding2() const;
100  void setPadding2(unsigned short pX);
101 
102 
103 virtual int getMarshalledSize() const;
104 
105  bool operator ==(const DirectedEnergyDamage& rhs) const;
106 };
107 }
108 
109 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
110 // Redistribution and use in source and binary forms, with or without
111 // modification, are permitted provided that the following conditions
112 // are met:
113 //
114 // * Redistributions of source code must retain the above copyright
115 // notice, this list of conditions and the following disclaimer.
116 // * Redistributions in binary form must reproduce the above copyright
117 // notice, this list of conditions and the following disclaimer
118 // in the documentation and/or other materials provided with the
119 // distribution.
120 // * Neither the names of the Naval Postgraduate School (NPS)
121 // Modeling Virtual Environments and Simulation (MOVES) Institute
122 // (http://www.nps.edu and http://www.MovesInstitute.org)
123 // nor the names of its contributors may be used to endorse or
124 // promote products derived from this software without specific
125 // prior written permission.
126 //
127 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
128 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
129 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
130 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
131 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
132 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
133 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
134 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
135 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
136 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
137 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
138 // POSSIBILITY OF SUCH DAMAGE.
unsigned short _padding
padding.
Definition: DirectedEnergyDamage.h:27
unsigned int _recordType
DE Record Type.
Definition: DirectedEnergyDamage.h:21
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
float _temperature
average temp of the damaged area, in degrees celsius.
Definition: DirectedEnergyDamage.h:36
unsigned char _componentVisualSmokeColor
enumeration
Definition: DirectedEnergyDamage.h:48
a class to support managing a network buffer.
Definition: DataStream.h:28
Vector3Float _damageLocation
location of damage, relative to center of entity
Definition: DirectedEnergyDamage.h:30
unsigned short _padding2
padding
Definition: DirectedEnergyDamage.h:54
unsigned char _componentIdentification
enumeration
Definition: DirectedEnergyDamage.h:39
unsigned char _componentVisualDamageStatus
enumeration
Definition: DirectedEnergyDamage.h:45
Definition: DirectedEnergyDamage.h:17
Definition: Vector3Float.h:15
Definition: EventIdentifier.h:16
float _damageDiameter
Size of damaged area, in meters.
Definition: DirectedEnergyDamage.h:33
EventIdentifier _fireEventID
For any component damage resulting this field shall be set to the fire event ID from that PDU...
Definition: DirectedEnergyDamage.h:51
unsigned char _componentDamageStatus
enumeration
Definition: DirectedEnergyDamage.h:42
unsigned short _recordLength
DE Record Length (bytes).
Definition: DirectedEnergyDamage.h:24