|
SmartSnippets DA1459x SDK
|
Weight scale service sample implementation API. More...
Files | |
| file | wss.h |
| Weight Scale Service sample implementation API. | |
Data Structures | |
| struct | wss_callbacks_t |
| WSS application callbacks. More... | |
| struct | wss_weight_measurement_t |
| WSS weight measurement data. More... | |
Enumerations | |
| enum | wss_unit_t { WSS_UNIT_SI, WSS_UNIT_IMPERIAL } |
| WSS unit types. More... | |
| enum | wss_feature_t { WSS_FEAT_TIME_STAMP_SUPPORTED = 0x0001, WSS_FEAT_MULTI_USER_SUPPORTED = 0x0002, WSS_FEAT_BMI_SUPPORTED = 0x0004, WSS_FEAT_WT_DISPLAY_500G_ACC = 0x0008, WSS_FEAT_WT_DISPLAY_200G_ACC = 0x0010, WSS_FEAT_WT_DISPLAY_100G_ACC = 0x0018, WSS_FEAT_WT_DISPLAY_50G_ACC = 0x0020, WSS_FEAT_WT_DISPLAY_20G_ACC = 0x0028, WSS_FEAT_WT_DISPLAY_10G_ACC = 0x0030, WSS_FEAT_WT_DISPLAY_5G_ACC = 0x0038, WSS_FEAT_HT_DISPLAY_10MM_ACC = 0x0080, WSS_FEAT_HT_DISPLAY_5MM_ACC = 0x0100, WSS_FEAT_HT_DISPLAY_1MM_ACC = 0x0180 } |
| Weight Feature characteristic bit values. More... | |
Functions | |
| ble_service_t * | wss_init (const ble_service_config_t *config, wss_feature_t features, const wss_callbacks_t *cb) |
| Register Weight Scale Service instance. More... | |
| ble_error_t | wss_indicate_weight (ble_service_t *svc, uint16_t conn_idx, const wss_weight_measurement_t *measurement) |
| Send weight indication to client. More... | |
| void | wss_indicate_weight_all (ble_service_t *svc, const wss_weight_measurement_t *measurement) |
| Send weight indication to all interested clients. More... | |
| bool | wss_is_indication_enabled (ble_service_t *svc, uint16_t conn_idx) |
| Check if indication is enabled. More... | |
Weight scale service sample implementation API.
| enum wss_feature_t |
Weight Feature characteristic bit values.
| enum wss_unit_t |
| ble_error_t wss_indicate_weight | ( | ble_service_t * | svc, |
| uint16_t | conn_idx, | ||
| const wss_weight_measurement_t * | measurement | ||
| ) |
Send weight indication to client.
Function sends indication to selected client.
| [in] | svc | service instance |
| [in] | conn_idx | connection index to sent indication to |
| [in] | measurement | characteristic value to send |
| void wss_indicate_weight_all | ( | ble_service_t * | svc, |
| const wss_weight_measurement_t * | measurement | ||
| ) |
Send weight indication to all interested clients.
| [in] | svc | service instance |
| [in] | measurement | characteristic value to send |
| ble_service_t* wss_init | ( | const ble_service_config_t * | config, |
| wss_feature_t | features, | ||
| const wss_callbacks_t * | cb | ||
| ) |
Register Weight Scale Service instance.
Function registers Weight Scale Service with give set of features.
| [in] | config | service configuration |
| [in] | features | bit mask of supported features |
| [in] | cb | application callbacks |
| bool wss_is_indication_enabled | ( | ble_service_t * | svc, |
| uint16_t | conn_idx | ||
| ) |
Check if indication is enabled.
| [in] | svc | service instance |
| [in] | conn_idx | connection index to sent indication to |
1.8.16