com.pax.dal
Interface IScannerHw
-
public interface IScannerHw
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidclose()关闭扫描Close scannerjava.util.Map<java.lang.String,java.lang.Integer>getBarcodeMap()获取支持的码制列表。Gets a list of supported coding systems.java.util.Map<java.lang.String,java.lang.String>getConfig()获取硬扫码的配置。Get the configuration of IScannerHw.intgetPreviewFormat()获取当前使用的预览效果。Get the preview format currently in use.int[]getSupportFormat()获取支持的预览效果列表。Get the list of supported preview formats.voidopen()打开扫描Open scannerScanResultread(int timeoutMs)开始扫码Start scan codeScanResultRawreadRaw(int timeoutMs)开始扫码获取原始数据。Start scanning the code and get the raw data.voidsetBarcodeMap(java.util.Map<java.lang.String,java.lang.Integer> map)设置码制列表。Set the code system list.voidsetConfig(java.util.Map<java.lang.String,java.lang.String> map)设置硬扫码的配置。Set the configuration of IScannerHw.voidsetPreviewFormat(int format)设置预览效果。Set preview format.voidsetScannerLight(byte ledIndex, byte onOff)控制硬扫码LED灯的亮灭状态。Control hardware scanner LED light on and off.voidstop()停止扫描Stop scanning
-
-
-
Method Detail
-
open
void open() throws ScannerHwDevException
打开扫描Open scanner- Throws:
ScannerHwDevException
-
read
ScanResult read(int timeoutMs) throws ScannerHwDevException
开始扫码Start scan code- Parameters:
timeoutMs-超时时间(MS),范围:0 ~ 120*1000(X5超时时间为500ms~9900ms)Time-out time (MS), range: 0-120*1000 (X5 time-out time is 500 ms-9900 ms)- Returns:
- Throws:
ScannerHwDevException
-
stop
void stop() throws ScannerHwDevException
停止扫描Stop scanning- Throws:
ScannerHwDevException
-
close
void close() throws ScannerHwDevException
关闭扫描Close scanner- Throws:
ScannerHwDevException
-
getBarcodeMap
java.util.Map<java.lang.String,java.lang.Integer> getBarcodeMap() throws ScannerHwDevException
获取支持的码制列表。Gets a list of supported coding systems.- Returns:
- 码制列表。
- Map.key:码制类型。
- Map.value: 0:关闭; 1:打开; 2:自动检测反显。
Code list.- Map.key:Code system type.
- Map.value: 0:Close; 1:Open; 2:Inverse auto detect.
- Throws:
ScannerHwDevException- Since:
- V3.20.00
-
setBarcodeMap
void setBarcodeMap(java.util.Map<java.lang.String,java.lang.Integer> map) throws ScannerHwDevException
设置码制列表。Set the code system list.- Parameters:
map-码制列表。- Map.key:码制类型。
- AZTEC
- C11
- C128
- C39
- C93
- CHINAPOST
- CodaBar
- CODEBLOCK F
- DATA MATRIX
- EAN-8
- EAN-13
- GS1 DATABAR
- HAXIN
- I25:0 UPC-E
- MATRIX 25
- MAXICODE
- MICROPDF
- MSI
- NEC25
- PDF417
- QR CODE
- STRAIGHT 25
- TELEPEN
- TRIOPTIC
- UPC-A
- US POSTAL
- Map.value: 1:打开; 0:关闭。
- Map.Key:码制类型。
- DATA MATRIX Inverse
- QR CODE Inverse
- AZ Inverse
- Map.value: 0:常规;1:反显;2:自动检测反显。
Code system list.- Map.key:Code system type.
- AZTEC
- C11
- C128
- C39
- C93
- CHINAPOST
- CodaBar
- CODEBLOCK F
- DATA MATRIX
- EAN-8
- EAN-13
- GS1 DATABAR
- HAXIN
- I25:0 UPC-E
- MATRIX 25
- MAXICODE
- MICROPDF
- MSI
- NEC25
- PDF417
- QR CODE
- STRAIGHT 25
- TELEPEN
- TRIOPTIC
- UPC-A
- US POSTAL
- Map.value: 1:Open; 0:Close.
- Map.Key:Code system type.
- DATA MATRIX Inverse
- QR CODE Inverse
- AZ Inverse
- Map.value: 0: Regular only; 1: Inverse only; 2: Inverse auto detect.
- Map.key:码制类型。
- Throws:
ScannerHwDevException- Since:
- V3.20.00
-
getConfig
java.util.Map<java.lang.String,java.lang.String> getConfig() throws ScannerHwDevException
获取硬扫码的配置。Get the configuration of IScannerHw.- Returns:
设置选项 Key Value 震动 vibrate "true":打开; "false":关闭 声音 sound "true":打开; "false":关闭 扫描模式 scan_mode "0":普通, "1":连续扫描(自动), "2":连续扫描(手动) 连续扫描时间间隔 scan_time_interval "0":0.5s, "1":1s, "2":自定义 自定义时间间隔 time_interval_custom 范围: 0.0~30.0s 条码分隔符 barcode_separator "0":不换行, "1":换行符, "2":回车键换行 左侧物理扫描键 left_key "true":开启, "false":禁用 显示前缀字符 prefix_separator_switch "true":显示, "false":不显示 前缀字符 prefix_separator String 显示后缀字符 suffix_separator_switch "true":显示, "false":不显示 后缀字符 suffix_separator String 条码接收模式 receiver_mode 0:快速模式 1:慢速模式 2:广播模式 3:剪切版模式 4:焦点模式 5:按键模式 解码照明 decode_light "true":开启, "false":禁用 Setup Option Key Value Vibrate vibrate "true":turn on; "false":turn off Sound sound "true":turn on; "false":turn off Scan mode scan_mode "0":Normal, "1":Continuous scan (automatic), "2":Continuous scan (manual) Continuous scan interval scan_time_interval "0":0.5s, "1":1s, "2":Custom Custom interval time_interval_custom Range: 0.0~30.0s Barcode separator barcode_separator "0": no line break, "1": line break, "2": enter key to line break Left physical scan key left_key "true": enable, "false": disable Prefix character display prefix_separator_switch "true": display, "false": no display Prefix character prefix_separator String Suffix character display suffix_separator_switch "true": display, "false": no display Suffix character suffix_separator String Barcode receiving mode receiver_mode 0: Fast Mode 1: Slow Mode 2: Broadcast Mode 3: Clipboard Mode 4: Focus Mode 5: Key Mode Decode light decode_light "true": Enable, "false": Disable - Throws:
ScannerHwDevException- Since:
- V3.22.00
-
setConfig
void setConfig(java.util.Map<java.lang.String,java.lang.String> map) throws ScannerHwDevException
设置硬扫码的配置。Set the configuration of IScannerHw.- Parameters:
map-设置选项 Key Value 震动 vibrate "true":打开; "false":关闭 声音 sound "true":打开; "false":关闭 扫描模式 scan_mode "0":普通, "1":连续扫描(自动), "2":连续扫描(手动) 连续扫描时间间隔 scan_time_interval "0":0.5s, "1":1s, "2":自定义 自定义时间间隔 time_interval_custom 范围: 0.0~30.0s 条码分隔符 barcode_separator "0":不换行, "1":换行符, "2":回车键换行 左侧物理扫描键 left_key "true":开启, "false":禁用 显示前缀字符 prefix_separator_switch "true":显示, "false":不显示 前缀字符 prefix_separator String 显示后缀字符 suffix_separator_switch "true":显示, "false":不显示 后缀字符 suffix_separator String 条码接收模式 receiver_mode 0:快速模式 1:慢速模式 2:广播模式 3:剪切版模式 4:焦点模式 5:按键模式 解码照明 decode_light "true":开启, "false":禁用 Setup Option Key Value Vibrate vibrate "true":turn on; "false":turn off Sound sound "true":turn on; "false":turn off Scan mode scan_mode "0":Normal, "1":Continuous scan (automatic), "2":Continuous scan (manual) Continuous scan interval scan_time_interval "0":0.5s, "1":1s, "2":Custom Custom interval time_interval_custom Range: 0.0~30.0s Barcode separator barcode_separator "0": no line break, "1": line break, "2": enter key to line break Left physical scan key left_key "true": enable, "false": disable Prefix character display prefix_separator_switch "true": display, "false": no display Prefix character prefix_separator String Suffix character display suffix_separator_switch "true": display, "false": no display Suffix character suffix_separator String Barcode receiving mode receiver_mode 0: Fast Mode 1: Slow Mode 2: Broadcast Mode 3: Clipboard Mode 4: Focus Mode 5: Key Mode Decode light decode_light "true": Enable, "false": Disable - Throws:
ScannerHwDevException- Since:
- V3.22.00
-
readRaw
ScanResultRaw readRaw(int timeoutMs) throws ScannerHwDevException
开始扫码获取原始数据。Start scanning the code and get the raw data.- Parameters:
timeoutMs-超时时间。单位毫秒。范围0~120000(X5机型:500~9900)。Timeout. The unit is milliseconds. The range is 0~120000 (X5 model: 500~9900).- Returns:
ScanResultRaw- Throws:
ScannerHwDevException- ScannerHwDevException- Since:
- V3.23.00
-
getSupportFormat
int[] getSupportFormat() throws ScannerHwDevException
获取支持的预览效果列表。Get the list of supported preview formats.- Returns:
- 0:YUV 1:RAW 2:特殊模式0: YUV 1: RAW 2: special mode
- Throws:
ScannerHwDevException- ScannerHwDevException- Since:
- V3.27.00
-
getPreviewFormat
int getPreviewFormat() throws ScannerHwDevException
获取当前使用的预览效果。Get the preview format currently in use.- Returns:
- 0:YUV 1:RAW 2:特殊模式0: YUV 1: RAW 2: special mode
- Throws:
ScannerHwDevException- ScannerHwDevException- Since:
- V3.27.00
-
setPreviewFormat
void setPreviewFormat(int format) throws ScannerHwDevException
设置预览效果。Set preview format.- Parameters:
format-预览模式
0:YUV
1:RAW
2:特殊模式Preview format
0: YUV
1: RAW
2: special mode- Throws:
ScannerHwDevException- ScannerHwDevException- Since:
- V3.27.00
-
setScannerLight
void setScannerLight(byte ledIndex, byte onOff) throws ScannerHwDevException
控制硬扫码LED灯的亮灭状态。Control hardware scanner LED light on and off.- Parameters:
ledIndex-LED灯的索引号
bit0: 补光灯
bit1: 瞄准灯Index number of LED light
bit0: Filling light
bit1: Aiming lightonOff-0: 熄灭 非0: 点亮0: off Non-0: on- Throws:
ScannerHwDevException- ScannerHwDevException- Since:
- V3.33.00
-
-