srv_trace.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (C) 2019 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _SRV_TRACE_H_
  13. #define _SRV_TRACE_H_
  14. #include "osi_compiler.h"
  15. #include "osi_api.h"
  16. #include "srv_config.h"
  17. OSI_EXTERN_C_BEGIN
  18. /**
  19. * \brief options for fstrace
  20. */
  21. typedef enum
  22. {
  23. SRV_FSTRACE_OPT_AP_ENABLE = (1 << 0), ///< enable aplog
  24. SRV_FSTRACE_OPT_PRO_ENABLE = (1 << 1), ///< enable profile
  25. SRV_FSTRACE_OPT_BS_ENABLE = (1 << 2), ///< enable blue screen dump
  26. SRV_FSTRACE_OPT_CP_ENABLE = (1 << 3), ///< enable cplog
  27. SRV_FSTRACE_OPT_ZSP_ENABLE = (1 << 4), ///< enable zsplog
  28. SRV_FSTRACE_OPT_MOS_ENABLE = (1 << 5), ///< enable moslog
  29. } srvFstraceOptions_t;
  30. /**
  31. * \brief init bt trace output via ap
  32. */
  33. bool srvBtTraceInit(void);
  34. /**
  35. * \brief initialize file system trace output
  36. *
  37. * There is a separated thread for file system trace. Even there are multiple
  38. * trace data sources, all of them will be done in the same thread.
  39. *
  40. * \param option fstrace options, refer to \p srvFstraceOptions_t.
  41. * \return
  42. * - true on success
  43. * - false on fail, invalid parameters or out of memory
  44. */
  45. bool srvFstraceInit(unsigned option);
  46. void srv_fsTraceTimeStamp(void);
  47. #ifdef CONFIG_FS_UNET_LOG_ENABLE
  48. void srvFstrace_UnetLog_Init(unsigned option);
  49. void srvFstrace_UnetLog_SaveLogContext(uint8_t nSim, void *cxt);
  50. void srvFstrace_UnetLog_SentCPExceptionLogFile(void *param);
  51. typedef void (*srvFstrace_Send_Rsp_t)(void *pRsp);
  52. #endif
  53. OSI_EXTERN_C_END
  54. #endif