pc_doc/蓝牙秤/okok威盛康开发sdk/okok直流广播秤双脚测量-APP端SDK/ios/libs/CSBIASV235.h

112 lines
4.3 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/***********************************************************************
Copyright 2018-2019, ChipseaTech. All rights reserved.
File : CSBIASV235.h
Version : 1.0.0.0
Date : 2018-12-17 15:52:56
Authors : wuhz, 397911312@qq.com
Remarks :
***********************************************************************/
#import <Foundation/Foundation.h>
/*
测试数据
身高, 体重,阻抗,性别, 年龄
{170, 500, 4080, 1, 30},
{170, 1000, 4280, 1, 30},
{170, 1500, 4480, 1, 30},
{170, 500, 4080, 0, 30},
{170, 1000, 4280, 0, 30},
{170, 1500, 4480, 0, 30},
{170, 509, 4547, 1, 28},
{164, 790, 3797, 1, 28},
{174, 669, 4221, 1, 24},
{158, 603, 4388, 0, 21},
{163, 474, 4759, 0, 22},
{160, 553, 4549, 1, 26},
*/
/*
测试结果
BFP SLM BWP BMC VFR PP SMM BMR BMI SBW MC WC FC age score
5.0 45.3 62.9 2.2 1.0 27.7 26.0 1324 17.3 62.3 4.2 12.3 8.1 15 60
33.0 64.8 50.2 2.3 20.5 14.5 34.8 1981 34.6 62.3 - 15.3 - 37.7 - 22.4 56 50
42.7 84.2 46.0 1.7 41.5 10.1 43.5 2639 51.9 62.3 - 34.2 - 87.7 - 53.5 80 50
15.3 40.4 55.6 1.9 1.0 25.3 23.6 1239 17.3 60.4 3.0 10.4 7.4 15 66
45.0 51.0 42.6 4.0 13.5 8.4 32.3 1737 34.6 60.4 - 9.7 - 39.6 - 29.9 80 49
45.0 78.5 38.3 4.0 26.5 14.0 41.1 2235 51.9 60.4 - 37.2 - 89.5 - 52.4 80 50
6.1 44.7 61.4 3.1 1 26.5 24.9 1318 17.6 62.3 3.9 11.4 7.5 15 63
27 55.7 53.5 1.9 12 17.1 30.7 1692 29.4 58 - 9.5 - 21 - 11.5 37 56
16.6 53.1 57 2.7 5 22.4 29.9 1598 22.1 65.3 - 1.6 - 1.6 0 21 86
32.4 38.2 48.8 2.6 4.5 14.5 21.7 1269 24.2 52.2 - 1.6 - 8.1 - 6.5 33 68
18.4 36.3 54 2.3 1 22.6 19.5 1153 17.8 55.6 3 8.2 5.2 15 70
*/
struct BIAS_DATA_V235 {
double BFP; //体脂率
double SLM; //肌肉量
double BMC; //骨盐量
double BWP; //体水分率
double PP; //蛋白质率
double SMM; //骨骼肌量
double VFR; //内脏脂肪等级
double BMI; //身体质量指数
double SBW; //标准体重
double MC; //肌肉控制
double WC; //体重控制
double FC; //脂肪控制
int BMR; //基础代谢率
int MA; //身体年龄
int SBC; //身体得分
};
@interface BiasData_V235 : NSObject
@property (nonatomic, assign) double BFP; //体脂率
@property (nonatomic, assign) double SLM; //肌肉量
@property (nonatomic, assign) double BMC; //骨盐量
@property (nonatomic, assign) double BWP; //体水分率
@property (nonatomic, assign) double PP; //蛋白质率
@property (nonatomic, assign) double SMM; //骨骼肌量
@property (nonatomic, assign) double VFR; //内脏脂肪等级
@property (nonatomic, assign) double BMI; //身体质量指数
@property (nonatomic, assign) double SBW; //标准体重
@property (nonatomic, assign) double MC; //肌肉控制
@property (nonatomic, assign) double WC; //体重控制
@property (nonatomic, assign) double FC; //脂肪控制
@property (nonatomic, assign) int BMR; //基础代谢率
@property (nonatomic, assign) int MA; //身体年龄
@property (nonatomic, assign) int SBC; //身体得分
@end
// Return value of CSBIASV235::calc.
#define CSBIAS_OK 0
#define CSBIAS_ERR_WEIGTH -2 // The weight parameter must be between 200~1500.
#define CSBIAS_ERR_HEIGHT -3 // The height parameter must be between 90~220.
#define CSBIAS_ERR_AGE -4 // The age parameter must be between 18~99.
#define CSBIAS_ERR_SEX -5 // The sex parameter must be 0 or 1.
#define CSBIAS_ERR_IMPEDANCE -6 // The impedance parameter must be between 200~1500.
#define CSBIAS_ERR_MODE -7 // The mode parameter error.
#define CSBIAS_ERR_VCODE -8 // Fingerprint verification failed
@interface CSBIASV235 : NSObject
/*
- uMode 模式默认为0
- uSex 性别, 1男 0女
- uAge 年龄取值在18 ~99岁之间
- uHeight 身高, 取值在90 ~220之间表示90 ~220厘米.
- uWeight 体重取值在200 ~1500之间表示20公斤~150公斤.
- uImpedance 阻抗值, 取值在2000 ~15000.
- uVKeyCode 指纹验证中的验证码
*/
+(int)calc_v235:(int)uMode uSex :(int)uSex uAge :(int)uAge uHeight :(int)uHeight uWeight :(int)uWeight uImpedance:(int)uImpedance uVKeyCode : (int)uVKeyCode pResultDataBlock:(void(^)(BiasData_V235 *))block;
@end