#include <CigiSOFV1.h>
Inheritance diagram for CigiSOFV1:
Public Member Functions | |
CigiSOFV1 () | |
virtual | ~CigiSOFV1 () |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec) |
Cigi_uint32 | GetFrameCntr (void) const |
int | SetFrameCntr (const Cigi_uint32 FrameCntrIn, bool bndchk=true) |
Definition at line 65 of file CigiSOFV1.h.
CigiSOFV1::CigiSOFV1 | ( | ) |
Definition at line 81 of file CigiSOFV1.cpp.
References CigiBaseSOF::BSwapEn, CigiBaseSOF::ByteSwap, CIGI_SOF_PACKET_ID_V1, CIGI_SOF_PACKET_SIZE_V1, CigiBaseSOF::DatabaseID, CigiBaseSOF::EarthRefModel, CigiBaseSOF::FrameCntr, CigiBaseSOF::IGMode, CigiBaseSOF::LastRcvdHostFrame, CigiBasePacket::MinorVersion, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, CigiBaseSOF::Standby, CigiBaseSOF::TimeStampV2, CigiBaseSOF::TimeStampV3, CigiBaseSOF::TimestampValid, CigiBasePacket::Version, and CigiBaseSOF::WGS84.
00082 { 00083 00084 PacketID = CIGI_SOF_PACKET_ID_V1; 00085 PacketSize = CIGI_SOF_PACKET_SIZE_V1; 00086 Version = 1; 00087 MinorVersion = 0; 00088 00089 BSwapEn = false; 00090 DatabaseID = 0; 00091 FrameCntr = 0; 00092 TimeStampV2 = 0.0f; 00093 TimeStampV3 = 0; 00094 ByteSwap = 0x8000; 00095 IGMode = Standby; 00096 TimestampValid = false; 00097 EarthRefModel = WGS84; 00098 LastRcvdHostFrame = 0; 00099 00100 }
CigiSOFV1::~CigiSOFV1 | ( | ) | [virtual] |
Cigi_uint32 CigiSOFV1::GetFrameCntr | ( | void | ) | const [inline] |
Gets the Frame Counter value
Reimplemented from CigiBaseSOF.
Definition at line 110 of file CigiSOFV1.h.
00110 { return(FrameCntr); }
int CigiSOFV1::Pack | ( | CigiBasePacket * | Base, | |
Cigi_uint8 * | Buff, | |||
void * | Spec | |||
) | const [virtual] |
The virtual Pack function for CIGI 1
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 CigiBaseSOF.
Definition at line 119 of file CigiSOFV1.cpp.
References PackPointerUnion::b, PackPointerUnion::c, CIGI_SCOPY4, CigiBaseSOF::DatabaseID, CigiBaseSOF::FrameCntr, CigiBaseSOF::IGMode, CigiBaseSOF::IGStatus, PackPointerUnion::l, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, and CigiBasePacket::Version.
00120 { 00121 PackPointer CDta; 00122 00123 CigiBaseSOF *Data = ( CigiBaseSOF *) Base; 00124 00125 00126 CDta.c = Buff; 00127 00128 *CDta.c++ = PacketID; 00129 *CDta.c++ = PacketSize; 00130 *CDta.c++ = Version; 00131 00132 *CDta.b++ = Data->DatabaseID; 00133 *CDta.c++ = Data->IGStatus; 00134 00135 Cigi_uint8 HDta = (Cigi_uint8)((Data->IGMode << 6) & 0xc0); 00136 00137 *CDta.c++ = HDta; 00138 *CDta.c++ = 0; 00139 *CDta.c++ = 0; 00140 00141 CIGI_SCOPY4(CDta.l++, &Data->FrameCntr); 00142 00143 return(PacketSize); 00144 00145 }
int CigiSOFV1::SetFrameCntr | ( | const Cigi_uint32 | FrameCntrIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the Frame Counter with bound checking control
FrameCntrIn | - Specifies the frame. | |
bndchk | - Enables (true) or disables (false) bounds checking |
Reimplemented from CigiBaseSOF.
Definition at line 120 of file CigiSOFV1.h.
References CIGI_SUCCESS.
00121 { 00122 FrameCntr = FrameCntrIn; 00123 LastRcvdHostFrame = FrameCntrIn; 00124 00125 return(CIGI_SUCCESS); 00126 }
int CigiSOFV1::Unpack | ( | Cigi_uint8 * | Buff, | |
bool | Swap, | |||
void * | Spec | |||
) | [virtual] |
The virtual Unpack function for CIGI 1
Buff | - A pointer to the current pack point. | |
Swap | - Byte swapping required. | |
Spec | - A pointer to special data - This is not used in this class. |
Implements CigiBaseSOF.
Definition at line 151 of file CigiSOFV1.cpp.
References PackPointerUnion::b, PackPointerUnion::c, CIGI_SCOPY4, CIGI_SUCCESS, CigiBaseSOF::DatabaseID, CigiBaseSOF::FrameCntr, CigiBaseSOF::IGMode, CigiBaseSOF::IGStatus, PackPointerUnion::l, CigiBaseSOF::LastRcvdHostFrame, and PackPointerUnion::s.
00152 { 00153 00154 PackPointer CDta; 00155 00156 CDta.c = Buff; 00157 00158 CDta.c += 3; 00159 00160 DatabaseID = *CDta.b++; 00161 IGStatus = *CDta.c++; 00162 00163 Cigi_uint8 HDta = *CDta.c++; 00164 00165 IGMode = (IGModeGrp)((HDta >> 6) & 0x03); 00166 00167 CDta.s++; 00168 00169 CIGI_SCOPY4(&FrameCntr,CDta.l++); 00170 00171 LastRcvdHostFrame = FrameCntr; 00172 00173 // Timestamp & timestamp valid are not handled in this version. 00174 00175 00176 Swap = false; 00177 00178 return(CIGI_SUCCESS); 00179 00180 }