00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028 #ifndef _RTXDIAG_H_
00029 #define _RTXDIAG_H_
00030
00031 #include <stdarg.h>
00032 #include "rtxsrc/rtxContext.h"
00033 #include "rtxsrc/rtxPrintToStream.h"
00034
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038
00039
00052 #ifdef _TRACE
00053 #define RTDIAG1(pctxt,msg) rtxDiagPrint(pctxt,msg)
00054 #define RTDIAG2(pctxt,msg,a) rtxDiagPrint(pctxt,msg,a)
00055 #define RTDIAG3(pctxt,msg,a,b) rtxDiagPrint(pctxt,msg,a,b)
00056 #define RTDIAG4(pctxt,msg,a,b,c) rtxDiagPrint(pctxt,msg,a,b,c)
00057 #define RTDIAG5(pctxt,msg,a,b,c,d) rtxDiagPrint(pctxt,msg,a,b,c,d)
00058 #define RTDIAGU(pctxt,ucstr) rtxDiagPrintUCS(pctxt,ucstr)
00059 #define RTHEXDUMP(pctxt,buffer,numocts) rtxDiagHexDump(pctxt,buffer,numocts)
00060 #define RTDIAGCHARS(pctxt,buf,nchars) rtxDiagPrintChars(pctxt,buf,nchars)
00061 #define RTDIAGSTRM2(pctxt,msg) rtxDiagStream(pctxt,msg)
00062 #define RTDIAGSTRM3(pctxt,msg,a) rtxDiagStream(pctxt,msg,a)
00063 #define RTDIAGSTRM4(pctxt,msg,a,b) rtxDiagStream(pctxt,msg,a,b)
00064 #define RTDIAGSTRM5(pctxt,msg,a,b,c) rtxDiagStream(pctxt,msg,a,b,c)
00065 #define RTHEXDUMPSTRM(pctxt,buffer,numocts) \
00066 rtxDiagStreamHexDump(pctxt,buffer,numocts)
00067 #define RTDIAGSCHARS(pctxt,buf,nchars) \
00068 rtxDiagStreamPrintChars(pctxt,buf,nchars)
00069 #else
00070 #define RTDIAG1(pctxt,msg)
00071 #define RTDIAG2(pctxt,msg,a)
00072 #define RTDIAG3(pctxt,msg,a,b)
00073 #define RTDIAG4(pctxt,msg,a,b,c)
00074 #define RTDIAG5(pctxt,msg,a,b,c,d)
00075 #define RTDIAGU(pctxt,ucstr)
00076 #define RTHEXDUMP(pctxt,buffer,numocts)
00077 #define RTDIAGCHARS(pctxt,buf,nchars)
00078 #define RTDIAGSTRM2(pctxt,msg)
00079 #define RTDIAGSTRM3(pctxt,msg,a)
00080 #define RTDIAGSTRM4(pctxt,msg,a,b)
00081 #define RTDIAGSTRM5(pctxt,msg,a,b,c)
00082 #define RTHEXDUMPSTRM(pctxt,buffer,numocts)
00083 #define RTDIAGSCHARS(pctxt,buf,nchars)
00084 #endif
00085
00094 EXTERNRTX OSBOOL rtxDiagEnabled (OSCTXT* pctxt);
00095
00108 EXTERNRTX OSBOOL rtxSetDiag (OSCTXT* pctxt, OSBOOL value);
00109
00119 EXTERNRTX OSBOOL rtxSetGlobalDiag (OSBOOL value);
00120
00134 EXTERNRTX void rtxDiagPrint (OSCTXT* pctxt, const char* fmtspec, ...);
00135
00149 EXTERNRTX void rtxDiagStream (OSCTXT* pctxt, const char* fmtspec, ...);
00150
00159 EXTERNRTX void rtxDiagHexDump
00160 (OSCTXT* pctxt, const OSOCTET* data, OSUINT32 numocts);
00161
00170 EXTERNRTX void rtxDiagStreamHexDump
00171 (OSCTXT* pctxt, const OSOCTET* data, OSUINT32 numocts);
00172
00183 EXTERNRTX void rtxDiagPrintChars
00184 (OSCTXT* pctxt, const char* data, OSUINT32 nchars);
00185
00196 EXTERNRTX void rtxDiagStreamPrintChars
00197 (OSCTXT* pctxt, const char* data, OSUINT32 nchars);
00198
00203 #ifdef __cplusplus
00204 }
00205 #endif
00206
00207 #endif
00208