Go to the documentation of this file.
61 #include "custom_config.h"
70 #define WSS_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
71 10 : CFG_MAX_CONNECTIONS)
72 #define WSS_MEAS_VAL_LEN_MAX 15
73 #define WSS_CACHE_MEAS_NUM_MAX 25
74 #define WSS_FEAT_VAL_LEN_MAX 1
75 #define WSS_MEAS_UNSUCCESS 0xFFFF
81 #define WSS_CHAR_FEAT_MANDATORY 0x3F
126 WSS_FEAT_FULL_BIT = 0x000001BF,
wss_feature_t
Weight Scale Feature characteristic bit values.
Definition: wss.h:106
@ WSS_FEAT_HEIGHT_RES_1MM
Resolution of 0.001m or 0.1in.
Definition: wss.h:124
@ WSS_UNIT_IMPERIAL
Weight in pounds and height in inches.
Definition: wss.h:153
uint16_t bmi
Bmi.
Definition: wss.h:177
bool multi_user_present
Flag which indicates if multiple user is present.
Definition: wss.h:212
wss_meas_flag_bits
Definition: wss.h:91
@ WSS_MEAS_FLAG_UNIT_IMPERIAL
Flag bit for Imperial Measurement Units Present.
Definition: wss.h:93
uint16_t length
Length of event data.
Definition: wss.h:187
Weight Scale Service Init variable.
Definition: wss.h:205
wss_unit_t
WSS unit types.
Definition: wss.h:151
Weight Scale Service event.
Definition: wss.h:183
wss_evt_type_t
Weight Scale Service event type.
Definition: wss.h:158
@ WSS_MEAS_FLAG_USER_ID_PRESENT
Flag bit for User ID Present.
Definition: wss.h:95
@ WSS_MASS_RES_10G
Resolution of 0.01kg or 0.02lb.
Definition: wss.h:137
uint16_t height
Height.
Definition: wss.h:178
@ WSS_FEAT_MASS_RES_5G
Resolution of 0.005kg or 0.01lb.
Definition: wss.h:119
wss_height_res_t wss_height_res
Initial resolution of height value.
Definition: wss.h:211
@ WSS_FEAT_MASS_RES_20G
Resolution of 0.02kg or 0.05lb.
Definition: wss.h:117
@ WSS_MEAS_FLAG_UNIT_SI
Flag bit for SI Measurement Units Present.
Definition: wss.h:92
wss_mass_res_t wss_mass_res
Initial resolution of mass value.
Definition: wss.h:210
wss_unit_t wss_unit
Initial the unit system as SI or Imperial.
Definition: wss.h:209
uint8_t user_id
User index.
Definition: wss.h:176
prf_date_time_t time_stamp
Time stamp.
Definition: wss.h:175
@ WSS_FEAT_BMI
BMI supported.
Definition: wss.h:110
@ WSS_EVT_MEAS_INDICATION_ENABLE
Indicate that body composition measurement indication has been enabled.
Definition: wss.h:160
@ WSS_MASS_RES_5G
Resolution of 0.005kg or 0.01lb.
Definition: wss.h:138
@ WSS_HEIGHT_RES_10MM
Resolution of 0.01m or 1in.
Definition: wss.h:144
sdk_err_t wss_service_init(wss_init_t *p_wss_init)
Initialize a Weight Scale Service instance and add in the DB.
@ WSS_EVT_MEAS_READ_CHARACTERISTIC
The peer reads the characteristic.
Definition: wss.h:163
@ WSS_MASS_RES_200G
Resolution of 0.2kg or 0.5lb.
Definition: wss.h:133
const uint8_t * p_data
Pointer to event data.
Definition: wss.h:186
@ WSS_FEAT_MASS_RES_200G
Resolution of 0.2kg or 0.5lb.
Definition: wss.h:114
@ WSS_EVT_MEAS_INDICATION_CPLT
Indicate that BC Measurement has been indicated.
Definition: wss.h:162
@ WSS_HEIGHT_RES_1MM
Resolution of 0.001m or 0.1in.
Definition: wss.h:146
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
@ WSS_FEAT_MASS_RES_50G
Resolution of 0.05kg or 0.1lb.
Definition: wss.h:116
uint8_t char_mask
Initial mask of Supported characteristics, and configured with Characteristics Mask.
Definition: wss.h:208
The date and time structure.
Definition: ble_prf_types.h:101
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.
Definition: wss.h:161
@ WSS_FEAT_MASS_RES_10G
Resolution of 0.01kg or 0.02lb.
Definition: wss.h:118
@ WSS_MEAS_FLAG_DATE_TIME_PRESENT
Flag bit for Time Stamp Present.
Definition: wss.h:94
@ WSS_HEIGHT_RES_5MM
Resolution of 0.005m or 0.5in.
Definition: wss.h:145
uint32_t feature
Initial value for features.
Definition: wss.h:207
wss_height_res_t
WSS Height Measurement resolutions.
Definition: wss.h:143
@ WSS_EVT_INVALID
Indicate that invalid event.
Definition: wss.h:159
@ WSS_FEAT_MASS_RES_100G
Resolution of 0.1kg or 0.2lb.
Definition: wss.h:115
@ WSS_MASS_RES_500G
Resolution of 0.5kg or 1lb.
Definition: wss.h:132
@ WSS_FEAT_HEIGHT_RES_10MM
Resolution of 0.01m or 1in.
Definition: wss.h:122
@ WSS_FEAT_HEIGHT_RES_5MM
Resolution of 0.005m or 0.5in.
Definition: wss.h:123
bool time_stamp_present
Flag which indicates if time stamp is present.
Definition: wss.h:213
@ WSS_MASS_RES_100G
Resolution of 0.1kg or 0.2lb.
Definition: wss.h:134
@ WSS_FEAT_MASS_RES_500G
Resolution of 0.5kg or 1lb.
Definition: wss.h:113
Profile/Service Utilities API.
wss_evt_type_t evt_type
The WSS event type.
Definition: wss.h:184
@ WSS_MASS_RES_20G
Resolution of 0.02kg or 0.05lb.
Definition: wss.h:136
bool bmi_present
Flag which indicates if bmi is present.
Definition: wss.h:214
uint16_t weight
Weight.
Definition: wss.h:174
@ WSS_MASS_RES_50G
Resolution of 0.05kg or 0.1lb.
Definition: wss.h:135
wss_evt_handler_t evt_handler
Weight Scale Service event handler.
Definition: wss.h:206
Weight Scale Measurement data.
Definition: wss.h:173
@ WSS_MEAS_FLAG_BMI_HEIGHT_PRESENT
Flag bit for BMI and Height Present.
Definition: wss.h:96
wss_mass_res_t
WSS Weight Measurement resolutions.
Definition: wss.h:131
uint8_t conn_idx
The index of the connection.
Definition: wss.h:185
@ WSS_FEAT_TIME_STAMP
Time Stamp supported.
Definition: wss.h:108
@ WSS_UNIT_SI
Weight in kilograms and height in meters.
Definition: wss.h:152
void(* wss_evt_handler_t)(wss_evt_t *p_evt)
Weight Scale Service event handler type.
Definition: wss.h:196
@ WSS_FEAT_MULTI_USER
Multiple Users supported.
Definition: wss.h:109