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.

ELAiFreshNutritionScaleBleManager.h 1.6KB

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