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.

ELHeightBodyFatScaleBleManager.h 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. //
  2. // ELHeightBodyFatScaleBleManager.h
  3. // AILinkBleSDK
  4. //
  5. // Created by cliCk on 2021/3/24.
  6. // Copyright © 2021 IOT. All rights reserved.
  7. //
  8. #import "ELBluetoothManager.h"
  9. #import "ELHeightBodyFatScaleBleHeader.h"
  10. #import "ELSDKHeader.h"
  11. NS_ASSUME_NONNULL_BEGIN
  12. @class ELHeightBodyFatScaleBleWeightBodyModel;
  13. @class ELPeripheralModel;
  14. @class ELEightScaleBleDataModel;
  15. @protocol ELHeightBodyFatScaleBleDelegate <NSObject>
  16. @optional
  17. /** 返回设备连接状态 */
  18. - (void)heightBodyFatScaleManagerUpdateState:(ELBluetoothState)state;
  19. /** 回调扫描到的身高体脂秤 */
  20. - (void)heightBodyFatScaleManagerScanDevices:(NSArray<ELPeripheralModel *> *)scanDevices;
  21. /** 回调用户信息设置结果 */
  22. - (void)heightBodyFatScaleManagerSetUserDataResult:(HeightBodyFatScale_SetupResult)result;
  23. /** MCU主动请求用户信息 */
  24. - (void)heightBodyFatScaleManagerRequestUserData;
  25. /** MCU设置单位 */
  26. - (void)heightBodyFatScaleManagerMCUSetHeightUnit:(ELDeviceHeightUnit)heightUnit weightUnit:(ELDeviceWeightUnit)weightUnit;
  27. /** MCU回复单位设置结果 */
  28. - (void)heightBodyFatScaleManagerReportUnitResult:(HeightBodyFatScale_SetupResult)result;
  29. /** 人体成份分析仪 MCU回复单位设置结果 */
  30. - (void)heightBodyFatScaleManagerReportHeightUnit:(ELDeviceHeightUnit)heightUnit weightUnit:(ELDeviceWeightUnit)weightUnit;
  31. /** MCU回复工作模式设置结果 */
  32. - (void)heightBodyFatScaleManagerWorkModeResult:(HeightBodyFatScale_SetupResult)result;
  33. /** MCU回复声音设置结果 */
  34. - (void)heightBodyFatScaleManagerVideoSetupResult:(HeightBodyFatScale_SetupResult)result;
  35. /** MCU回复设备状态
  36. * @param mode : 工作模式
  37. * @param power : 设备电量
  38. * @param charging : 是否在充电
  39. * @param weightUnit : 重量单位
  40. * @param heightUnit : 身高单位
  41. * @param video : 语音开关
  42. */
  43. - (void)heightBodyFatScaleManagerReportDevStateWithWorkMode:(HeightBodyFatScale_WorkModeType)mode power:(NSInteger)power charging:(BOOL)charging weightUnit:(ELDeviceWeightUnit)weightUnit height:(ELDeviceHeightUnit)heightUnit videoState:(BOOL)video DEPRECATED_MSG_ATTRIBUTE("use 'voiceState' instead");
  44. - (void)heightBodyFatScaleManagerReportDevStateWithWorkMode:(HeightBodyFatScale_WorkModeType)mode power:(NSInteger)power charging:(BOOL)charging weightUnit:(ELDeviceWeightUnit)weightUnit height:(ELDeviceHeightUnit)heightUnit voiceState:(BOOL)voice;
  45. /** MCU回复设备支持模式 */
  46. - (void)heightBodyFatScaleManagerReportDevModeArray:(NSArray *)modeArray;
  47. #pragma mark - 身高体脂秤模式
  48. /** MCU上报称重状态 */
  49. - (void)heightBodyFatScaleManagerReportWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight weightPoint:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
  50. /** MCU上报阻抗数据
  51. * @param state : 阻抗测量状态
  52. * @param aisle : 通道
  53. * @param adc : 阻抗
  54. * @param algorithmId : 体脂算法ID (若使用MCU端算法,则该值为 0
  55. */
  56. - (void)heightBodyFatScaleManagerReportAdcDataWithImpedanceState:(HeightBodyFatScale_AdcStateType)state aisle:(HeightBodyFatScale_AdcAisleType)aisle adc:(NSInteger)adc algorithmId:(NSInteger)algorithmId;
  57. /** MCU上报心率数据 */
  58. - (void)heightBodyFatScaleManagerReportHeartRateDataWithState:(HeightBodyFatScale_HeartRateStateType)state bpm:(NSInteger)bpm;
  59. /** MCU上报温度数据
  60. * @param negative : 是否为负温度
  61. * @param tem : 温度
  62. * @param point : 几位小数
  63. * @param unit 温度单位
  64. */
  65. - (void)heightBodyFatScaleManagerReportTemDataWithNegative:(BOOL)negative tem:(NSInteger)tem point:(NSInteger)point unit:(ELDeviceTemperatureUnit)unit;
  66. /** MCU上报身高数据 */
  67. - (void)heightBodyFatScaleManagerReportHeightDataWithHeight:(NSInteger)height unit:(ELDeviceHeightUnit)unit point:(NSInteger)point;
  68. /** MCU上报体脂数据 */
  69. - (void)heightBodyFatScaleManagerReportBodyFatDataWithDataModel:(ELHeightBodyFatScaleBleWeightBodyModel *)model;
  70. /** // 人体成份分析仪 MCU上报阻抗数据
  71. */
  72. - (void)heightBodyFatScaleManagerReportAdcDataWithImpedanceState:(HeightBodyFatScale_AdcStateType)state bleDataModelWith:(ELEightScaleBleDataModel *)bleDataModel UseAppAlgorithm:(BOOL)useAppAlgorithm;
  73. ///// 人体成份分析仪 MCU请求补全体脂数据
  74. - (void)heightBodyFatScaleManagerCompletionBodyFatDataWith:(ELEightScaleBleDataModel *)bleDataModel;
  75. #pragma mark - 抱婴模式
  76. /** MCU上报称重状态
  77. * @param stable : 测量状态
  78. * @param adultWeight : 成人体重
  79. * @param allWeight : 成人+婴儿总体重
  80. * @param babyWeight : 婴儿重量
  81. * @param point : 小数位
  82. * @param unit : 单位
  83. */
  84. - (void)heightBodyFatScaleManagerReportBabyModetWithWeighingState:(HeightBodyFatScale_WeightStableType)stable adultWeight:(NSInteger)adultWeight allWeight:(NSInteger)allWeight babyWeight:(NSInteger)babyWeight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
  85. #pragma mark - 体重模式
  86. /** MCU上报称重状态 */
  87. - (void)heightBodyFatScaleManagerReportWeightModeWithWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
  88. #pragma mark - 体重身高模式
  89. /** MCU上报称重状态 */
  90. - (void)heightBodyFatScaleManagerReportWeightHeightModeWithWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
  91. /** MCU上报身高数据 */
  92. - (void)heightBodyFatScaleManagerReportWeightHeightMOdeWithHeightNumber:(NSInteger)height point:(NSInteger)point unit:(ELDeviceHeightUnit)unit;
  93. #pragma mark -
  94. /** MCU发送测量完成 */
  95. - (void)heightBodyFatScaleManagerSendCompletedWithWorkMode:(HeightBodyFatScale_WorkModeType)type;
  96. @end
  97. @interface ELHeightBodyFatScaleBleManager : ELBluetoothManager
  98. @property (nonatomic, weak) id<ELHeightBodyFatScaleBleDelegate> heightBodyFatScaleDelegate;
  99. + (ELHeightBodyFatScaleBleManager *)shareManager;
  100. #pragma mark 发送指令
  101. ///设置用户信息
  102. - (void)sendUserDataWithSex:(NSInteger)sex age:(NSInteger)age height:(NSInteger)cm DEPRECATED_MSG_ATTRIBUTE("use 'sendUserDataWithGender:age:heightInCm:' instead");
  103. - (void)sendUserDataWithGender:(NSInteger)gender age:(NSInteger)age heightInCm:(NSInteger)heightInCm;
  104. ///App设置单位
  105. - (void)sendUnitWithHeightUnit:(ELDeviceHeightUnit)heightUnit weightUnit:(ELDeviceWeightUnit)weightUnit;
  106. ///App回复单位设置结果
  107. - (void)reportUnitSetupResult:(HeightBodyFatScale_SetupResult)result;
  108. //App下发工作模式
  109. - (void)sendDevceWorkMode:(HeightBodyFatScale_WorkModeType)model DEPRECATED_MSG_ATTRIBUTE("use 'sendDeviceWorkMode' instead");
  110. - (void)sendDeviceWorkMode:(HeightBodyFatScale_WorkModeType)mode;
  111. //App读取声音设置
  112. - (void)getVideoSetup DEPRECATED_MSG_ATTRIBUTE("use 'getVoiceSetup' instead");
  113. - (void)getVoiceSetup;
  114. //App声音设置
  115. - (void)sendVideoSetupState:(BOOL)state DEPRECATED_MSG_ATTRIBUTE("use 'sendVoiceSetting' instead");
  116. - (void)sendVoiceSetting:(BOOL)on;
  117. //App获取工作状态
  118. - (void)getWorkState;
  119. //App回复测量完成
  120. - (void)sendWeighingCompleted;
  121. #pragma mark A6指令
  122. @end
  123. NS_ASSUME_NONNULL_END