Wahoo Fitness API  3.6.1
Documentation for the iPhone version of the Wahoo Fitness API.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
WFBTLEWeightScaleUser Class Reference

Represents a User Profile for the Wahoo Fitness BTLE Weight Scale. More...

#import <WFBTLEWeightScaleUser.h>

+ Inheritance diagram for WFBTLEWeightScaleUser:
+ Collaboration diagram for WFBTLEWeightScaleUser:

Class Methods

(WFBTLEWeightScaleUser *) + userRecordWithInitials:minWeight:maxWeight:height:goalWeight:gainLossTolerance:
 Initialises a user record of type WFBTLEWeightScaleUser and returns it. More...
 

Properties

char c_initial_left
 First (left) initial of user initials to be displayed on the scale. More...
 
char c_initial_middle
 Second (middle) initial of user initials to be displayed on the scale. More...
 
char c_initial_right
 Last (right) initial of user name to be displayed on the scale. More...
 
int height_in_cm
 User's height in cm. More...
 
float tolerance_kg
 Tolerance value (in kg) used as a threshold by the scale to ignore weight gain/loss. More...
 
float user_goal_weight_kg
 User's goal weight in kilograms. More...
 
int user_id
 User ID number (assigned by the scale). More...
 
float user_range_max_weight_kg
 Upper end of the weight range used by the scale to identify the user. More...
 
float user_range_min_weight_kg
 Lower end of the weight range used by the scale to identify the user. More...
 

Detailed Description

Represents a User Profile for the Wahoo Fitness BTLE Weight Scale.

The user profile is stored on the scale and used to attribute weight readings to individuals, compare weight readings to users' goals, and calculate BMI.

Method Documentation

+ (WFBTLEWeightScaleUser*) userRecordWithInitials: (NSString *)  initials
minWeight: (float)  minWeightKg
maxWeight: (float)  maxWeightKg
height: (float)  heightCm
goalWeight: (float)  goalWeightKg
gainLossTolerance: (float)  toleranceKg 

Initialises a user record of type WFBTLEWeightScaleUser and returns it.

If there are anyinconsistencies with the input data (max < min, weights below zero etc) then method will return nil.

Parameters
initialsAn NSString containing 3 initials. Will be trimmed/padded and capitalised if it is not done so already.
minWeightKgThe low end of the user's weight range, in kg.
maxWeightKgThe upper end of the user's weight range, in kg.
heightCmuser's height in cm
goalWeightKguser's goal weight in kg
toleranceKgthreshold for the scale to recognise a weight loss or gain. e.g if tolerance is 0.1kg, user must lose > 0.1kg for scale to display smiley face
Returns
An instance of WFBTLEWeightScaleUser if the data is valid, otherwise nil

Property Documentation

- (char) c_initial_left
readwritenonatomicassign

First (left) initial of user initials to be displayed on the scale.

Will only be shown on the scale if alphanumeric, using the ISO basic Latin alphabet or a digit from 0 to 9. Will automatically be set to upper case on the scale.

- (char) c_initial_middle
readwritenonatomicassign

Second (middle) initial of user initials to be displayed on the scale.

Will only be shown on the scale if alphanumeric, using the ISO basic Latin alphabet or a digit from 0 to 9. Will automatically be set to upper case on the scale.

- (char) c_initial_right
readwritenonatomicassign

Last (right) initial of user name to be displayed on the scale.

Will only be shown on the scale if alphanumeric, using the ISO basic Latin alphabet or a digit from 0 to 9. Will automatically be set to upper case on the scale.

- (int) height_in_cm
readwritenonatomicassign

User's height in cm.

Must be 0 or a positive number. If 0, no BMI will be shown on the scale.

- (float) tolerance_kg
readwritenonatomicassign

Tolerance value (in kg) used as a threshold by the scale to ignore weight gain/loss.

Used with goal weight and user's previous weight in determining if happy, sad or neutral face is shown on the scale. Must be 0 or a positive number. If 0, every difference between the user's current weight reading and previous weight reading will be counted as a gain or loss. If greater than 0, any difference between the user's current weight reading and the previous weight reading that is less than the tolerance value will be considered as neither a gain nor a loss.

- (float) user_goal_weight_kg
readwritenonatomicassign

User's goal weight in kilograms.

Must be 0 or a positive number. If 0, no happy, sad, or neutral face will be shown on the scale.

- (int) user_id
readwritenonatomicassign

User ID number (assigned by the scale).

Call requestUserId on the weight scale connection and use the value returned for this user id.

- (float) user_range_max_weight_kg
readwritenonatomicassign

Upper end of the weight range used by the scale to identify the user.

Must be a positive number. Must not overlap with any other user. Must be greater than user_range_min_weight_kg.

- (float) user_range_min_weight_kg
readwritenonatomicassign

Lower end of the weight range used by the scale to identify the user.

Must be a positive number. Must not overlap with any other user. Must be less than user_range_max_weight_kg.