Select your printer model

Parameters are refined by the selected printer.

disconnect


Ends communication with the printer.

Syntax

 
- (int) disconnect;

Return value

The result of the API is returned.

Error status

Description

EPOS2_SUCCESS

The function was executed successfully.

EPOS2_ERR_ILLEGAL

Tried to end communication where it had not been established.

EPOS2_ERR_MEMORY

Necessary memory could not be allocated.

EPOS2_ERR_FAILURE

An unknown error occurred.

EPOS2_ERR_PROCESSING

Could not run the process.

Tried to terminate communication with a printer during reconnection process.

Supplementary explanation

  • This API is not executed on the main thread. Execute it on the sub-thread.
  • When connected to the printer with Bluetooth, executing this API while a slip sheet is inserted by readMicrData causes the slip sheet to be ejected.
  • Executing this API while waiting for paper insertion after executing waitInsertion, readMicrData, and cleanMicrReader cancels waiting for paper insertion.
    At that time, processing result of waitInsertion, readMicrData, and cleanMicrReader is not notified.
  • If disconnect is conducted during an application background transition event process, wait until disconnect completes.
  • When using multi-threading to connect to multiple printers or peripheral devices, this API and connect cannot be started for other printers or peripheral devices until this API finishes processing. Start the next process after this API finishes processing.
 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.


Epson ePOS SDK for iOS

Jump to the top