ANT HRM simulator

nRF5 SDK v17.1.0

ANT HRM simulator module. More...

Data Structures

struct ant_hrm_simulator_cfg_t
HRM simulator configuration structure. More...
struct ant_hrm_simulator_t
HRM simulator structure. More...
struct ant_hrm_simulator_cb_t
HRM simulator control block structure. More...

Macros

#define DEFAULT_ANT_HRM_SIMULATOR_CFG (P_PROFILE, MIN_HEART_RATE, MAX_HEART_RATE, INCREMENT)
Initialize ant_hrm_simulator_cfg_t . More...

Functions

void ant_hrm_simulator_init ( ant_hrm_simulator_t *p_simulator, ant_hrm_simulator_cfg_t const *p_config, bool auto_change)
Function for initializing the ANT HRM simulator instance. More...
void ant_hrm_simulator_one_iteration ( ant_hrm_simulator_t *p_simulator)
Function for simulating a device event. More...
void ant_hrm_simulator_increment ( ant_hrm_simulator_t *p_simulator)
Function for incrementing the cadence value. More...
void ant_hrm_simulator_decrement ( ant_hrm_simulator_t *p_simulator)
Function for decrementing the cadence value. More...

Detailed Description

ANT HRM simulator module.

This module simulates a pulse for the ANT HRM profile. The module calculates abstract values, which are handled by the HRM pages data model to ensure that they are compatible. It provides a handler for changing the heart rate value manually and functionality to change the heart rate value automatically.

Macro Definition Documentation

#define DEFAULT_ANT_HRM_SIMULATOR_CFG ( P_PROFILE,
MIN_HEART_RATE,
MAX_HEART_RATE,
INCREMENT
)
Value:
{ \
.p_profile = (P_PROFILE), \
.sensorsim_cfg.min = (MIN_HEART_RATE), \
.sensorsim_cfg.max = (MAX_HEART_RATE), \
.sensorsim_cfg.incr = (INCREMENT), \
.sensorsim_cfg.start_at_max = false , \
}

Initialize ant_hrm_simulator_cfg_t .

Function Documentation

void ant_hrm_simulator_decrement ( ant_hrm_simulator_t * p_simulator )

Function for decrementing the cadence value.

Parameters
[in] p_simulator Pointer to the simulator instance.
void ant_hrm_simulator_increment ( ant_hrm_simulator_t * p_simulator )

Function for incrementing the cadence value.

Parameters
[in] p_simulator Pointer to the simulator instance.
void ant_hrm_simulator_init ( ant_hrm_simulator_t * p_simulator ,
ant_hrm_simulator_cfg_t const * p_config ,
bool auto_change
)

Function for initializing the ANT HRM simulator instance.

Parameters
[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 the cadence.
void ant_hrm_simulator_one_iteration ( ant_hrm_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 HRM TX event handler.