Compare commits
19 Commits
main
...
mueller/fm
Author | SHA1 | Date | |
---|---|---|---|
d71da9b1b6 | |||
45fec3f529 | |||
38a77a6233 | |||
da78c18117 | |||
e8eac1f605 | |||
72f0efb784 | |||
8a44bba8a8 | |||
466b088dce | |||
f42b3e52d1 | |||
6f4b7bfbf2 | |||
7a859fbbd6 | |||
9b68a282a7 | |||
bd3164bacd | |||
1fe6fd9ead | |||
857548fe79 | |||
aea14e10c3 | |||
100910d13c | |||
e66c02a86a | |||
f26c9d2794 |
1
.idea/cmake.xml
generated
1
.idea/cmake.xml
generated
@ -2,6 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="CMakeSharedSettings">
|
||||
<configurations>
|
||||
<configuration PROFILE_NAME="MinSizeRel" ENABLED="true" CONFIG_NAME="MinSizeRel" />
|
||||
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" />
|
||||
<configuration PROFILE_NAME="Debug Linux" ENABLED="true" GENERATION_DIR="cmake-build-debug-linux" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DFSFW_OSAL=linux" />
|
||||
<configuration PROFILE_NAME="Release" ENABLED="true" CONFIG_NAME="Release" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="fsfw-example-hosted" 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="Release" RUN_TARGET_PROJECT_NAME="fsfw-example-hosted" RUN_TARGET_NAME="fsfw-example-hosted">
|
||||
<configuration default="false" name="fsfw-example-hosted" 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="MinSizeRel" 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>
|
||||
|
@ -13,6 +13,9 @@ cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# set(CMAKE_VERBOSE TRUE)
|
||||
|
||||
# Project Name
|
||||
project(fsfw-example-hosted C CXX)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
set(OBSW_MAX_SCHEDULED_TCS 200)
|
||||
@ -23,8 +26,12 @@ if(NOT FSFW_OSAL)
|
||||
CACHE STRING "OS for the FSFW.")
|
||||
endif()
|
||||
|
||||
# Project Name
|
||||
project(fsfw-example-hosted C CXX)
|
||||
option(OBSW_ADD_FMT_TESTS "Add {fmt} library tests" OFF)
|
||||
option(OBSW_ENABLE_IPO "Enable IPO/LTO optimization" ON)
|
||||
|
||||
if(OBSW_ENABLE_IPO)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
option(OBSW_ENABLE_IPO "Enable IPO/LTO optimization" ON)
|
||||
|
||||
@ -106,10 +113,10 @@ add_subdirectory(${COMMON_PATH})
|
||||
# ##############################################################################
|
||||
|
||||
# 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(
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <bsp_hosted/fsfwconfig/pollingsequence/pollingSequenceFactory.h>
|
||||
#include <fsfw/modes/HasModesIF.h>
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||
#include <fsfw/serviceinterface.h>
|
||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
@ -94,12 +94,7 @@ void InitMission::createTasks() {
|
||||
"PST_TASK", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, deadlineMissedFunc);
|
||||
result = pst::pollingSequenceExamples(timeslotDemoTask);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "InitMission::createTasks: Timeslot demo task initialization failed!"
|
||||
<< std::endl;
|
||||
#else
|
||||
sif::printError("InitMission::createTasks: Timeslot demo task initialization failed!\n");
|
||||
#endif
|
||||
FSFW_LOGE("InitMission::createTasks: Timeslot demo task initialization failed\n");
|
||||
}
|
||||
|
||||
#ifdef __unix__
|
||||
@ -191,11 +186,7 @@ void InitMission::createTasks() {
|
||||
"PST_TEST_TASK", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, deadlineMissedFunc);
|
||||
result = pst::pollingSequenceDevices(testDevicesTimeslotTask);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "InitMission::createTasks: Test PST initialization failed!" << std::endl;
|
||||
#else
|
||||
sif::printError("InitMission::createTasks: Test PST initialization failed!\n");
|
||||
#endif
|
||||
FSFW_LOGE("InitMission::createTasks: Test PST initialization failed\n");
|
||||
}
|
||||
|
||||
#if _WIN32
|
||||
@ -234,11 +225,7 @@ void InitMission::createTasks() {
|
||||
task::printInitError("Test Task", objects::TEST_TASK);
|
||||
}
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Starting tasks.." << std::endl;
|
||||
#else
|
||||
sif::printInfo("Starting tasks..\n");
|
||||
#endif
|
||||
FSFW_LOGI("Starting tasks..\n");
|
||||
|
||||
#if OBSW_ADD_CORE_COMPONENTS == 1
|
||||
distributerTask->startTask();
|
||||
@ -270,11 +257,7 @@ void InitMission::createTasks() {
|
||||
|
||||
testTask->startTask();
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Tasks started.." << std::endl;
|
||||
#else
|
||||
sif::printInfo("Tasks started..\n");
|
||||
#endif
|
||||
FSFW_LOGI("Tasks started\n");
|
||||
|
||||
#if OBSW_ADD_DEVICE_HANDLER_DEMO
|
||||
auto* assembly = ObjectManager::instance()->get<HasModesIF>(objects::TEST_ASSEMBLY);
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "OBSWConfig.h"
|
||||
#include "bsp_hosted/fsfwconfig/objects/systemObjectList.h"
|
||||
#include "bsp_hosted/fsfwconfig/tmtc/apid.h"
|
||||
#include "fsfw/serviceinterface.h"
|
||||
#include "commonConfig.h"
|
||||
#include "example/core/GenericFactory.h"
|
||||
#include "example/test/FsfwTestTask.h"
|
||||
@ -44,13 +45,13 @@ void ObjectFactory::produce(void* args) {
|
||||
#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;
|
||||
FSFW_LOGI("Opening UDP TMTC server on port {}\n", tmtcBridge->getUdpPort());
|
||||
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 TCP TMTC server on port " << tmtcServer->getTcpPort() << std::endl;
|
||||
FSFW_LOGI("Opening TCP TMTC server on port {}\n", tmtcServer->getTcpPort());
|
||||
#endif
|
||||
|
||||
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
|
||||
|
@ -2,11 +2,9 @@
|
||||
#include <bsp_hosted/core/ObjectFactory.h>
|
||||
#include <fsfw/objectmanager/ObjectManager.h>
|
||||
#include <fsfw/platform.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||
#include <fsfw/serviceinterface.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include "example/test/MutexExample.h"
|
||||
#include "example/utility/utility.h"
|
||||
|
||||
@ -19,38 +17,25 @@ static const char* COMPILE_PRINTOUT = "unknown OS";
|
||||
#endif
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
ServiceInterfaceStream sif::debug("DEBUG", false);
|
||||
ServiceInterfaceStream sif::info("INFO", false);
|
||||
ServiceInterfaceStream sif::warning("WARNING", false);
|
||||
ServiceInterfaceStream sif::error("ERROR", false, true, true);
|
||||
// ServiceInterfaceStream sif::debug("DEBUG", false);
|
||||
// ServiceInterfaceStream sif::info("INFO", false);
|
||||
// ServiceInterfaceStream sif::warning("WARNING", false);
|
||||
// ServiceInterfaceStream sif::error("ERROR", false, true, true);
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
utility::commonInitPrint("Hosted", COMPILE_PRINTOUT);
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Producing system objects.." << std::endl;
|
||||
#else
|
||||
sif::printInfo("Producing system objects..\n");
|
||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||
FSFW_LOGI("Producing system objects\n");
|
||||
|
||||
ObjectManager* objManager = ObjectManager::instance();
|
||||
objManager->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Objects created successfully.." << std::endl;
|
||||
sif::info << "Initializing objects.." << std::endl;
|
||||
#else
|
||||
sif::printInfo("Objects created successfully..\n");
|
||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||
FSFW_LOGI("Objects created successfully, initializing objects\n");
|
||||
|
||||
objManager->initialize();
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Creating tasks.." << std::endl;
|
||||
#else
|
||||
sif::printInfo("Creating tasks..\n");
|
||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||
FSFW_LOGI("Creating tasks\n");
|
||||
|
||||
InitMission::createTasks();
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8203995deb087c0a51ce7ec7fdc0f0f4f21d06ce
|
||||
Subproject commit 54160e540c95ad81f9345b4572e2044fa852300b
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit f7cde800880f17bcfbed77aa4cd66fcb2a9b1ee3
|
||||
Subproject commit 42a1e784c09c554d20cb30e3c9965f4722fb4ef2
|
Loading…
x
Reference in New Issue
Block a user