//
//  ENSanDyGlucoseDevice.h
//  RNBTDevice
//
//  Created by lvwang2002 on 2019/5/12.
//  Copyright © 2019 zmxv. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ENNativeDevice.h"
@protocol ENNativeDeviceProtocal;
@class BLEDevice;

@interface ENSanDyGlucoseDevice:ENNativeDevice
-(void)startMonitor;
-(void)stopMonitor;
-(void)getNumberDataFromIndex:(UInt16)index Count:(UInt16)count;
-(void)getAllDataFromIndex:(UInt16)index;
-(void)getAllDataCount;
-(void)getAllData;
-(void)getBattery;
-(void)getName;
-(void)getVersion;
-(void)getSN;
-(void)doAuthorization;
-(void)getMonitorStatus;


@end

@protocol ENSanDyGlucoseDeviceProtocal <ENNativeDeviceProtocal>

/** 创建通道成功 */
@optional
-(void)onCreatedChannel:(BLEDevice *)device;

/** 认证成功 */
@optional
-(void)onAuthenticated:(BLEDevice *)device IsSuc:(Boolean) isSuc;

///**  */
//
/** 获取状态 */
@optional
-(void)onGetMonitorStatus:(BLEDevice *)device IsStartMonitor:(Boolean)isStartMonitor;

/** 获取电池电量 */
@optional
-(void)onGetBattery:(BLEDevice *)device Value:(double)value;

/** 获取全部数据的数量  */
@optional
-(void)onGetAllDataCount:(BLEDevice *)device Count:(int)count;
//
/** 得到过程数据 */
@optional
-(void)onGetProgressData:(BLEDevice *)device
                DataList:(NSArray *)datalist
                   Index:(int)index;

@optional
-(void)onStartMonitor:(BLEDevice *)device IsSuc:(Boolean)isSuc;
//
@optional
-(void)onStopMonitor:(BLEDevice *)device IsSuc:(Boolean)isSuc;
//
/////** 获取数据 */
@optional
-(void)onUpdateNewDataDevice:(BLEDevice *)device
                       Index:(UInt16)index
                   ElecValue:(double)elecValue;
@end
