|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.onsignal.rfid.RFIDReader
public class RFIDReader
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
RFIDReader()
The basic constructor. |
|
RFIDReader(RFIDListener listener)
COnstructor without port name, no serial port will be opened, you'lll have it to do yourself using setPort() and open(). |
|
RFIDReader(java.lang.String portName)
Constructor; pass in the name of the port the reader is connected to. |
|
RFIDReader(java.lang.String portName,
RFIDListener listener)
Constructor using a port name and an instance of a listener object which will be notified on tag events. |
Method Summary | |
---|---|
void |
addListener(RFIDListener l)
Adds a listener for this reader |
void |
close()
Shuts down the reader thread and closes the serial port. |
RFIDTag |
getCurrentTag()
Returns the current tag, or null if there is no tag at the reader right now. |
boolean |
open()
Opens the prot and starts the reader thread. |
void |
removeListener(RFIDListener l)
Removes a listener |
void |
run()
Do not call run() directly! |
void |
setPort(java.lang.String portName)
Set or change the name of the port. |
void |
setTagRemoveTimeout(int timeout)
Set the timeout for the removal of a tag, in milliseconds. |
void |
setVerbose(boolean verbose)
Set the verbosity of this reader. |
java.lang.String |
toString()
Represent this reader as a string for easy printing |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RFIDReader(java.lang.String portName) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
public RFIDReader(java.lang.String portName, RFIDListener listener) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
public RFIDReader(RFIDListener listener)
public RFIDReader()
Method Detail |
---|
public void setPort(java.lang.String portName) throws gnu.io.NoSuchPortException
gnu.io.NoSuchPortException
public RFIDTag getCurrentTag()
public boolean open() throws gnu.io.PortInUseException
gnu.io.PortInUseException
public void close()
public void setVerbose(boolean verbose)
public void addListener(RFIDListener l)
public void removeListener(RFIDListener l)
public void setTagRemoveTimeout(int timeout)
public java.lang.String toString()
toString
in class java.lang.Thread
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |