fixed and improved ui
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
all:
|
||||
$(MAKE) -C SineArrayGAM -f Makefile.gcc
|
||||
$(MAKE) -C TimeArrayGAM -f Makefile.gcc
|
||||
$(MAKE) -C PulseGeneratorGAM -f Makefile.gcc
|
||||
$(MAKE) -C SlowControlGAM -f Makefile.gcc
|
||||
|
||||
clean:
|
||||
$(MAKE) -C SineArrayGAM -f Makefile.gcc clean
|
||||
$(MAKE) -C TimeArrayGAM -f Makefile.gcc clean
|
||||
$(MAKE) -C PulseGeneratorGAM -f Makefile.gcc clean
|
||||
$(MAKE) -C SlowControlGAM -f Makefile.gcc clean
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -58,6 +58,11 @@ public:
|
||||
/** Default maximum UDP payload size (bytes, EXCLUDING the 17-byte header). */
|
||||
static const uint32 UDPS_SERVER_DEFAULT_MAX_PAYLOAD = 1400u;
|
||||
|
||||
/** Largest legal UDP payload: IPv4 datagrams cap at 65507 bytes, of which
|
||||
* 17 are the UDPS header. A larger MaxPayloadSize makes every sendto fail
|
||||
* with EMSGSIZE, so the configured value is clamped to this. */
|
||||
static const uint32 UDPS_SERVER_MAX_UDP_PAYLOAD = 65507u - UDPS_HEADER_SIZE;
|
||||
|
||||
UDPSServer();
|
||||
~UDPSServer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user