| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Functions
Sensor Data Simulator
BLE libraries

Functions for simulating sensor data. More...

## Data Structures
struct | sensorsim_cfg_t
| Triangular waveform sensor simulator configuration. More...
struct | sensorsim_state_t
| Triangular waveform sensor simulator state. More...

## Functions
void | sensorsim_init (sensorsim_state_t *p_state, const sensorsim_cfg_t *p_cfg)
| Function for initializing a triangular waveform sensor simulator. More...
uint32_t | sensorsim_measure (sensorsim_state_t *p_state, const sensorsim_cfg_t *p_cfg)
| Function for generating a simulated sensor measurement using a triangular waveform generator. More...
void | sensorsim_increment (sensorsim_state_t *p_state, const sensorsim_cfg_t *p_cfg)
| Function for incrementing a simulated sensor measurement value. More...
void | sensorsim_decrement (sensorsim_state_t *p_state, const sensorsim_cfg_t *p_cfg)
| Function for decrementing a simulated sensor measurement value. More...

## Detailed Description

Functions for simulating sensor data.

Currently only a triangular waveform simulator is implemented.

## Function Documentation

void sensorsim_decrement | ( | sensorsim_state_t * | p_state,
|  | const sensorsim_cfg_t * | p_cfg
| ) |  |

Function for decrementing a simulated sensor measurement value.

Parameters

  [in,out] | p_state | Current state of simulator.
  [in] | p_cfg | Simulator configuration.

Returns
  Simulator output.

void sensorsim_increment | ( | sensorsim_state_t * | p_state,
|  | const sensorsim_cfg_t * | p_cfg
| ) |  |

Function for incrementing a simulated sensor measurement value.

Parameters

  [in,out] | p_state | Current state of simulator.
  [in] | p_cfg | Simulator configuration.

Returns
  Simulator output.

void sensorsim_init | ( | sensorsim_state_t * | p_state,
|  | const sensorsim_cfg_t * | p_cfg
| ) |  |

Function for initializing a triangular waveform sensor simulator.

Parameters

  [out] | p_state | Current state of simulator.
  [in] | p_cfg | Simulator configuration.

uint32_t sensorsim_measure | ( | sensorsim_state_t * | p_state,
|  | const sensorsim_cfg_t * | p_cfg
| ) |  |

Function for generating a simulated sensor measurement using a triangular waveform generator.

Parameters

  [in,out] | p_state | Current state of simulator.
  [in] | p_cfg | Simulator configuration.

Returns
  Simulator output.