19 Commits

Author SHA1 Message Date
c9ccae25a9 README.md aktualisiert 2025-06-20 15:17:27 +02:00
d411865394 Quickstart with current compiler version 2025-06-20 14:29:52 +02:00
81905090b2 bump common_tmtc 2023-01-13 11:07:18 +01:00
8a9e079790 README update 2023-01-13 11:03:50 +01:00
f63ae969a7 add tmtccmd and spacepackets install scripts 2023-01-13 11:02:13 +01:00
a9ccd5e146 remove some python dependencies 2023-01-13 10:59:58 +01:00
40c7b5e7d8 Merge branch 'main' of https://egit.irs.uni-stuttgart.de/fsfw/fsfw-example-hosted 2023-01-13 10:57:53 +01:00
a68a3503a1 update dependencies 2023-01-13 10:57:38 +01:00
dd1f1050da bump tmtccmd 2022-10-21 11:24:05 +02:00
75e592fc10 bump common_tmtc 2022-10-19 11:56:12 +02:00
f12a31b710 bump deps and call CFPD FSM 2022-10-19 11:52:30 +02:00
5e0c6b2c41 bump deps again 2022-10-17 17:29:26 +02:00
438e543203 bump dependencies 2022-10-17 17:25:42 +02:00
278b878525 bump example_common 2022-10-17 16:59:02 +02:00
5f59186ace new CFDP and PUS TM funnel 2022-10-17 16:28:03 +02:00
45c1ba70e3 bump deps 2022-10-17 15:20:42 +02:00
9eedbe3810 start implementing closure support for CFDP 2022-10-17 12:26:18 +02:00
cafd8a7e52 bump tmtccmd dependency 2022-10-17 11:06:36 +02:00
e1d2849436 bump deps and add TODO 2022-09-16 18:36:41 +02:00
15 changed files with 77 additions and 16 deletions

6
.gitmodules vendored
View File

@ -7,12 +7,6 @@
[submodule "fsfw"] [submodule "fsfw"]
path = fsfw path = fsfw
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw.git url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw.git
[submodule "tmtc/tmtccmd"]
path = tmtc/deps/tmtccmd
url = https://github.com/robamu-org/tmtccmd.git
[submodule "tmtc/common_tmtc"] [submodule "tmtc/common_tmtc"]
path = tmtc/common_tmtc path = tmtc/common_tmtc
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-example-tmtc-common.git url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-example-tmtc-common.git
[submodule "tmtc/spacepackets"]
path = tmtc/deps/spacepackets
url = https://github.com/robamu-org/py-spacepackets.git

View File

@ -52,12 +52,44 @@ the host abstraction layer of the FSFW.
This demo provides the opportunity to to test functionality of the This demo provides the opportunity to to test functionality of the
FSFW on a host computer without the need of setting up external embedded hardware. FSFW on a host computer without the need of setting up external embedded hardware.
After cloning, make sure to clone and initialize the submodules
```sh
git submodule update --init
```
## Quickstart
With a fresh activated Windows Subsystem for Linux (WSL), using `wsl --install archlinux` the following steps are sufficient to build the flight software with cmake or just:
´´´sh
pacman Syu
pacman -S base-devel zsh git sudo cmake wget curl rustup
rustup default nightly # Only for just
cargo install just # Only for just
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # Only for better git integration in shell
cd ~
git clone https://egit.irs.uni-stuttgart.de/fsfw/fsfw-example-hosted --recursive
cd fsfw-example-hosted
mkdir build # Create Build Folder
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DFSFW_OSAL=linux .. # Create Makefiles
cmake --build . -j # Build Flight Software
./fsfw-example-hosted # execute Flight software
code .. # Open source code in Windows Visual Studio Code
´´´
## Prerequisites ## Prerequisites
If you need to set up these prerequisites, you can find some more information in the dedicated If you need to set up these prerequisites, you can find some more information in the dedicated
[chapter](#prereqsetup). [chapter](#prereqsetup).
Caution: Some assertions block the build with gcc 15 when building the `host` version. Please use `linux` as target or install gcc14.
1. Makefile build: make installed (bundled with MSYS2 on Windows or via [xPacks Windows Build Tools](https://xpack.github.io/windows-build-tools/install/)). Natively installed on Linux. 1. Makefile build: make installed (bundled with MSYS2 on Windows or via [xPacks Windows Build Tools](https://xpack.github.io/windows-build-tools/install/)). Natively installed on Linux.
2. Recommended for application code development: [Eclipse for C/C++](https://www.eclipse.org/downloads/packages/) . 2. Recommended for application code development: [Eclipse for C/C++](https://www.eclipse.org/downloads/packages/) .
Project files and launch configuration are provided for Eclipse to ease development. Project files and launch configuration are provided for Eclipse to ease development.

View File

@ -52,9 +52,8 @@ void ObjectFactory::produce(void* args) {
{30, 128}, {20, 1024}, {10, 2048}}; {30, 128}, {20, 1024}, {10, 2048}};
new PoolManager(objects::IPC_STORE, poolCfg); new PoolManager(objects::IPC_STORE, poolCfg);
} }
TmFunnel* funnel; PusTmFunnel* funnel;
CcsdsDistributor* ccsdsDistrib; CcsdsDistributor* ccsdsDistrib;
ObjectFactory::produceGenericObjects(&funnel, &ccsdsDistrib, *tcStore, *tmStore);
// TMTC Reception via TCP/IP socket // TMTC Reception via TCP/IP socket
#if OBSW_USE_TCP_SERVER == 0 #if OBSW_USE_TCP_SERVER == 0
auto tmtcBridge = new UdpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR); auto tmtcBridge = new UdpTmTcBridge(objects::TCPIP_TMTC_BRIDGE, objects::CCSDS_DISTRIBUTOR);
@ -66,7 +65,9 @@ void ObjectFactory::produce(void* args) {
tmtcBridge->setMaxNumberOfPacketsStored(50); tmtcBridge->setMaxNumberOfPacketsStored(50);
auto tmtcServer = new TcpTmTcServer(objects::TCPIP_TMTC_POLLING_TASK, objects::TCPIP_TMTC_BRIDGE); auto tmtcServer = new TcpTmTcServer(objects::TCPIP_TMTC_POLLING_TASK, objects::TCPIP_TMTC_BRIDGE);
sif::info << "Opening TCP TMTC server on port " << tmtcServer->getTcpPort() << std::endl; sif::info << "Opening TCP TMTC server on port " << tmtcServer->getTcpPort() << std::endl;
// TODO: Set the set of valid space packet IDs. Otherwise, parsing might fail
#endif #endif
ObjectFactory::produceGenericObjects(&funnel, *tmtcBridge, &ccsdsDistrib, *tcStore, *tmStore);
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */ #endif /* OBSW_ADD_CORE_COMPONENTS == 1 */

2
fsfw

Submodule fsfw updated: bdbe0cc9da...bf311757a2

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="CFDP Test NAK No Closure" type="PythonConfigurationType" factoryName="Python" folderName="CFDP">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
<option name="PARAMETERS" value="cfdp filetest/cfdp_test.txt /tmp/hello-cpy.txt --no-closure -d 0.2" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View File

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="CFDP Test" type="PythonConfigurationType" factoryName="Python" folderName="CFDP"> <configuration default="false" name="CFDP Test NAK With Closure" type="PythonConfigurationType" factoryName="Python" folderName="CFDP">
<module name="tmtc" /> <module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" /> <option name="PARENT_ENVS" value="true" />

4
tmtc/deps/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/*
!/*.sh
!/.gitignore

View File

@ -0,0 +1,3 @@
#!/bin/bash
git clone https://github.com/us-irs/spacepackets-py.git

3
tmtc/deps/install_tmtccmd.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
git clone https://github.com/robamu-org/tmtccmd.git

View File

@ -1 +1 @@
tmtccmd >= 3.0.0rc1 tmtccmd == 4.0.0a1

View File

@ -42,13 +42,15 @@ def main():
try: try:
while True: while True:
state = backend.periodic_op(None) state = backend.periodic_op(None)
tc_handler.cfdp_in_ccsds_wrapper.handler.fsm()
if state.request == BackendRequest.TERMINATION_NO_ERROR: if state.request == BackendRequest.TERMINATION_NO_ERROR:
sys.exit(0) sys.exit(0)
elif state.request == BackendRequest.DELAY_IDLE: elif state.request == BackendRequest.DELAY_IDLE:
LOGGER.info("TMTC Client in IDLE mode") LOGGER.info("TMTC Client in IDLE mode")
time.sleep(3.0) time.sleep(3.0)
elif state.request == BackendRequest.DELAY_LISTENER: elif state.request == BackendRequest.DELAY_LISTENER:
if tc_handler.cfdp_done: if tc_handler.cfdp_done():
LOGGER.info("CFDP transaction done, closing client")
sys.exit(0) sys.exit(0)
time.sleep(0.8) time.sleep(0.8)
elif state.request == BackendRequest.DELAY_CUSTOM: elif state.request == BackendRequest.DELAY_CUSTOM: