RFID API Documentation  1.0
Reference guide for RFID API
Locationing

Functions

RFID_STATUS WINAPI RFID_PerformTagLocationing (RFID_HANDLE32 readerHandle, UINT8 *pTagID, UINT32 tagIDLength, LPANTENNA_INFO lpAntennaInfo, LPVOID rsvd, LPVOID rsvd1)
 This function performs the Tag locationing operation. More...
 
RFID_STATUS WINAPI RFID_StopTagLocationing (RFID_HANDLE32 readerHandle)
 This function stops the Tag Locationing operation. More...
 

Detailed Description

Function Documentation

◆ RFID_PerformTagLocationing()

RFID_STATUS WINAPI RFID_PerformTagLocationing ( RFID_HANDLE32  readerHandle,
UINT8 pTagID,
UINT32  tagIDLength,
LPANTENNA_INFO  lpAntennaInfo,
LPVOID  rsvd,
LPVOID  rsvd1 
)

This function performs the Tag locationing operation.

Parameters
[in]readerHandle
Handle to the RFID device.
[in]pTagID
Tag locationing operation will be performed on Tag with mentioned TagID.
[in]tagIDLength
Tag Length.
[in]lpAntennaInfo
Antenna List on which the Tag locationing operation is to be performed.
[in]rsvdReserved for future use.
[in]rsvd1Reserved for future 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 Handle provided is invalid
  • RFID_API_PARAM_ERROR Invalid parameter given
  • RFID_API_PARAM_OUT_OF_RANGE Parameter out of range [Antenna ID/GPI]
  • RFID_INVENTORY_IN_PROGRESS Inventory in progress, cannot perform requested operation
  • RFID_ACCESS_IN_PROGRESS Access Operation in progress, cannot perform requested operation
  • RFID_TAG_LOCATING_IN_PROGRESS Tag Locating in progress, cannot perform requested operation
  • RFID_NXP_EAS_SCAN_IN_PROGRESS NXP EAS SCAN in progress, cannot perform requested operation
Remarks
Locationing information of the tag reported as a result of RFID_PerformTagLocationing can be obtained using RFID_GetReadTag. The application can wait on the event registered for TAG_READ_EVENT before calling RFID_GetReadTag or RFID_GetEventData.
See also
RFID_StopTagLocationing
Remarks
Example:
RFID_HANDLE32 readerHandle;
if(RFID_API_SUCCESS == RFID_Connect(&readerHandle, NULL, 0, 0, NULL))
{
READER_CAPS readerCaps;
// Get the Reader Capability
rfidStatus = RFID_GetReaderCaps(readerHandle, &readerCaps);
if(readerCaps.tagLocationingSupported)
{
ANTENNA_INFO antennaInfoForTagLocationing;
LPTAG_DATA pTagData = NULL;
pTagData = RFID_AllocateTag(readerHandle);
// Give the EPC-id of the tag which you have in Field of View
//FD02-FDFD-FDFD-FDFD-FDFD-237D
UINT8 specificTag[12] = {0xFD, 0x02, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0X23, 0X7D};
UINT32 specificTagIdLength = 12;
UINT16 antennaList[1] = {1};
antennaInfoForTagLocationing.pAntennaList = antennaList;
antennaInfoForTagLocationing.pAntennaOpList = NULL;
antennaInfoForTagLocationing.length = 1;
// Start performing the Tag locationing operation
rfidStatus = RFID_PerformTagLocationing(readerHandle, specificTag, specificTagIdLength,
&antennaInfoForTagLocationing, NULL, NULL);
if(RFID_API_SUCCESS == rfidStatus)
{
Sleep(10000);
RFID_StopTagLocationing(readerHandle);
// Application can ideally wait on the TAG_READ_EVENT before calling RFID_GetReadTag
while(RFID_API_SUCCESS == RFID_GetReadTag(readerHandle, pTagData))
{
if(pTagData->lpLocation != NULL)
{
// Tag locatioin info is available now.
printf("\n relative distance = %d", pTagData->lpLocation->relativeDistance);
}
}
}
RFID_DeallocateTag(readerHandle, pTagData);
}
else
{
printf("Tag Locationing not supported");
}
rfidStatus = RFID_Disconnect(readerHandle);
}

◆ RFID_StopTagLocationing()

RFID_STATUS WINAPI RFID_StopTagLocationing ( RFID_HANDLE32  readerHandle)

This function stops the Tag Locationing operation.

Parameters
[in]readerHandleHandle to the RFID device.
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_NO_TAG_LOCATING_IN_PROGRESS There is no Tag locationing operation in progress
Remarks
See also
RFID_PerformTagLocationing
Remarks
Example: See
TAG_DATA::lpLocation
LPLOCATION_INFO lpLocation
location information.
Definition: rfidapiStructs.h:962
RFID_GetReaderCaps
#define RFID_GetReaderCaps
Definition: rfidapi.h:88
RFID_DeallocateTag
RFID_STATUS WINAPI RFID_DeallocateTag(RFID_HANDLE32 readerHandle, TAG_DATA *pTagData)
This function de-allocates the TAG_DATA structure previously created using RFID_AllocateTag.
Definition: rfidapi.cpp:3537
RFID_StopTagLocationing
RFID_STATUS WINAPI RFID_StopTagLocationing(RFID_HANDLE32 readerHandle)
This function stops the Tag Locationing operation.
Definition: rfidapi.cpp:6770
READER_CAPSW
Provides information on Reader Capabilities as reported by the Reader.
Definition: rfidapiStructs.h:531
RFID_Disconnect
RFID_STATUS WINAPI RFID_Disconnect(RFID_HANDLE32 readerHandle)
This function closes connection to the Reader.
Definition: rfidapi.cpp:1061
ANTENNA_INFO::length
UINT32 length
Number of elements in array pAntennaList .
Definition: rfidapiStructs.h:82
RFID_HANDLE32
void * RFID_HANDLE32
Definition: rfidapiTypes.h:76
UINT8
unsigned char UINT8
Definition: rfidapiTypes.h:26
ANTENNA_INFO
Contains Antenna Information to be used for Inventory or Access Operations.
Definition: rfidapiStructs.h:79
RFID_API_SUCCESS
@ RFID_API_SUCCESS
Definition: rfidapiErrors.h:27
UINT32
unsigned int UINT32
Definition: rfidapiTypes.h:30
ANTENNA_INFO::pAntennaOpList
OPERATION_QUALIFIER * pAntennaOpList
Definition: rfidapiStructs.h:84
TAG_DATA
Contains Tag related information.
Definition: rfidapiStructs.h:920
RFID_Connect
#define RFID_Connect
Definition: rfidapi.h:51
RFID_PerformTagLocationing
RFID_STATUS WINAPI RFID_PerformTagLocationing(RFID_HANDLE32 readerHandle, UINT8 *pTagID, UINT32 tagIDLength, LPANTENNA_INFO lpAntennaInfo, LPVOID rsvd, LPVOID rsvd1)
This function performs the Tag locationing operation.
Definition: rfidapi.cpp:6715
READER_CAPSW::tagLocationingSupported
BOOLEAN tagLocationingSupported
Indicates the reader’s ability to locate a tag.
Definition: rfidapiStructs.h:583
UINT16
unsigned short UINT16
Definition: rfidapiTypes.h:28
RFID_STATUS
RFID_STATUS
Definition: rfidapiErrors.h:26
LOCATION_INFO::relativeDistance
INT16 relativeDistance
Locationing result when using LOCATE_TAG mechanism.
Definition: rfidapiStructs.h:101
RFID_AllocateTag
LPTAG_DATA WINAPI RFID_AllocateTag(RFID_HANDLE32 readerHandle)
This function allocates and initializes the TAG_DATA structure for the application.
Definition: rfidapi.cpp:3438
RFID_GetReadTag
RFID_STATUS WINAPI RFID_GetReadTag(RFID_HANDLE32 readerHandle, LPTAG_DATA lpTagData)
This function returns a Tag if available.
Definition: rfidapi.cpp:3651
ANTENNA_INFO::pAntennaList
UINT16 * pAntennaList
Array for holding the Antennas to be used for the operation: Range: 1 - N (N = Max.
Definition: rfidapiStructs.h:80