ScanCaseDelegate Interface Reference

Public Member Functions

void DidInitialize (ScanCase scanCase)
 
ScanCaseState DidScan (ScanCase scanCase, ScanCaseSession session)
 
void DidChangeState (ScanCase scanCase, ScanCaseState newState, ScanCaseStateChangeReason reason)
 

Detailed Description

Calls the Protocol for events fired by ScanCase, e.g.

when new codes are scanned.

Classes implementing the ScanCaseDelegate protocol receive barcode/2D code scan events whenever a new code has been scanned. The class implementing the protocol also get notified when ScanCase has completed initialization, and when ScanCase::state is changed.

Since
4.16

Member Function Documentation

void DidInitialize ( ScanCase  scanCase)

Method invoked when ScanCase has finished the initialization.

This method is called on the ScanCase.Delegate as soon as ScanCase has completed the initialization process and the scanner is ready to be used. At this point the ScanCase.State is ScanCase.Standby.

Parameters
scanCaseThe scan case initialized.

This method is invoked from a scan-case-internal dispatch queue. To perform UI work, you must dispatch to the main queue first.

ScanCaseState DidScan ( ScanCase  scanCase,
ScanCaseSession  session 
)

Method invoked whenever a new code is scanned.

This method is called on the SScanCase.Delegate whenever the barcode scanner has recognized new barcodes/2D codes. The newly recognized codes can be retrieved from the scan session's ScanCaseSession.NewlyRecognizedCodes property.

Parameters
scanCaseThe scan case on which codes were scanned.
sessionThe current scan session containing the state of the recognition process, e.g. the list of codes recognized in the last processed frame. The scan session can only be accessed from within this method. It is however possible to use codes returned by ScanSession.NewlyRecognizedCodes outside this method.
Returns
The new state for the scan case; e.g. return ScanCaseState.Active if you want to keep scanning, or return ScanCaseState.Standby if you want to pause the scanner.

This method is invoked from a scan-case-internal dispatch queue. To perform UI work, you must dispatch to the main queue first.

void DidChangeState ( ScanCase  scanCase,
ScanCaseState  newState,
ScanCaseStateChangeReason  reason 
)

Method invoked whenever ScanCase.State changed.

This method is called on the ScanCase.Delegate whenever ScanCase.State changes.

Parameters
scanCaseThe scan case on which codes were scanned.
newStateThe new state of the scan case.
reasonThe reason for the state change.

This method is invoked from a scan-case-internal dispatch queue. To perform UI work, you must dispatch to the main queue first.