iDRS™ SDK 16
Loading...
Searching...
No Matches
IBarcodeEngine_interface.h File Reference

Interface for IBarcodeEngine wrapper. More...

Go to the source code of this file.

Typedefs

typedef IDRS_PVOID IDRS_BARCODE_SESSION_HANDLE
 Barcode handle.
 

Functions

IBarcodeEngine IBarcodeEngine_Create (PtrGetBarcodeEngineUniqueIdentifierFn ptrGetBarcodeEngineUniqueIdentifierFn, PtrGetSupportedCapabilitiesFn ptrGetSupportedCapabilitiesFn, PtrGetSupportedBarcodeTypesFn ptrGetSupportedBarcodeTypesFn, PtrCreateSessionFn ptrCreateSessionFn, PtrCloseSessionFn ptrCloseSessionFn, PtrSessionEnableBarcodeTypeFn ptrSessionEnableBarcodeTypeFn, PtrSessionSetBarcodePropertiesFn ptrSessionSetBarcodePropertiesFn, PtrSessionSetParametersFn ptrSessionSetParametersFn, PtrProcessImageFn ptrProcessImageFn, idrs_exception *pargException)
 Creates a new IBarcodeEngine object.
 
void IBarcodeEngine_Destroy (IBarcodeEngine argIBarcodeEngine, idrs_exception *pargException)
 Destroys a IBarcodeEngine handle.
 
enum BarcodeEngineIdentifier IBarcodeEngine_GetBarcodeEngineUniqueIdentifier (const IBarcodeEngine argIBarcodeEngine, idrs_exception *pargException)
 GetBarcodeEngineUniqueIdentifier retrieves barcode unique identifier.
 
BarcodeCapabilityArray IBarcodeEngine_GetSupportedCapabilities (const IBarcodeEngine argIBarcodeEngine, idrs_exception *pargException)
 GetSupportedCapabilities retrieves the list of capabilities supported by the barcode engine.
 
BarcodeTypeArray IBarcodeEngine_GetSupportedBarcodeTypes (const IBarcodeEngine argIBarcodeEngine, idrs_exception *pargException)
 GetSupportedBarcodeTypes retrieves the engine's supported barcode types.
 
IDRS_BARCODE_SESSION_HANDLE IBarcodeEngine_CreateSession (IBarcodeEngine argIBarcodeEngine, idrs_exception *pargException)
 CreateSession creates a new session for recognition purposes.
 
void IBarcodeEngine_CloseSession (IBarcodeEngine argIBarcodeEngine, IDRS_BARCODE_SESSION_HANDLE hBarcodeSession, idrs_exception *pargException)
 CloseSession closes an already opened session.
 
IDRS_ERROR IBarcodeEngine_SessionEnableBarcodeType (IBarcodeEngine argIBarcodeEngine, IDRS_BARCODE_SESSION_HANDLE hBarcodeHandle, enum BarcodeType const evBarcodeType, IDRS_BOOL const bEnable, idrs_exception *pargException)
 SessionEnableBarcodeType enables a barcode type for the specified session.
 
IDRS_ERROR IBarcodeEngine_SessionSetBarcodeProperties (IBarcodeEngine argIBarcodeEngine, IDRS_BARCODE_SESSION_HANDLE hBarcodeHandle, enum BarcodeType const evBarcodeType, const BarcodeAdvancedParameters *stAdvancedParameters, idrs_exception *pargException)
 SessionSetBarcodeProperties sets barcode type properties for the specified session.
 
IDRS_ERROR IBarcodeEngine_SessionSetParameters (IBarcodeEngine argIBarcodeEngine, IDRS_BARCODE_SESSION_HANDLE hBarcodeHandle, enum BarcodeSessionParameter const evParameter, IDRS_UINT const uiValue, idrs_exception *pargException)
 SessionSetParameters sets a session parameter.
 
IDRS_ERROR IBarcodeEngine_ProcessImage (IBarcodeEngine argIBarcodeEngine, IDRS_BARCODE_SESSION_HANDLE hBarcodeEngineHandle, const CImage argInputImage, const CBarcodeContext argBarcodeContext, CBarcodeArray argBarcodeResults, idrs_exception *pargException)
 ProcessImage runs barcode recognition on the supplied image.
 

Detailed Description

Interface for IBarcodeEngine wrapper.

Function Documentation

◆ IBarcodeEngine_CloseSession()

void IBarcodeEngine_CloseSession ( IBarcodeEngine  argIBarcodeEngine,
IDRS_BARCODE_SESSION_HANDLE  hBarcodeSession,
idrs_exception *  pargException 
)

CloseSession closes an already opened session.

Parameters
argIBarcodeEngineIBarcodeEngine handle
hBarcodeSessionBarcode session
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ IBarcodeEngine_Create()

IBarcodeEngine IBarcodeEngine_Create ( PtrGetBarcodeEngineUniqueIdentifierFn  ptrGetBarcodeEngineUniqueIdentifierFn,
PtrGetSupportedCapabilitiesFn  ptrGetSupportedCapabilitiesFn,
PtrGetSupportedBarcodeTypesFn  ptrGetSupportedBarcodeTypesFn,
PtrCreateSessionFn  ptrCreateSessionFn,
PtrCloseSessionFn  ptrCloseSessionFn,
PtrSessionEnableBarcodeTypeFn  ptrSessionEnableBarcodeTypeFn,
PtrSessionSetBarcodePropertiesFn  ptrSessionSetBarcodePropertiesFn,
PtrSessionSetParametersFn  ptrSessionSetParametersFn,
PtrProcessImageFn  ptrProcessImageFn,
idrs_exception *  pargException 
)

Creates a new IBarcodeEngine object.

Parameters
ptrGetBarcodeEngineUniqueIdentifierFnGetBarcodeEngineUniqueIdentifier function pointer
ptrGetSupportedCapabilitiesFnGetSupportedCapabilities function pointer
ptrGetSupportedBarcodeTypesFnGetSupportedBarcodeTypes function pointer
ptrCreateSessionFnCreateSession function pointer
ptrCloseSessionFnCloseSession function pointer
ptrSessionEnableBarcodeTypeFnSessionEnableBarcodeType function pointer
ptrSessionSetBarcodePropertiesFnSessionSetBarcodeProperties function pointer
ptrSessionSetParametersFnSessionSetParameters function pointer
ptrProcessImageFnProcessImage function pointer
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created IBarcodeEngine

◆ IBarcodeEngine_CreateSession()

IDRS_BARCODE_SESSION_HANDLE IBarcodeEngine_CreateSession ( IBarcodeEngine  argIBarcodeEngine,
idrs_exception *  pargException 
)

CreateSession creates a new session for recognition purposes.

Returns
Barcode session handle
Parameters
argIBarcodeEngineIBarcodeEngine handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ IBarcodeEngine_Destroy()

void IBarcodeEngine_Destroy ( IBarcodeEngine  argIBarcodeEngine,
idrs_exception *  pargException 
)

Destroys a IBarcodeEngine handle.

Parameters
argIBarcodeEngineIBarcodeEngine handle to destroy
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ IBarcodeEngine_GetBarcodeEngineUniqueIdentifier()

enum BarcodeEngineIdentifier IBarcodeEngine_GetBarcodeEngineUniqueIdentifier ( const IBarcodeEngine  argIBarcodeEngine,
idrs_exception *  pargException 
)

GetBarcodeEngineUniqueIdentifier retrieves barcode unique identifier.

The value retrieved by this function will be used to reference this barcode engine when setting different properties as well as in results.

Please use values larger than 100 when creating new barcode engines registered with iDRS SDK. Currently iDRS SDK uses values 0 to 7, but future versions might include new engines.

Returns
Unique identifier for the barcode engine
Parameters
argIBarcodeEngineIBarcodeEngine handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ IBarcodeEngine_GetSupportedBarcodeTypes()

BarcodeTypeArray IBarcodeEngine_GetSupportedBarcodeTypes ( const IBarcodeEngine  argIBarcodeEngine,
idrs_exception *  pargException 
)

GetSupportedBarcodeTypes retrieves the engine's supported barcode types.

Returns
An array containing all barcode types supported by the engine.
Parameters
argIBarcodeEngineIBarcodeEngine handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ IBarcodeEngine_GetSupportedCapabilities()

BarcodeCapabilityArray IBarcodeEngine_GetSupportedCapabilities ( const IBarcodeEngine  argIBarcodeEngine,
idrs_exception *  pargException 
)

GetSupportedCapabilities retrieves the list of capabilities supported by the barcode engine.

Returns
An array containing all supported capabilities
Parameters
argIBarcodeEngineIBarcodeEngine handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ IBarcodeEngine_ProcessImage()

IDRS_ERROR IBarcodeEngine_ProcessImage ( IBarcodeEngine  argIBarcodeEngine,
IDRS_BARCODE_SESSION_HANDLE  hBarcodeEngineHandle,
const CImage  argInputImage,
const CBarcodeContext  argBarcodeContext,
CBarcodeArray  argBarcodeResults,
idrs_exception *  pargException 
)

ProcessImage runs barcode recognition on the supplied image.

The image data is guaranteed to be valid until the function ends. If the engine does not change the input image, then it can safely reference the pixels from the provided image. In case the image needs to be modified, the engine should make a copy of the provided image.

The barcode results are expected to be added to argBarcodeResults as individual CBarcodeResult objects.

Parameters
argIBarcodeEngineIBarcodeEngine handle
hBarcodeEngineHandleBarcode session handle
argInputImageInput image
argBarcodeContextBarcode context
argBarcodeResultsObject where all barcode results are expected to be stored.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
IDRS_SUCCESS if the barcode recognition was executed without any error. Error code otherwise

◆ IBarcodeEngine_SessionEnableBarcodeType()

IDRS_ERROR IBarcodeEngine_SessionEnableBarcodeType ( IBarcodeEngine  argIBarcodeEngine,
IDRS_BARCODE_SESSION_HANDLE  hBarcodeHandle,
enum BarcodeType const  evBarcodeType,
IDRS_BOOL const  bEnable,
idrs_exception *  pargException 
)

SessionEnableBarcodeType enables a barcode type for the specified session.

Parameters
argIBarcodeEngineIBarcodeEngine handle
hBarcodeHandleBarcode session handle
evBarcodeTypeBarcode type
bEnableFlag indicating whether the barcode type should be enabled or not.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
IDRS_SUCCESS if the barcode type could be enabled. Error code otherwise

◆ IBarcodeEngine_SessionSetBarcodeProperties()

IDRS_ERROR IBarcodeEngine_SessionSetBarcodeProperties ( IBarcodeEngine  argIBarcodeEngine,
IDRS_BARCODE_SESSION_HANDLE  hBarcodeHandle,
enum BarcodeType const  evBarcodeType,
const BarcodeAdvancedParameters stAdvancedParameters,
idrs_exception *  pargException 
)

SessionSetBarcodeProperties sets barcode type properties for the specified session.

Parameters
argIBarcodeEngineIBarcodeEngine handle
hBarcodeHandleBarcode session handle
evBarcodeTypeBarcode type
stAdvancedParametersStructure containing the barcode type properties
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
IDRS_SUCCESS if the barcode type properties could be set. Error code otherwise

◆ IBarcodeEngine_SessionSetParameters()

IDRS_ERROR IBarcodeEngine_SessionSetParameters ( IBarcodeEngine  argIBarcodeEngine,
IDRS_BARCODE_SESSION_HANDLE  hBarcodeHandle,
enum BarcodeSessionParameter const  evParameter,
IDRS_UINT const  uiValue,
idrs_exception *  pargException 
)

SessionSetParameters sets a session parameter.

Parameters
argIBarcodeEngineIBarcodeEngine handle
hBarcodeHandleBarcode session handle
evParameterParameter identifier
uiValueParameter type
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
IDRS_SUCCESS if the session parameter could be set. Error code otherwise