#include <CigiHotReqV2.h>
Inheritance diagram for CigiHotReqV2:
Public Member Functions | |
CigiHotReqV2 () | |
virtual | ~CigiHotReqV2 () |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec) |
virtual int | GetCnvt (CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) |
int | SetAlt (const double AltIn, bool bndchk=true) |
double | GetAlt (void) const |
Definition at line 59 of file CigiHotReqV2.h.
CigiHotReqV2::CigiHotReqV2 | ( | ) |
General Constructor
Definition at line 92 of file CigiHotReqV2.cpp.
References CigiBaseHatHotReq::AltOrZoff, CIGI_HOT_REQ_PACKET_ID_V2, CIGI_HOT_REQ_PACKET_SIZE_V2, CigiBaseHatHotReq::EntityID, CigiBaseHatHotReq::Geodetic, CigiBaseHatHotReq::HatHotID, CigiBaseHatHotReq::HOT, CigiBaseHatHotReq::IsValidV1or2, CigiBaseHatHotReq::LatOrXoff, CigiBaseHatHotReq::LonOrYoff, CigiBasePacket::MinorVersion, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, CigiBaseHatHotReq::ReqType, CigiBaseHatHotReq::SrcCoordSys, CigiBaseHatHotReq::UpdatePeriod, and CigiBasePacket::Version.
00093 { 00094 00095 PacketID = CIGI_HOT_REQ_PACKET_ID_V2; 00096 PacketSize = CIGI_HOT_REQ_PACKET_SIZE_V2; 00097 Version = 2; 00098 MinorVersion = 0; 00099 00100 HatHotID = 0; 00101 ReqType = HOT; 00102 SrcCoordSys = Geodetic; 00103 UpdatePeriod = 0; 00104 EntityID = 0; 00105 LatOrXoff = 0.0; 00106 LonOrYoff = 0.0; 00107 AltOrZoff = 0.0; 00108 IsValidV1or2 = true; 00109 00110 }
CigiHotReqV2::~CigiHotReqV2 | ( | ) | [virtual] |
double CigiHotReqV2::GetAlt | ( | void | ) | const [inline] |
Gets the Alt value.
Definition at line 141 of file CigiHotReqV2.h.
00141 { return(AltOrZoff); }
int CigiHotReqV2::GetCnvt | ( | CigiVersionID & | CnvtVersion, | |
CigiCnvtInfoType::Type & | CnvtInfo | |||
) | [virtual] |
A virtual Conversion Information function. This function provides conversion information for this packet.
CnvtVersion | - The CIGI version to which this packet is being converted. | |
CnvtInfo | - The information needed for conversion |
Reimplemented from CigiBasePacket.
Definition at line 196 of file CigiHotReqV2.cpp.
References CIGI_HAT_HOT_REQ_PACKET_ID_V3, CIGI_HAT_REQ_PACKET_ID_V1, CIGI_HOT_REQ_PACKET_ID_V2, CIGI_SUCCESS, CigiVersionID::CigiMajorVersion, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiCnvtInfoType::CigiCnvtInfoStruct::ProcID, and CigiProcessType::ProcStd.
00198 { 00199 CnvtInfo.ProcID = CigiProcessType::ProcStd; 00200 00201 switch(CnvtVersion.CigiMajorVersion) 00202 { 00203 case 1: 00204 CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V1; 00205 break; 00206 case 2: 00207 CnvtInfo.CnvtPacketID = CIGI_HOT_REQ_PACKET_ID_V2; 00208 break; 00209 default: 00210 // The Packet ID for all V3 HatHotReq are the same ID 00211 CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_REQ_PACKET_ID_V3; 00212 break; 00213 } 00214 00215 return(CIGI_SUCCESS); 00216 }
int CigiHotReqV2::Pack | ( | CigiBasePacket * | Base, | |
Cigi_uint8 * | Buff, | |||
void * | Spec | |||
) | const [virtual] |
The virtual Pack function for CIGI 2
Base | - A pointer to the instance of the packet to be packed. (Downcast to CigiBasePacket) | |
Buff | - A pointer to the current pack point. | |
Spec | - A pointer to special data - This is not used in this class. |
Implements CigiBaseHatHotReq.
Definition at line 127 of file CigiHotReqV2.cpp.
References PackPointerUnion::c, CIGI_HOT_REQ_PACKET_SIZE_V2, CIGI_SCOPY2, CIGI_SCOPY8, PackPointerUnion::d, CigiBaseHatHotReq::HatHotID, CigiBaseHatHotReq::IsValidV1or2, PackPointerUnion::l, CigiBaseHatHotReq::LatOrXoff, CigiBaseHatHotReq::LonOrYoff, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, and PackPointerUnion::s.
00128 { 00129 double DBuf[6]; 00130 00131 Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; 00132 00133 PackPointer CDta; 00134 00135 CigiBaseHatHotReq * Data = ( CigiBaseHatHotReq *)Base; 00136 00137 if(!Data->IsValidV1or2) 00138 return(0); 00139 00140 CDta.d = DBuf; 00141 00142 *CDta.c++ = PacketID; 00143 *CDta.c++ = PacketSize; 00144 00145 CIGI_SCOPY2(CDta.s++, &Data->HatHotID); 00146 00147 *CDta.l++ = 0; 00148 00149 CIGI_SCOPY8(CDta.d++, &Data->LatOrXoff); 00150 CIGI_SCOPY8(CDta.d++, &Data->LonOrYoff); 00151 00152 memcpy(Buff,tBuf,CIGI_HOT_REQ_PACKET_SIZE_V2); 00153 00154 return(PacketSize); 00155 00156 }
int CigiHotReqV2::SetAlt | ( | const double | AltIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the Alt with bound checking control
AltIn | - | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 132 of file CigiHotReqV2.h.
References CIGI_SUCCESS.
00133 { 00134 AltOrZoff = AltIn; 00135 return(CIGI_SUCCESS); 00136 }
int CigiHotReqV2::Unpack | ( | Cigi_uint8 * | Buff, | |
bool | Swap, | |||
void * | Spec | |||
) | [virtual] |
The virtual Unpack function for CIGI 2
Buff | - A pointer to the current pack point. | |
Swap | - N/A for V1 & V2 | |
Spec | - A pointer to special data - This is not used in this class. |
Implements CigiBaseHatHotReq.
Definition at line 161 of file CigiHotReqV2.cpp.
References PackPointerUnion::c, CIGI_HOT_REQ_PACKET_SIZE_V2, CIGI_SCOPY2, CIGI_SCOPY8, PackPointerUnion::d, CigiBaseHatHotReq::Geodetic, CigiBaseHatHotReq::HatHotID, CigiBaseHatHotReq::IsValidV1or2, PackPointerUnion::l, CigiBaseHatHotReq::LatOrXoff, CigiBaseHatHotReq::LonOrYoff, CigiBasePacket::PacketSize, PackPointerUnion::s, CigiBaseHatHotReq::SrcCoordSys, and CigiBaseHatHotReq::UpdatePeriod.
00162 { 00163 double DBuf[6]; 00164 00165 Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; 00166 00167 PackPointer CDta; 00168 00169 memcpy(tBuf,Buff,CIGI_HOT_REQ_PACKET_SIZE_V2); 00170 00171 CDta.d = DBuf; 00172 00173 CDta.c += 2; // Step over packet id and size 00174 00175 CIGI_SCOPY2(&HatHotID, CDta.s++); 00176 00177 CDta.l++; 00178 00179 CIGI_SCOPY8(&LatOrXoff, CDta.d++); 00180 CIGI_SCOPY8(&LonOrYoff, CDta.d++); 00181 00182 00183 SrcCoordSys = Geodetic; 00184 IsValidV1or2 = true; 00185 00186 UpdatePeriod = 0; 00187 00188 return(PacketSize); 00189 00190 }