RFID API Documentation  1.0
Reference guide for RFID API
EventManagement

Functions

RFID_STATUS WINAPI RFID_RegisterEventNotification (RFID_HANDLE32 readerHandle, RFID_EVENT_TYPE eventType, EVENT_HANDLE notifyObject)
 This function is used to enable notification of single Reader event type. More...
 
RFID_STATUS WINAPI RFID_SetEventNotificationParams (RFID_HANDLE32 readerHandle, RFID_EVENT_TYPE eventType, STRUCT_HANDLE pEventParams)
 This function is used to set event notification parameters of single Reader event type. More...
 
RFID_STATUS WINAPI RFID_DeregisterEventNotification (RFID_HANDLE32 readerHandle, RFID_EVENT_TYPE eventType)
 This function is used to disable notification of single Reader event type. More...
 
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. More...
 
RFID_STATUS WINAPI RFID_GetEventData (RFID_HANDLE32 readerHandle, RFID_EVENT_TYPE eventType, STRUCT_HANDLE pEventData)
 This function returns the event-data corresponding to a signaled event. More...
 

Detailed Description

Function Documentation

◆ RFID_RegisterEventNotification()

RFID_STATUS WINAPI RFID_RegisterEventNotification ( RFID_HANDLE32  readerHandle,
RFID_EVENT_TYPE  eventType,
EVENT_HANDLE  notifyObject 
)

This function is used to enable notification of single Reader event type.

This function has to be called for each event type.

Parameters
[in]readerHandle
Handle to the RFID device.
[in]eventType
An event of type RFID_EVENT_TYPE whose notification is requested.
[in]notifyObject
Handle to WIN32 Event corresponding to the registered event.
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
  • RFID_CONFIG_SET_FAILED Failed to register the event for notification
Remarks
The application shall create an event using the WIN32 API CreateEvent and pass it to this function as the notifyObject. GPI_EVENT - This event is triggered when the Reader reports the occurance of a GPI event on a specific port. The application can invoke the function RFID_GetEventData to fetch the event GPI_EVENT_DATA. TAG_READ_EVENT - This event is triggered as a result of Inventory / Read-Access requests using functions RFID_PerformInventory or RFID_Read or RFID_PerformAccessSequence. The application can invoke the function RFID_GetEventData or RFID_GetTagReadData to fetch the event TAG_DATA. BUFFER_FULL_WARNING_EVENT - This event occurs when the buffers at the Dll or the Reader are full. After the reporting of this event, further tags will be discarded. ANTENNA_EVENT - This event is triggered when the Reader reports the occurance of an Antenna event. The application can invoke the function RFID_GetEventData to fetch the event ANTENNA_EVENT_DATA. DISCONNECTION_EVENT - This event is triggered when the connection to the Reader is lost. When this event is signaled the application shall call RFID_Disconnect to clean up the Connection settings in the Dll.
See also
RFID_DeregisterEventNotification, RFID_GetEventData
Remarks
Example: See

◆ RFID_SetEventNotificationParams()

RFID_STATUS WINAPI RFID_SetEventNotificationParams ( RFID_HANDLE32  readerHandle,
RFID_EVENT_TYPE  eventType,
STRUCT_HANDLE  pEventParams 
)

This function is used to set event notification parameters of single Reader event type.

This function has to be called for each event type wherever applicable.

Parameters
[in]readerHandle
Handle to the RFID device.
[in]eventType
An event of type RFID_EVENT_TYPE whose notification is requested.
[in]pEventParams
Pointer to Event-Parameters which can be of type:
  • debugMask (byte array) for DEBUG_INFO_EVENT
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
  • RFID_CONFIG_SET_FAILED Failed to register the event for notification
Remarks
The Event Parameters for the event type shall be passed with this API

DEBUG_INFO_EVENT - This event is triggered when the Reader reports the debug Notifications

See also
RFID_DeregisterEventNotification, RFID_GetEventData
Remarks
Example: See

◆ RFID_DeregisterEventNotification()

RFID_STATUS WINAPI RFID_DeregisterEventNotification ( RFID_HANDLE32  readerHandle,
RFID_EVENT_TYPE  eventType 
)

This function is used to disable notification of single Reader event type.

This function has to be called for each event type.

Parameters
[in]readerHandle
Handle to the RFID device.
[in]eventType
An event of type RFID_EVENT_TYPE whose notification is requested.
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
None
See also
RFID_RegisterEventNotification, RFID_GetEventData
Remarks
Example: See

◆ RFID_RegisterEventNotificationCallback()

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.
[in]rsvd1
Reserved for futire use
[in]rsvd2
Reserved for futire use
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;
VERSION_INFO versionInfo;
if(RFID_API_SUCCESS == RFID_Connect(&readerHandle, TEXT("157.235.207.88"), 0, 0, NULL))
{
RFID_EVENT_TYPE rfidEvents[12] =
{
};
rfidStatus = RFID_RegisterEventNotificationCallback(readerHandle, rfidEvents, 12, (RfidEventCallbackFunction) rfidEventCallback, NULL, NULL);
// perform required operations
rfidStatus = RFID_Disconnect(readerHandle);
}

◆ RFID_GetEventData()

RFID_STATUS WINAPI RFID_GetEventData ( RFID_HANDLE32  readerHandle,
RFID_EVENT_TYPE  eventType,
STRUCT_HANDLE  pEventData 
)

This function returns the event-data corresponding to a signaled event.

Parameters
[in]readerHandle
Handle to the RFID device.
[in]eventType
The Event-type for which the Data is to be fetched
[out]pEventData
Pointer to Event-Data which can be of type:
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 Handle provided is invalid
  • RFID_API_PARAM_ERROR Invalid parameter given
Remarks
This function can be called when one of the events: TAG_READ_EVENT ANTENNA_EVENT or GPI_EVENT that was registered through function RFID_RegisterEventNotification() is signaled.
See also
RFID_RegisterEventNotification, RFID_PerformInventory, RFID_PerformAccessSequence, RFID_Read
Remarks
Example: See
ANTENNA_EVENT
@ ANTENNA_EVENT
A particular Antenna has been Connected or Disconnected.
Definition: rfidapiConstants.h:69
INVENTORY_START_EVENT
@ INVENTORY_START_EVENT
Inventory Operation has started.
Definition: rfidapiConstants.h:76
TAG_READ_EVENT
@ TAG_READ_EVENT
Applications can register for this event to get Tag Reports from the Reader.
Definition: rfidapiConstants.h:56
RfidEventCallbackFunction
void(WINAPI * RfidEventCallbackFunction)(RFID_HANDLE32 readerHandle, RFID_EVENT_TYPE eventType)
Definition: rfidapi.h:202
RFID_Disconnect
RFID_STATUS WINAPI RFID_Disconnect(RFID_HANDLE32 readerHandle)
This function closes connection to the Reader.
Definition: rfidapi.cpp:1061
DISCONNECTION_EVENT
@ DISCONNECTION_EVENT
Event notifying disconnection from the Reader.
Definition: rfidapiConstants.h:82
RFID_HANDLE32
void * RFID_HANDLE32
Definition: rfidapiTypes.h:76
BUFFER_FULL_EVENT
@ BUFFER_FULL_EVENT
When the internal buffers are 100% full, this event will be signaled and tags are discarded in FIFO m...
Definition: rfidapiConstants.h:86
RFID_RegisterEventNotificationCallback
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.
Definition: rfidapi.cpp:3160
READER_EXCEPTION_EVENT
@ READER_EXCEPTION_EVENT
Event notifying that an exception has occurred in the Reader.
Definition: rfidapiConstants.h:91
RFID_API_SUCCESS
@ RFID_API_SUCCESS
Definition: rfidapiErrors.h:27
VERSION_INFOW
This struct contains RFID Version Info.
Definition: rfidapiStructs.h:1757
BUFFER_FULL_WARNING_EVENT
@ BUFFER_FULL_WARNING_EVENT
When the internal buffers are 90% full, this event will be signaled.
Definition: rfidapiConstants.h:67
ACCESS_START_EVENT
@ ACCESS_START_EVENT
Access Operation has started.
Definition: rfidapiConstants.h:80
ACCESS_STOP_EVENT
@ ACCESS_STOP_EVENT
Access Operation has stopped.
Definition: rfidapiConstants.h:81
RFID_Connect
#define RFID_Connect
Definition: rfidapi.h:51
RFID_EVENT_TYPE
RFID_EVENT_TYPE
RFID_EVENT_TYPE is a parameter for RFID_RegisterEventNotification.
Definition: rfidapiConstants.h:47
RFID_STATUS
RFID_STATUS
Definition: rfidapiErrors.h:26
RFID_PerformInventory
RFID_STATUS WINAPI RFID_PerformInventory(RFID_HANDLE32 readerHandle, LPPOST_FILTER lpPostFilter, LPANTENNA_INFO lpAntennaInfo, LPTRIGGER_INFO lpTriggerInfo, LPVOID rsvd)
This function performs the inventory operation.
Definition: rfidapi.cpp:4156
INVENTORY_STOP_EVENT
@ INVENTORY_STOP_EVENT
Inventory Operation has stopped.
Definition: rfidapiConstants.h:78
GPI_EVENT
@ GPI_EVENT
A GPI event (state change from high to low, or low to high) has occurred on a GPI port.
Definition: rfidapiConstants.h:48