Software Development Kit (SDK) for 5080, 5180, and 5380
Decoded Miniature Image Scan Engines
User’s Guide
Disclaimer
Honeywell International Inc. (“HII”) reserves the right to make changes in specifications and other information contained in this document without prior notice, and the reader should in all cases consult HII to
determine whether any such changes have been made. The information in this publication does not represent a commitment on the part of HII.
HII shall not be liable for technical or editorial errors or omissions contained herein; nor for incidental or
consequential damages resulting from the furnishing, performance, or use of this material.
This document contains proprietary information that is protected by copyright. All rights are reserved.
No part of this document may be photocopied, reproduced, or translated into another language without
the prior written consent of HII.
Other product names or marks mentioned in this document may be trademarks or registered trademarks
of other companies and are the property of their respective owners.
Web Address: www.honeywellaidc.com
Table of Contents
Chapter 1 - Introduction
Features of the 5X00 Series ................................................................................................1-1
Target Operating Systems for the 5X00 Series ...................................................................1-1
The 5X10/5X80 Software Development Kit (5X00 Series) provides a set of libraries, tools, and sample source code to help software developers create an interface between their host system and a Honeywell miniature image scan engine. The 5X00 Series
consists of:
• The API Definition and Documentation
• API Libraries
• Sample Code
Features of the 5X00 Series
• The 5X00 Series contains software libraries that interact with image/data capture engines using a documented API
(Application Programming Interface). The API functions are defined on a higher level so they can be easily understood and
integrated into your applications, so you don’t have to learn minute details of the engine interface protocol. You simply compile
your code with the library header files and link in the library for your platform. Afterward, all engine functionality is at your
disposal.
• The image/data capture engine is easily integrated into a variety of host platforms.
• The 5X00 Series captures images and returns them as unformatted data, or as one of the standard file formats (BMP, TIFF,
and JPG). Captured images can then be saved to disk and easily imported into a variety of common tools and applications.
• A single API is used for all Honeywell decoding engines. The libraries for all engines are identical for a given host platform.
There are different libraries for each platform, but the API interface is the same for all of them, so you only need to learn a
single API.
• Libraries are available for the Microsoft
operating system, Windows
• Sample code is included that demonstrate how to use specific aspects of the 5X00 Series, as well as the buildable source
and executable code for a demo application.
• The communication driver library is separate from the main engine API library.
®
9x, and Windows NT® derivatives.
®
Windows® family of operating systems. This includes both the Windows® CE
Target Operating Systems for the 5X00 Series
The 5X00 Series is designed for use with the following operating systems:
•Windows
processors:
Pocket PC 2000ARM, MIPS, SH3
PocketPC 2002ARM
PocketPC 2003ARMV4
CE.Net Standard SDK ARMV4, ARMV4I, ARMV4T, SH3, SH4, X86
•Windows
®
CE versions WinCE 4.2, WinCE 5.0, Windows® Pocket PC 2000, and Pocket PC 2002 supporting the following
®
9x, Windows NT® 4.0, Windows® 2000 and Windows® XP
1 - 1
Interface Diagram
User Application
SDK Driver Interface Layer - hhpImgrSdk.dll
SDK API Interface Layer - commDrv.dll
OS Communications Driver
Physical Connection: RS-232, USB, etc.
Image Engine
SDK API Interface Layer - commDrv.dll
Physical Connection: RS-232, USB, etc.
The following diagram shows the interface between the 5X00 Series and the Image Engine:
5X00 Series Library Files
The SDK API and SDK communications layers are provided in the dynamic link libraries, hhpImgrSdk.dll and commDrv.dll,
respectively. The library link file hhpImgrSdk.lib and the include files hhpImgrSdk.h, hhpSymCfg.h and hhpImgrCfg.h are also
provided. In order to use the 5X00 Series, you must include hhpImgrSdk.h in any source files that call the SDK functions. The
library include files must be in the include path for the application’s project. This means that the files must either be in the
source file build directory, or in the developer’s Studio include path. Also, the library link file, hhpImgrSdk.lib, must be added to
the application project link list and link path. Since the .dll and .lib files are operating system and processor type dependent,
care must be taken to use the proper files for the chosen target environment.
SDK Library
File
commDrv.dll
hhpImgrSdk.dll
hhpImgrSdk.libProject Link Path
hhpSymCfg.hProject Include Path
hhpImgrCfg.hProject Include Path
hhpImgrSdk.hProject Include Path
OemDll.hProject Include Path
Where ResidesFunction
Target Device
Windows Folder
Target Device
Windows Folder
1 - 2
Sends commands from API to the appropriate OS driver. Handles low level
communications protocols.
Contains the exported SDK API. Formats requests into imager commands,
then calls commDrv layer.
Library exports file. Allows your application to link without actually including
the SDK code at link time.
Definitions, structures, and enumerated types related to symbology setup.
Automatically included when hhpImgrSdk.h is included.
Definitions, structures, and enumerated types for imaging as well as all
other imager configurations, except communications. Automatically
included when hhpImgrSdk.h is included.
Include file that must be included in application code. Contains definitions,
structures, and enumerated types for communication configuration, as well
as the SDK error codes and SDK function API prototypes.
Only necessary if you create a helper dll for the SDK to provide access to
the imager hardware sleep and trigger lines.
5X00 Series API Library Summary
The following is a summary of the API functions. The full description of each function is found on the page noted.
Core Functions
Core FunctionSummary
Page
Error Management Function
hhpGetErrorMessageReturns a descriptive text string for the specified SDK error code.2-4
Connection Functions
These functions open, close, and verify a connection to an imager.
hhpConnect
hhpDisconnectCloses down the open imager connection.2-3
hhpEngineConnectedChecks if the connection to the imager is valid.2-4
hhpNamedConnect
Establishes and initializes a connection to the imager at the specified port and
connection settings.
Establishes and initializes a connection to the imager at the specified driver
name and connection settings.
2-3
2-5
Asynchronous Notification and Control Functions
Image and barcode capture can be either blocking (synchronous) or non-blocking (asynchronous).
In blocking (synchronous) mode, the SDK function call does not return until the barcode or image is received, the request times
out, or an error occurs. In non-blocking (asynchronous) mode, the capture call returns immediately. Your application is notified
of the completion when either a barcode or an image was received, the time-out for the call was reached, or an error was detected.
You can specify which notification methods you wish to receive.
Your application can subscribe to one or more of the following notification methods: Windows Event, Windows Message, and/or
Callback Function. When notification is received, your application can call hhpGetAsyncResult (see page 2-4) to retrieve the
return code as well as the image, barcode, or text data. The asynchronous interface is also the manor in which imager-initiated
barcode capture data, such as from a hardware trigger, is returned.
There is also a cancel function (see hhpCancelIo on page 2-2) that allows you to cancel any ongoing operation. You should be
aware that when the callback function method is used, any processing done during the callback is run within the context of the
SDK’s asynchronous read thread. This means that the SDK is unable to receive images or barcodes until the callback returns.
hhpCancelIoCancels any synchronous or asynchronous I/O in process.1-3
hhpGetAsyncResult
hhpSetAsyncMethods
Retrieves the results (image/barcode, etc.) of an asynchronous
I/O event.
Allows the application to select how it wishes to be notified on completion of
an asynchronous I/O event.
2-4
2-10
Imaging and General Configuration Functions
The imaging and configuration functions provide a simplified API for modifying the imager setup, image/barcode capture
configuration, and symbology configuration. In order to limit the number of functions a developer must master, the design
philosophy is to allow configuration control using only a small number of setup functions. The imager configuration is broken down
into functional groups with structures containing the configurable items for each. Individual configuration items are specified within
structures by use of a bit field mask. In this way, single configuration items can be read or written using minimal communication
traffic. There are functions for reading and writing parts or all of the HHP_CONFIG imager configuration structure as well as
writing the setup/configuration for individual symbologies. If the specified symbology is not available in the imager’s version of
the symbol decoder, (e.g., Data Matrix in a linear and PDF417 decoder), the symbology functions return
RESULT_ERR_UNSUPPORTED. Finally, to facilitate easy configuration management from device to device and application to
application, the 5X00 Series also provides methods for retrieving and setting the whole imager configuration as a single stream
so it can be saved to disk and restored at a later time.
hhpReadConfigItem
hhpReadConfigStream
Retrieves a single configuration group or whole imager configuration from the
imager.
Retrieves the current whole imager configuration as a single buffer. This
buffer can be saved to a file and later restored.
2-6
2-7
1 - 3
Core Functions (Continued)
Core FunctionSummary
hhpReadImagerCapabilities
hhpReadEngineInfo
hhpSetConfigItemToDefaults
hhpWriteConfigItem
hhpWriteConfigStream
Retrieves the imager settings (fixed) for image size, image bit depth, and
maximum message length.
Reads information about the image engine contained in the image engine
PSOC.
Sets a selected symbology, or all symbology configurations, to their default
values.
Writes some or all of the configuration items for a single configuration group or
for all configuration groups, with the exception of version and communication
groups.
Writes an entire data stream of programmable parameters from a previous
call to hhpReadConfigStream.
Page
2-8
2-8
2-10
2-12
2-13
Symbology Configuration Functions
These functions allow you to read and set the symbology configurations.
hhpEnableDisableSymbologyEnables or disables a single symbology, or all symbologies.2-3
hhpReadSymbologyConfig
hhpReadSymbologyRangeMaxMinReturns the specified symbology range maximum and minimum values.2-9
hhpSetSymbologyDefaultsDefaults a single symbology, or all symbologies.2-11
hhpWriteSymbologyConfig
Retrieves the current or default symbology configuration for a specified
symbology, or for all symbologies.
Writes some or all of a single symbology, or all symbologies’ configuration
items.
2-8
2-14
Barcode Capture Functions
The 5X00 Series captures barcodes from imagers that have hardware triggers or some other non-SDK initiated barcode captures
without having to poll the imager to see if there is any data to read. This allows the imager to be put into low power mode without
having to wake up to answer the polling message.
All barcode result strings are returned in TCHAR arrays, which, if running on a WinCE device or if using a Unicode Desktop build,
are 2 bytes per character. You can specify a Unicode code page other than the default ANSI code page (CP_ACP).
Initiates a synchronous (wait for finish before returning from call) or
hhpCaptureBarcode
hhpSetBarcodeDataCodePage
hhpCaptureRawBarcode
asynchronous (return immediately) barcode capture. Decoded data returned
is translated by code page and locale.
Specifies the code page used to convert the barcode characters to Windows
text. The default is the ANSI code page.
Initiates a synchronous (wait for finish before returning from call) or
asynchronous (return immediately) barcode capture. Decoded data returned
is unmodified 8 bit (ASCII) data.
2-2
2-10
2-2
Image Capture Functions
The image capture functions provide both synchronous and asynchronous operation.
A synchronous capture is specified by setting the bWait parameter of hhpAcquireImage or hhpGetLastImage to TRUE. For
synchronous operation, the function will not return until an image has been captured and transferred (hhpAcquireImage), just
transferred (hhpGetLastImage), or an error has occurred.
Asynchronous captures are specified by setting bWait to FALSE. The function call returns immediately and the caller is notified
on request completion as long as at least one of the event notification methods has been enabled. You can receive transfer
progress updates by Windows messages or by providing a pointer to a DWORD. Both hhpAcquireImage and hhpGetLastImage
allow the caller to override the current imager transfer configuration in the imager.
Initiates a synchronous (wait for finish before returning from call) or
hhpAcquireImage
asynchronous (return immediately) image capture. The image acquisition and
transfer parameters can also be specified.
2-1
1 - 4
Core Functions (Continued)
Core FunctionSummary
Initiates transfer of the last image captured. (This includes images captured
hhpGetLastImage
during barcode scan.) The call can be made synchronously or
asynchronously, and the transfer parameters can be specified.
Page
2-4
Intelligent Imaging (Signature Capture) Functions
Intelligent imaging is barcode capture combined with an image window capture. The image window is cut from the same image
used to capture a barcode. This is how the SDK provides the ability to capture a signature associated with a barcode. In fact, a
successful barcode capture is required before the intelligent image window is sent by the imager. You can specify whether the
image is returned grayscale or black and white.
hhpAcquireIntelligentImageBarcode capture combined with an image window capture.2-1
hhpRawAcquireIntelligentImageCaptures portion of the image in which a barcode is decoded. 2-5
Miscellaneous Functions
hhpSendActionCommand
hhpSendMessageSends menu commands to the imager. 2-9
hhpUpgradeFirmwareUpgrades the current imager firmware with a new firmware file. 2-11
hhpSetHardwareLineDllFileName
Turns on illumination LEDs, Aimers, (and sound beeper for imagers that have
one) outside the image or barcode capture.
Allows you to specify the name of an OEM dll file. This file can contain some
or all of the OemDll exports that provide support for hardware trigger and low
power mode hardware lines.
2-9
2-11
Data Types, Structures, and Enumerated Types
The 5X00 Series API uses structures (see Structures and Mask Definitions beginning on page 4-1) and enumerated types (see
Enumerated Types and Definitions beginning on page 3-1) extensively . The definitions are in the include files in the 5X00
Series package. All 5X00 Series-specific structures have a dwStructSize member that must be set to sizeof( struct name ).
This insures that the structure being passed to a given function is the structure type expected by the function and, if writing is
done to the structure, that the structure size boundary is not exceeded. Furthermore, all imager configuration structures (except
the all inclusive structure HHP_CONFIG) have a DWORD member dwMask. The mask allows you to specify only certain members within a structure. Set the mask value by ORing together the appropriate masks for the given structure for the particular
items within the structure that should be read/written. Samples of programs that demonstrate this can be found in Program
Samples beginning on page 6-1. This technique is also used by Microsoft
®
dows
SDK structure CHARFORMAT).
The following Windows
Note:A “P” in front of a data type means a pointer to the type.
®
data types are included for clarity.
®
in their Windows® SDK (for example, see Win-
Windows Data Types
BOOL32 bit signed integer used by most Microsoft SDK functions in place of a true Boolean.
BYTE8 bit unsigned variable.
DWORD32 bit unsigned integer variable.
HANDLE
HWNDA Windows handle to an application window.
PVOID32 bit unsigned integer that points to void data type (generic pointer).
TCHAROS-dependent character variable. 16 bit for Unicode systems, otherwise 8 bits.
WORD16 bit unsigned integer variable.
A Windows WIN32 handle type. Returned from opening files, creating events, semaphores, or
mutexes.
1 - 5
Windows Data Types (Continued)
HHP_EVENT_CALLBACK
Pointer to a callback function (see hhpImgrSdk.h) called in response to the completion of an
asynchronous 5X00 Series function call or event. (See example on page 6-4.)
SDK Enumerated Types
Beep OptionsEnumeration (not an enumerated type) that can be used with an hhpSendActionCommand.
Compression_t
ConfigItems_t
DECODE_METHODEnumerated type of decode methods available to decode symbols.
DECODER_TYPEEnumeration of types of decoders and, by extension, what symbologies can be decoded.
EngineType_tDescribes the connection, the imager, and the type of engine.
FileFormat_tEnumerated type for specifying the format of the data returned in the HHP_IMAGE structure.
HP_ACTION
HHP_AIMER_MODESEnumerated type to specify the aimer mode.
HHP_AUTOEXPOSURE
HHP_BAUD_RATE
HHP_BEEPER_VOLUME
HHP_CONNECT_TYPE
HHP_DATA_BITSEnumerated type for number of serial data bits.
HHP_DUTY_CYCLE
HHP_EVENT_TYPEEnumerated type that describes the type of asynchronous event being reported.
HHP_FRAME_RATE
HHP_GAIN
HHP_PARITYEnumerated type for serial parity.
HHP_SEQ_MODESEnumerated type to specify the sequence acquisition mode.
HHP_STOP_BITSEnumerated type for number of serial stop bits.
HHP_SYS_SPEED
HHP_TRIG_MODESEnumerated type to specify the trigger mode.
OCRDirection_tEnumerated type for setting the text direction for OCR decoding.
OCRMode_tEnumerated type for setting the font for OCR symbology decoding.
On Off Enumeration (not an enumerated type) that can be used with hhpSendActionCommand.
Result_t
SetupType_t
Symbology ID enumeration
Enumerated type for specifying the form of compression (if any) to use when transferring an
image from the imager to the SDK. See Compression Mode Formats on page 3-4.
Enumerated type to specify that the configuration structure is being sent to the Read/Write
config item functions.
Enumerated type whose items describe which imager command functionality (beeper, aimers,
lights) is to be acted upon.
Enumerated type to specify whether the imager tries to auto adjust the image exposure and, if
so, how.
Enumerated type of the supported baud rates for serial devices.
Note: A special driver is required if a baud rate greater than 115200 is selected.
Enumerated type to select the imager beeper volume when sounding the beeper. This structure
is ignored for products that do not have a beeper.
Enumerated type used in hhpConnect to specify the connection type and connection port where
the imager is connected.
Enumerated type to specify the behavior of the illumination and aimer LEDs during image
capture.
Enumerated type to select the image capture frame rate. Only valid when no auto exposure is
selected.
Enumerated type to select the image capture gain. This type is only valid when no auto
exposure is selected.
Enumerated type to specify the rate (in Mhz) at which all components other than the CPU are
to be clocked.
Enumerates the function result codes returned by the SDK functions. See Error Codes on page
3-1.
Enumerated type for specifying whether a read configuration item call should return the current
settings or the imager default setting.
Enumerates all the available symbologies supported in the imager decoder. Non-data type
used in the symbology configuration functions.
1 - 6
SDK Structure Types
A full description of the SDK structure types can be found in Enumerated Types and Definitions beginning on page 3-1.
Note:Important: Make sure to set the structure members dwStructSize and dwMask.
Individual Symbology Structures
All symbologies, except OCR, use either SymFlagsOnly_t or SymFlagsRange_t for configuration. There is a define for each
symbology (except OCR) that points to one of these two structures.
SymFlagsOnly_tStructure for symbologies that don’t have minimum and maximum data lengths.
SymFlagsRange_tStructure for symbologies that have minimum and maximum data lengths.
SymCodeOCR_t or OCR_TStructure to configure OCR symbology.
Configuration Structures
HHP_BEEPER
HHP_CONFIGSuper structure whose members are all the other configuration structures.
HHP_DECODE_MSGReturns decoded, code page and locale-translated data output from the SDK.
HHP_DECODER_CONFIGConfigures decoding behavior other than symbology setup.
HHP_ENGINE_INFO
HHP_IMAGE
HHP_IMAGE_ACQUISITION
HHP_IMAGE_TRANSFER
HHP_IMAGER_CAPS
HHP_INTEL_IMG
HHP_POWER_SETTINGSConfigures the power management options of the imager.
HHP_RAW_DECODE_MSGReturns raw (8 bit ASCII) decoded data output from the SDK.
HHP_SERIAL_PORT_CONFIGSpecifies serial port configuration for serial imagers.
HHP_SEQUENCESpecifies how the sequence acquisition mode is configured.
HHP_SYM_CONFIGContains a list of all the structures for all the symbologies.
HHP_TEXT_MSG
HHP_TRIGGERConfigures the trigger mode of the imager.
HHP_VERSION_INFOQueries imager and SDK software revisions.
Configures whether the beeper sounds on power up, decode, or command processing.
This is ignored if the imager does not have a beeper.
Structure used by the hhpReadEngineInfo (page 2-8) call that returns information about
the image engine. (5X80 engines with PSOC only.)
Returns image data from the SDK. It also specifies the format in which the image data is
returned.
Specifies how images are captured by the imager. This includes gain, exposure, frame
rates, and illumination.
Specifies how images are shipped from the imager to the SDK. This includes image
processing items such as cropping, subsampling, histogram stretching, and transfer
compression.
Retrieves the fixed characteristics of the imager: full image size, capture bits per pixel, and
maximum text/barcode message size (sent from imager). Structure in which
Specifies the location and size of the image returned as part of an intelligent image
capture. The location information is specified in minimum bar widths of the barcode
portion of the intelligent image.
Returns non-decoded data output from the SDK. The data is translated by code page and
locale.
1 - 7
1 - 8
2
API Function Descriptions
The following is an alphabetic listing of each API function with its complete description and a prototype for each function. All API
functions (with the exception of hhpEngineConnected (page 2-4) return a result code of type Result_t. See Error Codes on page
3-1 for the result code values.
hhpAcquireImage
This function causes the imager to capture an image and transfer it to the host. Values to be used from the structures are
specified by setting the appropriate bit mask for each item in the structure’s mask member.
pImgPointer to an HHP_IMAGE structure if bWait is TRUE. If bWait is FALSE, the parameter
is ignored and should be NULL.
pImgTransOptional pointer to an HHP_IMAGE_TRANSFER structure. This structure overrides (just
for this call) the current imager configuration, and specifies the pixel subsample, cropping
rectangle, transfer compression type, compression factor (for JPEG lossy transfer), and
progress notification method. If this parameter is NULL, the current imager configuration
settings are used except for the progress notification methods that must be specified for
each call if notification is desired.
pImgAcquOptional pointer to an HHP_IMAGE_ACQUISITION structure. This structure overrides
(just for this call) the current imager configuration, to specify and configure the image
capture method (type of autoexposure control or manual mode). If this parameter is NULL,
the current imager configuration settings are used.
bWaitIf TRUE, do not return until the image is received or an error occurs. If FALSE, return
immediately. One of the event notification methods must be enabled to receive notification
on completion. (See hhpSetAsyncMethods on page 2-10.)
hhpAcquireIntelligentImage
The location of the window of interest must be provided in units of minimum barcode widths. This allows the imager to grab the
same physical window, no matter how far the imager is from the page. The resultant image window is always squared with the
X and Y axis of the returned image, so even if the barcode page is rotated relative to the imager, the resultant image appears
square to the image edges.
There is only one intelligent image call that supports both synchronous and asynchronous capture. If synchronous capture is
used, all members of this structure must be valid. If asynchronous capture is used, you will receive
HHP_INTELIMG_BARCODE_EVENT for the barcode data, and HHP_INTELIMG_IMAGE_EVENT for the image data. The
barcode data is returned in a normal barcode structure (HHP_DECODE_MSG), while the intelligent image data is returned in an
HPP_IMAGE structure.
Note:Since the HHP_INTEL_IMG structure requires that image offsets and size be specified in barcode units, the
HHP_INTEL_IMG structure has a size member that allows you to specify (in pixels) the maximum allowable width and
height for the returned image.
pIntelImgPointer to an HHP_INTEL_IMG structure that contains the setup parameters describing
the location of the intelligent image relative to the barcode.
pDecodeMsgPointer to an HHP_DECODE_MSG structure if bWait is TRUE. If bWait is FALSE, the
parameter is ignored and should be NULL. The intelligent image barcode information is
returned here.
dwTimeoutMaximum time (in milliseconds) to attempt to decode before declaring a no decode.
pImgPointer to an HHP_IMAGE structure if bWait is TRUE. If bWait is FALSE, the parameter
is ignored and should be NULL.
bWaitIf TRUE, do not return until the image is received or an error occurs. If FALSE, return
immediately. One of the event notification methods must be enabled to receive notification
on completion. (See hhpSetAsyncMethods on page 2-10.)
hhpCancelIo
Cancels the current barcode or image capture.
hhpCancelIo(
void
)
hhpCaptureBarcode
This function causes the imager to capture images and attempt to decode them. Decoded data returned is translated by code
page and locale. Barcode capture can be synchronous or asynchronous. Synchronous capture is specified by setting the bWait
parameter hhpCaptureBarcode to TRUE. In this case, the function will not return until a barcode is read, an error occurs, or the
decode timeout is reached. Asynchronous capture is specified by setting the bWait parameter hhpCaptureBarcode to FALSE,
or whenever a barcode capture is initiated other than by the 5X00 Series (e.g., from a hardware trigger). In order to be notified
of an asynchronous transfer, you must enable at least one of the notification methods (see hhpSetAsyncMethods on page 2-10).
hhpCaptureBarcode(
PHHP_DECODE_MSG pDecodeMsg,
DWORD dwTimeout,
BOOL bWait
)
ParameterDescription
pDecodeMsgPointer to an HHP_DECODE_MSG structure if bWait is TRUE.
If bWait is FALSE, the parameter is ignored and should be NULL. (HHP_DECODE_MSG
will be passed to hhpGetAsyncMethods() call instead.) The function returns immediately,
and you are notified when symbols are decoded, an error occurs, or decoding times out
(no barcode) using the specified event notification method(s).
dwTimeoutMaximum time (in milliseconds) to attempt to decode before declaring a no decode. A
value of CURRENT_DECODE_TIMEOUT specifies that the timeout is whatever is
currently set on the imager. A value of 0 indicates no timeout.
bWaitIf TRUE, wait for capture to complete before returning. If FALSE, one of the event
notification methods must be enabled to receive notification upon completion.
hhpCaptureRawBarcode
This function causes the imager to capture images and attempt to decode them. Decoded data returned is unmodified 8 bit ASCII
data. Barcode capture can be synchronous or asynchronous. Synchronous capture is specified by setting the bWait parameter
hhpCaptureRawBarcode to TRUE. In this case, the function will not return until a barcode is read, an error occurs, or the decode
timeout is reached. Asynchronous capture is specified by setting the bWait parameter hhpCaptureRawBarcode to FALSE, or
whenever a barcode capture is initiated other than by the 5X00 Series (e.g., from a hardware trigger). In order to be notified of
an asynchronous transfer, you must enable at least one of the notification methods (see hhpSetAsyncMethods on page 2-10).
pDecodeMsgPointer to an HHP_RAW_DECODE_MSG structure if bWait is TRUE.
If bWait is FALSE, the parameter is ignored and should be NULL. (HHP_DECODE_MSG
will be passed to hhpGetAsyncMethods() call instead.) The function returns immediately,
and you are notified when symbols are decoded, an error occurs, or decoding times out
(no barcode) using the specified event notification method(s).
dwTimeout Maximum time (in milliseconds) to attempt to decode before declaring a no decode. A
value of CURRENT_DECODE_TIMEOUT specifies that the timeout is whatever is
currently set on the imager. A value of 0 indicates no timeout.
bWaitIf TRUE, wait for capture to complete before returning. If FALSE, one of the event
notification methods must be enabled to receive notification upon completion.
hhpConnect
This function opens a connection to an imager. The connection must be closed by calling hhpDisconnect(). The caller can verify
that the imager is connected by calling hhpEngineConnected().
Opens the selected communications port and establishes connection with the imager and starts the read data thread.
hhpConnect(
HHP_CONNECT_TYPE connectType,
PVOID pStruct
)
ParameterDescription
connectTypeDescribes the type of connection and hardware port, e.g., HHP_COM1, HHP_COM2,
HHP_COM3.
pStructAn optional structure that contains setup information for the hardware port, or NULL.
PHHP_SERIAL_PORT_CONFIG is used to configure a serial port connection.
hhpDisconnect
Closes the communications port and stops the read data thread.
hhpDisconnect(
void
)
hhpEnableDisableSymbology
Enables/disables an individual symbology or all symbologies.
hhpEnableDisableSymbology(
int nSymId,
BOOL bEnable
)
ParameterDescription
nSymId One of the symbology enumerated types, e.g., SYM_CODE39, SYM_OCR, or SYM_ALL
to enable/disable all symbologies.
bEnableTRUE to enable symbology, FALSE to disable symbology.
2 - 3
hhpEngineConnected
This function determines whether the imager is connected. This function checks to to see if the imager has lost power (due to
the host going into a suspended state), or if the imager has been removed.
hhpEngineConnected(
void
)
hhpGetAsyncResult
Retrieves the data from the last signal event (image/barcode capture). This function can be called with pResultStruct set to NULL
to obtain the event type. This is useful when the notification method is a Windows event.
hEventType Type of data causing the event notification. The valid values are:
HHP_BARCODE_EVENT
HHP_IMAGE_EVENT
HHP_TEXT_ MSG_EVENT
HHP_INTELIMG_BARCODE_EVENT
HHP_INTELIMG_IMAGE_EVENT
pResultStruct An HHP_DECODE_MSG, HHP_IMAGE, or HHP_TEXT_MSG structure pointer,
depending on the value of hEventType. This parameter can be NULL if just the event type
is desired. This is of use when the Event Handle notification is used.
hhpGetErrorMessage
This function returns a text message describing the meaning of a Result_t error code. See Error Codes on page 3-1 for complete
descriptions.
hhpGetErrorMessage(
Result_t nErrorCode,
PTCHAR ptcErrorMsg,
int nMaxChars
)
ParameterDescription
nErrorCodeError code returned from one of the other 5X00 Series functions.
ptcErrMsgTCHAR buffer to hold error message string.
nMaxCharsMaximum number of characters that can fit in ptcErrorMsg including NULL.
hhpGetLastImage
This function causes the imager to transfer the last image captured to the host. If bWait is TRUE, the function will not return until
the image is fully received or an error occurs. If bWait is FALSE, the function returns immediately and you are notified when
image transfer has completed or an error has occurred. pImgTrans is an optional parameter and can be NULL. Setting the
appropriate bit mask for each item specifies active members of this structure. This function can be used to obtain the image from
the last barcode capture attempt as well as the last image from an image capture attempt.
pImgPointer to an HHP_IMAGE structure if bWait is TRUE. If bWait is FALSE, the parameter
is ignored and should be NULL.
pImgTransOptional pointer to an HHP_IMAGE_TRANSFER structure. This structure overrides (just
for this call) the current imager configuration, and specifies the pixel subsample, cropping
rectangle, transfer compression type, compression factor (for JPEG lossy transfer), and
progress notification method. If this parameter is NULL, the current imager configuration
settings are used except for the progress notification methods that must be specified for
each call if notification is desired.
bWaitIf TRUE, do not return until the image is received or an error occurs. If FALSE, return
immediately. One of the event notification methods must be enabled to receive notification
on completion.
hhpNamedConnect
This function opens a connection to an imager. The connection must be closed by calling hhpDisconnect (page 2-3). The caller
can verify that the imager is connected by calling hhpEngineConnected (page 2-4).
hhpNamedConnect(
PTCHAR ptcConnectName,
PVOID pStruct
)
ParameterDescription
ptcConnectNameThe name of driver for the hardware port, e.g., "COM1:" or "\\.\COM12."
pStructAn optional structure that contains setup information for the hardware port, or NULL.
HHP_SERIAL_PORT_CONFIG is used to configure a serial port connection.
hhpRawAcquireIntelligentImage
Captures a portion of the image in which a barcode is decoded. The position of the image is specified relative to the center of
the barcode. This function differs from hhpAcquireIntelligentImage (page 2-1) in that the barcode data is returned as a raw
(untranslated) byte data array.
Note:Since the HHP_INTEL_IMG structure requires that image offsets and size be specified in barcode units, the
HHP_INTEL_IMG structure has a size member that allows you to specify (in pixels) the maximum allowable width and
height for the returned image.
pIntelImgPointer to an HHP_INTEL_IMG structure that contains the setup parameters describing
the location of the intelligent image relative to the barcode.
pRawDecodeMsgPointer to an HHP_RAW_DECODE_MSG structure if bWait is TRUE. If bWait is FALSE,
the parameter is ignored and should be NULL. The intelligent barcode raw data
(untranslated) is returned here.
dwTimeoutMaximum time (in milliseconds) to attempt to decode before declaring a no decode.
pImgPointer to an HHP_IMAGE structure if bWait is TRUE. If FALSE, the parameter is ignored
and should be NULL.
bWaitIf TRUE, do not return until the image is received, the decode timeout is reached, or an
error occurs. If FALSE, return immediately. One of the event notification methods must
be enabled to receive notification of completion (see hhpSetAsyncMethods on page 2-10).
2 - 5
hhpReadConfigItem
Reads the configuration items for one or all of the configuration structures found in the main 5X00 Series configuration structure
HHP_CONFIG.
hhpReadConfigItem(
SetupType_t cfgType,
ConfigItems_t item,
PVOID pStruct
)
2 - 6
ParameterDescription
cfgTypeUse SETUP_TYPE_CURRENT for the current settings, or SETUP_TYPE_DEFAULT for
the customer default settings.
item One of the members of the enumerated type ConfigItems_t. The valid values are:
BEEPER_CONFIGReturns beeper control settings for devices with audible
beepers. The settings include volume, beep on decode,
and beep on reset.
TRIGGER_CONFIGReturns values for all trigger timeouts and current
trigger mode.
DECODER_CONFIGReturns the decoder setup. This includes single
decode, multiple decodes, print weight, centered
decode, and aimer.
POWER_CONFIGContains low power configuration settings: trigger
mode, low power timeout, low power imaging, LED
brightness, aimer LED settings, and system clock
speed.
VERSION_INFOReturns the SDK, imager firmware, and imager boot
code versions.
SYMBOLOGY_CONFIGReturns the enable and setup parameters for all
symbologies. Individual symbologies can be read by
calling hhpReadSymbologyConfig.
SERIAL_PORT_CONFIGIf using a serial connection imager, this returns the
serial port setup parameters of the imager.
IMAGE_ACQUISITIONReturns the current imager settings for capture mode,
manual exposure, manual gain, manual frame rate,
target white value, target window, aimer and
illumination duty cycle, and triggering mode (hardware
trigger dependent).
IMAGE_TRANSFERReturns the current image transfer protocols, such as
cropping window, pixel subsample, and transfer
compression.
SEQUENCE_CONFIGReturns the sequence mode enable/disable state and
the data sequence command string.
ALL_CONFIGAll of the above except serial port config.
pStructPointer to the appropriate structure based on parameter “item:”
HHP_BEEPER
HHP_TRIGGER
HHP_DECODER_CONFIG
HHP_POWER_SETTINGS
HHP_VERSION_INFO
HHP_SYM_CONFIG
HHP_SERIAL_PORT_CONFIG
HP_IMAGE_ACQUISITION
HHP_IMAGE_TRANSFER
HHP_SEQUENCE
HHP_CONFIG
hhpReadConfigStream
Reads the full imager configuration as a single stream of data into a buffer. The buffer contains all the configuration items in an
ASCII stream so that it can be written to a disk for storage. No interpretation is done on the data stream, therefore, the data
stream contains both read only, and read/write data.
2 - 7
Loading...
+ 47 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.