Processing

Module to interpret and process data read from sensor. More...

Data Structures

struct  acc_processing_metadata_t
 Metadata that will be populated by the processing module during creation. More...
 
struct  acc_processing_result_t
 Result provided by the processing module. More...
 

Typedefs

typedef struct acc_processing_handle acc_processing_t
 

Functions

acc_processing_tacc_processing_create (const acc_config_t *config, acc_processing_metadata_t *processing_metadata)
 Create a processing instance with the provided configuration. More...
 
void acc_processing_execute (acc_processing_t *handle, void *buffer, acc_processing_result_t *result)
 Process the data according to the configuration used in create. More...
 
void acc_processing_destroy (acc_processing_t *handle)
 Destroy a processing instance identified with the provided processing handle. More...
 
float acc_processing_points_to_meter (int32_t points)
 Convert a distance or step length in points to meter. More...
 
int32_t acc_processing_meter_to_points (float length)
 Convert a distance or step length in meter to points. More...
 

Detailed Description

Module to interpret and process data read from sensor.

Typedef Documentation

◆ acc_processing_t

typedef struct acc_processing_handle acc_processing_t

Definition at line 30 of file acc_processing.h.

Function Documentation

◆ acc_processing_create()

acc_processing_t* acc_processing_create ( const acc_config_t config,
acc_processing_metadata_t processing_metadata 
)

Create a processing instance with the provided configuration.

Parameters
[in]configThe configuration to create a processing instance with
[out]processing_metadataThe metadata of the created processing instance
Returns
Processing handle, NULL if processing instance was not possible to create
Examples
acc_control_helper.c, example_service.c, example_service_low_power_sensor_disable.c, example_service_low_power_sensor_hibernate.c, example_service_multiple_configurations.c, example_service_sensor_disable.c, example_service_sensor_hibernate.c, example_service_sensor_off.c, and example_service_subsweeps.c.

◆ acc_processing_destroy()

void acc_processing_destroy ( acc_processing_t handle)

Destroy a processing instance identified with the provided processing handle.

Parameters
[in]handleA reference to the processing handle to destroy, can be NULL
Examples
acc_control_helper.c, example_service.c, example_service_low_power_sensor_disable.c, example_service_low_power_sensor_hibernate.c, example_service_multiple_configurations.c, example_service_sensor_disable.c, example_service_sensor_hibernate.c, example_service_sensor_off.c, and example_service_subsweeps.c.

◆ acc_processing_execute()

void acc_processing_execute ( acc_processing_t handle,
void *  buffer,
acc_processing_result_t result 
)

Process the data according to the configuration used in create.

Parameters
[in]handleA reference to the processing handle
[in]bufferA reference to the buffer (populated by acc_sensor_read) containing the data to be processed.
[out]resultProcessing result
Examples
acc_control_helper.c, example_service.c, example_service_low_power_sensor_disable.c, example_service_low_power_sensor_hibernate.c, example_service_multiple_configurations.c, example_service_sensor_disable.c, example_service_sensor_hibernate.c, example_service_sensor_off.c, and example_service_subsweeps.c.

◆ acc_processing_meter_to_points()

int32_t acc_processing_meter_to_points ( float  length)

Convert a distance or step length in meter to points.

Does not include any zero-point offset since it is highly integration dependant. In other words, calling this function with a 0.0 always returns 0.

Parameters
[in]lengthLength in meter to convert to points
Returns
The corresponding length in points

◆ acc_processing_points_to_meter()

float acc_processing_points_to_meter ( int32_t  points)

Convert a distance or step length in points to meter.

Does not include any zero-point offset since it is highly integration dependant. In other words, calling this function with a 0 always returns 0.0.

Parameters
[in]pointsNumber of points to convert to meter
Returns
The corresponding length in meters
Examples
example_detector_distance_with_iq_data_print.c, and example_processing_peak_interpolation.c.