Compare commits
160 Commits
Author | SHA1 | Date |
---|---|---|
|
81905090b2 | |
|
8a9e079790 | |
|
f63ae969a7 | |
|
a9ccd5e146 | |
|
40c7b5e7d8 | |
|
a68a3503a1 | |
|
dd1f1050da | |
|
75e592fc10 | |
|
f12a31b710 | |
|
5e0c6b2c41 | |
|
438e543203 | |
|
278b878525 | |
|
5f59186ace | |
|
45c1ba70e3 | |
|
9eedbe3810 | |
|
cafd8a7e52 | |
|
e1d2849436 | |
|
d7be5f3464 | |
|
3a31c175c4 | |
|
02046f043c | |
|
42cdca76b6 | |
|
50211e0f75 | |
|
f6ab970529 | |
|
6e86dfab19 | |
|
22ecffc30e | |
|
475f8e1656 | |
|
9e4f2add7d | |
|
886c966420 | |
|
a329824f8e | |
|
d4264ee75d | |
|
2b2527d814 | |
|
3b9df4adda | |
|
be0aedb3ae | |
|
ec2a500e0c | |
|
ed6a9bf82f | |
|
bfd54520c9 | |
|
b76ad023a5 | |
|
3265f5258c | |
|
3b473d8dba | |
|
64a58c65dd | |
|
c9383ca20b | |
|
f89ca50bcb | |
|
9a8cca1821 | |
|
eebe169fa7 | |
|
e678dae989 | |
|
daa68d335a | |
|
ecb2a751ab | |
|
586388b3f0 | |
|
ad5169743a | |
|
d1df2cd694 | |
|
4e93be0db3 | |
|
c251d2b3c8 | |
|
f87e0854fd | |
|
e769d38d2c | |
|
4cb00a2bb3 | |
|
19078aa5fe | |
|
4b511d8d30 | |
|
e296554827 | |
|
6f9a866e9c | |
|
87c7542015 | |
|
3f0367fdb2 | |
|
b5ac8cded7 | |
|
e0837683fe | |
|
75e0ef60ce | |
|
91711bd928 | |
|
efe60b703b | |
|
9b450f5049 | |
|
6d43fa8911 | |
|
9c9daffbbc | |
|
dd866790f3 | |
|
b1e704cd11 | |
|
68857b9d4e | |
|
de90bfaa34 | |
|
8f644cecea | |
|
0459173362 | |
|
346bb5c7c0 | |
|
ca4e451e26 | |
|
1272fa0cca | |
|
56d6de17a6 | |
|
88228f9f4b | |
|
94f2dd3c01 | |
|
522e69d5da | |
|
7fcea4ea07 | |
|
bd10232224 | |
|
459ee67f19 | |
|
3b32fa79c1 | |
|
c403abfa9f | |
|
8070e2da4f | |
|
0679490199 | |
|
19bcc35831 | |
|
8340d28170 | |
|
acbf958660 | |
|
bb833172d0 | |
|
51f07ce7bf | |
|
da04e96278 | |
|
5c7e47bae0 | |
|
ab4807d702 | |
|
37812a033b | |
|
f56f47ed75 | |
|
27be8d18dc | |
|
5bb72c9804 | |
|
dc107a5090 | |
|
f2e21bb359 | |
|
b37d801afe | |
|
f0782e4445 | |
|
b0cd790c78 | |
|
dd7a9dfafd | |
|
6f7be65811 | |
|
4fd6f35374 | |
|
43e611950b | |
|
beeb699c17 | |
|
1a94f31d69 | |
|
2d171b2c36 | |
|
9defef2756 | |
|
84ce93a012 | |
|
b97a23ff8c | |
|
d644a45c34 | |
|
d07e0e6465 | |
|
e6e2e1a935 | |
|
46123172ae | |
|
3ed1b6f9f1 | |
|
a59d467e1d | |
|
f4a346d2a8 | |
|
af618f5652 | |
|
77791efcbc | |
|
d7923fe18b | |
|
fbe10e4624 | |
|
86beb16325 | |
|
0e0ce3dad8 | |
|
245bd4ffe8 | |
|
3a72fad821 | |
|
5700afa399 | |
|
7a06f615cf | |
|
4173a62229 | |
|
8570c9e327 | |
|
df68ec141b | |
|
6114dddb29 | |
|
ab047190be | |
|
da168b21ef | |
|
044d56e96a | |
|
0a923a38a6 | |
|
228c052fae | |
|
878988bb09 | |
|
21b3e46a72 | |
|
99a04398af | |
|
d2337a769c | |
|
a9907fc7b3 | |
|
3e958fd161 | |
|
832c4a1874 | |
|
34f76d351e | |
|
1049e4072a | |
|
ed0077e3f1 | |
|
094fa011af | |
|
7205ac6202 | |
|
37dcc69f3b | |
![]() |
6661dbc274 | |
![]() |
519bbf6fd0 | |
![]() |
b8398fa81e | |
![]() |
1a89b8c12e | |
|
b78962e8e2 |
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
BasedOnStyle: Google
|
||||
IndentWidth: 2
|
||||
---
|
||||
Language: Cpp
|
||||
ColumnLimit: 100
|
||||
---
|
|
@ -1,8 +1,12 @@
|
|||
# PyCharm
|
||||
/.idea/*
|
||||
!/.idea/runConfigurations
|
||||
!/.idea/cmake.xml
|
||||
!/.idea/codeStyles
|
||||
|
||||
# Python
|
||||
**/.idea/*
|
||||
!**/.idea/runConfigurations
|
||||
__pycache__
|
||||
venv
|
||||
/venv
|
||||
|
||||
|
||||
# Eclipse
|
||||
|
@ -17,6 +21,7 @@ venv
|
|||
|
||||
# Build folders
|
||||
/build*
|
||||
/cmake-build*
|
||||
|
||||
_dep
|
||||
_obj
|
||||
|
|
|
@ -7,12 +7,6 @@
|
|||
[submodule "fsfw"]
|
||||
path = fsfw
|
||||
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw.git
|
||||
[submodule "tmtc/tmtccmd"]
|
||||
path = tmtc/tmtccmd
|
||||
url = https://github.com/robamu-org/tmtccmd.git
|
||||
[submodule "tmtc/common_tmtc"]
|
||||
path = tmtc/common_tmtc
|
||||
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-example-tmtc-common.git
|
||||
[submodule "tmtc/spacepackets"]
|
||||
path = tmtc/spacepackets
|
||||
url = https://github.com/robamu-org/py-spacepackets.git
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakeSharedSettings">
|
||||
<configurations>
|
||||
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" NO_GENERATOR="true" />
|
||||
<configuration PROFILE_NAME="Debug Linux" ENABLED="true" GENERATION_DIR="cmake-build-debug-linux" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DFSFW_OSAL=linux" NO_GENERATOR="true" />
|
||||
<configuration PROFILE_NAME="Release" ENABLED="true" CONFIG_NAME="Release" NO_GENERATOR="true" />
|
||||
<configuration PROFILE_NAME="Debug Clang" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DCMAKE_TOOLCHAIN_FILE=cmake/ClangToolchain.cmake" />
|
||||
</configurations>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,14 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<clangFormatSettings>
|
||||
<option name="ENABLED" value="true" />
|
||||
</clangFormatSettings>
|
||||
<codeStyleSettings language="CMake">
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
|
@ -0,0 +1,5 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
|
@ -0,0 +1,7 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="example" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="fsfw-example-hosted" TARGET_NAME="fsfw-example-hosted" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="fsfw-example-hosted" RUN_TARGET_NAME="fsfw-example-hosted">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
159
CMakeLists.txt
159
CMakeLists.txt
|
@ -1,37 +1,47 @@
|
|||
################################################################################
|
||||
# ##############################################################################
|
||||
# CMake support for the Flight Software Framework
|
||||
#
|
||||
#
|
||||
# Developed in an effort to replace Make with a modern build system.
|
||||
#
|
||||
#
|
||||
# Author: R. Mueller
|
||||
################################################################################
|
||||
# ##############################################################################
|
||||
|
||||
################################################################################
|
||||
# ##############################################################################
|
||||
# Pre-Project preparation
|
||||
################################################################################
|
||||
# ##############################################################################
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# set(CMAKE_VERBOSE TRUE)
|
||||
|
||||
set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
set(OBSW_MAX_SCHEDULED_TCS 200)
|
||||
|
||||
if(NOT FSFW_OSAL)
|
||||
set(FSFW_OSAL host CACHE STRING "OS for the FSFW.")
|
||||
set(FSFW_OSAL
|
||||
host
|
||||
CACHE STRING "OS for the FSFW.")
|
||||
endif()
|
||||
|
||||
# Project Name
|
||||
project(fsfw-example-hosted C CXX)
|
||||
|
||||
################################################################################
|
||||
option(OBSW_ENABLE_IPO "Enable IPO/LTO optimization" ON)
|
||||
|
||||
if(OBSW_ENABLE_IPO)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
# Pre-Sources preparation
|
||||
################################################################################
|
||||
# ##############################################################################
|
||||
|
||||
# Specify the C++ standard
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
# Set names and variables
|
||||
set(TARGET_NAME ${CMAKE_PROJECT_NAME})
|
||||
set(TARGET_NAME ${CMAKE_PROJECT_NAME})
|
||||
set(LIB_FSFW_NAME fsfw)
|
||||
set(LIB_FSFW_HAL_NAME fsfw_hal)
|
||||
|
||||
|
@ -43,12 +53,9 @@ set(LIB_FSFW_HAL_PATH fsfw_hal)
|
|||
set(BSP_PATH "bsp_hosted")
|
||||
set(COMMON_CONFIG_PATH "${COMMON_PATH}/config")
|
||||
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
||||
set(FSFW_ADDITIONAL_INC_PATHS
|
||||
"${COMMON_CONFIG_PATH}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
CACHE STRING
|
||||
"FSFW configuration paths"
|
||||
)
|
||||
set(FSFW_ADDITIONAL_INC_PATHS
|
||||
"${COMMON_CONFIG_PATH}" "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
CACHE STRING "FSFW configuration paths")
|
||||
|
||||
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
|
||||
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
|
||||
|
@ -57,121 +64,97 @@ configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h)
|
|||
set(FSFW_ADD_MONITORING ON)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(WARNING_FLAGS
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wimplicit-fallthrough=1
|
||||
-Wno-unused-parameter
|
||||
-Wno-psabi
|
||||
)
|
||||
set(WARNING_FLAGS -Wall -Wextra -Wimplicit-fallthrough=1
|
||||
-Wno-unused-parameter -Wno-psabi)
|
||||
|
||||
set(FSFW_WARNING_FLAGS ${WARNING_FLAGS})
|
||||
set(FSFW_WARNING_FLAGS ${WARNING_FLAGS})
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/permissive- /d2SSAOptimizer-)
|
||||
# To avoid nameclashes with min and max macro
|
||||
add_compile_definitions(NOMINMAX)
|
||||
add_compile_options(/permissive- /d2SSAOptimizer-)
|
||||
# To avoid nameclashes with min and max macro
|
||||
add_compile_definitions(NOMINMAX)
|
||||
endif()
|
||||
|
||||
if(FSFW_OSAL MATCHES linux)
|
||||
find_package(Threads REQUIRED)
|
||||
# Hosted
|
||||
find_package(Threads REQUIRED)
|
||||
# Hosted
|
||||
else()
|
||||
|
||||
if(WIN32)
|
||||
elseif(UNIX)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
if(WIN32)
|
||||
|
||||
elseif(UNIX)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
################################################################################
|
||||
# ##############################################################################
|
||||
# Executable and Sources
|
||||
################################################################################
|
||||
# ##############################################################################
|
||||
|
||||
# Add executable
|
||||
add_executable(${TARGET_NAME})
|
||||
add_executable(${TARGET_NAME} example_common/config/common/definitions.h)
|
||||
|
||||
# Add subdirectories
|
||||
if(LIB_OS_NAME)
|
||||
add_subdirectory(${LIB_OS_NAME})
|
||||
add_subdirectory(${LIB_OS_NAME})
|
||||
endif()
|
||||
add_subdirectory(${BSP_PATH})
|
||||
add_subdirectory(${FSFW_PATH})
|
||||
add_subdirectory(${COMMON_PATH})
|
||||
|
||||
################################################################################
|
||||
# ##############################################################################
|
||||
# Post-Sources preparation
|
||||
################################################################################
|
||||
# ##############################################################################
|
||||
|
||||
# Add libraries for all sources.
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE
|
||||
${LIB_FSFW_NAME}
|
||||
${LIB_OS_NAME}
|
||||
# ${LIB_FSFW_HAL_NAME}
|
||||
)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ${LIB_FSFW_NAME} ${LIB_OS_NAME})
|
||||
|
||||
# Add include paths for all sources.
|
||||
target_include_directories(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FSFW_CONFIG_PATH}
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR} ${FSFW_CONFIG_PATH})
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_link_options(${TARGET_NAME} PRIVATE
|
||||
"-Wl,-Map=${TARGET_NAME}.map"
|
||||
)
|
||||
target_link_options(${TARGET_NAME} PRIVATE "-Wl,-Map=${TARGET_NAME}.map")
|
||||
|
||||
# Remove unused sections.
|
||||
target_compile_options(${TARGET_NAME} PRIVATE
|
||||
"-ffunction-sections"
|
||||
"-fdata-sections"
|
||||
)
|
||||
# Remove unused sections.
|
||||
target_compile_options(${TARGET_NAME} PRIVATE "-ffunction-sections"
|
||||
"-fdata-sections")
|
||||
|
||||
# Removed unused sections.
|
||||
target_link_options(${TARGET_NAME} PRIVATE
|
||||
"-Wl,--gc-sections"
|
||||
)
|
||||
# Removed unused sections.
|
||||
target_link_options(${TARGET_NAME} PRIVATE "-Wl,--gc-sections")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERBOSE)
|
||||
message(STATUS "Warning flags: ${WARNING_FLAGS}")
|
||||
message(STATUS "Warning flags: ${WARNING_FLAGS}")
|
||||
endif()
|
||||
|
||||
|
||||
# Compile options for all sources.
|
||||
target_compile_options(${TARGET_NAME} PRIVATE
|
||||
${WARNING_FLAGS}
|
||||
)
|
||||
target_compile_options(${TARGET_NAME} PRIVATE ${WARNING_FLAGS})
|
||||
|
||||
if(NOT CMAKE_SIZE)
|
||||
set(CMAKE_SIZE size)
|
||||
if(WIN32)
|
||||
set(FILE_SUFFIX ".exe")
|
||||
endif()
|
||||
set(CMAKE_SIZE size)
|
||||
if(WIN32)
|
||||
set(FILE_SUFFIX ".exe")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TGT_BSP)
|
||||
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
|
||||
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
|
||||
else()
|
||||
set(TARGET_STRING "Target BSP: Hosted")
|
||||
set(TARGET_STRING "Target BSP: Hosted")
|
||||
endif()
|
||||
|
||||
string(CONCAT POST_BUILD_COMMENT
|
||||
"Build directory: ${CMAKE_BINARY_DIR}\n"
|
||||
"Target OSAL: ${FSFW_OSAL}\n"
|
||||
"Target Build Type: ${CMAKE_BUILD_TYPE}\n"
|
||||
"${TARGET_STRING}"
|
||||
)
|
||||
string(CONCAT POST_BUILD_COMMENT "Build directory: ${CMAKE_BINARY_DIR}\n"
|
||||
"Target OSAL: ${FSFW_OSAL}\n"
|
||||
"Target Build Type: ${CMAKE_BUILD_TYPE}\n" "${TARGET_STRING}")
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${TARGET_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_SIZE} ${TARGET_NAME}${FILE_SUFFIX}
|
||||
COMMENT ${POST_BUILD_COMMENT}
|
||||
)
|
||||
TARGET ${TARGET_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_SIZE} ${TARGET_NAME}${FILE_SUFFIX}
|
||||
COMMENT ${POST_BUILD_COMMENT})
|
||||
|
||||
include (${CMAKE_SCRIPT_PATH}/BuildType.cmake)
|
||||
include(BuildType)
|
||||
set_build_type()
|
||||
|
|
30
README.md
30
README.md
|
@ -1,4 +1,4 @@
|
|||
<img align="center" src="https://egit.irs.uni-stuttgart.de/fsfw/fsfw-example-common/raw/branch/master/doc/images/FSFW_Logo_V3_bw.png" width="50%">
|
||||
<img align="center" src="https://egit.irs.uni-stuttgart.de/fsfw/fsfw/raw/branch/master/misc/logo/FSFW_Logo_V3_bw.png" width="50%">
|
||||
|
||||
# <a id="top"></a> <a name="linux"></a> FSFW Example Application
|
||||
|
||||
|
@ -52,6 +52,11 @@ the host abstraction layer of the FSFW.
|
|||
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.
|
||||
|
||||
After cloning, make sure to clone and initialize the submodules
|
||||
|
||||
```sh
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -72,16 +77,19 @@ When the software is running, it opens a TCP oder UDP server, depending on the c
|
|||
on port 7301. You can send PUS telecommands to that port to interactively command the
|
||||
software.
|
||||
|
||||
For a quick test, install the `tmtccmd` Python package first and use `py` instead
|
||||
of `python3` on Windows:
|
||||
The following steps set up a virtual environment, install all the dependencies, and then use
|
||||
the `tmtcc.py` utility to send a ping telecommand to the running OBSW
|
||||
|
||||
```sh
|
||||
cd tmtccmd
|
||||
python3 -m pip install -r requirements.txt
|
||||
cd tmtc
|
||||
python3 -m venv venv
|
||||
cd deps/tmtccmd
|
||||
pip install .[gui]
|
||||
```
|
||||
|
||||
Now you can command the software using the `tmtccli.py` and `tmtcgui.py` command.
|
||||
For example, you can use `tmtccli.py -s 17 -o 0` to send a ping command.
|
||||
Now you can command the software using the `tmtcc.py` command for the CLI mode and `tmtcc.py -g`
|
||||
for the GUI mode inside the virtual environment. For example, you can use `tmtcc.py -s 17 -o 0`
|
||||
to send a ping command.
|
||||
|
||||
## <a id="prereqsetup"></a> Setting up Prerequisites
|
||||
|
||||
|
@ -166,8 +174,8 @@ generation as a cross-platform solution.
|
|||
|
||||
1. Create a new folder for the executable.
|
||||
```sh
|
||||
mkdir build-Debug
|
||||
cd build-Debug
|
||||
mkdir cmake-build-debug
|
||||
cd cmake-build-debug
|
||||
```
|
||||
|
||||
2. Configure the build system
|
||||
|
@ -198,8 +206,8 @@ as well to have a convenient way to configure the CMake build.
|
|||
1. Open the MinGW64 terminal and navigate to the `fsfw_example` folder
|
||||
2. Create a new folder for the executable.
|
||||
```sh
|
||||
mkdir build-Debug
|
||||
cd build-Debug
|
||||
mkdir cmake-build-debug
|
||||
cd cmake-build-debug
|
||||
```
|
||||
|
||||
The build options can be displayed with `cmake -L` .
|
||||
|
|
|
@ -1,28 +1,17 @@
|
|||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
BUILDDIR = 'build-Debug'
|
||||
BUILDDIR = 'cmake-build-debug'
|
||||
}
|
||||
agent {
|
||||
docker { image 'fsfw-ci:d3'}
|
||||
}
|
||||
stages {
|
||||
stage('Create Docker') {
|
||||
agent {
|
||||
dockerfile {
|
||||
dir 'automation'
|
||||
additionalBuildArgs '--no-cache'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
stage('Clean') {
|
||||
steps {
|
||||
sh 'rm -rf $BUILDDIR'
|
||||
}
|
||||
}
|
||||
stage('Configure') {
|
||||
agent {
|
||||
dockerfile {
|
||||
dir 'automation'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
dir(BUILDDIR) {
|
||||
sh 'cmake -DFSFW_OSAL=host ..'
|
||||
|
@ -30,15 +19,9 @@ pipeline {
|
|||
}
|
||||
}
|
||||
stage('Build') {
|
||||
agent {
|
||||
dockerfile {
|
||||
dir 'automation'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
dir(BUILDDIR) {
|
||||
sh 'cmake --build . -j'
|
||||
sh 'cmake --build . -j4'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
target_sources(${TARGET_NAME}
|
||||
PRIVATE
|
||||
main.cpp
|
||||
)
|
||||
target_sources(${TARGET_NAME} PRIVATE main.cpp)
|
||||
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(fsfwconfig)
|
||||
add_subdirectory(utility)
|
||||
|
||||
target_include_directories(${TARGET_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
@ -1,5 +1 @@
|
|||
target_sources(${TARGET_NAME}
|
||||
PRIVATE
|
||||
InitMission.cpp
|
||||
ObjectFactory.cpp
|
||||
)
|
||||
target_sources(${TARGET_NAME} PRIVATE InitMission.cpp ObjectFactory.cpp)
|
||||
|
|
|
@ -1,300 +1,305 @@
|
|||
#include <OBSWConfig.h>
|
||||
|
||||
#include <bsp_hosted/core/InitMission.h>
|
||||
#include <bsp_hosted/fsfwconfig/objects/systemObjectList.h>
|
||||
#include <bsp_hosted/fsfwconfig/pollingsequence/pollingSequenceFactory.h>
|
||||
#include "example/utility/TaskCreation.h"
|
||||
|
||||
#include "fsfw_tests/integration/assemblies/TestAssembly.h"
|
||||
|
||||
#include <fsfw/modes/HasModesIF.h>
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <fsfw/retval.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
|
||||
#include "example/utility/TaskCreation.h"
|
||||
#include "fsfw_tests/integration/assemblies/TestAssembly.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <fsfw/osal/windows/winTaskHelpers.h>
|
||||
#endif
|
||||
|
||||
|
||||
void InitMission::createTasks() {
|
||||
TaskFactory* taskFactory = TaskFactory::instance();
|
||||
if(taskFactory == nullptr) {
|
||||
return;
|
||||
}
|
||||
TaskFactory* taskFactory = TaskFactory::instance();
|
||||
if (taskFactory == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
TaskPriority currPrio;
|
||||
TaskPriority currPrio;
|
||||
#ifdef _WIN32
|
||||
currPrio = tasks::makeWinPriority();
|
||||
currPrio = tasks::makeWinPriority();
|
||||
#endif
|
||||
|
||||
TaskDeadlineMissedFunction deadlineMissedFunc = nullptr;
|
||||
TaskDeadlineMissedFunction deadlineMissedFunc = nullptr;
|
||||
#if OBSW_PRINT_MISSED_DEADLINES == 1
|
||||
deadlineMissedFunc = TaskFactory::printMissedDeadline;
|
||||
deadlineMissedFunc = TaskFactory::printMissedDeadline;
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_CORE_COMPONENTS == 1
|
||||
|
||||
#ifdef __unix__
|
||||
currPrio = 40;
|
||||
currPrio = 40;
|
||||
#endif
|
||||
/* TMTC Distribution */
|
||||
PeriodicTaskIF* distributerTask = taskFactory->createPeriodicTask(
|
||||
"DIST", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.1, deadlineMissedFunc);
|
||||
ReturnValue_t result = distributerTask->addComponent(objects::CCSDS_DISTRIBUTOR);
|
||||
if (result != returnvalue::OK) {
|
||||
task::printInitError("CCSDS distributor", objects::CCSDS_DISTRIBUTOR);
|
||||
}
|
||||
result = distributerTask->addComponent(objects::PUS_DISTRIBUTOR);
|
||||
if (result != returnvalue::OK) {
|
||||
task::printInitError("PUS distributor", objects::PUS_DISTRIBUTOR);
|
||||
}
|
||||
result = distributerTask->addComponent(objects::CFDP_DISTRIBUTOR);
|
||||
if (result != returnvalue::OK) {
|
||||
task::printInitError("CFDP distributor", objects::CFDP_DISTRIBUTOR);
|
||||
}
|
||||
result = distributerTask->addComponent(objects::TM_FUNNEL);
|
||||
if (result != returnvalue::OK) {
|
||||
task::printInitError("TM funnel", objects::TM_FUNNEL);
|
||||
}
|
||||
|
||||
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||
#ifdef __unix__
|
||||
currPrio = 50;
|
||||
#endif
|
||||
PeriodicTaskIF* cfdpTask = taskFactory->createPeriodicTask(
|
||||
"CFDP Handler", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, deadlineMissedFunc);
|
||||
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
||||
if (result != returnvalue::OK) {
|
||||
task::printInitError("CFDP Handler", objects::CFDP_HANDLER);
|
||||
}
|
||||
#endif
|
||||
/* TMTC Distribution */
|
||||
PeriodicTaskIF* distributerTask = taskFactory->createPeriodicTask(
|
||||
"DIST", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.1, deadlineMissedFunc);
|
||||
ReturnValue_t result = distributerTask->addComponent(
|
||||
objects::CCSDS_DISTRIBUTOR);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
task::printInitError("CCSDS distributor", objects::CCSDS_DISTRIBUTOR);
|
||||
}
|
||||
result = distributerTask->addComponent(objects::PUS_DISTRIBUTOR);
|
||||
if (result!=HasReturnvaluesIF::RETURN_OK) {
|
||||
task::printInitError("PUS distributor", objects::PUS_DISTRIBUTOR);
|
||||
}
|
||||
result = distributerTask->addComponent(objects::TM_FUNNEL);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
task::printInitError("TM funnel", objects::TM_FUNNEL);
|
||||
}
|
||||
|
||||
#ifdef __unix__
|
||||
currPrio = 50;
|
||||
currPrio = 50;
|
||||
#endif
|
||||
/* UDP bridge */
|
||||
PeriodicTaskIF* udpBridgeTask = taskFactory->createPeriodicTask(
|
||||
"TCPIP_TMTC_BRIDGE", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2,
|
||||
deadlineMissedFunc
|
||||
);
|
||||
result = udpBridgeTask->addComponent(objects::TCPIP_TMTC_BRIDGE);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
task::printInitError("TMTC bridge", objects::TCPIP_TMTC_BRIDGE);
|
||||
}
|
||||
/* UDP bridge */
|
||||
PeriodicTaskIF* udpBridgeTask = taskFactory->createPeriodicTask(
|
||||
"TCPIP_TMTC_BRIDGE", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, deadlineMissedFunc);
|
||||
result = udpBridgeTask->addComponent(objects::TCPIP_TMTC_BRIDGE);
|
||||
if (result != returnvalue::OK) {
|
||||
task::printInitError("TMTC bridge", objects::TCPIP_TMTC_BRIDGE);
|
||||
}
|
||||
|
||||
#ifdef __unix__
|
||||
currPrio = 80;
|
||||
currPrio = 80;
|
||||
#endif
|
||||
PeriodicTaskIF* udpPollingTask = taskFactory->createPeriodicTask(
|
||||
"TMTC_POLLING", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, deadlineMissedFunc
|
||||
);
|
||||
result = udpPollingTask->addComponent(objects::TCPIP_TMTC_POLLING_TASK);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
task::printInitError("TMTC polling", objects::TCPIP_TMTC_POLLING_TASK);
|
||||
}
|
||||
PeriodicTaskIF* udpPollingTask = taskFactory->createPeriodicTask(
|
||||
"TMTC_POLLING", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, deadlineMissedFunc);
|
||||
result = udpPollingTask->addComponent(objects::TCPIP_TMTC_POLLING_TASK);
|
||||
if (result != returnvalue::OK) {
|
||||
task::printInitError("TMTC polling", objects::TCPIP_TMTC_POLLING_TASK);
|
||||
}
|
||||
|
||||
#ifdef __unix__
|
||||
currPrio = 20;
|
||||
currPrio = 20;
|
||||
#endif
|
||||
PeriodicTaskIF* eventTask = taskFactory->createPeriodicTask(
|
||||
"EVENT", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.100, deadlineMissedFunc
|
||||
);
|
||||
result = eventTask->addComponent(objects::EVENT_MANAGER);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
task::printInitError("Event Manager", objects::EVENT_MANAGER);
|
||||
}
|
||||
PeriodicTaskIF* eventTask = taskFactory->createPeriodicTask(
|
||||
"EVENT", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.100, deadlineMissedFunc);
|
||||
result = eventTask->addComponent(objects::EVENT_MANAGER);
|
||||
if (result != returnvalue::OK) {
|
||||
task::printInitError("Event Manager", objects::EVENT_MANAGER);
|
||||
}
|
||||
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
|
||||
|
||||
#if OBSW_ADD_TASK_EXAMPLE == 1
|
||||
|
||||
#ifdef __unix__
|
||||
currPrio = 50;
|
||||
currPrio = 50;
|
||||
#endif
|
||||
FixedTimeslotTaskIF* timeslotDemoTask = taskFactory->createFixedTimeslotTask(
|
||||
"PST_TASK", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, deadlineMissedFunc);
|
||||
result = pst::pollingSequenceExamples(timeslotDemoTask);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
FixedTimeslotTaskIF* timeslotDemoTask = taskFactory->createFixedTimeslotTask(
|
||||
"PST_TASK", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, deadlineMissedFunc);
|
||||
result = pst::pollingSequenceExamples(timeslotDemoTask);
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "InitMission::createTasks: Timeslot demo task initialization failed!" <<
|
||||
std::endl;
|
||||
sif::error << "InitMission::createTasks: Timeslot demo task initialization failed!"
|
||||
<< std::endl;
|
||||
#else
|
||||
sif::printError("InitMission::createTasks: Timeslot demo task initialization failed!\n");
|
||||
sif::printError("InitMission::createTasks: Timeslot demo task initialization failed!\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __unix__
|
||||
currPrio = 40;
|
||||
currPrio = 40;
|
||||
#endif
|
||||
PeriodicTaskIF* readerTask = taskFactory->createPeriodicTask(
|
||||