iOS AILinkBleSDK - 蓝牙SDK
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ELHeightBodyFatScaleBleManager.h 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. @protocol ELHeightBodyFatScaleBleDelegate <NSObject>
  15. @optional
  16. /** 返回设备连接状态 */
  17. - (void)heightBodyFatScaleManagerUpdateState:(ELBluetoothState)state;
  18. /** 回调扫描到的身高体脂秤 */
  19. - (void)heightBodyFatScaleManagerScanDevices:(NSArray<ELPeripheralModel *> *)scanDevices;
  20. /** 回调用户信息设置结果 */
  21. - (void)heightBodyFatScaleManagerSetUserDataResult:(HeightBodyFatScale_SetupResult)result;
  22. /** MCU主动请求用户信息 */
  23. - (void)heightBodyFatScaleManagerRequestUserData;
  24. /** MCU设置单位 */
  25. - (void)heightBodyFatScaleManagerMCUSetHeightUnit:(ELDeviceHeightUnit)heightUnit weightUnit:(ELDeviceWeightUnit)weightUnit;
  26. /** MCU回复单位设置结果 */
  27. - (void)heightBodyFatScaleManagerReportUnitResult:(HeightBodyFatScale_SetupResult)result;
  28. /** MCU回复工作模式设置结果 */
  29. - (void)heightBodyFatScaleManagerWorkModeResult:(HeightBodyFatScale_SetupResult)result;
  30. /** MCU回复声音设置结果 */
  31. - (void)heightBodyFatScaleManagerVideoSetupResult:(HeightBodyFatScale_SetupResult)result;
  32. /** MCU回复设备状态
  33. * @param mode : 工作模式
  34. * @param power : 设备电量
  35. * @param charging : 是否在充电
  36. * @param weightUnit : 重量单位
  37. * @param heightUnit : 身高单位
  38. * @param video : 语音开关
  39. */
  40. - (void)heightBodyFatScaleManagerReportDevStateWithWorkMode:(HeightBodyFatScale_WorkModeType)mode power:(NSInteger)power charging:(BOOL)charging weightUnit:(ELDeviceWeightUnit)weightUnit height:(ELDeviceHeightUnit)heightUnit videoState:(BOOL)video;
  41. #pragma mark - 身高体脂秤模式
  42. /** MCU上报称重状态 */
  43. - (void)heightBodyFatScaleManagerReportWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight weightPoint:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
  44. /** MCU上报阻抗数据
  45. * @param state : 阻抗测量状态
  46. * @param aisle : 通道
  47. * @param adc : 阻抗
  48. * @param algorithmId : 体脂算法ID (若使用MCU端算法,则该值为 0
  49. */
  50. - (void)heightBodyFatScaleManagerReportAdcDataWithImpedanceState:(HeightBodyFatScale_AdcStateType)state aisle:(HeightBodyFatScale_AdcAisleType)aisle adc:(NSInteger)adc algorithmId:(NSInteger)algorithmId;
  51. /** MCU上报心率数据 */
  52. - (void)heightBodyFatScaleManagerReportHeartRateDataWithState:(HeightBodyFatScale_HeartRateStateType)state bpm:(NSInteger)bpm;
  53. /** MCU上报温度数据
  54. * @param negative : 是否为负温度
  55. * @param tem : 温度
  56. * @param point : 几位小数
  57. * @param unit 温度单位
  58. */
  59. - (void)heightBodyFatScaleManagerReportTemDataWithNegative:(BOOL)negative tem:(NSInteger)tem point:(NSInteger)point unit:(ELDeviceTemperatureUnit)unit;
  60. /** MCU上报身高数据 */
  61. - (void)heightBodyFatScaleManagerReportHeightDataWithHeight:(NSInteger)height unit:(ELDeviceHeightUnit)unit point:(NSInteger)point;
  62. /** MCU上报体脂数据 */
  63. - (void)heightBodyFatScaleManagerReportBodyFatDataWithDataModel:(ELHeightBodyFatScaleBleWeightBodyModel *)model;
  64. #pragma mark - 抱婴模式
  65. /** MCU上报称重状态
  66. * @param stable : 测量状态
  67. * @param adultWeight : 成人体重
  68. * @param allWeight : 成人+婴儿总体重
  69. * @param babyWeight : 婴儿重量
  70. * @param point : 小数位
  71. * @param unit : 单位
  72. */
  73. - (void)heightBodyFatScaleManagerReportBabyModetWithWeighingState:(HeightBodyFatScale_WeightStableType)stable adultWeight:(NSInteger)adultWeight allWeight:(NSInteger)allWeight babyWeight:(NSInteger)babyWeight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
  74. #pragma mark - 体重模式
  75. /** MCU上报称重状态 */
  76. - (void)heightBodyFatScaleManagerReportWeightModeWithWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
  77. #pragma mark - 体重身高模式
  78. /** MCU上报称重状态 */
  79. - (void)heightBodyFatScaleManagerReportWeightHeightModeWithWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
  80. /** MCU上报身高数据 */
  81. - (void)heightBodyFatScaleManagerReportWeightHeightMOdeWithHeightNumber:(NSInteger)height point:(NSInteger)point unit:(ELDeviceHeightUnit)unit;
  82. #pragma mark -
  83. /** MCU发送测量完成 */
  84. - (void)heightBodyFatScaleManagerSendCompletedWithWorkMode:(HeightBodyFatScale_WorkModeType)type;
  85. @end
  86. @interface ELHeightBodyFatScaleBleManager : ELBluetoothManager
  87. @property (nonatomic, weak) id<ELHeightBodyFatScaleBleDelegate> heightBodyFatScaleDelegate;
  88. + (ELHeightBodyFatScaleBleManager *)shareManager;
  89. #pragma mark 发送指令
  90. ///设置用户信息
  91. - (void)sendUserDataWithSex:(NSInteger)sex age:(NSInteger)age height:(NSInteger)cm;
  92. ///App设置单位
  93. - (void)sendUnitWithHeightUnit:(ELDeviceHeightUnit)heightUnit weightUnit:(ELDeviceWeightUnit)weightUnit;
  94. ///App回复单位设置结果
  95. - (void)reportUnitSetupResult:(HeightBodyFatScale_SetupResult)result;
  96. //App下发工作模式
  97. - (void)sendDevceWorkMode:(HeightBodyFatScale_WorkModeType)model;
  98. //App读取声音设置
  99. - (void)getVideoSetup;
  100. //App声音设置
  101. - (void)sendVideoSetupState:(BOOL)state;
  102. //App获取工作状态
  103. - (void)getWorkState;
  104. //App回复测量完成
  105. - (void)sendWeighingCompleted;
  106. #pragma mark A6指令
  107. @end
  108. NS_ASSUME_NONNULL_END