12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- //
- // ELHygrothermographBleManager.h
- // AILinkBleSDK
- //
- // Created by cliCk on 2021/5/7.
- // Copyright © 2021 IOT. All rights reserved.
- //
-
- #import <AILinkBleSDK/ELBluetoothManager.h>
-
- NS_ASSUME_NONNULL_BEGIN
-
- @class ELHygrothermographBleRecordData;
-
- @protocol ELHygrothermographBleDelegate <NSObject>
-
- @optional
-
- /** 返回设备的连接状态 */
- - (void)hygrothermographManagerUpdateState:(ELBluetoothState)state;
-
- /** 回调扫描到的温湿度计 */
- - (void)hygrothermographManagerScanDevices:(NSArray<ELPeripheralModel *> *)scanDevices;
-
- /** 设备返回当前状态
- * @param power : 电量 0~100
- * @parm time : 设备开机时间
- * @param tem : 温度,单位摄氏度
- * @param hum : 湿度,单位%
- */
- - (void)hygrothermographManagerReturnDevStatePower:(NSInteger)power bootTime:(long long)time tem:(float)tem hum:(float)hum;
-
- /** 设备返回阀值
- * @param tem : 温度阀值,单位摄氏度
- * @param hum : 湿度阀值,单位%
- */
- - (void)hygrothermographManagerReturnThresholdTemThreshold:(float)tem humThreshold:(float)hum;
-
- /** 设备返回历史记录数据
- * @param list : 历史记录列表
- * @param allNumber : 历史记录总数量
- * @param getNumber : 已发数量
- */
- - (void)hygrothermographManagerReturnRecordDataList:(NSArray<ELHygrothermographBleRecordData *> *)list allListNumber:(long long)allNumber getListNumber:(long long)getNumber;
-
- /** 返回设备采样频率和保存频率 */
- - (void)hygrothermographManagerReturnSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval;
-
- @end
-
- @interface ELHygrothermographBleManager : ELBluetoothManager
-
- @property (nonatomic, weak) id<ELHygrothermographBleDelegate> hygrothermographDelegate;
-
- + (ELHygrothermographBleManager *)shareManager;
-
- /** 获取设备状态信息 */
- - (void)getDevState;
-
- /** 设置阀值
- * @param tem 区间为 0.1 ~ 10摄氏度 (超过区间就设置为临界值)
- * @param hum 区间为 0.1 ~ 10 %(同上)
- */
- - (void)setDevThresholdWithTem:(float)tem hum:(float)hum;
-
- /** 读取设备历史记录
- * 因为设备保存的历史数据过多,APP 不需每次多获取全部历史。 所以 APP 可以根据自身上一次获取到的开机时间,获取新的历 史数据。 例如:APP 首次连接设备获取数据时,则该值为 0. 如果首次已经获取到了开机时间的 100s 时,再次获取时,该值 应该为 100
- */
- - (void)getDevRecordDataWithDevTime:(long long)devTime;
-
- /** 设置采样频率和保存频率 */
- - (void)setSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval;
-
- @end
-
- NS_ASSUME_NONNULL_END
|