Updated: October 28, 2024 |
Functions that an external sensor library must implement
#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;
For more information, see open_external_sensor_func_t.
For more information, see close_external_sensor_func_t.
For more information, see init_sensor_func_t.
For more information, see deinit_sensor_func_t.
For more information, see start_streaming_func_t.
For more information, see stop_streaming_func_t.
For more information, see get_packet_func_t.
For more information, see get_buffer_requirements_func_t.
For more information, see get_time_func_t.
For more information, see parse_config_func_t.
For more information, see set_sensor_metadata_func_t.
For more information, see get_metadata_limits_func_t.
For more information, see fill_format_info_func_t.
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.