CAEN RFID API Reference Manual Reference Manual Revision n.
Scope of Manual This manual documents the API used by C, Java and .Net programmers who want to write applications for controlling and using CAEN RFID readers. Change Document Record Date 29 Jun 2010 Revision 01 14 Jan 2011 02 22 Mar 2011 03 Changes Initial release. Added BRAZIL radiofrequency regulation in the CAENRFIDRFRegulations Enumeration. Corrected GetTimeStamp Method’s return value.
Index Scope of Manual ....................................................................................................................................................... 2 Change Document Record ........................................................................................................................................ 2 Index.......................................................................................................................................... 3 List of Tables ............
QueryAck_EPC_C1G2 Method .............................................................................................................................................69 ReadBLockPermalock_EPC_C1G2 Method ...........................................................................................................................70 ReadTagData Method ..........................................................................................................................................................
GetRSSI Method .................................................................................................................................................................106 GetSource Method .............................................................................................................................................................106 GetTID Method ............................................................................................................................................
1 Introduction This Chapter gives basic information about CAENRFID Software Development Kit (SDK).
Overview on SDK CAEN RFID provides a Software Development Kit (SDK) aimed to facilitate the software developers in interfacing with its readers. The SDK provides Application Program Interfaces (API) for three programming languages: C, Java and J#/C#/Visual Basic .NET. The functionalities and the behaviors exported by the libraries are exactly the same for all the languages but, due to the syntax differences between them, there are differences in the implementation of functions and methods. Java and .
needed in order to maintain the communication active. The function returns an "handle" (very similar to the handles used in managing files) that have to be used in any subsequent function calls relative to that reader. At the end of the operation, a call to the CAENRFID_End function permits to close the communication link and to free the internal data structures. Return data mechanism As seen in the Error Handling paragraph, all the C functions return a numeric error codes.
2 CAEN RFID API Structure This chapter describes CAEN RFID API Structure.
CAENRFID Classes In .NET (henceforth C#) and Java languages, CAENRFID methods are divided into the following classes: Class CAENRFIDEventArgs2 CAENRFIDException CAENRFIDLogicalSource CAENRFIDNotify CAENRFIDReader CAENRFIDReaderInfo CAENRFIDTag Description This class defines the CAENRFID event arguments. This class defines the CAEN RFID exceptions. The CAENRFIDLogicalSource class is used to create logical source objects. Logical source objects represent an aggregation of read points (antennas).
Methods GetBufferedData GetDESB_ISO180006B GetName GetQ_EPC_C1G2 GetReadCycle GetSelected_EPC_C1G2 GetSession_EPC_C1G2 GetTarget_EPC_C1G2 GroupSelUnsel Hitachi_BlockLock Hitachi_BlockReadLock Hitachi_GetSystemInformation Hitachi_ReadLock Hitachi_SetAttenuate Hitachi_WriteMultipleWords InventoryTag isReadPointPresent KillTag_EPC_C1G1 KillTag_EPC_C1G2 LockBlockPermaLock_EPC_C1G2 LockTag_EPC_C1G2 LockTag_ISO180006B NXP_ChangeEAS NXP_EAS_Alarm NXP_ReadProtect NXP_ResetReadProtect ProgramID_EPC_C1G1 ProgramID_
Methods QueryAck_EPC_C1G2 ReadBLockPermalock_EPC_C1G2 ReadTagData ReadTagData_EPC_C1G2 RemoveReadPoint ResetSession_EPC_C1G2 SetDESB_ISO180006B SetQ_EPC_C1G2 SetReadCycle SetSelected_EPC_C1G2 SetSession_EPC_C1G2 SetTarget_EPC_C1G2 WriteTagData WriteTagData_EPC_C1G2 Description This method make the reader generate a sequence of EPC Class1 Gen2 Query and Ack commands. It can be used to read a single tag under the field. If there are more than one tag under the field the method fails.
Methods GetReaderInfo GetReadPoints GetReadPointStatus GetRFChannel GetRFRegulation GetSource GetSourceNames GetSources InventoryAbort RFControl Method SetBitRate SetDateTime SetIO SetIODIRECTION SetLBTMode SetNetwork SetPower SetProtocol SetRFChannel SetRFRegulation SetRS232 CAENRFIDReaderInfo Class GetModel GetSerialNumber CAENRFIDTag Class GetId GetLength GetReadPoint GetRSSI GetSource GetTID GetTimeStamp GetType Description Permits to read the reader information loaded into the device.
CAENRFID Enumerations The following enumerations are present in C# language They correspond to classes in Java language and to enumerations and data types in C language: Enumerations BitRate LogicalSourceConstants Port Protocol ReadPointStatus RFRegulations RS232Constants SelUnselOptions Description Gives a list of the supported radiofrequency profiles. Gives a list of constants used for the configuration of the logical sources.
3 Classes Description This chapter gives a description of CAENRFID methods divided into classes.
CAENRFIDException Class The CAENRFIDException class defines the CAEN RFID exceptions. getError Method Description: This method gets the error string associated to the exception. Return value: The string representing the error. Syntax: C# representation: public string getError() JAVA representation: public java.lang.String getError() Remarks: This function does not exist in C language, see § Error Handling pag. 7 for more informations.
CAENRFIDLogicalSource Class The CAENRFIDLogicalSource class is used to create logical source objects. Logical source objects represent an aggregation of read points (antennas). Operations on the tags are performed using methods belonging to the logical source. In addition to the methods used to operate on the tags, the logical source class exports methods to configure the anticollision algorithm and to configure the composition of the logical source itself.
BlockWriteTagData Method BlockWriteTagData Method (CAENRFIDTag, Int16, Int16, Byte[]) Description: This method can be used to write a portion of the user memory in a ISO18000-6B tag using blocks of four bytes for each command. Parameters: Name Tag Address Length Data Description The CAENRFIDTag representing the tag to be written. The address where to start writing the data. The number of byte to be written. The data to be written into the tag's user memory.
BlockWriteTagData Method (CAENRFIDTag, Int16, Int16, Int16, Byte[]) Description: This method can be used to write a portion of the user memory in a ISO18000-6B tag using blocks of four bytes for each command. Parameters: Name Tag Address Mask Length Data Description The CAENRFIDTag representing the tag to be written. The address where to start writing the data. A bitmask that permit to select which of the four bytes have to be written (i.e.
CustomCommand_EPC_C1G2 Method CustomCommand_EPC_C1G2 Method (CAENRFIDTag, Byte, Int16, Byte[], Int16) Description: This method can be used to issue a generic Custom command as defined by the EPC Class1 Gen2 protocol specification. The parameters are used to specify the type of the custom command and its parameters. Parameters: Name Tag SubCmd TxLen Data RxLen Description The CAENRFIDTag object representing the tag to which send the Custom command. The SubCommand field of the Custom command.
CustomCommand_EPC_C1G2 Method (CAENRFIDTag, Byte, Int16, Byte[], Int16, Int32) Description: This method can be used to issue a generic Custom command as defined by the EPC Class1 Gen2 protocol specification. The parameters are used to specify the type of the custom command and its parameters. The Custom command is executed after an Access command to switch the tag in the Secured state using the provided password.
Fujitsu_BurstErase Method Fujitsu_BurstErase Method (CAENRFIDTag, Byte, Int16, Byte) Description: This method can be used to issue a BurstErase custom command as defined by the Fujitsu datasheet. Parameters: Name Tag MemBank Address Length Description The CAENRFIDTag representing the tag to be written. The memory bank where to erase the data. The address where to erase the data. The number of byte to be erased. Return value: A byte representing the "Write-locked" response of the tag.
Fujitsu_BurstErase Method (CAENRFIDTag, Byte, Int16, Byte, Int32) Description: This method can be used to issue a BurstErase custom command as defined by the Fujitsu datasheet after having put it in Secured state using the Access command. Parameters: Name Tag MemBank Address Length AccessPassword Description The CAENRFIDTag representing the tag to be written. The memory bank where to erase the data. The address where to erase the data. The number of byte to be erased. The access password.
Fujitsu_BurstWrite Method Fujitsu_BurstWrite Method (CAENRFIDTag, Byte, Int16, Byte, Byte[]) Description: This method can be used to issue a BurstWrite custom command as defined by the Fujitsu datasheet. Parameters: Name Tag MemBank Address Length Data Description The CAENRFIDTag representing the tag to be written. The memory bank where to write the data. The address where to start writing the data. The number of byte to be written. An array of bytes representing the data to be written into the tag.
Fujitsu_BurstWrite Method (CAENRFIDTag, Byte, Int16, Byte, Byte[], Int32) Description: This method can be used to issue a BurstWrite custom command as defined by the Fujitsu datasheet after having put it in Secured state using the Access command. Parameters: Name Tag MemBank Address Length Data AccessPassword Description The CAENRFIDTag representing the tag to be written. The memory bank where to write the data. The address where to start writing the data. The number of byte to be written.
Fujitsu_ChgBlockGroupPassword Method Fujitsu_ChgBlockGroupPassword Method (CAENRFIDTag, Byte, Int32, Int32) Description: This method can be used to issue a ChgBlockGroupPassword custom command as defined by the Fujitsu datasheet. Parameters: Name Tag BlockGroupPtr NewPassword OldPassword Description The CAENRFIDTag representing the tag to be selected. The BlockGroupPtr parameter as defined by the Fujitsu datasheet. The new password to set. The current password.
Fujitsu_ChgBlockGroupPassword Method (CAENRFIDTag, Byte, Int32, Int32, Int32) Description: This method can be used to issue a ChgBlockGroupPassword custom command as defined by the Fujitsu datasheet after having put it in Secured state using the Access command. Parameters: Name Tag BlockGroupPtr NewPassword OldPassword AccessPassword Description The CAENRFIDTag representing the tag to be selected. The BlockGroupPtr parameter as defined by the Fujitsu datasheet. The new password to set.
Fujitsu_ChgBlockLock Method Fujitsu_ChgBlockLock Method (CAENRFIDTag, Byte, Int32, Int32) Description: This method can be used to issue a ChgBlockLock custom command as defined by the Fujitsu datasheet. Parameters: Name Tag BlockGroupPtr Payload UserPassword Description The CAENRFIDTag representing the tag to be selected. The BlockGroupPtr parameter as defined by the Fujitsu datasheet. The Payload parameter as defined by the Fujitsu datasheet. The Password parameter as defined by the Fujitsu datasheet.
Fujitsu_ChgBlockLock Method (CAENRFIDTag, Byte, Int32, Int32, Int32) Description: This method can be used to issue a ChgBlockLock custom command as defined by the Fujitsu datasheet after having put it in Secured state using the Access command. Parameters: Name Tag BlockGroupPtr Payload UserPassword AccessPassword Description The CAENRFIDTag representing the tag to be selected. The BlockGroupPtr parameter as defined by the Fujitsu datasheet. The Payload parameter as defined by the Fujitsu datasheet.
Fujitsu_ChgWordLock Method Fujitsu_ChgWordLock Method (CAENRFIDTag, Byte, Int16, Byte, Int32) Description: This method can be used to issue a ChgWordLock custom command as defined by the Fujitsu datasheet. Parameters: Name Tag MemBank WordPtr Payload UserPassword Description The CAENRFIDTag representing the tag to be selected. The memory bank (only user memory is valid). The WordPtr parameter as defined by the Fujitsu datasheet. The Payload parameter as defined by the Fujitsu datasheet.
Fujitsu_ChgWordLock Method (CAENRFIDTag, Byte, Int16, Byte, Int32, Int32) Description: This method can be used to issue a ChgWordLock custom command as defined by the Fujitsu datasheet after having put it in Secured state using the Access command. Parameters: Name Tag MemBank WordPtr Payload UserPassword AccessPassword Description The CAENRFIDTag representing the tag to be selected. The memory bank (only user memory is valid). The WordPtr parameter as defined by the Fujitsu datasheet.
Fujitsu_ReadBlockLock Method Fujitsu_ReadBlockLock Method (CAENRFIDTag, Byte) Description: This method can be used to issue a ReadBlockLock custom command as defined by the Fujitsu datasheet. Parameters: Name Tag BlockGroupPtr Description The CAENRFIDTag representing the tag to be selected. The BlockGroupPtr parameter as defined by the Fujitsu datasheet. Return value: An array of bytes representing the BlockLockFlag of the tag.
Fujitsu_ReadBlockLock Method (CAENRFIDTag, Byte, Int32) Description: This method can be used to issue a ReadBlockLock custom command as defined by the Fujitsu datasheet after having put it in Secured state using the Access command. Parameters: Name Tag BlockGroupPtr AccessPassword Description The CAENRFIDTag representing the tag to be selected. The BlockGroupPtr parameter as defined by the Fujitsu datasheet. The access password. Return value: An array of bytes representing the BlockLockFlag of the tag.
Fujitsu_Refresh Method Fujitsu_Refresh Method (CAENRFIDTag, Byte) Description: This method can be used to issue a Refresh custom command as defined by the Fujitsu datasheet. Parameters: Name Tag Option Description The CAENRFIDTag representing the tag to be selected. The option parameter as defined by the Fujitsu datasheet.
GetBufferedData Method Description: This method returns all the Tags stored in reader's buffer using all the ReadPoints belonging to the Source. Only on A828BT. Return value: An array of CAENRFIDTag objects detected.
GetName Method Description: This method gets a string representing the name of the logical source. Return value: A string representing the name of the logical source. Syntax: C# representation: public string GetName() JAVA representation: public java.lang.String GetName() Remarks: This function does not exist in C language, see § Overview on SDK pag. 7 for more informations.
GetReadCycle Method Description: This method gets the current setting for the number of read cycles performed by the logical source during the inventory algorithm execution. ReadCycle affects only inventory performed with continuos mode (see EventInventoryTag method). Return value: The number of read cycles.
GetSession_EPC_C1G2 Method Description: This method can be used to retrieve the Session setting (see EPC Class1 Gen2 protocol specification) used by the anticollision algorithm when called on this logical source. Return value: The current Session value setting.
GroupSelUnsel Method Description: This method can be used to send a Group Select/Unselect command to the tag (see ISO18000-6B protocol specification). Parameters: Name Code Address BitMask Data Description The operation code as defined by the protocol. The Address from which start the comparison. The bit mask to use. The data to be compared. Return value: The selected tag.
Hitachi_BlockLock Method Hitachi_BlockLock Method (CAENRFIDTag, Byte, Int32, Byte) Description: This method can be used to issue a BlockLock custom command as defined by the Hitachi Hibiki datasheet. Parameters: Name Tag BlockNum UserPassword Payload Description The CAENRFIDTag representing the tag to select. The index of the memory block to be locked. The user password. The Payload parameter for the BlockLock custom command as defined by Hitachi Hibiki datasheet.
Hitachi_BlockLock Method (CAENRFIDTag, Byte, Int32, Byte, Int32) Description: This method can be used to issue a BlockLock custom command as defined by the Hitachi Hibiki datasheet after having put it in Secured state using the Access command. Parameters: Name Tag BlockNum UserPassword Payload AccessPassword Description The CAENRFIDTag representing the tag to select. The index of the memory block to be locked. The user password.
Hitachi_BlockReadLock Method Hitachi_BlockReadLock Method (CAENRFIDTag, Byte, Int32, Byte) Description: This method can be used to issue a BlockReadLock custom command as defined by the Hitachi Hibiki datasheet. Parameters: Name Tag BlockNum UserPassword Payload Description The CAENRFIDTag representing the tag to select. The index of the memory block to be locked. The user password. The Payload parameter for the BlockReadLock custom command as defined by Hitachi Hibiki datasheet.
Hitachi_BlockReadLock Method (CAENRFIDTag, Byte, Int32, Byte, Int32) Description: This method can be used to issue a BlockReadLock custom command as defined by the Hitachi Hibiki datasheet after having put it in Secured state using the Access command. Parameters: Name Tag BlockNum UserPassword Payload AccessPassword Description The CAENRFIDTag representing the tag to select. The index of the memory block to be locked. The user password.
Hitachi_GetSystemInformation Method Hitachi_GetSystemInformation Method (CAENRFIDTag) Description: This method can be used to issue a GetSystemInformation custom command as defined by the Hitachi Hibiki datasheet. Parameters: Name Tag Description The CAENRFIDTag representing the tag to be selected. Return value: The command response as defined by the Hitachi Hibiki datasheet.
Hitachi_ReadLock Method Hitachi_ReadLock Method (CAENRFIDTag, Int16) Description: This method can be used to issue a ReadLock custom command as defined by the Hitachi Hibiki datasheet. Parameters: Name Tag Payload Description The CAENRFIDTag object representing the tag to select. The Payload parameter for the ReadLock custom command as defined by Hitachi Hibiki datasheet.
Hitachi_SetAttenuate Method Hitachi_SetAttenuate Method (CAENRFIDTag, Byte, Boolean) Description: This method can be used to issue a SetAttenuate custom command as defined by the Hitachi Hibiki datasheet. Parameters: Name Tag Level LevelLock Description The CAENRFIDTag representing the tag to be selected. The level of attenuation. A flag that permit to lock permanently the attenuation level.
Hitachi_SetAttenuate Method (CAENRFIDTag, Byte, Boolean, Int32) Description: This method can be used to issue a SetAttenuate custom command as defined by the Hitachi Hibiki datasheet after having put it in Secured state using the Access command. Parameters: Name Tag Level LevelLock AccessPassword Description The CAENRFIDTag representing the tag to be selected. The level of attenuation. A flag that permit to lock permanently the attenuation level. The access password.
Hitachi_WriteMultipleWords Method Hitachi_WriteMultipleWords Method (CAENRFIDTag, Int16, Int16, Int16, Byte[]) Description: This method can be used to issue a WriteMultipleWords custom command as defined by the Hitachi Hibiki datasheet. Parameters: Name Tag MemBank Address Length Data Description The CAENRFIDTag representing the tag to select. The memory bank where to write the data. The address where to start writing the data. The number of byte to be written.
Hitachi_WriteMultipleWords Method (CAENRFIDTag, Int16, Int16, Int16, Byte[], Int32) Description: This method can be used to issue a WriteMultipleWords custom command as defined by the Hitachi Hibiki datasheet after having put it in Secured state using the Access command. Parameters: Name Tag MemBank Address Length Data AccessPassword Description The CAENRFIDTag representing the tag to select. The memory bank where to write the data. The address where to start writing the data.
InventoryTag Method InventoryTag Method () Description: A call to this method will execute a read cycle on each read point linked to the logical source. Depending on the air protocol setting it will execute the appropriate anticollision algorithm. Return value: An array containing the CAENRFIDTag objects representing the tags read from the read points.
InventoryTag Method (Byte[], Int16, Int16) Description: A call to this method will execute a read cycle on each read point linked to the logical source. Parameters: Name Mask MaskLength Position Description A byte array representing the bitmask to apply. A value representing the bit-oriented length of the bitmask. A value representing the first bit of ID where the match will start. Return value: An array containing the CAENRFIDTag objects representing the tags read from the read points.
InventoryTag Method (Byte[], Int16, Int16, Int16) Description: A call to this method will execute a read cycle on each read point linked to the logical source. Parameters: Name Mask MaskLength Position Flag Description A byte array representing the bitmask to apply. A value representing the bit-oriented length of the bitmask. A value representing the first bit of ID where the match will start. A bitmask representing the InventoryTag options.
Remarks: Depending on the air protocol setting it will execute the appropriate anticollision algorithm. This version of the method permits to specify a bitmask for filtering tag's populations as described by the EPC Class1 Gen2 (ISO18000-6C) air protocol. The filtering will be performend on the memory bank specified by bank parameter, starting at the bit indicated by the Position index and for a MaskLength length. The method will return only the tags that matches the given Mask.
InventoryTag Method (Int16, Byte[], Int16, Int16) Description: A call to this method will execute a read cycle on each read point linked to the logical source. Parameters: Name bank Mask MaskLength Position Description A value representing the memory bank where apply the filter. A byte array representing the bitmask to apply. A value representing the bit-oriented length of the bitmask. A value representing the first bit of ID where the match will start.
InventoryTag Method (Int16, Byte[], Int16, Int16, Int16) Description: A call to this method will execute a read cycle on each read point linked to the logical source. Parameters: Name bank Mask MaskLength Position Flag Description A value representing the memory bank where apply the filter. A byte array representing the bitmask to apply. A value representing the bit-oriented length of the bitmask. A value representing the first bit of ID where the match will start.
Remarks: Depending on the air protocol setting it will execute the appropriate anticollision algorithm. This version of the method permits to specify a bitmask for filtering tag's populations as described by the EPC Class1 Gen2 (ISO18000-6C) air protocol. The filtering will be performend on the memory bank specified by bank parameter, starting at the bit indicated by the Position index and for a MaskLength length. The method will return only the tags that matches the given Mask.
isReadPointPresent Method Description: This method checks if a read point is present in the logical source. Parameters: Name ReadPoint Description A string representing the name of the read point (antenna). Return value: A boolean value representing the presence of a read point in the logical source (true means that it is present, false if it is not present). Syntax: C# representation: public bool isReadPointPresent( string ReadPoint) JAVA representation: public boolean isReadPointPresent( java.lang.
KillTag_EPC_C1G2 Method KillTag_EPC_C1G2 Method (CAENRFIDTag, Int32) Description: This method can be used to kill a EPC Class 1 Gen 2 tag. Parameters: Name Tag Password Description The CAENRFIDTag representing the tag to be killed. The tag's kill password.
KillTag_EPC_C1G2 Method (Int16, Int16, Int16, Byte[], Int32) Description: This method can be used to kill a EPC Class 1 Gen 2 tag. Parameters: Name BankMask PositionMask LengthMask Mask Password Description Memory bank for tag identificantion. Bit position (from the start of the selected bank) where apply the mask to match. Length of the mask. Mask of byte. The tag's kill password.
LockBlockPermaLock_EPC_C1G2 Method Description: This method implements the BLockPermaLock with ReadLock=1 as specified in EPC C1G2 rev. 1.2.0 protocol. Parameters: Name Tag MemBank BlockPtr BlockRange Mask AccessPassword Description The CAENRFIDTag representing the tag to be written. The memory bank where to write the data. The address where to start writing the data. The number of word of the mask. A bitmask that permit to select which of the four bytes have to be locked (i.e.
LockTag_EPC_C1G2 Method LockTag_EPC_C1G2 Method (CAENRFIDTag, Int32) Description: This method can be used to lock a memory bank of a EPC Class 1 Gen 2 tag. Parameters: Name Tag Payload Description The CAENRFIDTag representing the tag to be locked. The Payload parameter for the lock command as defined by the EPC Class 1 Gen 2 protocol specification.
LockTag_EPC_C1G2 Method (Int16, Int16, Int16, Byte[], Int32) Description: This method can be used to lock a memory bank of a EPC Class 1 Gen 2 tag. Parameters: Name BankMask PositionMask LengthMask Mask Payload Description Memory bank for tag identificantion. Bit position (from the start of the selected bank) where apply the mask to match. Length of the mask. Mask of byte. The Payload parameter for the lock command as defined by the EPC Class 1 Gen 2 protocol specification.
LockTag_EPC_C1G2 Method (Int16, Int16, Int16, Byte[], Int32, Int32) Description: This method can be used to lock a memory bank of a EPC Class 1 Gen 2 tag after having put it in Secured state using the Access command. Parameters: Name BankMask PositionMask LengthMask Mask Payload AccessPassword Description Memory bank for tag identification. Bit position (from the start of the selected bank) where apply the mask to match. Length of the mask. Mask of byte.
LockTag_ISO180006B Method Description: This method can be used to lock a byte in the memory of a ISO18000-6B tag. Parameters: Name Tag Address Description The CAENRFIDTag representing the tag to be locked. The byte's address to lock.
NXP_EAS_Alarm Method Description: This method can be used to issue a EAS_Alarm custom command as defined by the NXP G2XM and G2XL datasheet. Return value: An array of bytes representing the EAS Code.
NXP_ReadProtect Method (CAENRFIDTag, Int32) Description: This method can be used to issue a ReadProtect custom command as defined by the NXP G2XM and G2XL datasheet after having put it in Secured state using the Access command. Parameters: Name Tag AccessPassword Description The CAENRFIDTag object representing the tag to select. The access password.
ProgramID_EPC_C1G1 Method Description: This method can be used to write the EPC of a EPC Class 1 Gen 1 tag. Parameters: Name Tag Password Lock Description The CAENRFIDTag representing the tag to be programmed, the ID contained in this object will be programmed into the tag. The password needed in order to write into the tag. A flag used to lock the EPC in the tag (1 if the EPC have to be locked).
ProgramID_EPC_C1G2 Method (CAENRFIDTag, Int16, Int32) Description: This method can be used to write the EPC of a EPC Class 1 Gen 2 tag after having put it in Secured state using the Access command. Parameters: Name Tag NSI AccessPassword Description The CAENRFIDTag representing the tag to be programmed, the ID contained in this object will be programmed into the tag. The Numbering System Identifier as defined in EPC Class 1 Gen 2 protocol specifications. The access password.
Query_EPC_C1G2 Method Description: This method makes the reader generate a EPC Class1 Gen2 Query command. Return value: True on successfull completion.
ReadBLockPermalock_EPC_C1G2 Method Description: This method implements the BLockPermaLock with ReadLock=0 as specified in EPCC1G2 rev. 1.2.0 protocol. Parameters: Name Tag MemBank Blockptr BlockRange AccessPassword Description The CAENRFIDTag representing the tag to be read. The memory bank where to read the data. The address where to start reading the data. The number of word to be read. The access password. Return value: An array of bytes representing the data read from the tag.
ReadTagData Method Description: This method can be used to read a portion of the user memory in a ISO18000-6B tag. Parameters: Name Tag Address Length Description The CAENRFIDTag representing the tag to be read. The address where to start reading the data. The number of byte to be read. Return value: An array of bytes representing the data read from the tag.
ReadTagData_EPC_C1G2 Method ReadTagData_EPC_C1G2 Method (CAENRFIDTag, Int16, Int16, Int16) Description: This method can be used to read a portion of memory in a ISO18000-6C (EPC Class1 Gen2) tag. Parameters: Name Tag MemBank Address Length Description The CAENRFIDTag representing the tag to be read. The memory bank where to read the data. The address where to start reading the data. The number of byte to be read. Return value: An array of bytes representing the data read from the tag.
ReadTagData_EPC_C1G2 Method (CAENRFIDTag, Int16, Int16, Int16, Int32) Description: This method can be used to read a portion of memory in a ISO18000-6C (EPC Class1 Gen2) tag after having put the tag in Secured state using the Access command. Parameters: Name Tag MemBank Address Length AccessPassword Description The CAENRFIDTag representing the tag to be read. The memory bank where to read the data. The address where to start reading the data. The number of byte to be read. The access password.
ReadTagData_EPC_C1G2 Method (Int16, Int16, Int16, Byte[], Int16, Int16, Int16) Description: This method can be used to read a portion of memory in a ISO18000-6C (EPC Class1 Gen2) tag. In this case the target tag is identified by 'LenghtMask' bytes of passed mask placed in a memory bank 'BankMask' at 'PositionMask' byte from bank starting address byte. Parameters: Name BankMask PositionMask LengthMask Mask MemBank Address Length Description Memory bank for tag identificantion.
ReadTagData_EPC_C1G2 Method (Int16, Int16, Int16, Byte[], Int16, Int16, Int16, Int32) Description: This method can be used to read a portion of memory in a ISO18000-6C (EPC Class1 Gen2) tag. In this case the target tag is identified by 'LenghtMask' bytes of passed mask placed in a memory bank 'BankMask' at 'PositionMask' byte from bank starting address byte. This is the secure version using the Access command.
RemoveReadPoint Method Description: This method removes a read point from the logical source. Parameters: Name ReadPoint Description A string representing the name of the read point (antenna). Syntax: C# representation: public void RemoveReadPoint( string ReadPoint) JAVA representation: public void RemoveReadPoint( java.lang.
SetDESB_ISO180006B Method Description: This method can be used to set the Data Exchange Status Bit (see ISO18000-6B protocol specification) used by the anticollision algorithm when called on this logical source. Parameters: Name Value Description The DESB setting value.
SetReadCycle Method Description: This method sets the number of read cycles to be performed by the logical source during the inventory algorithm execution. Parameters: Name value Description The number of read cycles.
SetSession_EPC_C1G2 Method Description: This method can be used to set the Session (see EPC Class1 Gen2 protocol specification) used by the anticollision algorithm when called on this logical source. Parameters: Name Value Description The Session value.
WriteTagData Method Description: This method can be used to write a portion of the user memory in a ISO18000-6B tag. Parameters: Name Tag Address Length Data Description The CAENRFIDTag representing the tag to be written. The address where to start writing the data. The number of byte to be written. The data to be written into the tag's user memory.
WriteTagData_EPC_C1G2 Method WriteTagData_EPC_C1G2 Method (CAENRFIDTag, Int16, Int16, Int16, Byte[]) Description: This method can be used to write a portion of memory in a ISO18000-6C (EPC Class1 Gen2) tag. Parameters: Name Tag MemBank Address Length Data Description The CAENRFIDTag representing the tag to be written. The memory bank where to write the data. The address where to start writing the data. The number of byte to be written. An array of bytes representing the data to be written into the tag.
WriteTagData_EPC_C1G2 Method (CAENRFIDTag, Int16, Int16, Int16, Byte[], Int32) Description: This method can be used to write a portion of memory in a ISO18000-6C (EPC Class1 Gen2) tag after having put the tag in Secured state using the Access command. Parameters: Name Tag MemBank Address Length Data AccessPassword Description The CAENRFIDTag representing the tag to be written. The memory bank where to write the data. The address where to start writing the data. The number of byte to be written.
WriteTagData_EPC_C1G2 Method (Int16, Int16, Int16, Byte[], Int16, Int16, Int16, Byte[]) Description: This method can be used to write a portion of memory in a ISO18000-6C (EPC Class1 Gen2) tag. Parameters: Name BankMask PositionMask LengthMask Mask MemBank Address Length Data Description Memory bank for tag identificantion. Bit position (from the start of the selected bank) where apply the mask to match. Length of the mask. Mask of byte. The memory bank where to write the data.
WriteTagData_EPC_C1G2 Method (Int16, Int16, Int16, Byte[], Int16, Int16, Int16, Byte[], Int32) Description: This method can be used to write a portion of memory in a ISO18000-6C (EPC Class1 Gen2) tag after having put the tag in Secured state using the Access command. Parameters: Name BankMask PositionMask LengthMask Mask MemBank Address Length Data AccessPassword Description Memory bank for tag identificantion. Bit position (from the start of the selected bank) where apply the mask to match.
CAENRFIDNotify Class The CAENRFIDNotify class defines the structure of a notification message. In both Java and C# lanuguage this class is composed by methods while in C language is present as a struct (for more informations see § Overview on SDK pag.
getRSSI Method Description: This method returns the RSSI value measured for the tag. Return value: The tag's RSSI. Syntax: C# representation: public short getRSSI() JAVA representation: public short getRSSI() getStatus Method Description: This method returns the event type associated to the tag. Return value: The event type associated to the Tag.
getTagSource Method Description: This method returns the name of the logical source that has detected the tag. Return value: The name of the logical source that has detected the tag. Syntax: C# representation: public string getTagSource() JAVA representation: public java.lang.String getTagSource() getTagType Method Description: This method returns the air protocol of the tag. Return value: The air protocol of the tag.
CAENRFIDReader Class The CAENRFIDReader class is used to create reader objects which permit to access to CAEN RFID readers' configuration and control commands. Connect Method Description: In C# and Java languages, this method starts the communication with the reader. It must be called before any other call to method of the CAENRFIDReader object. See § Managing connections with the readers pag. 7 for more informations.
Disconnect Method Description: In C# and Java languages, this method closes the connection with the CAEN RFID Reader releasing all the allocated resources. See § Managing connections with the readers pag. 7 for more informations. Syntax: C# representation: public void Disconnect() JAVA representation: public void Disconnect() throws CAENRFIDException End Description: In C language, this function closes the connection with the CAEN RFID Reader releasing all the allocated resources.
GetFirmwareRelease Method Description: This method permits to read the release of the firmware loaded into the device. Return value: A string representing the firmware release of the device. Syntax: C# representation: public string GetFirmwareRelease() JAVA representation: public java.lang.
GetIODirection Method Description: This method gets the current I/O direction setting as a bitmask. Each bit represent a I/O line, a value of 0 means that the line is configured as an input, 1 as an output. This setting has a meaning only for those readers with configurable I/O lines. Return value: A bitmask representing the I/O setting.
GetPower Method Description: This method gets the current setting of the RF power expressed in mW. Return value: The current conducted RF power expressed in mW. Syntax: C# representation: public int GetPower() JAVA representation: public int GetPower() throws CAENRFIDException C representation: CAENRFIDErrorCodes CAENRFID_GetPower( CAENRFIDHandle unsigned int handle, *Power); GetProtocol Method Description: This method gets the current air protocol of the Reader.
GetReaderInfo Method Description: This method permits to read the reader information loaded into the device. Return value: The reader information of the device.
GetReadPointStatus Method Description: This method gets the CAENRFIDReadPointStatus object representing the status of a read point (antenna). Parameters: Name ReadPoint Description The name of the read point to check. Return value: The CAENRFIDReadPointStatus object rapresenting the current status of the read point. Syntax: C# representation: public CAENRFIDReadPointStatus GetReadPointStatus( string ReadPoint) JAVA representation: public CAENRFIDReadPointStatus GetReadPointStatus( java.lang.
GetRFRegulation Method Description: This method gets the current RF regulation setting value. Return value: The RF regulation value.
GetSourceNames Method Description: This method gets the names of the logical sources available in the reader. Return value: An array containing the logical source names available in the reader. Syntax: C# representation: public static string[] GetSourceNames() JAVA representation: public static java.lang.
RFControl Method Description: Permits to control the RF CW (Carrier Wave) signal generation. Parameters: Name OnOff Description The value to set. 1 generates the CW , 0: stops the CW generation. Syntax: C# representation: public void RFControl( int OnOff) JAVA representation: public void RFControl( int OnOff) throws CAENRFIDException C representation: CAENRFIDErrorCodes CAENRFID_RFControl( CAENRFIDHandle int handle, OnOff); Remarks This method is only used for testing applications.
SetDateTime Method Description: This method sets the Date/Time of the reader. Parameters: Name DateTime Description The Date/Time to be set on the reader as a string in the format: "yyyy-mm-dd hh:mm:ss". Syntax: C# representation: public void SetDateTime( string DateTime) JAVA representation: public void SetDateTime( java.lang.
SetIODIRECTION Method Description: This method sets the current I/O direction setting as a bitmask. Each bit represent a I/O line, a value of 0 means that the line is configured as an input, 1 as an output. This setting has a meaning only for those readers with configurable I/O lines. Parameters: Name IODirection Description The IODirection value to set.
SetNetwork Method Description: This method permits to configure the network settings of the reader. In order to apply the changes the reader must be restarted. Parameters: Name IPAddress NetMask Gateway Description The IP address to set on the reader network interface. The netmask to set on the reader network interface. The gateway to set on the reader network interface.
SetProtocol Method Description: This method sets the air protocol of the reader. Parameters: Name Protocol Description The CAENRFIDProtocol representing the air protocol to be set.
SetRFRegulation Method Description: This method sets the RF regulation setting value. Parameters: Name RFRegulation Description The RF regulation value to set.
SetRS232 Method Description: This method permits to change the serial port settings. Valid settings values depend on the reader model. Parameters: Name baud datab stopb parity flowc Description The baud rate value to set. The number of data bits to set. The number of stop bits to set. The parity value to set. The flow control value to set.
CAENRFIDReaderInfo Class The CAENRFIDReaderInfo class is used to create reader info objects. Reader info objects represent the information about the reader device (model and serial number). GetModel Method Description: This method gets the reader's model. Return value: The reader's model. Syntax: C# representation: public string GetModel() JAVA representation: public java.lang.String GetModel() Remarks: This method does not exist in C language. It is possible to use the GetReaderInfo Method pag.
CAENRFIDTag Class The CAENRFIDTag class is used to define objects representing the tags. These objects are used as return values for the inventory methods and as arguments for many tag access methods. In both Java and C# lanuguage this class is composed by methods while in C language the following struct is present (for more informations see § Overview on SDK pag.
GetReadPoint Method Description: This method returns the read point that has detected the tag. Return value: The name of the read point that has detected the Tag Syntax: C# representation: public string GetReadPoint() JAVA representation: public java.lang.String GetReadPoint() throws CAENRFIDException GetRSSI Method Description: This method returns the RSSI value measured for the tag. Return value: The tag's RSSI.
GetTID Method Description: This method returns the tag's TID (valid only for EPC Class 1 Gen 2 tags). Return value: An array of bytes representing the tag's TID. Syntax: C# representation: public byte[] GetTID() JAVA representation: public byte[] GetTID() GetTimeStamp Method Description: This method gets the Tag's TimeStamp. Return value: The Tags's Unix TimeStamp. Syntax: C# representation: public DateTime GetTimeStamp() JAVA representation: public java.util.
4 Event Handling This chapter gives a description of CAENRFID event handling.
Event Handling Standard tag's detection method (InventoryTag) is based on a polling mechanism: a call to the InventoryTag method/function results in a single read cycle and the detected tags in that cycle are returned.
EventInventoryTag Method Description: A call to this method will start a sequence of read cycle on each read point linked to the logical source. The readings will be notified to the controller via event generation. Parameters: Name Mask MaskLength Position Flag pCallBack Description A byte array representing the bitmask to apply. A value representing the bit-oriented length of the bitmask. A value representing the first bit where the match will start. A bitmask representing the InventoryTag options.
Remarks: Depending on the air protocol setting it will execute the appropriate anticollision algorithm. This version of the method permits to specify a bitmask for filtering tag's populations as described by the EPC Class1 Gen2 (ISO18000-6C) air protocol. The filtering will be performend on the memory bank specified by bank parameter, starting at the bit indicated by the Position index and for a MaskLength length. The method will return only the tags that matches the given Mask.
C# Event Handling CAENRFIDEventArgs Class The CAENRFIDEventArgs class defines the CAENRFID event arguments. getData Method Description: This method returns the event object value. Return value: The value of the event object. Syntax: C# representation: public CAENRFIDNotify[] getData() CAENRFIDEventHandler Delegate CAENRFIDEventHandler delegate declaration. Parameters: Name Event Description the Data Event.
JAVA Event Handling CAENRFIDEvent Class The CAENRFIDEvent class defines the CAENRFID event arguments. getData Method Description: This method returns the event object value. Return value: The value of the event object. Syntax: JAVA representation: public java.util.ArrayList getData() CAENRFIDEventListener Interface The listener interface for receiving CAEN RFID events. CAENRFIDTagNotify Description: This method is invoked when an action occurs.
C Event Handling CAENRFID_INVENTORY_CALLBACK This function prototype defines the type of the user defined event handler (see the CAEN RFID API User Manual.
5 Enumerations Description This chapter gives a description of CAENRFID enumerations.
CAENRFIDBitRate Enumeration The CAENRFIDBitRate Enumeration gives a list of the supported radiofrequency profiles.
CAENRFIDLogicalSourceConstants Enumeration The CAENRFIDLogicalSourceConstants Enumeration gives a list of constants used for the configuration of the logical sources. Detailed explanation of the settings can be found in the EPC Class 1 Gen 2 and ISO 18000-6B specification documents.
CAENRFIDPort Enumeration The CAENRFIDPort Enumeration gives a list of the communication ports supported by the CAEN RFID readers. Syntax: C# representation: public enum CAENRFIDPort JAVA representation: public final class CAENRFIDPort C representation: typedef enum CAENRFIDPort; Remarks: In order to align the three libraries, the members name in C language have changed, now reporting the CAENRFID_ suffix, but the value of the members is the same of the previous library version.
CAENRFIDReadPointStatus Enumeration The CAENRFIDReadPointStatus gives a list of the possible ReadPoint status values. Syntax: C# representation: public enum CAENRFIDReadPointStatus JAVA representation: public final class CAENRFIDReadPointStatus C representation: typedef enum CAENRFIDReadPointStatus; Remarks: In order to align the three libraries, the members name in C language have changed, now reporting the STATUS_ suffix, but the value of the members is the same of the previous library version.
CAENRFIDRS232Constants Enumeration The CAENRFIDRS232Constants gives a list of settings for the serial port configuration.
6 CAENRFID Obsolete Methods This chapter gives a list of CAENRFID obsolete methods, functions, members and data types.
Below it is available a list of obsolete methods, functions, members and data types for the three different program languages. It is recommended not to use these methods since they will not be available in new reader's firmware release. Some of these obsolete methods have been replaced by new ones as specified in the table below.
C# Obsolete Members Member BitRate Enumeration TX10RX40 TX40RX40 TX40RX160 EventMode Enumeration READCYCLE_MODE TIME_MODE NOEVENT_MODE TagEventType Enumeration TAG_GLIMPSED TAG_LOST TAG_OBSERVED TAG_UNKNOWN Description This member is now obsolete. This member is now obsolete. This member is now obsolete. This member is now obsolete. This member is now obsolete. This member is now obsolete. This member is now obsolete. This member is now obsolete. This member is now obsolete. This member is now obsolete.
Method FWUpgradeTFTP GetAllocatedChannels GetAllocatedTriggers GetChannelData GetEventMode RemoveChannel RemoveTrigger SetEventMode SetReaderOPtions Receiver Class KillServer TagEventType Class TAG_GLIMPSED TAG_LOST TAG_OBSERVED TAG_UNKNOWN Trigger Class GetIOLineValue GetName GetTimerValue IsLinkedToChannel IsLinkedToSource HitachiSysInfo GetBankLock GetBlockReadLock GetBlockReadWriteLock GetBlockWriteLock GetInfoFlag getReserved getSetAttenuateLevel getTID getUII getUser Description This method is now ob
C Obsolete Functions Function AddNotifyTrigger AddReadTrigger AddSourceToChannel AllocateChannel AllocateTrigger CustomCmd_C1G2 DeallocateChannel DeallocateTrigger ExtendedInventoryTag FirmwareUpgrade FreeNotifyMemory GetAllocatedChannels GetAllocatedTriggers GetChannelData GetChannelInTrigger GetChannelStatus GetDE_SB GetEventMode GetFWRelease GetModulation GetNotification GetQ_C1G2 GetQ_EPC_C1G2 GetReadPointInSource GetSourceConfiguration GetSourceInChannel GetSourceInTrigger GetSWRelease GetTriggerInChan
Function SecureLock_C1G2 SecureProgramID_C1G2 SecureRead_C1G2 SecureWrite_C1G2 SetBitrate SetDE_SB SetEventMode SetModulation SetQ_C1G2 SetQ_EPC_C1G2 SetSourceConfiguration Write Write_C1G2 Description Use SecureCustomCommand_EPC_C1G2 instead. This function is now obsolete. Use SecureLockTag_EPC_C1G2 instead. This function is now obsolete. Use SecureProgramID_EPC_C1G2 instead. This function is now obsolete. Use SecureReadTagData_EPC_C1G2 instead. This function is now obsolete.