Compare commits

2 Commits

Author SHA1 Message Date
21e9987636 afmt cmakelists.txt 2022-05-20 08:38:57 +02:00
6814d0cf2b apply auto-formatter 2022-05-20 08:36:12 +02:00
11 changed files with 29 additions and 49 deletions

View File

@@ -1,10 +1,8 @@
add_subdirectory(config)
add_subdirectory(example)
target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if(TGT_BSP MATCHES "arm/stm32h743zi-nucleo")
add_subdirectory(stm32h7)
add_subdirectory(stm32h7)
endif()

View File

@@ -1,7 +1,3 @@
target_sources(${TARGET_NAME} PRIVATE
commonPollingSequenceFactory.cpp
)
target_sources(${TARGET_NAME} PRIVATE commonPollingSequenceFactory.cpp)
target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

View File

@@ -1,3 +1 @@
target_sources(${TARGET_NAME} PRIVATE
FsfwTestController.cpp
)
target_sources(${TARGET_NAME} PRIVATE FsfwTestController.cpp)

View File

@@ -1,3 +1 @@
target_sources(${TARGET_NAME} PRIVATE
GenericFactory.cpp
)
target_sources(${TARGET_NAME} PRIVATE GenericFactory.cpp)

View File

@@ -10,6 +10,7 @@
#include "fsfw/health/HealthTable.h"
#include "fsfw/internalerror/InternalErrorReporter.h"
#include "fsfw/pus/CService200ModeCommanding.h"
#include "fsfw/pus/Service11TelecommandScheduling.h"
#include "fsfw/pus/Service17Test.h"
#include "fsfw/pus/Service1TelecommandVerification.h"
#include "fsfw/pus/Service20ParameterManagement.h"
@@ -39,7 +40,7 @@ void ObjectFactory::produceGenericObjects() {
new HealthTable(objects::HEALTH_TABLE);
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
new TimeStamper(objects::TIME_STAMPER);
new CCSDSDistributor(apid::APID, objects::CCSDS_DISTRIBUTOR);
auto* ccsdsDistrib = new CCSDSDistributor(apid::APID, objects::CCSDS_DISTRIBUTOR);
new PUSDistributor(apid::APID, objects::PUS_DISTRIBUTOR, objects::CCSDS_DISTRIBUTOR);
new TmFunnel(objects::TM_FUNNEL);
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
@@ -59,6 +60,8 @@ void ObjectFactory::produceGenericObjects() {
new Service17Test(objects::PUS_SERVICE_17_TEST, apid::APID, pus::PUS_SERVICE_17);
new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::APID,
pus::PUS_SERVICE_20);
new Service11TelecommandScheduling<100>(objects::PUS_SERVICE_11_TC_SCHEDULER, apid::APID,
pus::PUS_SERVICE_11, ccsdsDistrib);
new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::APID,
pus::PUS_SERVICE_200);
#endif /* OBSW_ADD_PUS_STACK == 1 */

View File

@@ -0,0 +1 @@

View File

@@ -1,12 +1,6 @@
target_sources(${TARGET_NAME} PRIVATE
FsfwReaderTask.cpp
FsfwExampleTask.cpp
MutexExample.cpp
FsfwTestTask.cpp
)
target_sources(${TARGET_NAME} PRIVATE FsfwReaderTask.cpp FsfwExampleTask.cpp
MutexExample.cpp FsfwTestTask.cpp)
if(FSFW_ADD_FMT_TESTS)
target_sources(${TARGET_NAME} PRIVATE
testFmt.cpp
)
target_sources(${TARGET_NAME} PRIVATE testFmt.cpp)
endif()

View File

@@ -62,8 +62,9 @@ size_t logTraced(LogLevel level, const char* file, unsigned int line, bool timed
*result.out = '\0';
bufPos += result.size;
} else {
const auto result = fmt::format_to_n(currentIter, PRINT_BUF.size() - 1 - bufPos,
" | {}[l.{}] | {}", file, line, fmt::format(fmt, args...));
const auto result =
fmt::format_to_n(currentIter, PRINT_BUF.size() - 1 - bufPos, " | {}[l.{}] | {}", file,
line, fmt::format(fmt, args...));
*result.out = '\0';
bufPos += result.size;
}
@@ -99,12 +100,14 @@ size_t log(LogLevel level, bool timed, fmt::format_string<T...> fmt, T&&... args
}
template <typename... T>
void fdebug(const char* file, unsigned int line, fmt::format_string<T...> fmt, T&&... args) noexcept {
void fdebug(const char* file, unsigned int line, fmt::format_string<T...> fmt,
T&&... args) noexcept {
logTraced(LogLevel::DEBUG, file, line, false, fmt, args...);
}
template <typename... T>
void fdebug_t(const char* file, unsigned int line, fmt::format_string<T...> fmt, T&&... args) noexcept {
void fdebug_t(const char* file, unsigned int line, fmt::format_string<T...> fmt,
T&&... args) noexcept {
logTraced(LogLevel::DEBUG, file, line, true, fmt, args...);
}

View File

@@ -1,4 +1 @@
target_sources(${TARGET_NAME} PRIVATE
utility.cpp
TmFunnel.cpp
)
target_sources(${TARGET_NAME} PRIVATE utility.cpp TmFunnel.cpp)

View File

@@ -1,9 +1,7 @@
target_sources(${TARGET_NAME} PRIVATE
STM32TestTask.cpp
)
target_sources(${TARGET_NAME} PRIVATE STM32TestTask.cpp)
option(STM32_ADD_NETWORKING_CODE "Add networking code requiring lwIP" ON)
if(STM32_ADD_NETWORKING_CODE)
add_subdirectory(networking)
endif()
add_subdirectory(networking)
endif()

View File

@@ -1,14 +1,8 @@
# These are part of the RTEMS BSP for RTEMS
if(FSFW_OSAL MATCHES freertos)
target_sources(${TARGET_NAME} PRIVATE
ethernetif.c
)
target_sources(${TARGET_NAME} PRIVATE ethernetif.c)
endif()
target_sources(${TARGET_NAME} PRIVATE
UdpTcLwIpPollingTask.cpp
TmTcLwIpUdpBridge.cpp
networking.cpp
app_dhcp.cpp
app_ethernet.cpp
)
target_sources(
${TARGET_NAME} PRIVATE UdpTcLwIpPollingTask.cpp TmTcLwIpUdpBridge.cpp
networking.cpp app_dhcp.cpp app_ethernet.cpp)