//----------------------------------------------------
/**
	\file		ctk/inc/dbgmon.h
	\ingroup	debug
	\ingroup	all

	\brief		Ladici nastroj Debug Monitor
				<<< ALL >>>

	\author		ConTeK s.r.o., Ing. Vladimir Kastner
	\version	01.02
	\date		07.09.2007
*/
//----------------------------------------------------

#ifndef _DBGMON_H_
#define _DBGMON_H_

#include <libsets.h>
#include <ctktypes.h>
#include <uctp.h>
#include <hwmodel.h>

#ifdef DBGMON_SPRINTF

#include <stdio.h>

#endif // DBGMON_SPRINTF

#ifdef UCTP_DBG_TXT
#include <string.h>
#endif

#define	EXCEPTION_WND	15	//!< ladici okno DebugMonitoru pro vypis vyjimek

typedef struct
{
	volatile bool_t			flRunning;				//!< je inicializovano, po ininializaci na TRUE, pred ukoncenim FALSE
	CTPDESC *			Ctp;					//!< Ovladac seriove linky
	CTPBUFDESC			Buff;					//!< Implicitni vysilaci buffer
} DBGDESC;

typedef struct
{
	volatile bool_t			flReady;					//!< Prijata nova zprava = TRUE
	char_t				Text[UCTP_MAX_TEXT_SIZE];	//!< Buffer prijate zpravy
} DBKDESC;


extern DBGDESC gDbg;

#ifdef UCTP_DBG
 #ifdef UCTP_DBG_TXT
  #ifdef DBGMON_SPRINTF

//----------------------------------------------------
/**
	\brief	Zapis do daneho rolovaciho okna

	\param	SBuff	Vysilaci bufer
	\param	WNum	Cislo okna
	\param	WText	Text k vypsani
	\param	...		Formatovy retezec
*/
//----------------------------------------------------
void _DbbScr(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const char_t * const _cText, ...);

void _DbbScrWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const char_t * const _cText, ...);

#define DbbScr(_sBuff, _wNum, _cText, ...)				\
	do {												\
		static str_pconst_store(fmt, _cText);			\
		_DbbScr(_sBuff, _wNum, fmt, ##__VA_ARGS__);		\
	} while (0)

#define DbbScrWait(_sBuff, _wNum, _cText, ...)			\
	do {												\
		static str_pconst_store(fmt, _cText);			\
		_DbbScrWait(_sBuff, _wNum, fmt, ##__VA_ARGS__);	\
	} while (0)

#define DbgScr(_wNum, _cText, ...)						\
	do {												\
		static str_pconst_store(fmt, _cText);			\
		_DbbScr(&gDbg.Buff, _wNum, fmt, ##__VA_ARGS__);	\
	} while (0)

#define DbgScrWait( _wNum, _cText, ... )						\
	do {													\
		static str_pconst_store(fmt, _cText);				\
		_DbbScrWait(&gDbg.Buff, _wNum, fmt, ##__VA_ARGS__);	\
	} while (0)

  #else // DBGMON_SPRINTF

void _DbbScr(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const char_t * const _cText);

void _DbbScrWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const char_t * const _cText);

#define DbbScr(_sBuff, _wNum, _cText)			\
	do {										\
		static str_pconst_store(txt, _cText);	\
		_DbbScr(_sBuff, _wNum, txt);				\
	} while (0)

#define DbbScrWait(_sBuff, _wNum, _cText)		\
	do {										\
		static str_pconst_store(txt, _cText);	\
		_DbbScrWait(_sBuff, _wNum, txt);		\
	} while (0)

#define DbgScr(_wNum, _cText)					\
	do {										\
		static str_pconst_store(txt, _cText);	\
		_DbbScr(&gDbg.Buff, _wNum, txt);			\
	} while (0)

#define DbgScrWait(_wNum, _cText)				\
	do {										\
		static str_pconst_store(txt, _cText);	\
		_DbbScrWait(&gDbg.Buff, _wNum, txt); 	\
	} while (0)

  #endif // DBGMON_SPRINTF


//----------------------------------------------------
/**
	\brief	Zapis unsigned cisla do rolovaciho okna

	\param	SBuff	Vysilaci buffer
	\param	WNum	Cislo okna
	\param	Number	Cislo k vyslani
	\param	Width	Sirka vypisu
*/
//----------------------------------------------------
void DbbScrU(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint32_t _number,
		const uint8_t _width, const uint8_t _form);

void DbbScrUWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint32_t _number,
		const uint8_t _width, const uint8_t _form);

#define DbgScrU(_wNum, _number, _width, _form) \
		DbbScrU(&gDbg.Buff, _wNum, _number, _width, _form)

#define DbgScrUWait(_wNum, _number, _width, _form) \
		DbbScrUWait(&gDbg.Buff, _wNum, _number, _width, _form)

//----------------------------------------------------
/*
	\brief	Zapis signed cisla do rolovaciho okna

	\param	SBuff	Vysilaci bufferu
	\param	WNum	Cislo okna
	\param	Number	Cislo k vyslani
	\param	Width	Sirka vypisu
*/
//----------------------------------------------------

void DbbScrI(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const int32_t _number, const uint8_t _width);

void DbbScrIWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const int32_t _number, const uint8_t _width);

#define DbgScrI(_wNum, _number, _width) \
		DbbScrI(&gDbg.Buff, _wNum, _number, _width)

#define DbgScrIWait(_wNum, _number, _width) \
		DbbScrIWait(&gDbg.Buff, _wNum, _number, _width)


//----------------------------------------------------
/**
	\brief	Zapis float cisla do rolovaciho okna

	\param	SBuff	Vysilaci buffer
	\param	WNum	Cislo okna
	\param	Number	Cislo k vyslani
	\param	Width	Sirka vypisu
	\param	Prec	Pocet desetinych mist
*/
//----------------------------------------------------
void DbbScrF(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const float_t _number,
		const uint8_t _width, const uint8_t _prec);

void DbbScrFWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const float_t _number,
		const uint8_t _width, const uint8_t _prec);

#define DbgScrF(_sBuff, _wNum, _number, _width, _prec) \
		DbbScrF(&gDbg.Buff, _wNum, _number, _width, _prec)

#define DbgScrFWait(_sBuff, _wNum, _number, _width, _prec) \
		DbbScrFWait(&gDbg.Buff, _wNum, _number, _width, _prec)

//----------------------------------------------------
/**
	\brief	Zapis do daneho XY okna

	\param	WNum	Cislo okna
	\param	WX		Pozice X
	\param	WY		Pozice Y
	\param	WText	Text k vypsani
*/
//----------------------------------------------------
  #ifdef DBGMON_SPRINTF			// 	Je-li definovano -> pak	moznost formatovaci retezec

void _DbbXY(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const char_t * const _cText, ...);

void _DbbXYWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const char_t * const _cText, ...);

#define DbbXY(_sBuff, _wNum, _wX, _wY, _cText, ...) \
	do { \
		static str_pconst_store(fmt, _cText); \
		_DbbXY(_sBuff, _wNum, _wX, _wY, fmt, ##__VA_ARGS__); \
	} while(0)

#define DbbXYWait(_sBuff, _wNum, _wX, _wY, _cText, ...) \
	do { \
		static str_pconst_store(fmt, _cText); \
		_DbbXYWait(_sBuff, _wNum, _wX, _wY, fmt, ##__VA_ARGS__); \
	} while(0)

#define DbgXY(_wNum, _wX, _wY, _cText, ...) \
	do { \
		static str_pconst_store(fmt, _cText); \
		_DbbXY(&gDbg.Buff, _wNum, _wX, _wY, fmt, ##__VA_ARGS__); \
	} while(0)

#define DbgXYWait(_wNum, _wX, _wY, _cText, ...) \
	do { \
		static str_pconst_store(fmt, _cText); \
		_DbbXYWait(&gDbg.Buff, _wNum, _wX, _wY, fmt, ##__VA_ARGS__); \
	} while(0)

   #else // DBGMON_SPRINTF

void _DbbXY(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const char_t * const _wText);

void _DbbXYWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const char_t * const _wText);

#define DbbXY(_sBuff, _wNum, _wX, _wY, _cText) \
	do { \
		static str_pconst_store(txt, _cText); \
		DbbXY(_sBuff, _wNum, _wX, _wY, txt); \
	} while (0)

#define DbbXYWait(_sBuff, _wNum, _wX, _wY, _cText) \
	do { \
		static str_pconst_store(txt, _cText); \
		DbbXY(_sBuff, _wNum, _wX, _wY, txt); \
	} while (0)

#define DbgXY(_wNum, _wX, _wY, _cText) \
	do { \
		static str_pconst_store(txt, _cText); \
		DbbXY(&gDbg.Buff, _wNum, _wX, _wY, txt); \
	} while (0)

#define DbgXYWait(_wNum, _wX, _wY, _cText) \
	do { \
		static str_pconst_store(txt, _cText); \
		DbbXY(&gDbg.Buff, _wNum, _wX, _wY, txt); \
	} while (0)

   #endif // DBGMON_SPRINTF
 #endif // UCTP_DBG_TXT


//----------------------------------------------------
/**
	\brief	Zapis unsigned cisla do XY okna

	\param	SBuff	Vysilaci buffer
	\param	WNum	Cislo okna
	\param	WX		Pozice X
	\param	WY		Pozice Y
	\param	Number	Cislo k vyslani
	\param	Width	Sirka vypisu
*/
//----------------------------------------------------
void DbbXYU(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const uint32_t _number, const uint8_t _width, const uint8_t _form);

void DbbXYUWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const uint32_t _number, const uint8_t _width, const uint8_t _form);

#define DbgXYU(_wNum, _wX, _wY, _number, _width, _form) \
		DbbXYU(&gDbg.Buff, _wNum, _wX, _wY, _number, _width, _form)

#define DbgXYUWait(_wNum, _wX, _wY, _number, _width, _form) \
		DbbXYUWait(&gDbg.Buff, _wNum, _wX, _wY, _number, _width, _form)


//----------------------------------------------------
/**
	\brief	Zapis signed cisla do XY okna

	\param	SBuff	Vysilaci bufferu
	\param	WNum	Cislo okna
	\param	WX		Pozice X
	\param	WY		Pozice Y
	\param	Number	Cislo k vyslani
	\param	Width	Sirka vypisu
*/
//----------------------------------------------------
void DbbXYI(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const int32_t _number, const uint8_t _width);

void DbbXYIWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const int32_t _number, const uint8_t _width);

#define DbgXYI(_wNum, _wX, _wY, _number, _width) \
		DbbXYI(&gDbg.Buff, _wNum, _wX, _wY, _number, _width)

#define DbgXYIWait(_wNum, _wX, _wY, _number, _width) \
		DbbXYIWait(&gDbg.Buff, _wNum, _wX, _wY, _number, _width)


//----------------------------------------------------
/**
	\brief	Zapis float cisla do XY okna

	\param	SBuff	Vysilaci buffer
	\param	WNum	Cislo okna
	\param	WX		Pozice X
	\param	WY		Pozice Y
	\param	Number	Cislo k vyslani
	\param	Width	Sirka vypisu
	\param	Prec	Pocet desetinych mist
*/
//----------------------------------------------------
void DbbXYF(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const float_t _number, const uint8_t _width, const uint8_t _prec);

void DbbXYFWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wX, const uint8_t _wY,
		const float_t _number, const uint8_t _width, const uint8_t _prec);

#define DbgXYF(_sBuff, _wNum, _wX, _wY, _number, _width, _prec) \
		DbbXYF(&gDbg.Buff, _wNum, _wX, _wY, _number, _width, _prec)

#define DbgXYFWait(_sBuff, _wNum, _wX, _wY, _number, _width, _prec) \
		DbbXYFWait(&gDbg.Buff, _wNum, _wX, _wY, _number, _width, _prec)


 #ifdef UCTP_DBG_VID
//----------------------------------------------------
/**
	\brief	Zapis hlavicky video okna

	\param	WNum	Cislo okna
	\param	WFlg	Priznaky
	\param	WWidth	Sirka okna
	\param	WHeight	Vyska okna
	\param	MLen	Delka jedne zpravy
*/
//----------------------------------------------------
void DbbVidHdr(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wFlg,
		const uint16_t _wWidth, const uint16_t _wHeight, const uint16_t _mLen);

void DbbVidHdrWait(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _wFlg,
		const uint16_t _wWidth, const uint16_t _wHeight, const uint16_t _mLen);

#define DbgVidHdr(_wNum, _wFlg, _wWidth, _wHeight, _mLen) \
		DbbVidHdr(&gDbg.Buff, _wNum, _wFlg, _wWidth, _wHeight, _mLen)

#define DbgVidHdrWait(_wNum, _wFlg, _wWidth, _wHeight, _mLen) \
		DbbVidHdrWait(&gDbg.Buff, _wNum, _wFlg, _wWidth, _wHeight, _mLen)


//----------------------------------------------------
/**
	\brief	Zapis dat do video okna

	\param	WNum	Cislo okna
	\param	MNum	Cislo zpravy
	\param	MLen	Delka zpravy
	\param	WData	Data
*/
//----------------------------------------------------
void DbbVid(CTPBUFDESC * const _sBuff, const uint8_t _wNum, const uint8_t _mNum, const pktsize_t _mLen,
		const int8_t * const _wData);

void DbbVidWait(CTPBUFDESC * const sBuff, const uint8_t _wNum, const uint8_t _mNum, const pktsize_t _mLen,
		const int8_t * const _wData);

#define DbgVid(_wNum, _mNum, _mLen, _wData) \
		DbbVid(&gDbg.Buff, _wNum, _mNum, _mLen, _wData)

#define DbgVidWait(_wNum, _mNum, _mLen, _wData) \
		DbbVidWait(&gDbg.Buff, _wNum, _mNum, _mLen, _wData)
 #endif // UCTP_DBG_VID

//----------------------------------------------------
//!	\brief	Definice switche
//!

 #if defined(UCTP_DBG_TXT) && defined(DBGMON_SPRINTF)
#define DbgSwBegin \
	do { \
		static uint8_t lSCtrl = 0;			/** Ridici promena swhitche */ \
		static CTPBUFDESC lBuff;			/** Vysilaci buffer */ \
		char_t text[UCTP_MAX_TEXT_SIZE];	/** Docasna lokalni promena */ \
		if (BufDescReady(&lBuff.Desc)) \
		{ \
			switch (lSCtrl) \
			{
 #else
#define DbgSwBegin \
	do { \
		static uint8_t lSCtrl = 0;			/** Ridici promena swhitche */ \
		static CTPBUFDESC lBuff;			/** Vysilaci buffer */ \
		if (BufDescReady(&lBuff.Desc)) \
		{ \
			switch (lSCtrl) \
			{
 #endif // defined(UCTP_DBG_TXT) && defined(DBGMON_SPRINTF)

#define DbgSwEnd \
				default: \
					lSCtrl = 0; \
			}\
			lSCtrl++;						/** Ridici promena na dalsi stav */ \
		} \
	} while (FALSE)


 #ifdef UCTP_DBG_TXT
#define DbgSwScr(_nb, _wNum, _wText) \
				case _nb: \
					DbbScr(&lBuff, _wNum, _wText); \
					break

#define DbgSwXY(_nb, _wNum, _wX, _wY, _wText) \
				case _nb: \
					DbbXY(&lBuff, _wNum, _wX, _wY, _wText); \
					break
 #endif // UCTP_DBG_TXT

#define DbgSwScrU(_nb, _wNum, _number, _width) \
				case _nb: \
					DbbScrU(&lBuff, _wNum, _number, _width); \
					break

#define DbgSwXYU(_nb, _wNum, _wX, _wY, _number, _width) \
				case _nb: \
					DbbXYU(&lBuff, _wNum, _wX, _wY, _number, _width); \
					break

#define DbgSwScrI(_nb, _wNum, _number, _width) \
				case _nb: \
					DbbScrI(&lBuff, _wNum, _number, _width); \
					break

#define DbgSwXYI(_nb, _wNum, _wX, _wY, _number, _width) \
				case _nb: \
					DbbXYI(&lBuff, _wNum, _wX, _wY, _number, _width); \
					break

#define DbgSwScrF(_nb, _wNum, _number, _width) \
				case _nb: \
					DbbScrF(&lBuff, _wNum, _number, _width); \
					break

#define DbgSwXYF(_nb, _wNum, _wX, _wY, _number, _width, _prec) \
				case _nb: \
					DbbXYF(&lBuff, _wNum, _wX, _wY, _number, _width, _prec); \
					break

//----------------------------------------------------
/**
	\brief	Zapis pole unsigned cisel do rolovaciho okna

	\param	WNum		Cislo okna
	\param	ArrayType	Typ pole
	\param	Array		Adresa pole
	\param	Size		Velikost pole
	\param	Width		Sirka vypisu
*/
//----------------------------------------------------
#define DbgScrUArrayWait(_wNum, _arrayType, _array, _size, _width) \
	do { \
		_arrayType * data = (_arrayType *)(_array);		/** Ukazatel na pole */ \
		CTPBUFDESC buff;								/** Vysilaci buffer */ \
		for (uint32_t i = 0; i < (_size); i++) \
		{ \
			DbbScrUWait(&buff, (_wNum), *data++, (_width)); \
		} \
		while (!BufDescReady(buff)) ;			/** Cekani na pripravenost bufferu */ \
	} while (FALSE)


//----------------------------------------------------
/**
	\brief	Zapis pole signed cisel do rolovaciho okna

	\param	WNum		Cislo okna
	\param	ArrayType	Typ pole
	\param	Array		Adresa pole
	\param	Size		Velikost pole
	\param	Width		Sirka vypisu
*/
//----------------------------------------------------
#define DbgScrIArrayWait(_wNum, _arrayType, _array, _width) \
	do { \
		_arrayType * data = (_arrayType *)(_array);		/** Ukazatel na pole */ \
		CTPBUFDESC buff;							/** Vysilaci buffer */ \
		for (uint32_t i = 0; i < (_size); i++) \
		} \
			DbbScrIWait(&buff, (_wNum), *data++, (_width)); \
		} \
		while (!BufDescReady(buff)) ;			/** Cekani na pripravenost bufferu */ \
	} while (FALSE)


//-----------------------------------------------------
/**
	\brief	Zapis pole float cisel do rolovaciho okna

	\param	WNum		Cislo okna
	\param	ArrayType	Typ pole
	\param	Array		Adresa pole
	\param	Size		Velikost pole
	\param	Width		Sirka vypisu
	\param	Prec		Pocet desetinych mist
*/
//----------------------------------------------------
#define DbgScrFArrayWait(_wNum, _arrayType, _array, _width, _prec) \
	do { \
		_arrayType * data = (_arrayType *)(_array);		/** Ukazatel na pole */ \
		CTPBUFDESC buff;								/** Vysilaci buffer */ \
		for (uint32_t i = 0; i < (_size); i++) \
		} \
			DbbScrFWait(&buff, (_wNum), *data++, (_width), (_prec)); \
		} \
		while (!BufDescReady(buff)) ;			/** Cekani na pripravenost bufferu */ \
	} while ( FALSE )

//----------------------------------------------------
//	Klavesnice

#ifdef UCTP_DBG_KEYB

#define DbkDefine(_kb) \
	static DBKDESC	dbk##_kb = { FALSE, _T("") }

#define DbkSwBegin(_wNum) \
	switch (_wNum) \
	{

#define DbkSwEnd \
	default: \
		; \
	}
#define DbkCase(_kb, _wText) \
	case _kb: \
		if (!dbk##_kb.flReady) \
		{ \
			strcpy_C(dbk##_kb.Text, UCTP_MAX_TEXT_SIZE, (_wText)); \
			dbk##_kb.flReady = TRUE; \
		} \
		break

#define DbkAccept(_kb) \
	dbk##_kb.flReady = FALSE

#define DbkReady(_kb) \
	dbk##_kb.flReady

#define DbkRead(_kb) \
	dbk##_kb.Text

 #endif // UCTP_DBG_KEYB


#ifdef DBGMON_NOTEPAD

void DbgWriteNote(const uint32_t _value);

void DbgSendNotePadWait(const uint32_t _wn);

#endif


#else // UCTP_DBG

//----------------------------------------------------
//! \name	Prazdna makra
//@{

#define DbbScr(_sBuff, _wNum, ...)
#define DbbScrWait(_sBuff, _wNum, ...)
#define DbgScr(_wNum, ...)
#define DbgScrWait(_wNum, ...)
#define DbbScrU(_sBuff, _wNum, _number, _width, _form)
#define DbbScrUWait(_sBuff, _wNum, _number, _width, _form)
#define DbgScrU(_wNum, _number, _width, _form)
#define DbgScrUWait(_wNum, _number, _width, _form)
#define DbbScrI(_sBuff, _wNum, _number, _width)
#define DbbScrIWait(_sBuff, _wNum, _number, _width)
#define DbgScrI(_wNum, _number, _width)
#define DbgScrIWait(_wNum, _number, _width)
#define DbbScrF(_sBuff, _wNum, _number, _width, _prec)
#define DbbScrFWait(_sBuff, _wNum, _number, _width, _prec)
#define DbgScrF(_sBuff, _wNum, _number, _width, _prec)
#define DbgScrFWait(_sBuff, _wNum, _number, _width, _prec)
#define DbbXY(_sBuff, _wNum, _wX, _wY, ...)
#define DbbXYWait(_sBuff, _wNum, _wX, _wY, ...)
#define DbgXY(_wWNum, _wX, _wY, ...)
#define DbbXYU(_sBuff, _wNum, _wX, _wY, _number, _width, _form)
#define DbbXYUWait(_sBuff, _wNum, _wX, _wY, _number, _width, _form)
#define DbgXYU(_wNum, _wX, _wY, _number, _width, _form)
#define DbgXYUWait(_wNum, _wX, _wY, _number, _width, _form)
#define DbbXYI(_sBuff, _wNum, _wX, _wY, _number, _width)
#define DbbXYIWait(_sBuff, _wNum, _wX, _wY, _number, _width)
#define DbgXYI(_wNum, _wX, _wY, _number, _width)
#define DbgXYIWait(_wNum, _wX, _wY, _number, _width)
#define DbbXYF(_sBuff, _wNum, _wX, _wY, _number, _width, _prec)
#define DbbXYFWait(_sBuff, _wNum, _wX, _wY, _number, _width, _prec)
#define DbgXYF(_sBuff, _wNum, _wX, _wY, _number, _width, _prec)
#define DbgXYFWait(_sBuff, _wNum, _wX, _wY, _number, _width, _prec)
#define DbbVidHdr(_sBuff, _wNum, _wFlg, _wWidth, _wHeight, _mLen)
#define DbbVidHdrWait(_sBuff, _wNum, _wFlg, _wWidth, _wHeight, _mLen)
#define DbgVidHdr(_wNum, _wFlg, _wWidth, _wHeight, _mLen)
#define DbgVidHdrWait(_wNum, _wFlg, _wWidth, _wHeight, _mLen)
#define DbbVid(_sBuff, _wNum, _mNum, _mLen, _wData)
#define DbbVidWait(_sBuff, _wNum, _mNum, _mLen, _wData)
#define DbgVid(_wNum, _mNum, _mLen, _wData)
#define DbgVidWait(_wNum, _mNum, _mLen, _wData)
#define DbgSwBegin
#define DbgSwEnd
#define DbgSwScr(_nb, _wNum, _wText)
#define DbgSwXY(_nb, _wNum, _wX, _wY, _wText)
#define DbgSwScrU(_nb, _wNum, _number, _width)
#define DbgSwXYU(_nb, _wNum, _wX, _wY, _number, _width)
#define DbgSwScrI(_nb, _wNum, _number, _width)
#define DbgSwXYI(_nb, _wNum, _wX, _wY, _number, _width)
#define DbgSwScrF(_nb, _wNum, _number, _width)
#define DbgSwXYF(_nb, _wNum, _wX, _wY, _number, _width, _prec)
#define DbgScrUArrayWait(_wNum, _arrayType, _array, _size, _width)
#define DbgScrIArrayWait(_wNum, _arrayType, _array, _width)
#define DbgScrFArrayWait(_wNum, _arrayType, _array, _width, _prec)
#define DbkDefine(_kb)
#define DbkSwBegin(_wNum)
#define DbkSwEnd
#define DbkCase(_kb, _wText)
#define DbkAccept(_kb)
#define DbkReady(_kb) \
	FALSE
#define DbkRead(_kb)
#define DbgWriteNote(_value)
#define DbgSendNotePadWait(_wn)
#define DbgLog(_event, _param)
//@}

#endif // UCTP_DBG

bool_t DbgInitialize(DBGDESC * const _dbg, CTPDESC * const _ctp);

void DbgFinalize(DBGDESC * const _dbg);

#endif // _DBGMON_H_
