用于通过 JSON 通信管理配置的类。
更多...
#include <JsonConfig.h>
◆ getAllConfig
- (NSArray< Config * > *) getAllConfig |
|
|
|
◆ getConfigWithNumber:
- (Config *) getConfigWithNumber: |
|
(int) | cfgNumber |
|
获取具有指定编号的配置。
- 参数
-
- 返回
- 具有指定编号的配置对象。
◆ initWithCommDescriptor:
- (instancetype) initWithCommDescriptor: |
|
(NSString *) | commDescriptor |
|
在创建由 SDK 管理的连接时调用的构造函数。
- 参数
-
commDescriptor | 用于连接印表机的通信描述符,TCP 描述符格式:"ip" 或 "ip:port",例如 "127.0.0.1" 或 "127.0.0.1:3007"。如果未提供端口,则使用默认值。 |
- 返回
- 一个初始化的 JsonConfig 实例,如果无法创建对象,则返回 nil。
◆ initWithJsonComm:
- (instancetype) initWithJsonComm: |
|
(JsonComm *) | mgmtComm |
|
使用给定的 JSON 通信对象初始化一个新实例。
- 参数
-
- 返回
- 一个初始化的 JsonConfig 实例,如果无法创建对象,则返回 nil。
◆ initWithTcpComm:
- (instancetype) initWithTcpComm: |
|
(id) | connection |
|
必须传递一个已打开的 TcpComm 连接,如果需要监听来自印表机的非请求讯息,该连接必须保持打开。
- 参数
-
- 返回
- 一个初始化的 JsonConfig 实例,如果无法创建对象,则返回 nil。
◆ setConfig:
- (BOOL) setConfig: |
|
(Config *) | pCfg |
|
设置指定的配置。
- 参数
-
- 返回
- 如果配置成功设置,则返回 YES;否则返回 NO。
该类的文档由以下文件生成:
- /Users/realbuber/Documents/Project/sdk_json_Objective-C_IOS/sdk_json_Objective-C_IOS/Json/JsonConfig.h