seven365-zyprinter 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/Package.swift +43 -0
  2. package/README.md +186 -0
  3. package/Seven365Zyprinter.podspec +27 -0
  4. package/android/build.gradle +58 -0
  5. package/android/src/main/AndroidManifest.xml +2 -0
  6. package/android/src/main/java/com/mycompany/plugins/example/Example.java +342 -0
  7. package/android/src/main/java/com/mycompany/plugins/example/ExamplePlugin.java +161 -0
  8. package/android/src/main/res/.gitkeep +0 -0
  9. package/dist/docs.json +229 -0
  10. package/dist/esm/definitions.d.ts +56 -0
  11. package/dist/esm/definitions.js +2 -0
  12. package/dist/esm/definitions.js.map +1 -0
  13. package/dist/esm/index.d.ts +4 -0
  14. package/dist/esm/index.js +7 -0
  15. package/dist/esm/index.js.map +1 -0
  16. package/dist/esm/web.d.ts +49 -0
  17. package/dist/esm/web.js +40 -0
  18. package/dist/esm/web.js.map +1 -0
  19. package/dist/plugin.cjs.js +54 -0
  20. package/dist/plugin.cjs.js.map +1 -0
  21. package/dist/plugin.js +57 -0
  22. package/dist/plugin.js.map +1 -0
  23. package/ios/Seven365Zyprinter.podspec +28 -0
  24. package/ios/Sources/Plugin/ZyprintPlugin.swift +161 -0
  25. package/ios/Sources/Plugin/ZywellSDK.swift +358 -0
  26. package/ios/Sources/Seven365Zyprinter-Umbrella.h +16 -0
  27. package/ios/Sources/module.modulemap +12 -0
  28. package/ios/Sources/sources/BLEManager.h +658 -0
  29. package/ios/Sources/sources/BLEManager.m +2842 -0
  30. package/ios/Sources/sources/GCD/Documentation.html +47 -0
  31. package/ios/Sources/sources/GCD/GCDAsyncSocket.h +1226 -0
  32. package/ios/Sources/sources/GCD/GCDAsyncSocket.m +8560 -0
  33. package/ios/Sources/sources/GCD/GCDAsyncUdpSocket.h +1036 -0
  34. package/ios/Sources/sources/GCD/GCDAsyncUdpSocket.m +5632 -0
  35. package/ios/Sources/sources/GCD/PrinterManager.h +91 -0
  36. package/ios/Sources/sources/GCD/PrinterManager.m +513 -0
  37. package/ios/Sources/sources/GCD/WifiManager.h +91 -0
  38. package/ios/Sources/sources/GCD/WifiManager.m +510 -0
  39. package/ios/Sources/sources/ImageTranster.h +38 -0
  40. package/ios/Sources/sources/ImageTranster.m +389 -0
  41. package/ios/Sources/sources/POSBLEManager.h +759 -0
  42. package/ios/Sources/sources/POSBLEManager.m +834 -0
  43. package/ios/Sources/sources/POSSDK.h +93 -0
  44. package/ios/Sources/sources/POSWIFIManager.h +116 -0
  45. package/ios/Sources/sources/POSWIFIManager.m +260 -0
  46. package/ios/Sources/sources/POSWIFIManagerAsync.h +745 -0
  47. package/ios/Sources/sources/POSWIFIManagerAsync.m +1847 -0
  48. package/ios/Sources/sources/PosCommand.h +633 -0
  49. package/ios/Sources/sources/PosCommand.m +1019 -0
  50. package/ios/Sources/sources/TscCommand.h +723 -0
  51. package/ios/Sources/sources/TscCommand.m +566 -0
  52. package/ios/Tests/ExamplePluginTests/ExamplePluginTests.swift +15 -0
  53. package/package.json +339 -0
@@ -0,0 +1,759 @@
1
+ //
2
+ // PosBLEManager.h
3
+ // Printer
4
+ //
5
+ // Created by apple on 16/4/5.
6
+ // Copyright © 2016年 Admin. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import <CoreBluetooth/CoreBluetooth.h>
11
+ typedef void(^POSCompletionBlock)(CBCharacteristic *character);
12
+ typedef void(^TSCCompletionBlock)(CBCharacteristic *datcharacter);
13
+ @protocol POSBLEManagerDelegate <NSObject>
14
+ /// Discover the surroundings
15
+ /// @param peripherals Device array
16
+ /// @param rssiList Signal strength array
17
+ - (void)POSdidUpdatePeripheralList:(NSArray *)peripherals RSSIList:(NSArray *)rssiList;
18
+ /// 连接成功
19
+ /// @param peripheral Device Information
20
+ - (void)POSdidConnectPeripheral:(CBPeripheral *)peripheral;
21
+ /// 连接失败
22
+ /// @param peripheral Device Information
23
+ /// @param error Error
24
+ - (void)POSdidFailToConnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error;
25
+ /// 断开连接
26
+ /// @param peripheral Device Information
27
+ /// @param isAutoDisconnect Auto disconnect
28
+ - (void)POSdidDisconnectPeripheral:(CBPeripheral *)peripheral isAutoDisconnect:(BOOL)isAutoDisconnect;
29
+ /// 发送数据成功
30
+ /// @param character character
31
+ /// @param error Error
32
+ - (void)POSdidWriteValueForCharacteristic:(CBCharacteristic *)character error:(NSError *)error;
33
+
34
+ @end
35
+
36
+ @interface POSBLEManager : NSObject
37
+ {
38
+ int commandSendMode; //命令发送模式 0:立即发送 1:批量发送
39
+ /**
40
+ * 指定写入数据的编码方式 utf8等
41
+ */
42
+ NSStringEncoding encodingType;
43
+
44
+ }
45
+ @property (nonatomic,assign) id<POSBLEManagerDelegate> delegate;
46
+ /**
47
+ * Specify the peripheral to write data
48
+ */
49
+ @property (nonatomic,strong) CBPeripheral *writePeripheral;
50
+
51
+
52
+ #pragma mark - 基本方法
53
+ /**
54
+ * Singleton method
55
+ *
56
+ * @return self
57
+ */
58
+ + (instancetype)sharedInstance;
59
+ /**
60
+ * Start scanning
61
+ */
62
+ - (void)POSstartScan;
63
+ /**
64
+ * Stop scanning
65
+ */
66
+ - (void)POSstopScan;
67
+ /**
68
+ * Connect to designated equipment
69
+ */
70
+ - (void)POSconnectDevice:(CBPeripheral *) peripheral;
71
+ /**
72
+ * Manually disconnect the connected device
73
+ */
74
+ -(void)POSdisconnectRootPeripheral;
75
+ // 是否连接成功
76
+ @property (nonatomic,assign) BOOL connectOK;
77
+ /**
78
+ * Write print data
79
+ * @param peripheral Device Information
80
+ * @param dataStr Input string
81
+ */
82
+ - (void)POSsendDataToPeripheral:(CBPeripheral *)peripheral dataString:(NSString *)dataStr ;
83
+
84
+ /// A unified method of sending instructions, through the instruction tool class, get the complete instruction, and then send
85
+ /// @param data Data sent
86
+ -(void)POSWriteCommandWithData:(NSData *)data;
87
+
88
+ /// send data
89
+ /// @param data data
90
+ /// @param block callback
91
+ -(void)POSWriteCommandWithData:(NSData *)data callBack:(TSCCompletionBlock)block;
92
+
93
+
94
+ ///**
95
+ // * 输入TSC指令
96
+ // */
97
+ //- (void)PosWriteTSCCommondWithData:(NSData *)data callBack:(PosTSCCompletionBlock)block;
98
+ ///**
99
+ // * 输入POS指令
100
+ // */
101
+ //- (void)PosWritePOSCommondWithData:(NSData *)data callBack:(PosTSCCompletionBlock)block;
102
+ //#pragma mark - 其他方法
103
+ //#pragma mark - ====================POS指令====================
104
+ ///**
105
+ // *1.水平定位
106
+ // */
107
+ //- (void)PoshorizontalPosition;
108
+ ///**
109
+ // * 2.打印并换行
110
+ // */
111
+ //- (void)PosprintAndFeed;
112
+ ///**
113
+ // * 3.打印并回到标准模式
114
+ // */
115
+ //- (void)PosPrintAndBackToNormalModel;
116
+ ///**
117
+ // * 4.页模式下取消打印数据
118
+ // */
119
+ //- (void)PosCancelPrintData;
120
+ ///**
121
+ // * 5.实时状态传送
122
+ // * param:指定所要传送的打印状态
123
+ // * 1 <= param <= 4
124
+ // * callBlock : 打印机返回的相关状态
125
+ // */
126
+ //- (void)PosUpdataPrinterState:(int)param completion:(PosPOSCompletionBlock)callBlock;
127
+ ///**
128
+ // * 6.实时对打印机请求
129
+ // * param : 表示对打印机发送的请求
130
+ // * 1 <= param <= 2
131
+ // */
132
+ //- (void)PosUpdataPrinterAnswer:(int)param;
133
+ ///**
134
+ // * 7.实时产生钱箱开启脉冲
135
+ // * m : 指定钱箱插座的引脚
136
+ // * t : 电平时间
137
+ // * n = 1
138
+ // * m = 0,1
139
+ // * 1 <= t <= 8
140
+ // */
141
+ //- (void)PosOpenBoxAndPulse:(int) n m:(int) m t:(int) t;
142
+ ///**
143
+ // * 8.页模式下打印
144
+ // */
145
+ //- (void)PosPrintOnPageModel;
146
+ ///**
147
+ // * 9.设置字符右间距
148
+ // * n : 表示字符间距
149
+ // * 0 <= n <= 255
150
+ // */
151
+ //- (void)PosSetCharRightMargin:(int)n;
152
+ ///**
153
+ // * 10.选择打印模式
154
+ // * n : 根据n的值设置字符打印模式
155
+ // * 0 <= n <= 255
156
+ // */
157
+ //- (void)PosSelectPrintModel:(int)n;
158
+ ///**
159
+ // * 11.设置绝对打印位置
160
+ // * 0 <= nL <= 255
161
+ // * 0 <= nh <= 255
162
+ // */
163
+ //- (void)PosSetPrintLocationWithParam:(int)nL nH:(int)nH;
164
+ ///**
165
+ // * 12.选择/取消用户自定义字符
166
+ // * 0 <= n <= 255
167
+ // */
168
+ //- (void)PosSelectOrCancelCustomCharacter:(int)n;
169
+ //
170
+ ///**
171
+ // * 13.定义用户自定义字符
172
+ // * y=3
173
+ // * 32<=c1<=c2<=127
174
+ // * 0<=x<=12 标准ASCII码字体A(12 x 24)
175
+ // * 0<=x<=9 压缩SCII码字体(9 x 17)
176
+ // * 0<=d1 ... d(y*xk)<=255
177
+ // * points : 点矩阵数组,数组元素位字符串类型
178
+ // */
179
+ //- (void)PosDefinCustomCharacter:(int)y c1:(int)c1 c2:(int)c2 dx:(NSArray *)points;
180
+ ///**
181
+ // * 14.选择位图模式
182
+ // * 选择由m指定的一种位图模式,位图点数由nL和nH确定
183
+ // * m=0,1,32,33
184
+ // * 0<=nL<=255
185
+ // * 0<=nH<=3
186
+ // * 0<=d<=255
187
+ // */
188
+ //- (void)PosSelectBitmapModel:(int)m nL:(int)nL nH:(int)nH dx:(NSArray *)points;
189
+ //
190
+ ///**
191
+ // * 15.取消下划线模式
192
+ // * 0<=n<=2,48<=n<=50
193
+ // * 根据n的值选择或取消下划线模式
194
+ // */
195
+ //- (void)PosCancelUnderLineModelWith:(int)n;
196
+ ///**
197
+ // * 16.设置默认行间距
198
+ // */
199
+ //- (void)PosSetDefaultLineMargin;
200
+ ///**
201
+ // * 17.设置行间距
202
+ // * 0<=n<=255
203
+ // * 设置行间距位【n*纵向或横向移动单位】
204
+ // */
205
+ //- (void)PosSetLineMarginWith:(int)n;
206
+ ///**
207
+ // * 18.选择打印机
208
+ // * 0<=n<=1
209
+ // */
210
+ //- (void)PosSelectPrinterWith:(int)n;
211
+ ///**
212
+ // * 19.取消用户自定义字符
213
+ // * 32<=n<=127
214
+ // */
215
+ //- (void)PosCancelCustomCharacterWith:(int)n;
216
+ ///**
217
+ // * 20.初始化打印机
218
+ // *
219
+ // */
220
+ //- (void)PosInitializePrinter;
221
+ ///**
222
+ // * 21.设置横向跳格位置
223
+ // * 1<=n<=255
224
+ // * 0<=k<=32
225
+ // */
226
+ //- (void)PosSetTabLocationWith:(NSArray *)points;
227
+ ///**
228
+ // * 22.选择/取消加粗模式
229
+ // * 0<=n<=255
230
+ // * n最低位为0时,取消加粗模式,位1时,选择加粗模式
231
+ // */
232
+ //- (void)PosSelectOrCancelBoldModelWith:(int)n;
233
+ ///**
234
+ // * 23.选择/取消双重打印模式
235
+ // * 0<=n<=255
236
+ // * n最低位:0 取消
237
+ // * 1 加粗
238
+ // */
239
+ //- (void)PosSelectOrCancelDoublePrintModel:(int)n;
240
+ ///**
241
+ // * 24.打印并走纸
242
+ // * 0<=n<=255
243
+ // * 打印缓冲区数据并走纸【n*纵向或横向移动单位】
244
+ // */
245
+ //- (void)PosPrintAndPushPageWith:(int)n;
246
+ ///**
247
+ // * 25.选择页模式
248
+ // */
249
+ //- (void)PosSelectPageModel;
250
+ ///**
251
+ // * 26.选择字体
252
+ // * n = 0,1,48,49
253
+ // */
254
+ //- (void)PosSelectFontWith:(int)n;
255
+ ///**
256
+ // * 27.选择国际字符集
257
+ // * 0<=n<=15
258
+ // */
259
+ //- (void)PosSelectINTL_CHAR_SETWith:(int)n;
260
+ ///**
261
+ // * 28.选择标准模式
262
+ // */
263
+ //- (void)PosSelectNormalModel;
264
+ ///**
265
+ // * 29.在页模式下选择打印区域方向
266
+ // * 0<=n<=3 48<=n<=51
267
+ // * n指定打印区域的方向和起始位置
268
+ // */
269
+ //- (void)PosSelectPrintDirectionOnPageModel:(int)n;
270
+ ///**
271
+ // * 30.选择/取消顺时针旋转90度
272
+ // * 0<=n<=1 48<=n<=49
273
+ // * 0,48 : 取消
274
+ // * 1,49 : 选择
275
+ // */
276
+ //- (void)PosSelectOrCancelRotationClockwise:(int)n;
277
+ ///**
278
+ // * 31.页模式下设置打印区域
279
+ // * 范围:0<=xL,xH,yL,yH,dxL,dxH,dyL,dyH<=255
280
+ // */
281
+ //- (void)PosSetprintLocationOnPageModelWithXL:(int)xL
282
+ // xH:(int)xH
283
+ // yL:(int)yL
284
+ // yH:(int)yH
285
+ // dxL:(int)dxL
286
+ // dxH:(int)dxH
287
+ // dyL:(int)dyL
288
+ // dyH:(int)dyH;
289
+ //
290
+ ///**
291
+ // * 32.设置横向打印位置
292
+ // * 范围: nL 0 - 255
293
+ // nH 0 - 255
294
+ // */
295
+ //- (void)PosSetHorizonLocationWith:(int)nL nH:(int)nH;
296
+ ///**
297
+ // * 33.选择对齐方式
298
+ // * 范围: n 0 - 2
299
+ // 48 - 50
300
+ // */
301
+ //- (void)PosSelectAlignmentWithN:(int)n;
302
+ ///**
303
+ // * 34.选择打印纸传感器以输出信号
304
+ // * 范围: n 0 - 255
305
+ // */
306
+ //- (void)PosSelectSensorForOutputSignal:(int)n;
307
+ ///**
308
+ // * 35.选择打印纸传感器以停止打印
309
+ // * 范围: n 0 - 255
310
+ // */
311
+ //- (void)PosSelectSensorForStopPrint:(int)n;
312
+ ///**
313
+ // * 36.允许/禁止按键
314
+ // * 范围: n 0 - 255
315
+ // */
316
+ //- (void)PosAllowOrDisableKeypress:(int)n;
317
+ ///**
318
+ // * 37.打印并向前走纸 N 行
319
+ // * 范围: n 0 - 255
320
+ // */
321
+ //- (void)PosPrintAndPushPageRow:(int)n;
322
+ ///**
323
+ // * 38.产生钱箱控制脉冲
324
+ // * 范围:m 0 , 1 , 48 , 49
325
+ // t1 0 - 255
326
+ // t2 0 - 255
327
+ // */
328
+ //- (void)PosMakePulseWithCashboxWithM:(int)m t1:(int)t1 t2:(int)t2;
329
+ ///**
330
+ // * 39.选择字符代码表
331
+ // * 范围: n 0 - 10 或 16 - 19
332
+ // */
333
+ //- (void)PosSelectCharacterTabN:(int)n;
334
+ ///**
335
+ // * 40.选择/取消倒置打印模式
336
+ // * 范围: n 0 - 255
337
+ // */
338
+ //- (void)PosSelectOrCancelInversionPrintModel:(int)n;
339
+ ///**
340
+ // * 41.打印下载到FLASH中的位图
341
+ // * 范围:n 1 - 255
342
+ // m 0 - 3 , 48 - 51
343
+ // */
344
+ //- (void)PosPrintFlashBitmapWithN:(int)n m:(int)m;
345
+ ///**
346
+ // * 42.定义FLASH位图
347
+ // *范围:n 1 - 255
348
+ // * points : 位图的横向点数和纵向点数
349
+ // */
350
+ //- (void)PosDefinFlashBitmapWithN:(int)n Points:(NSArray *)points;
351
+ ///**
352
+ // * 43.选择字符大小
353
+ // * 范围:n 0 - 255
354
+ // */
355
+ //- (void)PosSelectCharacterSize:(int)n;
356
+ ///**
357
+ // * 44.页模式下设置纵向绝对位置
358
+ // * 范围:nL 1 - 255
359
+ // nH 0 - 255
360
+ // */
361
+ //- (void)PosSetVertLocationOnPageModelWithnL:(int)nL nH:(int)nH;
362
+ ///**
363
+ // * 45.定义下载位图
364
+ // * 范围:x 1 - 255
365
+ // y 1 - 48
366
+ // x * y <= 912
367
+ // d 0 - 255
368
+ // */
369
+ //- (void)PosDefineLoadBitmapWithX:(int)x Y:(int)y Points:(NSArray *)points;
370
+ ///**
371
+ // * 46.执行打印数据十六进制转储
372
+ // * 范围:pL = 2
373
+ // pH = 0
374
+ // n = 0,48
375
+ // m = 1,49
376
+ // */
377
+ //- (void)PosPrintDataAndSaveAsHexWithpL:(int)pL pH:(int)pH n:(int)n m:(int)m;
378
+ ///**
379
+ // * 47.打印下载位图
380
+ // * 范围:m 0 - 3 或 48 - 51
381
+ // */
382
+ //- (void)PosPrintLoadBitmapM:(int)m;
383
+ ///**
384
+ // * 48.开始/结束宏定义
385
+ // */
386
+ //- (void)PosBeginOrEndDefine;
387
+ ///**
388
+ // * 49.选择/取消黑白反显打印模式
389
+ // * 范围:n 0 - 255
390
+ // */
391
+ //- (void)PosSelectORCancelBWPrintModel:(int)n;
392
+ ///**
393
+ // * 50.选择HRI字符的打印位置
394
+ // * 范围:n 0 - 3 或 48 - 51
395
+ // */
396
+ //- (void)PosSelectHRIPrintLocation:(int)n;
397
+ ///**
398
+ // * 51.设置左边距
399
+ // * 范围:nL 0 - 255
400
+ // nH 0 - 255
401
+ // */
402
+ //- (void)PosSetLeftMarginWithnL:(int)nL nH:(int)nH;
403
+ ///**
404
+ // * 52.设置横向和纵向移动单位
405
+ // * 范围:x 0 - 255
406
+ // y 0 - 255
407
+ // */
408
+ //- (void)PosSetHoriAndVertUnitXWith:(int)x y:(int)y;
409
+ ///**
410
+ // * 53.选择切纸模式并切纸
411
+ // * model : 0,1 选择模式1 和 模式2
412
+ // * 模式1范围 : m = 0,48,1,49
413
+ // * 模式2范围 : m = 66, n = 0-255
414
+ // */
415
+ //- (void)PosSelectCutPaperModelAndCutPaperWith:(int)m n:(int)n selectedModel:(int)model;
416
+ ///**
417
+ // * 54.设置打印区域宽高
418
+ // * 范围:nL 0 - 255
419
+ // nH 0 - 255
420
+ // */
421
+ //- (void)PosSetPrintLocationWith:(int)nL nH:(int)nH;
422
+ ///**
423
+ // * 55.页模式下设置纵向相对位置
424
+ // * 范围:nL 0 - 255
425
+ // nH 0 - 255
426
+ // */
427
+ //- (void)PosSetVertRelativeLocationOnPageModelWith:(int)nL nH:(int)nH;
428
+ ///**
429
+ // * 56.执行宏命令
430
+ // * 范围:r 0 - 255
431
+ // t 0 - 255
432
+ // m 0,1
433
+ // */
434
+ //- (void)PosRunMacroMommandWith:(int)r t:(int)t m:(int)m;
435
+ ///**
436
+ // * 57.打开/关闭自动状态反传功能(ASB)
437
+ // * 范围:n 0 - 255
438
+ // */
439
+ //- (void)PosOpenOrCloseASB:(int)n;
440
+ ///**
441
+ // * 58.选择HRI使用字体
442
+ // * 范围:n 0,1,48,49
443
+ // */
444
+ //- (void)PosSelectHRIFontToUse:(int)n;
445
+ ///**
446
+ // * 59. 选择条码高度
447
+ // * 范围:n 1 - 255
448
+ // */
449
+ //- (void)PosSelectBarcodeHeight:(int)n;
450
+ ///**
451
+ // * 60.打印条码
452
+ // * model : 0,1 代表两种类型 0:表示类型1 1:表示类型2
453
+ // * 类型1: m 0-6
454
+ // * 类型2: m 65-73
455
+ // */
456
+ //- (void)PosPrintBarCodeWithPoints:(int)m n:(int)n points:(NSArray *)points selectModel:(int)model;
457
+ ///**
458
+ // * 61.返回状态
459
+ // * 范围:n 1,2,49,50
460
+ // */
461
+ //- (void)PosCallBackStatus:(int)n completion:(PosPOSCompletionBlock)block;
462
+ ///**
463
+ // * 62.打印光栅位图
464
+ // * 范围:m 0 - 3 或 48 - 51
465
+ // xL 0 - 255
466
+ // xH 0 - 255
467
+ // yL 0 - 255
468
+ // yH 0 - 255
469
+ // points 表示位图数据
470
+ // */
471
+ //- (void)PosPrintRasterBitmapWith:(int)m
472
+ // xL:(int)xL
473
+ // xH:(int)xH
474
+ // yl:(int)yL
475
+ // yh:(int)yH
476
+ // points:(NSArray *)points;
477
+ ///**
478
+ // * 63.设置条码宽度
479
+ // * 范围:n 2 - 6
480
+ // */
481
+ //- (void)PosSetBarcodeWidth:(int)n;
482
+ //#pragma mark - ============汉字字符控制命令============
483
+ ///**
484
+ // * 64.设置汉字字符模式
485
+ // * 范围:n 0 - 255
486
+ // */
487
+ //- (void)PosSetChineseCharacterModel:(int)n;
488
+ ///**
489
+ // * 65.选择汉字模式
490
+ // */
491
+ //- (void)PosSelectChineseCharacterModel;
492
+ ///**
493
+ // * 66.选择/取消汉字下划线模式
494
+ // * 范围:n 0 - 2 或 48 - 50
495
+ // */
496
+ //- (void)PosSelectOrCancelChineseUderlineModel:(int)n;
497
+ ///**
498
+ // * 67.取消汉字模式
499
+ // */
500
+ //- (void)PosCancelChineseModel;
501
+ ///**
502
+ // * 68.定义用户自定义汉字
503
+ // * c1,c2代表字符编码
504
+ // * points 表示汉子矩阵
505
+ // */
506
+ //- (void)PosDefineCustomChinesePointsC1:(int)c1 c2:(int)c2 points:(NSArray *)points;
507
+ ///**
508
+ // * 69.设置汉字字符左右间距
509
+ // * 范围:n1 0 - 255
510
+ // n2 0 - 255
511
+ // */
512
+ //- (void)PosSetChineseMarginWithLeftN1:(int)n1 n2:(int)n2;
513
+ ///**
514
+ // * 70.选择/取消汉字倍高倍宽
515
+ // * 范围:n 0 - 255
516
+ // */
517
+ //- (void)PosSelectOrCancelChineseHModelAndWModel:(int)n;
518
+ //#pragma mark - ============打印机提示命令============
519
+ ///**
520
+ // * 72.打印机来单打印蜂鸣提示
521
+ // * 范围:n 1 - 9
522
+ // t 1 - 9
523
+ // */
524
+ //- (void)PosPrinterSound:(int)n t:(int)t;
525
+ ///**
526
+ // * 73.打印机来单打印蜂鸣提示及报警灯闪烁
527
+ // * 范围:m 1 - 20
528
+ // t 1 - 20
529
+ // n 0 - 3
530
+ // */
531
+ //- (void)PosPrinterSoundAndAlarmLight:(int)m t:(int)t n:(int)n;
532
+ //
533
+ //#pragma mark - ====================TSC指令====================
534
+ ///**
535
+ // * 1.设置标签尺寸
536
+ // * width : 标签宽度
537
+ // * height : 标签高度
538
+ // */
539
+ //- (void)PosaddSizeWidth:(int)width height:(int)height;
540
+ ///**
541
+ // * 2.设置间隙长度
542
+ // * gap : 间隙长度
543
+ // */
544
+ //- (void)PosaddGap:(int)gap;
545
+ ///**
546
+ // * 3.产生钱箱控制脉冲
547
+ // * m : 钱箱引脚号
548
+ // * t1 : 高电平时间
549
+ // * t2 : 低电平时间
550
+ // */
551
+ //- (void)PosaddCashDrwer:(int)m t1:(int)t1 t2:(int)t2;
552
+ ///**
553
+ // * 4.控制每张标签的停止位置
554
+ // * offset : 停止偏移量
555
+ // */
556
+ //- (void)PosaddOffset:(float)offset;
557
+ ///**
558
+ // * 5.设置打印速度
559
+ // * speed : 打印速度
560
+ // */
561
+ //- (void)PosaddSpeed:(float)speed;
562
+ ///**
563
+ // * 6.设置打印浓度
564
+ // * n : 打印浓度
565
+ // */
566
+ //- (void)PosaddDensity:(int)n;
567
+ ///**
568
+ // * 7.设置打印方向和镜像
569
+ // * n : 打印方向
570
+ // */
571
+ //- (void)PosaddDirection:(int)n;
572
+ ///**
573
+ // * 8.设置原点坐标
574
+ // * x : 原点横坐标
575
+ // * y : 原点纵坐标
576
+ // */
577
+ //- (void)PosaddReference:(int)x y:(int)y;
578
+ ///**
579
+ // * 9.清除打印缓冲区数据
580
+ // */
581
+ //- (void)PosaddCls;
582
+ ///**
583
+ // * 10.走纸
584
+ // * feed : 走纸长度
585
+ // */
586
+ //- (void)PosaddFeed:(int)feed;
587
+ ///**
588
+ // * 11.退纸
589
+ // * feed : 退纸长度
590
+ // */
591
+ //- (void)PosaddBackFeed:(int)feed;
592
+ ///**
593
+ // * 12.走一张标签纸距离
594
+ // */
595
+ //- (void)PosaddFormFeed;
596
+ ///**
597
+ // * 13.标签位置进行一次校准
598
+ // */
599
+ //- (void)PosaddHome;
600
+ ///**
601
+ // * 14.打印标签
602
+ // * m : 打印的标签份数
603
+ // */
604
+ //- (void)PosaddPrint:(int)m;
605
+ ///**
606
+ // * 15.设置国际代码页
607
+ // * page : 国际代码页
608
+ // */
609
+ //- (void)PosaddCodePage:(int)page;
610
+ ///**
611
+ // * 16.设置蜂鸣器
612
+ // * level: 声音阶级
613
+ // * interval : 声音长短
614
+ // */
615
+ //- (void)PosaddSound:(int)level interval:(int)interval;
616
+ ///**
617
+ // * 17.设置打印机报错
618
+ // * feed : 走纸长度
619
+ // */
620
+ //- (void)PosaddLimitFeed:(int)feed;
621
+ ///**
622
+ // * 18.在打印缓冲区绘制黑块
623
+ // * x : 其实横坐标
624
+ // * y : 起始纵坐标
625
+ // * width: 线宽
626
+ // * height: 线高
627
+ // */
628
+ //- (void)PosaddBar:(int)x y:(int)y width:(int)width height:(int)height;
629
+ ///**
630
+ // * 19.在打印缓冲区绘制一维条码
631
+ // * x : 其实横坐标
632
+ // * y : 起始纵坐标
633
+ // * type : 条码类型
634
+ // * height : 条码高度
635
+ // * readable : 是否打印可识别字符
636
+ // * rotation : 条码旋转角度0,90,180,270
637
+ // * conten: 条码数据,数据需参考条码规则输入
638
+ // */
639
+ //- (void)Posadd1DBarcodeX:(int)x
640
+ // y:(int)y
641
+ // type:(NSString *)type
642
+ // height:(int)height
643
+ // readable:(int)readable
644
+ // rotation:(int)rotation
645
+ // narrow:(int)narrow
646
+ // wide:(int)wide
647
+ // content:(NSString *)content;
648
+ ///**
649
+ // * 20.在打印缓冲区绘制矩形
650
+ // * x : 其实横坐标
651
+ // * y : 起始纵坐标
652
+ // * xend : 终点横坐标
653
+ // * yend : 终点纵坐标
654
+ // */
655
+ //- (void)PosaddBox:(int)x y:(int)y xend:(int)xend yend:(int)yend;
656
+ ///**
657
+ // * 21.在打印缓冲区绘制位图
658
+ // * x : 起始横坐标
659
+ // * y : 起始纵坐标
660
+ // * width: 位图打印宽度
661
+ // * height: 高度
662
+ // */
663
+ //- (void)PosaddBitmap:(int)x
664
+ // y:(int)y
665
+ // width:(int)width
666
+ // height:(int)height
667
+ // mode:(int)mode data:(int)data;
668
+ ///**
669
+ // * 22.擦除打印缓冲区中指定区域的数据
670
+ // * x : 起始横坐标
671
+ // * y : 起始纵坐标
672
+ // * xwidth : 横向宽度
673
+ // * yheight : 纵向高度
674
+ // */
675
+ //- (void)PosaddErase:(int)x y:(int)y xwidth:(int)xwidth yheight:(int)yheight;
676
+ ///**
677
+ // * 23.将指定区域的数据黑白反色
678
+ // * x : 起始横坐标
679
+ // * y : 起始纵坐标
680
+ // * xwidth : 横向宽度
681
+ // * yheight : 纵向高度
682
+ // */
683
+ //- (void)PosaddReverse:(int)x y:(int)y xwidth:(int)xwidth yheight:(int)yheight;
684
+ ///**
685
+ // * 24.在打印缓冲区中绘制文字
686
+ // * x : 起始横坐标
687
+ // * y : 起始纵坐标
688
+ // * font : 字体类型
689
+ // * rotation : 旋转角度
690
+ // * xmul : 横向放大系数1-10倍
691
+ // * ymul : 纵向放大系数1-10倍
692
+ // * content : 文字字符串
693
+ // */
694
+ //- (void)PosaddText:(int)x y:(int)y font:(NSString *)font rotation:(int)rotation x_mul:(int)xmul y_mul:(int)ymul content:(NSString *)content;
695
+ ///**
696
+ // * 25.在打印缓冲区中绘制文字
697
+ // * x : 起始横坐标
698
+ // * y : 起始纵坐标
699
+ // * level : 纠错级别
700
+ // * cellWidth : 单元大小
701
+ // * totation : 旋转角度
702
+ // * dataStr : 打印文字
703
+ // */
704
+ //- (void)PosaddQRCode:(int)x y:(int)y level:(int)level cellWidth:(int)cellWidth rotation:(int)totation data:(NSString *)dataStr;
705
+ ///**
706
+ // * 26.设置剥离功能是否开启
707
+ // * enable : 是否使能
708
+ // */
709
+ //- (void)PosaddPeel:(NSString *)enable;
710
+ ///**
711
+ // * 27.设置撕离功能是否开启
712
+ // * enable : 是否使能
713
+ // */
714
+ //- (void)PosaddTear:(NSString *)enable;
715
+ //
716
+ ///**
717
+ // * 28.设置切刀功能是否开启
718
+ // * enable : 是否使能
719
+ // */
720
+ //- (void)PosaddCut:(NSString *)enable;
721
+ ///**
722
+ // * 29.设置打印机出错时,是否打印上一张内容
723
+ // * enable : 是否使能
724
+ // */
725
+ //- (void)PosaddReprint:(NSString *)enable;
726
+ ///**
727
+ // * 30.设置是否按走纸键打印最近一张标签
728
+ // * enable : 是否使能
729
+ // */
730
+ //- (void)PosaddPrintKeyEnable:(NSString *)enable;
731
+ ///**
732
+ // * 31.设置按走纸键打印最近一张标签的份数
733
+ // * m : 打印份数
734
+ // */
735
+ //- (void)PosaddPrintKeyNum:(int)m;
736
+ /* 32.设置打印机发送命令模式
737
+ * 范围:0,1
738
+ * 0:立即发送
739
+ * 1:批量发送
740
+ */
741
+ - (void)POSSetCommandMode:(BOOL)Mode;
742
+ /* 33.Return batch print buffer command
743
+ */
744
+ -(NSArray*)POSGetBuffer;
745
+
746
+ /* 34.Clear the contents of the print buffer
747
+ */
748
+ -(void)POSClearBuffer;
749
+
750
+ /* 35.Batch send print buffer command
751
+ */
752
+ -(void)POSSendCommandBuffer;
753
+
754
+ /* 36.Set command data encoding method
755
+ */
756
+ -(void)POSSetDataCodingType:(NSStringEncoding) codingType;
757
+
758
+
759
+ @end