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/UsbComm.h>
21#import <UniPRT/BleComm.h>
22
23
24@class TcpComm;
25@class BtComm;
26@class UsbComm;
27@class JsonMng;
28@class JsonComm;
29@class BleComm;
46@interface JsonMessenger : NSObject {
47
49
50 BOOL _usingDataPort;
51 BOOL _disposed;
52 TcpComm *_tcpComm;
53 JsonComm *_MgmtComm;
54 JsonComm *_MgmtCommPtr;
55 ImpChannel *_MsgsFromPtr;
56
57 NSString *_myMgmtId;
58 long _TrackCount;
59 BOOL _sdkManagedComm;
60 NSString *_managedDescriptor;
61
63}
64
65
112- (instancetype)initWithCommToPtr:(AComm *)commToPtr iCommTyp:(CommType)iCommTyp maxInputMsgCapacity:(int)maxInputMsgCapacity usingDataPort:(BOOL)usingDataPort;
113
151- (NSString *)sendMsgWithCommand:(NSString *)command content:(NSString *)content trackNo:(NSString *)trackNo;
152
190- (JsonMng *)sendMsgAndWaitForResponseWithCommand:(NSString *)command content:(NSString *)content maxWaitTimeSecs:(int)maxWaitTimeSecs;
191
209
238- (void)sendMsgRawWithDataToSend:(NSString *)dataToSend;
239
250- (void)dispose;
251
252@end
一個用於通信接口的基類,符合 IComm 協議。
Definition AComm.h:29
用於處理藍牙低功耗 (BLE) 連線的通訊類別。
Definition BleComm.h:34
藍牙通信類,繼承自 AComm。
Definition BtComm.h:27
用於管理基於 JSON 的消息傳遞的類。
Definition JsonMessenger.h:46
JsonMng * readNextMsg()
讀取可能從打印機異步接收到的下一條消息。
void dispose()
釋放對象,釋放所有資源。
用於管理 JSON 消息的類。
Definition JsonMng.h:31
一個用於 TCP 通信的類,繼承自 AComm 並符合 NSStreamDelegate 協議。
Definition TcpComm.h:101
實現USB特定通信並繼承AComm類的類。
Definition UsbComm.h:30