Compare commits

..

2 Commits

Author SHA1 Message Date
9110fd2728 reintroducing tmtc bridge
Some checks failed
fsfw/fsfw/pipeline/head There was a failure building this commit
2023-10-27 13:40:29 +02:00
8b9a468893 hotfixes to get it to compile for freertos/arm-none-eabi
Some checks failed
fsfw/fsfw/pipeline/head There was a failure building this commit
2023-09-18 22:56:53 +02:00
5 changed files with 19 additions and 4 deletions

View File

@ -5,7 +5,9 @@ void TaskManagement::vRequestContextSwitchFromTask() { vTaskDelay(0); }
void TaskManagement::requestContextSwitch(CallContext callContext = CallContext::TASK) {
if (callContext == CallContext::ISR) {
// This function depends on the partmacro.h definition for the specific device
vRequestContextSwitchFromISR();
//vRequestContextSwitchFromISR();
//TODO is this all still needed in current freeRTOS?
vRequestContextSwitchFromTask();
} else {
vRequestContextSwitchFromTask();
}

View File

@ -9,6 +9,8 @@
#ifdef PLATFORM_WIN
// wtf? Required for timeval!
#include <winsock.h>
#else
#include <sys/time.h>
#endif
#include "TimeStampIF.h"

View File

@ -3,4 +3,5 @@ target_sources(
FsfwProtocolHeader.cpp
TmManager.cpp
TmMessage.cpp
UdpTmTcBridge.cpp)
UdpTmTcBridge.cpp
)

View File

@ -1,6 +1,8 @@
#include "UdpTmTcBridge.h"
extern "C" {
#include <arpa/inet.h>
}
#include <errno.h>
#include <fsfw/action.h>
#include <fsfw/ipc/QueueFactory.h>
@ -48,7 +50,7 @@ ReturnValue_t UdpTmTcBridgeNew::initialize() {
int retval;
serverSocket = socket(AF_INET6, SOCK_DGRAM | SOCK_NONBLOCK, 0);
serverSocket = socket(AF_INET6, SOCK_DGRAM, 0);
if (serverSocket == -1) {
// TODO resolve errno
#if FSFW_CPP_OSTREAM_ENABLED == 1
@ -57,6 +59,11 @@ ReturnValue_t UdpTmTcBridgeNew::initialize() {
return returnvalue::FAILED;
}
//TODO verify that lwip interprets this correctly
int flags = fcntl(serverSocket, F_GETFL, 0);
flags |= O_NONBLOCK;
fcntl(serverSocket, F_SETFL, flags);
sockaddr_in6 serverAddr;
memset(&serverAddr, 0, sizeof(serverAddr));
@ -144,6 +151,7 @@ void UdpTmTcBridgeNew::handleTC() {
return;
}
size_t bufferLen = receivedLen;
const uint8_t *constApplicationData = applicationData;

View File

@ -5,7 +5,9 @@
#include <fsfw/storagemanager/StorageManagerIF.h>
#include <fsfw/tasks/ExecutableObjectIF.h>
#include <fsfw/tmtc/AcceptsTelemetryIF.h>
#include <netinet/in.h>
#include <sys/socket.h>
class UdpTmTcBridgeNew : public SystemObject,
public ExecutableObjectIF,