added updates manually
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include <bsp_hosted/core/InitMission.h>
|
||||
#include <bsp_hosted/fsfwconfig/objects/systemObjectList.h>
|
||||
#include <bsp_hosted/fsfwconfig/pollingsequence/pollingSequenceFactory.h>
|
||||
#include <fsfw/modes/HasModesIF.h>
|
||||
|
||||
#include <mission/utility/TaskCreation.h>
|
||||
|
||||
@ -11,6 +12,7 @@
|
||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <mission/assemblies/TestAssembly.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <fsfw/osal/windows/winTaskHelpers.h>
|
||||
@ -185,10 +187,13 @@ void InitMission::createTasks() {
|
||||
|
||||
#if OBSW_ADD_DEVICE_HANDLER_DEMO == 1
|
||||
#ifdef __unix__
|
||||
currPrio = 40;
|
||||
currPrio = 60;
|
||||
#elif _WIN32
|
||||
currPrio = tasks::makeWinPriority(tasks::PriorityClass::CLASS_HIGH,
|
||||
tasks::PriorityNumber::HIGHEST);
|
||||
#endif
|
||||
FixedTimeslotTaskIF* testDevicesTimeslotTask = taskFactory->createFixedTimeslotTask(
|
||||
"PST_TEST_TASK", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, deadlineMissedFunc);
|
||||
"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
|
||||
@ -196,6 +201,21 @@ void InitMission::createTasks() {
|
||||
#else
|
||||
sif::printError("InitMission::createTasks: Test PST initialization failed!\n");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if _WIN32
|
||||
currPrio = tasks::makeWinPriority();
|
||||
#endif
|
||||
|
||||
PeriodicTaskIF* assemblyTask = taskFactory->createPeriodicTask("ASS_TASK", currPrio,
|
||||
PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, nullptr);
|
||||
if(assemblyTask == nullptr){
|
||||
task::printInitError("ASS_TASK", objects::TEST_ASSEMBLY);
|
||||
}
|
||||
result = assemblyTask->addComponent(objects::TEST_ASSEMBLY);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
task::printInitError("ASS_TASK", objects::TEST_ASSEMBLY);
|
||||
}
|
||||
#endif /* OBSW_ADD_DEVICE_HANDLER_DEMO == 1 */
|
||||
|
||||
@ -247,6 +267,7 @@ void InitMission::createTasks() {
|
||||
|
||||
#if OBSW_ADD_DEVICE_HANDLER_DEMO == 1
|
||||
testDevicesTimeslotTask->startTask();
|
||||
assemblyTask->startTask();
|
||||
#endif /* OBSW_ADD_DEVICE_HANDLER_DEMO == 1 */
|
||||
|
||||
#if OBSW_ADD_CONTROLLER_DEMO == 1
|
||||
@ -260,6 +281,30 @@ void InitMission::createTasks() {
|
||||
#else
|
||||
sif::printInfo("Tasks started..\n");
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_DEVICE_HANDLER_DEMO
|
||||
HasModesIF* assembly = objectManager->get<HasModesIF>(objects::TEST_ASSEMBLY);
|
||||
if (assembly == nullptr){
|
||||
return;
|
||||
}
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Waiting 5 Seconds and then command Test Assembly to Normal, Dual" << std::endl;
|
||||
#else
|
||||
sif::printInfo("Waiting 5 Seconds and then command Test Assembly to Normal, Dual \n");
|
||||
#endif
|
||||
|
||||
TaskFactory::delayTask(5000);
|
||||
CommandMessage modeMessage;
|
||||
ModeMessage::setModeMessage(&modeMessage, ModeMessage::CMD_MODE_COMMAND,
|
||||
DeviceHandlerIF::MODE_NORMAL, TestAssembly::submodes::DUAL);
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Commanding Test Assembly to Normal, Dual" << std::endl;
|
||||
#else
|
||||
sif::printInfo("Commanding Test Assembly to Normal, Dual \n");
|
||||
#endif
|
||||
MessageQueueSenderIF::sendMessage(assembly->getCommandQueue(), &modeMessage,
|
||||
MessageQueueIF::NO_QUEUE);
|
||||
#endif /* OBSW_ADD_DEVICE_HANDLER_DEMO */
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,8 +47,9 @@ void ObjectFactory::produce(){
|
||||
}
|
||||
|
||||
/* TMTC Reception via UDP socket */
|
||||
new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_DISTRIBUTOR,
|
||||
auto tmtcBridge = new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_DISTRIBUTOR,
|
||||
objects::TM_STORE, objects::TC_STORE);
|
||||
tmtcBridge->setMaxNumberOfPacketsStored(20);
|
||||
new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
|
||||
|
||||
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
|
||||
|
Reference in New Issue
Block a user