#include <CigiBaseEventNotification.h>
Inheritance diagram for CigiBaseEventNotification:
Public Member Functions | |
CigiBaseEventNotification () | |
virtual | ~CigiBaseEventNotification () |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const =0 |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec)=0 |
virtual int | GetCnvt (CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) |
int | SetEventID (const Cigi_uint16 EventIDIn, bool bndchk=true) |
Cigi_uint16 | GetEventID (void) const |
int | SetEventData (const Cigi_uint32 EventDataIn, int ndx, bool bndchk=true) |
int | SetEventData (const Cigi_int32 EventDataIn, int ndx, bool bndchk=true) |
int | SetEventData (const float EventDataIn, int ndx, bool bndchk=true) |
Cigi_uint32 | GetULEventData (int ndx) |
Cigi_int32 | GetLEventData (int ndx) |
float | GetFEventData (int ndx) |
Protected Attributes | |
Cigi_uint16 | EventID |
CigiBaseEventNotification::EventDataGrp | EventData |
Friends | |
class | CigiEventNotificationV3 |
Classes | |
union | EventDataGrp |
Definition at line 72 of file CigiBaseEventNotification.h.
CigiBaseEventNotification::CigiBaseEventNotification | ( | ) |
CigiBaseEventNotification::~CigiBaseEventNotification | ( | ) | [virtual] |
int CigiBaseEventNotification::GetCnvt | ( | CigiVersionID & | CnvtVersion, | |
CigiCnvtInfoType::Type & | CnvtInfo | |||
) | [virtual] |
A virtual Conversion Information function. This function provides conversion information for this packet.
CnvtVersion | - The CIGI version to which this packet is being converted. | |
CnvtInfo | - The information needed for conversion |
Reimplemented from CigiBasePacket.
Definition at line 86 of file CigiBaseEventNotification.cpp.
References CIGI_EVENT_NOTIFICATION_PACKET_ID_V3, CIGI_SUCCESS, CigiVersionID::CigiMajorVersion, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiCnvtInfoType::CigiCnvtInfoStruct::ProcID, CigiProcessType::ProcNone, and CigiProcessType::ProcStd.
00088 { 00089 if(CnvtVersion.CigiMajorVersion < 3) 00090 { 00091 CnvtInfo.ProcID = CigiProcessType::ProcNone; 00092 CnvtInfo.CnvtPacketID = 0; 00093 } 00094 else 00095 { 00096 CnvtInfo.ProcID = CigiProcessType::ProcStd; 00097 CnvtInfo.CnvtPacketID = CIGI_EVENT_NOTIFICATION_PACKET_ID_V3; 00098 } 00099 return(CIGI_SUCCESS); 00100 }
Cigi_uint16 CigiBaseEventNotification::GetEventID | ( | void | ) | const [inline] |
Gets the EventID value.
Definition at line 156 of file CigiBaseEventNotification.h.
References EventID.
00156 { return(EventID); }
float CigiBaseEventNotification::GetFEventData | ( | int | ndx | ) |
Gets the EventData value.
ndx | - Which of the 3 data words to access. |
Definition at line 213 of file CigiBaseEventNotification.cpp.
References EventData, CigiBaseEventNotification::EventDataGrp::f, and CigiBaseEventNotification::EventDataGrp::ul.
00214 { 00215 if((ndx < 0)||(ndx > 2)) 00216 { 00217 #ifndef CIGI_NO_EXCEPT 00218 throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); 00219 #endif 00220 if(ndx < 0) 00221 return((float)EventData.ul[0]); 00222 else 00223 return((float)EventData.ul[2]); 00224 } 00225 00226 return(EventData.f[ndx]); 00227 }
Cigi_int32 CigiBaseEventNotification::GetLEventData | ( | int | ndx | ) |
Gets the EventData value.
ndx | - Which of the 3 data words to access. |
Definition at line 191 of file CigiBaseEventNotification.cpp.
References EventData, and CigiBaseEventNotification::EventDataGrp::l.
00192 { 00193 if((ndx < 0)||(ndx > 2)) 00194 { 00195 #ifndef CIGI_NO_EXCEPT 00196 throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); 00197 #endif 00198 if(ndx < 0) 00199 return(EventData.l[0]); 00200 else 00201 return(EventData.l[2]); 00202 } 00203 00204 return(EventData.l[ndx]); 00205 }
Cigi_uint32 CigiBaseEventNotification::GetULEventData | ( | int | ndx | ) |
Gets the EventData value.
ndx | - Which of the 3 data words to access. |
Definition at line 169 of file CigiBaseEventNotification.cpp.
References EventData, and CigiBaseEventNotification::EventDataGrp::ul.
00170 { 00171 if((ndx < 0)||(ndx > 2)) 00172 { 00173 #ifndef CIGI_NO_EXCEPT 00174 throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); 00175 #endif 00176 if(ndx < 0) 00177 return(EventData.ul[0]); 00178 else 00179 return(EventData.ul[2]); 00180 } 00181 00182 return(EventData.ul[ndx]); 00183 }
virtual int CigiBaseEventNotification::Pack | ( | CigiBasePacket * | Base, | |
Cigi_uint8 * | Buff, | |||
void * | Spec | |||
) | const [pure virtual] |
A pure virtual Pack function. This function is not implemented in this class.
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. |
Implements CigiBasePacket.
Implemented in CigiEventNotificationV3.
int CigiBaseEventNotification::SetEventData | ( | const float | EventDataIn, | |
int | ndx, | |||
bool | bndchk = true | |||
) |
Sets the EventData with bound checking control
EventDataIn | - Event Data | |
ndx | - Which of the 3 data words to access. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 150 of file CigiBaseEventNotification.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, EventData, and CigiBaseEventNotification::EventDataGrp::f.
00151 { 00152 if((ndx < 0)||(ndx > 2)) 00153 { 00154 #ifndef CIGI_NO_EXCEPT 00155 throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); 00156 #endif 00157 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00158 } 00159 00160 EventData.f[ndx] = EventDataIn; 00161 return(CIGI_SUCCESS); 00162 }
int CigiBaseEventNotification::SetEventData | ( | const Cigi_int32 | EventDataIn, | |
int | ndx, | |||
bool | bndchk = true | |||
) |
Sets the EventData with bound checking control
EventDataIn | - Event Data | |
ndx | - Which of the 3 data words to access. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 131 of file CigiBaseEventNotification.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, EventData, and CigiBaseEventNotification::EventDataGrp::l.
00132 { 00133 if((ndx < 0)||(ndx > 2)) 00134 { 00135 #ifndef CIGI_NO_EXCEPT 00136 throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); 00137 #endif 00138 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00139 } 00140 00141 EventData.l[ndx] = EventDataIn; 00142 return(CIGI_SUCCESS); 00143 }
int CigiBaseEventNotification::SetEventData | ( | const Cigi_uint32 | EventDataIn, | |
int | ndx, | |||
bool | bndchk = true | |||
) |
Sets the EventData with bound checking control
EventDataIn | - Event Data | |
ndx | - Which of the 3 data words to access. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 112 of file CigiBaseEventNotification.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, EventData, and CigiBaseEventNotification::EventDataGrp::ul.
00113 { 00114 if((ndx < 0)||(ndx > 2)) 00115 { 00116 #ifndef CIGI_NO_EXCEPT 00117 throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); 00118 #endif 00119 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00120 } 00121 00122 EventData.ul[ndx] = EventDataIn; 00123 return(CIGI_SUCCESS); 00124 }
int CigiBaseEventNotification::SetEventID | ( | const Cigi_uint16 | EventIDIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the EventID with bound checking control
EventIDIn | - Event ID | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 147 of file CigiBaseEventNotification.h.
References CIGI_SUCCESS, and EventID.
00148 { 00149 EventID = EventIDIn; 00150 return(CIGI_SUCCESS); 00151 }
virtual int CigiBaseEventNotification::Unpack | ( | Cigi_uint8 * | Buff, | |
bool | Swap, | |||
void * | Spec | |||
) | [pure virtual] |
A pure virtual Unpack function. This function is not implemented in this class.
Buff | - A pointer to the current pack point. | |
Swap | - N/A for V1 & V2 | |
Spec | - A pointer to special data. |
Implements CigiBasePacket.
Implemented in CigiEventNotificationV3.
friend class CigiEventNotificationV3 [friend] |
Definition at line 75 of file CigiBaseEventNotification.h.
union CigiBaseEventNotification::EventDataGrp CigiBaseEventNotification::EventData [protected] |
Cigi_uint16 CigiBaseEventNotification::EventID [protected] |
EventID
Definition at line 229 of file CigiBaseEventNotification.h.
Referenced by CigiEventNotificationV3::CigiEventNotificationV3(), GetEventID(), CigiEventNotificationV3::Pack(), SetEventID(), and CigiEventNotificationV3::Unpack().