KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
COMBICState.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: COMBICState
32  created: 07:09:2009
33  author: Karl Jones
34 
35  purpose: COMBIC(Combined Obscuration Model for Battlefield Induced Contaminants).
36  This represents an area of airborne dust, smoke, and debris
37  that can reduce visual and infrared wavelengths.
38  size: 512 bits / 64 octets
39 *********************************************************************/
40 
41 #pragma once
42 
43 #include "./EnvironmentRecord.h"
44 #include "./EntityType.h"
45 #include "./EulerAngles.h"
46 
47 namespace KDIS {
48 namespace DATA_TYPE {
49 
51 {
52 protected:
53 
55 
57 
59 
61 
63 
65 
67 
69 
71 
73 
75 
77 
78 public:
79 
80  static const KUINT16 COMBIC_STATE_SIZE = 64;
81 
82  COMBICState();
83 
84  COMBICState( KDataStream & stream ) throw( KException );
85 
86  COMBICState( KUINT8 Index, KUINT32 TimeSinceCreation, const EntityType & MunitionSource,
87  KUINT32 NumberOfSources, KUINT16 GeometryIndex, KUINT32 SourceType,
88  KFLOAT32 BarrageRate, KFLOAT32 BarrageDuration, KFLOAT32 BarrageCrosswindLength,
89  KFLOAT32 BarrageDownwindLength, const EulerAngles & DetonationVelocity );
90 
91  virtual ~COMBICState();
92 
93  //************************************
94  // FullName: KDIS::DATA_TYPE::COMBICState::SetTimeSinceCreation
95  // KDIS::DATA_TYPE::COMBICState::GetLGetTimeSinceCreationocation
96  //!Description: The time elapsed since the COMBIC object was created.
97  // Parameter: KUINT32 TSC, void
98  //************************************
99  void SetTimeSinceCreation( KUINT32 TSC );
100  KUINT32 GetTimeSinceCreation() const;
101 
102  //************************************
103  // FullName: KDIS::DATA_TYPE::COMBICState::SetMunitionSource
104  // KDIS::DATA_TYPE::COMBICState::GetMunitionSource
105  //!Description: The source of the COMBIC object.
106  // Parameter: const EntityType & MS, void
107  //************************************
108  void SetMunitionSource( const EntityType & MS );
109  const EntityType GetMunitionSource() const;
110  EntityType GetMunitionSource();
111 
112  //************************************
113  // FullName: KDIS::DATA_TYPE::COMBICState::SetNumberOfSources
114  // KDIS::DATA_TYPE::COMBICState::GetNumberOfSources
115  //!Description: The number of sources that have created the COMBIC object.
116  // Parameter: KUINT32 NOS, void
117  //************************************
118  void SetNumberOfSources( KUINT32 NOS );
119  KUINT32 GetNumberOfSources() const;
120 
121  //************************************
122  // FullName: KDIS::DATA_TYPE::COMBICState::SetGeometryIndex
123  // KDIS::DATA_TYPE::COMBICState::GetGeometryIndex
124  //!Description: The geometry index.
125  // Parameter: KUINT16 GI, void
126  //************************************
127  void SetGeometryIndex( KUINT16 GI );
128  KUINT16 GetGeometryIndex() const;
129 
130  //************************************
131  // FullName: KDIS::DATA_TYPE::COMBICState::SetSourceType
132  // KDIS::DATA_TYPE::COMBICState::GetSourceType
133  //!Description: Source Type
134  // Parameter: KUINT32 ST, void
135  //************************************
136  void SetSourceType( KUINT32 ST );
137  KUINT32 GetSourceType() const;
138 
139  //************************************
140  // FullName: KDIS::DATA_TYPE::COMBICState::SetBarrageRate
141  // KDIS::DATA_TYPE::COMBICState::GetBarrageRate
142  //!Description: Barrage Rate
143  // Parameter: KFLOAT32 BR, void
144  //************************************
145  void SetBarrageRate( KFLOAT32 BR );
146  KFLOAT32 GetBarrageRate() const;
147 
148  //************************************
149  // FullName: KDIS::DATA_TYPE::COMBICState::SetBarrageDuration
150  // KDIS::DATA_TYPE::COMBICState::GetBarrageDuration
151  //!Description: Barrage Duration
152  // Parameter: KFLOAT32 BD, void
153  //************************************
154  void SetBarrageDuration( KFLOAT32 BD );
155  KFLOAT32 GetBarrageDuration() const;
156 
157  //************************************
158  // FullName: KDIS::DATA_TYPE::COMBICState::SetBarrageCrosswindLength
159  // KDIS::DATA_TYPE::COMBICState::GetBarrageCrosswindLength
160  //!Description: Barrage Crosswind Length
161  // Parameter: KFLOAT32 BCL, void
162  //************************************
163  void SetBarrageCrosswindLength( KFLOAT32 BCL );
164  KFLOAT32 GetBarrageCrosswindLength() const;
165 
166  //************************************
167  // FullName: KDIS::DATA_TYPE::COMBICState::SetBarrageDownwindLength
168  // KDIS::DATA_TYPE::COMBICState::GetBarrageDownwindLength
169  //!Description: Barrage Downwind Length
170  // Parameter: KFLOAT32 BCL, void
171  //************************************
172  void SetBarrageDownwindLength( KFLOAT32 BDL );
173  KFLOAT32 GetBarrageDownwindLength() const;
174 
175  //************************************
176  // FullName: KDIS::DATA_TYPE::COMBICState::SetDetonationVelocity
177  // KDIS::DATA_TYPE::COMBICState::GetDetonationVelocity
178  //!Description: Detonation Velocity
179  // Parameter: KFLOAT32 BCL, void
180  //************************************
181  void SetDetonationVelocity( const EulerAngles & DV );
182  const EulerAngles & GetDetonationVelocity() const;
183  EulerAngles & GetDetonationVelocity();
184 
185  //************************************
186  // FullName: KDIS::DATA_TYPE::COMBICState::GetAsString
187  //!Description: Returns a string representation
188  //************************************
189  virtual KString GetAsString() const;
190 
191  //************************************
192  // FullName: KDIS::DATA_TYPE::COMBICState::Decode
193  //!Description: Convert From Network Data.
194  // Parameter: KDataStream & stream
195  //************************************
196  virtual void Decode( KDataStream & stream ) throw( KException );
197 
198  //************************************
199  // FullName: KDIS::DATA_TYPE::COMBICState::Encode
200  //!Description: Convert To Network Data.
201  // Parameter: KDataStream & stream
202  //************************************
203  virtual KDataStream Encode() const;
204  virtual void Encode( KDataStream & stream ) const;
205 
206  KBOOL operator == ( const COMBICState & Value )const;
207  KBOOL operator != ( const COMBICState & Value )const;
208 };
209 
210 } // END namespace DATA_TYPES
211 } // END namespace KDIS
unsigned int KUINT32
Definition: KDefines.h:103
Definition: EntityType.h:46
KUINT32 m_ui32Padding
Definition: COMBICState.h:76
EntityType m_MunSrc
Definition: COMBICState.h:56
unsigned short int KUINT16
Definition: KDefines.h:101
KUINT16 m_ui16GeometryIndex
Definition: COMBICState.h:60
EulerAngles m_DetVel
Definition: COMBICState.h:74
float KFLOAT32
Definition: KDefines.h:113
KFLOAT32 m_f32BarrageDownwindLength
Definition: COMBICState.h:72
Definition: KDefines.h:182
Definition: KDataStream.h:48
KUINT32 m_ui32SrcType
Definition: COMBICState.h:64
KFLOAT32 m_f32BarrageCrosswindLength
Definition: COMBICState.h:70
KUINT32 m_ui32TSC
Definition: COMBICState.h:54
bool KBOOL
Definition: KDefines.h:119
Definition: EulerAngles.h:46
KUINT16 m_ui16Padding
Definition: COMBICState.h:62
std::string KString
Definition: KDefines.h:116
Definition: COMBICState.h:50
KFLOAT32 m_f32BarrageRate
Definition: COMBICState.h:66
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
KFLOAT32 m_f32BarrageDuration
Definition: COMBICState.h:68
KUINT32 m_ui32NumSrcs
Definition: COMBICState.h:58
Definition: EnvironmentRecord.h:59