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] rsvd Reserved for future use.
[in] rsvd1 Reserved 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;
RFID_STATUS rfidStatus = RFID_API_SUCCESS;

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);
}


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