Merge branch 'development' into mueller/devicehandlers-update

This commit is contained in:
Steffen Gaisser 2020-12-22 15:28:38 +01:00
commit 117b29e413
25 changed files with 280 additions and 148 deletions

View File

@ -3,14 +3,23 @@ cmake_minimum_required(VERSION 3.13)
set(LIB_FSFW_NAME fsfw) set(LIB_FSFW_NAME fsfw)
add_library(${LIB_FSFW_NAME}) add_library(${LIB_FSFW_NAME})
# Set options for FSFW OSAL selection. set_property(CACHE OS_FSFW PROPERTY STRINGS host linux rtems freertos)
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
if(UNIX) if(UNIX)
set(OS_FSFW "linux" CACHE STRING "OS abstraction layer used in the FSFW") set(OS_FSFW "linux"
CACHE STRING
"OS abstraction layer used in the FSFW"
)
elseif(WIN32) elseif(WIN32)
set(OS_FSFW "host" CACHE STRING "OS abstraction layer used in the FSFW") set(OS_FSFW "host"
CACHE STRING "OS abstraction layer used in the FSFW"
)
endif() endif()
set_property(CACHE OS_FSFW PROPERTY STRINGS host linux rtems freertos) endif()
if(${OS_FSFW} STREQUAL host) if(${OS_FSFW} STREQUAL host)
set(OS_FSFW_NAME "Host") set(OS_FSFW_NAME "Host")
@ -18,15 +27,18 @@ elseif(${OS_FSFW} STREQUAL linux)
set(OS_FSFW_NAME "Linux") set(OS_FSFW_NAME "Linux")
elseif(${OS_FSFW} STREQUAL freertos) elseif(${OS_FSFW} STREQUAL freertos)
set(OS_FSFW_NAME "FreeRTOS") set(OS_FSFW_NAME "FreeRTOS")
target_link_libraries(${LIB_FSFW_NAME} ${LIB_OS_NAME})
elseif(${OS_FSFW} STREQUAL rtems) elseif(${OS_FSFW} STREQUAL rtems)
set(OS_FSFW_NAME "RTEMS") set(OS_FSFW_NAME "RTEMS")
else() else()
message(WARNING "Invalid operating system for FSFW specified! Setting to host..") message(WARNING
"Invalid operating system for FSFW specified! Setting to host.."
)
set(OS_FSFW_NAME "Host") set(OS_FSFW_NAME "Host")
set(OS_FSFW "host") set(OS_FSFW "host")
endif() endif()
message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system") message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system.")
# Options to exclude parts of the FSFW from compilation. # Options to exclude parts of the FSFW from compilation.
option(FSFW_USE_RMAP "Compile with RMAP" ON) option(FSFW_USE_RMAP "Compile with RMAP" ON)
@ -36,8 +48,14 @@ add_subdirectory(action)
add_subdirectory(container) add_subdirectory(container)
add_subdirectory(controller) add_subdirectory(controller)
add_subdirectory(coordinates) add_subdirectory(coordinates)
if(FSFW_USE_DATALINKLAYER)
add_subdirectory(datalinklayer) add_subdirectory(datalinklayer)
endif()
add_subdirectory(datapool) add_subdirectory(datapool)
add_subdirectory(datapoollocal)
add_subdirectory(housekeeping)
add_subdirectory(devicehandlers) add_subdirectory(devicehandlers)
add_subdirectory(events) add_subdirectory(events)
add_subdirectory(fdir) add_subdirectory(fdir)
@ -78,8 +96,48 @@ message(WARNING "Setting default configuration!")
add_subdirectory(defaultcfg/fsfwconfig) add_subdirectory(defaultcfg/fsfwconfig)
endif() endif()
# Required include paths to compile the FSFW # FSFW might be part of a possibly complicated folder structure, so we
target_include_directories(${LIB_FSFW_NAME} # extract the absolute path of the fsfwconfig folder.
INTERFACE if(IS_ABSOLUTE ${FSFW_CONFIG_PATH})
${FSFW_CONFIG_PATH} set(FSFW_CONFIG_PATH_ABSOLUTE ${FSFW_CONFIG_PATH})
else()
get_filename_component(FSFW_CONFIG_PATH_ABSOLUTE
${FSFW_CONFIG_PATH} REALPATH BASE_DIR ${CMAKE_SOURCE_DIR}
)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
set(WARNING_FLAGS
-Wall
-Wextra
-Wshadow=local
-Wimplicit-fallthrough=1
-Wno-unused-parameter
-Wno-psabi
)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(COMPILER_FLAGS "/permissive-")
endif()
# Required include paths to compile the FSFW
target_include_directories(${LIB_FSFW_NAME} INTERFACE
${CMAKE_SOURCE_DIR}
${FSFW_CONFIG_PATH_ABSOLUTE}
)
# Includes path required to compile FSFW itself as well
# We assume that the fsfwconfig folder uses include relative to the project
# root here!
target_include_directories(${LIB_FSFW_NAME} PRIVATE
${CMAKE_SOURCE_DIR}
${FSFW_CONFIG_PATH_ABSOLUTE}
)
# Machine specific options can be set with the ABI_FLAGS variable.
target_compile_options(${LIB_FSFW_NAME} PRIVATE
${WARNING_FLAGS}
${COMPILER_FLAGS}
${ABI_FLAGS}
) )

View File

@ -1,7 +1,9 @@
#ifndef SGP4PROPAGATOR_H_ #ifndef SGP4PROPAGATOR_H_
#define SGP4PROPAGATOR_H_ #define SGP4PROPAGATOR_H_
#ifndef WIN32
#include <sys/time.h> #include <sys/time.h>
#endif
#include "../contrib/sgp4/sgp4unit.h" #include "../contrib/sgp4/sgp4unit.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"

View File

@ -1,11 +1,6 @@
target_sources(${LIB_FSFW_NAME} target_sources(${LIB_FSFW_NAME}
PRIVATE PRIVATE
ControllerSet.cpp
DataPool.cpp
DataPoolAdmin.cpp
DataPoolParameterWrapper.cpp
DataSet.cpp
HkSwitchHelper.cpp HkSwitchHelper.cpp
PoolDataSetBase.cpp
PoolEntry.cpp PoolEntry.cpp
PoolRawAccess.cpp
) )

View File

@ -59,6 +59,11 @@ uint16_t PoolDataSetBase::getFillCount() const {
ReturnValue_t PoolDataSetBase::readVariable(uint16_t count) { ReturnValue_t PoolDataSetBase::readVariable(uint16_t count) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
if(registeredVariables[count] == nullptr) {
// configuration error.
return HasReturnvaluesIF::RETURN_FAILED;
}
// These checks are often performed by the respective // These checks are often performed by the respective
// variable implementation too, but I guess a double check does not hurt. // variable implementation too, but I guess a double check does not hurt.
if (registeredVariables[count]->getReadWriteMode() != if (registeredVariables[count]->getReadWriteMode() !=

View File

@ -0,0 +1,8 @@
target_sources(${LIB_FSFW_NAME}
PRIVATE
LocalDataPoolManager.cpp
LocalDataSet.cpp
LocalPoolDataSetBase.cpp
LocalPoolObjectBase.cpp
SharedLocalDataSet.cpp
)

View File

@ -1,6 +1,5 @@
target_sources(${LIB_FSFW_NAME} target_sources(${LIB_FSFW_NAME}
PRIVATE PRIVATE
Event.cpp
EventManager.cpp EventManager.cpp
EventMessage.cpp EventMessage.cpp
) )

View File

@ -2,7 +2,12 @@
#define TIMEVALOPERATIONS_H_ #define TIMEVALOPERATIONS_H_
#include <stdint.h> #include <stdint.h>
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/time.h> #include <sys/time.h>
#endif
timeval& operator+=(timeval& lhs, const timeval& rhs); timeval& operator+=(timeval& lhs, const timeval& rhs);

View File

@ -0,0 +1,5 @@
target_sources(${LIB_FSFW_NAME}
PRIVATE
HousekeepingMessage.cpp
PeriodicHousekeepingHelper.cpp
)

View File

@ -1,4 +1,4 @@
#include "../ipc/CommandMessageCleaner.h" #include "CommandMessageCleaner.h"
#include "../devicehandlers/DeviceHandlerMessage.h" #include "../devicehandlers/DeviceHandlerMessage.h"
#include "../health/HealthMessage.h" #include "../health/HealthMessage.h"
@ -7,6 +7,7 @@
#include "../monitoring/MonitoringMessage.h" #include "../monitoring/MonitoringMessage.h"
#include "../subsystem/modes/ModeSequenceMessage.h" #include "../subsystem/modes/ModeSequenceMessage.h"
#include "../tmstorage/TmStoreMessage.h" #include "../tmstorage/TmStoreMessage.h"
#include "../housekeeping/HousekeepingMessage.h"
#include "../parameters/ParameterMessage.h" #include "../parameters/ParameterMessage.h"
void CommandMessageCleaner::clearCommandMessage(CommandMessage* message) { void CommandMessageCleaner::clearCommandMessage(CommandMessage* message) {
@ -38,6 +39,9 @@ void CommandMessageCleaner::clearCommandMessage(CommandMessage* message) {
case messagetypes::PARAMETER: case messagetypes::PARAMETER:
ParameterMessage::clear(message); ParameterMessage::clear(message);
break; break;
case messagetypes::HOUSEKEEPING:
HousekeepingMessage::clear(message);
break;
default: default:
messagetypes::clearMissionMessage(message); messagetypes::clearMissionMessage(message);
break; break;

View File

@ -1,7 +1,7 @@
#ifndef FRAMEWORK_IPC_MESSAGEQUEUEMESSAGEIF_H_ #ifndef FRAMEWORK_IPC_MESSAGEQUEUEMESSAGEIF_H_
#define FRAMEWORK_IPC_MESSAGEQUEUEMESSAGEIF_H_ #define FRAMEWORK_IPC_MESSAGEQUEUEMESSAGEIF_H_
#include <fsfw/ipc/messageQueueDefinitions.h> #include "messageQueueDefinitions.h"
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>

View File

@ -16,8 +16,8 @@ public:
<< timeoutMs << " milliseconds!" << std::endl; << timeoutMs << " milliseconds!" << std::endl;
} }
else if(status != HasReturnvaluesIF::RETURN_OK){ else if(status != HasReturnvaluesIF::RETURN_OK){
sif::error << "MutexHelper: Lock of Mutex failed with code " << sif::error << "MutexHelper: Lock of Mutex failed with code "
status << std::endl; << status << std::endl;
} }
} }

View File

@ -22,9 +22,23 @@
#else #else
#error "Can't decide which end is which!" #error "Can't decide which end is which!"
#endif #endif
#else
#ifdef WIN32
#include <Windows.h>
#if REG_DWORD == REG_DWORD_LITTLE_ENDIAN
#define BYTE_ORDER_SYSTEM LITTLE_ENDIAN
#else
#define BYTE_ORDER_SYSTEM BIG_ENDIAN
#endif
#else #else
#error __BYTE_ORDER__ not defined #error __BYTE_ORDER__ not defined
#endif #endif
#endif
#endif #endif

View File

@ -0,0 +1,30 @@
target_sources(${LIB_FSFW_NAME}
PRIVATE
Clock.cpp
FixedTimeslotTask.cpp
BinarySemaphore.cpp
BinSemaphUsingTask.cpp
CountingSemaphore.cpp
CountingSemaphUsingTask.cpp
MessageQueue.cpp
Mutex.cpp
MutexFactory.cpp
PeriodicTask.cpp
QueueFactory.cpp
SemaphoreFactory.cpp
TaskFactory.cpp
Timekeeper.cpp
TaskManagement.cpp
)
# FreeRTOS is required to link the FSFW now. It is recommended to compile
# FreeRTOS as a static library and set LIB_OS_NAME to the target name of the
# library.
if(NOT LIB_OS_NAME)
message(FATAL_ERROR
"FreeRTOS needs to be linked as a target and "
"LIB_OS_NAME needs to be set to the target"
)
endif()
target_link_libraries(${LIB_FSWFW_NAME} ${LIB_OS_NAME})

View File

@ -13,9 +13,9 @@ target_sources(${LIB_FSFW_NAME}
) )
if(UNIX) if(UNIX)
add_definitions(-pthread)
target_link_libraries(${LIB_FSFW_NAME} target_link_libraries(${LIB_FSFW_NAME}
PRIVATE PRIVATE
rt rt
pthread
) )
endif() endif()

View File

@ -119,7 +119,7 @@ void TcWinUdpPollingTask::setTimeout(double timeoutSeconds) {
int result = setsockopt(serverUdpSocket, SOL_SOCKET, SO_RCVTIMEO, int result = setsockopt(serverUdpSocket, SOL_SOCKET, SO_RCVTIMEO,
reinterpret_cast<const char*>(&timeoutMs), sizeof(DWORD)); reinterpret_cast<const char*>(&timeoutMs), sizeof(DWORD));
if(result == -1) { if(result == -1) {
sif::error << "TcSocketPollingTask::TcSocketPollingTask: Setting " sif::error << "TcWinUdpPollingTask::TcSocketPollingTask: Setting "
"receive timeout failed with " << strerror(errno) << std::endl; "receive timeout failed with " << strerror(errno) << std::endl;
} }
} }
@ -128,17 +128,22 @@ void TcWinUdpPollingTask::handleReadError() {
int error = WSAGetLastError(); int error = WSAGetLastError();
switch(error) { switch(error) {
case(WSANOTINITIALISED): { case(WSANOTINITIALISED): {
sif::info << "TmTcWinUdpBridge::handleReadError: WSANOTINITIALISED: " sif::info << "TcWinUdpPollingTask::handleReadError: WSANOTINITIALISED: "
<< "WSAStartup(...) call " << "necessary" << std::endl; << "WSAStartup(...) call " << "necessary" << std::endl;
break; break;
} }
case(WSAEFAULT): { case(WSAEFAULT): {
sif::info << "TmTcWinUdpBridge::handleReadError: WSADEFAULT: " sif::info << "TcWinUdpPollingTask::handleReadError: WSADEFAULT: "
<< "Bad address " << std::endl; << "Bad address " << std::endl;
break; break;
} }
case(WSAEINVAL): {
sif::info << "TcWinUdpPollingTask::handleReadError: WSAEINVAL: "
<< "Invalid input parameters. " << std::endl;
break;
}
default: { default: {
sif::info << "TmTcWinUdpBridge::handleReadError: Error code: " sif::info << "TcWinUdpPollingTask::handleReadError: Error code: "
<< error << std::endl; << error << std::endl;
break; break;
} }

View File

@ -2,4 +2,6 @@ target_sources(${LIB_FSFW_NAME}
PRIVATE PRIVATE
ConstStorageAccessor.cpp ConstStorageAccessor.cpp
StorageAccessor.cpp StorageAccessor.cpp
LocalPool.cpp
PoolManager.cpp
) )

View File

@ -1,10 +1,10 @@
target_sources(${LIB_FSFW_NAME} target_sources(${LIB_FSFW_NAME}
PRIVATE PRIVATE
AbstractTemperatureSensor.cpp AbstractTemperatureSensor.cpp
CoreComponent.cpp
Heater.cpp Heater.cpp
RedundantHeater.cpp RedundantHeater.cpp
ThermalComponentCore.cpp
ThermalComponent.cpp ThermalComponent.cpp
ThermalModule.cpp ThermalModule.cpp
ThermalMonitor.cpp ThermalMonitorReporter.cpp
) )

View File

@ -6,7 +6,12 @@
#include "../globalfunctions/timevalOperations.h" #include "../globalfunctions/timevalOperations.h"
#include <cstdint> #include <cstdint>
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/time.h> #include <sys/time.h>
#endif
//! Don't use these for time points, type is not large enough for UNIX epoch. //! Don't use these for time points, type is not large enough for UNIX epoch.
using dur_millis_t = uint32_t; using dur_millis_t = uint32_t;

View File

@ -0,0 +1,56 @@
#include "CatchFactory.h"
#include <fsfw/events/EventManager.h>
#include <fsfw/health/HealthTable.h>
#include <fsfw/internalError/InternalErrorReporter.h>
#include <fsfw/objectmanager/frameworkObjects.h>
#include <fsfw/storagemanager/PoolManager.h>
/**
* @brief Produces system objects.
* @details
* Build tasks by using SystemObject Interface (Interface).
* Header files of all tasks must be included
* Please note that an object has to implement the system object interface
* if the interface validity is checked or retrieved later by using the
* get<TargetInterface>(object_id) function from the ObjectManagerIF.
*
* Framework objects are created first.
*
* @ingroup init
*/
void Factory::produce(void) {
setStaticFrameworkObjectIds();
new EventManager(objects::EVENT_MANAGER);
new HealthTable(objects::HEALTH_TABLE);
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
{
PoolManager::LocalPoolConfig poolCfg = {
{100, 16}, {50, 32}, {25, 64} , {15, 128}, {5, 1024}
};
new PoolManager(objects::TC_STORE, poolCfg);
}
{
PoolManager::LocalPoolConfig poolCfg = {
{100, 16}, {50, 32}, {25, 64} , {15, 128}, {5, 1024}
};
new PoolManager(objects::TM_STORE, poolCfg);
}
{
PoolManager::LocalPoolConfig poolCfg = {
{100, 16}, {50, 32}, {25, 64} , {15, 128}, {5, 1024}
};
new PoolManager(objects::IPC_STORE, poolCfg);
}
}
void Factory::setStaticFrameworkObjectIds() {
}

View File

@ -1,5 +1,5 @@
#ifndef FACTORY_H_ #ifndef FSFW_CATCHFACTORY_H_
#define FACTORY_H_ #define FSFW_CATCHFACTORY_H_
#include <fsfw/objectmanager/SystemObjectIF.h> #include <fsfw/objectmanager/SystemObjectIF.h>
@ -13,4 +13,4 @@ namespace Factory {
} }
#endif /* FACTORY_H_ */ #endif /* FSFW_CATCHFACTORY_H_ */

View File

@ -1,6 +1,5 @@
#include <fsfw/unittest/core/CatchFactory.h>
#include "CatchDefinitions.h" #include "CatchDefinitions.h"
#include "CatchFactory.h"
#include <testcfg/cdatapool/dataPoolInit.h> #include <testcfg/cdatapool/dataPoolInit.h>
#ifdef GCOV #ifdef GCOV
@ -10,15 +9,11 @@
#include "../../objectmanager/ObjectManager.h" #include "../../objectmanager/ObjectManager.h"
#include "../../objectmanager/ObjectManagerIF.h" #include "../../objectmanager/ObjectManagerIF.h"
#include "../../storagemanager/StorageManagerIF.h" #include "../../storagemanager/StorageManagerIF.h"
#include "../../datapool/DataPool.h"
#include "../../serviceinterface/ServiceInterfaceStream.h" #include "../../serviceinterface/ServiceInterfaceStream.h"
/* Global instantiations normally done in main.cpp */ /* Global instantiations normally done in main.cpp */
/* Initialize Data Pool */ /* Initialize Data Pool */
//namespace glob {
DataPool dataPool(datapool::dataPoolInit);
//}
namespace sif { namespace sif {

View File

@ -1,60 +0,0 @@
#include "CatchFactory.h"
#include <fsfw/events/EventManager.h>
#include <fsfw/health/HealthTable.h>
#include <fsfw/internalError/InternalErrorReporter.h>
#include <fsfw/objectmanager/frameworkObjects.h>
#include <fsfw/storagemanager/PoolManager.h>
/**
* @brief Produces system objects.
* @details
* Build tasks by using SystemObject Interface (Interface).
* Header files of all tasks must be included
* Please note that an object has to implement the system object interface
* if the interface validity is checked or retrieved later by using the
* get<TargetInterface>(object_id) function from the ObjectManagerIF.
*
* Framework objects are created first.
*
* @ingroup init
*/
void Factory::produce(void) {
setStaticFrameworkObjectIds();
new EventManager(objects::EVENT_MANAGER);
new HealthTable(objects::HEALTH_TABLE);
//new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
{
static constexpr uint8_t NUMBER_OF_POOLS = 5;
const uint16_t element_sizes[NUMBER_OF_POOLS] = {16, 32, 64, 128, 1024};
const uint16_t n_elements[NUMBER_OF_POOLS] = {100, 50, 25, 15, 5};
new PoolManager<NUMBER_OF_POOLS>(objects::TC_STORE, element_sizes,
n_elements);
}
{
static constexpr uint8_t NUMBER_OF_POOLS = 5;
const uint16_t element_sizes[NUMBER_OF_POOLS] = {16, 32, 64, 128, 1024};
const uint16_t n_elements[NUMBER_OF_POOLS] = {100, 50, 25, 15, 5};
new PoolManager<NUMBER_OF_POOLS>(objects::TM_STORE, element_sizes,
n_elements);
}
{
static constexpr uint8_t NUMBER_OF_POOLS = 6;
const uint16_t element_sizes[NUMBER_OF_POOLS] = {32, 64, 512,
1024, 2048, 4096};
const uint16_t n_elements[NUMBER_OF_POOLS] = {200, 100, 50, 25, 15, 5};
new PoolManager<NUMBER_OF_POOLS>(objects::IPC_STORE, element_sizes,
n_elements);
}
}
void Factory::setStaticFrameworkObjectIds() {
}

View File

@ -1,38 +1,30 @@
#ifndef CONFIG_FSFWCONFIG_H_ #ifndef CONFIG_FSFWCONFIG_H_
#define CONFIG_FSFWCONFIG_H_ #define CONFIG_FSFWCONFIG_H_
#include <FSFWVersion.h> #include <cstddef>
#include <cstdint>
//! Used to determine whether C++ ostreams are used //! Used to determine whether C++ ostreams are used
//! Those can lead to code bloat. //! Those can lead to code bloat.
#define FSFW_CPP_OSTREAM_ENABLED 1 #define FSFW_CPP_OSTREAM_ENABLED 1
//! Reduced printout to further decrese code size //! Reduced printout to further decrease code size
//! Be careful, this also turns off most diagnostic prinouts! //! Be careful, this also turns off most diagnostic prinouts!
#define FSFW_REDUCED_PRINTOUT 0 #define FSFW_ENHANCED_PRINTOUT 0
//! Can be used to enable debugging printouts for developing the FSFW //! Can be used to enable additional debugging printouts for developing the FSFW
#define FSFW_DEBUGGING 0 #define FSFW_PRINT_VERBOSITY_LEVEL 0
//! Defines the FIFO depth of each commanding service base which
//! also determines how many commands a CSB service can handle in one cycle
//! simulataneously. This will increase the required RAM for
//! each CSB service !
#define FSFW_CSB_FIFO_DEPTH 6
//! If FSFW_OBJ_EVENT_TRANSLATION is set to one, //! If FSFW_OBJ_EVENT_TRANSLATION is set to one,
//! additional output which requires the translation files translateObjects //! additional output which requires the translation files translateObjects
//! and translateEvents (and their compiled source files) //! and translateEvents (and their compiled source files)
#define FSFW_OBJ_EVENT_TRANSLATION 0 #define FSFW_OBJ_EVENT_TRANSLATION 0
//! If -DDEBUG is supplied in the build defines, there will be
//! additional output which requires the translation files translateObjects
//! and translateEvents (and their compiles source files)
#if FSFW_OBJ_EVENT_TRANSLATION == 1 #if FSFW_OBJ_EVENT_TRANSLATION == 1
//! Specify whether info events are printed too. //! Specify whether info events are printed too.
#define FSFW_DEBUG_INFO 1 #define FSFW_DEBUG_INFO 1
#include <translateObjects.h> #include "objects/translateObjects.h"
#include <translateEvents.h> #include "events/translateEvents.h"
#else #else
#endif #endif
@ -40,5 +32,24 @@
//! will not be provided. This define should be set to 1 if this is the case. //! will not be provided. This define should be set to 1 if this is the case.
#define FSFW_NO_C99_IO 1 #define FSFW_NO_C99_IO 1
//! Specify whether a special mode store is used for Subsystem components.
#define FSFW_USE_MODESTORE 0
namespace fsfwconfig {
//! Default timestamp size. The default timestamp will be an eight byte CDC
//! short timestamp.
static constexpr uint8_t FSFW_MISSION_TIMESTAMP_SIZE = 8;
//! Configure the allocated pool sizes for the event manager.
static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240;
static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120;
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
//! Defines the FIFO depth of each commanding service base which
//! also determines how many commands a CSB service can handle in one cycle
//! simulataneously. This will increase the required RAM for
//! each CSB service !
static constexpr uint8_t FSFW_CSB_FIFO_DEPTH = 3;
}
#endif /* CONFIG_FSFWCONFIG_H_ */ #endif /* CONFIG_FSFWCONFIG_H_ */

View File

@ -15,7 +15,7 @@ SHELL = /bin/sh
# (can be overriden by adding CHIP=chip and BOARD=board to the command-line) # (can be overriden by adding CHIP=chip and BOARD=board to the command-line)
# Unit Test can only be run on host machine for now (Linux) # Unit Test can only be run on host machine for now (Linux)
FRAMEWORK_PATH = fsfw FRAMEWORK_PATH = fsfw
FILE_ROOT = $(FRAMEWORK_PATH)/unittest TEST_FILE_ROOT = $(FRAMEWORK_PATH)/unittest
BOARD = unittest BOARD = unittest
LINUX = 1 LINUX = 1
OS_FSFW = linux OS_FSFW = linux
@ -58,9 +58,10 @@ endif
UNIT_TEST = 1 UNIT_TEST = 1
# General folder paths # General folder paths
CONFIG_PATH = $(FILE_ROOT)/config CONFIG_PATH = testcfg
UNIT_TEST_PATH = $(FILE_ROOT)/tests # Core copy has to be copied as well.
CORE_PATH = $(FILE_ROOT)/core CORE_PATH = core
UNIT_TEST_PATH = $(TEST_FILE_ROOT)/tests
# Output file basename # Output file basename
BASENAME = fsfw BASENAME = fsfw
@ -154,8 +155,8 @@ include $(S)/$(notdir $S).mk
endef endef
$(foreach S,$(SUBDIRS),$(eval $(INCLUDE_FILE))) $(foreach S,$(SUBDIRS),$(eval $(INCLUDE_FILE)))
INCLUDES += $(FILE_ROOT) INCLUDES += $(TEST_FILE_ROOT)
INCLUDES += $(FILE_ROOT)/catch2/ INCLUDES += $(TEST_FILE_ROOT)/catch2/
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Source Files # Source Files

View File

@ -6,11 +6,3 @@ CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/*.cpp) CXXSRC += $(wildcard $(CURRENTPATH)/*.cpp)
INCLUDES += $(CURRENTPATH) INCLUDES += $(CURRENTPATH)
INCLUDES += $(CURRENTPATH)/objects
INCLUDES += $(CURRENTPATH)/ipc
INCLUDES += $(CURRENTPATH)/pollingsequence
INCLUDES += $(CURRENTPATH)/returnvalues
INCLUDES += $(CURRENTPATH)/tmtc
INCLUDES += $(CURRENTPATH)/events
INCLUDES += $(CURRENTPATH)/devices
INCLUDES += $(CURRENTPATH)/cdatapool