ANT BSC simulator module. More...
Data Structures | |
struct | ant_bsc_simulator_cfg_t |
BSC simulator configuration structure. More... | |
struct | ant_bsc_simulator_t |
BSC simulator structure. More... | |
Functions | |
void | ant_bsc_simulator_init (ant_bsc_simulator_t *p_simulator, ant_bsc_simulator_cfg_t const *p_config, bool auto_change) |
Function for initializing the ANT BSC simulator instance. More... | |
void | ant_bsc_simulator_one_iteration (ant_bsc_simulator_t *p_simulator) |
Function for simulating a device event. More... | |
void | ant_bsc_simulator_increment (ant_bsc_simulator_t *p_simulator) |
Function for incrementing the cadence value. More... | |
void | ant_bsc_simulator_decrement (ant_bsc_simulator_t *p_simulator) |
Function for decrementing the cadence value. More... | |
ANT BSC simulator module.
This module simulates a pulse for the ANT Bicycle Speed and Cadence profile. The module calculates abstract values, which are handled by the BSC pages data model to ensure that they are compatible. It provides a handler for changing the cadence and speed values manually as well as functionality to change the values automatically.
void ant_bsc_simulator_decrement | ( | ant_bsc_simulator_t * | p_simulator | ) |
Function for decrementing the cadence value.
[in] | p_simulator | Pointer to the simulator instance. |
void ant_bsc_simulator_increment | ( | ant_bsc_simulator_t * | p_simulator | ) |
Function for incrementing the cadence value.
[in] | p_simulator | Pointer to the simulator instance. |
void ant_bsc_simulator_init | ( | ant_bsc_simulator_t * | p_simulator, |
ant_bsc_simulator_cfg_t const * | p_config, | ||
bool | auto_change | ||
) |
Function for initializing the ANT BSC simulator instance.
[in] | p_simulator | Pointer to the simulator instance. |
[in] | p_config | Pointer to the simulator configuration structure. |
[in] | auto_change | Enable or disable automatic changes of speed or cadence. |
void ant_bsc_simulator_one_iteration | ( | ant_bsc_simulator_t * | p_simulator | ) |
Function for simulating a device event.
Based on this event, the transmitter data is simulated.
This function should be called in the BSC Sensor event handler.