
/*
 *******************************************************************************
 *  Copyright (c) 2010-2022 VATICS(KNERON) Inc. All rights reserved.
 *
 *  +-----------------------------------------------------------------+
 *  | THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED |
 *  | AND COPIED IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF SUCH  |
 *  | A LICENSE AND WITH THE INCLUSION OF THE THIS COPY RIGHT NOTICE. |
 *  | THIS SOFTWARE OR ANY OTHER COPIES OF THIS SOFTWARE MAY NOT BE   |
 *  | PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. THE   |
 *  | OWNERSHIP AND TITLE OF THIS SOFTWARE IS NOT TRANSFERRED.        |
 *  |                                                                 |
 *  | THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT   |
 *  | ANY PRIOR NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY |
 *  | VATICS(KNERON) INC.                                             |
 *  +-----------------------------------------------------------------+
 *
 *******************************************************************************
 */

/**@addtogroup  APPLICATION_INIT
 * @{
 * @brief       Kneron application init
 * @copyright   Copyright (C) 2022 Kneron, Inc. All rights reserved.
 */
#ifndef KDP2_APP_INFERENCE_INIT_H
#define KDP2_APP_INFERENCE_INIT_H

#include "kp_struct.h"
#include <vmf/ssm_info.h>

typedef int (*callback_inf)(uint32_t, bool*, void*, unsigned char*, VMF_VSRC_SSM_OUTPUT_INFO_T*);
typedef int (*callback_recv)(uint32_t, bool*);

callback_inf app_hdr_send_inf_cb;
callback_recv app_hdr_recv_inf_cb;
/**
 * @brief       Add application layer initialization code
 *
 * @return      void
 */
void app_initialize(void);

/**
 * @brief Add application layer destory code
 */
void app_destroy(void);

/* header stamp configuration and dump result in host mode */
//configure application inference header
int app_header_send_inference(uint32_t buf_addr, bool *bl_run_next_inference, void* arg, unsigned char* image_buffer, VMF_VSRC_SSM_OUTPUT_INFO_T* vsrc_ssm_info);
//receive & dump application result
int app_header_recv_inference(uint32_t buf_addr, bool *bl_run_next_inference);
#endif  //KDP2_APP_INFERENCE_INIT_H
