// // ELCM02_BleManager.h // AILinkBleSDK // // Created by cliCk on 2021/9/13. // Copyright © 2021 IOT. All rights reserved. // #import "ELBluetoothManager.h" #import "ELCM02_HeartbeatBleModel.h" #import "ELCM02_BatteryBleModel.h" #import "ELCM02_BleSupportFunctionModel.h" #import "ELCM02_BleHeader.h" NS_ASSUME_NONNULL_BEGIN @protocol CM02_BleDelegate @optional - (void)CM02ManagerUpdateState:(enum ELBluetoothState)state; - (void)CM02ManagerScanDevices:(NSArray *_Nullable)CM02Devices; /** 返回设备支持的功能 */ - (void)CM02ManagerBackSupportFunctionModel:(ELCM02_BleSupportFunctionModel *)model; /** CM02返回设备心跳数据 */ - (void)CM02ManagerBackHeartbeatModel:(ELCM02_HeartbeatBleModel *)model; /** CM02回复修改密码结果 */ - (void)CM02ManagerBackUpdatePasswordResult:(enum CM02_Result_Type)result; /** CM02回复解锁和开锁状态 */ - (void)CM02ManagerBackLockState:(enum CM02_LockState_Type)lock passwordResult:(enum CM02_PasswordCorrect_Type)result; /** CM02回复售后密码 */ - (void)CM02ManagerBackAfterSalesPassword:(NSString *)afterSalesPassword; /** CM02回复单次行程和对应时间 */ - (void)CM02ManagerBackSingleMileage:(float)kmMileage time:(NSInteger)second; /** CM02回复总里程信息 */ - (void)CM02ManagerBackTotalMileage:(float)kmMileage; /** CM02回复电池信息 */ - (void)CM02ManagerBackBatteryBleModel:(ELCM02_BatteryBleModel *)model; /** CM02回复控制器编号,硬件版本号和软件版本号 */ - (void)CM02ManagerBackControlCode:(NSString *)code hardwareVersion:(NSString *)hardwareVersion softwareVersion:(NSString *)softwareVersion; /** CM02回复仪表编号,硬件版本和软件版本号 */ - (void)CM02ManagerBackDashboardCode:(NSString *)code hardwareVersion:(NSString *)hardwareVersion softwareVersion:(NSString *)softwareVersion; @end @interface ELCM02_BleManager : ELBluetoothManager @property (nonatomic, weak) id CM02Delegate; + (ELCM02_BleManager *)shareManager; ///** 查询接收端类型及支持的功能 */ - (void)getDeviceBaseInformation; /** 切换单位 */ - (void)changeUnit:(enum CM02_Unit_Type)unit; /** 定速巡航开关 */ - (void)setCruiseSwitch:(BOOL)state; /** 是否为非零速度启动 */ - (void)setSpeedStart:(BOOL)state; /** 恢复出厂设置 */ - (void)resetDevice; /** 清除除里程和时间外的其它控制器及仪表参数 */ - (void)clearOtherCacheData; /** 清除总里程 */ - (void)clearTotalMileage; /** 清除单次里程时间(设备一开机就会记录骑行时间和里程,当需要记录这些时间和里程的时候需要清除一下当次时间,重新开始记录) */ - (void)clearSingleTime; /** 设置档位(1-7) */ - (void)setGear:(NSInteger)gear; /** 开关灯 */ - (void)setLightState:(BOOL)state; /** 修改密码 */ - (void)updatePasswordWithOldPassword:(NSString *)oldPassword newPassword:(NSString *)newPassword; /** 解锁或者锁车(锁车无需传密码) */ - (void)setLockState:(enum CM02_LockState_Type)lock password:(NSString *)password; /** 查询售后密码 */ - (void)getAfterSalesPassword; /** 查询单次行驶里程和时间 */ - (void)getNowSingleMileageInformation; /** 查询总里程 */ - (void)getTotalMileageInformation; /** 查询电池信息 */ - (void)getBatteryInformation; /** 查询控制器厂商代码及编号 */ - (void)getControlVersion; /** 查询仪表盘固件版本 */ - (void)getDashboardVersion; #pragma mark - 断开设备清除缓存信息 - (void)cleanData; @end NS_ASSUME_NONNULL_END