smaller tweaks and project file updatss

This commit is contained in:
2021-09-28 16:04:16 +02:00
parent ef21c6adbe
commit 859aa7750a
8 changed files with 45 additions and 36 deletions

View File

@ -62,23 +62,23 @@ void InitMission::createTasks() {
#endif
/* UDP bridge */
PeriodicTaskIF* udpBridgeTask = taskFactory->createPeriodicTask(
"UDP_UNIX_BRIDGE", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2,
"TCPIP_TMTC_BRIDGE", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2,
deadlineMissedFunc
);
result = udpBridgeTask->addComponent(objects::UDP_BRIDGE);
result = udpBridgeTask->addComponent(objects::TCPIP_TMTC_BRIDGE);
if(result != HasReturnvaluesIF::RETURN_OK) {
task::printInitError("UDP bridge", objects::UDP_BRIDGE);
task::printInitError("TMTC bridge", objects::TCPIP_TMTC_BRIDGE);
}
#ifdef __unix__
currPrio = 80;
#endif
PeriodicTaskIF* udpPollingTask = taskFactory->createPeriodicTask(
"UDP_POLLING", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, deadlineMissedFunc
"TMTC_POLLING", currPrio, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, deadlineMissedFunc
);
result = udpPollingTask->addComponent(objects::UDP_POLLING_TASK);
result = udpPollingTask->addComponent(objects::TCPIP_TMTC_POLLING_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
task::printInitError("UDP polling", objects::UDP_POLLING_TASK);
task::printInitError("TMTC polling", objects::TCPIP_TMTC_POLLING_TASK);
}
#ifdef __unix__

View File

@ -16,8 +16,13 @@
#include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h>
#if OBSW_USE_TCP_SERVER == 0
#include <fsfw/osal/common/UdpTcPollingTask.h>
#include <fsfw/osal/common/UdpTmTcBridge.h>
#else
#include "fsfw/osal/common/TcpTmTcServer.h"
#include "fsfw/osal/common/TcpTmTcBridge.h"
#endif
void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
@ -44,12 +49,18 @@ void ObjectFactory::produce(void* args) {
new PoolManager(objects::IPC_STORE, poolCfg);
}
/* TMTC Reception via UDP socket */
auto tmtcBridge = new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(20);
sif::info << "Opening UDP TMTC server on port " << tmtcBridge->getUdpPort() <<
std::endl;
new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
// TMTC Reception via TCP/IP socket
#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;
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 UDP TMTC server on port " << tmtcServer->getTcpPort() << std::endl;
#endif
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */