Select your printer model
<open_device>
Establishes communication between a device connected to the printer and the application to enable to use the device. Requests for using the specified device and notifies the application of the acquired request result.
Request
Element |
Data type |
Description |
---|---|---|
device_id |
string |
Specifies the device ID. |
data |
string |
Specifies the device category name and buffer setting upon disconnection. |
data
Child element |
Data type |
Description |
---|---|---|
type |
string |
Specifies the device category name.
|
buffer |
string |
Specifies the buffer function upon disconnection.
|
Sample program
<open_device> <device_id>scanner_001</device_id> <data> <type>type_scanner</type> </data> </open_device> |
Response
Element |
Data type |
Description |
---|---|---|
device_id |
string |
Device ID specified in the request |
code |
string |
Processing result |
data_id |
int |
One of the following values is set depending on the value set in <buffer> of the <open_device> message.
|
code
Element value |
Description |
---|---|
"OK" |
Process succeeded. |
“DEVICE_NOT_FOUND" |
The specified device does not exist. |
“DEVICE_IN_USE” |
The specified device is in use. |
“DEVICE_OPEN_ERROR” |
Failed to open the specified device. |
“DRIVER_ERROR” |
Error occurred in the device control script. |
“SYSTEM_ERROR” |
A system error occurred. |
“DEVICE_TYPE_INVALID” |
The device type of the specified device is different. |
“PARAM_ERROR” |
A parameter error occurred. |
Sample program
- Normal case
-
<open_device> <device_id>scanner_001</device_id> <code>OK</code> <data_id>2</data_id> </open_device>
- Abnormal case
-
<open_device> <code>DEVICE_NOT_FOUND</code> <device_id>scanner_001</device_id> <data_id>2</data_id> </open_device>
Supplementary explanation
- When <open_device> is executed successfully, devices other than the printer are exclusively locked.
- When specifying type_display in the child element type of data, specify local_display in device_id.
- When specifying storage in the child element type of data, specify local_TSE in device_id.
- For the device categories that can be specified with ‘data’, refer to the Device Messages list.
- Executing <open_device> again for the same device after <open_device> has already been executed sometimes generates the DEVICE_OPEN_ERROR depending on when processed, which results in termination of the connection with the device. Execute <open_device> again to reestablish the connection.
Quick Access
- [Name]
- [Format]
- [Range]
- [Description]
- [Notes]
- Introduction
- help
- Message
- CommunicationBox Messages
- Device Messages
- DeviceHubTerminal
- BarcodeScanner
- Printer
- <type>print</type>
- <type>onxmlresult</type>
- <epos-print>
- <response>
- <text>
- <feed>
- <image>
- <logo>
- <barcode>
- <symbol>
- <hline>
- <vline-begin>
- <vline-end>
- <page>
- <area>
- <direction>
- <position>
- <line>
- <rectangle>
- <cut>
- <pulse>
- <sound>
- <command>
- <layout>
- <recovery>
- <reset>
- <batch-begin>
- <batch-end>
- <rotate-begin>
- <rotate-end>
- HybridPrinter
- <type>lock</type>
- <type>unlock</type>
- <type>print</type>
- <type>onxmlresult</type>
- <type>slipwaitinsertion</type>
- <type>slipprint2</type>
- <type>slipcancel</type>
- <type>endorsewaitinsertion</type>
- <type>endorseprint2</type>
- <type>endorsecancel</type>
- <type>validationwaitinsertion</type>
- <type>validationprint2</type>
- <type>validationcancel</type>
- <type>micrread</type>
- <type>micrcleaning</type>
- <type>micrcancel</type>
- <type>eject</type>
- <type>onreceive</type>
- CustomerDisplay
- Keyboard
- POSKeyboard
- MSR
- SerialDevice
- Storage
- OtherPeripheral
- Appendix
- List of KeyCode
- Supported Printers by XMLs
- ePOS-Device XML Functions That Can Be Used
- List of Supported Elements
- Printer-specific Support Information
- TM-T20II-i
- TM-T70-i
- TM-T82II-i
- TM-T83II-i
- TM-T88V-i
- TM-T88VI-iHUB
- TM-U220-i
- TM-U220IIB-i
- TM-T70II-DT
- TM-T70II-DT2
- TM-T88V-DT
- TM-T88VI-DT2
- TM-H6000IV-DT
- TM-H6000V
- TM-H6000VI
- TM-m30
- TM-m30II
- TM-m30II-H
- TM-m30II-NT
- TM-m30II-S
- TM-m30II-SL
- TM-m30III
- TM-m30III-H
- TM-m50
- TM-m50II
- TM-m50II-H
- TM-T88VI
- TM-T88VII
- TM-L100
- TM-m10
- TM-P20
- TM-P60II (Receipt)
- TM-P60II (Peeler)
- TM-P80
- TM-T20
- TM-T20II
- TM-T70
- TM-T70II
- TM-T82II
- TM-T83II
- TM-T88IV
- TM-T88V
- TM-T90
- TM-L90
- TM-U220
- TM-U220II
- TM-H6000IV
- Usage restriction by firmware version