Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.phidgets
Class RFIDPhidget

    java.lang.Object
      com.phidgets.Phidget
          com.phidgets.RFIDPhidget

    public final class RFIDPhidget

extends Phidget

This class represents a Phidget RFID Reader. All methods to read tags and set outputs on the RFID reader are implemented in this class.

The Phidget RFID reader can read one tag at a time. Both tag and tagloss event handlers are provided, as well as control over the antenna so that multiple readers can exists in close proximity without interference.

Constructor Summary
`RFIDPhidget()`

Method Summary
`void` | `addOutputChangeListener(OutputChangeListener l)` Adds an output change listener.
`void` | `addTagGainListener(TagGainListener l)` Adds a tag gained listener.
`void` | `addTagLossListener(TagLossListener l)` Adds a tag lost listener.
`boolean` | `getAntennaOn()` Returns the state of the antenna.
`java.lang.String` | `getLastTag()` Returns the last tag read.
`boolean` | `getLEDOn()` Returns the state of the onboard LED.
`int` | `getOutputCount()` Returns the number of outputs.
`boolean` | `getOutputState(int index)` Returns the state of an output.
`void` | `removeOutputChangeListener(OutputChangeListener l)`
`void` | `removeTagGainListener(TagGainListener l)`
`void` | `removeTagLossListener(TagLossListener l)`
`void` | `setAntennaOn(boolean state)` Sets the state of the antenna.
`void` | `setLEDOn(boolean state)` Sets the state of the onboard LED.
`void` | `setOutputState(int index, boolean state)` Sets the state of a digital output.

Methods inherited from class com.phidgets.Phidget
`addAttachListener, addDetachListener, addErrorListener, close, equals, getDeviceName, getDeviceType, getDeviceVersion, getLibraryVersion, getSerialNumber, getTag, isAttached, open, openAny, removeAttachListener, removeDetachListener, removeErrorListener, setTag, toString, waitForAttachment`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RFIDPhidget

    public RFIDPhidget()
                throws PhidgetException

Throws:
  `PhidgetException`

Method Detail

### getOutputCount

    public int getOutputCount()
                       throws PhidgetException

  Returns the number of outputs. These are the outputs provided by the terminal block. Older RFID readers do not have these outputs, and this method will return 0.

  Returns:
    number of outputs
  Throws:
    `PhidgetException` - If this Phidget is not opened and attached. See `open` for information on determining if a device is attached.

### getOutputState

    public boolean getOutputState(int index)
                           throws PhidgetException

  Returns the state of an output. True indicated activated, False deactivated, which is the default.

  Parameters:
    `index` - index of the output
  Returns:
    state of the output
  Throws:
    `PhidgetException` - If this Phidget is not opened and attached, of the index is out of range. See `open` for information on determining if a device is attached.

### setOutputState

    public void setOutputState(int index,
                               boolean state)
                        throws PhidgetException

  Sets the state of a digital output. True indicated activated, False deactivated, which is the default.

  Parameters:
    `index` - index of the output
    `state` - desired state
  Throws:
    `PhidgetException` - If this Phidget is not opened and attached, of the index is out of range. See `open` for information on determining if a device is attached.

### getAntennaOn

    public boolean getAntennaOn()
                         throws PhidgetException

  Returns the state of the antenna. True indicated that the antenna is active, False indicated inactive.

  Returns:
    state of the antenna
  Throws:
    `PhidgetException` - If this Phidget is not opened and attached. See `open` for information on determining if a device is attached.

### setAntennaOn

    public void setAntennaOn(boolean state)
                      throws PhidgetException

  Sets the state of the antenna. True turns the antenna on, False turns it off. The antenna if by default turned off, and needs to be explicitely activated before tags can be read. Control over the antenna allows multiple readers to be used in close proximity, as multiple readers will interfere with each other if their antenna's are activated simultaneously.

  Parameters:
    `state` - new state for the antenna
  Throws:
    `PhidgetException` - If this Phidget is not opened and attached. See `open` for information on determining if a device is attached.

### getLEDOn

    public boolean getLEDOn()
                     throws PhidgetException

  Returns the state of the onboard LED. This LED is by default turned off.

  Returns:
    state of the LED
  Throws:
    `PhidgetException` - If this Phidget is not opened and attached. See `open` for information on determining if a device is attached.

### setLEDOn

    public void setLEDOn(boolean state)
                  throws PhidgetException

  Sets the state of the onboard LED. True turns the LED on, False turns it off. The LED is by default turned off.

  Parameters:
    `state` - new state for the LED
  Throws:
    `PhidgetException` - If this Phidget is not opened and attached. See `open` for information on determining if a device is attached.

### getLastTag

    public java.lang.String getLastTag()
                                throws PhidgetException

  Returns the last tag read. This method will only return a valid tag after a tag has been seen. This method can be used even after a tag has been removed from the reader

  Returns:
    tag
  Throws:
    `PhidgetException` - If this Phidget is not opened and attached. See `open` for information on determining if a device is attached.

### addTagGainListener

    public final void addTagGainListener(TagGainListener l)

  Adds a tag gained listener. The tag gaiend handler is a method that will be called when a new tag is seen by the reader. The event is only fired one time for a new tag, so the tag has to be removed and then replaced before another tag gained event will fire.

  There is no limit on the number of tag gained change handlers that can be registered for a particular Phidget.

  Parameters:
    `l` - An implemetation of the `TagGainListener` interface

### removeTagGainListener

    public final void removeTagGainListener(TagGainListener l)

### addTagLossListener

    public final void addTagLossListener(TagLossListener l)

  Adds a tag lost listener. The tag lost handler is a method that will be called when a tag is removed from the reader.

  There is no limit on the number of tag lost change handlers that can be registered for a particular Phidget.

  Parameters:
    `l` - An implemetation of the `TagLossListener` interface

### removeTagLossListener

    public final void removeTagLossListener(TagLossListener l)

### addOutputChangeListener

    public final void addOutputChangeListener(OutputChangeListener l)

  Adds an output change listener. The output change handler is a method that will be called when an output has changed.

  There is no limit on the number of output change handlers that can be registered for a particular Phidget.

  Parameters:
    `l` - An implemetation of the `OutputChangeListener` interface

### removeOutputChangeListener

    public final void removeOutputChangeListener(OutputChangeListener l)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD