KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SecondaryOperationalData.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: SecondaryOperationalData
32  created: 2009/03/27
33  author: Karl Jones
34 
35  purpose: Conatains additional data for the IFF/ATC/NAVAIDS emitting
36  system and the number of fundamental parameter data sets.
37  size: 32 bits / 4 octets
38 *********************************************************************/
39 
40 #pragma once
41 
42 #include "./DataTypeBase.h"
43 #include <vector>
44 
45 namespace KDIS {
46 namespace DATA_TYPE {
47 
49 {
50 protected:
51 
53 
55 
57 
58 public:
59 
60  static const KUINT16 SECONDARY_OPERATIONAL_DATA_SIZE = 4;
61 
63 
64  SecondaryOperationalData( KDataStream & stream ) throw( KException );
65 
66  SecondaryOperationalData( KUINT8 Param1, KUINT8 Param2, KUINT16 NumFundParamSets );
67 
68  virtual ~SecondaryOperationalData();
69 
70  //************************************
71  // FullName: KDIS::DATA_TYPE::SecondaryOperationalData::SetParameter1
72  // KDIS::DATA_TYPE::SecondaryOperationalData::GetParameter1
73  //!Description: Operational parameter 1. Represented as an enumeration, only
74  //! 0 is currently defined as Other.
75  // Parameter: const KUINT8 P, void
76  //************************************
77  void SetParameter1( KUINT8 P );
78  KUINT8 GetParameter1() const;
79 
80  //************************************
81  // FullName: KDIS::DATA_TYPE::SecondaryOperationalData::SetParameter2
82  // KDIS::DATA_TYPE::SecondaryOperationalData::GetParameter2
83  //!Description: Operational parameter 2. Represented as an enumeration, only
84  //! 0 is currently defined as Other.
85  // Parameter: const KUINT8 P, void
86  //************************************
87  void SetParameter2( KUINT8 P );
88  KUINT8 GetParameter2() const;
89 
90  //************************************
91  // FullName: KDIS::DATA_TYPE::SecondaryOperationalData::SetNumberOfFundamentalParamSets
92  // KDIS::DATA_TYPE::SecondaryOperationalData::GetNumberOfFundamentalParamSets
93  //!Description: Returns number of Fundamental Parameter Data Sets
94  //!Paramter: KUINT8 NFPDS, void
95  //************************************
96  void SetNumberOfFundamentalParamSets( KUINT8 NFPDS );
97  KUINT16 GetNumberOfFundamentalParamSets() const;
98 
99  //************************************
100  // FullName: KDIS::DATA_TYPE::SecondaryOperationalData::GetAsString
101  //!Description: Returns a string representation
102  //************************************
103  virtual KString GetAsString() const;
104 
105  //************************************
106  // FullName: KDIS::DATA_TYPE::SecondaryOperationalData::Decode
107  //!Description: Convert From Network Data.
108  // Parameter: KDataStream & stream
109  //************************************
110  virtual void Decode( KDataStream & stream ) throw( KException );
111 
112  //************************************
113  // FullName: KDIS::DATA_TYPE::SecondaryOperationalData::Encode
114  //!Description: Convert To Network Data.
115  // Parameter: KDataStream & stream
116  //************************************
117  virtual KDataStream Encode() const;
118  virtual void Encode( KDataStream & stream ) const;
119 
120  KBOOL operator == ( const SecondaryOperationalData & Value ) const;
121  KBOOL operator != ( const SecondaryOperationalData & Value ) const;
122 };
123 
124 } // END namespace DATA_TYPES
125 } // END namespace KDIS
126 
KUINT8 m_ui8Param1
Definition: SecondaryOperationalData.h:52
unsigned short int KUINT16
Definition: KDefines.h:101
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
Definition: SecondaryOperationalData.h:48
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
KUINT16 m_ui16NumFundParamSets
Definition: SecondaryOperationalData.h:56
KUINT8 m_ui8Param2
Definition: SecondaryOperationalData.h:54