nRF5 SDK v17.1.0
Data Structures | Macros | Functions
ANT SDM simulator

ANT SDM simulator module. More...

Data Structures

struct  ant_sdm_simulator_cfg_t
 SDM simulator configuration structure. More...
 
struct  ant_sdm_simulator_t
 SDM simulator structure. More...
 
struct  ant_sdm_simulator_cb_t
 SDM simulator control block structure. More...
 

Macros

#define DEFAULT_ANT_SDM_SIMULATOR_CFG(P_PROFILE,STRIDE_LEN,BURN_RATE,MIN_CADENCE,MAX_CADENCE,INCREMENT)
 Initialize ant_sdm_simulator_cfg_t. More...
 

Functions

void ant_sdm_simulator_init (ant_sdm_simulator_t *p_simulator, ant_sdm_simulator_cfg_t const *p_config, bool auto_change)
 Function for initializing the ANT SDM simulator instance. More...
 
void ant_sdm_simulator_one_iteration (ant_sdm_simulator_t *p_simulator)
 Function for simulating a device event. More...
 
void ant_sdm_simulator_increment (ant_sdm_simulator_t *p_simulator)
 Function for incrementing the cadence value. More...
 
void ant_sdm_simulator_decrement (ant_sdm_simulator_t *p_simulator)
 Function for decrementing the cadence value. More...
 

Detailed Description

ANT SDM simulator module.

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

Macro Definition Documentation

#define DEFAULT_ANT_SDM_SIMULATOR_CFG (   P_PROFILE,
  STRIDE_LEN,
  BURN_RATE,
  MIN_CADENCE,
  MAX_CADENCE,
  INCREMENT 
)
Value:
{ \
.p_profile = (P_PROFILE), \
.stride_length = (STRIDE_LEN), \
.burn_rate = (BURN_RATE), \
.sensorsim_cfg.min = (MIN_CADENCE) *(ANT_SDM_CADENCE_UNIT_REVERSAL), \
.sensorsim_cfg.max = (MAX_CADENCE) *(ANT_SDM_CADENCE_UNIT_REVERSAL), \
.sensorsim_cfg.incr = (INCREMENT) *(ANT_SDM_CADENCE_UNIT_REVERSAL), \
.sensorsim_cfg.start_at_max = false, \
}

Initialize ant_sdm_simulator_cfg_t.

Function Documentation

void ant_sdm_simulator_decrement ( ant_sdm_simulator_t p_simulator)

Function for decrementing the cadence value.

Parameters
[in]p_simulatorPointer to the simulator instance.
void ant_sdm_simulator_increment ( ant_sdm_simulator_t p_simulator)

Function for incrementing the cadence value.

Parameters
[in]p_simulatorPointer to the simulator instance.
void ant_sdm_simulator_init ( ant_sdm_simulator_t p_simulator,
ant_sdm_simulator_cfg_t const *  p_config,
bool  auto_change 
)

Function for initializing the ANT SDM simulator instance.

Parameters
[in]p_simulatorPointer to the simulator instance.
[in]p_configPointer to the simulator configuration structure.
[in]auto_changeEnable or disable automatic changes of the cadence.
void ant_sdm_simulator_one_iteration ( ant_sdm_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 SDM TX event handler.


Documentation feedback | Developer Zone | Subscribe | Updated