Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Barcode reader

License

NotificationsYou must be signed in to change notification settings

objectscript/Barcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barcode reader.

Use

  1. Importisc.barcode
  2. Run:
/// Utility methodsClass isc.barcode.Utils{/// Main class to importParameter CLASS = "isc.barcode";/// Gateway name to create/useParameter GATEWAY = "Java";/// Get JGW objectClassMethod connect(gatewayName As %String = {..#GATEWAY}, path As %String = "barcode-1.0-SNAPSHOT-jar-with-dependencies.jar", Output sc As %Status) As %Net.Remote.Gateway{set gateway = ""set sc = ##class(%Net.Remote.Service).OpenGateway(gatewayName, .gatewayConfig)quit:$$$ISERR(sc) gatewayset sc = ##class(%Net.Remote.Service).ConnectGateway(gatewayConfig, .gateway, path, $$$YES)quit gateway}/// Get barcode/// Write $System.Status.GetErrorText(##class(isc.barcode.Utils).getBarCode())ClassMethod getBarCode(file As %String, debug As %Boolean = {$$$YES}) As %Status{    #dim gateway as %Net.Remote.Gateway    #dim exception as %Exception.AbstractException    set sc = $$$OK    try {        set gateway = ..connect()        set start = $zh                set reader = ##class(isc.barcode).%New(gateway)                set end1 = $zh        set barcodes = reader.readBarCode(file) set end2 = $zhif debug {write !,"Init: ",end1-startwrite !,"Reader: ",end2-end1, !zw barcodes        //break}        set sc = gateway.%Disconnect()    } catch ex {    break:debug        set sc = $$$ADDSC(ex.AsStatus(), $g(%objlasterror))    }    quit sc}}

[8]ページ先頭

©2009-2025 Movatter.jp