BEA Systems, Inc.

com.connecterra.ale.reader.access
Class DeviceTagReport

java.lang.Object
  extended by com.connecterra.ale.reader.access.DeviceTagReport
All Implemented Interfaces:
Cloneable

public class DeviceTagReport
extends Object
implements Cloneable

The DeviceTagReport represents the results of a set of operations performed against a tag in the reader's field during Edge event processing. Each tag is identified by an identity, also stored in the DeviceTagReport.

The tag identity is in two parts: tag AFI data (the metadata that describes the contents of the identity bits) if any, and the identity data itself (if the tag is an EPC tag with no AFI, this is the EPC value).


Constructor Summary
DeviceTagReport(long[] data)
          Creates a new DeviceTagReport instance.
DeviceTagReport(long[] data, int length, int afi)
          Creates a new DeviceTagReport instance.
DeviceTagReport(long msWord, long lsWord)
           
 
Method Summary
 boolean equals(Object other)
           
 int getAFI()
          Returns the AFI value of the identity.
 List getDeviceOpReports()
          Get the List of DeviceOpReports
 com.connecterra.ale.epc.EPC getEPC()
          Return the tag identity AFI and value as an EPC object.
 String getFailureInfo()
           
 OpStatus getOpStatus()
           
 long[] getTagIdentity()
          Gets the tag identity
 URI getURI()
          Return the tag identity AFI and value as a tag URI
 boolean hasAFI()
           
 int hashCode()
           
static DeviceTagReport parseHex(String hexEPC)
          Parses the hex string passed in as a raw binary EPC value, returning a DeviceTagReport with no opReports.
 void setAFI(int afiValue)
          Set the AFI part of the tag identity
 void setDeviceOpReports(List deviceOpReports, OpStatus opStatus, String failureInfo)
          Set the List of DeviceOpReports.
 void setTagIdentity(long[] tagIdentity)
          Sets the tag identity
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeviceTagReport

public DeviceTagReport(long[] data)
Creates a new DeviceTagReport instance.

Parameters:
data - a long[] value containing the tag identity

DeviceTagReport

public DeviceTagReport(long[] data,
                       int length,
                       int afi)
Creates a new DeviceTagReport instance.

If the tag identity has no AFI value, then the DeviceTagReport.DeviceTagReport(long[]) constructor should be used instead. The length argumrnt should include the number of meaningful bits of data. For example, if the identity is a 96 bit value memory are read, then this should be set to 96, even though an array of 2 longs is capable of storing up to 128 bits of data. The data must be padded with zeros on the left, so that the least significant bit of the data is in the least significant bit of the last element of the array.

Parameters:
data - a long[] value containing the tag identity
length - the number of significant bits in the identity
afi - an int value containing the afi

DeviceTagReport

public DeviceTagReport(long msWord,
                       long lsWord)
Method Detail

parseHex

public static DeviceTagReport parseHex(String hexEPC)
Parses the hex string passed in as a raw binary EPC value, returning a DeviceTagReport with no opReports.

Parameters:
hexEPC -
Returns:
the new device tag report, or null if there's a parse error

setDeviceOpReports

public void setDeviceOpReports(List deviceOpReports,
                               OpStatus opStatus,
                               String failureInfo)
Set the List of DeviceOpReports.

Parameters:
deviceOpReports - the List of DeviceOpReport to set
opStatus - the OpStatus value from performing the OpSpecs
failureInfo - the String failure info if performing the OpSpecs failed.

getOpStatus

public OpStatus getOpStatus()
Returns:
the OpStatus value from performing the OpSpecs

getFailureInfo

public String getFailureInfo()
Returns:
the String failure info if performing the OpSpecs failed.

getDeviceOpReports

public List getDeviceOpReports()
Get the List of DeviceOpReports

Returns:
the List of DeviceOpReport objects in the DeviceTagReport

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

setTagIdentity

public void setTagIdentity(long[] tagIdentity)
Sets the tag identity

Parameters:
tagIdentity - the tag identity value as a long[]

getTagIdentity

public long[] getTagIdentity()
Gets the tag identity

Returns:
the tag identity value as a long long[]

hasAFI

public boolean hasAFI()
Returns:
true if the identity has an AFI, or false otherwise

setAFI

public void setAFI(int afiValue)
Set the AFI part of the tag identity

Parameters:
afiValue - an int AFI value

getAFI

public int getAFI()
Returns the AFI value of the identity. If DeviceTagReport.hasAFI() is false, this will return a meaningless value.

Returns:
an int AFI value

getEPC

public com.connecterra.ale.epc.EPC getEPC()
Return the tag identity AFI and value as an EPC object.

Returns:
the EPC object

getURI

public URI getURI()
Return the tag identity AFI and value as a tag URI

Returns:
the URI value

Documentation is available at
${DOCSWEBROOT}
Copyright 2007 BEA Systems Inc.