2. Periodically poll the device for images by using
mySystem.GetLiveImage(ImageFormat, ImageSize, ImageQuality);
See an example implementation in the source of the Sample application. In the example, a new polling thread is created
to avoid locking the GUI.
To turn off live display mode, use
mySystem.SendCommand("SET LIVEIMG.MODE 0")
Helper Utilities
Some helper functions are provided as source codes with the SDK in the project called DataManUtils. Some of the main
features are described below.
Gui
Provides functions for image manipulation like fitting a result image into a specified control, converting bitmap data
to/from a byte array, and so on.
Additional classes provide SVG helpers for image parsing and SVG rendering. SVG formatted result component is used
by the reader to mark the area of the image where the code was detected.
ResultCollector
The order of result components may not always be the same. For example sometimes the XML result arrives first,
sometimes the image. This issue can be overcome by using the ResultCollector.
The user needs to specify what makes a result complete (e.g. it consists of an image, an SVG graphic and an xml read
result) and subscribe to ResultCollector's ComplexResultArrived event.
The ResultCollector waits for the result components. If a result is complete, a ComplexResultArrived event is fired. If a
result is not complete but it times out (time out value can be set via the ResultTimeOut property) or the ResultCollector's
buffer is full (buffer length can be set via the ResultCacheLength property), then a PartialResultDropped event is fired.
Both events provide the available result components in their event argument, which can be used to process the complex
result (e.g. maintain result history, show the image, graphic and result string, and so on.)
DmccEscaper
Can be used to escape or un-escape a DMCC command string.
FileLogger
Simple logger class can be used during development. This, like all other utilities provided here, works both on PC and
CF platforms.
Using the Helper Utilities
The helper utilities are contained in two projects. Both projects refer to the same source codes, but one is created for
Microsoft .Net Compact Framework (DataManUtilsCF) and the other of for the PC's Microsoft .Net Framework
(DataManUtilsPC). To use the features provided in these utilities, include the proper DataManUtils project in your
solution and reference it in the project in which you wish to use it.
Scripting
Script-Based Data Formatting
The DataMan Setup Tool allows you to have different data formatting combinations, and to have the reader perform
different actions on the output channel, for example, beep, or have the LEDs blink, or pull output 1 up.
DataMan Application Development
24
Need help?
Do you have a question about the DataMan and is the answer not in the manual?