Select your printer model
<close_device>
Close connection with the device opened by <open_device>.
Requests for terminating use of the specified device and notifies the application of the acquired request result.
Request
Element |
Data type |
Description |
---|---|---|
device_id |
string |
Specifies the device ID. |
Sample program
<close_device> <device_id>local_display</device_id> </close_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_NOT_OPEN" |
The specified device ID is not open. |
“DEVICE_CLOSE_ERROR” |
Failed to close the specified device. |
“SYSTEM_ERROR” |
A system error occurred. |
“PARAM_ERROR” |
A parameter error occurred. |
Sample program
- Normal case
-
<close_device> <device_id>local_display</device_id> <code>OK</code> <data_id>2</data_id> </close_device>
- Abnormal case
-
<close_device> <device_id>scanner_001</device_id> <code>DEVICE_NOT_FOUND</code> <data_id>2</data_id> </close_device>
Supplementary explanation
When specifying type_display in the child element type of <open_device> data, specify local_display in device_id.
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