complete iostream replacement
This commit is contained in:
parent
aea14e10c3
commit
857548fe79
@ -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,11 +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
|
||||
std::cerr << "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__
|
||||
@ -186,11 +182,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
|
||||
std::cerr << "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
|
||||
@ -229,11 +221,7 @@ void InitMission::createTasks() {
|
||||
task::printInitError("Test Task", objects::TEST_TASK);
|
||||
}
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
std::cout << "Starting tasks.." << std::endl;
|
||||
#else
|
||||
sif::printInfo("Starting tasks..\n");
|
||||
#endif
|
||||
FSFW_LOGI("Starting tasks..\n");
|
||||
|
||||
#if OBSW_ADD_CORE_COMPONENTS == 1
|
||||
distributerTask->startTask();
|
||||
@ -265,11 +253,7 @@ void InitMission::createTasks() {
|
||||
|
||||
testTask->startTask();
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
std::cout << "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);
|
||||
|
@ -46,7 +46,7 @@ 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);
|
||||
std::cout << "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);
|
||||
|
@ -2,14 +2,11 @@
|
||||
#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"
|
||||
#include "fsfw/ipc/MutexGuard.h"
|
||||
|
||||
#ifdef PLATFORM_WIN
|
||||
static const char* COMPILE_PRINTOUT = "Windows";
|
||||
@ -29,29 +26,16 @@ static const char* COMPILE_PRINTOUT = "unknown OS";
|
||||
int main() {
|
||||
utility::commonInitPrint("Hosted", COMPILE_PRINTOUT);
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
std::cout << "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
|
||||
std::cout << "Objects created successfully.." << std::endl;
|
||||
std::cout << "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
|
||||
std::cout << "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 6f2e03f0031fd54eb89ed0a12996400868ee7d7f
|
||||
Subproject commit b7fda13b4bd576c327e110cb283ed53213cff847
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 83a2882f9d46df5bd480f3ac9e6f9d85dc7f4dcc
|
||||
Subproject commit f518bc53db808b2fcbb947752bcdfa4343772d8b
|
Loading…
x
Reference in New Issue
Block a user