Updated: October 28, 2024 |
List of functions which external algorithm libraries must implement
#include <adas/adas_external_algo.h>
typedef struct adas_ext_algorithm { adas_fusion_algo_probe_t probe; adas_fusion_algo_open_t open; adas_fusion_algo_process_sensor_buffer_t process_sensor_buffer; adas_fusion_algo_close_t close; } adas_ext_algorithm_t;
For the list of arguments to implement in the function, see adas_fusion_algo_probe_t.
The handle returned by the algorithm to this function is passed to process_sensor_buffer() and close() to identify the instance of the algorithm of interest. For the list of arguments to implement in the function, see adas_fusion_algo_open_t.
For the list of arguments to implement in the function, see adas_fusion_algo_process_sensor_buffer_t.
The algorithm library should do proper cleanup of any memory associated with this instance. For the list of arguments to implement in the function, see adas_fusion_algo_close_t.
The library for the external algorithm must create an instance of this structure that is named adas_ext_algorithm_defs or adas_ext_algorithm_defs_[tag], where tag is a character string of your choice.
If only one custom algorithm driver is needed, we recommend not using a tag. If multiple algorithm implementations are desired in the same library, a different tag should be used for each one. The ADAS library will use this definition to interface with the algorithm. The tag to use must be specified in the ADAS configuration file.
adas_ext_algorithm_t adas_ext_algorithm_defs = { .probe = algorithm_probe, .open = algorithm_open, .process_sensor_buffer = algorithm_process_sensor_buffer, .close = algorithm_close };
adas_ext_algorithm_t adas_ext_algorithm_defs_algorithm1 = { .probe = algorithm1_probe, ... }; adas_ext_algorithm_t adas_ext_algorithm_defs_algorithm2 = { .probe = algorithm2_probe, ... };