RFID_STATUS WINAPI RFID_RegisterEventNotificationCallback ( RFID_HANDLE32  readerHandle,
RFID_EVENT_TYPE *  pEvents,
UINT32  numEvents,
RfidEventCallbackFunction  pFnRfidEventCallbackFunction,
LPVOID  rsvd1,
LPVOID  rsvd2 
)

This function is used to enable notification of a group of events. Callback mechanism of event handling and win32-event based event handlings are mutually exclusive. Hence application shall stick to one mechanism and not attempt a combination of the two event handling mechanisms.

Parameters:
[in] readerHandle 
Handle to the RFID device.
[in] pEvents 
array of RFID_EVENT_TYPE that needs to be registered.
[in] numEvents 
Number of events being provided in pEvents.
[in] pFnRfidEventCallbackFunction 
Function pointer which receives Event notifications.
Returns:
If the function succeeds the return value is RFID_API_SUCCESS. If the function fails the return value is one of the following:
  • RFID_API_INVALID_HANDLE Invalid handle is provided
  • RFID_API_PARAM_ERROR Invalid parameter given
Remarks:
The application shall create array of RFID_EVENT_TYPE with the events of interest and a callback function RfidEventCallbackFunction which shall receive the callback upon occurance of a registered event.
See also:
RFID_GetEventData
Remarks:
Example: See
RFID_HANDLE32 readerHandle;
RFID_STATUS rfidStatus = RFID_API_SUCCESS;
VERSION_INFO versionInfo;

if(RFID_API_SUCCESS == RFID_Connect(&readerHandle, TEXT("157.235.207.88"), 0, 0, NULL))
{
RFID_EVENT_TYPE rfidEvents[12] = 
{
GPI_EVENT, TAG_READ_EVENT, BUFFER_FULL_EVENT, BUFFER_FULL_WARNING_EVENT, 
ANTENNA_EVENT, DISCONNECTION_EVENT, 
INVENTORY_START_EVENT, INVENTORY_STOP_EVENT, ACCESS_START_EVENT, ACCESS_STOP_EVENT, READER_EXCEPTION_EVENT
};

rfidStatus = RFID_RegisterEventNotificationCallback(readerHandle, rfidEvents,  12, (RfidEventCallbackFunction) rfidEventCallback, NULL, NULL);

// perform required operations

rfidStatus = RFID_Disconnect(readerHandle);
}


Generated on Fri Mar 4 02:25:29 2016 for RFIDAPI3 1.1 C API Documentation by  doxygen 1.5.6