8.17
S
CAN
C
OMMAND
F
EATURE
()
Prototype:
SCANAPI_API SCAN_RESULT ScanCommandFeature(HANDLE hScanner,eCommandID
nCommandId, CommandFeature_t* pCommandFeature);
Purpose:
This API enables a feature of ScanAPI or the scanner. It has been originally created to handle the
RFID AFI feature.
The RFID AFI feature is supported only for the tag ISO 15693 and with the Socket hardware that
has a firmware version 3005 or higher. The AFI feature is composed by a set of three functions.
Read AFI that reads an AFI value of a tag specified by its tag ID and tag type. Write AFI writes a
specific AFI value to the tag matching to the tag ID and tag type. The Lock AFI has to be used
with caution as this operation is irreversible. It locks an AFI value to a tag specified with the tag
ID and tag type. The tag will have the specified AFI value for ever.
Arguments:
[in] hScanner is the value received by the client application in lParam of the WM_INSERTION
message specified when ScanInit() was called that represents a handle to a scanner.
[in] eCommandID nCommandId is an enumerator containing the command identifier to be sent.
The current identifiers available are:
-
CMDID_READ_RFID_AFI: Read RFID AFI out of an RFID tag, the AFI is returned in dwRfidAfi
member of the CommandFeature_t structure.
-
CMDID_WRITE_RFID_AFI: Write RFID AFI into a RFID tag,
-
CMDID_LOCK_RFID_AFI: Lock RFID AFI into a RFID tag.
[in out] CommandFeature_t* pCommandFeature is a pointer to a structure. This parameter is
used as in or/and out parameter.
The CommandFeature_t structure has the following members:
-
dwStructSize: this member should contain the actual size of the structure
-
dwRfidAfi: this member contains the AFI code. This field is applicable only for RFID scanner
-
dwRfidTagType: this member contains the tag type of a RFID tag. The type supporting the AFI
feature is either 0 for AUTO DETECT TAG TYPE of 1 for TAG TYPE ISO15693.
-
pucRfidTagId[16]: this 16 bytes member contains the Tag ID (usually 10 bytes long) . For Tag
Type ISO15693 the first 10 bytes are used.
-
dwRfidTagIdLength: this field contains the actual length of the TAG ID.
This API is blocked and in the case of a READ AFI operation, the response will be store in the
CommandFeature_t structure pointed by pCommandFeature input/output parameter.
Returns:
SR_SUCCESS
The operation completed successfully. In the case of a Read AFI command, the AFI value is
returned in the dwRfidAfi field of the CommandFeature_t structure.
SR_INVALID_PARAMETERS
The operation could not be completed as at least one of the parameter passed in input is
incorrect because one of the following statement is true:
April 8, 2010
Page 43
Document#: 6410-00147 K
Revision 2.28