smaller tweaks and project file updatss

This commit is contained in:
Robin Müller 2021-09-28 16:04:16 +02:00
parent ef21c6adbe
commit 859aa7750a
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
8 changed files with 45 additions and 36 deletions

View File

@ -1,9 +0,0 @@
CSRC += $(wildcard $(CURRENTPATH)/*.c)
CXXSRC += $(wildcard $(CURRENTPATH)/*.cpp)
CSRC += $(wildcard $(CURRENTPATH)/core/*.c)
CXXSRC += $(wildcard $(CURRENTPATH)/core/*.cpp)
CSRC += $(wildcard $(CURRENTPATH)/utility/*.c)
INCLUDES += $(CURRENTPATH)

View File

@ -62,23 +62,23 @@ void InitMission::createTasks() {
#endif
/* UDP bridge */
PeriodicTaskIF* udpBridgeTask = taskFactory->createPeriodicTask(
"UDP_UNIX_BRIDGE", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2,
"TCPIP_TMTC_BRIDGE", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2,
deadlineMissedFunc
);
result = udpBridgeTask->addComponent(objects::UDP_BRIDGE);
result = udpBridgeTask->addComponent(objects::TCPIP_TMTC_BRIDGE);
if(result != HasReturnvaluesIF::RETURN_OK) {
task::printInitError("UDP bridge", objects::UDP_BRIDGE);
task::printInitError("TMTC bridge", objects::TCPIP_TMTC_BRIDGE);
}
#ifdef __unix__
currPrio = 80;
#endif
PeriodicTaskIF* udpPollingTask = taskFactory->createPeriodicTask(
"UDP_POLLING", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, deadlineMissedFunc
"TMTC_POLLING", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, deadlineMissedFunc
);
result = udpPollingTask->addComponent(objects::UDP_POLLING_TASK);
result = udpPollingTask->addComponent(objects::TCPIP_TMTC_POLLING_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
task::printInitError("UDP polling", objects::UDP_POLLING_TASK);
task::printInitError("TMTC polling", objects::TCPIP_TMTC_POLLING_TASK);
}
#ifdef __unix__

View File

@ -16,8 +16,13 @@
#include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h>
#if OBSW_USE_TCP_SERVER == 0
#include <fsfw/osal/common/UdpTcPollingTask.h>
#include <fsfw/osal/common/UdpTmTcBridge.h>
#else
#include "fsfw/osal/common/TcpTmTcServer.h"
#include "fsfw/osal/common/TcpTmTcBridge.h"
#endif
void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
@ -44,12 +49,18 @@ void ObjectFactory::produce(void* args) {
new PoolManager(objects::IPC_STORE, poolCfg);
}
/* TMTC Reception via UDP socket */
auto tmtcBridge = new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(20);
sif::info << "Opening UDP TMTC server on port " << tmtcBridge->getUdpPort() <<
std::endl;
new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
// TMTC Reception via TCP/IP socket
#if OBSW_USE_TCP_SERVER == 0
auto tmtcBridge = new UdpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
sif::info << "Opening UDP TMTC server on port " << tmtcBridge->getUdpPort() << std::endl;
new UdpTcPollingTask(objects::TCPIP_TMTC_POLLING_TASK, objects::TCPIP_TMTC_BRIDGE);
#else
auto tmtcBridge = new TcpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
auto tmtcServer = new TcpTmTcServer(objects::TCPIP_TMTC_POLLING_TASK, objects::TCPIP_TMTC_BRIDGE);
sif::info << "Opening UDP TMTC server on port " << tmtcServer->getTcpPort() << std::endl;
#endif
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */

View File

@ -8,7 +8,9 @@
#include <commonConfig.h>
#define OBSW_TASK_PERIODIC_EVENT 0
#define OBSW_TASK_PERIODIC_EVENT 0
// Use a TCP server instead of a UDP server for TMTC reception
#define OBSW_USE_TCP_SERVER 0
#ifdef __cplusplus

View File

@ -1,8 +0,0 @@
CXXSRC += $(wildcard $(CURRENTPATH)/datapool/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/ipc/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/objects/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/pollingsequence/*.cpp)
INCLUDES += $(CURRENTPATH)
INCLUDES += $(CURRENTPATH)/events

View File

@ -6,10 +6,10 @@
namespace objects {
enum mission_objects {
/* 0x62 ('b') Board and mission specific objects */
UDP_BRIDGE = 0x62000300,
UDP_POLLING_TASK = 0x62000400,
TCPIP_TMTC_BRIDGE = 0x62000300,
TCPIP_TMTC_POLLING_TASK = 0x62000400,
/* Generic name for FSFW static ID setter */
DOWNLINK_DESTINATION = UDP_BRIDGE
DOWNLINK_DESTINATION = TCPIP_TMTC_BRIDGE
};
}

View File

@ -25,6 +25,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.298549648" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
@ -33,6 +34,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.373430455" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
@ -48,6 +50,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1596645626" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
@ -87,6 +90,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.531515655" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
@ -96,6 +100,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1273759242" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
@ -107,10 +112,11 @@
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.base.2076450799" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.1551487657" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.1551487657" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.547659187" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
@ -144,10 +150,11 @@
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.PE64;org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.mingw.base.1711871351" name="Debug Platform" osList="win32" superClass="cdt.managedbuild.target.gnu.platform.mingw.base"/>
<builder arguments="--build ." autoBuildTarget="all" buildPath="${workspace_loc:/fsfw-example-hosted/build-Debug}" cleanBuildTarget="clean" command="cmake" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="cdt.managedbuild.builder.gnu.cross.1761965921" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.base.13166088" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.base">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.9853113" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.9853113" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1629700138" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
@ -157,6 +164,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.766199866" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
@ -165,6 +173,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.34963804" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
@ -205,10 +214,11 @@
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.PE64;org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.mingw.base.169860740" name="Debug Platform" osList="win32" superClass="cdt.managedbuild.target.gnu.platform.mingw.base"/>
<builder arguments="--build ." autoBuildTarget="all" buildPath="${workspace_loc:/fsfw-example-hosted/build-Release}" cleanBuildTarget="clean" command="cmake" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="cdt.managedbuild.builder.gnu.cross.1108079754" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.base.1193239387" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.base">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.1367543610" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.1367543610" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1144625128" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
@ -218,6 +228,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1304280824" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
@ -226,6 +237,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/example_common/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/bsp_hosted/fsfwconfig}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/fsfw-example-hosted/fsfw/src}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1156512060" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>

View File

@ -0,0 +1 @@
WARNING : 2021-09-28 16:03:41.772 | [com_if.py:93] | TCP communication interface without any specified space packet ID might not woWARNWARNING : 2021-09-28 16:03:42.176 | [tm_listener.py:346] | No TM handler assigned forWARNING WARNING : 2021-09-28 16:03:42.177 | [tm_listener.py:330] | No target queue found, inserting into unknown tWARNING : 20WARNING : 2021-09-28 16:03:42.177 | [tm_listener.py:346] | No TM handler assiWARNING : 2021-0WARNING : 2021-09-28 16:03:42.178 | [tm_listener.py:330] | No target queue found, inserting into uWARNING : 2021-09-28WARNING : 2021-09-28 16:03:42.178 | [tm_listener.py:346] | No TM handWARNING : 2021-09-28 16:WARNING : 2021-09-28 16:03:42.178 | [tm_listener.py:330] | No target queue found, insertinWARNING : 2021-09-28 16:03:4WARNING : 2021-09-28 16:03:42.178 | [tm_listener.py:346] | NoWARNING : 2021-09-28 16:03:42.17WARNING : 2021-09-28 16:03:42.178 | [tm_listener.py:330] | No target queue found, inserting into unknown target queue