#include <CigiCollDetVolRespV3.h>
Inheritance diagram for CigiCollDetVolRespV3:
Public Member Functions | |
CigiCollDetVolRespV3 () | |
virtual | ~CigiCollDetVolRespV3 () |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec) |
int | SetVolID (const Cigi_uint8 VolIDIn, bool bndchk=true) |
Cigi_uint8 | GetVolID (void) const |
int | SetCollVolID (const Cigi_uint8 CollVolIDIn, bool bndchk=true) |
Cigi_uint8 | GetCollVolID (void) const |
Definition at line 58 of file CigiCollDetVolRespV3.h.
CigiCollDetVolRespV3::CigiCollDetVolRespV3 | ( | ) |
General Constructor
Definition at line 67 of file CigiCollDetVolRespV3.cpp.
References CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3, CIGI_COLL_DET_VOL_RESP_PACKET_SIZE_V3, CigiBaseCollDetVolResp::CollEntityID, CigiBaseCollDetVolResp::CollType, CigiBaseCollDetVolResp::CollVolID, CigiBaseCollDetVolResp::EntityID, CigiBasePacket::MinorVersion, CigiBaseCollDetVolResp::NonEntity, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, CigiBasePacket::Version, and CigiBaseCollDetVolResp::VolID.
00068 { 00069 00070 PacketID = CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3; 00071 PacketSize = CIGI_COLL_DET_VOL_RESP_PACKET_SIZE_V3; 00072 Version = 3; 00073 MinorVersion = 0; 00074 00075 EntityID = 0; 00076 VolID = 0; 00077 CollType = NonEntity; 00078 CollEntityID = 0; 00079 CollVolID = 0; 00080 00081 }
CigiCollDetVolRespV3::~CigiCollDetVolRespV3 | ( | ) | [virtual] |
Cigi_uint8 CigiCollDetVolRespV3::GetCollVolID | ( | void | ) | const [inline] |
Gets the CollVolID value.
Definition at line 146 of file CigiCollDetVolRespV3.h.
00146 { return(CollVolID); }
Cigi_uint8 CigiCollDetVolRespV3::GetVolID | ( | void | ) | const [inline] |
Gets the VolID value.
Definition at line 125 of file CigiCollDetVolRespV3.h.
00125 { return(VolID); }
int CigiCollDetVolRespV3::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 CigiBaseCollDetVolResp.
Definition at line 98 of file CigiCollDetVolRespV3.cpp.
References PackPointerUnion::c, CigiBaseCollDetVolResp::CollEntityID, CigiBaseCollDetVolResp::CollType, CigiBaseCollDetVolResp::CollVolID, CigiBaseCollDetVolResp::EntityID, PackPointerUnion::l, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, PackPointerUnion::s, and CigiBaseCollDetVolResp::VolID.
00099 { 00100 PackPointer CDta; 00101 00102 CigiBaseCollDetVolResp * Data = ( CigiBaseCollDetVolResp *)Base; 00103 00104 CDta.c = Buff; 00105 00106 *CDta.c++ = PacketID; 00107 *CDta.c++ = PacketSize; 00108 00109 *CDta.s++ = Data->EntityID; 00110 *CDta.c++ = Data->VolID; 00111 *CDta.c++ = (Cigi_uint8)(Data->CollType & 0x01); 00112 *CDta.s++ = Data->CollEntityID; 00113 *CDta.c++ = Data->CollVolID; 00114 *CDta.c++ = 0; 00115 *CDta.s++ = 0; 00116 *CDta.l++ = 0; 00117 00118 return(PacketSize); 00119 00120 }
int CigiCollDetVolRespV3::SetCollVolID | ( | const Cigi_uint8 | CollVolIDIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the CollVolID with bound checking control
CollVolIDIn | - | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 137 of file CigiCollDetVolRespV3.h.
References CIGI_SUCCESS.
00138 { 00139 CollVolID = CollVolIDIn; 00140 return(CIGI_SUCCESS); 00141 }
int CigiCollDetVolRespV3::SetVolID | ( | const Cigi_uint8 | VolIDIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the VolID with bound checking control
VolIDIn | - | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 116 of file CigiCollDetVolRespV3.h.
References CIGI_SUCCESS.
00117 { 00118 VolID = VolIDIn; 00119 return(CIGI_SUCCESS); 00120 }
int CigiCollDetVolRespV3::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 CigiBaseCollDetVolResp.
Definition at line 125 of file CigiCollDetVolRespV3.cpp.
References PackPointerUnion::c, CigiSwap2(), CigiBaseCollDetVolResp::CollEntityID, CigiBaseCollDetVolResp::CollType, CigiBaseCollDetVolResp::CollVolID, CigiBaseCollDetVolResp::EntityID, CigiBasePacket::PacketSize, PackPointerUnion::s, and CigiBaseCollDetVolResp::VolID.
00126 { 00127 PackPointer CDta; 00128 00129 CDta.c = Buff; 00130 00131 CDta.c += 2; // Step over packet id and size 00132 00133 if(!Swap) 00134 { 00135 EntityID = *CDta.s++; 00136 VolID = *CDta.c++; 00137 CollType = (CollTypeGrp)(*CDta.c++ & 0x01); 00138 CollEntityID = *CDta.s++; 00139 CollVolID = *CDta.c++; 00140 } 00141 else 00142 { 00143 CigiSwap2(&EntityID, CDta.s++); 00144 VolID = *CDta.c++; 00145 CollType = (CollTypeGrp)(*CDta.c++ & 0x01); 00146 CigiSwap2(&CollEntityID, CDta.s++); 00147 CollVolID = *CDta.c++; 00148 } 00149 00150 return(PacketSize); 00151 00152 }