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.

ELEightScaleAlgorithmTool.h 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // ELEightScaleAlgorithmTool.h
  3. // Elink
  4. //
  5. // Created by iot_user on 2020/6/18.
  6. // Copyright © 2020 iot_iMac. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @class ELEightScaleRecordModel;
  10. @class ELEightScaleBleDataModel;
  11. @class ELPeripheralModel;
  12. typedef void (^ELEightScaleRecordSuccessBlock)(ELEightScaleRecordModel * _Nullable recordModel);
  13. typedef void (^ELEightScaleRecordFailureBlock)(id _Nullable error);
  14. NS_ASSUME_NONNULL_BEGIN
  15. @interface ELEightScaleAlgorithmTool : NSObject
  16. /// 根据秤测量的阻抗数据调用算法解析出其他体脂数据
  17. /// @param dataModel 八电极秤测量的数据
  18. /// @param sex 女性传0,男性传1
  19. /// @param height 身高,单位cm
  20. /// @param age 年龄
  21. +(ELEightScaleRecordModel *)getRecordModelWithBleDataModel:(ELEightScaleBleDataModel *)dataModel withUserSex:(NSInteger)sex height:(NSInteger)height age:(NSInteger)age;
  22. //新算法
  23. +(ELEightScaleRecordModel *)getNewRecordModelWithBleDataModel:(ELEightScaleBleDataModel *)dataModel withUserSex:(NSInteger)sex height:(NSInteger)height age:(NSInteger)age;
  24. /// 双频八电极后台算法:请求服务器并转成记录模型
  25. /// @param dataModel 八电极秤测量的数据
  26. /// @param peripheral 蓝牙外设,取 vid
  27. /// @param sex 女性传0,男性传1
  28. /// @param height 身高,单位cm
  29. /// @param age 年龄
  30. + (void)getDoubleEightRecordModelWithBleDataModel:(ELEightScaleBleDataModel *)dataModel
  31. peripheral:(ELPeripheralModel *)peripheral
  32. withUserSex:(NSInteger)sex
  33. height:(NSInteger)height
  34. age:(NSInteger)age
  35. success:(ELEightScaleRecordSuccessBlock)success
  36. failure:(ELEightScaleRecordFailureBlock)failure;
  37. @end
  38. NS_ASSUME_NONNULL_END