//
//  RYBleAccessory.h
//  BleKit
//
//  Created by ldc on 2019/3/25.
//  Copyright © 2019 Xiamen Hanin. All rights reserved.
//

#import <CoreBluetooth/CoreBluetooth.h>
#import <RYCommunication/base.h>
#import <RYCommunication/RYBleConst.h>
#import <RYCommunication/RYBleService.h>
#import <RYCommunication/RYBaseAccessory.h>

NS_ASSUME_NONNULL_BEGIN

@interface RYBleAccessory : RYBaseAccessory <CBCentralManagerDelegate>

@property (nonatomic, strong) CBPeripheral *peripheral;

@property (nonatomic, strong) NSNumber *rssi;

@property (nonatomic, assign) double distance;

@property (nonatomic, copy) NSString *mac;

@property (nonatomic, strong) NSDictionary<NSString *,id> *advertisementData;

@property (nonatomic, strong) NSArray<id<RYBleServiceProtocol>> *services;

@property (nonatomic, assign) NSTimeInterval connectTimeout;

- (instancetype)initWithPeripheral:(CBPeripheral *)peripheral rssi:(NSNumber *)rssi advertisement:(NSDictionary<NSString *,id> *)advertisementData;

@end

NS_ASSUME_NONNULL_END
