Added in Version 1.0.0

StarPrinter

プリンターを制御するクラス

コンストラクタ

init(_ connectionSettings: StarConnectionSettings)

オブジェクトの初期化

プロパティ

初期値

information

プリンターの情報

nil

StarPrinterInformation?

connectionSettings

プリンターとの接続設定

コンストラクタでセットされた値

StarConnectionSettings

template

テンプレート

nil

String?

errorDetail

エラーの詳細

StarIO10ErrorDetail()

StarIO10ErrorDetail

printerDelegate

プリンターのステータスイベント

nil

PrinterDelegate?

drawerDelegate

キャッシュドロアーのステータスイベント

nil

DrawerDelegate?

inputDeviceDelegate

入力機器のステータスイベント

nil

InputDeviceDelegate?

displayDelegate

カスタマーディスプレイのステータスイベント

nil

DisplayDelegate?

openTimeout

接続タイムアウト(msec)

10000

Int

printTimeout

印刷タイムアウト(msec)

30000

Int

getStatusTimeout

ステータス取得タイムアウト(msec)

5000

Int

starConfigurationTimeout

Star Configuration設定・取得タイムアウト(msec)

90000

Int

メソッド(iOS 13以降用)

open() async

プリンターと接続

print(command: String) async

プリンターに印刷を実行

print(command: String, starSpoolJobSettings: StarSpoolJobSettings) async

プリンターのスプーラー機能を利用して印刷を実行

print(raw: Data) async

プリンターにバイナリデータの印刷を実行

getStatus() async

プリンターのステータスを取得

getSpoolJobStatus(jobId: Int) async

指定した印刷ジョブIDの印刷ジョブステータスを取得

getSpoolJobStatusListAsync(size: Int) async

最新から指定された件数分のプリンターの印刷ジョブ履歴(印刷ジョブステータスのリスト)を取得

getStarConfiguration(password: String? = nil) async

プリンターの現在のStar Configurationを取得

getDefaultStarConfiguration() async

プリンターのデフォルトのStar Congirutaionを取得

setStarConfiguration(starConfiguration: String) async

プリンターにStar Configurationの設定を実行

close() async

プリンターと切断

警告

メソッド(iOS 12用)はiOS 12をサポートするアプリケーションの互換性のためだけに提供され、将来的に本SDKの最低サポートOSバージョンをiOS 15に引き上げるときに削除される予定です。

[非推奨] メソッド(iOS 12用)

open(completion: @escaping (Error?) -> Void)

プリンターと接続

print(command: String, completion: @escaping (Error?) -> Void)

プリンターに印刷を実行

print(command: String, starSpoolJobSettings: StarSpoolJobSettings, completion: @escaping (Int?, Error?) -> Void)

プリンターのスプーラー機能を利用して印刷を実行

print(raw: Data, completion: @escaping (Error?) -> Void)

プリンターにバイナリデータの印刷を実行

getStatus(completion: @escaping (StarIO10.StarPrinterStatus?, Error?) -> Void)

プリンターのステータスを取得

getSpoolJobStatus(jobId: Int, completion: @escaping (StarSpoolJobStatus?, Error?) -> Void)

指定した印刷ジョブIDの印刷ジョブステータスを取得

getSpoolJobStatusList(size: Int, completion: @escaping ([StarSpoolJobStatus]?, Error?) -> Void)

最新から指定された件数分のプリンターの印刷ジョブ履歴(印刷ジョブステータスのリスト)を取得

getStarConfiguration(completion: @escaping (String?, Error?) -> Void)

プリンターの現在のStar Configurationを取得

getDefaultStarConfiguration(completion: @escaping (String?, Error?) -> Void)

プリンターのデフォルトのStar Congirutaionを取得

setStarConfiguration(starConfiguration: String, completion: @escaping (Error?) -> Void)

プリンターにStar Configurationの設定を実行

close(completion: @escaping () -> Void)

プリンターと切断