KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SensorEmitterAppearance.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  class: SensorEmitterAppearance
32  created: 08/08/2012
33  author: Karl Jones
34 
35  purpose: Represents the appearance of a sensor/emitter.
36  Implemented as struct so as to prevent the size from
37  changing due to RTTI etc. This struct will be part of a
38  union with all appearance values so it is implemented
39  slightly different.
40  No constructors to prevent C2620 error caused by union of
41  classes/structs.
42  size: 32 Bits / 4 Octet
43 *********************************************************************/
44 
45 #pragma once
46 
47 #include "./../KDefines.h"
48 #include "./Enums/KDISEnums.h"
49 
50 namespace KDIS {
51 namespace DATA_TYPE {
52 
54 {
55 protected:
56  // Bits
57  KUINT32 m_PaintScheme : 1; // 0
58  KUINT32 m_MobilityKill : 1; // 1
59  KUINT32 m_Mission : 1; // 2
60  KUINT32 m_Damage : 2; // 3-4
61  KUINT32 m_Smoke : 2; // 5-6
62  KUINT32 m_TrailingEffect : 2; // 7-8
63  KUINT32 m_Unused1 : 3; // 9-11
64  KUINT32 m_Lights : 1; // 12
65  KUINT32 m_Unused2 : 2; // 13-14
66  KUINT32 m_FlamingEffectField : 1; // 15
67  KUINT32 m_Antenna : 1; // 16
68  KUINT32 m_Camouflage : 2; // 17-18
69  KUINT32 m_Concealed : 1; // 19
70  KUINT32 m_Unused : 1; // 20 Unused
71  KUINT32 m_FrozenStatus : 1; // 21
72  KUINT32 m_PowerPlantStatus : 1; // 22
73  KUINT32 m_State : 1; // 23
74  KUINT32 m_Tent : 1; // 24
75  KUINT32 m_Unused3 : 1; // 25
76  KUINT32 m_BlackoutLights : 1; // 26
77  KUINT32 m_Unused4 : 2; // 27-28
78  KUINT32 m_InteriorLights : 1; // 29
79  KUINT32 m_Unused5 : 2; // 30-31
80 
81 public:
82 
83  //************************************
84  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityPaintScheme
85  // KDIS::DATA_TYPE::SensorEmitterAppearance::GetEntityPaintScheme
86  //!Description: Describes the paint scheme of an entity.
87  // Parameter: EntityPaintScheme EPS
88  //************************************
89  void SetEntityPaintScheme( KDIS::DATA_TYPE::ENUMS::EntityPaintScheme EPS );
90  KDIS::DATA_TYPE::ENUMS::EntityPaintScheme GetEntityPaintScheme() const;
91 
92  //************************************
93  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityMobilityKill
94  // KDIS::DATA_TYPE::SensorEmitterAppearance::DoesEntityMobilityKill
95  //!Description: Mobility Kill True/False?
96  // Parameter: KBOOL MK
97  //************************************
98  void SetEntityMobilityKill( KBOOL MK );
99  KBOOL DoesEntityMobilityKill() const;
100 
101  //************************************
102  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetMissionKill
103  // KDIS::DATA_TYPE::SensorEmitterAppearance::HasMissionKill
104  //!Description: Describes characteristics of mission kill (e.g. damaged antenna).
105  // False - No mission kill
106  //! True - Mission kill
107  // Parameter: KBOOL MK
108  //************************************
109  void SetMissionKill( KBOOL MK );
110  KBOOL HasMissionKill() const;
111 
112  //************************************
113  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityDamage
114  // KDIS::DATA_TYPE::SensorEmitterAppearance::GetEntityDamage
115  //!Description: Entity Damage State
116  // Parameter: EntityDamage ED
117  //************************************
118  void SetEntityDamage( KDIS::DATA_TYPE::ENUMS::EntityDamage ED );
119  KDIS::DATA_TYPE::ENUMS::EntityDamage GetEntityDamage() const;
120 
121  //************************************
122  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntitySmoke,
123  // KDIS::DATA_TYPE::SensorEmitterAppearance::GetEntitySmoke
124  //!Description: Entity Smoke State
125  // Parameter: EntitySmoke ES
126  //************************************
127  void SetEntitySmoke( KDIS::DATA_TYPE::ENUMS::EntitySmoke ES );
128  KDIS::DATA_TYPE::ENUMS::EntitySmoke GetEntitySmoke() const;
129 
130  //************************************
131  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityTrailingEffect
132  // KDIS::DATA_TYPE::SensorEmitterAppearance::GetEntityTrailingEffect
133  //!Description: Describes the size of the dust cloud/trailing effect.
134  // Parameter: EntityTrailingEffect ETE
135  //************************************
136  void SetEntityTrailingEffect( KDIS::DATA_TYPE::ENUMS::EntityTrailingEffect ETE );
137  KDIS::DATA_TYPE::ENUMS::EntityTrailingEffect GetEntityTrailingEffect() const;
138 
139  //************************************
140  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityHeadLights
141  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityHeadLightsOn
142  //!Description: Are the vehicles head lights turned on? True = On, False = Off.
143  // Parameter: KBOOL HL
144  //************************************
145  void SetEntityHeadLights( KBOOL HL );
146  KBOOL IsEntityHeadLightsOn() const;
147 
148  //************************************
149  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SeLights
150  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsLightsOn
151  //!Description: Are the sensors lights turned on? True = On, False = Off.
152  // Parameter: KBOOL L
153  //************************************
154  void SeLights( KBOOL L );
155  KBOOL IsLightsOn() const;
156 
157  //************************************
158  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityFlamingEffect
159  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityFlaming
160  //!Description: Are flames rising from the entity?
161  // Parameter: KBOOL EFE
162  //************************************
163  void SetEntityFlamingEffect( KBOOL EFE );
164  KBOOL IsEntityFlaming() const;
165 
166  //************************************
167  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetAntennaRaised
168  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsAntennaRaised
169  //!Description: Sensor antenna raised status. False = Not Raised, True = Raised.
170  // Parameter: KBOOL EL
171  //************************************
172  void SetAntennaRaised( KBOOL AR );
173  KBOOL IsAntennaRaised() const;
174 
175  //************************************
176  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityCamouflage
177  // KDIS::DATA_TYPE::SensorEmitterAppearance::GetEntityCamouflage
178  //!Description: Camouflage type worn.
179  // Parameter: EntityCamouflage EC
180  //************************************
181  void SetEntityCamouflage( KDIS::DATA_TYPE::ENUMS::EntityCamouflage EC );
182  KDIS::DATA_TYPE::ENUMS::EntityCamouflage GetEntityCamouflage() const;
183 
184  //************************************
185  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityConcealed
186  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityConcealed
187  //!Description: Is the entity concealed?
188  //! False = Not concealed. True = Entity in a prepared concealed
189  //! position (with netting, etc.)
190  // Parameter: KBOOL EC
191  //************************************
192  void SetEntityConcealed( KBOOL EC );
193  KBOOL IsEntityConcealed() const;
194 
195  //************************************
196  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityFrozenStatus
197  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityFrozen
198  //!Description: Is the entity frozen?
199  //! Note: Frozen entities should not be dead-reckoned, they should remain
200  //! frozen in place. You would likely freeze entites when your application is
201  //! in a paused state.
202  // Parameter: KBOOL EFS
203  //************************************
204  void SetEntityFrozenStatus( KBOOL EFS );
205  KBOOL IsEntityFrozen() const;
206 
207  //************************************
208  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityPowerPlantOn
209  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityPowerPlantOn
210  //!Description: Power Plant On/Off. True = On, False = Off.
211  // Parameter: KBOOL EPPS
212  //************************************
213  void SetEntityPowerPlantOn( KBOOL EPPS );
214  KBOOL IsEntityPowerPlantOn() const;
215 
216  //************************************
217  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityStateActive
218  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityStateActive
219  //!Description: True = Active, False = Deactivated.
220  // Parameter: KBOOL ES
221  //************************************
222  void SetEntityStateActive( KBOOL ES );
223  KBOOL IsEntityStateActive() const;
224 
225  //************************************
226  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityTentExtended
227  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityTentExtended
228  //!Description: Tent status. True = Not extended, False = Extended.
229  // Parameter: KBOOL ET
230  //************************************
231  void SetEntityTentExtended( KBOOL ET );
232  KBOOL IsEntityTentExtended() const;
233 
234  //************************************
235  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityBlackoutLights
236  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityBlackoutLightsOn
237  //!Description: Are the vehicles blackout lights turned on? True = On, False = Off.
238  // Parameter: KBOOL BL
239  //************************************
240  void SetEntityBlackoutLights( KBOOL BL );
241  KBOOL IsEntityBlackoutLightsOn() const;
242 
243  //************************************
244  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityBlackoutBrakeLights
245  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityBlackoutBrakeLightsOn
246  //!Description: Are the vehicles blackout brake lights turned on? True = On, False = Off.
247  // Parameter: KBOOL BBL
248  //************************************
249  void SetEntityBlackoutBrakeLights( KBOOL BBL );
250  KBOOL IsEntityBlackoutBrakeLightsOn() const;
251 
252  //************************************
253  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::SetEntityInteriorLights
254  // KDIS::DATA_TYPE::SensorEmitterAppearance::IsEntityInteriorLightsOn
255  //!Description: Are the vehicles interior lights turned on? True = On, False = Off.
256  // Parameter: KBOOL IL
257  //************************************
258  void SetEntityInteriorLights( KBOOL IL );
259  KBOOL IsEntityInteriorLightsOn() const;
260 
261  //************************************
262  // FullName: KDIS::DATA_TYPE::SensorEmitterAppearance::GetAsString
263  //!Description: Returns a string representation
264  //************************************
265  KString GetAsString() const;
266 
267  KBOOL operator == ( const SensorEmitterAppearance & Value ) const;
268  KBOOL operator != ( const SensorEmitterAppearance & Value ) const;
269 };
270 
271 } // END namespace DATA_TYPES
272 } // END namespace KDIS
273 
unsigned int KUINT32
Definition: KDefines.h:103
EntityTrailingEffect
Definition: EnumEntityInfoInteraction.h:667
EntityPaintScheme
Definition: EnumEntityInfoInteraction.h:630
EntityCamouflage
Definition: EnumEntityInfoInteraction.h:722
EntityDamage
Definition: EnumEntityInfoInteraction.h:641
EntitySmoke
Definition: EnumEntityInfoInteraction.h:654
Definition: SensorEmitterAppearance.h:53
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82