JMEnumBlock.h

Includes:
<CoreBluetooth/CoreBluetooth.h>

Introduction

Use the links in the table of contents to the left to access the documentation.



Typedefs

JMComplete
JMDiscoverBle
JMDiscoverWifi
JMPrinterType
JMStatus
JMTransformCompleted

JMComplete


typedef void(^JMComplete)(
    NSError *_Nullable error);  
Parameters
error

错误信息

Discussion

完成回调


JMDiscoverBle


typedef void(^JMDiscoverBle)(
    NSError *_Nullable error, 
    CBPeripheral *_Nullable peripheral, 
    NSDictionary<NSString *,id> * _Nullable advertisementData, 
    NSNumber *_Nullable RSSI);  
Parameters
error

错误信息

peripheral

外设

advertisementData

广播信息

RSSI

信号强度

Discussion

发现外设


JMDiscoverWifi


typedef void(^JMDiscoverWifi)(
    NSError *_Nullable error, 
    NSString *_Nullable macStr, 
    NSString *_Nullable ipStr, 
    NSString *_Nullable subnetMask, 
    NSDictionary *_Nullable otherDic);  
Parameters
error

错误信息

macStr

mac 地址

ipStr

ip 地址

subnetMask

子网掩码

otherDic

其它信息

Discussion

发现外设回调


JMPrinterType


typedef enum { 
    JMNone = 0, // 打印机类型不明 
    JMNeedle9, // 9 针打印机 
    JMNeedel24, // 24 针打印机 
    JMThermal, // 热敏打印机 
    JMInkjet // 喷墨打印机 
}JMPrinterType;  
Discussion

打印机类型 @code JMNone = 0 // 打印机类型不明 JMNeedle9 // 9 针打印机 JMNeedel24 // 24 针打印机 JMThermal // 热敏打印机 JMInkjet // 喷墨打印机 @endcode


JMStatus


typedef void(^JMStatus)(
    NSError *_Nullable error, 
    NSData *_Nullable status);  
Parameters
error

错误信息

status

状态数据(只有一个字节) @code // 状态位信息 byte[7] // 正在打印中 byte[6] // 打印途中出错 byte[5] // 打印完成 byte[4] // 打印机缓存区溢出 byte[3] // 切刀故障 byte[2] // 上盖打开 byte[1] // 过热 byte[0] // 纸尽 @endcode

Discussion

打印机状态


JMTransformCompleted


typedef void(^JMTransformCompleted)(
    NSError *_Nullable error, 
    NSData *_Nullable data);  
Parameters
error

转换错误信息

data

打印数据

Discussion

数据转换完成回调