|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.phidgets.Phidget
com.phidgets.RFIDPhidget
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.
Field Summary | |
static int |
PHIDGET_RFID_PROTOCOL_EM4100
EM4100 (EM4102) 40-bit. |
static int |
PHIDGET_RFID_PROTOCOL_ISO11785_FDX_B
ISO11785 FDX-B encoding (Animal ID). |
static int |
PHIDGET_RFID_PROTOCOL_PHIDGETS
PhidgetsTAG Protocol 24 character ASCII. |
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. |
int |
getLastTagProtocol()
Returns the protocol of 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. |
boolean |
getTagStatus()
Returns the state of whether or not a tag is being read by the reader. |
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. |
void |
write(java.lang.String tag,
int protocol,
boolean lock)
Writes a tag. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PHIDGET_RFID_PROTOCOL_EM4100
getSgetLastTagProtocolcreenSize
and write
public static final int PHIDGET_RFID_PROTOCOL_ISO11785_FDX_B
getSgetLastTagProtocolcreenSize
and write
public static final int PHIDGET_RFID_PROTOCOL_PHIDGETS
getSgetLastTagProtocolcreenSize
and write
Constructor Detail |
public RFIDPhidget() throws PhidgetException
Method Detail |
public int getOutputCount() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public boolean getOutputState(int index) throws PhidgetException
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.public void setOutputState(int index, boolean state) throws PhidgetException
index
- index of the outputstate
- 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.public boolean getAntennaOn() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void setAntennaOn(boolean state) throws PhidgetException
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.public boolean getLEDOn() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void setLEDOn(boolean state) throws PhidgetException
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.public java.lang.String getLastTag() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public int getLastTagProtocol() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public boolean getTagStatus() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void write(java.lang.String tag, int protocol, boolean lock) throws PhidgetException
tag
- tag stringprotocol
- tag protocollock
- 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.public final void addTagGainListener(TagGainListener l)
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
interfacepublic final void removeTagGainListener(TagGainListener l)
public final void addTagLossListener(TagLossListener l)
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
interfacepublic final void removeTagLossListener(TagLossListener l)
public final void addOutputChangeListener(OutputChangeListener l)
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
interfacepublic final void removeOutputChangeListener(OutputChangeListener l)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |