#include <CigiAerosolRespV3.h>
Inheritance diagram for CigiAerosolRespV3:
Public Member Functions | |
CigiAerosolRespV3 () | |
virtual | ~CigiAerosolRespV3 () |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec) |
Definition at line 58 of file CigiAerosolRespV3.h.
CigiAerosolRespV3::CigiAerosolRespV3 | ( | ) |
General Constructor
Definition at line 67 of file CigiAerosolRespV3.cpp.
References CigiBaseAerosolResp::AerosolConcentration, CIGI_AEROSOL_RESP_PACKET_ID_V3, CIGI_AEROSOL_RESP_PACKET_SIZE_V3, CigiBaseAerosolResp::LayerID, CigiBasePacket::MinorVersion, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, CigiBaseAerosolResp::RequestID, and CigiBasePacket::Version.
00068 { 00069 00070 PacketID = CIGI_AEROSOL_RESP_PACKET_ID_V3; 00071 PacketSize = CIGI_AEROSOL_RESP_PACKET_SIZE_V3; 00072 Version = 3; 00073 MinorVersion = 0; 00074 00075 RequestID = 0; 00076 LayerID = 0; 00077 AerosolConcentration = 0.0; 00078 00079 }
CigiAerosolRespV3::~CigiAerosolRespV3 | ( | ) | [virtual] |
int CigiAerosolRespV3::Pack | ( | CigiBasePacket * | Base, | |
Cigi_uint8 * | Buff, | |||
void * | Spec | |||
) | const [virtual] |
The virtual Pack function for CIGI 3
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 CigiBaseAerosolResp.
Definition at line 96 of file CigiAerosolRespV3.cpp.
References CigiBaseAerosolResp::AerosolConcentration, PackPointerUnion::c, PackPointerUnion::f, CigiBaseAerosolResp::LayerID, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, and CigiBaseAerosolResp::RequestID.
00097 { 00098 PackPointer CDta; 00099 00100 CigiBaseAerosolResp * Data = ( CigiBaseAerosolResp *)Base; 00101 00102 CDta.c = Buff; 00103 00104 *CDta.c++ = PacketID; 00105 *CDta.c++ = PacketSize; 00106 00107 *CDta.c++ = Data->RequestID; 00108 *CDta.c++ = Data->LayerID; 00109 *CDta.f++ = Data->AerosolConcentration; 00110 00111 return(PacketSize); 00112 00113 }
int CigiAerosolRespV3::Unpack | ( | Cigi_uint8 * | Buff, | |
bool | Swap, | |||
void * | Spec | |||
) | [virtual] |
The virtual Unpack function for CIGI 3
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 CigiBaseAerosolResp.
Definition at line 118 of file CigiAerosolRespV3.cpp.
References CigiBaseAerosolResp::AerosolConcentration, PackPointerUnion::c, CigiSwap4(), PackPointerUnion::f, CigiBaseAerosolResp::LayerID, CigiBasePacket::PacketSize, and CigiBaseAerosolResp::RequestID.
00119 { 00120 PackPointer CDta; 00121 00122 CDta.c = Buff; 00123 00124 CDta.c += 2; // Step over packet id and size 00125 00126 RequestID = *CDta.c++; 00127 LayerID = *CDta.c++; 00128 00129 if(!Swap) 00130 AerosolConcentration = *CDta.f++; 00131 else 00132 CigiSwap4(&AerosolConcentration, CDta.f++); 00133 00134 return(PacketSize); 00135 00136 }