Barcode Selection Session

Defined in namespace Scandit.DataCapture.Barcode.Selection.Capture

BarcodeSelectionSession
class BarcodeSelectionSession

Added in version 6.11.0

Holds the ongoing state of a running BarcodeSelection. An instance of this class is passed to IBarcodeSelectionListener.OnSelectionUpdated() when new barcodes are selected or currently selected barcodes are unselected.

Important

The barcode selection session should only be accessed from within OnSelectionUpdated() to which it is provided as an argument. It is not safe to be accessed from anywhere else since it may be concurrently modified.

Specifically no reference to SelectedBarcodes should be kept and traversed outside of OnSelectionUpdated(). Instead a copy of the list should be made to avoid concurrent modification. The individual barcodes can be referenced without copying as they are not further modified.

NewlySelectedBarcodes
IList<Barcode> NewlySelectedBarcodes { get; }

Added in version 6.11.0

List of codes that were newly selected in the last processed frame.

NewlyUnselectedBarcodes
IList<Barcode> NewlyUnselectedBarcodes { get; }

Added in version 6.11.0

List of codes that were unselected in the last processed frame.

SelectedBarcodes
IList<Barcode> SelectedBarcodes { get; }

Added in version 6.11.0

List of currently selected codes.

Reset()
void Reset()

Added in version 6.11.0

Resets the barcode selection session, effectively clearing the history of selected codes. This function should only be called inside the listeners’ callback. To call it from another thread, use BarcodeSelection.Reset().

GetCount()
int GetCount(Barcode barcode)

Added in version 6.11.0

Returns how many times the given Barcode was selected.

FrameSequenceId
long FrameSequenceId { get; }

Added in version 6.11.0

The identifier of the current frame sequence.

Important

As long as there is no interruptions of frames coming from the camera, the FrameSequenceId will stay the same.

LastProcessedFrameId
int LastProcessedFrameId { get; }

Added in version 6.11.0

The identifier of the last processed frame.