KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EnumHeader.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  EnumHeader
32  created: 17/09/2008
33  author: Karl Jones
34 
35  purpose: Enums used in PDU header
36 *********************************************************************/
37 
38 #pragma once
39 
40 #include "./EnumDescriptor.h"
41 
42 namespace KDIS {
43 namespace DATA_TYPE {
44 namespace ENUMS {
45 
46 /************************************************************************/
47 /* Protocol Version. */
48 /* Version of DIS being used */
49 /* Used In: */
50 /* PDU Header */
51 /************************************************************************/
52 
54 {
55  Other_PV = 0,
63 };
64 
66 
67 // Returns true if a value was found.
68 KBOOL GetEnumFromStringProtocolVersion( const KString & Value, KINT32 & ValueOut );
69 
70 /************************************************************************/
71 /* PDU Type */
72 /* Indicates the type of PDU */
73 /* X Indicates that the PDU has been implemented in KDIS */
74 /* Used In: */
75 /* PDU Header */
76 /* // X - indicates the PDU has been implemented */
77 /************************************************************************/
78 
79 enum PDUType
80 {
83  Fire_PDU_Type = 2, // X
100  Set_Data_PDU_Type = 19, // X
101  Data_PDU_Type = 20, // X
103  Message_PDU_Type = 22, // X AKA Comment PDU
107  Signal_PDU_Type = 26, // X
108  Receiver_PDU_Type = 27, // X
116  TransferControl_PDU_Type = 35, // X AKA Transfer Ownership PDU
117  IsPartOf_PDU_Type = 36, // X
127  TSPI_PDU_Type = 46, // X
130  LEFire_PDU_Type = 49, // X
141  Data_R_PDU_Type = 60, // X
144  Record_R_PDU_Type = 63, // X
149  DirectedEnergyFire_PDU_Type = 68, // X Taken from 'IEEE 1278.1-200X Draft' SISO-REF-010 PCR Changes
150  EntityDamageStatus_PDU_Type = 69, // X Taken from 'IEEE 1278.1-200X Draft' SISO-REF-010 PCR Changes
151  IO_Action_PDU_Type = 70, // X Taken from 'IEEE 1278.1-200X Draft' SISO-REF-010 PCR Changes
152  IO_Report_PDU_Type = 71, // X Taken from 'IEEE 1278.1-200X Draft' SISO-REF-010 PCR Changes
153  Attribute_PDU_Type = 72, // X Taken from 'IEEE 1278.1-200X Draft' SISO-REF-010 PCR Changes
160 };
161 
163 
164 // Returns true if a value was found.
165 KBOOL GetEnumFromStringPDUType( const KString & Value, KINT32 & ValueOut );
166 
167 /************************************************************************/
168 /* Protocol Family */
169 /* Indicates the family of protocols to which the PDU belongs */
170 /* Used In: */
171 /* PDU Header */
172 /************************************************************************/
173 
175 {
178  Warfare = 2,
189  Information_Operations = 13, // Taken from 'IEEE 1278.1-200X Draft' SISO-REF-010 PCR Changes
195 };
196 
198 
199 // Returns true if a value was found.
200 KBOOL GetEnumFromStringProtocolFamily( const KString & Value, KINT32 & ValueOut );
201 
202 /************************************************************************/
203 /* Time Stamp Type */
204 /* Indicates if the Time stamp is absolute or relative */
205 /* Absolute - Used when all simulation clocks are synchronized to UTC */
206 /* Relative - Used when clocks are not synchronized, Each sim */
207 /* shall keep time begging with an arbitrary starting point */
208 /* The timestamp represents units of time passed since the */
209 /* beginning of the current hour. */
210 /* Used In: */
211 /* PDU Header */
212 /************************************************************************/
213 
215 {
218 };
219 
221 
222 // Returns true if a value was found.
223 KBOOL GetEnumFromStringTimeStampType( const KString & Value, KINT32 & ValueOut );
224 
225 #if DIS_VERSION > 6
226 
227 /************************************************************************/
228 /* LVC Indicator */
229 /* Indicates whether the data contained in this PDU is related to a */
230 /* live, virtual or constructive entity. If the LVC designation is not */
231 /* able to be determined, this field shall be set to No Statement (0). */
232 /* Used In: */
233 /* PDU Header 7 */
234 /************************************************************************/
235 
237 {
239  LiveLVC = 1,
242 };
243 
245 
246 // Returns true if a value was found.
247 KBOOL GetEnumFromStringLVCIndicator( const KString & Value, KINT32 & ValueOut );
248 
249 #endif // DIS 7
250 
251 } // END namespace ENUMS
252 } // END namespace DATA_TYPES
253 } // END namespace KDIS
254 
Definition: EnumHeader.h:103
Definition: EnumHeader.h:107
Definition: EnumHeader.h:239
Definition: EnumHeader.h:83
Definition: EnumHeader.h:100
Definition: EnumHeader.h:187
Definition: EnumHeader.h:190
Definition: EnumHeader.h:152
KBOOL GetEnumFromStringProtocolVersion(const KString &Value, KINT32 &ValueOut)
Definition: EnumHeader.h:184
Definition: EnumHeader.h:140
KString GetEnumAsStringLVCIndicator(KINT32 Value)
Definition: EnumHeader.h:216
Definition: EnumHeader.h:81
Definition: EnumHeader.h:55
Definition: EnumHeader.h:238
LVCIndicator
Definition: EnumHeader.h:236
ProtocolVersion
Definition: EnumHeader.h:53
Definition: EnumHeader.h:117
Definition: EnumHeader.h:188
Definition: EnumHeader.h:62
Definition: EnumHeader.h:151
Definition: EnumHeader.h:108
int KINT32
Definition: KDefines.h:104
bool KBOOL
Definition: KDefines.h:119
Definition: EnumHeader.h:153
Definition: EnumHeader.h:143
Definition: EnumHeader.h:144
std::string KString
Definition: KDefines.h:116
KBOOL GetEnumFromStringProtocolFamily(const KString &Value, KINT32 &ValueOut)
KBOOL GetEnumFromStringTimeStampType(const KString &Value, KINT32 &ValueOut)
KString GetEnumAsStringProtocolVersion(KINT32 Value)
Definition: EnumHeader.h:57
Definition: EnumHeader.h:217
TimeStampType
Definition: EnumHeader.h:214
PDUType
Definition: EnumHeader.h:79
Definition: EnumHeader.h:101
ProtocolFamily
Definition: EnumHeader.h:174
Definition: EnumHeader.h:241
KBOOL GetEnumFromStringPDUType(const KString &Value, KINT32 &ValueOut)
Definition: EnumHeader.h:115
KString GetEnumAsStringPDUType(KINT32 Value)
Definition: EnumHeader.h:60
Definition: EnumHeader.h:127
Definition: EnumHeader.h:179
KString GetEnumAsStringTimeStampType(KINT32 Value)
Definition: EnumHeader.h:176
Definition: EnumHeader.h:130
Definition: EnumHeader.h:183
Definition: EnumHeader.h:141
KString GetEnumAsStringProtocolFamily(KINT32 Value)
KBOOL GetEnumFromStringLVCIndicator(const KString &Value, KINT32 &ValueOut)
Definition: EnumHeader.h:178
Definition: EnumHeader.h:240