reintroducing tmtc bridge
fsfw/fsfw/pipeline/head There was a failure building this commit
Details
fsfw/fsfw/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
8b9a468893
commit
9110fd2728
|
@ -3,5 +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,
|
||||
|
|
Loading…
Reference in New Issue