KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RadioEntityType.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: RadioEntityType
32  created: 2008/10/22
33  author: Karl Jones
34 
35  purpose: Holds DIS enum for Radio Entity Type
36  size: 64 bits / 8 Octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./DataTypeBase.h"
42 
43 namespace KDIS {
44 namespace DATA_TYPE {
45 
47 {
48 protected:
49 
51 
53 
55 
57 
59 
61 
62 public:
63 
64  static const KUINT16 RADIO_ENTITY_TYPE_SIZE = 8;
65 
67 
69  KDIS::DATA_TYPE::ENUMS::Country Country, KUINT8 Categoy, KUINT8 NomenclatureVersion,
70  KUINT16 Nomenclature );
71 
72  RadioEntityType( KUINT8 Kind, KUINT8 Domain, KUINT8 Country, KUINT8 Categoy,
73  KUINT8 NomenclatureVersion, KUINT16 Nomenclature );
74 
75  RadioEntityType( KDataStream & stream ) throw( KException );
76 
77  virtual ~RadioEntityType();
78 
79  //************************************
80  // FullName: KDIS::DATA_TYPE::RadioEntityType::SetEntityKind
81  // KDIS::DATA_TYPE::RadioEntityType::GetEntityKind
82  //!Description: Kind
83  // Parameter: EntityKind UI
84  //************************************
85  void SetEntityKind( KDIS::DATA_TYPE::ENUMS::EntityKind UI );
86  KDIS::DATA_TYPE::ENUMS::EntityKind GetEntityKind() const;
87 
88  //************************************
89  // FullName: KDIS::DATA_TYPE::RadioEntityType::SetDomain
90  // KDIS::DATA_TYPE::RadioEntityType::GetDomain
91  //!Description: Domain
92  // Parameter: EntityDomain UI
93  //************************************
94  void SetDomain( KDIS::DATA_TYPE::ENUMS::EntityDomain UI );
95  KDIS::DATA_TYPE::ENUMS::EntityDomain GetDomain() const;
96 
97  //************************************
98  // FullName: KDIS::DATA_TYPE::RadioEntityType::SetCountry
99  // KDIS::DATA_TYPE::RadioEntityType::GetCountry
100  //!Description: Country
101  // Parameter: Country UI
102  //************************************
103  void SetCountry( KDIS::DATA_TYPE::ENUMS::Country UI );
104  KDIS::DATA_TYPE::ENUMS::Country GetCountry() const;
105 
106  //************************************
107  // FullName: KDIS::DATA_TYPE::RadioEntityType::SetCategory
108  // KDIS::DATA_TYPE::RadioEntityType::GetCategory
109  //!Description: Category
110  // Parameter: KUINT8 UI
111  //************************************
112  void SetCategory( KUINT8 UI );
113  KUINT8 GetCategory() const;
114 
115  //************************************
116  // FullName: KDIS::DATA_TYPE::RadioEntityType::SetNomenclatureVersion
117  // KDIS::DATA_TYPE::RadioEntityType::GetNomenclatureVersion
118  //!Description: Nomenclature Version
119  // Parameter: KUINT8 UI
120  //************************************
121  void SetNomenclatureVersion( KUINT8 NV );
122  KUINT8 GetNomenclatureVersion() const;
123 
124  //************************************
125  // FullName: KDIS::DATA_TYPE::RadioEntityType::SetNomenclature
126  // KDIS::DATA_TYPE::RadioEntityType::GetNomenclature
127  //!Description: Nomenclature
128  // Parameter: KINT16 N
129  //************************************
130  void SetNomenclature( KUINT16 N );
131  KUINT16 GetNomenclature() const;
132 
133  //************************************
134  // FullName: KDIS::DATA_TYPE::RadioEntityType::GetAsString
135  //!Description: Returns a string representation
136  //************************************
137  virtual KString GetAsString() const;
138 
139  //************************************
140  // FullName: KDIS::DATA_TYPE::RadioEntityType::Decode
141  //!Description: Convert From Network Data.
142  // Parameter: KDataStream & stream
143  //************************************
144  virtual void Decode( KDataStream & stream ) throw( KException );
145 
146  //************************************
147  // FullName: KDIS::DATA_TYPE::RadioEntityType::Encode
148  //!Description: Convert To Network Data.
149  // Parameter: KDataStream & stream
150  //************************************
151  virtual KDataStream Encode() const;
152  virtual void Encode( KDataStream & stream ) const;
153 
154  KBOOL operator == ( const RadioEntityType & Value ) const;
155  KBOOL operator != ( const RadioEntityType & Value ) const;
156 };
157 
158 } // END namespace DATA_TYPES
159 } // END namespace KDIS
160 
Country
Definition: EnumEntityInfoInteraction.h:105
unsigned short int KUINT16
Definition: KDefines.h:101
EntityKind
Definition: EnumEntityInfoInteraction.h:71
KUINT8 m_ui8Category
Definition: RadioEntityType.h:56
KUINT8 m_ui8EntityKind
Definition: RadioEntityType.h:50
KUINT8 m_ui8NomenclatureVersion
Definition: RadioEntityType.h:58
KUINT8 m_ui8Domain
Definition: RadioEntityType.h:52
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
EntityDomain
Definition: EnumEntityInfoInteraction.h:90
Definition: RadioEntityType.h:46
unsigned char KUINT8
Definition: KDefines.h:99
KUINT16 m_ui16Nomenclature
Definition: RadioEntityType.h:60
KUINT16 m_ui16Country
Definition: RadioEntityType.h:54
#define KDIS_EXPORT
Definition: KDefines.h:82