Diagnostic trace functions
These functions add diagnostic tracing to the generated code to assist in finding where a problem might occur. More...Classes | |
| struct | OSRTPrintStream |
| Structure to hold information about a global PrintStream. More... | |
Defines | |
| #define | RTDIAG1(pctxt, msg) |
| #define | RTDIAG2(pctxt, msg, a) |
| #define | RTDIAG3(pctxt, msg, a, b) |
| #define | RTDIAG4(pctxt, msg, a, b, c) |
| #define | RTDIAG5(pctxt, msg, a, b, c, d) |
| #define | RTDIAGU(pctxt, ucstr) |
| #define | RTHEXDUMP(pctxt, buffer, numocts) |
| #define | RTDIAGCHARS(pctxt, buf, nchars) |
| #define | RTDIAGSTRM2(pctxt, msg) |
| #define | RTDIAGSTRM3(pctxt, msg, a) |
| #define | RTDIAGSTRM4(pctxt, msg, a, b) |
| #define | RTDIAGSTRM5(pctxt, msg, a, b, c) |
| #define | RTHEXDUMPSTRM(pctxt, buffer, numocts) |
| #define | RTDIAGSCHARS(pctxt, buf, nchars) |
Typedefs | |
| typedef void(* | rtxPrintCallback )(void *pPrntStrmInfo, const char *fmtspec, va_list arglist) |
| Callback function definition for print stream. | |
Enumerations | |
| enum | OSRTDiagTraceLevel |
Functions | |
| EXTERNRT OSBOOL | rtxDiagEnabled (OSCTXT *pctxt) |
| This function is used to determine if diagnostic tracing is currently enabled for the specified context. | |
| EXTERNRT OSBOOL | rtxSetDiag (OSCTXT *pctxt, OSBOOL value) |
| This function is used to turn diagnostic tracing on or off at run-time on a per-context basis. | |
| EXTERNRT OSBOOL | rtxSetGlobalDiag (OSBOOL value) |
| This function is used to turn diagnostic tracing on or off at run-time on a global basis. | |
| EXTERNRT void | rtxDiagPrint (OSCTXT *pctxt, const char *fmtspec,...) |
This function is used to print a diagnostics message to stdout. | |
| EXTERNRT void | rtxDiagStream (OSCTXT *pctxt, const char *fmtspec,...) |
| This function conditionally outputs diagnostic trace messages to an output stream defined within the context. | |
| EXTERNRT void | rtxDiagHexDump (OSCTXT *pctxt, const OSOCTET *data, OSUINT32 numocts) |
| This function is used to print a diagnostics hex dump of a section of memory. | |
| EXTERNRT void | rtxDiagStreamHexDump (OSCTXT *pctxt, const OSOCTET *data, OSUINT32 numocts) |
| This function is used to print a diagnostics hex dump of a section of memory to a print stream. | |
| EXTERNRT void | rtxDiagPrintChars (OSCTXT *pctxt, const char *data, OSUINT32 nchars) |
| This function is used to print a given number of characters to standard output. | |
| EXTERNRT void | rtxDiagStreamPrintChars (OSCTXT *pctxt, const char *data, OSUINT32 nchars) |
| This function is used to print a given number of characters to a print stream. | |
| EXTERNRT void | rtxDiagSetTraceLevel (OSCTXT *pctxt, OSRTDiagTraceLevel level) |
| This function is used to set the maximum trace level for diagnostic trace messages. | |
| EXTERNRT int | rtxSetPrintStream (OSCTXT *pctxt, rtxPrintCallback myCallback, void *pStrmInfo) |
| This function is for setting the callback function for a PrintStream. | |
| EXTERNRT int | rtxSetGlobalPrintStream (rtxPrintCallback myCallback, void *pStrmInfo) |
| This function is for setting the callback function for a PrintStream. | |
| EXTERNRT int | rtxPrintToStream (OSCTXT *pctxt, const char *fmtspec,...) |
| Print-to-stream function which in turn calls the user registered callback function of the context for printing. | |
| EXTERNRT int | rtxDiagToStream (OSCTXT *pctxt, const char *fmtspec, va_list arglist) |
| Diagnostics print-to-stream function. | |
| EXTERNRT int | rtxPrintStreamRelease (OSCTXT *pctxt) |
| This function releases the memory held by PrintStream in the context. | |
Variables | |
| OSRTPrintStream | g_PrintStream |
| Global PrintStream. | |
Detailed Description
These functions add diagnostic tracing to the generated code to assist in finding where a problem might occur.
Calls to these macros and functions are added when the -trace command-line argument is used. The diagnostic message can be turned on and off at both C compile and run-time. To C compile the diagnostics in, the _TRACE macro must be defined (-D_TRACE). To turn the diagnostics on at run-time, the rtxSetDiag function must be invoked with the value argument set to TRUE.
Function Documentation
|
|
This function is used to determine if diagnostic tracing is currently enabled for the specified context. It returns true if enabled, false otherwise.
|
|
||||||||||||||||
|
This function is used to print a diagnostics hex dump of a section of memory.
|
|
||||||||||||||||
|
This function is used to print a diagnostics message to
Its parameter specification is similar to that of the C runtime
|
|
||||||||||||||||
|
This function is used to print a given number of characters to standard output. The buffer containing the characters does not need to be null-terminated.
|
|
||||||||||||
|
This function is used to set the maximum trace level for diagnostic trace messages. Values are ERROR, WARNING, INFO, or DEBUG. The special string start sequence (~L) described in rtxDiagPrint function documentation is used to set a message level to be compared with the trace level.
|
|
||||||||||||||||
|
This function conditionally outputs diagnostic trace messages to an output stream defined within the context. A code generator embeds calls to this function into the generated source code when the -trace option is specified on the command line (note: it may embed the macro version of these calls - RTDIAGSTREAMx - so that these calls can be compiled out of the final code.
|
|
||||||||||||||||
|
This function is used to print a diagnostics hex dump of a section of memory to a print stream.
|
|
||||||||||||||||
|
This function is used to print a given number of characters to a print stream. The buffer containing the characters does not need to be null-terminated.
|
|
||||||||||||||||
|
Diagnostics print-to-stream function.
This is the same as the
|
|
|
This function releases the memory held by PrintStream in the context.
|
|
||||||||||||||||
|
Print-to-stream function which in turn calls the user registered callback function of the context for printing. If no callback function is registered it prints to standard output by default.
|
|
||||||||||||
|
This function is used to turn diagnostic tracing on or off at run-time on a per-context basis. Code generated using ASN1C or XBinder or a similar code generator must use the -trace command line option to enable diagnostic messages. The generated code must then be C compiled with _TRACE defined for the code to be present.
|
|
|
This function is used to turn diagnostic tracing on or off at run-time on a global basis. It is similar to rtxSetDiag except tracing is enabled within all contexts.
|
|
||||||||||||
|
This function is for setting the callback function for a PrintStream. This version of the function sets a callback at the global level.
|
|
||||||||||||||||
|
This function is for setting the callback function for a PrintStream. Once a callback function is set, then all print and debug output ia sent to the defined callback function.
|
