Cleaning up TCP and UDP code
Same port number used as before, but some inconsistencies fixed
This commit is contained in:
parent
5a6c81130d
commit
ba5e2ad8bb
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const std::string TcpTmTcBridge::DEFAULT_UDP_SERVER_PORT = tcpip::DEFAULT_SERVER_PORT;
|
const std::string TcpTmTcBridge::DEFAULT_SERVER_PORT = tcpip::DEFAULT_SERVER_PORT;
|
||||||
|
|
||||||
TcpTmTcBridge::TcpTmTcBridge(object_id_t objectId, object_id_t tcDestination,
|
TcpTmTcBridge::TcpTmTcBridge(object_id_t objectId, object_id_t tcDestination,
|
||||||
object_id_t tmStoreId, object_id_t tcStoreId):
|
object_id_t tmStoreId, object_id_t tcStoreId):
|
||||||
|
@ -30,7 +30,7 @@ class TcpTmTcBridge:
|
|||||||
friend class TcpTmTcServer;
|
friend class TcpTmTcServer;
|
||||||
public:
|
public:
|
||||||
/* The ports chosen here should not be used by any other process. */
|
/* The ports chosen here should not be used by any other process. */
|
||||||
static const std::string DEFAULT_UDP_SERVER_PORT;
|
static const std::string DEFAULT_SERVER_PORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@ -22,14 +22,14 @@
|
|||||||
#define FSFW_TCP_RECV_WIRETAPPING_ENABLED 0
|
#define FSFW_TCP_RECV_WIRETAPPING_ENABLED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const std::string TcpTmTcServer::DEFAULT_TCP_SERVER_PORT = "7303";
|
const std::string TcpTmTcServer::DEFAULT_SERVER_PORT = TcpTmTcBridge::DEFAULT_SERVER_PORT;
|
||||||
|
|
||||||
TcpTmTcServer::TcpTmTcServer(object_id_t objectId, object_id_t tmtcTcpBridge,
|
TcpTmTcServer::TcpTmTcServer(object_id_t objectId, object_id_t tmtcTcpBridge,
|
||||||
size_t receptionBufferSize, std::string customTcpServerPort):
|
size_t receptionBufferSize, std::string customTcpServerPort):
|
||||||
SystemObject(objectId), tmtcBridgeId(tmtcTcpBridge),
|
SystemObject(objectId), tmtcBridgeId(tmtcTcpBridge),
|
||||||
tcpPort(customTcpServerPort), receptionBuffer(receptionBufferSize) {
|
tcpPort(customTcpServerPort), receptionBuffer(receptionBufferSize) {
|
||||||
if(tcpPort == "") {
|
if(tcpPort == "") {
|
||||||
tcpPort = DEFAULT_TCP_SERVER_PORT;
|
tcpPort = DEFAULT_SERVER_PORT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,8 +41,7 @@ class TcpTmTcServer:
|
|||||||
public TcpIpBase,
|
public TcpIpBase,
|
||||||
public ExecutableObjectIF {
|
public ExecutableObjectIF {
|
||||||
public:
|
public:
|
||||||
/* The ports chosen here should not be used by any other process. */
|
static const std::string DEFAULT_SERVER_PORT;
|
||||||
static const std::string DEFAULT_TCP_SERVER_PORT;
|
|
||||||
|
|
||||||
static constexpr size_t ETHERNET_MTU_SIZE = 1500;
|
static constexpr size_t ETHERNET_MTU_SIZE = 1500;
|
||||||
|
|
||||||
|
@ -17,13 +17,13 @@
|
|||||||
#define FSFW_UDP_SEND_WIRETAPPING_ENABLED 0
|
#define FSFW_UDP_SEND_WIRETAPPING_ENABLED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const std::string UdpTmTcBridge::DEFAULT_UDP_SERVER_PORT = tcpip::DEFAULT_SERVER_PORT;
|
const std::string UdpTmTcBridge::DEFAULT_SERVER_PORT = tcpip::DEFAULT_SERVER_PORT;
|
||||||
|
|
||||||
UdpTmTcBridge::UdpTmTcBridge(object_id_t objectId, object_id_t tcDestination,
|
UdpTmTcBridge::UdpTmTcBridge(object_id_t objectId, object_id_t tcDestination,
|
||||||
std::string udpServerPort, object_id_t tmStoreId, object_id_t tcStoreId):
|
std::string udpServerPort, object_id_t tmStoreId, object_id_t tcStoreId):
|
||||||
TmTcBridge(objectId, tcDestination, tmStoreId, tcStoreId) {
|
TmTcBridge(objectId, tcDestination, tmStoreId, tcStoreId) {
|
||||||
if(udpServerPort == "") {
|
if(udpServerPort == "") {
|
||||||
this->udpServerPort = DEFAULT_UDP_SERVER_PORT;
|
this->udpServerPort = DEFAULT_SERVER_PORT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this->udpServerPort = udpServerPort;
|
this->udpServerPort = udpServerPort;
|
||||||
|
@ -28,7 +28,7 @@ class UdpTmTcBridge:
|
|||||||
friend class UdpTcPollingTask;
|
friend class UdpTcPollingTask;
|
||||||
public:
|
public:
|
||||||
/* The ports chosen here should not be used by any other process. */
|
/* The ports chosen here should not be used by any other process. */
|
||||||
static const std::string DEFAULT_UDP_SERVER_PORT;
|
static const std::string DEFAULT_SERVER_PORT;
|
||||||
|
|
||||||
UdpTmTcBridge(object_id_t objectId, object_id_t tcDestination,
|
UdpTmTcBridge(object_id_t objectId, object_id_t tcDestination,
|
||||||
std::string udpServerPort = "", object_id_t tmStoreId = objects::TM_STORE,
|
std::string udpServerPort = "", object_id_t tmStoreId = objects::TM_STORE,
|
||||||
|
Loading…
Reference in New Issue
Block a user