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: FundamentalOperationalData_RRB
35 purpose: Specifies Fundamental Operational Data for system 5 =
38 size: 128 bits / 16 octets
39 *********************************************************************/
43 #include "./../KDefines.h"
44 #include "./Enums/KDISEnums.h"
49 struct KDIS_EXPORT FundamentalOperationalData_RRB
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;
67 KUINT8 m_ui8SystemStatus
;
70 KUINT8 m_ui8AltParam4
; // Not used
76 KUINT8 m_ui8NotUsed1
: 1;
77 KUINT8 m_ui8Layer1
: 1;
78 KUINT8 m_ui8Layer2
: 1;
79 KUINT8 m_ui8NotUsed2
: 5;
82 KUINT8 m_ui8InfoLayers
;
85 KUINT8 m_ui8Modifier
; // Not used
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;
100 KUINT16 m_ui16Param1
; // Parameter 1 - RRB Response
103 KUINT16 m_ui16Param2
; // Not used
105 KUINT16 m_ui16Param3
; // Not used
107 KUINT16 m_ui16Param4
; // Not used
109 KUINT16 m_ui16Param5
; // Not used
111 KUINT16 m_ui16Param6
; // Not used
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;
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;
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;
177 KBOOL
operator == ( const FundamentalOperationalData_RRB
& Value
) const;
178 KBOOL
operator != ( const FundamentalOperationalData_RRB
& Value
) const;
181 } // END namespace DATA_TYPES
182 } // END namespace KDIS