CAEN RFID API Reference Manual Reference Manual Revision n. 10 16/06/2015 Visit SDK- Software Development Kit Web Page and you will find the latest revision of manuals and software.
All you need to start using your SDK software in a few clicks! Scope of Manual This manual documents the API used by C, Java, Android and .Net programmers who want to write applications for controlling and using CAEN RFID readers.
CAEN RFID srl Via Vetraia, 11 55049 Viareggio (LU) - ITALY Tel. +39.0584.388.398 Fax +39.0584.388.959 info@caenrfid.com www.caenrfid.com © CAEN RFID srl – 2010 Disclaimer No part of this manual may be reproduced in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of CAEN RFID. The information contained herein has been carefully checked and is believed to be accurate; however, no responsibility is assumed for inaccuracies.
Index… Scope of Manual........................................................................................................................................................................2 Change Document Record..........................................................................................................................................................2 Index…........................................................................................................................................
SetQ_EPC_C1G2 Method....................................................................................................................................................58 SetReadCycle Method......................................................................................................................................................... 59 SetSelected_EPC_C1G2 Method.........................................................................................................................................
GetRSSI Method..................................................................................................................................................................93 GetSource Method.............................................................................................................................................................94 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 a "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#), Java and Android languages, CAENRFID methods are divided into the following classes: Class CAENRFIDEventArgs2 CAENRFIDException IDSTagData CAENRFIDLogicalSource CAENRFIDNotify CAENRFIDReader CAENRFIDReaderInfo CAENRFIDTag Description This class defines the CAENRFID event arguments. This class defines the CAEN RFID exceptions. This class represents data returned by tags based on IDS Chip SL900A.
Methods GetReadCycle GetSelected_EPC_C1G2 GetSession_EPC_C1G2 GetTarget_EPC_C1G2 GroupSelUnsel InventoryTag isReadPointPresent KillTag_EPC_C1G1 KillTag_EPC_C1G2 LockBlockPermaLock_EPC_C1G2 LockTag_EPC_C1G2 LockTag_ISO180006B NXP_ChangeEAS NXP_ChangeConfig NXP_EAS_Alarm NXP_ReadProtect NXP_ResetReadProtect ProgramID_EPC_C1G1 ProgramID_EPC_C1G2 ProgramID_EPC119 Query_EPC_C1G2 QueryAck_EPC_C1G2 ReadBLockPermalock_EPC_C1G2 ReadTagData ReadTagData_EPC_C1G2 RemoveReadPoint ResetSession_EPC_C1G2 SetDESB_ISO180
Methods SetReadCycle SetSelected_EPC_C1G2 SetSession_EPC_C1G2 SetTarget_EPC_C1G2 SL900A_EndLog SL900A_GetLogState SL900A_GetSensorValue SL900A_Initialize SL900A_SetLogMode SL900A_StartLog WriteTagData WriteTagData_EPC_C1G2 Description protocol specification) used by the anticollision algorithm when called on this logical source. Sets the number of read cycles to be performed by the logical source during the inventory algorithm execution.
Methods GetRFChannel GetRFRegulation GetSource GetSourceNames GetSources InventoryAbort RFControl Method SetBitRate SetDateTime SetIO SetIODIRECTION SetNetwork SetPower SetProtocol SetRFChannel SetRS232 CAENRFIDReaderInfo Class GetModel GetSerialNumber CAENRFIDTag Class GetId GetLength GetPC GetReadPoint GetRSSI GetSource GetTID GetTimeStamp GetType GetXPC Description Gets the index of the RF channel currently in use. The index value meaning change for different country regulations.
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 CAENRFIDLogicalSource.InventoryFlag Port Protocol ReadPointStatus CAENRFIDRFRegulations RS232Constants SelUnselOptions CAENRFIDTag.MemBanks 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 and Android representation: public java.lang.String getError() Remarks: This function does not exist in C language, see § Error Handling pag. 8 for more information.
getRangeLimit Method Description: This method returns the range limit set on sensor. Return value: A bitmask representing the range limit. Syntax: C# representation: public uint RangeLimit { get; } Java and Android representation: public int getRangeLimit() getSensorValue Method Description: This method returns the sensor value. Return value: A bitmask representing the value obtained by the sensor.
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.
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 reader. 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 and Android representation: public java.lang.String GetName() Remarks: This function does not exist in C language, see § Overview on SDK pag. 8 for more information.
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 pag. 23). 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.
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 match 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 match 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).
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_ChangeConfig Method NXP_ChangeConfig Method (CAENRFIDTag, UInt16) Description: This method can be used to issue a NXP_ChangeConfig custom command as defined in the NXP UCODE G2iM and G2iM+ datasheet. Parameters: Name Tag ConfigWord Description The CAENRFIDTag object representing the tag to select. The configuration word.
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.
NXP_ChangeConfig Method NXP_ChangeConfig Method (CAENRFIDTag, UInt16) Description: This method can be used to issue a NXP_ChangeConfig custom command as defined in the NXP UCODE G2iM and G2iM+ datasheet. Parameters: Name Tag ConfigWord Description The CAENRFIDTag object representing the tag to select. The Configuration word.
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 an 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 an 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 an 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 an 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 and Android 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.
SL900A_EndLog Method Description: This method can be used to issue an IDS SL900A EndLog custom command as defined in the IDS SL900A datasheet.
SL900A_GetLogState Method Description: This method can be used to issue an IDS SL900A Get Log State custom command as defined in the IDS SL900A datasheet. Parameters: Name Tag ShelfLife Description The tag selected This parameter is used to inform the reader if the shelf life flag is set in the tag's EEPROM Return Value: This method returns the status of the logging process. The structure of the byte array is the following: byte[0]÷byte[1] : Limite Counter. byte[2]÷byte[3] : System status.
SL900A_GetSensorValue Method Description: This method can be used to issue an IDS SL900A Get Sensor Value custom command as defined in the IDS SL900A datasheet. Parameters: Name Tag SensorType Description The tag to extract sensor data. Describes which sensor to choose.(see remark) Return Value: Returns an IDSTagData object containing all the data read from the tag's selected sensor.
SL900A_Initialize Method Description: This method can be used to issue an IDS SL900A Initialize custom command as defined in the IDS SL900A datasheet. Parameters: Name Tag DelayTime ApplicationData Description The tag to initialize The DelayTime parameter. See the IDS SL900A datasheet for further details. The Application data. See the IDS SL900A datasheet for further details.
SL900A_SetLogMode Method Description: This method can be used to issue an IDS SL900A Set Log Mode custom command as defined in the IDS SL900A datasheet. Parameters: Name Tag LogMode Description The tag to set log mode on. The LogMode parameter. See the IDS SL900A datasheet for further details.
SL900A_StartLog Method Description: This method can be used to issue an IDS SL900A Start Log custom command as defined in the IDS SL900A datasheet. Parameters: Name Tag StartTime Description The Tag where start logging. The start time. See remark for structures.
WriteTagData Method Description: This method can be used to write a portion of the user memory in an 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 an 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 an 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 an 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 an 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 Java, Android and C# lanuguages this class is composed by methods while in C language is present as a struct (for more information 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 and Android representation: public java.lang.String getReadPoint() getRSSI Method Description: This method returns the RSSI value measured for the tag. Return value: The tag's RSSI.
getTagID Method Description: This method returns the tag's ID (the EPC code in Gen2 tags). Return value: An array of bytes representing the tag's ID (the EPC code in EPC Class 1 Gen 2 tags). Syntax: C# representation: public byte[] getTagID() Java and Android representation: public byte[] getTagID() getTagLength Method Description: This method returns the tag's ID length. Return value: The tag's length.
getTagType Method Description: This method returns the air protocol of the tag. Return value: The air protocol of the tag. Syntax: C# representation: public short getTagType() Java and Android representation: public CAENRFIDProtocol getTagType() getTID Method Description: This method returns the TID field value in a EPC Class 1 Gen 2 Tag Return value: The bytes of the TID field. Syntax: C# representation: public byte[] getTID() Java and Android representation: public java.lang.
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 Connect Method (CAENRFIDPort, string 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. 8 for more information.
Init Function Description: In C language, this function generates an opaque handle to identify a module attached to the PC. See § Managing connections with the readers pag. 8 for more information. Parameters: Name ConType Address handle Description The communication link to use for the connection. Communication address (i.e.: "COM1" for RS232, "USB0" for USB of IP address for TCP/IP etc.). The handle that identifies the device.
GetBitRate Method Description: This method gets the current setting of the RF bit rate. Return value: The current RF bit rate value.
GetIO Method Description: This method gets the current digital Input and Output lines status. Return value: A bitmask representing the I/O lines status. The format and the meaning of the bits depend on the Reader's model. Please refer to the corresponding user manual available at www.caenrfid.com.
GetLBTMode Method Description: This method gets the current LBT mode setting. If the current regulation is based on the frequency hopping mechanism it returns the FH status. Return value: A zero value if the LBT/FH is disabled, non-zero value if it is enabled.
GetProtocol Method Description: This method gets the current air protocol of the Reader. Return value: A CAENRFIDProtocol representing the current air protocol set on the reader.
GetReadPoints Method Description: This method gets the names of the read points (antennas) available in the reader. Return value: An array containing the read points (antennas) names available in the reader. Syntax: C# representation: public string[] GetReadPoints() Java and Android representation: public java.lang.
GetRFChannel Method Description: This method gets the index of the RF channel currently in use. The index value meaning changes for different country regulations. Return value: The RF channel index.
GetSource Method Description: This method gets a CAENRFIDLogicalSource object given its name. Parameters: Name Source Description The name of the logical source. Return value: The CAENRFIDLogicalSource object corresponding to the requested name. Syntax: C# representation: public CAENRFIDLogicalSource GetSource( string Source) Java and Android representation: public CAENRFIDLogicalSource GetSource( java.lang.
GetSources Method Description: This method gets the CAENRFIDLogicalSource objects available on the reader. Return value: An array of the logical source objects available in the Reader. Syntax: C# representation: public CAENRFIDLogicalSource[] GetSources() Java and Android representation: public CAENRFIDLogicalSource[] GetSources() Remarks: This function does not exist in C language, see § Overview on SDK pag. 8 for more information.
SetBitRate Method Description: This method sets the RF bit rate to use. Parameters: Name BitRate Description The RF bit rate value to be set.
SetIO Method Description: This method sets the Output lines value. Parameters: Name IOValue Description A bitmask representing the I/O lines value. The format and the meaning of the bits depend on the reader's model. Please refer to the corresponding user manual available on www.caenrfid.
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.
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 and Android representation: public java.lang.String GetModel() Remarks: This method does not exist in C language.
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 information see § Overview on SDK pag.
GetPC Method Description: This method returns the Protocol Control(PC) word code of the tag. Return value: The tag's Protocol Control code. Syntax: C# representation: public byte[] GetPC() Java and Android representation: public byte[] GetPC() GetReadPoint Method Description: This method returns the read point that has detected the tag.
GetSource 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 CAENRFIDLogicalSource GetSource() Java and Android representation: public CAENRFIDLogicalSource GetSource() 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.
GetType Method Description: This method returns the air protocol of the tag. Return value: The air protocol of the tag. Syntax: C# representation: public new CAENRFIDProtocol GetType() Java and Android representation: public CAENRFIDProtocol GetType() GetXPC Method Description: This method returns the tag’s XPC words. Return value: The tag’s XPC words.
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 match 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 and Android 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 and Android 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. It contains these topics: CAEN RFID API – Reference Manual • CAENRFIDBitRate Enumeration • CAENRFIDLogicalSourceConstants Enumeration • CAENRFIDLogicalSource.
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.
CAENRFIDLogicalSource.InventoryFlag Enumeration The CAENRFIDLogicalSource.InventoryFlag Enumeration gives a list of constants used for the configuration of the inventory function that comes with Flag parameter. Syntax: C# representation: public enum CAENRFIDLogicalSource.InventoryFlag Java and Android representation: public final class CAENRFIDLogicalSource.InventoryFlag C representation: typedef enum CAENRFIDLogicalSource.InventoryFlag; In the following table, the CAENRFIDLogicalSource.
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 and Android 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.
CAENRFIDRFRegulations Enumeration The CAENRFIDRFRegulations gives a list of country radiofrequency regulations. Syntax: C# representation: public enum CAENRFIDRFRegulations Java and Android representation: public final class CAENRFIDRFRegulations C representation: typedef enum CAENRFIDRFRegulations; Remarks: In order to align the three libraries, the regulations, previously declared as #define, are now members of an enumeration, 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.
CAENRFIDSelUnselOptions Enumeration The CAENRFIDSelUnselOptions gives a list of operations supported by the Group Select/Unselect command (valid only for the ISO18000-6B air protocol).
CAENRFIDTag.MemBanks Enumeration The CAENRFIDTag.MemBanks enumerates the bank name of a generic ISO18000-6C tag.
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.
GetIOLineValue GetName GetTimerValue IsLinkedToChannel IsLinkedToSource This method is now obsolete. This method is now obsolete. This method is now obsolete. This method is now obsolete. This method is now obsolete. Tab. 6.4: C# Obsolete Methods 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.
Method Hitachi_GetSystemInfo Hitachi_BlockLock Hitachi_BlockReadLock Hitachi_GetSystemInformation Hitachi_ReadLock Hitachi_SetAttenuate Hitachi_WriteMultipleWords Inventory NXP_Calibrate NXP_ChangeEAS (only non secure version) NXP_EAS_Alarm (only secure version) NXP_ResetReadProtect (only secure version) RemoveTrigger SetLostThreshold SetObservedThreshold Notify Class getAntenna Reader Class CreateChannel CreateTrigger FWUpgradeTFTP GetAllocatedChannels GetAllocatedTriggers GetChannelData GetEventMode Remov
C Obsolete Functions Function AddNotifyTrigger AddReadTrigger AddSourceToChannel AllocateChannel AllocateTrigger CustomCmd_C1G2 DeallocateChannel DeallocateTrigger ExtendedInventoryTag FirmwareUpgrade FreeNotifyMemory Fujitsu_BurstErase Fujitsu_BurstWrite Fujitsu_ChgBlockGroupPassword Fujitsu_ChgBlockLock Fujitsu_ChgWordLock Fujitsu_ReadBlockLock Fujitsu_Refresh GetAllocatedChannels GetAllocatedTriggers GetChannelData GetChannelInTrigger GetChannelStatus GetDE_SB GetEventMode GetFWRelease GetModulation GetN
Function ProgramID_C1G2 QueryAck_C1G2 QueryTag_C1G2 Read Read_C1G2 RemoveNotifyTrigger RemoveReadTrigger RemoveSourceFromChannel SecureCustomCmd_C1G2 SecureLock_C1G2 SecureProgramID_C1G2 SecureRead_C1G2 SecureWrite_C1G2 SetBitrate SetDE_SB SetEventMode SetModulation SetQ_C1G2 SetQ_EPC_C1G2 SetSourceConfiguration Write Write_C1G2 Description Use ProgramID_EPC_C1G1 instead. This function is now obsolete. Use ProgramID_EPC_C1G2 instead. This function is now obsolete. Use QueryAck_EPC_C1G2 instead.
C Obsolete Data Types Data Type CAENRFID_SOURCE_Parameter CONFIG_READCYCLE CONFIG_OBSERVEDTHRESHOLD CONFIG_LOSTTHRESHOLD CONFIG_G2_Q_VALUE CONFIG_G2_SESSION CONFIG_G2_TARGET CONFIG_G2_SELECTED CONFIG_ISO18006B_DESB CAENRFID_EventMode READCYCLE_MODE TIME_MODE NOEVENT_MODE CAENRFID_FWUpgradeType RFID_TFTP CAENRFID_ExtendedInventoryParams Description This data type is now obsolete. Use Get/SetReadCycle Method instead. This data type is now obsolete. This data type is now obsolete.