summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOBlueDataResponse.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOBlueDataResponse.h')
-rwxr-xr-xlibs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOBlueDataResponse.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOBlueDataResponse.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOBlueDataResponse.h
new file mode 100755
index 0000000..d316b52
--- /dev/null
+++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOBlueDataResponse.h
@@ -0,0 +1,66 @@
1//
2// IDOBlueDataResponse.h
3// IDOBlueProtocol
4//
5// Created by 何东阳 on 2019/5/8.
6// Copyright © 2019 何东阳. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import <CoreBluetooth/CoreBluetooth.h>
11
12NS_ASSUME_NONNULL_BEGIN
13
14@interface IDOBlueDataResponse : NSObject
15
16/**
17 * 获取扫描的服务
18 * [manager scanForPeripheralsWithServices:services options:@{CBCentralManagerScanOptionAllowDuplicatesKey:@YES}];
19 * get the scan service
20 */
21+ (NSArray <CBUUID *>*)getScanServices;
22
23/**
24 * 判断当前外围设备是否为OTA模式
25 * whether the current peripheral is in OTA mode
26 */
27+ (BOOL)isOtaModeWithPeripheral:(CBPeripheral *)peripheral;
28
29/**
30 * manager :当前蓝牙管理中心
31 * peripheral : 当前外接设备
32 * serviceIndex : 当前发现服务的索引 默认传0不作服务索引判断
33 * current bluetooth management center
34 * current bluetooth peripheral
35 * serviceIndex : the index of the current discovered service is set to 0 by default without service index judgment
36 */
37+ (void)blueManager:(CBCentralManager *)manager
38 peripheral:(CBPeripheral *)peripheral
39 serviceIndex:(NSInteger)serviceIndex
40 didConnected:(void(^)(BOOL isOta))callback;
41
42/**
43 * 连接外围设备成功后发现外围设备特征
44 * - (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error
45 * after successfully connecting the peripheral device, peripheral device characteristics are found.
46 */
47+ (void)findCharac:(CBPeripheral *)peripheral
48 service:(CBService *)service;
49
50/**
51 * 蓝牙接收到手环返回的数据
52 * - (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
53 * bluetooth receives data from the ring
54 */
55+ (void)didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic;
56
57/**
58 * 蓝牙写完数据的回调
59 * - (void)peripheral:(CBPeripheral *)peripheral didWriteValueForCharacteristic:(CBCharacteristic *)characteristic error:(nullable NSError *)error
60 * bluetooth writes a callback to the data
61 */
62+ (void)didWriteValueForCharacteristic:(CBCharacteristic *)characteristic
63 error:(NSError *)error;
64@end
65
66NS_ASSUME_NONNULL_END