|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alien.enterpriseRFID.tags.Tag
Tag object represents information about a single Tag. Each Tag must have a TagID stored in it as a String.
Field Summary | |
static int |
DIR_AWAY
|
static int |
DIR_STATIC
|
static int |
DIR_TOWARD
|
static int |
FOREVER
|
static int |
PROTO_C0
|
static int |
PROTO_C1G1
|
static int |
PROTO_C1G2
|
static int |
PROTO_UNKNOWN
|
static java.lang.String[] |
PROTOCOL_STRINGS
|
Constructor Summary | |
Tag(java.lang.String tagID)
Constructs a Tag with the supplied TagID. |
Method Summary | |
java.lang.Object |
clone()
Clones this Tag object. |
int |
compareTo(java.lang.Object o)
|
int |
getAntenna()
Returns the antenna that this Tag was last seen with. |
long |
getCRC()
Returns this Tag's CRC as a long integer. |
int |
getDirection()
Returns the apparent direction of the tag, toward or away from the antenna. |
long |
getDiscoverTime()
Returns the discovery time of this Tag, as reported by the reader. |
java.lang.String[] |
getG2Data()
Returns all of the additional Gen2 tag data, as an array of Strings. |
java.lang.String |
getG2Data(int index)
Returns a chunk of additional Gen2 tag data, as a String. |
java.lang.String[] |
getG2Ops()
Returns all of the result codes for the G2Ops actions, as an array of Strings. |
java.lang.String |
getG2Ops(int index)
Returns a result from a specific G2Ops action, as a String. |
long |
getHostDiscoverTime()
Returns the discovery time of this Tag, as reported by the host. |
long |
getHostRenewTime()
Returns the time this Tag was last seen, as reported by the host. |
java.lang.String |
getPCWord()
Returns information about a tag's Protocol Control (PC) information. |
long |
getPersistTime()
Returns the PersistTime associated with this Tag. |
int |
getProtocol()
Returns the protocol code for this tag. |
java.lang.String |
getProtocolString()
Returns the protocol string for this tag. |
static java.lang.String |
getProtocolString(int protocol)
Returns the protocol string associated with the given protocol code. |
int |
getReceiveAntenna()
Returns the receive antenna that this Tag was last seen with. |
int |
getRenewCount()
Returns the number of times this Tag has been read. |
long |
getRenewTime()
Returns the time this Tag was last seen be the reader. |
double |
getRSSI()
Gets the last RSSI measurement for this tag. |
double |
getSmoothPosition()
Returns the tag's position, relative to its first read. |
double |
getSmoothSpeed()
Returns the averaged/smoothed speed of this tag. |
double |
getSpeed()
Gets the last speed measurement for this tag. |
static double |
getSpeedSmoothingCoefficient()
Returns the current speed smoothing coeefficient. |
java.lang.String |
getTagAuth()
Returns information about tag authentication. |
java.lang.String |
getTagID()
Returns this Tag's TagID attribute. |
long |
getTimeToLive()
Calculates and returns this Tag's TimeToLive value. |
int |
getTransmitAntenna()
Returns the transmit antenna that this Tag was last seen with. |
java.lang.String |
getXPC()
Returns information about a tag's Extended Protocol Control (XPC) information. |
static double |
getZeroSpeedThresholdHigh()
Returns the current high end of the zero-speed threshold. |
static double |
getZeroSpeedThresholdLow()
Returns the current low end of the zero-speed threshold. |
void |
setAntenna(int antenna)
Sets the antenna that this Tag was last seen with. |
void |
setCRC(long crc)
Sets the CRC of this Tag's TagID. |
void |
setDirection(int direction)
Sets the apparent direction of the tag, toward or away from the antenna. |
void |
setDiscoverTime(long discoverTime)
Sets the discovery time of this Tag, as reported by the reader. |
void |
setG2Data(int index,
java.lang.String data)
Stores a chunk of additional Gen2 tag data, as a String. |
void |
setG2Ops(int index,
java.lang.String data)
Stores a result from a specific G2Ops action. |
void |
setHostDiscoverTime(long hostDiscoverTime)
Sets the discovery time of this Tag, as reported by the host. |
void |
setHostRenewTime(long hostRenewTime)
Sets the time this Tag was last seen, as reported by the host. |
void |
setPCWord(java.lang.String pcWord)
Stores information about a tag's Protocol Control (PC) information. |
void |
setPersistTime(long persistTime)
Sets the PersistTime associated with this Tag. |
void |
setProtocol(int protocol)
Sets the protocol code. |
void |
setProtocol(java.lang.String protoStr)
Sets the protocol string for this tag. |
void |
setReceiveAntenna(int antenna)
Sets the receive antenna that this Tag was last seen with. |
void |
setRenewCount(int renewCount)
Sets the number of times this Tag has been read. |
void |
setRenewTime(long renewTime)
Sets the time this Tag was last seen by the reader. |
void |
setRSSI(double rssi)
Sets this tag's Return Signal Strength Indication. |
void |
setSpeed(double speed)
Updates this Tag's speed measurement. |
static void |
setSpeedSmoothingCoefficient(double speedSmoothingCoeff)
Sets the current speed smoothing coeefficient. |
void |
setTagAuth(java.lang.String tagAuth)
Stores information about tag authentication. |
void |
setTagID(java.lang.String tagID)
Sets the value of this Tag's TagID attribute. |
void |
setTransmitAntenna(int antenna)
Sets the transmit antenna that this Tag was last seen with. |
void |
setXPC(java.lang.String xpc)
Stores information about a tag's Extended Protocol Control (XPC) information. |
static void |
setZeroSpeedThresholdHigh(double zeroSpeedThresholdHigh)
Sets the high end of the zero-speed threshold range. |
static void |
setZeroSpeedThresholdLow(double zeroSpeedThresholdLow)
Sets the low end of the zero-speed threshold range. |
java.lang.String |
toLongString()
Returns a longer string representation of this Tag, including TagID, DiscoveryTime, RenewalTime, Antenna, and Count. |
java.lang.String |
toString()
Returns a short string representation of this Tag. |
void |
updateTag(Tag newTag)
Updates this Tag with the data from newTag. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FOREVER
public static final int PROTO_UNKNOWN
public static final int PROTO_C0
public static final int PROTO_C1G1
public static final int PROTO_C1G2
public static final java.lang.String[] PROTOCOL_STRINGS
public static final int DIR_TOWARD
public static final int DIR_AWAY
public static final int DIR_STATIC
Constructor Detail |
public Tag(java.lang.String tagID)
tagID
- the ID value for this TagMethod Detail |
public java.lang.String getTagID()
setTagID(String)
public void setTagID(java.lang.String tagID)
tagID
- the Tag IDgetTagID()
public long getCRC()
setCRC(long)
public void setCRC(long crc)
crc
- the CRC of this tag's TagIDgetCRC()
public int getAntenna()
setAntenna(int)
public void setAntenna(int antenna)
antenna
- the antenna where this tag was last seengetAntenna()
public int getTransmitAntenna()
setTransmitAntenna(int)
,
setReceiveAntenna(int)
,
getReceiveAntenna()
public void setTransmitAntenna(int antenna)
antenna
- the transmit antenna where this tag was last seengetTransmitAntenna()
,
setReceiveAntenna(int)
,
getReceiveAntenna()
public int getReceiveAntenna()
setReceiveAntenna(int)
,
setTransmitAntenna(int)
,
getTransmitAntenna()
public void setReceiveAntenna(int antenna)
antenna
- the receive antenna where this tag was last seengetReceiveAntenna()
,
setTransmitAntenna(int)
,
getTransmitAntenna()
public long getPersistTime()
FOREVER
means the tag will never expire.
setPersistTime(long)
public void setPersistTime(long persistTime)
FOREVER
means the tag will never expire.
persistTime
- this tag's persistence timegetPersistTime()
public long getDiscoverTime()
setDiscoverTime(long)
public void setDiscoverTime(long discoverTime)
discoverTime
- the time this tag was first seen by the readergetDiscoverTime()
public long getHostDiscoverTime()
setHostDiscoverTime(long)
public void setHostDiscoverTime(long hostDiscoverTime)
hostDiscoverTime
- the time the host first saw this taggetHostDiscoverTime()
public long getRenewTime()
setRenewTime(long)
public void setRenewTime(long renewTime)
renewTime
- the time this tag was last seen by the readergetRenewTime()
public long getHostRenewTime()
setHostRenewTime(long)
public void setHostRenewTime(long hostRenewTime)
hostRenewTime
- the time the host last saw this taggetHostRenewTime()
public int getRenewCount()
setRenewCount(int)
public void setRenewCount(int renewCount)
renewCount
- the tag's read countgetRenewCount()
public int getProtocol()
public void setProtocol(int protocol)
protocol
- The protocol code to setpublic void setProtocol(java.lang.String protoStr)
protoStr
- the string representation of the protocolpublic java.lang.String getProtocolString()
getProtocolString(int)
public static java.lang.String getProtocolString(int protocol)
protocol
- the protocol code to convert
public long getTimeToLive()
TTL = PersistTime - (ElapsedTimeSinceLastSeen) = PersistTime - (CurrentTime - HostRenewTime)TimeToLive will always be reported as being between 0 and PersistTime.
public void setSpeed(double speed)
This method also integrates successive speed measurements over time to produce a distance traveled value, smoothDistance.
speed
- the latest speed measurement for this taggetSpeed()
,
getSmoothSpeed()
,
getSmoothPosition()
public double getSpeed()
setSpeed(double)
,
getSmoothSpeed()
public double getSmoothSpeed()
setSpeed(double)
,
getSpeed()
public double getSmoothPosition()
setSpeed(double)
,
getSmoothSpeed()
public void setDirection(int direction)
direction
- getDirection()
public int getDirection()
setDirection(int)
public void setG2Data(int index, java.lang.String data)
index
- the index (0-3) of the chunk to storedata
- the String of hex-formatted datagetG2Data(int)
,
getG2Data()
public java.lang.String getG2Data(int index)
index
- which chunk of additional Gen2 data to retrieve
setG2Data(int, String)
,
getG2Data()
public java.lang.String[] getG2Data()
setG2Data(int, String)
,
getG2Data(int)
public void setG2Ops(int index, java.lang.String data)
index
- the index (0-8) of the chunk to storedata
- the String of hex-formatted datagetG2Ops(int)
,
getG2Ops()
public java.lang.String getG2Ops(int index)
index
- which chunk of G2Ops results to retrieve
setG2Ops(int, String)
,
getG2Ops()
public java.lang.String[] getG2Ops()
setG2Ops(int, String)
,
getG2Ops(int)
public void setRSSI(double rssi)
rssi
- getRSSI()
public double getRSSI()
setRSSI(double)
public static double getSpeedSmoothingCoefficient()
setSpeedSmoothingCoefficient(double)
public static void setSpeedSmoothingCoefficient(double speedSmoothingCoeff)
The default value is 0.05. Higher values of the smoothing coefficient give more weight to the current speed, and less weight to the historical speed.
speedSmoothingCoeff
- the current speed smoothing coefficientgetSpeedSmoothingCoefficient()
public static double getZeroSpeedThresholdLow()
setZeroSpeedThresholdLow(double)
,
getZeroSpeedThresholdHigh()
,
setZeroSpeedThresholdHigh(double)
public static void setZeroSpeedThresholdLow(double zeroSpeedThresholdLow)
To eliminate the zero-speed threshold mechanism, set the low and high thresholds both to zero.
zeroSpeedThresholdLow
- the low end of the zero-speed threshold rangegetZeroSpeedThresholdLow()
,
getZeroSpeedThresholdHigh()
,
setZeroSpeedThresholdHigh(double)
public static double getZeroSpeedThresholdHigh()
getZeroSpeedThresholdLow()
,
setZeroSpeedThresholdLow(double)
,
setZeroSpeedThresholdHigh(double)
public static void setZeroSpeedThresholdHigh(double zeroSpeedThresholdHigh)
To eliminate the zero-speed threshold mechanism, set the low and high thresholds both to zero.
zeroSpeedThresholdHigh
- the high end of the zero-speed threshold rangegetZeroSpeedThresholdLow()
,
setZeroSpeedThresholdLow(double)
,
getZeroSpeedThresholdHigh()
public void setTagAuth(java.lang.String tagAuth)
+ authentication succeeded - authentication failed
No symbol after the manufacturer's ID indicates that either the tag does not support Alien dynamic authentication or the authentication process failed to complete. If the reader was unable to retrieve manufacturer's ID code from the tag (for example, due to noise or an aborted transaction) then the TagAuth field contains the '?' symbol.
The TagAuth data is only available when using a custom taglist format and the ${AUTH} token.
tagAuth
- the new tag authentication informationgetTagAuth()
public java.lang.String getTagAuth()
+ authentication succeeded - authentication failed
No symbol after the manufacturer's ID indicates that either the tag does not support Alien dynamic authentication or the authentication process failed to complete. If the reader was unable to retrieve manufacturer's ID code from the tag (for example, due to noise or an aborted transaction) then the TagAuth field contains the '?' symbol.
The TagAuth data is only available when using a custom taglist format and the ${AUTH} token.
setTagAuth(String)
public void setPCWord(java.lang.String pcWord)
Additional tag information may also be found in the Extended PC (XPC) data.
The PC data is available when using a custom taglist format with the ${PCWORD} token.
pcWord
- the new PCWord informationgetPCWord()
public java.lang.String getPCWord()
Additional tag information may also be found in the Extended PC (XPC) data.
The PC data is available when using a custom taglist format with the ${PCWORD} token.
setPCWord(String)
public void setXPC(java.lang.String xpc)
The XPC data is available when using a custom taglist format with the ${XPC} token.
xpc
- the new XPC informationgetXPC()
public java.lang.String getXPC()
The XPC data is available when using a custom taglist format with the ${XPC} token.
setXPC(String)
public void updateTag(Tag newTag)
newTag
- the new tag datapublic java.lang.Object clone()
Tag
object.
public java.lang.String toString()
public java.lang.String toLongString()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |