Compare commits
2 Commits
mohr_intro
...
mohr/romeo
Author | SHA1 | Date | |
---|---|---|---|
9110fd2728 | |||
8b9a468893 |
@ -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();
|
||||
}
|
||||
|
@ -9,6 +9,8 @@
|
||||
#ifdef PLATFORM_WIN
|
||||
// wtf? Required for timeval!
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include "TimeStampIF.h"
|
||||
|
@ -3,4 +3,5 @@ target_sources(
|
||||
FsfwProtocolHeader.cpp
|
||||
TmManager.cpp
|
||||
TmMessage.cpp
|
||||
UdpTmTcBridge.cpp)
|
||||
UdpTmTcBridge.cpp
|
||||
)
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user