|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectRFIDPacket
public class RFIDPacket
Stores all information contained in RFID reader packets. Provides methods to manipulate data and format properly for other objects.
| Field Summary | |
|---|---|
private int |
checkSumLsb
LRC - A cumulative Exclusive OR(XOR) operation on all the bytes. |
private int |
checkSumMsb
Ones complement of checkSumLSB. |
private int |
command
Specifies action to be taken by the reader Length of 1 Byte. |
private int |
commandFlag
Specifies action to be taken by the reader Length of 1 Byte. |
private int[] |
data
Contains the command data. |
private int |
length
Describes length of the packet. |
| Constructor Summary | |
|---|---|
RFIDPacket(int[] dataBuffer)
Creates a new RFIDPacket Object |
|
RFIDPacket(int cmdFlag,
int cmd)
Creates a new RFIDPacket Object |
|
| Method Summary | |
|---|---|
private void |
calcCheckSum()
Calculates and sets the block character check (BCC) checksum. |
private byte |
encodeUnsigned(int num)
Encodes the given integer into an equivilant unsigned byte represented in two's complement form. |
int |
getTagID()
Returns the tag identification number from the packet. |
void |
printOut()
Prints out packet information. |
private void |
setLength()
Calculates and sets the packet length. |
byte[] |
toArray()
Converts the packet information to a sendable array of bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int length
private int commandFlag
private int command
private int[] data
private int checkSumLsb
private int checkSumMsb
| Constructor Detail |
|---|
public RFIDPacket(int cmdFlag,
int cmd)
cmdFlag - Specifies action to be taken by the reader or the action that was
recently performed by the reader.cmd - Specifies action to be taken by the reader or the action that was
recently performed by the reader.public RFIDPacket(int[] dataBuffer)
array - dataBuffer to manipulate| Method Detail |
|---|
public void printOut()
private void calcCheckSum()
private void setLength()
public byte[] toArray()
private byte encodeUnsigned(int num)
num - The integer to be encoded
public int getTagID()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||