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.

ELBabyScaleBleManager.h 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // ELBabyScaleBleManager.h
  3. // Elink
  4. //
  5. // Created by iot_user on 2019/4/19.
  6. // Copyright © 2019 iot_iMac. All rights reserved.
  7. //
  8. #import "ELBluetoothManager.h"
  9. #import "ELPeripheralModel.h"
  10. #import "ELBabyScaleBleWeightModel.h"
  11. #import "ELBabyScaleBleHeightModel.h"
  12. #import "ELBabyScaleBleHeader.h"
  13. @protocol BabyScaleBleDelegate <NSObject>
  14. @optional
  15. //Callback Bluetooth status(回调蓝牙状态)
  16. - (void)babyScaleManagerUpdateState:(ELBluetoothState)state;
  17. //Callback to all baby scale equipment(回调所有婴儿秤设备)
  18. - (void)babyScaleManagerScanDevices:(NSArray<ELPeripheralModel *> *_Nullable)babyScaleDevices;
  19. //Callback weight data(回调体重数据)
  20. - (void)babyScaleManagerReceiveWeightModel:(ELBabyScaleBleWeightModel *_Nonnull)model;
  21. //Callback height data(回调身高数据)
  22. - (void)babyScaleManagerHeightModel:(ELBabyScaleBleHeightModel *_Nonnull)model;
  23. /** Return the result of the unit setting(返回单位设置的结果) */
  24. - (void)babyScaleBackSetUnitResults:(BabyScaleResultType )result;
  25. /** Callback peeling (zeroing) and locking results(回调去皮(归零)和锁定结果)
  26. * type : 0 peeled, 1 locked(0去皮,1锁定)
  27. */
  28. - (void)babyScaleBackCtrlType:(NSInteger )type Results:(BabyScaleResultType )result;
  29. /** The device sends an error code.(设备上发错误码) */
  30. - (void)babyScaleBackDeviceErrorCode:(BabyScaleDeviceErrorCode )code;
  31. @end
  32. NS_ASSUME_NONNULL_BEGIN
  33. @interface ELBabyScaleBleManager : ELBluetoothManager
  34. //Baby scale Bluetooth manager agent(婴儿秤蓝牙管理者代理)
  35. @property (nonatomic, weak) id<BabyScaleBleDelegate> babyScaleDelegate;
  36. +(ELBabyScaleBleManager *)shareManager;
  37. #pragma mark Hold YES is locked, NO is peeled (return to zero)(hold YES为锁定,NO去皮(归零))
  38. -(void)changeHold:(BOOL)hold;
  39. #pragma mark Height and weight unit switching(身高和体重单位切换)
  40. -(void)changeHeightUnit:(ELDeviceHeightUnit)heightUnit AndWeightUnit:(ELDeviceWeightUnit)weightUnit;
  41. @end
  42. NS_ASSUME_NONNULL_END