/***********************************************************
Copyright (C), LGC Wireless.
File Name:		isdn_debug.h
Description:	ISDN Debug
Version:		v9.1.0
Author:			Gengxin Chen
Create Date:	2008-5-27
History:
	<author>	<date>		<version>		<desc>
	
************************************************************/
#ifndef _ISDN_DEBUG_H
#define _ISDN_DEBUG_H

#include "isdn_rm.h"
#include "../../../pal/pal.h"
//#include "../../../debug/src/include/debug.h"

/*Color Set */
#define COL_WHITE   37
#define COL_RED     31
#define COL_YELLOW  33
#define COL_GREEN   32
#define COL_BLUE    34
#define COL_BROWN   35
#define COL_MEGEN   36
#define COL_GRAY    38
#define COL_HI_WHI  58
#define COL_HI_RED  39
#define COL_HI_YEL  52
#define COL_HI_GRE  51
#define COL_HI_BLU  53
#define COL_HI_BRO  54
#define COL_HI_MEG  55
#define COL_BLACK   30

#define COL_ESC   '\033'

typedef struct _isdn_msg_csta	//call statistics
{
	//receive and send
	u32				rv_setup;
	u32				sd_setup;
	u32				rv_setupAck;
	u32				sd_setupAck;
	u32				rv_callProc;
	u32				sd_callProc;
	u32				rv_alert;
	u32				sd_alert;
	u32				rv_conn;
	u32				sd_conn;
	u32				rv_connAck;
	u32				sd_connAck;
	u32				rv_disc;
	u32				sd_disc;
	u32				rv_rel;
	u32				sd_rel;
	u32				rv_relComp;
	u32				sd_relComp;
	//redirect
	u32				rd_setup;
	u32				rd_setupAck;
	u32				rd_callProc;
	u32				rd_alert;
	u32				rd_conn;
	u32				rd_connAck;
	u32				rd_disc;
	u32				rd_rel;
	u32				rd_relComp;
}ISDN_Msg_Csta;


int isdn_debug_init(void);
void isdn_debug_timer(void);
void isdn_log_err(u32 pid,const char *fmt, ...);
void isdn_trace_func(u32 pid,const char *fmt, ...);
void monitor_isdn_msg(u32 pid,u8 *head,IuaMsgStr *msg,u8 col);
void monitor_isdn_port(u32 call_ref,u32 port);
void isdn_msg_csta(u8 msgtype,u8 flag);

#endif
