Go to the documentation of this file.
61 #include "custom_config.h"
70 #define WSS_CONNECTION_MAX 10
71 #define WSS_MEAS_VAL_LEN_MAX 15
72 #define WSS_CACHE_MEAS_NUM_MAX 25
73 #define WSS_FEAT_VAL_LEN_MAX 1
74 #define WSS_MEAS_UNSUCCESS 0xFFFF
80 #define WSS_CHAR_FEAT_MANDATORY 0x7F
wss_feature_t
Weight Scale Feature characteristic bit values.
@ WSS_FEAT_HEIGHT_RES_1MM
Resolution of 0.001m or 0.1in.
@ WSS_UNIT_IMPERIAL
Weight in pounds and height in inches.
bool multi_user_present
Flag which indicates if multiple user is present.
uint16_t length
Length of event data.
Weight Scale Service Init variable.
wss_unit_t
WSS unit types.
Weight Scale Service event.
wss_evt_type_t
Weight Scale Service event type.
@ WSS_MEAS_FLAG_USER_ID_PRESENT
Flag bit for User ID Present.
@ WSS_MASS_RES_10G
Resolution of 0.01kg or 0.02lb.
@ WSS_FEAT_MASS_RES_5G
Resolution of 0.005kg or 0.01lb.
wss_height_res_t wss_height_res
Initial resolution of height value.
@ WSS_FEAT_MASS_RES_20G
Resolution of 0.02kg or 0.05lb.
wss_mass_res_t wss_mass_res
Initial resolution of mass value.
wss_unit_t wss_unit
Initial the unit system as SI or Imperial.
uint8_t user_id
User index.
prf_date_time_t time_stamp
Time stamp.
@ WSS_FEAT_BMI
BMI supported.
@ WSS_EVT_MEAS_INDICATION_ENABLE
Indicate that body composition measurement indication has been enabled.
@ WSS_MASS_RES_5G
Resolution of 0.005kg or 0.01lb.
@ WSS_HEIGHT_RES_10MM
Resolution of 0.01m or 1in.
@ WSS_EVT_MEAS_READ_CHARACTERISTIC
The peer reads the characteristic.
@ WSS_MASS_RES_200G
Resolution of 0.2kg or 0.5lb.
const uint8_t * p_data
Pointer to event data.
@ WSS_FEAT_MASS_RES_200G
Resolution of 0.2kg or 0.5lb.
@ WSS_EVT_MEAS_INDICATION_CPLT
Indicate that BC Measurement has been indicated.
@ WSS_MEAS_FLAG_DATE_TIME_PRESENT
Flag bit for Time Stamp Present.
@ WSS_HEIGHT_RES_1MM
Resolution of 0.001m or 0.1in.
uint16_t sdk_err_t
SDK API result type.
@ WSS_FEAT_MASS_RES_50G
Resolution of 0.05kg or 0.1lb.
uint8_t char_mask
Initial mask of Supported characteristics, and configured with Characteristics Mask.
@ WSS_MEAS_FLAG_UNIT_IMPERIAL
Flag bit for Imperial Measurement Units Present.
The date and time structure.
sdk_err_t wss_measurement_send(uint8_t conn_idx, wss_meas_val_t *p_meas, uint8_t cache_num)
Send Weight Scale Measurement indication.
@ WSS_EVT_MEAS_INDICATION_DISABLE
Indicate that body composition measurement indication has been disabled.
@ WSS_FEAT_MASS_RES_10G
Resolution of 0.01kg or 0.02lb.
@ WSS_HEIGHT_RES_5MM
Resolution of 0.005m or 0.5in.
uint32_t feature
Initial value for features.
wss_height_res_t
WSS Height Measurement resolutions.
wss_meas_flag_bits
Weight Scale Measurement Flags.
@ WSS_EVT_INVALID
Indicate that invalid event.
@ WSS_FEAT_MASS_RES_100G
Resolution of 0.1kg or 0.2lb.
@ WSS_MASS_RES_500G
Resolution of 0.5kg or 1lb.
@ WSS_FEAT_HEIGHT_RES_10MM
Resolution of 0.01m or 1in.
@ WSS_FEAT_HEIGHT_RES_5MM
Resolution of 0.005m or 0.5in.
bool time_stamp_present
Flag which indicates if time stamp is present.
@ WSS_MASS_RES_100G
Resolution of 0.1kg or 0.2lb.
@ WSS_FEAT_MASS_RES_500G
Resolution of 0.5kg or 1lb.
Profile/Service Utilities API.
@ WSS_MEAS_FLAG_BMI_HEIGHT_PRESENT
Flag bit for BMI and Height Present.
wss_evt_type_t evt_type
The WSS event type.
@ WSS_MASS_RES_20G
Resolution of 0.02kg or 0.05lb.
bool bmi_present
Flag which indicates if bmi is present.
@ WSS_MASS_RES_50G
Resolution of 0.05kg or 0.1lb.
wss_evt_handler_t evt_handler
Weight Scale Service event handler.
Weight Scale Measurement data.
sdk_err_t wss_service_init(wss_init_t *p_wss_init, uint16_t *p_bcs_start_handle)
Initialize a Weight Scale Service instance and add in the DB.
wss_mass_res_t
WSS Weight Measurement resolutions.
uint8_t conn_idx
The index of the connection.
@ WSS_FEAT_TIME_STAMP
Time Stamp supported.
@ WSS_MEAS_FLAG_UNIT_SI
Flag bit for SI Measurement Units Present.
@ WSS_UNIT_SI
Weight in kilograms and height in meters.
void(* wss_evt_handler_t)(wss_evt_t *p_evt)
Weight Scale Service event handler type.
@ WSS_FEAT_MULTI_USER
Multiple Users supported.