SpiNNFrontEndCommon 7.3.1
Common support code for user-facing front end systems.
|
SpiNNaker debug header file. More...
Go to the source code of this file.
Macros | |
#define | log_mini_error(message, ...) __log_mini(LOG_ERROR, message, ##__VA_ARGS__) |
This macro logs errors. Do not call directly! | |
#define | log_mini_warning(message, ...) __log_mini(LOG_WARNING, message, ##__VA_ARGS__) |
This macro logs warnings. Do not call directly! | |
#define | log_mini_info(message, ...) __log_mini(LOG_INFO, message, ##__VA_ARGS__) |
This macro logs information. Do not call directly! | |
#define | log_mini_debug(message, ...) __log_mini(LOG_DEBUG, message, ##__VA_ARGS__) |
This macro logs debug messages. Do not call directly! | |
Functions | |
void | log_error (const char *message,...) |
This function logs errors. Errors usually indicate a serious fault in the program, and that it is about to terminate abnormally (RTE). | |
void | log_warning (const char *message,...) |
This function logs warnings. | |
void | log_info (const char *message,...) |
This function logs informational messages. This is the lowest level of message normally printed. | |
void | log_debug (const char *message,...) |
This function logs debugging messages. This level of message is normally not printed except when the binary is built in debug mode. | |
static uint32_t | float_to_int (float f) |
Type-pun a float as a 32-bit unsigned integer. | |
static uint32_t | double_to_lower (double d) |
Type-pun the lower 32 bits of a double as a 32-bit unsigned integer. | |
static uint32_t | double_to_upper (double d) |
Type-pun the higher 32 bits of a double as a 32-bit unsigned integer. | |
SpiNNaker debug header file.
Created on : 12 December 2013 Version : $Revision$ Last modified on : $Date$ Last modified by : $Author$ $Id$
A header file that can be used to incorporate and control debug information. It is switched ON by default; to switch OFF, the code is compiled with
-DPRODUCTION_CODE
or
-DNDEBUG
By default it is used for SpiNNaker ARM code; it can also be used in host-side C, by compiling with -DDEBUG_ON_HOST
To use, you must ‘hash-include’ debug.h:
Logging errors, warnings and info:
log_error(17, "error"); // not the most useful message.. log_warning(0, "variable x = %8x", 0xFF); // variable printing log_info("function f entered"); // trace
Definition in file debug.h.
#define log_mini_error | ( | message, | |
... | |||
) | __log_mini(LOG_ERROR, message, ##__VA_ARGS__) |
#define log_mini_warning | ( | message, | |
... | |||
) | __log_mini(LOG_WARNING, message, ##__VA_ARGS__) |
#define log_mini_info | ( | message, | |
... | |||
) | __log_mini(LOG_INFO, message, ##__VA_ARGS__) |
#define log_mini_debug | ( | message, | |
... | |||
) | __log_mini(LOG_DEBUG, message, ##__VA_ARGS__) |
This function logs errors. Errors usually indicate a serious fault in the program, and that it is about to terminate abnormally (RTE).
Calls to this function are rewritten during the build process to be calls to log_mini_error(); the rewrite also encodes the message so that it is handled more efficiently by the binary deployed to SpiNNaker.
[in] | message | The user-defined part of the error message. |
This function logs warnings.
Calls to this function are rewritten during the build process to be calls to log_mini_warning(); the rewrite also encodes the message so that it is handled more efficiently by the binary deployed to SpiNNaker.
[in] | message | The user-defined part of the error message. |
This function logs informational messages. This is the lowest level of message normally printed.
Calls to this function are rewritten during the build process to be calls to log_mini_info(); the rewrite also encodes the message so that it is handled more efficiently by the binary deployed to SpiNNaker.
[in] | message | The user-defined part of the error message. |
This function logs debugging messages. This level of message is normally not printed except when the binary is built in debug mode.
Calls to this function are rewritten during the build process to be calls to log_mini_debug(); the rewrite also encodes the message so that it is handled more efficiently by the binary deployed to SpiNNaker.
[in] | message | The user-defined part of the error message. |