fixed and improved ui

This commit is contained in:
Martino Ferrari
2026-08-29 23:17:41 +02:00
parent 044ce57ba3
commit ec0a0cdb12
17 changed files with 997 additions and 198 deletions
@@ -18,6 +18,10 @@
namespace MARTe {
/* Out-of-line definitions for class-scope static const members that are
* ODR-used (e.g. passed through varargs in REPORT_ERROR). */
const uint32 UDPSServer::UDPS_SERVER_MAX_UDP_PAYLOAD;
// ---------------------------------------------------------------------------
// Constructor / Destructor
// ---------------------------------------------------------------------------
@@ -88,6 +92,16 @@ bool UDPSServer::Initialise(StructuredDataI &data) {
uint32 mps = UDPS_SERVER_DEFAULT_MAX_PAYLOAD;
(void)data.Read("MaxPayloadSize", mps);
/* A payload larger than the largest legal UDP datagram cannot be sent —
* sendto would fail with EMSGSIZE and the whole cycle would be dropped. */
if (mps > UDPS_SERVER_MAX_UDP_PAYLOAD) {
REPORT_ERROR_STATIC(ErrorManagement::Warning,
"UDPSServer: MaxPayloadSize %u exceeds the UDP datagram "
"limit (%u); clamping to %u.",
mps, UDPS_SERVER_MAX_UDP_PAYLOAD,
UDPS_SERVER_MAX_UDP_PAYLOAD);
mps = UDPS_SERVER_MAX_UDP_PAYLOAD;
}
maxPayloadSize = mps;
uint32 timeoutSecs = UDPS_SERVER_DEFAULT_CLIENT_TIMEOUT_S;