csi_fce.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright(C) 2021 Alibaba Communications Inc.
  4. * Author: David Li <liyong.li@alibaba-inc.com>
  5. */
  6. #ifndef _FCE_HAL_H_
  7. #define _FCE_HAL_H_
  8. #ifdef __cplusplus
  9. extern "C"{
  10. #endif
  11. #include "fce_cfg.h"
  12. enum FCE_EVENT {
  13. FCE_EVENT_COMPLETE = 0,
  14. FCE_EVENT_PAUSE,
  15. FCE_EVENT_BUSERR,
  16. FCE_EVENT_TIMEOUT,
  17. FCE_EVENT_UNDEFMSG,
  18. FCE_EVENT_SOCKERR,
  19. FCE_EVENT_OTHER
  20. };
  21. typedef void *csi_fce_handle_t;
  22. typedef void *csi_fce_sock_handle_t;
  23. int csi_fce_open(csi_fce_handle_t *fce_handle, char *name);
  24. int csi_fce_close(csi_fce_handle_t fce_handle);
  25. int csi_fce_query_result_cnt(csi_fce_handle_t fce_handle, unsigned int *cnt);
  26. int csi_fce_set_result_cnt(csi_fce_handle_t fce_handle, unsigned int *cnt);
  27. int csi_fce_set_attr(csi_fce_handle_t fce_handle, struct fce_cfg *cfg);
  28. int csi_fce_get_attr(csi_fce_handle_t fce_handle, struct fce_cfg *cfg);
  29. int csi_fce_do_compare(csi_fce_handle_t fce_handle, struct target_vector *target_vect);
  30. int csi_fce_get_result(csi_fce_handle_t fce_handle, struct top_result *top_buf);
  31. int csi_fce_suspend(csi_fce_handle_t fce_handle);
  32. int csi_fce_resume(csi_fce_handle_t fce_handle);
  33. unsigned long csi_fce_create_featurelib(csi_fce_handle_t fce_handle, unsigned int size);
  34. int csi_fce_release_featurelib(csi_fce_handle_t fce_handle, unsigned long offset);
  35. int csi_fce_config_init(struct fce_cfg *cfg);
  36. int csi_fce_check_result(struct top_result *res1, struct top_result *res2);
  37. int csi_fce_init_sock(csi_fce_sock_handle_t *sock_handle, unsigned long timeout_ms);
  38. int csi_fce_release_sock(csi_fce_sock_handle_t sock_handle);
  39. enum FCE_EVENT csi_fce_waitevent(csi_fce_sock_handle_t sock_handle);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif // #ifndef _FCE_HAL_H_