UniPRT SDK v2.0.0.0
 
Loading...
Searching...
No Matches
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
A base class for communication interfaces, conforming to the IComm protocol.
Definition AComm.h:29
A communication class for handling Bluetooth Low Energy (BLE) connections.
Definition BleComm.h:34
A class for Bluetooth communication, inheriting from AComm.
Definition BtComm.h:27
A class for managing JSON-based messaging.
Definition JsonMessenger.h:46
JsonMng * readNextMsg()
Read next message that may have been received asynchronously from printer.
void dispose()
Disposes the object, releasing any resources.
A class for managing JSON messages.
Definition JsonMng.h:31
A class for TCP communication, inheriting from AComm and conforming to the NSStreamDelegate protocol.
Definition TcpComm.h:101
Class that implements the USB specific communication and extends the AComm class.
Definition UsbComm.h:30