COSA
An Object-Oriented Platform for Arduino Programming
|
Go to the source code of this file.
Classes | |
class | Debug |
class | Debug::Variable |
Macros | |
#define | DEBUG_STREAM(dev) |
#define | ASSERT(cond) |
#define | BREAKPOINT() |
#define | BREAK_IF(cond) |
#define | CHECK_STACK(room) |
#define | OBSERVE_IF(cond, expr) |
#define | OBSERVE(expr) OBSERVE_IF(expr,true) |
#define | REGISTER(var) |
Variables | |
class Debug | debug |
Copyright (C) 2015, Mikael Patel
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
This file is part of the Arduino Che Cosa project.
Definition in file Debug.hh.
#define ASSERT | ( | cond | ) |
Assert the given condition. Calls debug handler if the assertion fails (the condition is false). Will not return if asserted.
[in] | cond | condition. |
#define BREAK_IF | ( | cond | ) |
Mark a conditional break point in the source code. Call the debug command handler with information about the file, line number and function name if the given condition is true.
[in] | cond | condition. |
#define BREAKPOINT | ( | ) |
Mark a break point in the source code. Call the debug command handler with information about the file, line number and function name.
#define CHECK_STACK | ( | room | ) |
Check for stack error.
[in] | room | required free space (default 128). |
#define DEBUG_STREAM | ( | dev | ) |
Start the debug command handler with information about the file, line number and function name.
[in] | dev | iostream device. |
#define OBSERVE | ( | expr | ) | OBSERVE_IF(expr,true) |
#define OBSERVE_IF | ( | cond, | |
expr | |||
) |
Print the given expression to the debug iostream if the condition is true.
[in] | cond | condition. |
[in] | expr | expression. |
#define REGISTER | ( | var | ) |
Register the given variable in the debug handler. The debug handler commands "variables" and "?var" will print information about the registered variable(s).
[in] | var | variable. |