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.

ELEightScaleSDKHeader.h 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. //
  2. // ELEightScaleSDKHeader.h
  3. // Elink
  4. //
  5. // Created by iot_user on 2020/6/3.
  6. // Copyright © 2020 iot_iMac. All rights reserved.
  7. //
  8. #ifndef ELEightScaleSDKHeader_h
  9. #define ELEightScaleSDKHeader_h
  10. #import "ELSDKHeader.h"
  11. typedef NS_ENUM(NSUInteger, EightScaleWeightType) {
  12. EightScaleWeightTypeAuto = 0x01,//Real-time weight(实时体重)
  13. EightScaleWeightTypeStable = 0x02,//Stabilize weight(稳定体重)
  14. };
  15. //Weight data(体重数据)
  16. typedef struct EightScaleWeightStruct{
  17. //Weight type(体重类型)
  18. EightScaleWeightType weightType;
  19. //Original weight(体重原始值)
  20. int weight;
  21. //Weight decimal point(体重小数点)
  22. int point;
  23. //unit(单位)
  24. ELDeviceWeightUnit unit;
  25. } EightScaleWeightStruct;
  26. //Impedance measurement process(阻抗测量过程)
  27. typedef NS_ENUM(NSUInteger, EightScaleAdcTestStep) {
  28. EightScaleAdcTestStepTesting = 0x01,//Measuring impedance(测阻抗中)
  29. EightScaleAdcTestStepFailure = 0x02,//Impedance measurement failed(测阻抗失败)
  30. //The impedance measurement is successful, bring the impedance data, and use the APP algorithm (APP will calculate according to the algorithm identification of byte7)
  31. //测阻抗成功,带上阻抗数据,并使用APP算法(APP 会根据byte7的算法标识进行计算)
  32. EightScaleAdcTestStepSuccess = 0x03,
  33. EightScaleAdcTestStepTestEnd = 0x04,//End of impedance measurement.(测阻抗结束。)
  34. };
  35. // 阻抗类型
  36. typedef NS_ENUM(NSUInteger, EightScaleAdcType) {
  37. EightScaleAdcTypeFeet = 0x00,//Two-foot impedance(双脚阻抗)
  38. EightScaleAdcTypeHands = 0x01,//Hands resistance(双手阻抗)
  39. EightScaleAdcTypeLeftHand = 0x02,//Left hand impedance(左手阻抗)
  40. EightScaleAdcTypeRightHand = 0x03,//Right hand impedance(右手阻抗)
  41. EightScaleAdcTypeLeftFoot = 0x04,//Left foot impedance(左脚阻抗)
  42. EightScaleAdcTypeRightFoot = 0x05,//Right foot impedance(右脚阻抗)
  43. EightScaleAdcTypeLWholeBody = 0x06,//Left whole body impedance(左全身阻抗)
  44. EightScaleAdcTypeRWholeBody = 0x07,//Right whole body impedance(右全身阻抗)
  45. EightScaleAdcTypeRHand_LFoot = 0x08,//Impedance of right hand and left foot(右手左脚阻抗)
  46. EightScaleAdcTypeLHand_RFoot = 0x09,//Impedance of left hand and right foot(左手右脚阻抗)
  47. EightScaleAdcTypeTrunk = 0x0A,//Torso impedance(躯干阻抗)
  48. };
  49. //Impedance data(阻抗数据)
  50. typedef struct EightScaleAdcStruct{
  51. //Impedance measurement stage(阻抗测量阶段)
  52. EightScaleAdcTestStep adcTestStep;
  53. //Impedance type(阻抗类型)
  54. EightScaleAdcType adcType;
  55. //Impedance value(阻抗值)
  56. unsigned int adc;
  57. //Algorithm Id(算法Id)
  58. int algorithmID;
  59. }EightScaleAdcStruct;
  60. //Heart rate measurement process(心率测量过程)
  61. typedef NS_ENUM(NSUInteger, EightScaleHeartRateTestStep) {
  62. EightScaleHeartRateTestStepTesting = 0x01,//Heart rate measurement(心率测量中)
  63. EightScaleHeartRateTestStepSuccess = 0x02,//Successful heart rate measurement, bring heart rate data(测心率成功,带上心率数据)
  64. EightScaleHeartRateTestStepFailure = 0x03,//Failed to measure heart rate(测心率失败)
  65. };
  66. //Temperature data(温度数据)
  67. typedef struct EightScaleTempStruct{
  68. //Positive and negative temperature(正负温度)
  69. BOOL negative;
  70. //temperature(温度)
  71. int temp;
  72. //Decimal point(小数点)
  73. int point;
  74. //unit(单位)
  75. ELDeviceTemperatureUnit unit;
  76. }EightScaleTempStruct;
  77. typedef NS_ENUM(NSUInteger, EightScaleSwitchUnitResult) {
  78. EightScaleSwitchUnitResultSuccess =0,//Successful operation(操作成功)
  79. EightScaleSwitchUnitResultFailure =1,//operation failed(操作失败)
  80. EightScaleSwitchUnitResultOperation =2,//In operation(正在操作中)
  81. };
  82. //Measurement status(测量状态)
  83. typedef NS_ENUM(NSUInteger, EightScaleTestStatus) {
  84. EightScaleTestStatusIdle = 0,//Idle(闲置)
  85. EightScaleTestStatusTesting = 1,//Testing(测量中)
  86. EightScaleTestStatusComplete = 2,//Complete(测量完成)
  87. EightScaleTestStatusError = 3,//Error(测量出错)
  88. };
  89. #endif /* ELEightScaleSDKHeader_h */