Sensors that aren't already supported by the QNX Platform for ADAS can be provided by an external sensor driver library.
You may provide a library that supports an external sensor. To use an external sensor driver library, you must:
Optionally, you can provide implementations for these functions:
For more information about the specifics to implement, see external_sensor_api.h in Sensor Library Reference for each of the functions.sensor_external_sensor_t external_sensor_defs = { open: my_external_open_sensor close: my_external_close_sensor init: my_external_init_sensor deinit: my_external_deinit_sensor start_streaming: my_start_streaming_sensor stop_streaming: my_stop_streaming_sensor get_packet: my_get_packet get_buffer_requirements: my_get_buffer_requirements get_time: NULL parse_config: my_parse_config set_sensor_metadata: NULL get_metadata_limits: NULL fill_format_info: my_fill_format };
An example of an external sensor driver implementation is available with the QNX Platform for ADAS from the QNX Software Center. See the source directory for more information in your host installation at $QNX_BASE/source/adas-sensor-examples-version.zip. After you extract the ZIP file, you'll find the example at extraction_directory/source_package_adas_sensor/lib/sensor_drivers/external_sensor_example.