UniPRT SDK v2.0.0.0
 
載入中...
搜尋中...
無符合項目
JsonMessenger.h
1//
2// JsonMessenger.h
3// TSCPrinters SDK
4//
5// Created by Realbuber on 2024/4/8.
6//
7
8#ifndef JsonMessenger_h
9#define JsonMessenger_h
10
11
12#endif /* JsonMessenger_h */
13
14#import <Foundation/Foundation.h>
15#import <UniPRT/JsonComm.h>
16#import <UniPRT/JsonMng.h>
17#import <UniPRT/TcpComm.h>
18#import <UniPRT/JsonCommController.h>
19#import <UniPRT/BtComm.h>
20#import <UniPRT/BleComm.h>
21
22@class TcpComm;
23@class BtComm;
24@class UsbComm;
25@class JsonMng;
26@class JsonComm;
27@class BleComm;
28
45@interface JsonMessenger : NSObject {
46
48
49 BOOL _usingDataPort;
50 BOOL _disposed;
51 TcpComm *_tcpComm;
52 JsonComm *_MgmtComm;
53 JsonComm *_MgmtCommPtr;
54 ImpChannel *_MsgsFromPtr;
55
56 NSString *_myMgmtId;
57 long _TrackCount;
58 BOOL _sdkManagedComm;
59 NSString *_managedDescriptor;
60
62}
63
64
111- (instancetype)initWithCommToPtr:(AComm *)commToPtr iCommTyp:(CommType)iCommTyp maxInputMsgCapacity:(int)maxInputMsgCapacity usingDataPort:(BOOL)usingDataPort;
112
150- (NSString *)sendMsgWithCommand:(NSString *)command content:(NSString *)content trackNo:(NSString *)trackNo;
151
189- (JsonMng *)sendMsgAndWaitForResponseWithCommand:(NSString *)command content:(NSString *)content maxWaitTimeSecs:(int)maxWaitTimeSecs;
190
208
237- (void)sendMsgRawWithDataToSend:(NSString *)dataToSend;
238
249- (void)dispose;
250
251@end
一個用於通信接口的基類,符合 IComm 協議。
Definition AComm.h:29
用於處理藍牙低功耗 (BLE) 連線的通訊類別。
Definition BleComm.h:34
一個用於藍牙通信的類別,繼承自 AComm。
Definition BtComm.h:32
用於管理基於 JSON 的消息傳遞的類。
Definition JsonMessenger.h:45
JsonMng * readNextMsg()
讀取可能從打印機異步接收到的下一條消息。
void dispose()
釋放對象,釋放所有資源。
用於管理 JSON 消息的類。
Definition JsonMng.h:31
一個用於 TCP 通信的類,繼承自 AComm 並符合 NSStreamDelegate 協議。
Definition TcpComm.h:101