improved DHB error handling
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#define FSFW_SERVICEINTERFACE_SERVICEINTERFACE_H_
|
||||
|
||||
#include <FSFWConfig.h>
|
||||
#include "serviceInterfaceDefintions.h"
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace fsfw {
|
||||
|
||||
enum class PrintLevel {
|
||||
enum PrintLevel {
|
||||
NONE = 0,
|
||||
//! Strange error when using just ERROR..
|
||||
ERROR_TYPE = 1,
|
||||
@ -13,6 +13,12 @@ enum class PrintLevel {
|
||||
DEBUG = 4
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the print level. All print types with a smaller level will be printed
|
||||
* as well. For example, set to PrintLevel::WARNING to only enable error
|
||||
* and warning output.
|
||||
* @param printLevel
|
||||
*/
|
||||
void setPrintLevel(PrintLevel printLevel);
|
||||
PrintLevel getPrintLevel();
|
||||
|
||||
|
@ -3,6 +3,13 @@
|
||||
|
||||
namespace fsfw {
|
||||
|
||||
enum class OutputTypes {
|
||||
OUT_INFO,
|
||||
OUT_DEBUG,
|
||||
OUT_WARNING,
|
||||
OUT_ERROR
|
||||
};
|
||||
|
||||
static const char* const ANSI_COLOR_RED = "\x1b[31m";
|
||||
static const char* const ANSI_COLOR_GREEN = "\x1b[32m";
|
||||
static const char* const ANSI_COLOR_YELLOW = "\x1b[33m";
|
||||
|
Reference in New Issue
Block a user