Class ResultCollector
java.lang.Object
com.cognex.cmbsdk.resultcollector.ResultCollector
- All Implemented Interfaces:
DataManSystem.OnCodeQualityDataArrivedListener,DataManSystem.OnImageDataArrivedListener,DataManSystem.OnImageGraphicsArrivedListener,DataManSystem.OnReadStringArrivedListener,DataManSystem.OnTrainingResultArrivedListener,DataManSystem.OnXmlResultArrivedListener,DataManSystem.OnXmlStatisticsArrivedListener
public class ResultCollector
extends Object
implements DataManSystem.OnCodeQualityDataArrivedListener, DataManSystem.OnImageDataArrivedListener, DataManSystem.OnImageGraphicsArrivedListener, DataManSystem.OnXmlResultArrivedListener, DataManSystem.OnReadStringArrivedListener, DataManSystem.OnXmlStatisticsArrivedListener, DataManSystem.OnTrainingResultArrivedListener
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionResultCollector(DataManSystem system, EnumSet<ResultType> expectedResultTypes, Executor executor) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidintlongvoidonCodeQualityDataArrived(DataManSystem dataManSystem, String codeQualityData) Called when the code quality data has been arrived.voidonImageDataArrived(DataManSystem dataManSystem, int resultId, byte[] imageData) Called when an image has been arrived.voidonImageGraphicsArrived(DataManSystem dataManSystem, int resultId, String imageGraphics) Called when the image graphics has been arrived.voidonReadStringArrived(DataManSystem dataManSystem, int resultId, String readString) Called when a read string has been arrived.voidonTrainingResultArrived(DataManSystem dataManSystem, String trainingResult) Called when the training result has been arrived.voidonXmlResultArrived(DataManSystem dataManSystem, int resultId, String xmlResult) Called when the XML result has been arrived.voidonXmlStatisticsArrived(DataManSystem dataManSystem, String xmlStatistics) Called when the XML statistics has been arrived.voidparseAndStoreResponse(ResultType dataType, int responseId, Object data) voidrelease()voidsetResultCacheLength(int resultCacheLength) voidvoidsetResultTimeOut(long resultTimeOut)
-
Constructor Details
-
ResultCollector
public ResultCollector(DataManSystem system, EnumSet<ResultType> expectedResultTypes, Executor executor)
-
-
Method Details
-
setResultCollectorListener
-
release
public void release() -
setResultTimeOut
public void setResultTimeOut(long resultTimeOut) -
getResultTimeOut
public long getResultTimeOut() -
getResultCacheLength
public int getResultCacheLength() -
setResultCacheLength
public void setResultCacheLength(int resultCacheLength) -
clearCachedResults
public void clearCachedResults() -
emptyResultQueue
public void emptyResultQueue() -
parseAndStoreResponse
-
onTrainingResultArrived
Description copied from interface:DataManSystem.OnTrainingResultArrivedListenerCalled when the training result has been arrived.- Specified by:
onTrainingResultArrivedin interfaceDataManSystem.OnTrainingResultArrivedListener- Parameters:
dataManSystem- TheDataManSystemobject that invoked the callback.trainingResult- The training result in XML format that arrived from the reader.
-
onXmlStatisticsArrived
Description copied from interface:DataManSystem.OnXmlStatisticsArrivedListenerCalled when the XML statistics has been arrived.- Specified by:
onXmlStatisticsArrivedin interfaceDataManSystem.OnXmlStatisticsArrivedListener- Parameters:
dataManSystem- TheDataManSystemobject that invoked the callback.xmlStatistics- The read statistics in XML format.
-
onXmlResultArrived
Description copied from interface:DataManSystem.OnXmlResultArrivedListenerCalled when the XML result has been arrived.- Specified by:
onXmlResultArrivedin interfaceDataManSystem.OnXmlResultArrivedListener- Parameters:
dataManSystem- TheDataManSystemobject that invoked the callback.resultId- The identifier of the result. This value can be used to match the read string with the other result types like images, image graphics or XML results.xmlResult- The result of a read in XML format.
-
onReadStringArrived
Description copied from interface:DataManSystem.OnReadStringArrivedListenerCalled when a read string has been arrived.- Specified by:
onReadStringArrivedin interfaceDataManSystem.OnReadStringArrivedListener- Parameters:
dataManSystem- TheDataManSystemobject that invoked the callback.resultId- The identifier of the result. This value can be used to match the read string with the other result types like images, image graphics or XML results.readString- The string read by the system.
-
onImageGraphicsArrived
Description copied from interface:DataManSystem.OnImageGraphicsArrivedListenerCalled when the image graphics has been arrived.- Specified by:
onImageGraphicsArrivedin interfaceDataManSystem.OnImageGraphicsArrivedListener- Parameters:
dataManSystem- TheDataManSystemobject that invoked the callback.resultId- The identifier of the result. This value can be used to match the read string with the other result types like images, image graphics or XML results.imageGraphics- The image graphics in XML format that arrived from the reader.
-
onImageDataArrived
Description copied from interface:DataManSystem.OnImageDataArrivedListenerCalled when an image has been arrived.- Specified by:
onImageDataArrivedin interfaceDataManSystem.OnImageDataArrivedListener- Parameters:
dataManSystem- TheDataManSystemobject that invoked the callback.resultId- The identifier of the result. This value can be used to match the read string with the other result types like images, image graphics or XML results.imageData- The image as byte array that arrived from the reader.
-
onCodeQualityDataArrived
Description copied from interface:DataManSystem.OnCodeQualityDataArrivedListenerCalled when the code quality data has been arrived.- Specified by:
onCodeQualityDataArrivedin interfaceDataManSystem.OnCodeQualityDataArrivedListener- Parameters:
dataManSystem- TheDataManSystemobject that invoked the callback.codeQualityData- The code quality data in XML format that arrived from the reader.
-