POSBLEManager Class Reference
Inherits from | NSObject |
---|---|
Declared in | POSBLEManager.h POSBLEManager.m |
Other Methods
+ sharedInstance
Singleton method
+ (instancetype)sharedInstance
Return Value
self
Discussion
Singleton method
Declared In
POSBLEManager.h
– POSstartScan
Start scanning
- (void)POSstartScan
Discussion
Start scanning
Declared In
POSBLEManager.h
– POSstopScan
Stop scanning
- (void)POSstopScan
Discussion
Stop scanning
Declared In
POSBLEManager.h
– POSdisconnectRootPeripheral
Manually disconnect the connected device
- (void)POSdisconnectRootPeripheral
Discussion
Manually disconnect the connected device
Declared In
POSBLEManager.h
– POSsendDataToPeripheral:dataString:
Write print data
- (void)POSsendDataToPeripheral:(CBPeripheral *)peripheral dataString:(NSString *)dataStr
Parameters
peripheral |
Device Information |
---|---|
dataStr |
Input string |
Discussion
Write print data
Declared In
POSBLEManager.h
– POSWriteCommandWithData:
A unified method of sending instructions, through the instruction tool class, get the complete instruction, and then send
- (void)POSWriteCommandWithData:(NSData *)data
Parameters
data |
Data sent |
---|
Discussion
A unified method of sending instructions, through the instruction tool class, get the complete instruction, and then send
Declared In
POSBLEManager.h
– POSWriteCommandWithData:callBack:
send data
- (void)POSWriteCommandWithData:(NSData *)data callBack:(TSCCompletionBlock)block
Parameters
data |
data |
---|---|
block |
callback |
Discussion
send data
Declared In
POSBLEManager.h
– POSconnectDevice:
Connect to designated equipment
- (void)POSconnectDevice:(CBPeripheral *)peripheral
Discussion
Connect to designated equipment
Declared In
POSBLEManager.h
– BLEManagerDelegate:updatePeripheralList:RSSIList:
扫描到设备后
- (void)BLEManagerDelegate:(BLEManager *)BLEmanager updatePeripheralList:(NSArray *)peripherals RSSIList:(NSArray *)RSSIArr
Discussion
扫描到设备后
Declared In
POSBLEManager.m
– BLEManagerDelegate:connectPeripheral:
连接上设备
- (void)BLEManagerDelegate:(BLEManager *)BLEmanager connectPeripheral:(CBPeripheral *)peripheral
Discussion
连接上设备
Declared In
POSBLEManager.m
– BLEManagerDelegate:disconnectPeripheral:isAutoDisconnect:
断开设备
- (void)BLEManagerDelegate:(BLEManager *)BLEmanager disconnectPeripheral:(CBPeripheral *)peripheral isAutoDisconnect:(BOOL)isAutoDisconnect
Discussion
断开设备
Declared In
POSBLEManager.m
– POSSetCommandMode:
**
- (void)POSSetCommandMode:(BOOL)Mode
Discussion
**
Declared In
POSBLEManager.h
Other Methods
delegate
指定写入数据的编码方式 utf8等
@property (nonatomic, assign) id<POSBLEManagerDelegate> delegate
Discussion
指定写入数据的编码方式 utf8等
Declared In
POSBLEManager.h
writePeripheral
Specify the peripheral to write data
@property (nonatomic, strong) CBPeripheral *writePeripheral
Discussion
Specify the peripheral to write data
Declared In
POSBLEManager.h