added FSFW verbose level

This commit is contained in:
Robin Müller 2021-01-12 20:53:30 +01:00
parent f9a8c3d35a
commit 59b4f50c1c
3 changed files with 12 additions and 6 deletions

View File

@ -1,11 +1,12 @@
#ifndef FSFW_DATAPOOLLOCAL_ACCESSLOCALPOOLF_H_ #ifndef FSFW_DATAPOOLLOCAL_ACCESSLOCALPOOLF_H_
#define FSFW_DATAPOOLLOCAL_ACCESSLOCALPOOLF_H_ #define FSFW_DATAPOOLLOCAL_ACCESSLOCALPOOLF_H_
//#include "LocalDataPoolManager.h"
#include <fsfw/ipc/MutexIF.h>
class LocalDataPoolManager; class LocalDataPoolManager;
class MutexIF;
/**
* @brief Accessor class which can be used by classes which like to use the pool manager.
*/
class AccessPoolManagerIF { class AccessPoolManagerIF {
public: public:
virtual ~AccessPoolManagerIF() {}; virtual ~AccessPoolManagerIF() {};

View File

@ -9,8 +9,8 @@
//! the C stdio functions can be used alternatively //! the C stdio functions can be used alternatively
#define FSFW_CPP_OSTREAM_ENABLED 1 #define FSFW_CPP_OSTREAM_ENABLED 1
//! More FSFW related printouts. Useful for development. //! More FSFW related printouts depending on level. Useful for development.
#define FSFW_ENHANCED_PRINTOUT 0 #define FSFW_VERBOSE_LEVEL 1
//! Can be used to completely disable printouts, even the C stdio ones. //! Can be used to completely disable printouts, even the C stdio ones.
#if FSFW_CPP_OSTREAM_ENABLED == 0 && FSFW_ENHANCED_PRINTOUT == 0 #if FSFW_CPP_OSTREAM_ENABLED == 0 && FSFW_ENHANCED_PRINTOUT == 0

View File

@ -29,7 +29,7 @@ ReturnValue_t InternalErrorReporter::performOperation(uint8_t opCode) {
uint32_t newTmHits = getAndResetTmHits(); uint32_t newTmHits = getAndResetTmHits();
uint32_t newStoreHits = getAndResetStoreHits(); uint32_t newStoreHits = getAndResetStoreHits();
#if FSFW_ENHANCED_PRINTOUT == 1 #if FSFW_VERBOSE_LEVEL == 1
if(diagnosticPrintout) { if(diagnosticPrintout) {
if((newQueueHits > 0) or (newTmHits > 0) or (newStoreHits > 0)) { if((newQueueHits > 0) or (newTmHits > 0) or (newStoreHits > 0)) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
@ -38,6 +38,11 @@ ReturnValue_t InternalErrorReporter::performOperation(uint8_t opCode) {
sif::debug << "Queue errors: " << newQueueHits << std::endl; sif::debug << "Queue errors: " << newQueueHits << std::endl;
sif::debug << "TM errors: " << newTmHits << std::endl; sif::debug << "TM errors: " << newTmHits << std::endl;
sif::debug << "Store errors: " << newStoreHits << std::endl; sif::debug << "Store errors: " << newStoreHits << std::endl;
#else
sif::printDebug("InternalErrorReporter::performOperation: Errors occured!\n");
sif::printDebug("Queue errors: %lu\n", static_cast<unsigned int>(newQueueHits));
sif::printDebug("TM errors: %lu\n", static_cast<unsigned int>(newTmHits));
sif::printDebug("Store errors: %lu\n", static_cast<unsigned int>(newStoreHits));
#endif #endif
} }
} }