|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.I2CSensor lejos.nxt.addon.RFIDSensor
public class RFIDSensor
Support for the Codatex RFID Sensor. See www.codatex,com for details. Notes this device requires delays between various commands for them to function correctly, it also enters a sleep mode and requires to be woken up. The methods in this class fall into two categories. Basic commands These pretty much match one to one with the device command set. They do not incorporate any delays, or wake up code. They can be used by user programs but if they are then appropriate delays etc. must be used. They are provided to allow more sophisticated user programs access to the low level device. High level commands These provide higher level access to the device and are often implemented via several i2c commands. They do include delays and wake up logic.
Field Summary |
---|
Fields inherited from class lejos.nxt.I2CSensor |
---|
PRODUCT_ID, SENSOR_TYPE, VERSION |
Constructor Summary | |
---|---|
RFIDSensor(I2CPort port)
Create a class to provide access to the device. |
Method Summary | |
---|---|
protected String |
fetchString(byte register,
int len)
We over-ride the default implementation to ensure that the device is awake before we talk to it. |
byte[] |
getSerialNo()
Obtain the serial number of the RFID Sensor. |
int |
getStatus()
Read the status from the device. |
byte[] |
readTransponder(boolean continuous)
Read a transponder id. |
long |
readTransponderAsLong(boolean continuous)
|
void |
startBootLoader()
Enter boot loader mode. |
int |
startContinuousRead()
Start continually reading from the device. |
void |
startFirmware()
Start the firmware on the RFID device. |
int |
startSingleRead()
Start a single read from the device. |
int |
stop()
Send a stop command to the device. |
void |
wakeUp()
The sensor will go into a power save mode after a short time. |
Methods inherited from class lejos.nxt.I2CSensor |
---|
fetchString, getData, getPort, getProductID, getSensorType, getVersion, sendData, sendData, setAddress |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RFIDSensor(I2CPort port)
port
- The sensor port to use for this device.Method Detail |
---|
public void wakeUp()
protected String fetchString(byte register, int len)
register
- The register to read the string from.len
-
public void startFirmware()
public void startBootLoader()
public byte[] getSerialNo()
public int getStatus()
public int startSingleRead()
public int startContinuousRead()
public int stop()
public byte[] readTransponder(boolean continuous)
continuous
- Should we use continuous mode
public long readTransponderAsLong(boolean continuous)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |