00001 00058 #if !defined(_CIGI_BASE_HAT_HOT_RESP_INCLUDED_) 00059 #define _CIGI_BASE_HAT_HOT_RESP_INCLUDED_ 00060 00061 #include "CigiBasePacket.h" 00062 00063 00064 // Note: 00065 // When converting from a HOT Response of Version 2 or greater to a 00066 // HAT Response of Version 1, the conversion is not a good value. 00067 // The value ends up being a HOT not a HAT. At this time there 00068 // is no way of actually providing a HAT. 00069 00070 // ==================================================================== 00071 // preprocessor definitions 00072 // ==================================================================== 00073 00074 #define CIGI_HAT_RESP_PACKET_ID_V1 102 00075 #define CIGI_HAT_RESP_PACKET_SIZE_V1 16 00076 00077 #define CIGI_HAT_RESP_PACKET_ID_V2 102 00078 #define CIGI_HAT_RESP_PACKET_SIZE_V2 24 00079 00080 #define CIGI_HOT_RESP_PACKET_ID_V2 106 00081 #define CIGI_HOT_RESP_PACKET_SIZE_V2 24 00082 00083 #define CIGI_HAT_HOT_RESP_PACKET_ID_V3 102 00084 #define CIGI_HAT_HOT_RESP_PACKET_SIZE_V3 16 00085 00086 #define CIGI_HAT_HOT_XRESP_PACKET_ID_V3 103 00087 #define CIGI_HAT_HOT_XRESP_PACKET_SIZE_V3 40 00088 00089 #define CIGI_HAT_HOT_RESP_PACKET_ID_V3_2 102 00090 #define CIGI_HAT_HOT_RESP_PACKET_SIZE_V3_2 16 00091 00092 #define CIGI_HAT_HOT_XRESP_PACKET_ID_V3_2 103 00093 #define CIGI_HAT_HOT_XRESP_PACKET_SIZE_V3_2 40 00094 00095 00096 class CigiHatRespV1; 00097 class CigiHatRespV2; 00098 class CigiHotRespV2; 00099 class CigiHatHotRespV3; 00100 class CigiHatHotXRespV3; 00101 class CigiHatHotRespV3_2; 00102 class CigiHatHotXRespV3_2; 00103 00104 00105 class CIGI_SPEC CigiBaseHatHotResp : public CigiBasePacket 00106 { 00107 00108 friend class CigiHatRespV1; 00109 friend class CigiHatRespV2; 00110 friend class CigiHotRespV2; 00111 friend class CigiHatHotRespV3; 00112 friend class CigiHatHotXRespV3; 00113 friend class CigiHatHotRespV3_2; 00114 friend class CigiHatHotXRespV3_2; 00115 00116 public: 00117 00118 //========================================================= 00121 enum ReqTypeGrp 00122 { 00123 HAT=0, 00124 HOT=1 00125 }; 00126 00127 00128 00129 00130 //==> Management 00131 00132 //========================================================= 00135 CigiBaseHatHotResp() { }; 00136 00137 //========================================================= 00140 virtual ~CigiBaseHatHotResp() { }; 00141 00142 00143 //==> Buffer Packing/Unpacking 00144 00145 //========================================================= 00156 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; 00157 00158 //========================================================= 00168 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; 00169 00170 00171 00172 //==> Accessing Member Variable Values functions 00173 00174 //+> HatHotID 00175 00176 //========================================================= 00183 int SetHatHotID(const Cigi_uint16 HatHotIDIn, bool bndchk=true) 00184 { 00185 HatHotID = HatHotIDIn; 00186 return(CIGI_SUCCESS); 00187 } 00188 00189 //========================================================= 00192 Cigi_uint16 GetHatHotID(void) const { return(HatHotID); } 00193 00194 00195 //+> Valid 00196 00197 //========================================================= 00204 int SetValid(const bool ValidIn, bool bndchk=true) 00205 { 00206 Valid = ValidIn; 00207 return(CIGI_SUCCESS); 00208 } 00209 00210 //========================================================= 00213 bool GetValid(void) const { return(Valid); } 00214 00215 00216 00217 protected: 00218 00219 //==> Member variables 00220 00221 //========================================================= 00225 Cigi_uint16 HatHotID; 00226 00227 //========================================================= 00231 bool Valid; 00232 00233 //========================================================= 00238 Cigi_uint8 HostFrame; 00239 00240 //========================================================= 00247 ReqTypeGrp ReqType; 00248 00249 //========================================================= 00253 double Hat; 00254 00255 //========================================================= 00259 double Hot; 00260 00261 //========================================================= 00265 Cigi_uint32 Material; 00266 00267 //========================================================= 00272 float NormAz; 00273 00274 //========================================================= 00280 float NormEl; 00281 00282 //========================================================= 00286 bool VldHat; 00287 00288 //========================================================= 00292 bool VldHot; 00293 00294 00295 }; 00296 00297 #endif // #if !defined(_CIGI_BASE_HAT_HOT_RESP_INCLUDED_)