Tscope5
|
Definitions of system functions. More...
Go to the source code of this file.
Functions | |
Logging functions | |
Tscope5 automatically sends information about its status to a logging window and a file called tscope5.log. With the functions below you control the amount of information that is logged. It is also possible to send your own log messages. | |
void | ts5_log (const unsigned int level, const char *format,...) |
Send info to a logging window. More... | |
int | ts5_set_log_level (const unsigned int loglevel) |
Set log level. More... | |
int | ts5_get_log_level () |
Get log level. More... | |
void | ts5_print_status () |
Write the status of all Tscope5 subsystem to the log window. More... | |
Error exit | |
During an experiment lots of unexpected things can happen. (e.g. you forgot to copy stimulus bitmaps to the experiment computer). It is a good habit to check for such unexpected events and exit your program safely before an ugly crash happens. | |
void | ts5_fatal (const char *format,...) |
Exit safely with an error message. More... | |
Definitions of system functions.
Definition in file system.c.
void ts5_log | ( | const unsigned int | level, |
const char * | format, | ||
... | |||
) |
Send info to a logging window.
level | The importance of this message (TS5_LOGLEVEL_0 - TS5_LOGLEVEL_6). Smaller values are more important. |
format | Printf-style format string that contains the log message. |
The log message is printed in a separate text log window.
Messages with a level above the level specified with ts5_set_log_level are omitted.
int ts5_set_log_level | ( | const unsigned int | loglevel | ) |
Set log level.
loglevel | How much stuff is logged. |
This parameter function controls what information is printed to the log window.
There are six possible settings:
If other values are passed to this function the program is aborted.
The default loglevel is TS5_LOGLEVEL_3.
int ts5_get_log_level | ( | ) |
void ts5_print_status | ( | ) |
Write the status of all Tscope5 subsystem to the log window.
Information is printed about:
void ts5_fatal | ( | const char * | format, |
... | |||
) |
Exit safely with an error message.
format | Printf-style format string that contains the error message. |
Closes Tscope5, all subsystems and the log window.
A message box appears with the error message supplied by the user.
This function can be called before Tscope5 is installed.