bardecode.com
barcode reading software
  • Home
  • Download
  • Purchase
  • SDK Licensing
  • Pricing
    • Windows SDK Price List
    • Windows SDK with PDF Extension Price List
    • Linux SDK Price List
    • Linux SDK with PDF Extension Price List
    • PDF Extension For Windows Price List
    • Multi-Platform Toolkit for .NET Price List
    • BardecodeFiler Desktop Only Price List
    • BardecodeFiler Windows Service Price List
    • DOS Command Prompt Barcode Tool Price List
    • Terms and Conditions
    • Refund Policy
  • Products
    • Softek Barcode Reader Toolkit for Windows
    • Softek Barcode Reader Toolkit for Linux
    • BardecodeFiler Desktop App
    • BardecodeFiler Windows Service
    • Windows DOS Command Prompt Tool
    • Multi-platform barcode reader toolkit for .NET
    • Aquaforest’s Autobahn DX
  • Knowledge Base
    • Documentation
    • Specifications
  • News
  • Contact
    • About Us
    • Terms and Conditions
    • Resellers
    • Links
Select Page ...

News

How to detect a scan time out on Linux

admin September 26, 2017 Documentation, Knowledge Base, Settings, Software Development Kits

The default time out for the scan of a page on Linux is 5000ms, but how can you detect if a time out has occurred?

The following snippet of C code can be used in bardecode.c at the end of the main function…

        uint16 t;
        STGetParameter(hBarcode, ST_DID_TIMEOUT, &t) ;
        if (t)
                printf (“Scan timed out\n”) ;
        else
                printf (“Scan completed without time out\n”) ;

This might mean that you would get the following outputs (depending on the speed of your system)…

$ ./bardecode ~/tmp/image.jpg –TimeOut 1000
123456
Scan timed out
$ ./bardecode ~/tmp/image.jpg –TimeOut 5000
123456
Scan completed without time out

The first call to bardecode used a 1 second time out where as the second used the default of 5s. Note that the fact a time out occurred doesn’t mean that the library wasn’t able to find a bar code, it just means that it didn’t complete a scan of the entire page.

← BardecodeFiler large file processing
Barcode size and image resolution →
admin

  • Copyright © 2023 Softek Software Ltd. All Rights Reserved