common cmake files moved to example_common
This commit is contained in:
@ -1,12 +1,11 @@
|
||||
#include "TmTcLwIpUdpBridge.h"
|
||||
|
||||
#include <OBSWConfig.h>
|
||||
|
||||
#include <fsfw/ipc/MutexGuard.h>
|
||||
#include <fsfw/serialize/EndianConverter.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||
|
||||
#include "app_ethernet.h"
|
||||
#include "ethernetif.h"
|
||||
#include "udp_config.h"
|
||||
|
||||
TmTcLwIpUdpBridge::TmTcLwIpUdpBridge(object_id_t objectId,
|
||||
@ -56,7 +55,7 @@ ReturnValue_t TmTcLwIpUdpBridge::udp_server_init() {
|
||||
ReturnValue_t TmTcLwIpUdpBridge::performOperation(uint8_t operationCode) {
|
||||
TmTcBridge::performOperation();
|
||||
|
||||
#if TCPIP_RECV_WIRETAPPING == 1
|
||||
#if OBSW_TCPIP_UDP_WIRETAPPING == 1
|
||||
if (connectFlag) {
|
||||
uint32_t ipAddress = ((ip4_addr *)&lastAdd)->addr;
|
||||
int ipAddress1 = (ipAddress & 0xFF000000) >> 24;
|
||||
@ -90,7 +89,7 @@ ReturnValue_t TmTcLwIpUdpBridge::sendTm(const uint8_t *data, size_t dataLen) {
|
||||
if ((p_tx != nullptr) && (lastAdd.addr != IPADDR_TYPE_ANY) &&
|
||||
(upcb != nullptr)) {
|
||||
/* copy data to pbuf */
|
||||
err_t err = pbuf_take(p_tx, (char *)data, dataLen);
|
||||
err_t err = pbuf_take(p_tx, (const char *)data, dataLen);
|
||||
if (err != ERR_OK) {
|
||||
pbuf_free(p_tx);
|
||||
return err;
|
||||
@ -143,7 +142,7 @@ void TmTcLwIpUdpBridge::udp_server_receive_callback(void *arg,
|
||||
udpBridge->lastPort = port;
|
||||
if (not udpBridge->comLinkUp()) {
|
||||
udpBridge->registerCommConnect();
|
||||
#if TCPIP_RECV_WIRETAPPING == 1
|
||||
#if OBSW_TCPIP_UDP_WIRETAPPING == 1
|
||||
udpBridge->connectFlag = true;
|
||||
#endif
|
||||
/* This should have already been done, but we will still do it */
|
||||
@ -155,8 +154,8 @@ void TmTcLwIpUdpBridge::udp_server_receive_callback(void *arg,
|
||||
char *data = reinterpret_cast<char *>(p_tx->payload);
|
||||
*(data + p_tx->len) = '\0';
|
||||
|
||||
#if TCPIP_RECV_WIRETAPPING == 1
|
||||
udpBridge->printData(p, data);
|
||||
#if OBSW_TCPIP_UDP_WIRETAPPING == 1
|
||||
udpBridge->printData(reinterpret_cast<uint8_t *>(p->payload), p->len);
|
||||
#endif
|
||||
|
||||
store_address_t storeId;
|
||||
|
Reference in New Issue
Block a user