![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This service exposes training-related data in the sports and fitness environment, which allows a Server (e.g., a fitness machine) to send training-related data to a Client. More...
This service exposes training-related data in the sports and fitness environment, which allows a Server (e.g., a fitness machine) to send training-related data to a Client.
Data Structures | |
| struct | st_ble_ftms_evt_data_t |
| Fitness Machine Service event data. More... | |
| struct | st_ble_ftms_init_param_t |
| Fitness Machine Service initialization parameters. More... | |
| struct | st_ble_ftms_connect_param_t |
| Fitness Machine Service connection parameters. More... | |
| struct | st_ble_ftms_disconnect_param_t |
| Fitness Machine Service disconnection parameters. More... | |
| struct | st_ble_ftms_fitness_machine_feature_t |
| Fitness Machine Feature characteristic parameters. More... | |
| struct | st_ble_ftms_treadmill_data_t |
| Treadmill Data characteristic parameters. More... | |
| struct | st_ble_ftms_cross_trainer_data_t |
| Cross Trainer Data characteristic parameters. More... | |
| struct | st_ble_ftms_step_climber_data_t |
| Step Climber Data characteristic parameters. More... | |
| struct | st_ble_ftms_stair_climber_data_t |
| Stair Climber Data characteristic parameters. More... | |
| struct | st_ble_ftms_rower_data_t |
| Rower Data characteristic parameters. More... | |
| struct | st_ble_ftms_indoor_bike_data_t |
| Indoor Bike Data characteristic parameters. More... | |
| struct | st_ble_ftms_training_status_t |
| Training Status characteristic parameters. More... | |
| struct | st_ble_ftms_supported_speed_range_t |
| Supported Speed Range characteristic parameters. More... | |
| struct | st_ble_ftms_supported_inclination_range_t |
| Supported Inclination Range characteristic parameters. More... | |
| struct | st_ble_ftms_supported_resistance_level_range_t |
| Supported Resistance Level Range characteristic parameters. More... | |
| struct | st_ble_ftms_supported_power_range_t |
| Supported Power Range characteristic parameters. More... | |
| struct | st_ble_ftms_supported_heart_rate_range_t |
| Supported Heart Rate Range characteristic parameters. More... | |
| struct | st_ble_ftms_fitness_machine_control_point_t |
| Fitness Machine Control Point characteristic parameters. More... | |
| struct | st_ble_ftms_fitness_machine_status_t |
| Fitness Machine Status characteristic parameters. More... | |
Macros | |
| #define | BLE_FTMS_TRAINING_STATUS_STRING_LEN (100) |
| Training Status String Length. More... | |
Typedefs | |
| typedef void(* | ble_ftms_app_cb_t) (uint16_t type, ble_status_t result, st_ble_ftms_evt_data_t *p_data) |
| Fitness Machine Service event callback. More... | |
Functions | |
| ble_status_t | R_BLE_FTMS_Init (const st_ble_ftms_init_param_t *p_param) |
| Initialize Fitness Machine Service. More... | |
| ble_status_t | R_BLE_FTMS_Connect (uint16_t conn_hdl, const st_ble_ftms_connect_param_t *p_param) |
| Perform Fitness Machine Service connection settings. More... | |
| ble_status_t | R_BLE_FTMS_Disconnect (uint16_t conn_hdl, st_ble_ftms_disconnect_param_t *p_param) |
| Retrieve Fitness Machine Service connection specific settings before disconnection. More... | |
| ble_status_t | R_BLE_FTMS_GetFitnessMachineFeature (st_ble_ftms_fitness_machine_feature_t *p_app_value) |
| Get Fitness Machine Feature characteristic value from local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_SetFitnessMachineFeature (const st_ble_ftms_fitness_machine_feature_t *p_app_value) |
| Set Fitness Machine Feature characteristic value to local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_NotifyTreadmillData (uint16_t conn_hdl, const st_ble_ftms_treadmill_data_t *p_app_value) |
| Send Treadmill Data notification. More... | |
| ble_status_t | R_BLE_FTMS_NotifyCrossTrainerData (uint16_t conn_hdl, const st_ble_ftms_cross_trainer_data_t *p_app_value) |
| Send Cross Trainer Data notification. More... | |
| ble_status_t | R_BLE_FTMS_NotifyStepClimberData (uint16_t conn_hdl, const st_ble_ftms_step_climber_data_t *p_app_value) |
| Send Step Climber Data notification. More... | |
| ble_status_t | R_BLE_FTMS_NotifyStairClimberData (uint16_t conn_hdl, const st_ble_ftms_stair_climber_data_t *p_app_value) |
| Send Stair Climber Data notification. More... | |
| ble_status_t | R_BLE_FTMS_NotifyRowerData (uint16_t conn_hdl, const st_ble_ftms_rower_data_t *p_app_value) |
| Send Rower Data notification. More... | |
| ble_status_t | R_BLE_FTMS_NotifyIndoorBikeData (uint16_t conn_hdl, const st_ble_ftms_indoor_bike_data_t *p_app_value) |
| Send Indoor Bike Data notification. More... | |
| ble_status_t | R_BLE_FTMS_GetTrainingStatus (st_ble_ftms_training_status_t *p_app_value) |
| Get Training Status characteristic value from local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_SetTrainingStatus (const st_ble_ftms_training_status_t *p_app_value) |
| Set Training Status characteristic value to local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_NotifyTrainingStatus (uint16_t conn_hdl, const st_ble_ftms_training_status_t *p_app_value) |
| Send Training Status notification. More... | |
| ble_status_t | R_BLE_FTMS_GetSupportedSpeedRange (st_ble_ftms_supported_speed_range_t *p_app_value) |
| Get Supported Speed Range characteristic value from local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_SetSupportedSpeedRange (const st_ble_ftms_supported_speed_range_t *p_app_value) |
| Set Supported Speed Range characteristic value to local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_GetSupportedInclinationRange (st_ble_ftms_supported_inclination_range_t *p_app_value) |
| Get Supported Inclination Range characteristic value from local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_SetSupportedInclinationRange (const st_ble_ftms_supported_inclination_range_t *p_app_value) |
| Set Supported Inclination Range characteristic value to local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_GetSupportedResistanceLevelRange (st_ble_ftms_supported_resistance_level_range_t *p_app_value) |
| Get Supported Resistance Level Range characteristic value from local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_SetSupportedResistanceLevelRange (const st_ble_ftms_supported_resistance_level_range_t *p_app_value) |
| Set Supported Resistance Level Range characteristic value to local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_GetSupportedPowerRange (st_ble_ftms_supported_power_range_t *p_app_value) |
| Get Supported Power Range characteristic value from local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_SetSupportedPowerRange (const st_ble_ftms_supported_power_range_t *p_app_value) |
| Set Supported Power Range characteristic value to local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_GetSupportedHeartRateRange (st_ble_ftms_supported_heart_rate_range_t *p_app_value) |
| Get Supported Heart Rate Range characteristic value from local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_SetSupportedHeartRateRange (const st_ble_ftms_supported_heart_rate_range_t *p_app_value) |
| Set Supported Heart Rate Range characteristic value to local GATT database. More... | |
| ble_status_t | R_BLE_FTMS_IndicateFitnessMachineControlPoint (uint16_t conn_hdl, const st_ble_ftms_fitness_machine_control_point_t *p_app_value) |
| Send Fitness Machine Control Point indication. More... | |
| ble_status_t | R_BLE_FTMS_NotifyFitnessMachineStatus (uint16_t conn_hdl, const st_ble_ftms_fitness_machine_status_t *p_app_value) |
| Send Fitness Machine Status notification. More... | |
| uint32_t | R_BLE_FTMS_GetVersion (void) |
| Return version of the FTMC service server. More... | |
| #define BLE_FTMS_TRAINING_STATUS_STRING_LEN (100) |
Training Status String Length.
| typedef void(* ble_ftms_app_cb_t) (uint16_t type, ble_status_t result, st_ble_ftms_evt_data_t *p_data) |
Fitness Machine Service event callback.
| enum e_ble_ftms_event_t |
Fitness Machine Service event type.
Training Status enumeration.
Op Code enumeration.
Control Information enumeration.
Control Parameter enumeration.
Result Code enumeration.
Op Code enumeration.
Control Information enumeration.
Spin Down Status enumeration.
| ble_status_t R_BLE_FTMS_Init | ( | const st_ble_ftms_init_param_t * | p_param | ) |
Initialize Fitness Machine Service.
This function shall be called once at startup.
| [in] | p_param | Pointer to Fitness Machine Service initialization parameters. |
| ble_status_t R_BLE_FTMS_Connect | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_connect_param_t * | p_param | ||
| ) |
Perform Fitness Machine Service connection settings.
This function shall be called on each connection establishment.
| [in] | conn_hdl | Connection handle. |
| [in] | p_param | Pointer to Connection parameters. |
| ble_status_t R_BLE_FTMS_Disconnect | ( | uint16_t | conn_hdl, |
| st_ble_ftms_disconnect_param_t * | p_param | ||
| ) |
Retrieve Fitness Machine Service connection specific settings before disconnection.
This function shall be called on each disconnection.
| [in] | conn_hdl | Connection handle. |
| [in] | p_param | Pointer to Disconnection parameters. |
| ble_status_t R_BLE_FTMS_GetFitnessMachineFeature | ( | st_ble_ftms_fitness_machine_feature_t * | p_app_value | ) |
Get Fitness Machine Feature characteristic value from local GATT database.
| [out] | p_app_value | Pointer to Fitness Machine Feature characteristic value. |
| ble_status_t R_BLE_FTMS_SetFitnessMachineFeature | ( | const st_ble_ftms_fitness_machine_feature_t * | p_app_value | ) |
Set Fitness Machine Feature characteristic value to local GATT database.
| [in] | p_app_value | Pointer to Fitness Machine Feature characteristic value to set. |
| ble_status_t R_BLE_FTMS_NotifyTreadmillData | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_treadmill_data_t * | p_app_value | ||
| ) |
Send Treadmill Data notification.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Pointer to Treadmill Data value to send. |
| ble_status_t R_BLE_FTMS_NotifyCrossTrainerData | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_cross_trainer_data_t * | p_app_value | ||
| ) |
Send Cross Trainer Data notification.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Pointer to Cross Trainer Data value to send. |
| ble_status_t R_BLE_FTMS_NotifyStepClimberData | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_step_climber_data_t * | p_app_value | ||
| ) |
Send Step Climber Data notification.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Pointer to Step Climber Data value to send. |
| ble_status_t R_BLE_FTMS_NotifyStairClimberData | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_stair_climber_data_t * | p_app_value | ||
| ) |
Send Stair Climber Data notification.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Pointer to Stair Climber Data value to send. |
| ble_status_t R_BLE_FTMS_NotifyRowerData | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_rower_data_t * | p_app_value | ||
| ) |
Send Rower Data notification.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Pointer to Rower Data value to send. |
| ble_status_t R_BLE_FTMS_NotifyIndoorBikeData | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_indoor_bike_data_t * | p_app_value | ||
| ) |
Send Indoor Bike Data notification.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Indoor Bike Data value to send. |
| ble_status_t R_BLE_FTMS_GetTrainingStatus | ( | st_ble_ftms_training_status_t * | p_app_value | ) |
Get Training Status characteristic value from local GATT database.
| [out] | p_app_value | Pointer to Retrieved Training Status characteristic value. |
| ble_status_t R_BLE_FTMS_SetTrainingStatus | ( | const st_ble_ftms_training_status_t * | p_app_value | ) |
Set Training Status characteristic value to local GATT database.
| [in] | p_app_value | Pointer to Training Status characteristic value to set. |
| ble_status_t R_BLE_FTMS_NotifyTrainingStatus | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_training_status_t * | p_app_value | ||
| ) |
Send Training Status notification.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Pointer to Training Status value to send. |
| ble_status_t R_BLE_FTMS_GetSupportedSpeedRange | ( | st_ble_ftms_supported_speed_range_t * | p_app_value | ) |
Get Supported Speed Range characteristic value from local GATT database.
| [out] | p_app_value | Pointer to Supported Speed Range characteristic value. |
| ble_status_t R_BLE_FTMS_SetSupportedSpeedRange | ( | const st_ble_ftms_supported_speed_range_t * | p_app_value | ) |
Set Supported Speed Range characteristic value to local GATT database.
| [in] | p_app_value | Pointer to Supported Speed Range characteristic value to set. |
| ble_status_t R_BLE_FTMS_GetSupportedInclinationRange | ( | st_ble_ftms_supported_inclination_range_t * | p_app_value | ) |
Get Supported Inclination Range characteristic value from local GATT database.
| [out] | p_app_value | Pointer to Supported Inclination Range characteristic value. |
| ble_status_t R_BLE_FTMS_SetSupportedInclinationRange | ( | const st_ble_ftms_supported_inclination_range_t * | p_app_value | ) |
Set Supported Inclination Range characteristic value to local GATT database.
| [in] | p_app_value | Pointer to Supported Inclination Range characteristic value to set. |
| ble_status_t R_BLE_FTMS_GetSupportedResistanceLevelRange | ( | st_ble_ftms_supported_resistance_level_range_t * | p_app_value | ) |
Get Supported Resistance Level Range characteristic value from local GATT database.
| [out] | p_app_value | Pointer to Supported Resistance Level Range characteristic value. |
| ble_status_t R_BLE_FTMS_SetSupportedResistanceLevelRange | ( | const st_ble_ftms_supported_resistance_level_range_t * | p_app_value | ) |
Set Supported Resistance Level Range characteristic value to local GATT database.
| [in] | p_app_value | Pointer to Supported Resistance Level Range characteristic value to set. |
| ble_status_t R_BLE_FTMS_GetSupportedPowerRange | ( | st_ble_ftms_supported_power_range_t * | p_app_value | ) |
Get Supported Power Range characteristic value from local GATT database.
| [out] | p_app_value | Pointer to Supported Power Range characteristic value. |
| ble_status_t R_BLE_FTMS_SetSupportedPowerRange | ( | const st_ble_ftms_supported_power_range_t * | p_app_value | ) |
Set Supported Power Range characteristic value to local GATT database.
| [in] | p_app_value | Pointer to Supported Power Range characteristic value to set. |
| ble_status_t R_BLE_FTMS_GetSupportedHeartRateRange | ( | st_ble_ftms_supported_heart_rate_range_t * | p_app_value | ) |
Get Supported Heart Rate Range characteristic value from local GATT database.
| [out] | p_app_value | Pointer to Supported Heart Rate Range characteristic value. |
| ble_status_t R_BLE_FTMS_SetSupportedHeartRateRange | ( | const st_ble_ftms_supported_heart_rate_range_t * | p_app_value | ) |
Set Supported Heart Rate Range characteristic value to local GATT database.
| [in] | p_app_value | Pointer to Supported Heart Rate Range characteristic value to set. |
| ble_status_t R_BLE_FTMS_IndicateFitnessMachineControlPoint | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_fitness_machine_control_point_t * | p_app_value | ||
| ) |
Send Fitness Machine Control Point indication.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Pointer to Fitness Machine Control Point value to send. |
| ble_status_t R_BLE_FTMS_NotifyFitnessMachineStatus | ( | uint16_t | conn_hdl, |
| const st_ble_ftms_fitness_machine_status_t * | p_app_value | ||
| ) |
Send Fitness Machine Status notification.
| [in] | conn_hdl | Connection handle. |
| [in] | p_app_value | Pointer to Fitness Machine Status value to send. |
| uint32_t R_BLE_FTMS_GetVersion | ( | void | ) |
Return version of the FTMC service server.