1 /*********************************************************************
2 Copyright 2013 Karl Jones
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
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.
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.
25 For Further Information Please Contact me at
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
30 /********************************************************************
31 class: SecondaryOperationalData
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 *********************************************************************/
42 #include "./DataTypeBase.h"
48 class KDIS_EXPORT SecondaryOperationalData
: public DataTypeBase
56 KUINT16 m_ui16NumFundParamSets
;
60 static const KUINT16 SECONDARY_OPERATIONAL_DATA_SIZE
= 4;
62 SecondaryOperationalData();
64 SecondaryOperationalData( KDataStream
& stream
) ;
66 SecondaryOperationalData( KUINT8 Param1
, KUINT8 Param2
, KUINT16 NumFundParamSets
);
68 virtual ~SecondaryOperationalData();
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;
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;
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;
99 //************************************
100 // FullName: KDIS::DATA_TYPE::SecondaryOperationalData::GetAsString
101 // Description: Returns a string representation
102 //************************************
103 virtual KString
GetAsString() const;
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
) ;
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;
120 KBOOL
operator == ( const SecondaryOperationalData
& Value
) const;
121 KBOOL
operator != ( const SecondaryOperationalData
& Value
) const;
124 } // END namespace DATA_TYPES
125 } // END namespace KDIS