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

@ -1,9 +0,0 @@
CSRC += $(wildcard $(CURRENTPATH)/*.c)
CXXSRC += $(wildcard $(CURRENTPATH)/*.cpp)
CSRC += $(wildcard $(CURRENTPATH)/core/*.c)
CXXSRC += $(wildcard $(CURRENTPATH)/core/*.cpp)
CSRC += $(wildcard $(CURRENTPATH)/utility/*.c)
INCLUDES += $(CURRENTPATH)

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 */

View File

@ -8,7 +8,9 @@
#include <commonConfig.h>
#define OBSW_TASK_PERIODIC_EVENT 0
#define OBSW_TASK_PERIODIC_EVENT 0
// Use a TCP server instead of a UDP server for TMTC reception
#define OBSW_USE_TCP_SERVER 0
#ifdef __cplusplus

View File

@ -1,8 +0,0 @@
CXXSRC += $(wildcard $(CURRENTPATH)/datapool/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/ipc/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/objects/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/pollingsequence/*.cpp)
INCLUDES += $(CURRENTPATH)
INCLUDES += $(CURRENTPATH)/events

View File

@ -6,10 +6,10 @@
namespace objects {
enum mission_objects {
/* 0x62 ('b') Board and mission specific objects */
UDP_BRIDGE = 0x62000300,
UDP_POLLING_TASK = 0x62000400,
TCPIP_TMTC_BRIDGE = 0x62000300,
TCPIP_TMTC_POLLING_TASK = 0x62000400,
/* Generic name for FSFW static ID setter */
DOWNLINK_DESTINATION = UDP_BRIDGE
DOWNLINK_DESTINATION = TCPIP_TMTC_BRIDGE
};
}