iOS AILinkBleSDK - 蓝牙SDK
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.

ELHygrothermographBleManager.h 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // ELHygrothermographBleManager.h
  3. // AILinkBleSDK
  4. //
  5. // Created by cliCk on 2021/5/7.
  6. // Copyright © 2021 IOT. All rights reserved.
  7. //
  8. #import <AILinkBleSDK/ELBluetoothManager.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @class ELHygrothermographBleRecordData;
  11. @protocol ELHygrothermographBleDelegate <NSObject>
  12. @optional
  13. /** 返回设备的连接状态 */
  14. - (void)hygrothermographManagerUpdateState:(ELBluetoothState)state;
  15. /** 回调扫描到的温湿度计 */
  16. - (void)hygrothermographManagerScanDevices:(NSArray<ELPeripheralModel *> *)scanDevices;
  17. /** 设备返回当前状态
  18. * @param power : 电量 0~100
  19. * @parm time : 设备开机时间
  20. * @param tem : 温度,单位摄氏度
  21. * @param hum : 湿度,单位%
  22. */
  23. - (void)hygrothermographManagerReturnDevStatePower:(NSInteger)power bootTime:(long long)time tem:(float)tem hum:(float)hum;
  24. /** 设备返回阀值
  25. * @param tem : 温度阀值,单位摄氏度
  26. * @param hum : 湿度阀值,单位%
  27. */
  28. - (void)hygrothermographManagerReturnThresholdTemThreshold:(float)tem humThreshold:(float)hum;
  29. /** 设备返回历史记录数据
  30. * @param list : 历史记录列表
  31. * @param allNumber : 历史记录总数量
  32. * @param getNumber : 已发数量
  33. */
  34. - (void)hygrothermographManagerReturnRecordDataList:(NSArray<ELHygrothermographBleRecordData *> *)list allListNumber:(long long)allNumber getListNumber:(long long)getNumber;
  35. /** 返回设备采样频率和保存频率 */
  36. - (void)hygrothermographManagerReturnSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval;
  37. @end
  38. @interface ELHygrothermographBleManager : ELBluetoothManager
  39. @property (nonatomic, weak) id<ELHygrothermographBleDelegate> hygrothermographDelegate;
  40. + (ELHygrothermographBleManager *)shareManager;
  41. /** 获取设备状态信息 */
  42. - (void)getDevState;
  43. /** 设置阀值
  44. * @param tem 区间为 0.1 ~ 10摄氏度 (超过区间就设置为临界值)
  45. * @param hum 区间为 0.1 ~ 10 %(同上)
  46. */
  47. - (void)setDevThresholdWithTem:(float)tem hum:(float)hum;
  48. /** 读取设备历史记录
  49. * 因为设备保存的历史数据过多,APP 不需每次多获取全部历史。 所以 APP 可以根据自身上一次获取到的开机时间,获取新的历 史数据。 例如:APP 首次连接设备获取数据时,则该值为 0. 如果首次已经获取到了开机时间的 100s 时,再次获取时,该值 应该为 100
  50. */
  51. - (void)getDevRecordDataWithDevTime:(long long)devTime;
  52. /** 设置采样频率和保存频率 */
  53. - (void)setSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval;
  54. @end
  55. NS_ASSUME_NONNULL_END