|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframe.RFIDFrame
public abstract class RFIDFrame
Root class of all frame types.
Nested Class Summary | |
---|---|
static class |
RFIDFrame.FrameType
These definitions are used to support RFIDChannel's logging. |
Field Summary | |
---|---|
protected static int |
CRC_SIZE
|
protected BitMemory |
data
These are the bits of the frame. |
protected boolean |
hasCRC
|
protected boolean |
isCorrupted
|
Constructor Summary | |
---|---|
protected |
RFIDFrame(int bitsize,
RFIDFrame.FrameType t)
The constructor can be called only by a derived class - don't try to new one of these, new one of the subclasses. |
Method Summary | |
---|---|
RFIDFrame |
clone()
Overridden clone function, to create new data instance variable. |
RFIDFrame |
dup()
Wrapper to clone frame, catching possible exceptions. |
void |
flipBit(int b)
Fliips a single bit of the frame. |
int |
getSize()
Returns the size of the frame, in bits (not including preamble). |
RFIDFrame.FrameType |
getType()
This is an oracle method that reliably returns the type of a frame, even a corrupted one. |
boolean |
hasCRC()
Returns true if the frame's class has been configured with a CRC field, false otherwise. |
boolean |
isCollision()
Returns true if the frame represents a collision; false otherwise. |
boolean |
isCorrupted()
Returns true only if (a) the frame's class has CRC enabled AND a bit error has occured in this frame, or (b) a collision has occurred. |
void |
markCorrupted()
IF the frame's class carries a CRC, mark it as corrupted. |
java.lang.String |
toString(java.lang.String prefix)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean isCorrupted
protected boolean hasCRC
protected BitMemory data
protected static final int CRC_SIZE
Constructor Detail |
---|
protected RFIDFrame(int bitsize, RFIDFrame.FrameType t)
Method Detail |
---|
public int getSize()
public RFIDFrame.FrameType getType()
Your reader implementation cannot use this for making decisions. (You could potentially use it for debugging, but it isn't something an actual reader could do.)
public boolean isCollision()
It's okay to use this function in making decisions in you reader.
public boolean isCorrupted()
public void markCorrupted()
public void flipBit(int b)
public boolean hasCRC()
public java.lang.String toString(java.lang.String prefix)
public RFIDFrame dup()
public RFIDFrame clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |