00001
00056 #if !defined(_CIGI_BASE_EVENT_NOTIFICATION_INCLUDED_)
00057 #define _CIGI_BASE_EVENT_NOTIFICATION_INCLUDED_
00058
00059 #include "CigiBasePacket.h"
00060
00061
00062
00063
00064
00065 #define CIGI_EVENT_NOTIFICATION_PACKET_ID_V3 116
00066 #define CIGI_EVENT_NOTIFICATION_PACKET_SIZE_V3 16
00067
00068
00069 class CigiEventNotificationV3;
00070
00071
00072 class CIGI_SPEC CigiBaseEventNotification : public CigiBasePacket
00073 {
00074
00075 friend class CigiEventNotificationV3;
00076
00077 public:
00078
00079
00080
00081
00084 CigiBaseEventNotification();
00085
00086
00089 virtual ~CigiBaseEventNotification();
00090
00091
00092
00093
00094
00105 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00106
00107
00117 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00118
00119
00131 virtual int GetCnvt(CigiVersionID &CnvtVersion,
00132 CigiCnvtInfoType::Type &CnvtInfo);
00133
00134
00135
00136
00137
00138
00139
00140
00147 int SetEventID(const Cigi_uint16 EventIDIn, bool bndchk=true)
00148 {
00149 EventID = EventIDIn;
00150 return(CIGI_SUCCESS);
00151 }
00152
00153
00156 Cigi_uint16 GetEventID(void) const { return(EventID); }
00157
00158
00159
00160
00161
00162
00170 int SetEventData(const Cigi_uint32 EventDataIn, int ndx, bool bndchk=true);
00171
00172
00180 int SetEventData(const Cigi_int32 EventDataIn, int ndx, bool bndchk=true);
00181
00182
00190 int SetEventData(const float EventDataIn, int ndx, bool bndchk=true);
00191
00192
00199 Cigi_uint32 GetULEventData(int ndx);
00200
00201
00208 Cigi_int32 GetLEventData(int ndx);
00209
00210
00217 float GetFEventData(int ndx);
00218
00219
00220
00221 protected:
00222
00223
00224
00225
00229 Cigi_uint16 EventID;
00230
00231
00235 union EventDataGrp {
00236 Cigi_uint32 ul[3];
00237 Cigi_int32 l[3];
00238 float f[3];
00239 } EventData;
00240
00241
00242 };
00243
00244 #endif // #if !defined(_CIGI_BASE_EVENT_NOTIFICATION_INCLUDED_)