Public Member Functions | |
final void | addOutputChangeListener (OutputChangeListener l) |
final void | addTagGainListener (TagGainListener l) |
final void | addTagLossListener (TagLossListener l) |
native boolean | getAntennaOn () throws PhidgetException |
native String | getLastTag () throws PhidgetException |
native int | getLastTagProtocol () throws PhidgetException |
native boolean | getLEDOn () throws PhidgetException |
native int | getOutputCount () throws PhidgetException |
native boolean | getOutputState (int index) throws PhidgetException |
native boolean | getTagStatus () throws PhidgetException |
final void | removeOutputChangeListener (OutputChangeListener l) |
final void | removeTagGainListener (TagGainListener l) |
final void | removeTagLossListener (TagLossListener l) |
RFIDPhidget () throws PhidgetException | |
native void | setAntennaOn (boolean state) throws PhidgetException |
native void | setLEDOn (boolean state) throws PhidgetException |
native void | setOutputState (int index, boolean state) throws PhidgetException |
native void | write (String tag, int protocol, boolean lock) throws PhidgetException |
Static Public Attributes | |
static final int | PHIDGET_RFID_PROTOCOL_EM4100 = 1 |
static final int | PHIDGET_RFID_PROTOCOL_ISO11785_FDX_B = 2 |
static final int | PHIDGET_RFID_PROTOCOL_PHIDGETS = 3 |
Private Member Functions | |
final void | enableDeviceSpecificEvents (boolean b) |
native void | enableOutputChangeEvents (boolean b) |
native void | enableTagGainEvents (boolean b) |
native void | enableTagLossEvents (boolean b) |
void | fireOutputChange (OutputChangeEvent e) |
void | fireTagGain (TagGainEvent e) |
void | fireTagLoss (TagLossEvent e) |
Static Private Member Functions | |
static native long | create () throws PhidgetException |
Private Attributes | |
long | nativeOutputChangeHandler = 0 |
long | nativeTagGainHandler = 0 |
long | nativeTagLossHandler = 0 |
LinkedList | outputChangeListeners = new LinkedList () |
LinkedList | tagGainListeners = new LinkedList () |
LinkedList | tagLossListeners = new LinkedList () |
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.
Definition at line 19 of file RFIDPhidget.java.
com.phidgets.RFIDPhidget.RFIDPhidget | ( | ) | throws PhidgetException [inline] |
Definition at line 21 of file RFIDPhidget.java.
final void com.phidgets.RFIDPhidget.addOutputChangeListener | ( | OutputChangeListener | l | ) | [inline] |
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.
l | An implemetation of the OutputChangeListener interface |
Definition at line 205 of file RFIDPhidget.java.
final void com.phidgets.RFIDPhidget.addTagGainListener | ( | TagGainListener | l | ) | [inline] |
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.
l | An implemetation of the TagGainListener interface |
Definition at line 144 of file RFIDPhidget.java.
final void com.phidgets.RFIDPhidget.addTagLossListener | ( | TagLossListener | l | ) | [inline] |
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.
l | An implemetation of the TagLossListener interface |
Definition at line 175 of file RFIDPhidget.java.
static native long com.phidgets.RFIDPhidget.create | ( | ) | throws PhidgetException [static, private] |
final void com.phidgets.RFIDPhidget.enableDeviceSpecificEvents | ( | boolean | b | ) | [inline, private] |
Reimplemented from com.phidgets.Phidget.
Definition at line 129 of file RFIDPhidget.java.
native void com.phidgets.RFIDPhidget.enableOutputChangeEvents | ( | boolean | b | ) | [private] |
native void com.phidgets.RFIDPhidget.enableTagGainEvents | ( | boolean | b | ) | [private] |
native void com.phidgets.RFIDPhidget.enableTagLossEvents | ( | boolean | b | ) | [private] |
void com.phidgets.RFIDPhidget.fireOutputChange | ( | OutputChangeEvent | e | ) | [inline, private] |
Definition at line 219 of file RFIDPhidget.java.
void com.phidgets.RFIDPhidget.fireTagGain | ( | TagGainEvent | e | ) | [inline, private] |
Definition at line 158 of file RFIDPhidget.java.
void com.phidgets.RFIDPhidget.fireTagLoss | ( | TagLossEvent | e | ) | [inline, private] |
Definition at line 189 of file RFIDPhidget.java.
native boolean com.phidgets.RFIDPhidget.getAntennaOn | ( | ) | throws PhidgetException |
Returns the state of the antenna. True indicated that the antenna is active, False indicated inactive.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native String com.phidgets.RFIDPhidget.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
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.RFIDPhidget.getLastTagProtocol | ( | ) | throws PhidgetException |
Returns the protocol of the last tag read. This method will only return a valid protocol after a tag has been seen. This method can be used even after a tag has been removed from the reader
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native boolean com.phidgets.RFIDPhidget.getLEDOn | ( | ) | throws PhidgetException |
Returns the state of the onboard LED. This LED is by default turned off.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.RFIDPhidget.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.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native boolean com.phidgets.RFIDPhidget.getOutputState | ( | int | index | ) | throws PhidgetException |
Returns the state of an output. True indicated activated, False deactivated, which is the default.
index | index of the output |
PhidgetException | If this Phidget is not opened and attached, or the index is out of range. See open for information on determining if a device is attached. |
native boolean com.phidgets.RFIDPhidget.getTagStatus | ( | ) | throws PhidgetException |
Returns the state of whether or not a tag is being read by the reader. True indicated that a tag is on (or near) the reader, false indicates that one is not.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
final void com.phidgets.RFIDPhidget.removeOutputChangeListener | ( | OutputChangeListener | l | ) | [inline] |
Definition at line 213 of file RFIDPhidget.java.
final void com.phidgets.RFIDPhidget.removeTagGainListener | ( | TagGainListener | l | ) | [inline] |
Definition at line 152 of file RFIDPhidget.java.
final void com.phidgets.RFIDPhidget.removeTagLossListener | ( | TagLossListener | l | ) | [inline] |
Definition at line 183 of file RFIDPhidget.java.
native void com.phidgets.RFIDPhidget.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.
state | new state for the antenna |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native void com.phidgets.RFIDPhidget.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.
state | new state for the LED |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native void com.phidgets.RFIDPhidget.setOutputState | ( | int | index, |
boolean | state | ||
) | throws PhidgetException |
Sets the state of a digital output. True indicated activated, False deactivated, which is the default.
index | index of the output |
state | desired state |
PhidgetException | If this Phidget is not opened and attached, or the index is out of range. See open for information on determining if a device is attached. |
native void com.phidgets.RFIDPhidget.write | ( | String | tag, |
int | protocol, | ||
boolean | lock | ||
) | throws PhidgetException |
Writes a tag.
tag | tag string |
protocol | tag protocol |
lock | lock tag from futher writes |
PhidgetException | If this Phidget is not opened and attached, if the string is too malformed, or the protocol is invalid. See open for information on determining if a device is attached. |
long com.phidgets.RFIDPhidget.nativeOutputChangeHandler = 0 [private] |
Definition at line 212 of file RFIDPhidget.java.
long com.phidgets.RFIDPhidget.nativeTagGainHandler = 0 [private] |
Definition at line 151 of file RFIDPhidget.java.
long com.phidgets.RFIDPhidget.nativeTagLossHandler = 0 [private] |
Definition at line 182 of file RFIDPhidget.java.
LinkedList com.phidgets.RFIDPhidget.outputChangeListeners = new LinkedList () [private] |
Definition at line 211 of file RFIDPhidget.java.
final int com.phidgets.RFIDPhidget.PHIDGET_RFID_PROTOCOL_EM4100 = 1 [static] |
EM4100 (EM4102) 40-bit. This is used with getSgetLastTagProtocolcreenSize and write
Definition at line 30 of file RFIDPhidget.java.
final int com.phidgets.RFIDPhidget.PHIDGET_RFID_PROTOCOL_ISO11785_FDX_B = 2 [static] |
ISO11785 FDX-B encoding (Animal ID). This is used with getSgetLastTagProtocolcreenSize and write
Definition at line 34 of file RFIDPhidget.java.
final int com.phidgets.RFIDPhidget.PHIDGET_RFID_PROTOCOL_PHIDGETS = 3 [static] |
PhidgetsTAG Protocol 24 character ASCII. This is used with getSgetLastTagProtocolcreenSize and write
Definition at line 38 of file RFIDPhidget.java.
LinkedList com.phidgets.RFIDPhidget.tagGainListeners = new LinkedList () [private] |
Definition at line 150 of file RFIDPhidget.java.
LinkedList com.phidgets.RFIDPhidget.tagLossListeners = new LinkedList () [private] |
Definition at line 181 of file RFIDPhidget.java.