StuBS
output.h File Reference

Debug macros enabling debug output on a separate window. More...

Include dependency graph for output.h:
This graph shows which files directly or indirectly include this file:

Macros

#define DBG_VERBOSE   nullstream
 An output stream, which is only displayed in the debug window in verbose mode. More...
 
#define DBG   *copyout
 An output stream, which is displayed in the debug window. More...
 

Variables

TextStream dout
 Debug window. More...
 
OutputStreamcopyout
 Debug window with copy function to serial. More...
 

Detailed Description

Debug macros enabling debug output on a separate window.

Macro Definition Documentation

◆ DBG

#define DBG   *copyout

An output stream, which is displayed in the debug window.

In single core (OOStuBS) this is just an alias to the debug window object dout.

◆ DBG_VERBOSE

#define DBG_VERBOSE   nullstream

An output stream, which is only displayed in the debug window in verbose mode.

Note
If a serial console has been implemented, the output can be redirected to the serial stream instead (by changing the macro) – this makes the (usually) very large output more readable (since it allows scrolling back)

Variable Documentation

◆ copyout

OutputStream* copyout
extern

Debug window with copy function to serial.

Provide an additional layer to ouput one debug output also to serial. While this is a simple CopyStream pointer in the single core case, it is an array in the multi core case, which consists of thre TextStreams and one CopyStream. For that, construction is done like:

The class OutputStream corresponds, essentially, to the class ostream from the C++ IO-Stream library.
Definition: outputstream.h:61
const unsigned MAX
Maximum number of supported CPUs.
Definition: core.h:28
TextStream dout
Debug window.
Definition: main.cc:10
OutputStream * copyout
Debug window with copy function to serial.
Definition: main.cc:11

◆ dout

CopyStream copystream & dout
extern

Debug window.

Debug output using DBG like DBG << "var = " << var << endl should be displayed in separate window.

Ideally, this window should be placed below the normal output window without any overlap and be able to display 4 lines.