Macros
SERDISP_MESSAGES

Macros

#define sd_runtime_error()
 tests if a runtime error has occured More...
 
#define sd_geterrormsg()
 gets error message of last unsuccessful action More...
 
#define sd_getdebuglevel()
 gets the current debug level More...
 
#define sd_setdebuglevel(_level)
 sets a new debug level More...
 
#define sd_setlogmedium(_medium)
 sets the log medium for debug messages More...
 

Detailed Description

Introduction

serdisplib uses syslog for reporting debugging information, errors and warnings.
Thus, /var/log/messages (or /var/adm/messages depending on operating system used) may contain useful informations.

Attention
Always have a look into /var/log/messages (or /var/adm/messages ) if there are problems.
Warnings and errors (depending on the debugging level used) are logged there by serdisplib!

Macro Definition Documentation

#define sd_getdebuglevel ( )

Gets the current debug level

Returns
debug level currently used
#define sd_geterrormsg ( )

Gets error message of last unsuccessful action

Returns
error message
#define sd_runtime_error ( )

Tests if a runtime error has occured (and thus display drawing has been stopped by the library)

Return values
0no runtime error
1a runtime error occured
Attention
Display drawing is stopped after a runtime error and may be reset using serdisp_reset() or serdisp_fullreset().
#define sd_setdebuglevel (   _level)

Sets a new debug level

Parameters
_levelconstant which sets the debug level:
SD_LVL_WARN    = 0  .. only write warning informations
SD_LVL_INFO    = 1  .. more verbose debugging
SD_LVL_VERBOSE = 2  .. verbose debugging 

Example:

1 sd_setdebuglevel(SD_LVL_VERBOSE);
#define sd_setlogmedium (   _medium)

Sets the log medium for debug messages

Parameters
_mediumconstant which sets the log medium used for debugging information:
SD_LOG_SYSLOG .. syslog
SD_LOG_STDERR .. stderr
SD_LOG_STDOUT .. stdout 

Example:
enables info debugging and writes debugging information to stderr instead of using syslog:

1 sd_setdebuglevel(SD_LVL_INFO);
2 sd_setlogmedium(SD_LOG_STDERR);