com.caen.RFIDLibrary
Class CAENRFIDReader

java.lang.Object
  extended by com.caen.RFIDLibrary.CAENRFIDReader

public final class CAENRFIDReader
extends java.lang.Object

This class defines the CAEN RFID Reader.

Version:
CAENRFIDLibrary 4.2.0
Author:
Alberto Lucchesi (a.lucchesi@caen.it) CAEN SpA Computing Division @2005-2007, Andrea Iavazzo (a.iavazzo@caen.it) CAEN RFID Srl Computing Division @2009-2010

Field Summary
static java.lang.String Version
          Get the version of this library
 
Constructor Summary
CAENRFIDReader()
          Create a new CAEN RFID Reader object.
 
Method Summary
 void _SetRFOnOff(short OnOff)
          Deprecated. For debugging purpose only.
 void addCAENRFIDEventListener(CAENRFIDEventListener listener)
          Adds the specified CAENRFIDEvent listener to receive CAENRFIDEvent events from this CAENRIFDReader
 void Connect(CAENRFIDPort ConType, java.lang.String Address)
          Start the communication with the CAEN RFID Reader.
 CAENRFIDChannel CreateChannel(java.lang.String Name, CAENRFIDChannelReservedType Type, int MaxBuffer)
          Create a Channel object inside the Reader.
 CAENRFIDChannel CreateChannel(java.lang.String Name, java.lang.String host, int port)
          Deprecated. 
 CAENRFIDTrigger CreateTrigger(java.lang.String Name, int timer)
          Deprecated. 
 CAENRFIDTrigger CreateTrigger(java.lang.String Name, int IOLine, int timer)
          Create a Trigger object inside the Reader.
 void Disconnect()
          Close the connection with the CAEN RFID Reader releasing all the allocated resources
 void FWUpgradeTFTP(java.lang.String server, java.lang.String filename)
          Deprecated. 
 CAENRFIDChannel[] GetAllocatedChannels()
          Deprecated. 
 CAENRFIDTrigger[] GetAllocatedTriggers()
          Deprecated. 
 CAENRFIDBitRate GetBitRate()
          Get the current setting of RF BitRate.
 CAENRFIDNotify[] GetChannelData(CAENRFIDChannel Channel)
          Deprecated. 
 CAENRFIDEventMode GetEventMode()
          Deprecated. 
 java.lang.String GetFirmwareRelease()
          Permits to read the firmware release loaded into the device.
 int GetIO()
          Get the current digital Input and Output lines value.
 int GetIODirection()
          Get the current digital Input and Output direction lines value.
 short GetLBTMode()
          Gets the LBT mode
 int GetPower()
          Get the current setting of RF power.
 CAENRFIDProtocol GetProtocol()
          Get the current air protocol of the Reader
 CAENRFIDReaderInfo GetReaderInfo()
          Permits to read the ReaderInfo loaded into the device.
 java.lang.String[] GetReadPoints()
          Get the ReadPoints available in the Reader
 CAENRFIDReadPointStatus GetReadPointStatus(java.lang.String ReadPoint)
          Get the CAENRFIDReadPointStatus object rapresenting the status of a ReadPoint.
 short GetRFChannel()
          Gets the RF Channel
 CAENRFIDRFRegulations GetRFRegulation()
          Gets RF regulation value
 CAENRFIDLogicalSource GetSource(java.lang.String Source)
          Get a Source object
static java.lang.String[] GetSourceNames()
          Get the Sources available in the Reader
 CAENRFIDLogicalSource[] GetSources()
          Get the Sources available on the reader
 void InventoryAbort()
          Stops the InventoryTag when executed in Continuous Mode
 void removeCAENRFIDEventListener(CAENRFIDEventListener listener)
          Removes the specified CAENRFIDEvent listener so that it no longer receives CAENRFID events from this CAENRIFDReader.
 void RemoveChannel(CAENRFIDChannel Channel)
          Deprecated. 
 void RemoveTrigger(CAENRFIDTrigger Trigger)
          Deprecated. 
 void SetAdminPassword(int AdminPassword)
          Set the admin password for the reader(A528 only).
 void SetBitRate(CAENRFIDBitRate BitRate)
          Set the RF BitRate to use.
 void SetDateTime(java.lang.String DateTime)
          Set the Date/Time of the Reader
 void SetEventMode(CAENRFIDEventMode EventMode)
          Deprecated. 
 void SetIO(int IOValue)
          Set the Output lines value
 void SetIODIRECTION(int IODirection)
          Set the Output lines direction
 void SetLBTMode(short LBTMode)
          Sets/Resets the LBT mode
 void SetNetwork(java.lang.String IPAddress, java.lang.String NetMask, java.lang.String Gateway)
          Set the TCP/IP configuration of the Reader.
 void SetPower(int power)
          Set the RF power of the Reader.
 void SetProtocol(CAENRFIDProtocol Protocol)
          Set the air protocol of the Reader
 void SetReaderOPtions(short option)
          Deprecated. 
 void SetRFChannel(short Channel)
          Sets the RF Channel
 void SetRFRegulation(CAENRFIDRFRegulations RFRegulation)
          Sets the RF regulation value
 void SetRS232(int baud, int datab, int stopb, CAENRFIDRS232Constants parity, CAENRFIDRS232Constants flowc)
          Set the RS232 port of the Reader.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Version

public static final java.lang.String Version
Get the version of this library

See Also:
Constant Field Values
Constructor Detail

CAENRFIDReader

public CAENRFIDReader()
Create a new CAEN RFID Reader object.

Method Detail

GetSourceNames

public static java.lang.String[] GetSourceNames()
Get the Sources available in the Reader

Returns:
The list of Source names available in the Reader.

GetAllocatedTriggers

@Deprecated
public CAENRFIDTrigger[] GetAllocatedTriggers()
                                       throws CAENRFIDException
Deprecated. 

Get the Triggers currently allocated in the Reader

Returns:
Returns the Triggers available in the Reader.
Throws:
CAENRFIDException - If the Reader raises an error.

GetAllocatedChannels

@Deprecated
public CAENRFIDChannel[] GetAllocatedChannels()
                                       throws CAENRFIDException
Deprecated. 

Get the Channels available in the Reader

Returns:
Returns the Channels available in the Reader.
Throws:
CAENRFIDException - If the Reader raises an error.

GetReadPoints

public java.lang.String[] GetReadPoints()
Get the ReadPoints available in the Reader

Returns:
The list of ReadPoints Names available in the Reader.

GetFirmwareRelease

public java.lang.String GetFirmwareRelease()
                                    throws CAENRFIDException
Permits to read the firmware release loaded into the device.

Returns:
Returns the firmware release of the device.
Throws:
CAENRFIDException - If the Reader raises an error.

GetReaderInfo

public CAENRFIDReaderInfo GetReaderInfo()
                                 throws CAENRFIDException
Permits to read the ReaderInfo loaded into the device.

Returns:
Returns the ReaderInfo of the device.
Throws:
CAENRFIDException - If the Reader raises an error.

GetSources

public CAENRFIDLogicalSource[] GetSources()
Get the Sources available on the reader

Returns:
The LogicalSource available in the Reader

GetSource

public CAENRFIDLogicalSource GetSource(java.lang.String Source)
                                throws CAENRFIDException
Get a Source object

Parameters:
Source - The name of the Source
Returns:
The CAENRFIDLogicalSource object with the requested name
Throws:
CAENRFIDException - If the Reader raises an error.

Connect

public void Connect(CAENRFIDPort ConType,
                    java.lang.String Address)
             throws CAENRFIDException
Start the communication with the CAEN RFID Reader. It must be called before any other method of the Reader object.

Parameters:
ConType - The communication link to use for connection
Address - Depending on ConType parameter. IP address for TCP/IP communications COM port for RS232 communications An index for USB communications
Throws:
CAENRFIDException - If the Reader raises an error.

Disconnect

public void Disconnect()
                throws CAENRFIDException
Close the connection with the CAEN RFID Reader releasing all the allocated resources

Throws:
CAENRFIDException - If the Reader raises an error.

GetPower

public int GetPower()
             throws CAENRFIDException
Get the current setting of RF power.

Returns:
The current RF power referred to the antennae's connector without taking in account the antennae gain and cable loss.
Throws:
CAENRFIDException - If the Reader raises an error.

GetIO

public int GetIO()
          throws CAENRFIDException
Get the current digital Input and Output lines value.

Returns:
A bitmask representing the I/O lines value. The format and the meaning of the bits depends on the Reader's model. Please refer to the corresponding user manual available on www.caen.it/rfid
Throws:
CAENRFIDException - If the Reader raises an error.

SetIO

public void SetIO(int IOValue)
           throws CAENRFIDException
Set the Output lines value

Parameters:
IOValue - A bitmask representing the I/O lines value. The format and the meaning of the bits depends on the Reader's model. Please refer to the corresponding user manual available on www.caen.it/rfid
Throws:
CAENRFIDException - If the Reader raises an error.

GetBitRate

public CAENRFIDBitRate GetBitRate()
                           throws CAENRFIDException
Get the current setting of RF BitRate.

Returns:
The current RF BitRate value.
Throws:
CAENRFIDException - If the Reader raises an error.

FWUpgradeTFTP

@Deprecated
public void FWUpgradeTFTP(java.lang.String server,
                                     java.lang.String filename)
                   throws CAENRFIDException
Deprecated. 

Perform the reader's firmware upgrade by TFTP

Parameters:
server - The ip address of TFTP Server that hold the firmware
filename - The name of the firmware to download
Throws:
CAENRFIDException - If the Reader raises an error.

GetProtocol

public CAENRFIDProtocol GetProtocol()
                             throws CAENRFIDException
Get the current air protocol of the Reader

Returns:
The CAENRFIDProtocol representing the current air protocol of the Reader
Throws:
CAENRFIDException - If the Reader raises an error.

GetEventMode

@Deprecated
public CAENRFIDEventMode GetEventMode()
                               throws CAENRFIDException
Deprecated. 

Get the current Event Generation Mode of the Reader

Returns:
The CAENRFIDEventMode representing the current Event Generation Mode of the Reader
Throws:
CAENRFIDException - If the Reader raises an error.

CreateTrigger

@Deprecated
public CAENRFIDTrigger CreateTrigger(java.lang.String Name,
                                                int timer)
                              throws CAENRFIDException
Deprecated. 

Create a Trigger object inside the Reader. The Trigger created is a "Timer Trigger".

Parameters:
Name - The name of the Trigger
timer - The time, in millisecond, for the "Timer Trigger".
Returns:
The CAENRFIDTrigger object created inside the Reader.
Throws:
CAENRFIDException - If the Reader raises an error.

CreateTrigger

public CAENRFIDTrigger CreateTrigger(java.lang.String Name,
                                     int IOLine,
                                     int timer)
                              throws CAENRFIDException
Create a Trigger object inside the Reader. The Trigger created is a "I/O Trigger".

Parameters:
Name - The name of the Trigger
IOLine - The I/O line that fire the Trigger
timer - The time, in millisecond, between a I/O check.
Returns:
The CAENRFIDTrigger object created inside the Reader.
Throws:
CAENRFIDException - If the Reader raises an error.

CreateChannel

@Deprecated
public CAENRFIDChannel CreateChannel(java.lang.String Name,
                                                java.lang.String host,
                                                int port)
                              throws CAENRFIDException
Deprecated. 

Create a Channel object inside the Reader. The Channel is used for the Reader notifications.

Parameters:
Name - The name of the channel
host - The IP address of the server that will receive the notifications
port - The TCP/IP port of the server.
Returns:
The CAENRFIDChannel object created inside the Reader.
Throws:
CAENRFIDException - If the Reader raises an error.

CreateChannel

public CAENRFIDChannel CreateChannel(java.lang.String Name,
                                     CAENRFIDChannelReservedType Type,
                                     int MaxBuffer)
                              throws CAENRFIDException
Create a Channel object inside the Reader. The Channel is used for Memory Mode.

Parameters:
Name - The name of the channel
Type - The CAENRFIDReserved Channel Type
MaxBuffer - The max number of tags that can be memorized by the Channel.
Returns:
The CAENRFIDChannel object created inside the Reader.
Throws:
CAENRFIDException - If the Reader raises an error.

RemoveTrigger

@Deprecated
public void RemoveTrigger(CAENRFIDTrigger Trigger)
                   throws CAENRFIDException
Deprecated. 

Delete a Trigger inside the Reader releasing all the allocated resources

Parameters:
Trigger - The Trigger object to remove.
Throws:
CAENRFIDException - If the Reader raises an error.

RemoveChannel

@Deprecated
public void RemoveChannel(CAENRFIDChannel Channel)
                   throws CAENRFIDException
Deprecated. 

Delete a Channel inside the Reader releasing all the allocated resources

Parameters:
Channel - The CAENRFIDChannel object to remove.
Throws:
CAENRFIDException - If the Reader raises an error.

SetPower

public void SetPower(int power)
              throws CAENRFIDException
Set the RF power of the Reader.

Parameters:
power - The RF power referred to the antennae's connector without taking in account the antennae gain and cable loss.
Throws:
CAENRFIDException - If the Reader raises an error.

SetBitRate

public void SetBitRate(CAENRFIDBitRate BitRate)
                throws CAENRFIDException
Set the RF BitRate to use.

Parameters:
BitRate - The RF BitRate value.
Throws:
CAENRFIDException - If the Reader raises an error.

SetProtocol

public void SetProtocol(CAENRFIDProtocol Protocol)
                 throws CAENRFIDException
Set the air protocol of the Reader

Parameters:
Protocol - The CAENRFIDProtocol representing the air protocol.
Throws:
CAENRFIDException - If the Reader raises an error.

SetEventMode

@Deprecated
public void SetEventMode(CAENRFIDEventMode EventMode)
                  throws CAENRFIDException
Deprecated. 

Set the Event Generation Mode of the Reader

Parameters:
EventMode - The CAENRFIDEventMode representing the Event Generation Mode.
Throws:
CAENRFIDException - If the Reader raises an error.

GetReadPointStatus

public CAENRFIDReadPointStatus GetReadPointStatus(java.lang.String ReadPoint)
                                           throws CAENRFIDException
Get the CAENRFIDReadPointStatus object rapresenting the status of a ReadPoint.

Parameters:
ReadPoint - The ReadPoint name to check.
Returns:
The CAENRFIDReadPointStatus object rapresenting the current Status of the ReadPoint
Throws:
CAENRFIDException - If the Reader raises an error.

SetNetwork

public void SetNetwork(java.lang.String IPAddress,
                       java.lang.String NetMask,
                       java.lang.String Gateway)
                throws CAENRFIDException
Set the TCP/IP configuration of the Reader. To apply the changes the Reader should be restarted.

Parameters:
IPAddress - The IP address.
NetMask - The netmask.
Gateway - The gateway
Throws:
CAENRFIDException - If the Reader raises an error.

SetReaderOPtions

@Deprecated
public void SetReaderOPtions(short option)
                      throws CAENRFIDException
Deprecated. 

Set an Option of the Reader.

Throws:
CAENRFIDException

SetAdminPassword

public void SetAdminPassword(int AdminPassword)
                      throws CAENRFIDException
Set the admin password for the reader(A528 only).

Parameters:
AdminPassword - The admin password
Throws:
CAENRFIDException - If the Reader raises an error.

SetDateTime

public void SetDateTime(java.lang.String DateTime)
                 throws CAENRFIDException
Set the Date/Time of the Reader

Parameters:
DateTime - The Date/Time for the Reader. The Date/Time value a String like: "yy-mm-dd hh:mm:ss"
Throws:
CAENRFIDException - If the Reader raises an error.

addCAENRFIDEventListener

public void addCAENRFIDEventListener(CAENRFIDEventListener listener)
Adds the specified CAENRFIDEvent listener to receive CAENRFIDEvent events from this CAENRIFDReader

Parameters:
listener - the CAENRFIDEvent listener

removeCAENRFIDEventListener

public void removeCAENRFIDEventListener(CAENRFIDEventListener listener)
Removes the specified CAENRFIDEvent listener so that it no longer receives CAENRFID events from this CAENRIFDReader.

Parameters:
listener - the CAENRFIDEvent listener

InventoryAbort

public void InventoryAbort()
Stops the InventoryTag when executed in Continuous Mode


GetRFRegulation

public CAENRFIDRFRegulations GetRFRegulation()
                                      throws CAENRFIDException
Gets RF regulation value

Returns:
The RF regulation value
Throws:
CAENRFIDException - If the Reader raises an error.

SetRFRegulation

public void SetRFRegulation(CAENRFIDRFRegulations RFRegulation)
                     throws CAENRFIDException
Sets the RF regulation value

Parameters:
RFRegulation - The RF regulation value to set
Throws:
CAENRFIDException - If the Reader raises an error.

GetRFChannel

public short GetRFChannel()
                   throws CAENRFIDException
Gets the RF Channel

Returns:
The RF channel.
Throws:
CAENRFIDException - If the Reader raises an error.

SetRFChannel

public void SetRFChannel(short Channel)
                  throws CAENRFIDException
Sets the RF Channel

Parameters:
Channel - The RF channel to set
Throws:
CAENRFIDException - If the Reader raises an error.

GetLBTMode

public short GetLBTMode()
                 throws CAENRFIDException
Gets the LBT mode

Returns:
The LBT value
Throws:
CAENRFIDException - If the Reader raises an error.

SetLBTMode

public void SetLBTMode(short LBTMode)
                throws CAENRFIDException
Sets/Resets the LBT mode

Parameters:
LBTMode - The Data Exchange LBT value to set. 1 set LBT Mode to ON, 0: resets LBT Mode to OFF
Throws:
CAENRFIDException - If the Reader raises an error.

GetChannelData

@Deprecated
public CAENRFIDNotify[] GetChannelData(CAENRFIDChannel Channel)
                                throws CAENRFIDException
Deprecated. 

Retrieve the Data from the Channel (Memory Mode)

Parameters:
Channel - The name of the channel
Returns:
An CAENRFIDChannel Object that holds all data memorized by the Channel
Throws:
CAENRFIDException - If the Reader raises an error.

_SetRFOnOff

@Deprecated
public void _SetRFOnOff(short OnOff)
                 throws CAENRFIDException
Deprecated. For debugging purpose only.

Sets/Resets the RF section

Parameters:
OnOff - The value to set. value 1 set RF to ON, value 0 resets RF to OFF
Throws:
CAENRFIDException - If the Reader raises an error.

GetIODirection

public int GetIODirection()
                   throws CAENRFIDException
Get the current digital Input and Output direction lines value.

Returns:
A bitmask representing the direction of the I/O lines. The format and the meaning of the bits depends on the Reader's model. Please refer to the corresponding user manual available on www.caen.it/rfid
Throws:
CAENRFIDException - If the Reader raises an error.

SetIODIRECTION

public void SetIODIRECTION(int IODirection)
                    throws CAENRFIDException
Set the Output lines direction

Parameters:
IODirection - A bitmask representing the direction of the I/O lines. The format and the meaning of the bits depends on the Reader's model. Please refer to the corresponding user manual available on www.caen.it/rfid
Throws:
CAENRFIDException - If the Reader raises an error.

SetRS232

public void SetRS232(int baud,
                     int datab,
                     int stopb,
                     CAENRFIDRS232Constants parity,
                     CAENRFIDRS232Constants flowc)
              throws CAENRFIDException
Set the RS232 port of the Reader.

Parameters:
baud - The Baudrate value to set
datab - The DataBit value to set
stopb - The StopBit value to set
parity - The Parity value to set
flowc - The FlowControll value to set
Throws:
CAENRFIDException - If the Reader raises an error.