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.

ELNutritionScaleBleManager.h 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // ELNutritionScaleBleManager.h
  3. // Elink
  4. //
  5. // Created by iot_user on 2020/8/21.
  6. // Copyright © 2020 iot_iMac. All rights reserved.
  7. //
  8. #import "ELBluetoothManager.h"
  9. #import "ELNutritionScaleDataModel.h"
  10. @protocol NutritionScaleBleDelegate <NSObject>
  11. @optional
  12. /// 蓝牙连接状态
  13. /// @param state 连接状态
  14. - (void)deviceBleReceiveState:(ELBluetoothState)state;
  15. /// 附近的设备
  16. /// @param devices 设备列表
  17. - (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices;
  18. //获得支持单位列表
  19. - (void)supportUnits:(NSArray *_Nonnull)unitArray;
  20. //正在连接中倒计时
  21. - (void)deviceBleCountDown:(NSInteger)count;
  22. //称重数据
  23. - (void)nutritionScaleBleDataModel:(ELNutritionScaleDataModel *_Nonnull)model;
  24. //超载
  25. - (void)overload:(BOOL)status;
  26. //低电
  27. - (void)lowPower:(BOOL)status;
  28. @end
  29. NS_ASSUME_NONNULL_BEGIN
  30. @interface ELNutritionScaleBleManager : ELBluetoothManager
  31. @property(nonatomic, weak) id <NutritionScaleBleDelegate> nutritionScaleBleDelegate;
  32. + (instancetype)shareManager;
  33. @end
  34. @interface ELNutritionScaleBleManager ()
  35. - (void)autoScan;
  36. - (void)stopAutoScan;
  37. - (void)checkStatus;
  38. @end
  39. @interface ELNutritionScaleBleManager (send)
  40. //APP 下发归零
  41. - (void)sendMakeZero;
  42. //APP 切换单位
  43. - (void)sendUnit:(NutritionScaleWeightUnit)unit;
  44. @end
  45. NS_ASSUME_NONNULL_END