sensor_external_sensor_t

Updated: April 19, 2023

Functions that an external sensor library must implement

Synopsis:

#include <sensor/external_sensor_api.h>
typedef struct sensor_external_sensor_t {
    open_external_sensor_func_t open;
    close_external_sensor_func_t close;
    init_sensor_func_t init;
    deinit_sensor_func_t deinit;
    start_streaming_func_t start_streaming;
    stop_streaming_func_t stop_streaming;
    get_packet_func_t get_packet;
    get_buffer_requirements_func_t get_buffer_requirements;
    get_time_func_t get_time;
    parse_config_func_t parse_config;
    set_sensor_metadata_func_t set_sensor_metadata;
    get_metadata_limits_func_t get_metadata_limits;
    fill_format_info_func_t fill_format_info;
} sensor_external_sensor_t;

Data:

open_external_sensor_func_t open
A function pointer.

For more information, see open_external_sensor_func_t.

close_external_sensor_func_t close
A function pointer.

For more information, see close_external_sensor_func_t.

init_sensor_func_t init
A function pointer.

For more information, see init_sensor_func_t.

deinit_sensor_func_t deinit
A function pointer.

For more information, see deinit_sensor_func_t.

start_streaming_func_t start_streaming
A function pointer.

For more information, see start_streaming_func_t.

stop_streaming_func_t stop_streaming
A function pointer.

For more information, see stop_streaming_func_t.

get_packet_func_t get_packet
A function pointer.

For more information, see get_packet_func_t.

get_buffer_requirements_func_t get_buffer_requirements
A function pointer.

For more information, see get_buffer_requirements_func_t.

get_time_func_t get_time
A function pointer.

For more information, see get_time_func_t.

parse_config_func_t parse_config
A function pointer.

For more information, see parse_config_func_t.

set_sensor_metadata_func_t set_sensor_metadata
A function pointer.

For more information, see set_sensor_metadata_func_t.

get_metadata_limits_func_t get_metadata_limits
The function pointer.

For more information, see get_metadata_limits_func_t.

fill_format_info_func_t fill_format_info
A function pointer.

For more information, see fill_format_info_func_t.

Library:

libsensor

Description:

The external sensor library must define an instance of this structure named external_sensor_defs that the Sensor service will use to interface with the sensor driver.