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.

ELFaceMaskBleManager.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // ELFaceMaskBleManager.h
  3. // Elink
  4. //
  5. // Created by iot_user on 2020/9/30.
  6. // Copyright © 2020 iot_iMac. All rights reserved.
  7. //
  8. #import "ELBluetoothManager.h"
  9. #import "ELFaceMaskBleHeader.h"
  10. #import "ELFaceMaskBleDataModel.h"
  11. @protocol FaceMaskBleDelegate <NSObject>
  12. @optional
  13. /// 蓝牙连接状态
  14. /// @param state 连接状态
  15. - (void)faceMaskBleReceiveState:(ELBluetoothState)state;
  16. /// 附近的设备
  17. /// @param devices 设备列表
  18. - (void)faceMaskBleReceiveDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices;
  19. - (void)faceMaskBleReceiveStatusDataModel:(ELFaceMaskBleDataModel *_Nonnull)model;
  20. - (void)faceMaskReplaceSuccess:(BOOL)success;
  21. - (void)faceMaskSwitchFanResult:(FaceMaskFanControlResult)result;
  22. - (void)faceMaskPoweroffSuccess:(BOOL)success;
  23. @end
  24. NS_ASSUME_NONNULL_BEGIN
  25. @interface ELFaceMaskBleManager : ELBluetoothManager
  26. @property (nonatomic, weak) id<FaceMaskBleDelegate> faceMaskDelegate;
  27. @property (nonatomic, assign) FaceMaskFanStatus fanStatus;
  28. @property (nonatomic, assign) NSInteger filterWorkTime;
  29. @property (nonatomic, assign) int battery;
  30. + (instancetype)shareManager;
  31. //APP 获取设备状态
  32. - (void)queryFaceMaskStatusData;
  33. //APP 下发更换滤网指令
  34. - (void)replaceFilter;
  35. //APP 下发风扇控制指令
  36. - (void)switchFanStatus:(FaceMaskFanStatus)status;
  37. //APP 下发关机指令
  38. - (void)powerOff;
  39. @end
  40. NS_ASSUME_NONNULL_END