Compare commits
40 Commits
mueller/ua
...
mueller/ob
Author | SHA1 | Date | |
---|---|---|---|
7382d0b38a | |||
fd46784d0d | |||
448d20f3bd | |||
1c6efe2abb | |||
5a9d37f5d8 | |||
cdbf20bae7 | |||
6f562e5f3e | |||
176f243194 | |||
d964fa2107 | |||
7b5ae6a445 | |||
8e362a000c | |||
7877776e24 | |||
62f638a3d2 | |||
e6a877f048 | |||
ea8c557ee8 | |||
0bdd780f82 | |||
9ec397c8b7 | |||
30c03c110c | |||
69f1be263a | |||
c7b5309dcb | |||
775d5632de | |||
4f3361eb2b | |||
9e6c1d60e5 | |||
12d0c23c13 | |||
5c3bb13834 | |||
292fe3e5e4 | |||
33530f2819 | |||
c0000a8635 | |||
5488ee715f | |||
0fea22d031 | |||
3b8ca09299 | |||
9a2146fa2d | |||
bcbbc9763a | |||
8dea13742f | |||
0f027d29d2 | |||
ce7146e468 | |||
a681a4a797 | |||
4002b74ea2 | |||
6eea711d9f | |||
9d626e0a5d |
@ -326,7 +326,8 @@ if(FSFW_BUILD_TESTS)
|
|||||||
"/usr/local/include/*"
|
"/usr/local/include/*"
|
||||||
"*/fsfw_tests/*"
|
"*/fsfw_tests/*"
|
||||||
"*/catch2-src/*"
|
"*/catch2-src/*"
|
||||||
"*/fsfw_hal/*")
|
"*/fsfw_hal/*"
|
||||||
|
"unittests/*")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_options(${FSFW_TEST_TGT} PRIVATE -fprofile-arcs
|
target_link_options(${FSFW_TEST_TGT} PRIVATE -fprofile-arcs
|
||||||
@ -345,7 +346,8 @@ if(FSFW_BUILD_TESTS)
|
|||||||
else()
|
else()
|
||||||
setup_target_for_coverage_lcov(
|
setup_target_for_coverage_lcov(
|
||||||
NAME ${FSFW_TEST_TGT}_coverage EXECUTABLE ${FSFW_TEST_TGT}
|
NAME ${FSFW_TEST_TGT}_coverage EXECUTABLE ${FSFW_TEST_TGT}
|
||||||
DEPENDENCIES ${FSFW_TEST_TGT})
|
DEPENDENCIES ${FSFW_TEST_TGT}
|
||||||
|
GENHTML_ARGS --html-epilog ${CMAKE_SOURCE_DIR}/unittests/lcov_epilog.html)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -5,7 +5,7 @@ RUN apt-get --yes upgrade
|
|||||||
|
|
||||||
#tzdata is a dependency, won't install otherwise
|
#tzdata is a dependency, won't install otherwise
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get --yes install gcc g++ cmake make lcov git valgrind nano iputils-ping python3 pip doxygen graphviz
|
RUN apt-get --yes install gcc g++ cmake make lcov git valgrind nano iputils-ping python3 pip doxygen graphviz rsync
|
||||||
|
|
||||||
RUN python3 -m pip install sphinx breathe
|
RUN python3 -m pip install sphinx breathe
|
||||||
|
|
||||||
@ -23,3 +23,7 @@ RUN git clone https://github.com/ETLCPP/etl.git && \
|
|||||||
|
|
||||||
#ssh needs a valid user to work
|
#ssh needs a valid user to work
|
||||||
RUN adduser --uid 114 jenkins
|
RUN adduser --uid 114 jenkins
|
||||||
|
|
||||||
|
#add documentation server to known hosts
|
||||||
|
RUN echo "|1|/LzCV4BuTmTb2wKnD146l9fTKgQ=|NJJtVjvWbtRt8OYqFgcYRnMQyVw= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNL8ssTonYtgiR/6RRlSIK9WU1ywOcJmxFTLcEblAwH7oifZzmYq3XRfwXrgfMpylEfMFYfCU8JRqtmi19xc21A=" >> /etc/ssh/ssh_known_hosts
|
||||||
|
RUN echo "|1|CcBvBc3EG03G+XM5rqRHs6gK/Gg=|oGeJQ+1I8NGI2THIkJsW92DpTzs= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNL8ssTonYtgiR/6RRlSIK9WU1ywOcJmxFTLcEblAwH7oifZzmYq3XRfwXrgfMpylEfMFYfCU8JRqtmi19xc21A=" >> /etc/ssh/ssh_known_hosts
|
14
automation/Jenkinsfile
vendored
14
automation/Jenkinsfile
vendored
@ -5,7 +5,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
image 'fsfw-ci:d5'
|
image 'fsfw-ci:d6'
|
||||||
args '--network host'
|
args '--network host'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,14 +52,12 @@ pipeline {
|
|||||||
sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
|
sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
|
||||||
sh 'make Sphinx'
|
sh 'make Sphinx'
|
||||||
sshagent(credentials: ['documentation-buildfix']) {
|
sshagent(credentials: ['documentation-buildfix']) {
|
||||||
sh 'ssh -o StrictHostKeyChecking=no buildfix@documentation.intra.irs.uni-stuttgart.de rm -rf /mnt/data/www/html/fsfw/development/*'
|
sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/development'
|
||||||
sh 'scp -o StrictHostKeyChecking=no -r docs/sphinx/* buildfix@documentation.intra.irs.uni-stuttgart.de:/mnt/data/www/html/fsfw/development'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dir(BUILDDIR) {
|
dir(BUILDDIR) {
|
||||||
sshagent(credentials: ['documentation-buildfix']) {
|
sshagent(credentials: ['documentation-buildfix']) {
|
||||||
sh 'ssh -o StrictHostKeyChecking=no buildfix@documentation.intra.irs.uni-stuttgart.de rm -rf /mnt/data/www/html/fsfw/coverage/development/*'
|
sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/development'
|
||||||
sh 'scp -o StrictHostKeyChecking=no -r fsfw-tests_coverage/* buildfix@documentation.intra.irs.uni-stuttgart.de:/mnt/data/www/html/fsfw/coverage/development'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,14 +71,12 @@ pipeline {
|
|||||||
sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
|
sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
|
||||||
sh 'make Sphinx'
|
sh 'make Sphinx'
|
||||||
sshagent(credentials: ['documentation-buildfix']) {
|
sshagent(credentials: ['documentation-buildfix']) {
|
||||||
sh 'ssh -o StrictHostKeyChecking=no buildfix@documentation.intra.irs.uni-stuttgart.de rm -rf /mnt/data/www/html/fsfw/master/*'
|
sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/master'
|
||||||
sh 'scp -o StrictHostKeyChecking=no -r docs/sphinx/* buildfix@documentation.intra.irs.uni-stuttgart.de:/mnt/data/www/html/fsfw/master'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dir(BUILDDIR) {
|
dir(BUILDDIR) {
|
||||||
sshagent(credentials: ['documentation-buildfix']) {
|
sshagent(credentials: ['documentation-buildfix']) {
|
||||||
sh 'ssh -o StrictHostKeyChecking=no buildfix@documentation.intra.irs.uni-stuttgart.de rm -rf /mnt/data/www/html/fsfw/coverage/master/*'
|
sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/master'
|
||||||
sh 'scp -o StrictHostKeyChecking=no -r fsfw-tests_coverage/* buildfix@documentation.intra.irs.uni-stuttgart.de:/mnt/data/www/html/fsfw/coverage/master'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,11 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|||||||
#
|
#
|
||||||
html_theme = 'alabaster'
|
html_theme = 'alabaster'
|
||||||
|
|
||||||
|
html_theme_options = {
|
||||||
|
"extra_nav_links": {"Impressum" : "https://www.uni-stuttgart.de/impressum", "Datenschutz": "https://info.irs.uni-stuttgart.de/datenschutz/datenschutzWebmit.html"}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
|
@ -6,13 +6,14 @@ High-level overview
|
|||||||
Structure
|
Structure
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The general structure is driven by the usage of interfaces provided by objects.
|
The general structure is driven by the usage of interfaces provided by objects.
|
||||||
The FSFW uses C++11 as baseline. The intention behind this is that this C++ Standard should be
|
The FSFW uses C++17 as baseline. Most modern compilers like GCC should have support for this
|
||||||
widely available, even with older compilers.
|
standard, even for micocontrollers.
|
||||||
The FSFW uses dynamic allocation during the initialization but provides static containers during runtime.
|
|
||||||
This simplifies the instantiation of objects and allows the usage of some standard containers.
|
The FSFW might use dynamic allocation during program initialization but not during runtime.
|
||||||
Dynamic Allocation after initialization is discouraged and different solutions are provided in the
|
It offers pool objects, static containers and it also exposes the
|
||||||
FSFW to achieve that. The fsfw uses run-time type information but exceptions are not allowed.
|
`Embedded Template Library <https://www.etlcpp.com/>`_ to allow writing code which does not perform
|
||||||
|
allocation during runtime. The fsfw uses run-time type information but will not throw exceptions.
|
||||||
|
|
||||||
Failure Handling
|
Failure Handling
|
||||||
-----------------
|
-----------------
|
||||||
|
@ -199,7 +199,7 @@ def check_for_cmake_build_dir(build_dir_list: list) -> list:
|
|||||||
def perform_lcov_operation(directory: str, chdir: bool):
|
def perform_lcov_operation(directory: str, chdir: bool):
|
||||||
if chdir:
|
if chdir:
|
||||||
os.chdir(directory)
|
os.chdir(directory)
|
||||||
cmd_runner("cmake --build . -- fsfw-tests_coverage -j")
|
cmd_runner("cmake --build -j . -- fsfw-tests_coverage")
|
||||||
|
|
||||||
|
|
||||||
def determine_build_dir(build_dir_list: List[str]):
|
def determine_build_dir(build_dir_list: List[str]):
|
||||||
|
@ -48,12 +48,12 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
|
|||||||
if (hkOwner == nullptr) {
|
if (hkOwner == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "LocalPoolVariable: The supplied pool owner 0x" << std::hex << poolOwner
|
sif::error << "LocalPoolVariable: The supplied pool owner 0x" << std::hex << poolOwner
|
||||||
<< std::dec << " did not implement the correct interface "
|
<< std::dec << " does not exist or does not implement the correct interface "
|
||||||
<< "HasLocalDataPoolIF" << std::endl;
|
<< "HasLocalDataPoolIF" << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printError(
|
sif::printError(
|
||||||
"LocalPoolVariable: The supplied pool owner 0x%08x did not implement the correct "
|
"LocalPoolVariable: The supplied pool owner 0x%08x does not exist or does not implement "
|
||||||
"interface HasLocalDataPoolIF\n",
|
"the correct interface HasLocalDataPoolIF\n",
|
||||||
poolOwner);
|
poolOwner);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
@ -16,11 +16,6 @@ ObjectManager* ObjectManager::instance() {
|
|||||||
return objManagerInstance;
|
return objManagerInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectManager::setObjectFactoryFunction(produce_function_t objFactoryFunc, void* factoryArgs) {
|
|
||||||
this->objectFactoryFunction = objFactoryFunc;
|
|
||||||
this->factoryArgs = factoryArgs;
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjectManager::ObjectManager() = default;
|
ObjectManager::ObjectManager() = default;
|
||||||
|
|
||||||
ObjectManager::~ObjectManager() {
|
ObjectManager::~ObjectManager() {
|
||||||
@ -79,17 +74,6 @@ SystemObjectIF* ObjectManager::getSystemObject(object_id_t id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ObjectManager::initialize() {
|
void ObjectManager::initialize() {
|
||||||
if (objectFactoryFunction == nullptr) {
|
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
|
||||||
sif::error << "ObjectManager::initialize: Passed produceObjects "
|
|
||||||
"functions is nullptr!"
|
|
||||||
<< std::endl;
|
|
||||||
#else
|
|
||||||
sif::printError("ObjectManager::initialize: Passed produceObjects functions is nullptr!\n");
|
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
objectFactoryFunction(factoryArgs);
|
|
||||||
ReturnValue_t result = returnvalue::FAILED;
|
ReturnValue_t result = returnvalue::FAILED;
|
||||||
uint32_t errorCount = 0;
|
uint32_t errorCount = 0;
|
||||||
for (auto const& it : objectList) {
|
for (auto const& it : objectList) {
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
class ObjectManager : public ObjectManagerIF {
|
class ObjectManager : public ObjectManagerIF {
|
||||||
public:
|
public:
|
||||||
using produce_function_t = void (*)(void* args);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the single instance of TaskFactory.
|
* Returns the single instance of TaskFactory.
|
||||||
@ -30,8 +29,6 @@ class ObjectManager : public ObjectManagerIF {
|
|||||||
*/
|
*/
|
||||||
static ObjectManager* instance();
|
static ObjectManager* instance();
|
||||||
|
|
||||||
void setObjectFactoryFunction(produce_function_t prodFunc, void* args);
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T* get(object_id_t id);
|
T* get(object_id_t id);
|
||||||
|
|
||||||
@ -54,8 +51,6 @@ class ObjectManager : public ObjectManagerIF {
|
|||||||
* @param The id of the object to be created.
|
* @param The id of the object to be created.
|
||||||
* @return Returns a pointer to the newly created object or NULL.
|
* @return Returns a pointer to the newly created object or NULL.
|
||||||
*/
|
*/
|
||||||
produce_function_t objectFactoryFunction = nullptr;
|
|
||||||
void* factoryArgs = nullptr;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ObjectManager();
|
ObjectManager();
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
#ifndef FRAMEWORK_SERVICEINTERFACE_SERVICEINTERFACESTREAM_H_
|
#ifndef FRAMEWORK_SERVICEINTERFACE_SERVICEINTERFACESTREAM_H_
|
||||||
#define FRAMEWORK_SERVICEINTERFACE_SERVICEINTERFACESTREAM_H_
|
#define FRAMEWORK_SERVICEINTERFACE_SERVICEINTERFACESTREAM_H_
|
||||||
|
|
||||||
#include <FSFWConfig.h>
|
|
||||||
|
|
||||||
#include "ServiceInterfaceBuffer.h"
|
#include "ServiceInterfaceBuffer.h"
|
||||||
|
#include "fsfw/FSFW.h"
|
||||||
|
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
|
||||||
|
@ -646,7 +646,7 @@ ReturnValue_t TestDevice::initializeLocalDataPool(localpool::DataPool& localData
|
|||||||
/* Subscribe for periodic HK packets but do not enable reporting for now.
|
/* Subscribe for periodic HK packets but do not enable reporting for now.
|
||||||
Non-diangostic with a period of one second */
|
Non-diangostic with a period of one second */
|
||||||
poolManager.subscribeForRegularPeriodicPacket({sid, false, 1.0});
|
poolManager.subscribeForRegularPeriodicPacket({sid, false, 1.0});
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||||
|
@ -25,7 +25,7 @@ ServiceInterfaceStream warning("WARNING");
|
|||||||
int customSetup() {
|
int customSetup() {
|
||||||
// global setup
|
// global setup
|
||||||
ObjectManager* objMan = ObjectManager::instance();
|
ObjectManager* objMan = ObjectManager::instance();
|
||||||
objMan->setObjectFactoryFunction(Factory::produceFrameworkObjects, nullptr);
|
Factory::produceFrameworkObjects(nullptr);
|
||||||
objMan->initialize();
|
objMan->initialize();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
2
unittests/lcov_epilog.html
Normal file
2
unittests/lcov_epilog.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<center><a href='https://www.uni-stuttgart.de/impressum'>Impressum</a> <a href='https://info.irs.uni-stuttgart.de/datenschutz/datenschutzWebmit.html'>Datenschutz</a></center>
|
||||||
|
</body>
|
Reference in New Issue
Block a user