#ifndef ACC_DETECTOR_PRESENCE_PROCESSING_H_
#define ACC_DETECTOR_PRESENCE_PROCESSING_H_
#include <stdbool.h>
#include <stdint.h>
#include "acc_config.h"
#include "acc_definitions_common.h"
struct acc_detector_presence_processing_handle;
typedef struct acc_detector_presence_processing_handle acc_detector_presence_processing_handle_t;
struct acc_detector_presence_processing_config;
typedef struct acc_detector_presence_processing_config acc_detector_presence_processing_config_t;
typedef struct
{
bool presence_detected;
float intra_presence_score;
float inter_presence_score;
float presence_distance;
float *depthwise_intra_presence_scores;
float *depthwise_inter_presence_scores;
uint32_t depthwise_presence_scores_length;
} acc_detector_presence_processing_result_t;
uint32_t acc_detector_presence_processing_get_buffer_size(const acc_config_t *sensor_config);
acc_detector_presence_processing_config_t *acc_detector_presence_processing_config_create(void);
void acc_detector_presence_processing_config_destroy(acc_detector_presence_processing_config_t *processor_config);
acc_detector_presence_processing_handle_t *acc_detector_presence_processing_create(const acc_detector_presence_processing_config_t *processing_config,
const acc_config_t *sensor_config);
void acc_detector_presence_processing_destroy(acc_detector_presence_processing_handle_t *processing_handle);
bool acc_detector_presence_processing_reset(acc_detector_presence_processing_handle_t *processing_handle);
bool acc_detector_presence_processing_process(acc_detector_presence_processing_handle_t *processing_handle,
void *buffer,
const acc_int16_complex_t *frame,
acc_detector_presence_processing_result_t *presence_result);
void acc_detector_presence_processing_config_frame_rate_set(acc_detector_presence_processing_config_t *processing_config, float frame_rate);
float acc_detector_presence_processing_config_frame_rate_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_inter_frame_presence_timeout_set(acc_detector_presence_processing_config_t *processing_config,
uint16_t inter_frame_presence_timeout);
uint16_t acc_detector_presence_processing_config_inter_frame_presence_timeout_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_intra_detection_set(acc_detector_presence_processing_config_t *processing_config, bool enable);
bool acc_detector_presence_processing_config_intra_detection_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_intra_detection_threshold_set(acc_detector_presence_processing_config_t *processing_config,
float intra_detection_threshold);
float acc_detector_presence_processing_config_intra_detection_threshold_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_inter_detection_set(acc_detector_presence_processing_config_t *processing_config, bool enable);
bool acc_detector_presence_processing_config_inter_detection_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_inter_detection_threshold_set(acc_detector_presence_processing_config_t *processing_config,
float inter_detection_threshold);
float acc_detector_presence_processing_config_inter_detection_threshold_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_inter_frame_deviation_time_const_set(acc_detector_presence_processing_config_t *processing_config,
float inter_frame_deviation_time_const);
float acc_detector_presence_processing_config_inter_frame_deviation_time_const_get(
const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_inter_frame_fast_cutoff_set(acc_detector_presence_processing_config_t *processing_config,
float inter_frame_fast_cutoff);
float acc_detector_presence_processing_config_inter_frame_fast_cutoff_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_inter_frame_slow_cutoff_set(acc_detector_presence_processing_config_t *processing_config,
float inter_frame_slow_cutoff);
float acc_detector_presence_processing_config_inter_frame_slow_cutoff_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_intra_frame_time_const_set(acc_detector_presence_processing_config_t *processing_config,
float intra_frame_time_const);
float acc_detector_presence_processing_config_intra_frame_time_const_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_intra_output_time_const_set(acc_detector_presence_processing_config_t *processing_config,
float intra_output_time_const);
float acc_detector_presence_processing_config_intra_output_time_const_get(const acc_detector_presence_processing_config_t *processing_config);
void acc_detector_presence_processing_config_inter_output_time_const_set(acc_detector_presence_processing_config_t *processing_config,
float inter_output_time_const);
float acc_detector_presence_processing_config_inter_output_time_const_get(const acc_detector_presence_processing_config_t *processing_config);
#endif