The tcDspError class handles formatting and reporting errors in a consistent manner. More...
#include <core/DspError.h>
Static Public Member Functions | |
static void | report (const char *apFile, int anLine, teErrorValues aeLevel, const char *apFormat,...) |
This routine is used to create an error message. | |
static void | report (teErrorValues aeLevel, const char *apFormat,...) |
This routine is used to create an error message. |
Static Public Attributes | |
static int | mnNumErrors = 0 |
Number of messages created with a severity set to error. | |
static int | mnNumWarnings = 0 |
Number of messages created with a severity set to warning. | |
static int | mnNumStatus = 0 |
Number of messages created with a severity set to status. | |
static int | mnNumDebug = 0 |
Number of messages created with a severity set to debug. | |
static teErrorValues | meSendToStdout = status |
Severity threshold for message creation (default: status). | |
static tfErrorCallback | mfCallback = NULL |
Callback used to process completed messages (default: NULL). | |
static tfLogCallback | mfLogCallback = NULL |
Callback used to log occurances of any error (default: NULL). | |
static teTimeFormats | meTimeFormat = eeHHMMSS |
Format for printed timestamps. | |
static teOutputFormats | meOutputFormat = eeFormatA |
Format for output report. |
Static Protected Attributes | |
static SEM_Handle | mhPrintfSemaphore = SEM_create (1, NULL) |
Semaphore used to serialize access across multiple threads. | |
static unsigned int | mnTicksPerSec = (1000 * CLK_countspms()) / CLK_getprd() |
Conversion from low resolution clock ticks to seconds. |
The tcDspError class handles formatting and reporting errors in a consistent manner.
The class is static, so no members may be created. Messages are created whenever the provided severity is greater than tcDspError::send_to_stdout (which has a default of status). If a callback is provided, messages are passed to the callback, otherwise, a printf is used to display them on the standard output.
|
static |
This routine is used to create an error message.
The message is created if the provided severity is greater than or equal to the current tcDspError::send_to_stdout setting. The resulting message is sent to the callback specified by tcDspError::callback, or is simply printf'd if no callback is registered.
[in] | apFile | A character string representing the file in which the error is produced (generally FILE). If NULL, the file name and line number is omitted from the debug string when eeFormatA is selected. |
[in] | anLine | An integer representing the line number within the calling file (generally LINE). If 0, the filename and line number is omitted from the debug string when eeFormatA is selected. |
[in] | aeLevel | The error severity level:
|
[in] | apFormat | A printf-style format statement, including constant character text. |
[in] | ... | Varargs list matching the format specifier. |
|
static |
This routine is used to create an error message.
The message is created if the provided severity is greater than or equal to the current tcDspError::send_to_stdout setting. The resulting message is sent to the callback specified by tcDspError::callback, or is simply printf'd if no callback is registered.
Use of this function is equivalent to calling tcDspError::report [ABOVE] with NULL and 0 for the filename and line number.
[in] | aeLevel | The error severity level:
|
[in] | apFormat | A printf-style format statement, including constant character text. |
[in] | ... | Varargs list matching the format specifier. |
|
static |
Number of messages created with a severity set to error.
|
static |
Number of messages created with a severity set to warning.
|
static |
Number of messages created with a severity set to status.
|
static |
Number of messages created with a severity set to debug.
|
static |
Severity threshold for message creation (default: status).
|
static |
Callback used to process completed messages (default: NULL).
|
static |
Callback used to log occurances of any error (default: NULL).
|
static |
Format for printed timestamps.
|
static |
Format for output report.
|
staticprotected |
Semaphore used to serialize access across multiple threads.
|
staticprotected |
Conversion from low resolution clock ticks to seconds.