The declarations in this header file correspond to the definitions in test_console.c.
More...
#include <stdbool.h>
#include "test_args.h"
Go to the source code of this file.
The declarations in this header file correspond to the definitions in test_console.c.
◆ TestConsoleCreate()
bool TestConsoleCreate |
( |
bool | multi_window_mode, |
|
|
int | num_stats_lines ) |
Initialize the console for either multi-window mode or stdout mode.
- Parameters
-
multi_window_mode | True to enable mutli-window mode, otherwise use stdout mode. |
num_stats_lines | Number of lines to dedicate to statistics window. |
- Returns
- Returns true if success, otherwise false is returned and the stdout console will be used.
◆ TestConsoleDestroy()
void TestConsoleDestroy |
( |
bool | abnormal_termination | ) |
|
Destroy the resources used by the console. Doesn't do much unless multi-window mode is enabled.
- Parameters
-
abnormal_termination | True if being terminated abnormally (ie. from a signal event handler). This will cause all console log API functions to be disabled to prevent other threads from generating erroneous log error messages. |
◆ TestConsoleLog()
void TestConsoleLog |
( |
CdiLogLevel | log_level, |
|
|
const char * | format_str, |
|
|
| ... ) |
Add a message to the console log window, if multi-window mode is enabled (no need to use TestConsoleStatsRefresh()). Otherwise just writes to stdout.
- Parameters
-
log_level | The log level for this message. |
format_str | Format string specifier. |
... | The remaining parameters contain a variable length list of arguments. |
◆ TestConsoleLogMessageCallback()
Callback function used by the log message callback feature.
- Parameters
-
cb_data_ptr | Pointer to log message callback data. |
◆ TestConsoleStats()
void TestConsoleStats |
( |
int | x, |
|
|
int | y, |
|
|
int | attribute, |
|
|
const char * | format_str, |
|
|
| ... ) |
Put a message in the console log window if using mult-window mode, otherwise just write to stdout. NOTE: When in multi-window mode, must use TestConsoleStatsRefresh() to update the window.
- Parameters
-
x | Console window X position. |
y | Console window Y position. |
attribute | Character attribute. Use A_NORMAL for normal console output. |
format_str | Pointer to format string. |
... | Variable list of string arguments. |
◆ TestConsoleStatsHorzLine()
void TestConsoleStatsHorzLine |
( |
int | x, |
|
|
int | y, |
|
|
int | width ) |
Render a horizontal line on the stats console. NOTE: When in multi-window mode, must use TestConsoleStatsRefresh() to update the window.
- Parameters
-
x | Console window X position. |
y | Console window Y position. |
width | Column width of line to draw. Use 0 for full width of console. |
◆ TestConsoleStatsRefresh()
void TestConsoleStatsRefresh |
( |
void | | ) |
|
Refresh the status console window. Only used in multi-window mode.