KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FundamentalOperationalData_RRB.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: FundamentalOperationalData_RRB
32  created: 2008/12/07
33  author: Karl Jones
34 
35  purpose: Specifies Fundamental Operational Data for system 5 =
36  RRB Transponder
37 
38  size: 128 bits / 16 octets
39 *********************************************************************/
40 
41 #pragma once
42 
43 #include "./../KDefines.h"
44 #include "./Enums/KDISEnums.h"
45 
46 namespace KDIS {
47 namespace DATA_TYPE {
48 
50 {
51 protected:
52 
53  union
54  {
55  struct
56  {
57  KUINT8 m_ui8SystemOnOff : 1;
58  KUINT8 m_ui8Param1 : 1;
59  KUINT8 m_ui8Param2 : 1;
60  KUINT8 m_ui8Param3 : 1;
61  KUINT8 m_ui8Param4 : 1;
62  KUINT8 m_ui8Param5 : 1;
63  KUINT8 m_ui8Param6 : 1;
64  KUINT8 m_ui8OpsStatus : 1;
65  };
66 
68  };
69 
70  KUINT8 m_ui8AltParam4; // Not used
71 
72  union
73  {
74  struct
75  {
76  KUINT8 m_ui8NotUsed1 : 1;
77  KUINT8 m_ui8Layer1 : 1;
78  KUINT8 m_ui8Layer2 : 1;
79  KUINT8 m_ui8NotUsed2 : 5;
80  };
81 
83  };
84 
85  KUINT8 m_ui8Modifier; // Not used
86 
87  union
88  {
89  struct
90  {
91  KUINT16 m_ui16ResponseCode : 5;
92  KUINT16 m_ui16ResponseNotUsed1 : 6;
93  KUINT16 m_ui16ResponsePowerReduction : 1;
94  KUINT16 m_ui16ResponseRadarEnhancement : 1;
95  KUINT16 m_ui16ResponseStatus : 1;
96  KUINT16 m_ui16ResponseDmg : 1;
97  KUINT16 m_ui16ResponseMalfunction : 1;
98  };
99 
100  KUINT16 m_ui16Param1; // Parameter 1 - RRB Response
101  };
102 
103  KUINT16 m_ui16Param2; // Not used
104 
105  KUINT16 m_ui16Param3; // Not used
106 
107  KUINT16 m_ui16Param4; // Not used
108 
109  KUINT16 m_ui16Param5; // Not used
110 
111  KUINT16 m_ui16Param6; // Not used
112 
113 public:
114 
115  //************************************
116  // FullName: KDIS::DATA_TYPE::FundamentalOperationalData_RRB::SetSystemStatus
117  // KDIS::DATA_TYPE::FundamentalOperationalData_RRB::GetSystemStatus
118  //!Description: Specifies whether the entire system is operational
119  //! and which modes it is capable of.
120  // Parameter: KBOOL, void
121  //************************************
122  void SetSystemStatus( KBOOL IsSystemOn, KBOOL IsParam1Capable, KBOOL IsParam2Capable,
123  KBOOL IsParam3Capable, KBOOL IsParam4Capable, KBOOL IsParam5Capable,
124  KBOOL IsParam6Capable, KBOOL IsOperational );
125  void SetSystemStatusSystemOn( KBOOL IsSystemOn );
126  void SetSystemStatusParam1Capable( KBOOL IsParamCapable );
127  void SetSystemStatusParam2Capable( KBOOL IsParamCapable );
128  void SetSystemStatusParam3Capable( KBOOL IsParamCapable );
129  void SetSystemStatusParam4Capable( KBOOL IsParamCapable );
130  void SetSystemStatusParam5Capable( KBOOL IsParamCapable );
131  void SetSystemStatusParam6Capable( KBOOL IsParamCapable );
132  void SetSystemStatusIsOperational( KBOOL IsOperational );
133  KBOOL GetSystemStatusSystemOn() const;
134  KBOOL GetSystemStatusParam1Capable() const;
135  KBOOL GetSystemStatusParam2Capable() const;
136  KBOOL GetSystemStatusParam3Capable() const;
137  KBOOL GetSystemStatusParam4Capable() const;
138  KBOOL GetSystemStatusParam5Capable() const;
139  KBOOL GetSystemStatusParam6Capable() const;
140  KBOOL GetSystemStatusIsOperational() const;
141 
142  //************************************
143  // FullName: KDIS::DATA_TYPE::FundamentalOperationalData_RRB::SetInfomationLayer
144  // KDIS::DATA_TYPE::FundamentalOperationalData_RRB::IsInfomationLayerPresent
145  //!Description: Used for an alternative representation of parameter 4
146  // Parameter: KBOOL, void
147  //************************************
148  void SetInfomationLayersPresence( KBOOL IsLayer1Present, KBOOL IsLayer2Present );
149  void SetInfomationLayer1( KBOOL IsPresent );
150  void SetInfomationLayer2( KBOOL IsPresent );
151  KBOOL IsInfomationLayer1Present() const;
152  KBOOL IsInfomationLayer2Present() const;
153 
154  //************************************
155  // FullName: KDIS::DATA_TYPE::FundamentalOperationalData_RRB::SetResponse
156  // KDIS::DATA_TYPE::FundamentalOperationalData_RRB::GetResponse
157  //!Description: Parameter 1 data - RRB Response
158  //! Note RRB codes are not octal codes. The complete RRB
159  //! code is stored as a decimal number in the specified bits
160  // Parameter: KBOOL, void, KUINT8
161  //************************************
162  void SetResponse( KUINT8 Code, KBOOL PowerReduction, KBOOL RadarEnhancement,
163  KBOOL IsStatusOn, KBOOL IsDamaged, KBOOL IsMalfunctioning );
164  void SetResponseCode( KUINT8 C );
165  void SetResponsePowerReduction( KBOOL PR );
166  void SetResponseRadarEnhancement( KBOOL RE );
167  void SetResponseStatus( KBOOL IsOn );
168  void SetResponseDamage( KBOOL IsDamaged );
169  void SetResponseMalfunction( KBOOL IsMalfunctioning );
170  KUINT8 GetResponseCode() const;
171  KBOOL GetResponsePowerReduction() const;
172  KBOOL GetResponseRadarEnhancement() const;
173  KBOOL IsResponseStatusOn() const;
174  KBOOL IsResponseDamaged() const;
175  KBOOL IsResponseMalfunctioning() const;
176 
177  KBOOL operator == ( const FundamentalOperationalData_RRB & Value ) const;
178  KBOOL operator != ( const FundamentalOperationalData_RRB & Value ) const;
179 };
180 
181 } // END namespace DATA_TYPES
182 } // END namespace KDIS
183 
KUINT16 m_ui16Param4
Definition: FundamentalOperationalData_RRB.h:107
KUINT16 m_ui16Param5
Definition: FundamentalOperationalData_RRB.h:109
KUINT16 m_ui16Param6
Definition: FundamentalOperationalData_RRB.h:111
unsigned short int KUINT16
Definition: KDefines.h:101
KUINT8 m_ui8Modifier
Definition: FundamentalOperationalData_RRB.h:85
KUINT8 m_ui8AltParam4
Definition: FundamentalOperationalData_RRB.h:70
KUINT16 m_ui16Param1
Definition: FundamentalOperationalData_RRB.h:100
bool KBOOL
Definition: KDefines.h:119
KUINT16 m_ui16Param2
Definition: FundamentalOperationalData_RRB.h:103
KUINT8 m_ui8SystemStatus
Definition: FundamentalOperationalData_RRB.h:67
Definition: FundamentalOperationalData_RRB.h:49
KUINT8 m_ui8InfoLayers
Definition: FundamentalOperationalData_RRB.h:82
KUINT16 m_ui16Param3
Definition: FundamentalOperationalData_RRB.h:105
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82