#include <CigiEventNotificationV3.h>
Inheritance diagram for CigiEventNotificationV3:
Public Member Functions | |
CigiEventNotificationV3 () | |
virtual | ~CigiEventNotificationV3 () |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec) |
Definition at line 57 of file CigiEventNotificationV3.h.
CigiEventNotificationV3::CigiEventNotificationV3 | ( | ) |
General Constructor
Definition at line 67 of file CigiEventNotificationV3.cpp.
References CIGI_EVENT_NOTIFICATION_PACKET_ID_V3, CIGI_EVENT_NOTIFICATION_PACKET_SIZE_V3, CigiBaseEventNotification::EventData, CigiBaseEventNotification::EventID, CigiBasePacket::MinorVersion, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, CigiBaseEventNotification::EventDataGrp::ul, and CigiBasePacket::Version.
00068 { 00069 00070 PacketID = CIGI_EVENT_NOTIFICATION_PACKET_ID_V3; 00071 PacketSize = CIGI_EVENT_NOTIFICATION_PACKET_SIZE_V3; 00072 Version = 3; 00073 MinorVersion = 0; 00074 00075 EventID = 0; 00076 EventData.ul[0] = 0; 00077 EventData.ul[1] = 0; 00078 EventData.ul[2] = 0; 00079 00080 }
CigiEventNotificationV3::~CigiEventNotificationV3 | ( | ) | [virtual] |
int CigiEventNotificationV3::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 CigiBaseEventNotification.
Definition at line 97 of file CigiEventNotificationV3.cpp.
References PackPointerUnion::c, CigiBaseEventNotification::EventData, CigiBaseEventNotification::EventID, CigiBaseEventNotification::EventDataGrp::l, PackPointerUnion::l, CigiBasePacket::PacketID, CigiBasePacket::PacketSize, and PackPointerUnion::s.
00098 { 00099 PackPointer CDta; 00100 00101 CigiBaseEventNotification * Data = ( CigiBaseEventNotification *)Base; 00102 00103 CDta.c = Buff; 00104 00105 *CDta.c++ = PacketID; 00106 *CDta.c++ = PacketSize; 00107 00108 *CDta.s++ = Data->EventID; 00109 *CDta.l++ = Data->EventData.l[0]; 00110 *CDta.l++ = Data->EventData.l[1]; 00111 *CDta.l++ = Data->EventData.l[2]; 00112 00113 return(PacketSize); 00114 00115 }
int CigiEventNotificationV3::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 CigiBaseEventNotification.
Definition at line 120 of file CigiEventNotificationV3.cpp.
References PackPointerUnion::c, CigiSwap2(), CigiSwap4(), CigiBaseEventNotification::EventData, CigiBaseEventNotification::EventID, PackPointerUnion::l, CigiBaseEventNotification::EventDataGrp::l, CigiBasePacket::PacketSize, and PackPointerUnion::s.
00121 { 00122 PackPointer CDta; 00123 00124 CDta.c = Buff; 00125 00126 CDta.c += 2; // Step over packet id and size 00127 00128 if(!Swap) 00129 { 00130 EventID = *CDta.s++; 00131 EventData.l[0] = *CDta.l++; 00132 EventData.l[1] = *CDta.l++; 00133 EventData.l[2] = *CDta.l++; 00134 } 00135 else 00136 { 00137 CigiSwap2(&EventID, CDta.s++); 00138 CigiSwap4(&EventData.l[0], CDta.l++); 00139 CigiSwap4(&EventData.l[1], CDta.l++); 00140 CigiSwap4(&EventData.l[2], CDta.l++); 00141 } 00142 00143 return(PacketSize); 00144 00145 }