pops.ale.engine.collect
Class Grouping

java.lang.Object
  extended by pops.ale.engine.collect.Grouping

public class Grouping
extends java.lang.Object

Aggregation engine. Wrapper Class of the Groups class with a pool of reusable EPC objects. Plus an interface for grouping incoming tags as arrays of bytes, by wrapping sgtin96 and sgln96 codecs.

Author:
rdagher

Field Summary
protected  boolean beepOnDetection
          Flag indicating to beep on detection of a tag.
protected  boolean beepOnNewDetection
          Flag indicating to on detection of a new tag.
 
Constructor Summary
Grouping()
          Constructor
 
Method Summary
 void addGroupPattern(java.lang.String[] patternList, UriRepresentation uriRepresentation)
          Adds a list grouping pattern to the group list.
 boolean aggregate(byte header, byte[] tagData, long timeStamp, Epc groupingWrapper)
          Aggregate a received tag.
 ECReport buildReporGroups(ECSpec spec)
          Generate the final report.
 void cleanUp()
          Clean up procedure for recycling aggregation object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beepOnDetection

protected boolean beepOnDetection
Flag indicating to beep on detection of a tag.


beepOnNewDetection

protected boolean beepOnNewDetection
Flag indicating to on detection of a new tag.

Constructor Detail

Grouping

public Grouping()
Constructor

Method Detail

addGroupPattern

public void addGroupPattern(java.lang.String[] patternList,
                            UriRepresentation uriRepresentation)
Adds a list grouping pattern to the group list.

Parameters:
patternList -
Uri - representation of the patterns.
See Also:
addGroupPattern(String)

aggregate

public boolean aggregate(byte header,
                         byte[] tagData,
                         long timeStamp,
                         Epc groupingWrapper)
Aggregate a received tag.

Parameters:
header - tag type.
tagData - received tag data : identity epc.
timeStamp - reception time
groupingWrapper - a grouping wrapper.
Returns:
true if Threshold of maximum aggregated tags is reached, false otherwise.

buildReporGroups

public ECReport buildReporGroups(ECSpec spec)
Generate the final report.

Parameters:
spec - the spec object ((with restricstion)) to include fields accordingly.
Returns:
the report for the given spec.

cleanUp

public void cleanUp()
Clean up procedure for recycling aggregation object.