2021-06-21 13:42:47 +02:00
|
|
|
#include <fsfw/datapool/DataPool.h>
|
|
|
|
#include <fsfw/objectmanager/ObjectManager.h>
|
|
|
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
|
|
|
#include <fsfw/tasks/TaskFactory.h>
|
|
|
|
#include <bsp_linux/core/InitMission.h>
|
|
|
|
#include <bsp_linux/core/ObjectFactory.h>
|
|
|
|
|
2021-09-10 17:08:38 +02:00
|
|
|
//#include <mission/test/MutexExample.h>
|
2021-06-21 13:42:47 +02:00
|
|
|
#include <mission/utility/PusPacketCreator.h>
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include "../bsp_linux/fsfwconfig/datapool/dataPoolInit.h"
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
static const char* COMPILE_PRINTOUT = "Windows";
|
|
|
|
#elif LINUX
|
|
|
|
static const char* COMPILE_PRINTOUT = "Linux";
|
|
|
|
#else
|
|
|
|
static const char* COMPILE_PRINTOUT = "unknown OS";
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// This is configured for linux without \cr
|
|
|
|
ServiceInterfaceStream sif::debug("DEBUG", false);
|
|
|
|
ServiceInterfaceStream sif::info("INFO", false);
|
|
|
|
ServiceInterfaceStream sif::warning("WARNING", false);
|
|
|
|
ServiceInterfaceStream sif::error("ERROR", false, false, true);
|
|
|
|
|
|
|
|
ObjectManagerIF *objectManager = nullptr;
|
|
|
|
|
|
|
|
//Initialize Data Pool
|
|
|
|
DataPool dataPool(dataPoolInit);
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
|
|
|
std::cout << "-- FSFW Example (Hosted) --" << std::endl;
|
|
|
|
std::cout << "-- Compiled for " << COMPILE_PRINTOUT << " --" << std::endl;
|
|
|
|
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
|
|
|
|
|
|
|
|
objectManager = new ObjectManager(ObjectFactory::produce);
|
|
|
|
objectManager->initialize();
|
|
|
|
InitMission::createTasks();
|
2021-09-10 17:08:38 +02:00
|
|
|
//MutexExample::example();
|
2021-06-21 13:42:47 +02:00
|
|
|
PusPacketCreator::createPusPacketAndPrint();
|
|
|
|
|
|
|
|
// Permanent loop.
|
|
|
|
for(;;) {
|
|
|
|
// sleep main thread, not needed anymore.
|
|
|
|
TaskFactory::delayTask(5000);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|