Merge pull request 'EIVE FSFW Update' (#430) from eive/fsfw:eive/develop into development

Reviewed-on: fsfw/fsfw#430
This commit is contained in:
Jakob Meier 2021-06-12 15:44:31 +02:00
commit a993872884
9 changed files with 770 additions and 734 deletions

View File

@ -18,6 +18,13 @@ add_library(${LIB_FSFW_NAME})
set_property(CACHE OS_FSFW PROPERTY STRINGS host linux rtems freertos)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
elseif(${CMAKE_CXX_STANDARD} LESS 11)
message(FATAL_ERROR "Compiling the FSFW requires a minimum of C++11 support")
endif()
if(NOT OS_FSFW)
message(STATUS "No OS for FSFW via OS_FSFW set. Assuming host OS")
# Assume host OS and autodetermine from OS_FSFW

View File

@ -66,6 +66,10 @@ protected:
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override = 0;
virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override = 0;
// Mode abstract functions
virtual ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode) override = 0;
};

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,15 @@
void arrayprinter::print(const uint8_t *data, size_t size, OutputType type,
bool printInfo, size_t maxCharPerLine) {
if(size == 0) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Size is zero, nothing to print" << std::endl;
#else
sif::printInfo("Size is zero, nothing to print\n");
#endif
return;
}
#if FSFW_CPP_OSTREAM_ENABLED == 1
if(printInfo) {
sif::info << "Printing data with size " << size << ": " << std::endl;

View File

@ -119,9 +119,9 @@ void ObjectManager::initialize() {
result = it.second->checkObjectConnections();
if ( result != RETURN_OK ) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectManager::ObjectManager: Object " << std::hex <<
(int) it.first << " connection check failed with code 0x"
<< result << std::dec << std::endl;
sif::error << "ObjectManager::ObjectManager: Object 0x" << std::hex <<
(int) it.first << " connection check failed with code 0x" << result <<
std::dec << std::endl;
#endif
errorCount++;
}

View File

@ -35,7 +35,7 @@ ServiceInterfaceBuffer::ServiceInterfaceBuffer(std::string setMessage,
colorPrefix = sif::ANSI_COLOR_GREEN;
}
else if(setMessage.find("WARNING") != std::string::npos) {
colorPrefix = sif::ANSI_COLOR_YELLOW;
colorPrefix = sif::ANSI_COLOR_MAGENTA;
}
else if(setMessage.find("ERROR") != std::string::npos) {
colorPrefix = sif::ANSI_COLOR_RED;
@ -171,6 +171,10 @@ bool ServiceInterfaceBuffer::crAdditionEnabled() const {
return addCrToPreamble;
}
void ServiceInterfaceBuffer::setAsciiColorPrefix(std::string colorPrefix) {
this->colorPrefix = colorPrefix;
}
#ifdef UT699
#include "../osal/rtems/Interrupt.h"

View File

@ -48,6 +48,7 @@ private:
#if FSFW_COLORED_OUTPUT == 1
std::string colorPrefix;
void setAsciiColorPrefix(std::string colorPrefix);
#endif
// For EOF detection

View File

@ -19,5 +19,9 @@ bool ServiceInterfaceStream::crAdditionEnabled() const {
return streambuf.crAdditionEnabled();
}
void ServiceInterfaceStream::setAsciiColorPrefix(std::string asciiColorCode) {
streambuf.setAsciiColorPrefix(asciiColorCode);
}
#endif

View File

@ -46,6 +46,8 @@ public:
*/
bool crAdditionEnabled() const;
void setAsciiColorPrefix(std::string asciiColorCode);
protected:
ServiceInterfaceBuffer streambuf;
};