KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Mode5TransponderBasicData.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: Mode5TransponderBasicData
32  DIS: (7) 1278.1 - 2012
33  created: 10/05/2014
34  author: Karl Jones
35 
36  purpose: Included in the Mode 5 Transponder format for Layer 3 of the IFF PDU.
37 
38  Size: 128 bits / 16 octets
39 *********************************************************************/
40 
41 #pragma once
42 
43 #include "./DataTypeBase.h"
44 #include "./EntityIdentifier.h"
46 #include "./EnhancedMode1Code.h"
48 #include <bitset>
49 
50 namespace KDIS {
51 namespace DATA_TYPE {
52 
54 {
55 protected:
56 
58 
60 
62 
64 
66 
68 
70 
72 
74 
75 public:
76 
77  static const KUINT16 MODE_5_TRANSPONDER_BASIC_DATA_SIZE = 16;
78 
80 
81  Mode5TransponderBasicData( const Mode5TransponderStatus & S, KUINT16 PersonalIdentificationNumber, KUINT32 MsgFormats,
82  const EnhancedMode1Code & EMC1, KUINT16 NationalOrigin, Mode5TransponderSupplementalData SD,
84 
86 
87  virtual ~Mode5TransponderBasicData();
88 
89  //************************************
90  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::SetStatus
91  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetStatus
92  //!Description: The Mode 5 Message Formats supported by this Mode 5 transponder.
93  // Parameter: const InterrogatorStatus & S
94  //************************************
95  void SetStatus( const Mode5TransponderStatus & S );
96  const Mode5TransponderStatus & GetStatus() const;
97  Mode5TransponderStatus & GetStatus();
98 
99  //************************************
100  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::SetPersonalIdentificationNumber
101  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetPersonalIdentificationNumber
102  //!Description: Uniquely identifies the platform carrying this Mode 5 transponder.
103  //! Should be a number in the range 00 000 octal to 37 777 octal.
104  // Parameter: KUINT16 PIN
105  //************************************
106  void SetPersonalIdentificationNumber( KUINT16 PIN );
107  KUINT16 GetPersonalIdentificationNumber() const;
108 
109  //************************************
110  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::SetMessageFormatsPresent
111  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetMessageFormatsPresentBitSet
112  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetMessageFormatsPresent
113  //!Description: When a Mode 5 transponder is in the Regeneration Mode, the included message
114  //! formats shall be those that this Mode 5 transponder is capable of supporting
115  //! and could be in a reply to a Mode 5 interrogation.
116  //! The Message Formats Status field of the Mode 5 Transponder Status record
117  //! is set to Capability (0) in this case. When a Mode 5 transponder is in the
118  //! Interactive Mode, the requirements specified in Interactive Basic Mode 5 IFF
119  //! Data record are applicable.
120  // Parameter: KUINT32 MFP, const std::bitset<32> & MFP
121  //************************************
122  void SetMessageFormatsPresent( KUINT32 MFP );
123  void SetMessageFormatsPresent( const std::bitset<32> & MFP );
124  const std::bitset<32> GetMessageFormatsPresentBitSet() const;
125  KUINT32 GetMessageFormatsPresent();
126 
127  //************************************
128  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::SetEnhancedMode1Code
129  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetEnhancedMode1Code
130  //!Description: Mode 5 Enhanced Mode 1 information.
131  // Parameter: const EnhancedMode1Code & EMC1
132  //************************************
133  void SetEnhancedMode1Code( const EnhancedMode1Code & EMC1 );
134  const EnhancedMode1Code & GetEnhancedMode1Code() const;
135  EnhancedMode1Code & GetEnhancedMode1Code();
136 
137  //************************************
138  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::SetNationalOrigin
139  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetNationalOrigin
140  //!Description: The national origin is the country that owns the platform
141  //! carrying a Mode 5 transponder. NOTE�The National Origin is
142  //! not the same as the Country field enumerations contained in Entity Type
143  //! records. For simulations that have modeled Mode 5 (e.g., Mark XIIA)
144  //! transponders based on the original AIMS 03-1000, the AIMS 03-1000A
145  //! standard contains instructions on how to set separate National Origin and
146  //! Mission Code values to equate tothe present National Origin field.
147  // Parameter: KUINT16 NO
148  //************************************
149  void SetNationalOrigin( KUINT16 NO );
150  KUINT16 GetNationalOrigin() const;
151 
152  //************************************
153  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::SetSupplementalData
154  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetSupplementalData
155  //!Description: Supplemental data for a Mode 5 transponder.
156  // Parameter: Mode5TransponderSupplementalData SD
157  //************************************
158  void SetSupplementalData( Mode5TransponderSupplementalData SD );
159  Mode5TransponderSupplementalData GetSupplementalData() const;
160 
161  //************************************
162  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::SetNavigationSource
163  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetNavigationSource
164  //!Description: Navigation source for this transponder.
165  // Parameter: KDIS::DATA_TYPE::ENUMS::NavigationSource NS
166  //************************************
167  void SetNavigationSource( KDIS::DATA_TYPE::ENUMS::NavigationSource NS );
168  KDIS::DATA_TYPE::ENUMS::NavigationSource GetNavigationSource() const;
169 
170  //************************************
171  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::SetFigureOfMerit
172  // KDIS::DATA_TYPE::Mode5TransponderBasicData::GetFigureOfMerit
173  //!Description: The figure of merit is a quantity used to characterize the performance of the device.
174  //! Valid values 0-31 else INVALID_DATA exception thrown.
175  // Parameter: KUINT8 FOM
176  //************************************
177  void SetFigureOfMerit( KUINT8 FOM ) throw( KException );
178  KUINT8 GetFigureOfMerit() const;
179 
180  //************************************
181  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::GetAsString
182  //!Description: Returns a string representation
183  //************************************
184  virtual KString GetAsString() const;
185 
186  //************************************
187  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::Decode
188  //!Description: Convert From Network Data.
189  // Parameter: KDataStream & stream
190  //************************************
191  virtual void Decode( KDataStream & stream ) throw( KException );
192 
193  //************************************
194  // FullName: KDIS::DATA_TYPE::Mode5TransponderBasicData::Encode
195  //!Description: Convert To Network Data.
196  // Parameter: KDataStream & stream
197  //************************************
198  virtual KDataStream Encode() const;
199  virtual void Encode( KDataStream & stream ) const;
200 
201  KBOOL operator == ( const Mode5TransponderBasicData & Value ) const;
202  KBOOL operator != ( const Mode5TransponderBasicData & Value ) const;
203 };
204 
205 } // END namespace DATA_TYPE
206 } // END namespace KDIS
unsigned int KUINT32
Definition: KDefines.h:103
Definition: Mode5TransponderSupplementalData.h:48
KUINT8 m_ui8NavSrc
Definition: Mode5TransponderBasicData.h:69
KUINT8 m_ui8Padding
Definition: Mode5TransponderBasicData.h:73
Mode5TransponderStatus m_Status
Definition: Mode5TransponderBasicData.h:57
KUINT8 m_ui8FigMerit
Definition: Mode5TransponderBasicData.h:71
unsigned short int KUINT16
Definition: KDefines.h:101
KUINT32 m_ui32MsgFormats
Definition: Mode5TransponderBasicData.h:61
Definition: Mode5TransponderBasicData.h:53
EnhancedMode1Code m_EM1Code
Definition: Mode5TransponderBasicData.h:63
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
Definition: Mode5TransponderStatus.h:48
Mode5TransponderSupplementalData m_SupplementalData
Definition: Mode5TransponderBasicData.h:67
Definition: EnhancedMode1Code.h:48
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
NavigationSource
Definition: EnumIFF.h:172
KUINT16 m_ui16PIN
Definition: Mode5TransponderBasicData.h:59
KUINT16 m_ui16NationalOrigin
Definition: Mode5TransponderBasicData.h:65
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82