You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
//
|
|
|
|
// BluetoothDelegate.h
|
|
|
|
// BluetoothDemo
|
|
|
|
//
|
|
|
|
// Created by mac on 17/3/9.
|
|
|
|
// Copyright © 2017年 . All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import "BLEModelFireBoltt.h"
|
|
|
|
|
|
|
|
@class BluetoothFireBoltt;
|
|
|
|
|
|
|
|
@protocol BluetoothDelegate <NSObject>
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
扫描到设备后回调
|
|
|
|
|
|
|
|
@param bleModel 返回ble模型
|
|
|
|
*/
|
|
|
|
@optional
|
|
|
|
- (void)onDiscoverToPeripheralsBleModel:(BLEModelFireBoltt *)bleModel;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
发现设备的Services的委托
|
|
|
|
|
|
|
|
@param peripheral 外设
|
|
|
|
*/
|
|
|
|
@optional
|
|
|
|
- (void)onDiscoverServices:(CBPeripheral *)peripheral;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
发现设备service的Characteristics的委托
|
|
|
|
|
|
|
|
@param peripheral 外设
|
|
|
|
@param service 服务
|
|
|
|
*/
|
|
|
|
@optional
|
|
|
|
- (void)OnDiscoverCharacteristics:(CBPeripheral *)peripheral
|
|
|
|
Service:(CBService *)service;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
读取characteristics的委托
|
|
|
|
|
|
|
|
@param peripheral 外设
|
|
|
|
@param characteristics 特征值
|
|
|
|
*/
|
|
|
|
@optional
|
|
|
|
- (void)OnReadValueForCharacteristic:(CBPeripheral *)peripheral
|
|
|
|
characteristicsL:(CBCharacteristic *)characteristics;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@end
|