From c0c4a3190f1e54d4b5982656f5cc52218928d6ca Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 21 Jun 2021 12:46:32 +0200 Subject: [PATCH 1/5] cleaned up some event descriptions --- datalinklayer/DataLinkLayer.h | 13 +++++++++---- devicehandlers/DeviceHandlerIF.h | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/datalinklayer/DataLinkLayer.h b/datalinklayer/DataLinkLayer.h index 27e690066..aa203785b 100644 --- a/datalinklayer/DataLinkLayer.h +++ b/datalinklayer/DataLinkLayer.h @@ -21,11 +21,16 @@ public: static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SYSTEM_1; //! [EXPORT] : [COMMENT] A RF available signal was detected. P1: raw RFA state, P2: 0 static const Event RF_AVAILABLE = MAKE_EVENT(0, severity::INFO); - static const Event RF_LOST = MAKE_EVENT(1, severity::INFO); //!< A previously found RF available signal was lost. P1: raw RFA state, P2: 0 - static const Event BIT_LOCK = MAKE_EVENT(2, severity::INFO); //!< A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0 - static const Event BIT_LOCK_LOST = MAKE_EVENT(3, severity::INFO); //!< A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0 + //! [EXPORT] : [COMMENT] A previously found RF available signal was lost. + //! P1: raw RFA state, P2: 0 + static const Event RF_LOST = MAKE_EVENT(1, severity::INFO); + //! [EXPORT] : [COMMENT] A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0 + static const Event BIT_LOCK = MAKE_EVENT(2, severity::INFO); + //! [EXPORT] : [COMMENT] A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0 + static const Event BIT_LOCK_LOST = MAKE_EVENT(3, severity::INFO); // static const Event RF_CHAIN_LOST = MAKE_EVENT(4, severity::INFO); //!< The CCSDS Board detected that either bit lock or RF available or both are lost. No parameters. - static const Event FRAME_PROCESSING_FAILED = MAKE_EVENT(5, severity::LOW); //!< The CCSDS Board could not interpret a TC + //! [EXPORT] : [COMMENT] The CCSDS Board could not interpret a TC + static const Event FRAME_PROCESSING_FAILED = MAKE_EVENT(5, severity::LOW); /** * The Constructor sets the passed parameters and nothing else. * @param set_frame_buffer The buffer in which incoming frame candidates are stored. diff --git a/devicehandlers/DeviceHandlerIF.h b/devicehandlers/DeviceHandlerIF.h index fc31cce09..1933c571c 100644 --- a/devicehandlers/DeviceHandlerIF.h +++ b/devicehandlers/DeviceHandlerIF.h @@ -104,7 +104,8 @@ public: static const Event DEVICE_MISSED_REPLY = MAKE_EVENT(5, severity::LOW); static const Event DEVICE_UNKNOWN_REPLY = MAKE_EVENT(6, severity::LOW); static const Event DEVICE_UNREQUESTED_REPLY = MAKE_EVENT(7, severity::LOW); - static const Event INVALID_DEVICE_COMMAND = MAKE_EVENT(8, severity::LOW); //!< Indicates a SW bug in child class. + //! [EXPORT] : [COMMENT] Indicates a SW bug in child class. + static const Event INVALID_DEVICE_COMMAND = MAKE_EVENT(8, severity::LOW); static const Event MONITORING_LIMIT_EXCEEDED = MAKE_EVENT(9, severity::LOW); static const Event MONITORING_AMBIGUOUS = MAKE_EVENT(10, severity::HIGH); -- 2.34.1 From c9156e12198a5b0c190b91eb98bc9fbf9f59c6a5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 12 Jul 2021 22:34:59 +0200 Subject: [PATCH 2/5] some cmake fixes for FreeRTOS --- CMakeLists.txt | 6 +++--- osal/FreeRTOS/CMakeLists.txt | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ba73a3f6..4ff504f7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,12 +43,12 @@ endif() set(FSFW_OSAL_DEFINITION FSFW_HOST) -if(${OS_FSFW} STREQUAL host) +if(OS_FSFW MATCHES host) set(OS_FSFW_NAME "Host") -elseif(${OS_FSFW} STREQUAL linux) +elseif(OS_FSFW MATCHES linux) set(OS_FSFW_NAME "Linux") set(FSFW_OSAL_DEFINITION FSFW_LINUX) -elseif(${OS_FSFW} STREQUAL freertos) +elseif(OS_FSFW MATCHES freertos) set(OS_FSFW_NAME "FreeRTOS") set(FSFW_OSAL_DEFINITION FSFW_FREERTOS) target_link_libraries(${LIB_FSFW_NAME} PRIVATE diff --git a/osal/FreeRTOS/CMakeLists.txt b/osal/FreeRTOS/CMakeLists.txt index 4da24a710..40bdcd0f5 100644 --- a/osal/FreeRTOS/CMakeLists.txt +++ b/osal/FreeRTOS/CMakeLists.txt @@ -22,10 +22,11 @@ target_sources(${LIB_FSFW_NAME} # 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" + message(STATUS + "LIB_OS_NAME is empty. Make sure to include the FreeRTOS header path properly." ) +else() + target_link_libraries(${LIB_FSFW_NAME} PRIVATE + ${LIB_OS_NAME} + ) endif() - -target_link_libraries(${LIB_FSWFW_NAME} ${LIB_OS_NAME}) \ No newline at end of file -- 2.34.1 From 8035af28b98b30ad0179b861d66848c06c859f7f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 12 Jul 2021 22:42:07 +0200 Subject: [PATCH 3/5] using include structure as used in kernel --- osal/FreeRTOS/BinSemaphUsingTask.h | 4 ++-- osal/FreeRTOS/BinarySemaphore.h | 4 ++-- osal/FreeRTOS/Clock.cpp | 4 ++-- osal/FreeRTOS/CountingSemaphUsingTask.h | 4 ++-- osal/FreeRTOS/CountingSemaphore.cpp | 3 ++- osal/FreeRTOS/FixedTimeslotTask.h | 4 ++-- osal/FreeRTOS/FreeRTOSTaskIF.h | 4 ++-- osal/FreeRTOS/MessageQueue.h | 7 ++++--- osal/FreeRTOS/Mutex.h | 4 ++-- osal/FreeRTOS/QueueMapManager.h | 4 ++-- osal/FreeRTOS/TaskManagement.h | 8 ++++---- osal/FreeRTOS/Timekeeper.cpp | 2 +- osal/FreeRTOS/Timekeeper.h | 4 ++-- 13 files changed, 29 insertions(+), 27 deletions(-) diff --git a/osal/FreeRTOS/BinSemaphUsingTask.h b/osal/FreeRTOS/BinSemaphUsingTask.h index ec434853e..895ccefbd 100644 --- a/osal/FreeRTOS/BinSemaphUsingTask.h +++ b/osal/FreeRTOS/BinSemaphUsingTask.h @@ -4,8 +4,8 @@ #include "../../returnvalues/HasReturnvaluesIF.h" #include "../../tasks/SemaphoreIF.h" -#include -#include +#include "FreeRTOS.h" +#include "task.h" #if (tskKERNEL_VERSION_MAJOR == 8 && tskKERNEL_VERSION_MINOR > 2) || \ tskKERNEL_VERSION_MAJOR > 8 diff --git a/osal/FreeRTOS/BinarySemaphore.h b/osal/FreeRTOS/BinarySemaphore.h index 8969d5038..2335292bd 100644 --- a/osal/FreeRTOS/BinarySemaphore.h +++ b/osal/FreeRTOS/BinarySemaphore.h @@ -4,8 +4,8 @@ #include "../../returnvalues/HasReturnvaluesIF.h" #include "../../tasks/SemaphoreIF.h" -#include -#include +#include "FreeRTOS.h" +#include "semphr.h" /** * @brief OS Tool to achieve synchronization of between tasks or between diff --git a/osal/FreeRTOS/Clock.cpp b/osal/FreeRTOS/Clock.cpp index 66207d75e..a81f6985b 100644 --- a/osal/FreeRTOS/Clock.cpp +++ b/osal/FreeRTOS/Clock.cpp @@ -3,8 +3,8 @@ #include "../../timemanager/Clock.h" #include "../../globalfunctions/timevalOperations.h" -#include -#include +#include "FreeRTOS.h" +#include "task.h" #include #include diff --git a/osal/FreeRTOS/CountingSemaphUsingTask.h b/osal/FreeRTOS/CountingSemaphUsingTask.h index 45915b6b5..9ac99c315 100644 --- a/osal/FreeRTOS/CountingSemaphUsingTask.h +++ b/osal/FreeRTOS/CountingSemaphUsingTask.h @@ -4,8 +4,8 @@ #include "CountingSemaphUsingTask.h" #include "../../tasks/SemaphoreIF.h" -#include -#include +#include "FreeRTOS.h" +#include "task.h" #if (tskKERNEL_VERSION_MAJOR == 8 && tskKERNEL_VERSION_MINOR > 2) || \ tskKERNEL_VERSION_MAJOR > 8 diff --git a/osal/FreeRTOS/CountingSemaphore.cpp b/osal/FreeRTOS/CountingSemaphore.cpp index 40884d273..148803a6b 100644 --- a/osal/FreeRTOS/CountingSemaphore.cpp +++ b/osal/FreeRTOS/CountingSemaphore.cpp @@ -3,7 +3,8 @@ #include "../../serviceinterface/ServiceInterfaceStream.h" -#include +#include "FreeRTOS.h" +#include "semphr.h" // Make sure #define configUSE_COUNTING_SEMAPHORES 1 is set in // free FreeRTOSConfig.h file. diff --git a/osal/FreeRTOS/FixedTimeslotTask.h b/osal/FreeRTOS/FixedTimeslotTask.h index f2245ba4a..7494581cf 100644 --- a/osal/FreeRTOS/FixedTimeslotTask.h +++ b/osal/FreeRTOS/FixedTimeslotTask.h @@ -6,8 +6,8 @@ #include "../../tasks/FixedTimeslotTaskIF.h" #include "../../tasks/Typedef.h" -#include -#include +#include "FreeRTOS.h" +#include "task.h" class FixedTimeslotTask: public FixedTimeslotTaskIF, public FreeRTOSTaskIF { public: diff --git a/osal/FreeRTOS/FreeRTOSTaskIF.h b/osal/FreeRTOS/FreeRTOSTaskIF.h index 2a2d94947..08f0df257 100644 --- a/osal/FreeRTOS/FreeRTOSTaskIF.h +++ b/osal/FreeRTOS/FreeRTOSTaskIF.h @@ -1,8 +1,8 @@ #ifndef FSFW_OSAL_FREERTOS_FREERTOSTASKIF_H_ #define FSFW_OSAL_FREERTOS_FREERTOSTASKIF_H_ -#include -#include +#include "FreeRTOS.h" +#include "task.h" class FreeRTOSTaskIF { public: diff --git a/osal/FreeRTOS/MessageQueue.h b/osal/FreeRTOS/MessageQueue.h index be74d4fe0..58324cc61 100644 --- a/osal/FreeRTOS/MessageQueue.h +++ b/osal/FreeRTOS/MessageQueue.h @@ -6,10 +6,11 @@ #include "../../internalError/InternalErrorReporterIF.h" #include "../../ipc/MessageQueueIF.h" #include "../../ipc/MessageQueueMessageIF.h" +#include "../../ipc/MessageQueueMessage.h" + +#include "FreeRTOS.h" +#include "queue.h" -#include -#include -#include /** * @brief This class manages sending and receiving of diff --git a/osal/FreeRTOS/Mutex.h b/osal/FreeRTOS/Mutex.h index 156d431c2..877359d84 100644 --- a/osal/FreeRTOS/Mutex.h +++ b/osal/FreeRTOS/Mutex.h @@ -3,8 +3,8 @@ #include "../../ipc/MutexIF.h" -#include -#include +#include "FreeRTOS.h" +#include "semphr.h" /** * @brief OS component to implement MUTual EXclusion diff --git a/osal/FreeRTOS/QueueMapManager.h b/osal/FreeRTOS/QueueMapManager.h index 91a839f0c..07ca8b9e8 100644 --- a/osal/FreeRTOS/QueueMapManager.h +++ b/osal/FreeRTOS/QueueMapManager.h @@ -5,8 +5,8 @@ #include "../../ipc/messageQueueDefinitions.h" #include "../../ipc/MessageQueueIF.h" -#include "freertos/FreeRTOS.h" -#include "freertos/queue.h" +#include "FreeRTOS.h" +#include "queue.h" #include diff --git a/osal/FreeRTOS/TaskManagement.h b/osal/FreeRTOS/TaskManagement.h index b9aece48b..9aa107978 100644 --- a/osal/FreeRTOS/TaskManagement.h +++ b/osal/FreeRTOS/TaskManagement.h @@ -1,10 +1,10 @@ -#ifndef FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_ -#define FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_ +#ifndef FSFW_OSAL_FREERTOS_TASKMANAGEMENT_H_ +#define FSFW_OSAL_FREERTOS_TASKMANAGEMENT_H_ #include "../../returnvalues/HasReturnvaluesIF.h" -#include -#include +#include "FreeRTOS.h" +#include "task.h" #include diff --git a/osal/FreeRTOS/Timekeeper.cpp b/osal/FreeRTOS/Timekeeper.cpp index d986d832e..1031f0c4d 100644 --- a/osal/FreeRTOS/Timekeeper.cpp +++ b/osal/FreeRTOS/Timekeeper.cpp @@ -1,6 +1,6 @@ #include "Timekeeper.h" -#include +#include "FreeRTOSConfig.h" Timekeeper * Timekeeper::myinstance = nullptr; diff --git a/osal/FreeRTOS/Timekeeper.h b/osal/FreeRTOS/Timekeeper.h index 7d583f7db..d4d0bc07b 100644 --- a/osal/FreeRTOS/Timekeeper.h +++ b/osal/FreeRTOS/Timekeeper.h @@ -3,8 +3,8 @@ #include "../../timemanager/Clock.h" -#include -#include +#include "FreeRTOS.h" +#include "task.h" /** -- 2.34.1 From afebe15dc2ff194d1a111f3ddf45d0e20ba0d436 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 12 Jul 2021 23:01:17 +0200 Subject: [PATCH 4/5] last replacement --- osal/FreeRTOS/PeriodicTask.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osal/FreeRTOS/PeriodicTask.h b/osal/FreeRTOS/PeriodicTask.h index 36ef568f6..04d40fcf3 100644 --- a/osal/FreeRTOS/PeriodicTask.h +++ b/osal/FreeRTOS/PeriodicTask.h @@ -6,8 +6,8 @@ #include "../../tasks/PeriodicTaskIF.h" #include "../../tasks/Typedef.h" -#include -#include +#include "FreeRTOS.h" +#include "task.h" #include -- 2.34.1 From ff63a3438410e4bed2f7c02e6f4a460135f32d00 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 12 Jul 2021 23:32:24 +0200 Subject: [PATCH 5/5] include improvements --- osal/FreeRTOS/SemaphoreFactory.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/osal/FreeRTOS/SemaphoreFactory.cpp b/osal/FreeRTOS/SemaphoreFactory.cpp index df005f6a5..614af75dd 100644 --- a/osal/FreeRTOS/SemaphoreFactory.cpp +++ b/osal/FreeRTOS/SemaphoreFactory.cpp @@ -1,9 +1,10 @@ -#include "../../osal/FreeRTOS/BinarySemaphore.h" -#include "../../osal/FreeRTOS/BinSemaphUsingTask.h" -#include "../../osal/FreeRTOS/CountingSemaphore.h" -#include "../../osal/FreeRTOS/CountingSemaphUsingTask.h" +#include "BinarySemaphore.h" +#include "BinSemaphUsingTask.h" +#include "CountingSemaphore.h" +#include "CountingSemaphUsingTask.h" + #include "../../tasks/SemaphoreFactory.h" -#include "../../serviceinterface/ServiceInterfaceStream.h" +#include "../../serviceinterface/ServiceInterface.h" SemaphoreFactory* SemaphoreFactory::factoryInstance = nullptr; -- 2.34.1