|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A specification of an EPC Programming Cycle. A PCSpec is processed in one of two modes. In the legacy mode, provided for backwards compatibility with pre-2.0 Edge Servers, the PCSpec contains no AccessSpecs and acts on a single tag in field, performing no function other than to program a single tag's EPC field. In gen2 mode (named for the EPC Class 1 Generation 2 tags that it was primarily developed to support), the PCSpec contains AccessSpec objects that describe a series of actions to be performed on each tag in field. A gen2-mode PCSpec can be restricted to act only if a single tag is in the field by setting the isRestrictSingleTag flag. Some fields of the PCSpec are relevant only to one mode or the other - these are called out in their respective Javadocs.
Method Summary | |
void |
addAccessSpec(AccessSpec accessSpec)
Add an access spec to the end of the list of access specs to be performed by this PCSpec. |
void |
addLogicalReaderName(java.lang.String name)
Adds one name to the list of logical reader names which will be used as a part of this PCSpec. |
void |
addLogicalReaderNames(java.util.List names)
Appends a list of names to the list of logical reader names which will be used as a part of this PCSpec. |
void |
addReaderParameters(java.util.Map params)
Adds the supplied mappings between reader parameter names and reader parameter values to this PCSpec's current mapping. |
java.util.List |
getAccessSpecs()
Return the list of access specs associated with this PCSpec. |
java.lang.String |
getApplicationData()
Gets the application data String which will be returned in PCWriteReport instances. |
java.lang.String |
getCacheName()
Returns the name of the EPC cache from which this programming cycle obtains EPC values for programming operations. |
long |
getDuration()
Returns the maximum amount of time to run EPC writing trials before failing a programming cycle. |
java.util.List |
getLogicalReaderNames()
Returns the list of logical reader names which will be used as a part of this PCSpec. |
java.lang.String |
getReaderParameter(java.lang.String paramName)
Gets a parameter data value for the indicated parameter name. |
java.util.Map |
getReaderParameters()
Returns a map whose key is the name of a reader parameter, and whose value is the reader parameter value. |
java.net.URI |
getStartTrigger()
Gets the start trigger which will begin a programming cycle. |
java.net.URI |
getStopTrigger()
Gets the stop trigger which will abort a programming cycle. |
int |
getTrials()
Gets the maximum number of EPC writing trials to run before failing a programming cycle. |
boolean |
isRestrictSingleTag()
Returns true if this PCSpec should fail if multiple tags are in the field. |
void |
setAccessSpecs(java.util.List accessSpecs)
Set the list of access specs associated with this PCSpec. |
void |
setApplicationData(java.lang.String value)
Sets the application data String which will be returned in PCWriteReport instances. |
void |
setCacheName(java.lang.String cacheName)
Specifies the name of an EPC cache from which this programming cycle obtains EPC values for programming operations. |
void |
setDuration(long maxDurationMS)
Sets the maximum amount of time to run EPC writing trials before failing a programming cycle. |
void |
setLogicalReaderNames(java.util.List names)
Sets the list of logical reader names which will be used as a part of this PCSpec. |
void |
setReaderParameter(java.lang.String paramName,
java.lang.String paramValue)
Sets a parameter data value for the indicated parameter name. |
void |
setReaderParameters(java.util.Map params)
Sets the mapping between reader parameter names and reader parameter values. |
void |
setRestrictSingleTag(boolean restrictSingleTag)
Sets the flag whether this PCSpec should fail if multiple tags are in the field. |
void |
setStartTrigger(java.net.URI trigger)
Sets the start trigger which will begin a programming cycle. |
void |
setStopTrigger(java.net.URI trigger)
Sets the stop trigger which will abort a programming cycle. |
void |
setTrials(int maxTrials)
Sets the maximum number of EPC writing trials to run before failing a programming cycle. |
Method Detail |
public java.lang.String getCacheName()
This is only used in legacy PCSpecs.
public void setCacheName(java.lang.String cacheName)
cacheName
- Specifies an EPC cache. May be null, in which case EPC values must be
supplied to poll()
or immediate()
operations.public java.lang.String getApplicationData()
public void setApplicationData(java.lang.String value)
public java.util.List getLogicalReaderNames()
If a programming cycle specification lists multiple logical readers, then when a
programming cycle is started, each write-capable logical reader will be used, in order,
to attempt to write the tag. If a logical reader successfuly writes the tag, then the
programming cycle ends and no further logical readers are tried. The process of trying
the listed logical readers in turn is called a 'EPC writing trial'. See setTrials(int)
.
public void setLogicalReaderNames(java.util.List names)
names
- a List of String objects containing reader names.public void addLogicalReaderName(java.lang.String name)
public void addLogicalReaderNames(java.util.List names)
names
- a List of String objects containing reader names.public java.lang.String getReaderParameter(java.lang.String paramName)
In gen2-mode PCSpecs, reader parameters are also used to perform substitutions in
AccessSpecs. See the various AccessSpec elements that perform such substitutions for
more details (most notably, #ParamDataSpec
).
paramName
- Identifies the reader driver parameter to be read.
public void setReaderParameter(java.lang.String paramName, java.lang.String paramValue)
paramName
- Identifies the reader driver parameter to be set. If an already set
parameter is named, its value will be replaced.paramValue
- Supplies the value to be associated with the parameter name. May be null, in
which case the parameter value is deleted (in which case
getReaderParameter(java.lang.String)
will return null).getReaderParameter(java.lang.String)
public java.util.Map getReaderParameters()
getReaderParameter(java.lang.String)
public void setReaderParameters(java.util.Map params)
params
- A Map whose keys and values are all Strings.setReaderParameter(java.lang.String, java.lang.String)
public void addReaderParameters(java.util.Map params)
setReaderParameter(java.lang.String, java.lang.String)
public java.net.URI getStartTrigger()
public void setStartTrigger(java.net.URI trigger)
trigger
- The URI for the trigger, or null to remove the trigger.public java.net.URI getStopTrigger()
public void setStopTrigger(java.net.URI trigger)
trigger
- The URI for the trigger, or null to remove the trigger.public int getTrials()
public void setTrials(int maxTrials)
maxTrials
- The maximum number of trials to run. 0 means no limit.getTrials()
public long getDuration()
getTrials()
public void setDuration(long maxDurationMS)
maxDurationMS
- The maximum amount of time to run trials, in milliseconds. 0 means no limit.public java.util.List getAccessSpecs()
public void setAccessSpecs(java.util.List accessSpecs)
If this list is present in a PCSpec, the PCSpec is a gen2 PCSpec.
public void addAccessSpec(AccessSpec accessSpec)
accessSpec
- the access spec to add to the end of the PCSpec's list of AccessSpecspublic boolean isRestrictSingleTag()
This value is ignored in legacy mode PCSpecs.
public void setRestrictSingleTag(boolean restrictSingleTag)
This value is ignored in legacy mode PCSpecs.
restrictSingleTag
- true if this PCSpec should fail if multiple tags are detected in the field
before starting processing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |