SparkScan Session
Defined in namespace Scandit.DataCapture.Barcode.Spark.Capture
- SparkScanSession
class SparkScanSession
Added in version 6.17.0
The SparkScan session is responsible for determining the list of relevant barcodes by filtering out duplicates. This filtering of duplicates is completely time-based and does not use any information about the location of the barcode. By default, all the codes scanned in a frame are always reported. It is possible to filter out codes recently scanned by changing SparkScanSettings.CodeDuplicateFilter.
When the SparkScan mode is disabled, the session’s duplicate filter is reset.
Important
The SparkScan session should only be accessed from within OnBarcodeScanned(), OnSessionUpdated() or SparkScan.BarcodeScanned and SparkScan.SessionUpdated events and from the thread these methods are called from. It is not safe to be accessed from anywhere else since it may be concurrently modified.
Specifically no reference to NewlyRecognizedBarcodes should be kept and traversed outside of OnBarcodeScanned(), OnSessionUpdated() or SparkScan.BarcodeScanned and SparkScan.SessionUpdated events. Instead a copy of the lists should be made to avoid concurrent modification. The individual barcodes can be referenced without copying as they are not further modified.
- NewlyRecognizedBarcodes
IList<Barcode> NewlyRecognizedBarcodes { get; }
Added in version 6.17.0
List of codes that were newly recognized in the last processed frame.
Deprecated since version 6.26.0: Prefer use of NewlyRecognizedBarcode instead.
- NewlyRecognizedBarcode
Barcode NewlyRecognizedBarcode { get; }
Added in version 6.26.0
Last newly recognized barcode in the last processed frame.
- Reset()
void
Reset()Added in version 6.17.0
Resets the SparkScan session, effectively clearing the history of scanned codes. This affects duplicate filtering: when calling Reset() every frame has the same effect as setting the SparkScanSettings.CodeDuplicateFilter to 0. This function should only be called inside the listeners’ callback.
- FrameSequenceId
long
FrameSequenceId { get; }Added in version 6.17.0
The identifier of the current frame sequence.
Important
As long as there is no interruption of frames coming from the camera, the FrameSequenceId will stay the same. Note that every time target mode is switched on or off, this number will change.