From 508f31a359bd7cb5652f5e260bcd7ead6cb78e9a Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 2 Nov 2020 14:19:56 +0100 Subject: [PATCH 01/13] adaptions so it compiles --- devicehandlers/DeviceHandlerIF.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devicehandlers/DeviceHandlerIF.h b/devicehandlers/DeviceHandlerIF.h index 52a3be4d..10907a89 100644 --- a/devicehandlers/DeviceHandlerIF.h +++ b/devicehandlers/DeviceHandlerIF.h @@ -18,6 +18,8 @@ public: static const uint8_t TRANSITION_MODE_CHILD_ACTION_MASK = 0x20; static const uint8_t TRANSITION_MODE_BASE_ACTION_MASK = 0x10; + static constexpr Command_t NO_COMMAND = 0xffffffff; + /** * @brief This is the mode the device handler is in. * From 2f993cf39a91bce9cbebc3845476578ba39727e5 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 2 Nov 2020 15:51:52 +0100 Subject: [PATCH 02/13] some minor form stuff --- action/ActionHelper.cpp | 1 + action/ActionMessage.h | 18 +++++++++++------- action/CommandsActionsIF.h | 15 +++++++++------ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/action/ActionHelper.cpp b/action/ActionHelper.cpp index 0d3baa88..28557916 100644 --- a/action/ActionHelper.cpp +++ b/action/ActionHelper.cpp @@ -1,5 +1,6 @@ #include "ActionHelper.h" #include "HasActionsIF.h" + #include "../ipc/MessageQueueSenderIF.h" #include "../objectmanager/ObjectManagerIF.h" diff --git a/action/ActionMessage.h b/action/ActionMessage.h index 0a718aab..7a859de0 100644 --- a/action/ActionMessage.h +++ b/action/ActionMessage.h @@ -1,5 +1,5 @@ -#ifndef ACTIONMESSAGE_H_ -#define ACTIONMESSAGE_H_ +#ifndef FSFW_ACTION_ACTIONMESSAGE_H_ +#define FSFW_ACTION_ACTIONMESSAGE_H_ #include "../ipc/CommandMessage.h" #include "../objectmanager/ObjectManagerIF.h" @@ -18,15 +18,19 @@ public: static const Command_t COMPLETION_SUCCESS = MAKE_COMMAND_ID(5); static const Command_t COMPLETION_FAILED = MAKE_COMMAND_ID(6); virtual ~ActionMessage(); - static void setCommand(CommandMessage* message, ActionId_t fid, store_address_t parameters); + static void setCommand(CommandMessage* message, ActionId_t fid, + store_address_t parameters); static ActionId_t getActionId(const CommandMessage* message ); static store_address_t getStoreId(const CommandMessage* message ); - static void setStepReply(CommandMessage* message, ActionId_t fid, uint8_t step, ReturnValue_t result = HasReturnvaluesIF::RETURN_OK); + static void setStepReply(CommandMessage* message, ActionId_t fid, + uint8_t step, ReturnValue_t result = HasReturnvaluesIF::RETURN_OK); static uint8_t getStep(const CommandMessage* message ); static ReturnValue_t getReturnCode(const CommandMessage* message ); - static void setDataReply(CommandMessage* message, ActionId_t actionId, store_address_t data); - static void setCompletionReply(CommandMessage* message, ActionId_t fid, ReturnValue_t result = HasReturnvaluesIF::RETURN_OK); + static void setDataReply(CommandMessage* message, ActionId_t actionId, + store_address_t data); + static void setCompletionReply(CommandMessage* message, ActionId_t fid, + ReturnValue_t result = HasReturnvaluesIF::RETURN_OK); static void clear(CommandMessage* message); }; -#endif /* ACTIONMESSAGE_H_ */ +#endif /* FSFW_ACTION_ACTIONMESSAGE_H_ */ diff --git a/action/CommandsActionsIF.h b/action/CommandsActionsIF.h index 3d04015d..491bfc70 100644 --- a/action/CommandsActionsIF.h +++ b/action/CommandsActionsIF.h @@ -1,5 +1,5 @@ -#ifndef COMMANDSACTIONSIF_H_ -#define COMMANDSACTIONSIF_H_ +#ifndef FSFW_ACTION_COMMANDSACTIONSIF_H_ +#define FSFW_ACTION_COMMANDSACTIONSIF_H_ #include "CommandActionHelper.h" #include "../returnvalues/HasReturnvaluesIF.h" @@ -24,11 +24,14 @@ public: virtual MessageQueueIF* getCommandQueuePtr() = 0; protected: virtual void stepSuccessfulReceived(ActionId_t actionId, uint8_t step) = 0; - virtual void stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) = 0; - virtual void dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) = 0; + virtual void stepFailedReceived(ActionId_t actionId, uint8_t step, + ReturnValue_t returnCode) = 0; + virtual void dataReceived(ActionId_t actionId, const uint8_t* data, + uint32_t size) = 0; virtual void completionSuccessfulReceived(ActionId_t actionId) = 0; - virtual void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) = 0; + virtual void completionFailedReceived(ActionId_t actionId, + ReturnValue_t returnCode) = 0; }; -#endif /* COMMANDSACTIONSIF_H_ */ +#endif /* FSFW_ACTION_COMMANDSACTIONSIF_H_ */ From 7d83767c2b408a05c95424f818457d0e57060eeb Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 2 Nov 2020 16:45:19 +0100 Subject: [PATCH 03/13] include added --- fsfw.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fsfw.mk b/fsfw.mk index 3639717b..f2cdd7ab 100644 --- a/fsfw.mk +++ b/fsfw.mk @@ -70,3 +70,5 @@ CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcpacket/packetmatcher/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcpacket/pus/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcservices/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/pus/*.cpp) + +INCLUDES += $(CURRENTPATH) From 3067259a9b266fed39e8333fd9a29439718b68e0 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 2 Nov 2020 17:19:24 +0100 Subject: [PATCH 04/13] include added --- fsfw.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fsfw.mk b/fsfw.mk index 3639717b..f2cdd7ab 100644 --- a/fsfw.mk +++ b/fsfw.mk @@ -70,3 +70,5 @@ CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcpacket/packetmatcher/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcpacket/pus/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcservices/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/pus/*.cpp) + +INCLUDES += $(CURRENTPATH) From cc51d9ace922fa0a0d141345a6de33ae84cd97f6 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Mon, 2 Nov 2020 17:21:25 +0100 Subject: [PATCH 05/13] small fix so that it compiles --- devicehandlers/DeviceHandlerIF.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devicehandlers/DeviceHandlerIF.h b/devicehandlers/DeviceHandlerIF.h index 52a3be4d..10c9b89a 100644 --- a/devicehandlers/DeviceHandlerIF.h +++ b/devicehandlers/DeviceHandlerIF.h @@ -18,6 +18,8 @@ public: static const uint8_t TRANSITION_MODE_CHILD_ACTION_MASK = 0x20; static const uint8_t TRANSITION_MODE_BASE_ACTION_MASK = 0x10; + static constexpr DeviceCommandId_t NO_COMMAND = 0xffffffff; + /** * @brief This is the mode the device handler is in. * From 113397c6c6ae4c46341f4880710e4e4d9b6e7630 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Sat, 7 Nov 2020 20:30:42 +0100 Subject: [PATCH 06/13] udp bridge for embedded linux --- osal/linux/TcUnixUdpPollingTask.cpp | 6 +++--- osal/linux/TmTcUnixUdpBridge.cpp | 22 +++++++++++++++------- osal/linux/TmTcUnixUdpBridge.h | 5 ++++- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/osal/linux/TcUnixUdpPollingTask.cpp b/osal/linux/TcUnixUdpPollingTask.cpp index 670ba804..7df56a95 100644 --- a/osal/linux/TcUnixUdpPollingTask.cpp +++ b/osal/linux/TcUnixUdpPollingTask.cpp @@ -33,7 +33,7 @@ ReturnValue_t TcUnixUdpPollingTask::performOperation(uint8_t opCode) { while(1) { //! Sender Address is cached here. struct sockaddr_in senderAddress; - socklen_t senderSockLen = 0; + socklen_t senderSockLen = sizeof(senderAddress); ssize_t bytesReceived = recvfrom(serverUdpSocket, receptionBuffer.data(), frameSize, receptionFlags, reinterpret_cast(&senderAddress), &senderSockLen); @@ -45,8 +45,8 @@ ReturnValue_t TcUnixUdpPollingTask::performOperation(uint8_t opCode) { continue; } -// sif::debug << "TcSocketPollingTask::performOperation: " << bytesReceived -// << " bytes received" << std::endl; + sif::debug << "TcSocketPollingTask::performOperation: " << bytesReceived + << " bytes received" << std::endl; ReturnValue_t result = handleSuccessfullTcRead(bytesReceived); if(result != HasReturnvaluesIF::RETURN_FAILED) { diff --git a/osal/linux/TmTcUnixUdpBridge.cpp b/osal/linux/TmTcUnixUdpBridge.cpp index b55291b3..71a39384 100644 --- a/osal/linux/TmTcUnixUdpBridge.cpp +++ b/osal/linux/TmTcUnixUdpBridge.cpp @@ -65,13 +65,17 @@ TmTcUnixUdpBridge::~TmTcUnixUdpBridge() { ReturnValue_t TmTcUnixUdpBridge::sendTm(const uint8_t *data, size_t dataLen) { int flags = 0; - clientAddress.sin_addr.s_addr = htons(INADDR_ANY); - //clientAddress.sin_addr.s_addr = inet_addr("127.73.73.1"); - clientAddressLen = sizeof(serverAddress); + MutexHelper lock(mutex, MutexIF::TimeoutType::WAITING, 10); -// char ipAddress [15]; -// sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET, -// &clientAddress.sin_addr.s_addr, ipAddress, 15) << std::endl; + if(ipAddrAnySet){ + clientAddress.sin_addr.s_addr = htons(INADDR_ANY); + //clientAddress.sin_addr.s_addr = inet_addr("127.73.73.1"); + clientAddressLen = sizeof(serverAddress); + } + + char ipAddress [15]; + sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET, + &clientAddress.sin_addr.s_addr, ipAddress, 15) << std::endl; ssize_t bytesSent = sendto(serverSocket, data, dataLen, flags, reinterpret_cast(&clientAddress), clientAddressLen); @@ -85,7 +89,7 @@ ReturnValue_t TmTcUnixUdpBridge::sendTm(const uint8_t *data, size_t dataLen) { return HasReturnvaluesIF::RETURN_OK; } -void TmTcUnixUdpBridge::checkAndSetClientAddress(sockaddr_in newAddress) { +void TmTcUnixUdpBridge::checkAndSetClientAddress(sockaddr_in& newAddress) { MutexHelper lock(mutex, MutexIF::TimeoutType::WAITING, 10); // char ipAddress [15]; @@ -168,3 +172,7 @@ void TmTcUnixUdpBridge::handleSendError() { } } +void TmTcUnixUdpBridge::setClientAddressToAny(bool ipAddrAnySet){ + this->ipAddrAnySet = ipAddrAnySet; +} + diff --git a/osal/linux/TmTcUnixUdpBridge.h b/osal/linux/TmTcUnixUdpBridge.h index 5245c44c..ae6f6adc 100644 --- a/osal/linux/TmTcUnixUdpBridge.h +++ b/osal/linux/TmTcUnixUdpBridge.h @@ -20,8 +20,9 @@ public: uint16_t serverPort = 0xFFFF,uint16_t clientPort = 0xFFFF); virtual~ TmTcUnixUdpBridge(); - void checkAndSetClientAddress(sockaddr_in clientAddress); + void checkAndSetClientAddress(sockaddr_in& clientAddress); + void setClientAddressToAny(bool ipAddrAnySet); protected: virtual ReturnValue_t sendTm(const uint8_t * data, size_t dataLen) override; @@ -36,6 +37,8 @@ private: struct sockaddr_in serverAddress; socklen_t serverAddressLen = 0; + bool ipAddrAnySet = false; + //! Access to the client address is mutex protected as it is set //! by another task. MutexIF* mutex; From 83568e11d11e66f023ede3b7701df884c2129317 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Sat, 7 Nov 2020 20:37:48 +0100 Subject: [PATCH 07/13] removed unwanted changes --- devicehandlers/DeviceHandlerIF.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/devicehandlers/DeviceHandlerIF.h b/devicehandlers/DeviceHandlerIF.h index 10c9b89a..52a3be4d 100644 --- a/devicehandlers/DeviceHandlerIF.h +++ b/devicehandlers/DeviceHandlerIF.h @@ -18,8 +18,6 @@ public: static const uint8_t TRANSITION_MODE_CHILD_ACTION_MASK = 0x20; static const uint8_t TRANSITION_MODE_BASE_ACTION_MASK = 0x10; - static constexpr DeviceCommandId_t NO_COMMAND = 0xffffffff; - /** * @brief This is the mode the device handler is in. * From 210d2de11e25bc2d521687aef35cf5f764df08ce Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Sat, 7 Nov 2020 20:40:01 +0100 Subject: [PATCH 08/13] fetched fsfw.mk from upstream master --- fsfw.mk | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/fsfw.mk b/fsfw.mk index f2cdd7ab..c2c6e747 100644 --- a/fsfw.mk +++ b/fsfw.mk @@ -28,25 +28,12 @@ CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/*.cpp) # select the OS ifeq ($(OS_FSFW),rtems) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/rtems/*.cpp) - else ifeq ($(OS_FSFW),linux) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/linux/*.cpp) - else ifeq ($(OS_FSFW),freeRTOS) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/FreeRTOS/*.cpp) - else ifeq ($(OS_FSFW),host) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/host/*.cpp) -ifeq ($(OS),Windows_NT) -CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/windows/*.cpp) -else -# For now, the linux UDP bridge sources needs to be included manually by upper makefile -# for host OS because we can't be sure the OS is linux. -# Following lines can be used to do this: -# CXXSRC += $(FRAMEWORK_PATH)/osal/linux/TcUnixUdpPollingTask.cpp -# CXXSRC += $(FRAMEWORK_PATH)/osal/linux/TmTcUnixUdpBridge.cpp -endif - else $(error invalid OS_FSFW specified, valid OS_FSFW are rtems, linux, freeRTOS, host) endif @@ -70,5 +57,3 @@ CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcpacket/packetmatcher/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcpacket/pus/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/tmtcservices/*.cpp) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/pus/*.cpp) - -INCLUDES += $(CURRENTPATH) From 3eefcd3a2d52b7420c33dd34bc334093a37c3b03 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Sat, 7 Nov 2020 20:45:00 +0100 Subject: [PATCH 09/13] fsfw.mk adjusted to upstream master --- fsfw.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fsfw.mk b/fsfw.mk index c2c6e747..3639717b 100644 --- a/fsfw.mk +++ b/fsfw.mk @@ -28,12 +28,25 @@ CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/*.cpp) # select the OS ifeq ($(OS_FSFW),rtems) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/rtems/*.cpp) + else ifeq ($(OS_FSFW),linux) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/linux/*.cpp) + else ifeq ($(OS_FSFW),freeRTOS) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/FreeRTOS/*.cpp) + else ifeq ($(OS_FSFW),host) CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/host/*.cpp) +ifeq ($(OS),Windows_NT) +CXXSRC += $(wildcard $(FRAMEWORK_PATH)/osal/windows/*.cpp) +else +# For now, the linux UDP bridge sources needs to be included manually by upper makefile +# for host OS because we can't be sure the OS is linux. +# Following lines can be used to do this: +# CXXSRC += $(FRAMEWORK_PATH)/osal/linux/TcUnixUdpPollingTask.cpp +# CXXSRC += $(FRAMEWORK_PATH)/osal/linux/TmTcUnixUdpBridge.cpp +endif + else $(error invalid OS_FSFW specified, valid OS_FSFW are rtems, linux, freeRTOS, host) endif From bc81b5893c93cd6a68361bb2f1235220edc055da Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Mon, 9 Nov 2020 17:34:53 +0100 Subject: [PATCH 10/13] removed debug output --- osal/linux/TmTcUnixUdpBridge.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osal/linux/TmTcUnixUdpBridge.cpp b/osal/linux/TmTcUnixUdpBridge.cpp index 71a39384..ab28623e 100644 --- a/osal/linux/TmTcUnixUdpBridge.cpp +++ b/osal/linux/TmTcUnixUdpBridge.cpp @@ -73,9 +73,9 @@ ReturnValue_t TmTcUnixUdpBridge::sendTm(const uint8_t *data, size_t dataLen) { clientAddressLen = sizeof(serverAddress); } - char ipAddress [15]; - sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET, - &clientAddress.sin_addr.s_addr, ipAddress, 15) << std::endl; +// char ipAddress [15]; +// sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET, +// &clientAddress.sin_addr.s_addr, ipAddress, 15) << std::endl; ssize_t bytesSent = sendto(serverSocket, data, dataLen, flags, reinterpret_cast(&clientAddress), clientAddressLen); From 37fc22a11785d6363954169ba6bae3d40a4be493 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 9 Nov 2020 21:21:56 +0100 Subject: [PATCH 11/13] config folder renamed and improved --- .../{config => fsfwconfig}/FSFWConfig.h | 1 + .../{config => fsfwconfig}/OBSWConfig.h | 0 .../{config => fsfwconfig}/OBSWVersion.h | 0 .../devices/logicalAddresses.cpp | 0 .../devices/logicalAddresses.h | 2 +- .../devices/powerSwitcherList.cpp | 0 .../devices/powerSwitcherList.h | 0 .../events/subsystemIdRanges.h | 0 .../config.mk => fsfwconfig/fsfwconfig.mk} | 0 .../ipc/missionMessageTypes.cpp | 3 +- .../ipc/missionMessageTypes.h | 0 .../objects/Factory.cpp | 14 +- .../{config => fsfwconfig}/objects/Factory.h | 0 .../objects/systemObjectList.h | 0 .../fsfwconfig/objects/translateObjects.cpp | 271 ++++++++++++++++++ .../fsfwconfig/objects/translateObjects.h | 9 + .../PollingSequenceFactory.cpp | 0 .../pollingsequence/PollingSequenceFactory.h | 0 .../returnvalues/classIds.h | 0 defaultcfg/{config => fsfwconfig}/tmtc/apid.h | 0 .../{config => fsfwconfig}/tmtc/pusIds.h | 0 21 files changed, 291 insertions(+), 9 deletions(-) rename defaultcfg/{config => fsfwconfig}/FSFWConfig.h (98%) rename defaultcfg/{config => fsfwconfig}/OBSWConfig.h (100%) rename defaultcfg/{config => fsfwconfig}/OBSWVersion.h (100%) rename defaultcfg/{config => fsfwconfig}/devices/logicalAddresses.cpp (100%) rename defaultcfg/{config => fsfwconfig}/devices/logicalAddresses.h (89%) rename defaultcfg/{config => fsfwconfig}/devices/powerSwitcherList.cpp (100%) rename defaultcfg/{config => fsfwconfig}/devices/powerSwitcherList.h (100%) rename defaultcfg/{config => fsfwconfig}/events/subsystemIdRanges.h (100%) rename defaultcfg/{config/config.mk => fsfwconfig/fsfwconfig.mk} (100%) rename defaultcfg/{config => fsfwconfig}/ipc/missionMessageTypes.cpp (79%) rename defaultcfg/{config => fsfwconfig}/ipc/missionMessageTypes.h (100%) rename defaultcfg/{config => fsfwconfig}/objects/Factory.cpp (75%) rename defaultcfg/{config => fsfwconfig}/objects/Factory.h (100%) rename defaultcfg/{config => fsfwconfig}/objects/systemObjectList.h (100%) create mode 100644 defaultcfg/fsfwconfig/objects/translateObjects.cpp create mode 100644 defaultcfg/fsfwconfig/objects/translateObjects.h rename defaultcfg/{config => fsfwconfig}/pollingsequence/PollingSequenceFactory.cpp (100%) rename defaultcfg/{config => fsfwconfig}/pollingsequence/PollingSequenceFactory.h (100%) rename defaultcfg/{config => fsfwconfig}/returnvalues/classIds.h (100%) rename defaultcfg/{config => fsfwconfig}/tmtc/apid.h (100%) rename defaultcfg/{config => fsfwconfig}/tmtc/pusIds.h (100%) diff --git a/defaultcfg/config/FSFWConfig.h b/defaultcfg/fsfwconfig/FSFWConfig.h similarity index 98% rename from defaultcfg/config/FSFWConfig.h rename to defaultcfg/fsfwconfig/FSFWConfig.h index ea86152c..be3717b4 100644 --- a/defaultcfg/config/FSFWConfig.h +++ b/defaultcfg/fsfwconfig/FSFWConfig.h @@ -3,6 +3,7 @@ #include #include +#include //! Used to determine whether C++ ostreams are used //! Those can lead to code bloat. diff --git a/defaultcfg/config/OBSWConfig.h b/defaultcfg/fsfwconfig/OBSWConfig.h similarity index 100% rename from defaultcfg/config/OBSWConfig.h rename to defaultcfg/fsfwconfig/OBSWConfig.h diff --git a/defaultcfg/config/OBSWVersion.h b/defaultcfg/fsfwconfig/OBSWVersion.h similarity index 100% rename from defaultcfg/config/OBSWVersion.h rename to defaultcfg/fsfwconfig/OBSWVersion.h diff --git a/defaultcfg/config/devices/logicalAddresses.cpp b/defaultcfg/fsfwconfig/devices/logicalAddresses.cpp similarity index 100% rename from defaultcfg/config/devices/logicalAddresses.cpp rename to defaultcfg/fsfwconfig/devices/logicalAddresses.cpp diff --git a/defaultcfg/config/devices/logicalAddresses.h b/defaultcfg/fsfwconfig/devices/logicalAddresses.h similarity index 89% rename from defaultcfg/config/devices/logicalAddresses.h rename to defaultcfg/fsfwconfig/devices/logicalAddresses.h index 174fa788..e0827ba3 100644 --- a/defaultcfg/config/devices/logicalAddresses.h +++ b/defaultcfg/fsfwconfig/devices/logicalAddresses.h @@ -1,8 +1,8 @@ #ifndef CONFIG_DEVICES_LOGICALADDRESSES_H_ #define CONFIG_DEVICES_LOGICALADDRESSES_H_ -#include #include +#include "../objects/systemObjectList.h" #include /** diff --git a/defaultcfg/config/devices/powerSwitcherList.cpp b/defaultcfg/fsfwconfig/devices/powerSwitcherList.cpp similarity index 100% rename from defaultcfg/config/devices/powerSwitcherList.cpp rename to defaultcfg/fsfwconfig/devices/powerSwitcherList.cpp diff --git a/defaultcfg/config/devices/powerSwitcherList.h b/defaultcfg/fsfwconfig/devices/powerSwitcherList.h similarity index 100% rename from defaultcfg/config/devices/powerSwitcherList.h rename to defaultcfg/fsfwconfig/devices/powerSwitcherList.h diff --git a/defaultcfg/config/events/subsystemIdRanges.h b/defaultcfg/fsfwconfig/events/subsystemIdRanges.h similarity index 100% rename from defaultcfg/config/events/subsystemIdRanges.h rename to defaultcfg/fsfwconfig/events/subsystemIdRanges.h diff --git a/defaultcfg/config/config.mk b/defaultcfg/fsfwconfig/fsfwconfig.mk similarity index 100% rename from defaultcfg/config/config.mk rename to defaultcfg/fsfwconfig/fsfwconfig.mk diff --git a/defaultcfg/config/ipc/missionMessageTypes.cpp b/defaultcfg/fsfwconfig/ipc/missionMessageTypes.cpp similarity index 79% rename from defaultcfg/config/ipc/missionMessageTypes.cpp rename to defaultcfg/fsfwconfig/ipc/missionMessageTypes.cpp index e2edbf9c..b41b87ba 100644 --- a/defaultcfg/config/ipc/missionMessageTypes.cpp +++ b/defaultcfg/fsfwconfig/ipc/missionMessageTypes.cpp @@ -1,4 +1,5 @@ -#include +#include "missionMessageTypes.h" + #include void messagetypes::clearMissionMessage(CommandMessage* message) { diff --git a/defaultcfg/config/ipc/missionMessageTypes.h b/defaultcfg/fsfwconfig/ipc/missionMessageTypes.h similarity index 100% rename from defaultcfg/config/ipc/missionMessageTypes.h rename to defaultcfg/fsfwconfig/ipc/missionMessageTypes.h diff --git a/defaultcfg/config/objects/Factory.cpp b/defaultcfg/fsfwconfig/objects/Factory.cpp similarity index 75% rename from defaultcfg/config/objects/Factory.cpp rename to defaultcfg/fsfwconfig/objects/Factory.cpp index 51dd6130..41333b1c 100644 --- a/defaultcfg/config/objects/Factory.cpp +++ b/defaultcfg/fsfwconfig/objects/Factory.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -31,15 +32,15 @@ void Factory::produce(void) { setStaticFrameworkObjectIds(); new EventManager(objects::EVENT_MANAGER); new HealthTable(objects::HEALTH_TABLE); - //new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER); + new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER); } void Factory::setStaticFrameworkObjectIds() { - PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR; - PusServiceBase::packetDestination = objects::TM_FUNNEL; + PusServiceBase::packetSource = objects::NO_OBJECT; + PusServiceBase::packetDestination = objects::NO_OBJECT; - CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR; - CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL; + CommandingServiceBase::defaultPacketSource = objects::NO_OBJECT; + CommandingServiceBase::defaultPacketDestination = objects::NO_OBJECT; VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION; @@ -48,7 +49,6 @@ void Factory::setStaticFrameworkObjectIds() { DeviceHandlerFailureIsolation::powerConfirmationId = objects::NO_OBJECT; - TmPacketStored::timeStamperId = objects::PUS_TIME; - //TmFunnel::downlinkDestination = objects::NO_OBJECT; + TmPacketStored::timeStamperId = objects::NO_OBJECT; } diff --git a/defaultcfg/config/objects/Factory.h b/defaultcfg/fsfwconfig/objects/Factory.h similarity index 100% rename from defaultcfg/config/objects/Factory.h rename to defaultcfg/fsfwconfig/objects/Factory.h diff --git a/defaultcfg/config/objects/systemObjectList.h b/defaultcfg/fsfwconfig/objects/systemObjectList.h similarity index 100% rename from defaultcfg/config/objects/systemObjectList.h rename to defaultcfg/fsfwconfig/objects/systemObjectList.h diff --git a/defaultcfg/fsfwconfig/objects/translateObjects.cpp b/defaultcfg/fsfwconfig/objects/translateObjects.cpp new file mode 100644 index 00000000..73cd02bf --- /dev/null +++ b/defaultcfg/fsfwconfig/objects/translateObjects.cpp @@ -0,0 +1,271 @@ +/** + * @brief Auto-generated object translation file. Contains 86 translations. + * Generated on: 2020-08-25 00:57:14 + **/ +#include "translateObjects.h" + +const char *AT91_UART2_TEST_TASK_STRING = "AT91_UART2_TEST_TASK"; +const char *ARDUINO_0_STRING = "ARDUINO_0"; +const char *ARDUINO_1_STRING = "ARDUINO_1"; +const char *ARDUINO_2_STRING = "ARDUINO_2"; +const char *ARDUINO_3_STRING = "ARDUINO_3"; +const char *ARDUINO_4_STRING = "ARDUINO_4"; +const char *AT91_I2C_TEST_TASK_STRING = "AT91_I2C_TEST_TASK"; +const char *LED_TASK_STRING = "LED_TASK"; +const char *TEST_TASK_STRING = "TEST_TASK"; +const char *PCDU_HANDLER_STRING = "PCDU_HANDLER"; +const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER"; +const char *SuS_ADC1_DEC2_STRING = "SuS_ADC1_DEC2"; +const char *GPS0_HANDLER_STRING = "GPS0_HANDLER"; +const char *DLR_PVCH_STRING = "DLR_PVCH"; +const char *GYRO1_STRING = "GYRO1"; +const char *DLR_IRAS_STRING = "DLR_IRAS"; +const char *SPI_Test_PT1000_STRING = "SPI_Test_PT1000"; +const char *PT1000_Syrlinks_DEC1_O1_STRING = "PT1000_Syrlinks_DEC1_O1"; +const char *PT1000_Camera_DEC1_O2_STRING = "PT1000_Camera_DEC1_O2"; +const char *PT1000_SuS1_DEC1_O3_STRING = "PT1000_SuS1_DEC1_O3"; +const char *PT1000_SuS2_DEC1_O4_STRING = "PT1000_SuS2_DEC1_O4"; +const char *PT1000_SuS3_DEC1_O5_STRING = "PT1000_SuS3_DEC1_O5"; +const char *PT1000_PVHC_DEC1_O6_STRING = "PT1000_PVHC_DEC1_O6"; +const char *SPI_Test_Gyro_STRING = "SPI_Test_Gyro"; +const char *PT1000_CCSDS1_DEC2_STRING = "PT1000_CCSDS1_DEC2"; +const char *PT1000_MGT1_DEC2_STRING = "PT1000_MGT1_DEC2"; +const char *PT1000_SuS4_DEC2_STRING = "PT1000_SuS4_DEC2"; +const char *PT1000_SuS5_DEC2_STRING = "PT1000_SuS5_DEC2"; +const char *PT1000_SuS6_DEC2_STRING = "PT1000_SuS6_DEC2"; +const char *PT1000_PVCH_DEC2_STRING = "PT1000_PVCH_DEC2"; +const char *PT1000_Iridium_DEC3_STRING = "PT1000_Iridium_DEC3"; +const char *PT1000_CCSDS2_DEC3_STRING = "PT1000_CCSDS2_DEC3"; +const char *PT1000_SuS7_DEC3_STRING = "PT1000_SuS7_DEC3"; +const char *PT1000_SuS8_DEC3_STRING = "PT1000_SuS8_DEC3"; +const char *PT1000_PVCH_DEC3_STRING = "PT1000_PVCH_DEC3"; +const char *GYRO2_STRING = "GYRO2"; +const char *PT1000_PLOC_DEC4_STRING = "PT1000_PLOC_DEC4"; +const char *PT1000_SuS9_DEC4_STRING = "PT1000_SuS9_DEC4"; +const char *PT1000_SuS10_DEC4_STRING = "PT1000_SuS10_DEC4"; +const char *PT1000_PVHC_DEC4_STRING = "PT1000_PVHC_DEC4"; +const char *SuS_ADC_DEC4_STRING = "SuS_ADC_DEC4"; +const char *GPS1_HANDLER_STRING = "GPS1_HANDLER"; +const char *DUMMY_GPS_COM_IF_STRING = "DUMMY_GPS_COM_IF"; +const char *RS232_DEVICE_COM_IF_STRING = "RS232_DEVICE_COM_IF"; +const char *I2C_DEVICE_COM_IF_STRING = "I2C_DEVICE_COM_IF"; +const char *GPIO_DEVICE_COM_IF_STRING = "GPIO_DEVICE_COM_IF"; +const char *SPI_POLLING_TASK_STRING = "SPI_POLLING_TASK"; +const char *SPI_DEVICE_COM_IF_STRING = "SPI_DEVICE_COM_IF"; +const char *DUMMY_ECHO_COM_IF_STRING = "DUMMY_ECHO_COM_IF"; +const char *SD_CARD_HANDLER_STRING = "SD_CARD_HANDLER"; +const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR"; +const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR"; +const char *UDP_TMTC_BRIDGE_STRING = "UDP_TMTC_BRIDGE"; +const char *EMAC_POLLING_TASK_STRING = "EMAC_POLLING_TASK"; +const char *SERIAL_TMTC_BRIDGE_STRING = "SERIAL_TMTC_BRIDGE"; +const char *SERIAL_RING_BUFFER_STRING = "SERIAL_RING_BUFFER"; +const char *SERIAL_POLLING_TASK_STRING = "SERIAL_POLLING_TASK"; +const char *PUS_SERVICE_1_STRING = "PUS_SERVICE_1"; +const char *PUS_SERVICE_2_STRING = "PUS_SERVICE_2"; +const char *PUS_SERVICE_3_STRING = "PUS_SERVICE_3"; +const char *PUS_SERVICE_3_PSB_STRING = "PUS_SERVICE_3_PSB"; +const char *PUS_SERVICE_5_STRING = "PUS_SERVICE_5"; +const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; +const char *PUS_SERVICE_8_STRING = "PUS_SERVICE_8"; +const char *PUS_SERVICE_9_STRING = "PUS_SERVICE_9"; +const char *PUS_SERVICE_17_STRING = "PUS_SERVICE_17"; +const char *PUS_SERVICE_20_STRING = "PUS_SERVICE_20"; +const char *PUS_SERVICE_23_STRING = "PUS_SERVICE_23"; +const char *PUS_SERVICE_200_STRING = "PUS_SERVICE_200"; +const char *PUS_SERVICE_201_STRING = "PUS_SERVICE_201"; +const char *PUS_TIME_STRING = "PUS_TIME"; +const char *PUS_FUNNEL_STRING = "PUS_FUNNEL"; +const char *FREERTOS_TASK_MONITOR_STRING = "FREERTOS_TASK_MONITOR"; +const char *HEALTH_TABLE_STRING = "HEALTH_TABLE"; +const char *MODE_STORE_STRING = "MODE_STORE"; +const char *EVENT_MANAGER_STRING = "EVENT_MANAGER"; +const char *INTERNAL_ERROR_REPORTER_STRING = "INTERNAL_ERROR_REPORTER"; +const char *TC_STORE_STRING = "TC_STORE"; +const char *TM_STORE_STRING = "TM_STORE"; +const char *IPC_STORE_STRING = "IPC_STORE"; +const char *AT91_SPI_TEST_TASK_STRING = "AT91_SPI_TEST_TASK"; +const char *STM32_TEST_TASK_STRING = "STM32_TEST_TASK"; +const char *AT91_UART0_TEST_TASK_STRING = "AT91_UART0_TEST_TASK"; +const char *TC_INJECTOR_STRING = "TC_INJECTOR"; +const char *NO_OBJECT_STRING = "NO_OBJECT"; + +const char* translateObject(object_id_t object){ + switch((object&0xFFFFFFFF)){ + case 0x000123336: + return AT91_UART2_TEST_TASK_STRING; + case 0x01010100: + return ARDUINO_0_STRING; + case 0x01010101: + return ARDUINO_1_STRING; + case 0x01010102: + return ARDUINO_2_STRING; + case 0x01010103: + return ARDUINO_3_STRING; + case 0x01010104: + return ARDUINO_4_STRING; + case 0x12345678: + return AT91_I2C_TEST_TASK_STRING; + case 0x12345777: + return LED_TASK_STRING; + case 0x42694269: + return TEST_TASK_STRING; + case 0x44003200: + return PCDU_HANDLER_STRING; + case 0x4400AFFE: + return DUMMY_HANDLER_STRING; + case 0x44020108: + return SuS_ADC1_DEC2_STRING; + case 0x44101F00: + return GPS0_HANDLER_STRING; + case 0x44104000: + return DLR_PVCH_STRING; + case 0x44105000: + return GYRO1_STRING; + case 0x44106000: + return DLR_IRAS_STRING; + case 0x44115400: + return SPI_Test_PT1000_STRING; + case 0x44115401: + return PT1000_Syrlinks_DEC1_O1_STRING; + case 0x44115402: + return PT1000_Camera_DEC1_O2_STRING; + case 0x44115404: + return PT1000_SuS1_DEC1_O3_STRING; + case 0x44115405: + return PT1000_SuS2_DEC1_O4_STRING; + case 0x44115406: + return PT1000_SuS3_DEC1_O5_STRING; + case 0x44115407: + return PT1000_PVHC_DEC1_O6_STRING; + case 0x44115500: + return SPI_Test_Gyro_STRING; + case 0x44125401: + return PT1000_CCSDS1_DEC2_STRING; + case 0x44125403: + return PT1000_MGT1_DEC2_STRING; + case 0x44125404: + return PT1000_SuS4_DEC2_STRING; + case 0x44125405: + return PT1000_SuS5_DEC2_STRING; + case 0x44125406: + return PT1000_SuS6_DEC2_STRING; + case 0x44125407: + return PT1000_PVCH_DEC2_STRING; + case 0x44130301: + return PT1000_Iridium_DEC3_STRING; + case 0x44130302: + return PT1000_CCSDS2_DEC3_STRING; + case 0x44130305: + return PT1000_SuS7_DEC3_STRING; + case 0x44130306: + return PT1000_SuS8_DEC3_STRING; + case 0x44130307: + return PT1000_PVCH_DEC3_STRING; + case 0x44130308: + return GYRO2_STRING; + case 0x44145401: + return PT1000_PLOC_DEC4_STRING; + case 0x44145404: + return PT1000_SuS9_DEC4_STRING; + case 0x44145405: + return PT1000_SuS10_DEC4_STRING; + case 0x44145406: + return PT1000_PVHC_DEC4_STRING; + case 0x44145407: + return SuS_ADC_DEC4_STRING; + case 0x44202000: + return GPS1_HANDLER_STRING; + case 0x49001F00: + return DUMMY_GPS_COM_IF_STRING; + case 0x49005200: + return RS232_DEVICE_COM_IF_STRING; + case 0x49005300: + return I2C_DEVICE_COM_IF_STRING; + case 0x49005400: + return GPIO_DEVICE_COM_IF_STRING; + case 0x49005410: + return SPI_POLLING_TASK_STRING; + case 0x49005600: + return SPI_DEVICE_COM_IF_STRING; + case 0x4900AFFE: + return DUMMY_ECHO_COM_IF_STRING; + case 0x4D0073AD: + return SD_CARD_HANDLER_STRING; + case 0x50000100: + return CCSDS_PACKET_DISTRIBUTOR_STRING; + case 0x50000200: + return PUS_PACKET_DISTRIBUTOR_STRING; + case 0x50000300: + return UDP_TMTC_BRIDGE_STRING; + case 0x50000400: + return EMAC_POLLING_TASK_STRING; + case 0x50000500: + return SERIAL_TMTC_BRIDGE_STRING; + case 0x50000550: + return SERIAL_RING_BUFFER_STRING; + case 0x50000600: + return SERIAL_POLLING_TASK_STRING; + case 0x51000100: + return PUS_SERVICE_1_STRING; + case 0x51000200: + return PUS_SERVICE_2_STRING; + case 0x51000300: + return PUS_SERVICE_3_STRING; + case 0x51000310: + return PUS_SERVICE_3_PSB_STRING; + case 0x51000400: + return PUS_SERVICE_5_STRING; + case 0x51000500: + return PUS_SERVICE_6_STRING; + case 0x51000800: + return PUS_SERVICE_8_STRING; + case 0x51000900: + return PUS_SERVICE_9_STRING; + case 0x51001700: + return PUS_SERVICE_17_STRING; + case 0x51002000: + return PUS_SERVICE_20_STRING; + case 0x51002300: + return PUS_SERVICE_23_STRING; + case 0x51020000: + return PUS_SERVICE_200_STRING; + case 0x51020100: + return PUS_SERVICE_201_STRING; + case 0x52000001: + return PUS_TIME_STRING; + case 0x52000002: + return PUS_FUNNEL_STRING; + case 0x53000000: + return PUS_SERVICE_1_STRING; + case 0x53000003: + return FREERTOS_TASK_MONITOR_STRING; + case 0x53010000: + return HEALTH_TABLE_STRING; + case 0x53010100: + return MODE_STORE_STRING; + case 0x53030000: + return EVENT_MANAGER_STRING; + case 0x53040000: + return INTERNAL_ERROR_REPORTER_STRING; + case 0x534f0100: + return TC_STORE_STRING; + case 0x534f0200: + return TM_STORE_STRING; + case 0x534f0300: + return IPC_STORE_STRING; + case 0x66666666: + return AT91_SPI_TEST_TASK_STRING; + case 0x77777777: + return STM32_TEST_TASK_STRING; + case 0x87654321: + return AT91_UART0_TEST_TASK_STRING; + case 0x99000001: + return TC_INJECTOR_STRING; + case 0xFFFFFFFF: + return NO_OBJECT_STRING; + default: + return "UNKNOWN_OBJECT"; + } + return 0; +} diff --git a/defaultcfg/fsfwconfig/objects/translateObjects.h b/defaultcfg/fsfwconfig/objects/translateObjects.h new file mode 100644 index 00000000..5b656940 --- /dev/null +++ b/defaultcfg/fsfwconfig/objects/translateObjects.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_OBJECTS_TRANSLATEOBJECTS_H_ +#define CONFIG_OBJECTS_TRANSLATEOBJECTS_H_ + +#include + +const char* translateObject(object_id_t object); + + +#endif /* CONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */ diff --git a/defaultcfg/config/pollingsequence/PollingSequenceFactory.cpp b/defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.cpp similarity index 100% rename from defaultcfg/config/pollingsequence/PollingSequenceFactory.cpp rename to defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.cpp diff --git a/defaultcfg/config/pollingsequence/PollingSequenceFactory.h b/defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.h similarity index 100% rename from defaultcfg/config/pollingsequence/PollingSequenceFactory.h rename to defaultcfg/fsfwconfig/pollingsequence/PollingSequenceFactory.h diff --git a/defaultcfg/config/returnvalues/classIds.h b/defaultcfg/fsfwconfig/returnvalues/classIds.h similarity index 100% rename from defaultcfg/config/returnvalues/classIds.h rename to defaultcfg/fsfwconfig/returnvalues/classIds.h diff --git a/defaultcfg/config/tmtc/apid.h b/defaultcfg/fsfwconfig/tmtc/apid.h similarity index 100% rename from defaultcfg/config/tmtc/apid.h rename to defaultcfg/fsfwconfig/tmtc/apid.h diff --git a/defaultcfg/config/tmtc/pusIds.h b/defaultcfg/fsfwconfig/tmtc/pusIds.h similarity index 100% rename from defaultcfg/config/tmtc/pusIds.h rename to defaultcfg/fsfwconfig/tmtc/pusIds.h From 136f04a5c6ce99b15a6f2c9d9c8c7eb409dafd43 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 9 Nov 2020 21:23:51 +0100 Subject: [PATCH 12/13] trnaslation files removed --- .../fsfwconfig/objects/translateObjects.cpp | 271 ------------------ .../fsfwconfig/objects/translateObjects.h | 9 - 2 files changed, 280 deletions(-) delete mode 100644 defaultcfg/fsfwconfig/objects/translateObjects.cpp delete mode 100644 defaultcfg/fsfwconfig/objects/translateObjects.h diff --git a/defaultcfg/fsfwconfig/objects/translateObjects.cpp b/defaultcfg/fsfwconfig/objects/translateObjects.cpp deleted file mode 100644 index 73cd02bf..00000000 --- a/defaultcfg/fsfwconfig/objects/translateObjects.cpp +++ /dev/null @@ -1,271 +0,0 @@ -/** - * @brief Auto-generated object translation file. Contains 86 translations. - * Generated on: 2020-08-25 00:57:14 - **/ -#include "translateObjects.h" - -const char *AT91_UART2_TEST_TASK_STRING = "AT91_UART2_TEST_TASK"; -const char *ARDUINO_0_STRING = "ARDUINO_0"; -const char *ARDUINO_1_STRING = "ARDUINO_1"; -const char *ARDUINO_2_STRING = "ARDUINO_2"; -const char *ARDUINO_3_STRING = "ARDUINO_3"; -const char *ARDUINO_4_STRING = "ARDUINO_4"; -const char *AT91_I2C_TEST_TASK_STRING = "AT91_I2C_TEST_TASK"; -const char *LED_TASK_STRING = "LED_TASK"; -const char *TEST_TASK_STRING = "TEST_TASK"; -const char *PCDU_HANDLER_STRING = "PCDU_HANDLER"; -const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER"; -const char *SuS_ADC1_DEC2_STRING = "SuS_ADC1_DEC2"; -const char *GPS0_HANDLER_STRING = "GPS0_HANDLER"; -const char *DLR_PVCH_STRING = "DLR_PVCH"; -const char *GYRO1_STRING = "GYRO1"; -const char *DLR_IRAS_STRING = "DLR_IRAS"; -const char *SPI_Test_PT1000_STRING = "SPI_Test_PT1000"; -const char *PT1000_Syrlinks_DEC1_O1_STRING = "PT1000_Syrlinks_DEC1_O1"; -const char *PT1000_Camera_DEC1_O2_STRING = "PT1000_Camera_DEC1_O2"; -const char *PT1000_SuS1_DEC1_O3_STRING = "PT1000_SuS1_DEC1_O3"; -const char *PT1000_SuS2_DEC1_O4_STRING = "PT1000_SuS2_DEC1_O4"; -const char *PT1000_SuS3_DEC1_O5_STRING = "PT1000_SuS3_DEC1_O5"; -const char *PT1000_PVHC_DEC1_O6_STRING = "PT1000_PVHC_DEC1_O6"; -const char *SPI_Test_Gyro_STRING = "SPI_Test_Gyro"; -const char *PT1000_CCSDS1_DEC2_STRING = "PT1000_CCSDS1_DEC2"; -const char *PT1000_MGT1_DEC2_STRING = "PT1000_MGT1_DEC2"; -const char *PT1000_SuS4_DEC2_STRING = "PT1000_SuS4_DEC2"; -const char *PT1000_SuS5_DEC2_STRING = "PT1000_SuS5_DEC2"; -const char *PT1000_SuS6_DEC2_STRING = "PT1000_SuS6_DEC2"; -const char *PT1000_PVCH_DEC2_STRING = "PT1000_PVCH_DEC2"; -const char *PT1000_Iridium_DEC3_STRING = "PT1000_Iridium_DEC3"; -const char *PT1000_CCSDS2_DEC3_STRING = "PT1000_CCSDS2_DEC3"; -const char *PT1000_SuS7_DEC3_STRING = "PT1000_SuS7_DEC3"; -const char *PT1000_SuS8_DEC3_STRING = "PT1000_SuS8_DEC3"; -const char *PT1000_PVCH_DEC3_STRING = "PT1000_PVCH_DEC3"; -const char *GYRO2_STRING = "GYRO2"; -const char *PT1000_PLOC_DEC4_STRING = "PT1000_PLOC_DEC4"; -const char *PT1000_SuS9_DEC4_STRING = "PT1000_SuS9_DEC4"; -const char *PT1000_SuS10_DEC4_STRING = "PT1000_SuS10_DEC4"; -const char *PT1000_PVHC_DEC4_STRING = "PT1000_PVHC_DEC4"; -const char *SuS_ADC_DEC4_STRING = "SuS_ADC_DEC4"; -const char *GPS1_HANDLER_STRING = "GPS1_HANDLER"; -const char *DUMMY_GPS_COM_IF_STRING = "DUMMY_GPS_COM_IF"; -const char *RS232_DEVICE_COM_IF_STRING = "RS232_DEVICE_COM_IF"; -const char *I2C_DEVICE_COM_IF_STRING = "I2C_DEVICE_COM_IF"; -const char *GPIO_DEVICE_COM_IF_STRING = "GPIO_DEVICE_COM_IF"; -const char *SPI_POLLING_TASK_STRING = "SPI_POLLING_TASK"; -const char *SPI_DEVICE_COM_IF_STRING = "SPI_DEVICE_COM_IF"; -const char *DUMMY_ECHO_COM_IF_STRING = "DUMMY_ECHO_COM_IF"; -const char *SD_CARD_HANDLER_STRING = "SD_CARD_HANDLER"; -const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR"; -const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR"; -const char *UDP_TMTC_BRIDGE_STRING = "UDP_TMTC_BRIDGE"; -const char *EMAC_POLLING_TASK_STRING = "EMAC_POLLING_TASK"; -const char *SERIAL_TMTC_BRIDGE_STRING = "SERIAL_TMTC_BRIDGE"; -const char *SERIAL_RING_BUFFER_STRING = "SERIAL_RING_BUFFER"; -const char *SERIAL_POLLING_TASK_STRING = "SERIAL_POLLING_TASK"; -const char *PUS_SERVICE_1_STRING = "PUS_SERVICE_1"; -const char *PUS_SERVICE_2_STRING = "PUS_SERVICE_2"; -const char *PUS_SERVICE_3_STRING = "PUS_SERVICE_3"; -const char *PUS_SERVICE_3_PSB_STRING = "PUS_SERVICE_3_PSB"; -const char *PUS_SERVICE_5_STRING = "PUS_SERVICE_5"; -const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6"; -const char *PUS_SERVICE_8_STRING = "PUS_SERVICE_8"; -const char *PUS_SERVICE_9_STRING = "PUS_SERVICE_9"; -const char *PUS_SERVICE_17_STRING = "PUS_SERVICE_17"; -const char *PUS_SERVICE_20_STRING = "PUS_SERVICE_20"; -const char *PUS_SERVICE_23_STRING = "PUS_SERVICE_23"; -const char *PUS_SERVICE_200_STRING = "PUS_SERVICE_200"; -const char *PUS_SERVICE_201_STRING = "PUS_SERVICE_201"; -const char *PUS_TIME_STRING = "PUS_TIME"; -const char *PUS_FUNNEL_STRING = "PUS_FUNNEL"; -const char *FREERTOS_TASK_MONITOR_STRING = "FREERTOS_TASK_MONITOR"; -const char *HEALTH_TABLE_STRING = "HEALTH_TABLE"; -const char *MODE_STORE_STRING = "MODE_STORE"; -const char *EVENT_MANAGER_STRING = "EVENT_MANAGER"; -const char *INTERNAL_ERROR_REPORTER_STRING = "INTERNAL_ERROR_REPORTER"; -const char *TC_STORE_STRING = "TC_STORE"; -const char *TM_STORE_STRING = "TM_STORE"; -const char *IPC_STORE_STRING = "IPC_STORE"; -const char *AT91_SPI_TEST_TASK_STRING = "AT91_SPI_TEST_TASK"; -const char *STM32_TEST_TASK_STRING = "STM32_TEST_TASK"; -const char *AT91_UART0_TEST_TASK_STRING = "AT91_UART0_TEST_TASK"; -const char *TC_INJECTOR_STRING = "TC_INJECTOR"; -const char *NO_OBJECT_STRING = "NO_OBJECT"; - -const char* translateObject(object_id_t object){ - switch((object&0xFFFFFFFF)){ - case 0x000123336: - return AT91_UART2_TEST_TASK_STRING; - case 0x01010100: - return ARDUINO_0_STRING; - case 0x01010101: - return ARDUINO_1_STRING; - case 0x01010102: - return ARDUINO_2_STRING; - case 0x01010103: - return ARDUINO_3_STRING; - case 0x01010104: - return ARDUINO_4_STRING; - case 0x12345678: - return AT91_I2C_TEST_TASK_STRING; - case 0x12345777: - return LED_TASK_STRING; - case 0x42694269: - return TEST_TASK_STRING; - case 0x44003200: - return PCDU_HANDLER_STRING; - case 0x4400AFFE: - return DUMMY_HANDLER_STRING; - case 0x44020108: - return SuS_ADC1_DEC2_STRING; - case 0x44101F00: - return GPS0_HANDLER_STRING; - case 0x44104000: - return DLR_PVCH_STRING; - case 0x44105000: - return GYRO1_STRING; - case 0x44106000: - return DLR_IRAS_STRING; - case 0x44115400: - return SPI_Test_PT1000_STRING; - case 0x44115401: - return PT1000_Syrlinks_DEC1_O1_STRING; - case 0x44115402: - return PT1000_Camera_DEC1_O2_STRING; - case 0x44115404: - return PT1000_SuS1_DEC1_O3_STRING; - case 0x44115405: - return PT1000_SuS2_DEC1_O4_STRING; - case 0x44115406: - return PT1000_SuS3_DEC1_O5_STRING; - case 0x44115407: - return PT1000_PVHC_DEC1_O6_STRING; - case 0x44115500: - return SPI_Test_Gyro_STRING; - case 0x44125401: - return PT1000_CCSDS1_DEC2_STRING; - case 0x44125403: - return PT1000_MGT1_DEC2_STRING; - case 0x44125404: - return PT1000_SuS4_DEC2_STRING; - case 0x44125405: - return PT1000_SuS5_DEC2_STRING; - case 0x44125406: - return PT1000_SuS6_DEC2_STRING; - case 0x44125407: - return PT1000_PVCH_DEC2_STRING; - case 0x44130301: - return PT1000_Iridium_DEC3_STRING; - case 0x44130302: - return PT1000_CCSDS2_DEC3_STRING; - case 0x44130305: - return PT1000_SuS7_DEC3_STRING; - case 0x44130306: - return PT1000_SuS8_DEC3_STRING; - case 0x44130307: - return PT1000_PVCH_DEC3_STRING; - case 0x44130308: - return GYRO2_STRING; - case 0x44145401: - return PT1000_PLOC_DEC4_STRING; - case 0x44145404: - return PT1000_SuS9_DEC4_STRING; - case 0x44145405: - return PT1000_SuS10_DEC4_STRING; - case 0x44145406: - return PT1000_PVHC_DEC4_STRING; - case 0x44145407: - return SuS_ADC_DEC4_STRING; - case 0x44202000: - return GPS1_HANDLER_STRING; - case 0x49001F00: - return DUMMY_GPS_COM_IF_STRING; - case 0x49005200: - return RS232_DEVICE_COM_IF_STRING; - case 0x49005300: - return I2C_DEVICE_COM_IF_STRING; - case 0x49005400: - return GPIO_DEVICE_COM_IF_STRING; - case 0x49005410: - return SPI_POLLING_TASK_STRING; - case 0x49005600: - return SPI_DEVICE_COM_IF_STRING; - case 0x4900AFFE: - return DUMMY_ECHO_COM_IF_STRING; - case 0x4D0073AD: - return SD_CARD_HANDLER_STRING; - case 0x50000100: - return CCSDS_PACKET_DISTRIBUTOR_STRING; - case 0x50000200: - return PUS_PACKET_DISTRIBUTOR_STRING; - case 0x50000300: - return UDP_TMTC_BRIDGE_STRING; - case 0x50000400: - return EMAC_POLLING_TASK_STRING; - case 0x50000500: - return SERIAL_TMTC_BRIDGE_STRING; - case 0x50000550: - return SERIAL_RING_BUFFER_STRING; - case 0x50000600: - return SERIAL_POLLING_TASK_STRING; - case 0x51000100: - return PUS_SERVICE_1_STRING; - case 0x51000200: - return PUS_SERVICE_2_STRING; - case 0x51000300: - return PUS_SERVICE_3_STRING; - case 0x51000310: - return PUS_SERVICE_3_PSB_STRING; - case 0x51000400: - return PUS_SERVICE_5_STRING; - case 0x51000500: - return PUS_SERVICE_6_STRING; - case 0x51000800: - return PUS_SERVICE_8_STRING; - case 0x51000900: - return PUS_SERVICE_9_STRING; - case 0x51001700: - return PUS_SERVICE_17_STRING; - case 0x51002000: - return PUS_SERVICE_20_STRING; - case 0x51002300: - return PUS_SERVICE_23_STRING; - case 0x51020000: - return PUS_SERVICE_200_STRING; - case 0x51020100: - return PUS_SERVICE_201_STRING; - case 0x52000001: - return PUS_TIME_STRING; - case 0x52000002: - return PUS_FUNNEL_STRING; - case 0x53000000: - return PUS_SERVICE_1_STRING; - case 0x53000003: - return FREERTOS_TASK_MONITOR_STRING; - case 0x53010000: - return HEALTH_TABLE_STRING; - case 0x53010100: - return MODE_STORE_STRING; - case 0x53030000: - return EVENT_MANAGER_STRING; - case 0x53040000: - return INTERNAL_ERROR_REPORTER_STRING; - case 0x534f0100: - return TC_STORE_STRING; - case 0x534f0200: - return TM_STORE_STRING; - case 0x534f0300: - return IPC_STORE_STRING; - case 0x66666666: - return AT91_SPI_TEST_TASK_STRING; - case 0x77777777: - return STM32_TEST_TASK_STRING; - case 0x87654321: - return AT91_UART0_TEST_TASK_STRING; - case 0x99000001: - return TC_INJECTOR_STRING; - case 0xFFFFFFFF: - return NO_OBJECT_STRING; - default: - return "UNKNOWN_OBJECT"; - } - return 0; -} diff --git a/defaultcfg/fsfwconfig/objects/translateObjects.h b/defaultcfg/fsfwconfig/objects/translateObjects.h deleted file mode 100644 index 5b656940..00000000 --- a/defaultcfg/fsfwconfig/objects/translateObjects.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef CONFIG_OBJECTS_TRANSLATEOBJECTS_H_ -#define CONFIG_OBJECTS_TRANSLATEOBJECTS_H_ - -#include - -const char* translateObject(object_id_t object); - - -#endif /* CONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */ From 520409822e58c07c77bbdc163b232e4ac1c6ed76 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Tue, 10 Nov 2020 15:06:51 +0100 Subject: [PATCH 13/13] now all debug output removed --- osal/linux/TcUnixUdpPollingTask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osal/linux/TcUnixUdpPollingTask.cpp b/osal/linux/TcUnixUdpPollingTask.cpp index 7df56a95..af99ec91 100644 --- a/osal/linux/TcUnixUdpPollingTask.cpp +++ b/osal/linux/TcUnixUdpPollingTask.cpp @@ -45,8 +45,8 @@ ReturnValue_t TcUnixUdpPollingTask::performOperation(uint8_t opCode) { continue; } - sif::debug << "TcSocketPollingTask::performOperation: " << bytesReceived - << " bytes received" << std::endl; +// sif::debug << "TcSocketPollingTask::performOperation: " << bytesReceived +// << " bytes received" << std::endl; ReturnValue_t result = handleSuccessfullTcRead(bytesReceived); if(result != HasReturnvaluesIF::RETURN_FAILED) {