#ifndef __OSPDBGH__

#define __OSPDBGH__



#ifdef __cplusplus

extern "C" {

#endif
#include <signal.h>

#define MAX_DBGINFO_LEN     (SHELL_BUF_SIZE-64)


#define CMD_DEBUG_LEVEL     0
#define ERR_DEBUG_LEVEL     1
#define WARNING_DEBUG_LEVEL 2
#define RUN_DEBUG_LEVEL     3
#define DBG_DEBUG_LEVEL     4

#define DeadFuncNum         64

OSP_STATUS osp_debug_out(int32_t level, char *fmt,...);
OSP_STATUS osp_debug_out_with_time(int32_t level, char *fmt,...);
void osp_local_shell_out_main(Osp_Msg_Head *pMsg);
OSP_STATUS osp_print(char *pbuf, uint32_t len);
int32_t osp_local_shell_in_main();
void osp_debug_init(void);
void osp_show_msg_que_info();
int32_t osp_trace_task(uint32_t Id);
int32_t osp_suspend_task(uint32_t Id);
int32_t osp_resume_task(uint32_t Id);
int32_t sinal_init(void);
void SetTimerParAll(char*pa, uint32_t val);
Osp_Msg_Head *osp_alloc_msg_print_log(void);



#define OSP_TASK_SIGNAL_SUSPEND                            (SIGRTMIN + 1)
#define OSP_TASK_SIGNAL_RESUME                             (SIGRTMIN + 2)
#define OSP_TASK_SIGNAL_TRACE                              (SIGRTMIN + 3)
#define OSP_TASK_SIGNAL_RMSHELL                            (SIGINT) 
#define OSP_TASK_SIGNAL_SEGV                               (SIGSEGV) 
#define OSP_TASK_SIGNAL_BUSSERR                            (SIGBUS) 

void osp_debug_out_set_level(int32_t level);
int32_t osp_shell_dis_mem(int32_t num, uint64_t addr);
int32_t osp_shell_set_mem(int32_t val, uint64_t addr);
void osp_set_dbg_cmdlev(void);
void osp_set_dbg_errlev(void);
void osp_set_dbg_crunlev(void);
void osp_set_dbg_cwarlev(void);

int32_t osp_task_dbg_out_enable_all(void);
int32_t osp_task_dbg_out_enable(uint32_t taskid);
int32_t osp_task_dbg_out_disable_all(void);
int32_t osp_task_dbg_out_disable(uint32_t taskid);
int32_t osp_task_dbg_out2log_disable_all(void);
int32_t osp_task_dbg_out2log_disable(uint32_t taskid);
int32_t osp_task_dbg_out2log_enable_all(void);
int32_t osp_task_dbg_out2log_enable(uint32_t taskid);

void osp_assert(int32_t val);
int32_t osp_reg_dead_func(OSP_FUNCPTR pfunc);


#ifdef __cplusplus

}

#endif



#endif  /*__OSPDBGH__ */


