Updated without Vector
This commit is contained in:
@@ -10,7 +10,6 @@
|
|||||||
#include "ObjectBuilder.h"
|
#include "ObjectBuilder.h"
|
||||||
#include "ObjectRegistryDatabase.h"
|
#include "ObjectRegistryDatabase.h"
|
||||||
#include "Threads.h"
|
#include "Threads.h"
|
||||||
#include "Vec.h"
|
|
||||||
|
|
||||||
// Original broker headers
|
// Original broker headers
|
||||||
#include "MemoryMapAsyncOutputBroker.h"
|
#include "MemoryMapAsyncOutputBroker.h"
|
||||||
@@ -105,10 +104,10 @@ public:
|
|||||||
|
|
||||||
static void Process(DebugServiceI *service,
|
static void Process(DebugServiceI *service,
|
||||||
DebugSignalInfo **signalInfoPointers,
|
DebugSignalInfo **signalInfoPointers,
|
||||||
Vec<uint32> &activeIndices, Vec<uint32> &activeSizes,
|
Vector<uint32> &activeIndices, Vector<uint32> &activeSizes,
|
||||||
FastPollingMutexSem &activeMutex,
|
FastPollingMutexSem &activeMutex,
|
||||||
volatile bool *anyBreakFlag,
|
volatile bool *anyBreakFlag,
|
||||||
Vec<uint32> *breakIndices) {
|
Vector<uint32> *breakIndices) {
|
||||||
if (service == NULL_PTR(DebugServiceI *))
|
if (service == NULL_PTR(DebugServiceI *))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -117,7 +116,7 @@ public:
|
|||||||
// because that prevents cross-thread EventSem posts from completing.
|
// because that prevents cross-thread EventSem posts from completing.
|
||||||
|
|
||||||
activeMutex.FastLock();
|
activeMutex.FastLock();
|
||||||
uint32 n = activeIndices.Size();
|
uint32 n = activeIndices.GetNumberOfElements();
|
||||||
if (n > 0 && signalInfoPointers != NULL_PTR(DebugSignalInfo **)) {
|
if (n > 0 && signalInfoPointers != NULL_PTR(DebugSignalInfo **)) {
|
||||||
// Capture timestamp ONCE per broker cycle for lowest impact
|
// Capture timestamp ONCE per broker cycle for lowest impact
|
||||||
uint64 ts = (uint64)((float64)HighResolutionTimer::Counter() *
|
uint64 ts = (uint64)((float64)HighResolutionTimer::Counter() *
|
||||||
@@ -139,13 +138,13 @@ public:
|
|||||||
// stall would block UpdateBrokersBreakStatus() in the Server thread and
|
// stall would block UpdateBrokersBreakStatus() in the Server thread and
|
||||||
// cause unnecessary priority inversion on the RT path.
|
// cause unnecessary priority inversion on the RT path.
|
||||||
bool shouldCheckBreak = (*anyBreakFlag && !service->IsPaused() &&
|
bool shouldCheckBreak = (*anyBreakFlag && !service->IsPaused() &&
|
||||||
breakIndices != NULL_PTR(Vec<uint32> *) &&
|
breakIndices != NULL_PTR(Vector<uint32> *) &&
|
||||||
signalInfoPointers != NULL_PTR(DebugSignalInfo **));
|
signalInfoPointers != NULL_PTR(DebugSignalInfo **));
|
||||||
static const uint32 MAX_BREAK_INDICES = 64u;
|
static const uint32 MAX_BREAK_INDICES = 64u;
|
||||||
uint32 localBreakIdx[MAX_BREAK_INDICES];
|
uint32 localBreakIdx[MAX_BREAK_INDICES];
|
||||||
uint32 nb = 0u;
|
uint32 nb = 0u;
|
||||||
if (shouldCheckBreak) {
|
if (shouldCheckBreak) {
|
||||||
nb = breakIndices->Size();
|
nb = breakIndices->GetNumberOfElements();
|
||||||
if (nb > MAX_BREAK_INDICES) nb = MAX_BREAK_INDICES;
|
if (nb > MAX_BREAK_INDICES) nb = MAX_BREAK_INDICES;
|
||||||
for (uint32 i = 0; i < nb; i++) {
|
for (uint32 i = 0; i < nb; i++) {
|
||||||
localBreakIdx[i] = (*breakIndices)[i];
|
localBreakIdx[i] = (*breakIndices)[i];
|
||||||
@@ -176,9 +175,9 @@ public:
|
|||||||
DebugServiceI *&service, DebugSignalInfo **&signalInfoPointers,
|
DebugServiceI *&service, DebugSignalInfo **&signalInfoPointers,
|
||||||
uint32 numCopies, MemoryMapBrokerCopyTableEntry *copyTable,
|
uint32 numCopies, MemoryMapBrokerCopyTableEntry *copyTable,
|
||||||
const char8 *functionName, SignalDirection direction,
|
const char8 *functionName, SignalDirection direction,
|
||||||
volatile bool *anyActiveFlag, Vec<uint32> *activeIndices,
|
volatile bool *anyActiveFlag, Vector<uint32> *activeIndices,
|
||||||
Vec<uint32> *activeSizes, FastPollingMutexSem *activeMutex,
|
Vector<uint32> *activeSizes, FastPollingMutexSem *activeMutex,
|
||||||
volatile bool *anyBreakFlag, Vec<uint32> *breakIndices) {
|
volatile bool *anyBreakFlag, Vector<uint32> *breakIndices) {
|
||||||
if (numCopies > 0) {
|
if (numCopies > 0) {
|
||||||
signalInfoPointers = new DebugSignalInfo *[numCopies];
|
signalInfoPointers = new DebugSignalInfo *[numCopies];
|
||||||
for (uint32 i = 0; i < numCopies; i++)
|
for (uint32 i = 0; i < numCopies; i++)
|
||||||
@@ -352,9 +351,9 @@ public:
|
|||||||
volatile bool anyBreakActive;
|
volatile bool anyBreakActive;
|
||||||
bool isOutput;
|
bool isOutput;
|
||||||
char8 gamName[256];
|
char8 gamName[256];
|
||||||
Vec<uint32> activeIndices;
|
Vector<uint32> activeIndices;
|
||||||
Vec<uint32> activeSizes;
|
Vector<uint32> activeSizes;
|
||||||
Vec<uint32> breakIndices;
|
Vector<uint32> breakIndices;
|
||||||
FastPollingMutexSem activeMutex;
|
FastPollingMutexSem activeMutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -412,9 +411,9 @@ public:
|
|||||||
volatile bool anyBreakActive;
|
volatile bool anyBreakActive;
|
||||||
bool isOutput;
|
bool isOutput;
|
||||||
char8 gamName[256];
|
char8 gamName[256];
|
||||||
Vec<uint32> activeIndices;
|
Vector<uint32> activeIndices;
|
||||||
Vec<uint32> activeSizes;
|
Vector<uint32> activeSizes;
|
||||||
Vec<uint32> breakIndices;
|
Vector<uint32> breakIndices;
|
||||||
FastPollingMutexSem activeMutex;
|
FastPollingMutexSem activeMutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -471,9 +470,9 @@ public:
|
|||||||
volatile bool anyActive;
|
volatile bool anyActive;
|
||||||
volatile bool anyBreakActive;
|
volatile bool anyBreakActive;
|
||||||
char8 gamName[256];
|
char8 gamName[256];
|
||||||
Vec<uint32> activeIndices;
|
Vector<uint32> activeIndices;
|
||||||
Vec<uint32> activeSizes;
|
Vector<uint32> activeSizes;
|
||||||
Vec<uint32> breakIndices;
|
Vector<uint32> breakIndices;
|
||||||
FastPollingMutexSem activeMutex;
|
FastPollingMutexSem activeMutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -531,9 +530,9 @@ public:
|
|||||||
volatile bool anyActive;
|
volatile bool anyActive;
|
||||||
volatile bool anyBreakActive;
|
volatile bool anyBreakActive;
|
||||||
char8 gamName[256];
|
char8 gamName[256];
|
||||||
Vec<uint32> activeIndices;
|
Vector<uint32> activeIndices;
|
||||||
Vec<uint32> activeSizes;
|
Vector<uint32> activeSizes;
|
||||||
Vec<uint32> breakIndices;
|
Vector<uint32> breakIndices;
|
||||||
FastPollingMutexSem activeMutex;
|
FastPollingMutexSem activeMutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ const uint32 DebugService::CMD_RATE_LIMIT;
|
|||||||
const uint32 DebugService::CLIENT_IDLE_TIMEOUT_MS;
|
const uint32 DebugService::CLIENT_IDLE_TIMEOUT_MS;
|
||||||
const uint32 DebugService::INPUT_BUFFER_MAX;
|
const uint32 DebugService::INPUT_BUFFER_MAX;
|
||||||
|
|
||||||
|
// Maximum data bytes that fit in one sample entry inside a datagram:
|
||||||
|
// STREAMER_BUFFER_SIZE(65535) - TraceHeader(20) - entry_header(16) = 65499
|
||||||
|
static const uint32 MAX_SAMPLE_DATA_SIZE = 65499u;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Constructor / Destructor
|
// Constructor / Destructor
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -313,12 +317,21 @@ ErrorManagement::ErrorType DebugService::Server(ExecutionInfo &info) {
|
|||||||
uint32 cmdLen = len;
|
uint32 cmdLen = len;
|
||||||
command.Write(raw + lineStart, cmdLen);
|
command.Write(raw + lineStart, cmdLen);
|
||||||
|
|
||||||
// Dispatch via base HandleCommand, write response to socket
|
// Dispatch via base HandleCommand, write response to socket.
|
||||||
|
// Loop to handle partial writes for large responses.
|
||||||
StreamString out;
|
StreamString out;
|
||||||
HandleCommand(command, out);
|
HandleCommand(command, out);
|
||||||
if (out.Size() > 0u) {
|
if (out.Size() > 0u) {
|
||||||
uint32 outSz = out.Size();
|
const char8 *wPtr = out.Buffer();
|
||||||
(void)activeClient->Write(out.Buffer(), outSz);
|
uint32 remaining = (uint32)out.Size();
|
||||||
|
while (remaining > 0u) {
|
||||||
|
uint32 wrote = remaining;
|
||||||
|
if (!activeClient->Write(wPtr, wrote) || wrote == 0u) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
wPtr += wrote;
|
||||||
|
remaining -= wrote;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lineStart = pos + 1u;
|
lineStart = pos + 1u;
|
||||||
@@ -374,7 +387,7 @@ ErrorManagement::ErrorType DebugService::Streamer(ExecutionInfo &info) {
|
|||||||
uint64 currentTimeMs = (uint64)((float64)HighResolutionTimer::Counter() *
|
uint64 currentTimeMs = (uint64)((float64)HighResolutionTimer::Counter() *
|
||||||
HighResolutionTimer::Period() * 1000.0);
|
HighResolutionTimer::Period() * 1000.0);
|
||||||
mutex.FastLock();
|
mutex.FastLock();
|
||||||
for (uint32 i = 0u; i < monitoredSignals.Size(); i++) {
|
for (uint32 i = 0u; i < monitoredSignals.GetNumberOfElements(); i++) {
|
||||||
if (currentTimeMs >= (monitoredSignals[i].lastPollTime +
|
if (currentTimeMs >= (monitoredSignals[i].lastPollTime +
|
||||||
monitoredSignals[i].periodMs)) {
|
monitoredSignals[i].periodMs)) {
|
||||||
monitoredSignals[i].lastPollTime = currentTimeMs;
|
monitoredSignals[i].lastPollTime = currentTimeMs;
|
||||||
@@ -392,54 +405,62 @@ ErrorManagement::ErrorType DebugService::Streamer(ExecutionInfo &info) {
|
|||||||
}
|
}
|
||||||
mutex.FastUnLock();
|
mutex.FastUnLock();
|
||||||
|
|
||||||
// Drain ring buffer into UDP packet(s)
|
// Drain ring buffer into UDP packet(s).
|
||||||
static const uint32 SAMPLE_BUF_SIZE = 1024u;
|
//
|
||||||
typedef char StaticAssert_StreamerBufferTooSmall[
|
// Batching strategy:
|
||||||
(sizeof(TraceHeader) + 16u + SAMPLE_BUF_SIZE <= STREAMER_BUFFER_SIZE) ? 1 : -1];
|
// - Normal samples (entry ≤ STREAMER_MTU): accumulate into a packet and
|
||||||
(void)sizeof(StaticAssert_StreamerBufferTooSmall);
|
// flush when the next sample would push it past STREAMER_MTU.
|
||||||
|
// - Oversized samples (entry > STREAMER_MTU): flush any pending packet
|
||||||
|
// first, then send the oversized sample as its own datagram (up to
|
||||||
|
// STREAMER_BUFFER_SIZE bytes; handled transparently by IP fragmentation
|
||||||
|
// on loopback / internal networks).
|
||||||
|
// - MAX_SAMPLE_DATA_SIZE (65499 bytes) is the hard cap; larger entries
|
||||||
|
// in the ring buffer are skipped by Pop() and discarded.
|
||||||
|
bool hasData = false;
|
||||||
uint32 id, size;
|
uint32 id, size;
|
||||||
uint64 ts;
|
uint64 ts;
|
||||||
uint8 sampleData[SAMPLE_BUF_SIZE];
|
|
||||||
bool hasData = false;
|
|
||||||
|
|
||||||
while (traceBuffer.Pop(id, ts, sampleData, size, SAMPLE_BUF_SIZE)) {
|
while (traceBuffer.Pop(id, ts, streamerSampleBuffer, size, MAX_SAMPLE_DATA_SIZE)) {
|
||||||
hasData = true;
|
hasData = true;
|
||||||
if (size > SAMPLE_BUF_SIZE ||
|
const uint32 entryBytes = 16u + size; // [id:4][ts:8][size:4][data:size]
|
||||||
streamerPacketOffset + 16u + size > STREAMER_BUFFER_SIZE) {
|
|
||||||
REPORT_ERROR_STATIC(ErrorManagement::Warning,
|
// If this entry would push the current packet past the MTU target,
|
||||||
"Streamer: sample size %u would overflow assembly buffer "
|
// flush what we have before appending (unless the buffer is empty).
|
||||||
"(%u bytes used of %u) — sample dropped.",
|
if (streamerPacketOffset > 0u &&
|
||||||
size, streamerPacketOffset, STREAMER_BUFFER_SIZE);
|
streamerPacketOffset + entryBytes > STREAMER_MTU) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (streamerPacketOffset == 0u) {
|
|
||||||
TraceHeader header;
|
|
||||||
header.magic = 0xDA7A57ADu;
|
|
||||||
header.seq = streamerSequenceNumber++;
|
|
||||||
header.timestamp = HighResolutionTimer::Counter();
|
|
||||||
header.count = 0u;
|
|
||||||
memcpy(streamerPacketBuffer, &header, sizeof(TraceHeader));
|
|
||||||
streamerPacketOffset = sizeof(TraceHeader);
|
|
||||||
}
|
|
||||||
if (streamerPacketOffset + 16u + size > STREAMER_MTU) {
|
|
||||||
uint32 toWrite = streamerPacketOffset;
|
uint32 toWrite = streamerPacketOffset;
|
||||||
(void)udpSocket.Write((char8 *)streamerPacketBuffer, toWrite);
|
(void)udpSocket.Write((char8 *)streamerPacketBuffer, toWrite);
|
||||||
TraceHeader header;
|
streamerPacketOffset = 0u;
|
||||||
header.magic = 0xDA7A57ADu;
|
|
||||||
header.seq = streamerSequenceNumber++;
|
|
||||||
header.timestamp = HighResolutionTimer::Counter();
|
|
||||||
header.count = 0u;
|
|
||||||
memcpy(streamerPacketBuffer, &header, sizeof(TraceHeader));
|
|
||||||
streamerPacketOffset = sizeof(TraceHeader);
|
|
||||||
}
|
}
|
||||||
memcpy(&streamerPacketBuffer[streamerPacketOffset], &id, 4u);
|
|
||||||
memcpy(&streamerPacketBuffer[streamerPacketOffset + 4u], &ts, 8u);
|
// Open a new packet header if the buffer is empty.
|
||||||
|
if (streamerPacketOffset == 0u) {
|
||||||
|
TraceHeader hdr;
|
||||||
|
hdr.magic = 0xDA7A57ADu;
|
||||||
|
hdr.seq = streamerSequenceNumber++;
|
||||||
|
hdr.timestamp = HighResolutionTimer::Counter();
|
||||||
|
hdr.count = 0u;
|
||||||
|
memcpy(streamerPacketBuffer, &hdr, sizeof(TraceHeader));
|
||||||
|
streamerPacketOffset = (uint32)sizeof(TraceHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Append the sample entry.
|
||||||
|
memcpy(&streamerPacketBuffer[streamerPacketOffset], &id, 4u);
|
||||||
|
memcpy(&streamerPacketBuffer[streamerPacketOffset + 4u], &ts, 8u);
|
||||||
memcpy(&streamerPacketBuffer[streamerPacketOffset + 12u], &size, 4u);
|
memcpy(&streamerPacketBuffer[streamerPacketOffset + 12u], &size, 4u);
|
||||||
memcpy(&streamerPacketBuffer[streamerPacketOffset + 16u], sampleData, size);
|
memcpy(&streamerPacketBuffer[streamerPacketOffset + 16u], streamerSampleBuffer, size);
|
||||||
streamerPacketOffset += (16u + size);
|
streamerPacketOffset += entryBytes;
|
||||||
((TraceHeader *)streamerPacketBuffer)->count++;
|
((TraceHeader *)streamerPacketBuffer)->count++;
|
||||||
|
|
||||||
|
// Oversized single sample: send immediately rather than accumulating.
|
||||||
|
if (streamerPacketOffset > STREAMER_MTU) {
|
||||||
|
uint32 toWrite = streamerPacketOffset;
|
||||||
|
(void)udpSocket.Write((char8 *)streamerPacketBuffer, toWrite);
|
||||||
|
streamerPacketOffset = 0u;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flush any remaining partial packet.
|
||||||
if (streamerPacketOffset > 0u) {
|
if (streamerPacketOffset > 0u) {
|
||||||
uint32 toWrite = streamerPacketOffset;
|
uint32 toWrite = streamerPacketOffset;
|
||||||
(void)udpSocket.Write((char8 *)streamerPacketBuffer, toWrite);
|
(void)udpSocket.Write((char8 *)streamerPacketBuffer, toWrite);
|
||||||
|
|||||||
@@ -82,9 +82,13 @@ private:
|
|||||||
BasicTCPSocket *activeClient;
|
BasicTCPSocket *activeClient;
|
||||||
|
|
||||||
// Streamer assembly buffer
|
// Streamer assembly buffer
|
||||||
|
// STREAMER_MTU: target packet size for batching small signals (network-friendly).
|
||||||
|
// STREAMER_BUFFER_SIZE: maximum UDP datagram payload; large single-signal samples
|
||||||
|
// can exceed STREAMER_MTU and are sent as their own datagram up to this limit.
|
||||||
static const uint32 STREAMER_MTU = 1400u;
|
static const uint32 STREAMER_MTU = 1400u;
|
||||||
static const uint32 STREAMER_BUFFER_SIZE = 4096u;
|
static const uint32 STREAMER_BUFFER_SIZE = 65535u;
|
||||||
uint8 streamerPacketBuffer[STREAMER_BUFFER_SIZE];
|
uint8 streamerPacketBuffer[STREAMER_BUFFER_SIZE]; // assembled outgoing packet
|
||||||
|
uint8 streamerSampleBuffer[STREAMER_BUFFER_SIZE]; // staging for one popped sample
|
||||||
uint32 streamerPacketOffset;
|
uint32 streamerPacketOffset;
|
||||||
uint32 streamerSequenceNumber;
|
uint32 streamerSequenceNumber;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -52,11 +52,11 @@ public:
|
|||||||
uint32 numSignals,
|
uint32 numSignals,
|
||||||
MemoryMapBroker *broker,
|
MemoryMapBroker *broker,
|
||||||
volatile bool *anyActiveFlag,
|
volatile bool *anyActiveFlag,
|
||||||
Vec<uint32> *activeIndices,
|
Vector<uint32> *activeIndices,
|
||||||
Vec<uint32> *activeSizes,
|
Vector<uint32> *activeSizes,
|
||||||
FastPollingMutexSem *activeMutex,
|
FastPollingMutexSem *activeMutex,
|
||||||
volatile bool *anyBreakFlag,
|
volatile bool *anyBreakFlag,
|
||||||
Vec<uint32> *breakIndices,
|
Vector<uint32> *breakIndices,
|
||||||
const char8 *gamName = NULL_PTR(const char8 *),
|
const char8 *gamName = NULL_PTR(const char8 *),
|
||||||
bool isOutput = false);
|
bool isOutput = false);
|
||||||
|
|
||||||
@@ -167,10 +167,10 @@ protected:
|
|||||||
// Shared data members
|
// Shared data members
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
||||||
Vec<DebugSignalInfo *> signals;
|
Vector<DebugSignalInfo *> signals;
|
||||||
Vec<SignalAlias> aliases;
|
Vector<SignalAlias> aliases;
|
||||||
Vec<BrokerInfo> brokers;
|
Vector<BrokerInfo> brokers;
|
||||||
Vec<MonitoredSignal> monitoredSignals;
|
Vector<MonitoredSignal> monitoredSignals;
|
||||||
|
|
||||||
FastPollingMutexSem mutex;
|
FastPollingMutexSem mutex;
|
||||||
FastPollingMutexSem tracePushMutex;
|
FastPollingMutexSem tracePushMutex;
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
#include "StreamString.h"
|
#include "StreamString.h"
|
||||||
#include "TypeDescriptor.h"
|
#include "TypeDescriptor.h"
|
||||||
#include "Vec.h"
|
|
||||||
|
|
||||||
namespace MARTe {
|
namespace MARTe {
|
||||||
|
|
||||||
@@ -49,11 +48,11 @@ struct BrokerInfo {
|
|||||||
uint32 numSignals;
|
uint32 numSignals;
|
||||||
MemoryMapBroker *broker;
|
MemoryMapBroker *broker;
|
||||||
volatile bool *anyActiveFlag;
|
volatile bool *anyActiveFlag;
|
||||||
Vec<uint32> *activeIndices;
|
Vector<uint32> *activeIndices;
|
||||||
Vec<uint32> *activeSizes;
|
Vector<uint32> *activeSizes;
|
||||||
FastPollingMutexSem *activeMutex;
|
FastPollingMutexSem *activeMutex;
|
||||||
volatile bool *anyBreakFlag;
|
volatile bool *anyBreakFlag;
|
||||||
Vec<uint32> *breakIndices;
|
Vector<uint32> *breakIndices;
|
||||||
StreamString gamName;
|
StreamString gamName;
|
||||||
bool isOutput;
|
bool isOutput;
|
||||||
};
|
};
|
||||||
@@ -124,11 +123,11 @@ public:
|
|||||||
uint32 numSignals,
|
uint32 numSignals,
|
||||||
MemoryMapBroker *broker,
|
MemoryMapBroker *broker,
|
||||||
volatile bool *anyActiveFlag,
|
volatile bool *anyActiveFlag,
|
||||||
Vec<uint32> *activeIndices,
|
Vector<uint32> *activeIndices,
|
||||||
Vec<uint32> *activeSizes,
|
Vector<uint32> *activeSizes,
|
||||||
FastPollingMutexSem *activeMutex,
|
FastPollingMutexSem *activeMutex,
|
||||||
volatile bool *anyBreakFlag,
|
volatile bool *anyBreakFlag,
|
||||||
Vec<uint32> *breakIndices,
|
Vector<uint32> *breakIndices,
|
||||||
const char8 *gamName = NULL_PTR(const char8 *),
|
const char8 *gamName = NULL_PTR(const char8 *),
|
||||||
bool isOutput = false) = 0;
|
bool isOutput = false) = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ ROOT_DIR=../../../../
|
|||||||
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
||||||
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
|
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
|
||||||
|
|
||||||
INCLUDES += -I$(ROOT_DIR)/Source/Core/Types/Result
|
|
||||||
INCLUDES += -I$(ROOT_DIR)/Source/Core/Types/Vec
|
|
||||||
INCLUDES += -I$(ROOT_DIR)/Source/Components/Interfaces/TCPLogger
|
INCLUDES += -I$(ROOT_DIR)/Source/Components/Interfaces/TCPLogger
|
||||||
INCLUDES += -I$(ROOT_DIR)/Source/Components/Interfaces/DebugService
|
INCLUDES += -I$(ROOT_DIR)/Source/Components/Interfaces/DebugService
|
||||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L0Types
|
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L0Types
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ ErrorManagement::ErrorType WebDebugService::Streamer(ExecutionInfo &info) {
|
|||||||
// Poll monitored signals → SSE monitor events
|
// Poll monitored signals → SSE monitor events
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
mutex.FastLock();
|
mutex.FastLock();
|
||||||
for (uint32 i = 0u; i < monitoredSignals.Size(); i++) {
|
for (uint32 i = 0u; i < monitoredSignals.GetNumberOfElements(); i++) {
|
||||||
if (nowMs >= (monitoredSignals[i].lastPollTime +
|
if (nowMs >= (monitoredSignals[i].lastPollTime +
|
||||||
monitoredSignals[i].periodMs)) {
|
monitoredSignals[i].periodMs)) {
|
||||||
monitoredSignals[i].lastPollTime = nowMs;
|
monitoredSignals[i].lastPollTime = nowMs;
|
||||||
@@ -468,7 +468,7 @@ ErrorManagement::ErrorType WebDebugService::Streamer(ExecutionInfo &info) {
|
|||||||
float64 val = WDS_ToFloat64(lb, td);
|
float64 val = WDS_ToFloat64(lb, td);
|
||||||
|
|
||||||
StreamString sigName;
|
StreamString sigName;
|
||||||
for (uint32 j = 0u; j < aliases.Size(); j++) {
|
for (uint32 j = 0u; j < aliases.GetNumberOfElements(); j++) {
|
||||||
if (signals[aliases[j].signalIndex]->internalID ==
|
if (signals[aliases[j].signalIndex]->internalID ==
|
||||||
monitoredSignals[i].internalID) {
|
monitoredSignals[i].internalID) {
|
||||||
sigName = aliases[j].name;
|
sigName = aliases[j].name;
|
||||||
@@ -499,24 +499,21 @@ ErrorManagement::ErrorType WebDebugService::Streamer(ExecutionInfo &info) {
|
|||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
// Drain ring buffer → SSE trace events
|
// Drain ring buffer → SSE trace events
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
static const uint32 SAMPLE_BUF_SIZE = 1024u;
|
|
||||||
static const uint32 MAX_TRACE_CYCLE = 50u;
|
static const uint32 MAX_TRACE_CYCLE = 50u;
|
||||||
uint32 id, size;
|
uint32 id, size;
|
||||||
uint64 sampleTs;
|
uint64 sampleTs;
|
||||||
uint8 sampleData[SAMPLE_BUF_SIZE];
|
|
||||||
bool hasData = false;
|
bool hasData = false;
|
||||||
uint32 traceCount = 0u;
|
uint32 traceCount = 0u;
|
||||||
|
|
||||||
while (traceCount < MAX_TRACE_CYCLE &&
|
while (traceCount < MAX_TRACE_CYCLE &&
|
||||||
traceBuffer.Pop(id, sampleTs, sampleData, size, SAMPLE_BUF_SIZE)) {
|
traceBuffer.Pop(id, sampleTs, traceSampleBuffer, size, TRACE_SAMPLE_MAX)) {
|
||||||
hasData = true;
|
hasData = true;
|
||||||
traceCount++;
|
traceCount++;
|
||||||
if (size > SAMPLE_BUF_SIZE) continue;
|
|
||||||
|
|
||||||
StreamString sigName;
|
StreamString sigName;
|
||||||
TypeDescriptor sigType = UnsignedInteger32Bit;
|
TypeDescriptor sigType = UnsignedInteger32Bit;
|
||||||
mutex.FastLock();
|
mutex.FastLock();
|
||||||
for (uint32 i = 0u; i < signals.Size(); i++) {
|
for (uint32 i = 0u; i < signals.GetNumberOfElements(); i++) {
|
||||||
if (signals[i]->internalID == id) {
|
if (signals[i]->internalID == id) {
|
||||||
sigName = signals[i]->name;
|
sigName = signals[i]->name;
|
||||||
sigType = signals[i]->type;
|
sigType = signals[i]->type;
|
||||||
@@ -527,7 +524,7 @@ ErrorManagement::ErrorType WebDebugService::Streamer(ExecutionInfo &info) {
|
|||||||
|
|
||||||
uint32 tsMs = (sampleTs >= streamerT0Ns)
|
uint32 tsMs = (sampleTs >= streamerT0Ns)
|
||||||
? (uint32)((sampleTs - streamerT0Ns) / 1000000u) : 0u;
|
? (uint32)((sampleTs - streamerT0Ns) / 1000000u) : 0u;
|
||||||
float64 val = WDS_ToFloat64(sampleData, sigType);
|
float64 val = WDS_ToFloat64(traceSampleBuffer, sigType);
|
||||||
char8 valBuf[64] = { '\0' };
|
char8 valBuf[64] = { '\0' };
|
||||||
{
|
{
|
||||||
AnyType vdst(CharString, 0u, valBuf); vdst.SetNumberOfElements(0u, 63u);
|
AnyType vdst(CharString, 0u, valBuf); vdst.SetNumberOfElements(0u, 63u);
|
||||||
|
|||||||
@@ -97,6 +97,10 @@ private:
|
|||||||
uint32 logHistoryWriteIdx;
|
uint32 logHistoryWriteIdx;
|
||||||
uint32 logHistoryFill;
|
uint32 logHistoryFill;
|
||||||
FastPollingMutexSem logHistoryMutex;
|
FastPollingMutexSem logHistoryMutex;
|
||||||
|
|
||||||
|
// Staging buffer for trace ring-buffer pops (max UDP datagram payload).
|
||||||
|
static const uint32 TRACE_SAMPLE_MAX = 65499u;
|
||||||
|
uint8 traceSampleBuffer[TRACE_SAMPLE_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace MARTe
|
} // namespace MARTe
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
include Makefile.inc
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#############################################################
|
|
||||||
#
|
|
||||||
# Copyright 2015 F4E | European Joint Undertaking for ITER
|
|
||||||
# and the Development of Fusion Energy ('Fusion for Energy')
|
|
||||||
#
|
|
||||||
# Licensed under the EUPL, Version 1.1 or - as soon they
|
|
||||||
# will be approved by the European Commission - subsequent
|
|
||||||
# versions of the EUPL (the "Licence");
|
|
||||||
# You may not use this work except in compliance with the
|
|
||||||
# Licence.
|
|
||||||
# You may obtain a copy of the Licence at:
|
|
||||||
#
|
|
||||||
# http://ec.europa.eu/idabc/eupl
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in
|
|
||||||
# writing, software distributed under the Licence is
|
|
||||||
# distributed on an "AS IS" basis,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
||||||
# express or implied.
|
|
||||||
# See the Licence for the specific language governing
|
|
||||||
# permissions and limitations under the Licence.
|
|
||||||
#
|
|
||||||
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
|
|
||||||
SPB =
|
|
||||||
|
|
||||||
|
|
||||||
ROOT_DIR=../../..
|
|
||||||
|
|
||||||
|
|
||||||
PACKAGE=Core
|
|
||||||
ROOT_DIR=../../..
|
|
||||||
ABS_ROOT_DIR=$(abspath $(ROOT_DIR))
|
|
||||||
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
|
||||||
|
|
||||||
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
|
|
||||||
|
|
||||||
all: $(OBJS) $(SUBPROJ)
|
|
||||||
echo $(OBJS)
|
|
||||||
|
|
||||||
include depends.$(TARGET)
|
|
||||||
|
|
||||||
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)
|
|
||||||
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
#ifndef __RESULT_H
|
|
||||||
#define __RESULT_H
|
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
|
|
||||||
namespace MARTe {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Namespace for result error codes.
|
|
||||||
*/
|
|
||||||
namespace Errors {
|
|
||||||
enum ErrorT {
|
|
||||||
None = 0,
|
|
||||||
Generic = 1,
|
|
||||||
OutOfMemory = 2,
|
|
||||||
IndexOutOfBounds = 3,
|
|
||||||
ValueOutOfRange = 4,
|
|
||||||
WrongType = 5,
|
|
||||||
Empty = 6,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief A simple Result type for error handling.
|
|
||||||
* @details This implementation is header-only to ensure template linkage.
|
|
||||||
* Requirement: T and E must have default constructors and be copyable.
|
|
||||||
*/
|
|
||||||
template <typename T, typename E = Errors::ErrorT>
|
|
||||||
class Result {
|
|
||||||
public:
|
|
||||||
static Result Success(const T &t) {
|
|
||||||
return Result(t, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Result Fail(const E &e) {
|
|
||||||
return Result(e, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
Result() : state(false), val(T()), err(E()) {}
|
|
||||||
Result(const Result &r) : state(r.state), val(r.val), err(r.err) {}
|
|
||||||
|
|
||||||
Result& operator=(const Result &r) {
|
|
||||||
if (this != &r) {
|
|
||||||
state = r.state;
|
|
||||||
val = r.val;
|
|
||||||
err = r.err;
|
|
||||||
}
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Ok() const { return state; }
|
|
||||||
bool IsOk() const { return state; }
|
|
||||||
|
|
||||||
// Const accessors
|
|
||||||
const T &Val() const { assert(state); return val; }
|
|
||||||
const E &Err() const { assert(!state); return err; }
|
|
||||||
|
|
||||||
// Non-const accessors
|
|
||||||
T &Val() { assert(state); return val; }
|
|
||||||
E &Err() { assert(!state); return err; }
|
|
||||||
|
|
||||||
operator bool() const { return state; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
Result(const T &v, bool s) : state(s), val(v), err(E()) {}
|
|
||||||
Result(const E &e, bool s) : state(s), val(T()), err(e) {}
|
|
||||||
|
|
||||||
bool state;
|
|
||||||
T val;
|
|
||||||
E err;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace MARTe
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Result.o: Result.cpp Result.h
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
#ifndef __VEC_H
|
|
||||||
#define __VEC_H
|
|
||||||
|
|
||||||
#include "Result.h"
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <cassert>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
namespace MARTe {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Simple dynamic array (vector) implementation with fixed growth.
|
|
||||||
* @tparam T The type of elements.
|
|
||||||
* @tparam GROWTH The number of elements to add when the buffer is full.
|
|
||||||
*/
|
|
||||||
template <typename T, size_t GROWTH = 16>
|
|
||||||
class Vec {
|
|
||||||
public:
|
|
||||||
Vec() : size(0), mem_size(GROWTH), arr(NULL) {
|
|
||||||
arr = new T[mem_size];
|
|
||||||
}
|
|
||||||
|
|
||||||
Vec(const Vec<T, GROWTH> &other) : size(other.size), mem_size(other.mem_size), arr(NULL) {
|
|
||||||
arr = new T[mem_size];
|
|
||||||
for (size_t i = 0; i < size; ++i) {
|
|
||||||
arr[i] = other.arr[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Vec(const T *data, const size_t count) : size(count), mem_size(count + GROWTH), arr(NULL) {
|
|
||||||
arr = new T[mem_size];
|
|
||||||
for (size_t i = 0; i < size; ++i) {
|
|
||||||
arr[i] = data[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
~Vec() {
|
|
||||||
if (arr != NULL) {
|
|
||||||
delete[] arr;
|
|
||||||
arr = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Vec& operator=(const Vec<T, GROWTH> &other) {
|
|
||||||
if (this != &other) {
|
|
||||||
T* new_arr = new T[other.mem_size];
|
|
||||||
for (size_t i = 0; i < other.size; ++i) {
|
|
||||||
new_arr[i] = other.arr[i];
|
|
||||||
}
|
|
||||||
if (arr != NULL) {
|
|
||||||
delete[] arr;
|
|
||||||
}
|
|
||||||
arr = new_arr;
|
|
||||||
size = other.size;
|
|
||||||
mem_size = other.mem_size;
|
|
||||||
}
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Clear() {
|
|
||||||
size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Exchange contents with another Vec in O(1) — no allocation, no element copies.
|
|
||||||
*
|
|
||||||
* Used by UpdateBrokersActiveStatus / UpdateBrokersBreakStatus to publish a
|
|
||||||
* freshly built index list to the RT thread with the shortest possible lock
|
|
||||||
* hold time: only three pointer/size swaps happen inside the mutex.
|
|
||||||
* The old arrays end up in @p other and are freed when it leaves scope
|
|
||||||
* AFTER the lock is released.
|
|
||||||
*/
|
|
||||||
void Swap(Vec<T, GROWTH> &other) {
|
|
||||||
T *tmpArr = arr; arr = other.arr; other.arr = tmpArr;
|
|
||||||
size_t tmpSz = size; size = other.size; other.size = tmpSz;
|
|
||||||
size_t tmpMem = mem_size; mem_size = other.mem_size; other.mem_size = tmpMem;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t Size() const {
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
T* GetInternalBuffer() { return arr; }
|
|
||||||
|
|
||||||
bool Remove(size_t index) {
|
|
||||||
if (index >= size) return false;
|
|
||||||
for (size_t i = index; i < size - 1; ++i) {
|
|
||||||
arr[i] = arr[i + 1];
|
|
||||||
}
|
|
||||||
size--;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Insert(size_t index, const T& val) {
|
|
||||||
if (index > size) return false;
|
|
||||||
if (size == mem_size) extend();
|
|
||||||
|
|
||||||
for (size_t i = size; i > index; --i) {
|
|
||||||
arr[i] = arr[i - 1];
|
|
||||||
}
|
|
||||||
arr[index] = val;
|
|
||||||
size++;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<T> Get(size_t index) const {
|
|
||||||
if (index >= size) return Result<T>::Fail(Errors::IndexOutOfBounds);
|
|
||||||
return Result<T>::Success(arr[index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Push(const T &val) {
|
|
||||||
if (size == mem_size) extend();
|
|
||||||
arr[size++] = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<T> Pop() {
|
|
||||||
if (size == 0) return Result<T>::Fail(Errors::Empty);
|
|
||||||
T last = arr[--size];
|
|
||||||
return Result<T>::Success(last);
|
|
||||||
}
|
|
||||||
|
|
||||||
const T &operator[](const size_t index) const {
|
|
||||||
assert(index < size);
|
|
||||||
return arr[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
T &operator[](const size_t index) {
|
|
||||||
assert(index < size);
|
|
||||||
return arr[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
const T *mem() const { return arr; }
|
|
||||||
size_t memSize() const { return mem_size; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
size_t size;
|
|
||||||
size_t mem_size;
|
|
||||||
T *arr;
|
|
||||||
|
|
||||||
void extend() {
|
|
||||||
size_t new_mem_size = mem_size + GROWTH;
|
|
||||||
T *new_arr = new T[new_mem_size];
|
|
||||||
for (size_t i = 0; i < size; ++i) {
|
|
||||||
new_arr[i] = arr[i];
|
|
||||||
}
|
|
||||||
if (arr != NULL) {
|
|
||||||
delete[] arr;
|
|
||||||
}
|
|
||||||
arr = new_arr;
|
|
||||||
mem_size = new_mem_size;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace MARTe
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../..//Build/x86-linux/Core/Types/Vec/Vec.o: Vec.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Vec.o: Vec.cpp
|
|
||||||
Binary file not shown.
@@ -297,6 +297,12 @@ func (m *MarteClient) handleTextLine(line string) {
|
|||||||
fmt.Sscanf(p[8:], "%d", &newLog)
|
fmt.Sscanf(p[8:], "%d", &newLog)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Always forward as a response so the browser can display it.
|
||||||
|
broadcast(m.hub, map[string]any{
|
||||||
|
"type": "response",
|
||||||
|
"tag": "SERVICE_INFO",
|
||||||
|
"data": line[len("OK SERVICE_INFO "):],
|
||||||
|
})
|
||||||
if newUDP > 0 || newLog > 0 {
|
if newUDP > 0 || newLog > 0 {
|
||||||
broadcast(m.hub, map[string]any{
|
broadcast(m.hub, map[string]any{
|
||||||
"type": "service_config",
|
"type": "service_config",
|
||||||
|
|||||||
@@ -116,12 +116,13 @@ function onResponse(msg) {
|
|||||||
try {
|
try {
|
||||||
const data = msg.data ? JSON.parse(msg.data) : null;
|
const data = msg.data ? JSON.parse(msg.data) : null;
|
||||||
switch (msg.tag) {
|
switch (msg.tag) {
|
||||||
case 'DISCOVER': if (data) processDiscovery(data.Signals || []); break;
|
case 'DISCOVER': if (data) processDiscovery(data.Signals || []); break;
|
||||||
case 'TREE': if (data) processTree(data); break;
|
case 'TREE': if (data) processTree(data); break;
|
||||||
case 'INFO': showInfo(msg.tag, msg.data); break;
|
case 'INFO': showInfo(msg.tag, msg.data); break;
|
||||||
case 'CONFIG': showInfo('CONFIG', msg.data); break;
|
case 'CONFIG': showInfo('CONFIG', msg.data); break;
|
||||||
case 'STEP_STATUS': processStepStatus(data); break;
|
case 'SERVICE_INFO': showInfo('Service Info', msg.data); break;
|
||||||
case 'VALUE': processValue(data); break;
|
case 'STEP_STATUS': processStepStatus(data); break;
|
||||||
|
case 'VALUE': processValue(data); break;
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
// non-JSON responses (TRACE, FORCE, etc.) — silently ignore
|
// non-JSON responses (TRACE, FORCE, etc.) — silently ignore
|
||||||
@@ -144,7 +145,12 @@ function onLog(msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onServiceConfig(msg) {
|
function onServiceConfig(msg) {
|
||||||
appendLog('sys','INFO',`ServiceConfig: UDP=${msg.udp_port} LOG=${msg.log_port}`);
|
const auto = document.getElementById('auto-ports')?.checked ?? true;
|
||||||
|
if (auto) {
|
||||||
|
if (msg.udp_port) document.getElementById('udp-port').value = msg.udp_port;
|
||||||
|
if (msg.log_port) document.getElementById('log-port').value = msg.log_port;
|
||||||
|
}
|
||||||
|
appendLog('sys','INFO',`ServiceConfig: UDP=${msg.udp_port} LOG=${msg.log_port}${auto ? '' : ' (ignored — manual ports)'}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onUdpStats(msg) {
|
function onUdpStats(msg) {
|
||||||
@@ -684,13 +690,33 @@ function showInfo(title, data) {
|
|||||||
// Connect / Disconnect
|
// Connect / Disconnect
|
||||||
// ════════════════════════════════════════════════════════════════════
|
// ════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
function requireConnected() {
|
||||||
|
if (!marteConnected) {
|
||||||
|
appendLog('sys', 'WARNING', 'Not connected to MARTe2');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function discoverCmd() { if (requireConnected()) { sendCmd('DISCOVER'); closeAllMenus(); } }
|
||||||
|
function treeCmd() { if (requireConnected()) { sendCmd('TREE'); closeAllMenus(); } }
|
||||||
|
function serviceInfoCmd() { if (requireConnected()) { sendCmd('SERVICE_INFO'); closeAllMenus(); } }
|
||||||
|
|
||||||
|
function toggleAutoPorts(auto) {
|
||||||
|
const row = document.getElementById('port-manual-row');
|
||||||
|
if (row) row.style.display = auto ? 'none' : 'flex';
|
||||||
|
}
|
||||||
|
|
||||||
function toggleConnect() {
|
function toggleConnect() {
|
||||||
if (marteConnected) {
|
if (marteConnected) {
|
||||||
sendWS({type:'disconnect'});
|
sendWS({type:'disconnect'});
|
||||||
} else {
|
} else {
|
||||||
const host = document.getElementById('host').value.trim() || '127.0.0.1';
|
const host = document.getElementById('host').value.trim() || '127.0.0.1';
|
||||||
const port = parseInt(document.getElementById('port').value) || 8080;
|
const port = parseInt(document.getElementById('port').value) || 8080;
|
||||||
sendWS({type:'connect', data:{host, port, udp_port:port+1, log_port:port+2}});
|
const auto = document.getElementById('auto-ports').checked;
|
||||||
|
const udpPort = auto ? port + 1 : (parseInt(document.getElementById('udp-port').value) || port + 1);
|
||||||
|
const logPort = auto ? port + 2 : (parseInt(document.getElementById('log-port').value) || port + 2);
|
||||||
|
sendWS({type:'connect', data:{host, port, udp_port:udpPort, log_port:logPort}});
|
||||||
}
|
}
|
||||||
closeAllMenus();
|
closeAllMenus();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,15 +176,27 @@ select{background:#313244;border:1px solid #45475a;color:#cdd6f4;padding:2px 4px
|
|||||||
</button>
|
</button>
|
||||||
<div class="dropdown" id="conn-dropdown">
|
<div class="dropdown" id="conn-dropdown">
|
||||||
<div class="menu-row">
|
<div class="menu-row">
|
||||||
<input type="text" id="host" value="127.0.0.1" placeholder="host">
|
<input type="text" id="host" value="127.0.0.1" placeholder="host" style="flex:2">
|
||||||
<input type="number" id="port" value="8080" placeholder="port">
|
<input type="number" id="port" value="8080" placeholder="ctrl" style="width:60px">
|
||||||
<button id="btn-connect" onclick="toggleConnect()">Connect</button>
|
<button id="btn-connect" onclick="toggleConnect()">Connect</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="menu-row" id="port-manual-row" style="display:none">
|
||||||
|
<label style="color:#a6adc8;font-size:11px;flex-shrink:0">UDP:</label>
|
||||||
|
<input type="number" id="udp-port" value="8081" placeholder="udp" style="width:72px">
|
||||||
|
<label style="color:#a6adc8;font-size:11px;flex-shrink:0">Log:</label>
|
||||||
|
<input type="number" id="log-port" value="8082" placeholder="log" style="width:72px">
|
||||||
|
</div>
|
||||||
|
<div class="menu-row">
|
||||||
|
<label class="form-check" style="margin:0;font-size:11px">
|
||||||
|
<input type="checkbox" id="auto-ports" checked onchange="toggleAutoPorts(this.checked)">
|
||||||
|
<span style="color:#a6adc8">Auto ports (SERVICE_INFO)</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<hr class="menu-sep">
|
<hr class="menu-sep">
|
||||||
<div class="menu-btn-row">
|
<div class="menu-btn-row">
|
||||||
<button onclick="sendCmd('DISCOVER');closeAllMenus()">Discover</button>
|
<button onclick="discoverCmd()">Discover</button>
|
||||||
<button onclick="sendCmd('TREE');closeAllMenus()">Tree</button>
|
<button onclick="treeCmd()">Tree</button>
|
||||||
<button onclick="sendCmd('SERVICE_INFO');closeAllMenus()">Info</button>
|
<button onclick="serviceInfoCmd()">Info</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ struct ConnectionConfig {
|
|||||||
tcp_port: String,
|
tcp_port: String,
|
||||||
udp_port: String,
|
udp_port: String,
|
||||||
log_port: String,
|
log_port: String,
|
||||||
|
auto_ports: bool, // when true, SERVICE_INFO may override udp_port / log_port
|
||||||
version: u64,
|
version: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,6 +315,7 @@ impl MarteDebugApp {
|
|||||||
tcp_port: "8080".to_string(),
|
tcp_port: "8080".to_string(),
|
||||||
udp_port: "8081".to_string(),
|
udp_port: "8081".to_string(),
|
||||||
log_port: "8082".to_string(),
|
log_port: "8082".to_string(),
|
||||||
|
auto_ports: true,
|
||||||
version: 0,
|
version: 0,
|
||||||
};
|
};
|
||||||
let shared_config = Arc::new(Mutex::new(config.clone()));
|
let shared_config = Arc::new(Mutex::new(config.clone()));
|
||||||
@@ -1102,7 +1104,7 @@ fn udp_worker(
|
|||||||
thread::sleep(std::time::Duration::from_secs(1));
|
thread::sleep(std::time::Duration::from_secs(1));
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
let mut buf = [0u8; 4096];
|
let mut buf = [0u8; 65535];
|
||||||
let mut total_packets = 0u64;
|
let mut total_packets = 0u64;
|
||||||
loop {
|
loop {
|
||||||
if shared_config.lock().unwrap().version != current_version {
|
if shared_config.lock().unwrap().version != current_version {
|
||||||
@@ -1360,23 +1362,25 @@ impl eframe::App for MarteDebugApp {
|
|||||||
let _ = self.tx_cmd.send("DISCOVER".to_string());
|
let _ = self.tx_cmd.send("DISCOVER".to_string());
|
||||||
}
|
}
|
||||||
InternalEvent::ServiceConfig { udp_port, log_port } => {
|
InternalEvent::ServiceConfig { udp_port, log_port } => {
|
||||||
let mut changed = false;
|
if self.config.auto_ports {
|
||||||
if !udp_port.is_empty() && self.config.udp_port != udp_port {
|
let mut changed = false;
|
||||||
self.config.udp_port = udp_port;
|
if !udp_port.is_empty() && self.config.udp_port != udp_port {
|
||||||
changed = true;
|
self.config.udp_port = udp_port;
|
||||||
}
|
changed = true;
|
||||||
if !log_port.is_empty() && self.config.log_port != log_port {
|
}
|
||||||
self.config.log_port = log_port;
|
if !log_port.is_empty() && self.config.log_port != log_port {
|
||||||
changed = true;
|
self.config.log_port = log_port;
|
||||||
}
|
changed = true;
|
||||||
if changed {
|
}
|
||||||
self.config.version += 1;
|
if changed {
|
||||||
*self.shared_config.lock().unwrap() = self.config.clone();
|
self.config.version += 1;
|
||||||
self.logs.push_back(LogEntry {
|
*self.shared_config.lock().unwrap() = self.config.clone();
|
||||||
time: Local::now().format("%H:%M:%S").to_string(),
|
self.logs.push_back(LogEntry {
|
||||||
level: "GUI_INFO".to_string(),
|
time: Local::now().format("%H:%M:%S").to_string(),
|
||||||
message: format!("Config updated from server: UDP={}, LOG={}", self.config.udp_port, self.config.log_port),
|
level: "GUI_INFO".to_string(),
|
||||||
});
|
message: format!("Ports auto-configured: UDP={}, LOG={}", self.config.udp_port, self.config.log_port),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
InternalEvent::Disconnected => {
|
InternalEvent::Disconnected => {
|
||||||
@@ -1942,14 +1946,17 @@ impl eframe::App for MarteDebugApp {
|
|||||||
ui.label("IP:");
|
ui.label("IP:");
|
||||||
ui.text_edit_singleline(&mut self.config.ip);
|
ui.text_edit_singleline(&mut self.config.ip);
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
ui.label("Control:");
|
ui.label("Control TCP:");
|
||||||
ui.text_edit_singleline(&mut self.config.tcp_port);
|
ui.text_edit_singleline(&mut self.config.tcp_port);
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
ui.label("Telemetry (Auto):");
|
ui.label("Telemetry UDP:");
|
||||||
ui.label(&self.config.udp_port);
|
ui.add_enabled(!self.config.auto_ports, egui::TextEdit::singleline(&mut self.config.udp_port));
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
ui.label("Logs (Auto):");
|
ui.label("Log TCP:");
|
||||||
ui.label(&self.config.log_port);
|
ui.add_enabled(!self.config.auto_ports, egui::TextEdit::singleline(&mut self.config.log_port));
|
||||||
|
ui.end_row();
|
||||||
|
ui.label("Auto ports:");
|
||||||
|
ui.checkbox(&mut self.config.auto_ports, "from SERVICE_INFO");
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
});
|
});
|
||||||
if ui.button("🔄 Apply").clicked() {
|
if ui.button("🔄 Apply").clicked() {
|
||||||
|
|||||||
+80
-279
@@ -2,24 +2,24 @@
|
|||||||
{
|
{
|
||||||
"file": "TcpLogger.cpp",
|
"file": "TcpLogger.cpp",
|
||||||
"arguments": [
|
"arguments": [
|
||||||
"g++",
|
"/usr/bin/g++",
|
||||||
"-c",
|
"-c",
|
||||||
"-I.",
|
"-I.",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L0Types",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L2Objects",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L3Streams",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Messages",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Logger",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Logger",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Configuration",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L5GAMs",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L3Services",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4Messages",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4Messages",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L5GAMs",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L5GAMs",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L3Streams",
|
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L3Streams",
|
||||||
"-fPIC",
|
"-fPIC",
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-std=c++98",
|
"-std=c++98",
|
||||||
@@ -47,25 +47,26 @@
|
|||||||
{
|
{
|
||||||
"file": "DebugService.cpp",
|
"file": "DebugService.cpp",
|
||||||
"arguments": [
|
"arguments": [
|
||||||
"g++",
|
"/usr/bin/g++",
|
||||||
"-c",
|
"-c",
|
||||||
"-I../../../..//Source/Core/Types/Result",
|
"-I../../../..//Source/Core/Types/Result",
|
||||||
"-I../../../..//Source/Core/Types/Vec",
|
"-I../../../..//Source/Core/Types/Vec",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L0Types",
|
"-I../../../..//Source/Components/Interfaces/TCPLogger",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L2Objects",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L3Streams",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Messages",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Logger",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Configuration",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Logger",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L5GAMs",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L3Services",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4Messages",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4Messages",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L5GAMs",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L5GAMs",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L3Streams",
|
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability",
|
||||||
|
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L3Streams",
|
||||||
"-fPIC",
|
"-fPIC",
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-std=c++98",
|
"-std=c++98",
|
||||||
@@ -91,29 +92,28 @@
|
|||||||
"output": "../../../..//Build/x86-linux/Components/Interfaces/DebugService/DebugService.o"
|
"output": "../../../..//Build/x86-linux/Components/Interfaces/DebugService/DebugService.o"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "UnitTests.cpp",
|
"file": "DebugServiceBase.cpp",
|
||||||
"arguments": [
|
"arguments": [
|
||||||
"g++",
|
"/usr/bin/g++",
|
||||||
"-c",
|
"-c",
|
||||||
"-I../../Source/Core/Types/Result",
|
"-I../../../..//Source/Core/Types/Result",
|
||||||
"-I../../Source/Core/Types/Vec",
|
"-I../../../..//Source/Core/Types/Vec",
|
||||||
"-I../../Source/Components/Interfaces/DebugService",
|
"-I../../../..//Source/Components/Interfaces/TCPLogger",
|
||||||
"-I../../Source/Components/Interfaces/TCPLogger",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L0Types",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L2Objects",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L3Streams",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Messages",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Logger",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Logger",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Configuration",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L5GAMs",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L3Services",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4Messages",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4Messages",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L5GAMs",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L5GAMs",
|
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L3Streams",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L3Streams",
|
|
||||||
"-fPIC",
|
"-fPIC",
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-std=c++98",
|
"-std=c++98",
|
||||||
@@ -131,38 +131,35 @@
|
|||||||
"-Wno-unused-value",
|
"-Wno-unused-value",
|
||||||
"-g",
|
"-g",
|
||||||
"-ggdb",
|
"-ggdb",
|
||||||
"UnitTests.cpp",
|
"DebugServiceBase.cpp",
|
||||||
"-o",
|
"-o",
|
||||||
"../../Build/x86-linux/Test/UnitTests/UnitTests/UnitTests.o"
|
"../../../..//Build/x86-linux/Components/Interfaces/DebugService/DebugServiceBase.o"
|
||||||
],
|
],
|
||||||
"directory": "/home/martino/Projects/marte_debug/Test/UnitTests",
|
"directory": "/home/martino/Projects/marte_debug/Source/Components/Interfaces/DebugService",
|
||||||
"output": "../../Build/x86-linux/Test/UnitTests/UnitTests/UnitTests.o"
|
"output": "../../../..//Build/x86-linux/Components/Interfaces/DebugService/DebugServiceBase.o"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "SchedulerTest.cpp",
|
"file": "WebDebugService.cpp",
|
||||||
"arguments": [
|
"arguments": [
|
||||||
"g++",
|
"/usr/bin/g++",
|
||||||
"-c",
|
"-c",
|
||||||
"-I../../Source/Core/Types/Result",
|
"-I../../../..//Source/Components/Interfaces/TCPLogger",
|
||||||
"-I../../Source/Core/Types/Vec",
|
"-I../../../..//Source/Components/Interfaces/DebugService",
|
||||||
"-I../../Source/Components/Interfaces/DebugService",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types",
|
||||||
"-I../../Source/Components/Interfaces/TCPLogger",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L0Types",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L2Objects",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L3Streams",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Logger",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Messages",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Logger",
|
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Configuration",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L5GAMs",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L6App",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4Messages",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L1Portability",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L3Services",
|
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L5GAMs",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4Messages",
|
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L3Streams",
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L3Streams",
|
|
||||||
"-fPIC",
|
"-fPIC",
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-std=c++98",
|
"-std=c++98",
|
||||||
@@ -180,207 +177,11 @@
|
|||||||
"-Wno-unused-value",
|
"-Wno-unused-value",
|
||||||
"-g",
|
"-g",
|
||||||
"-ggdb",
|
"-ggdb",
|
||||||
"SchedulerTest.cpp",
|
"WebDebugService.cpp",
|
||||||
"-o",
|
"-o",
|
||||||
"../../Build/x86-linux/Test/Integration/Integration/SchedulerTest.o"
|
"../../../..//Build/x86-linux/Components/Interfaces/WebDebugService/WebDebugService.o"
|
||||||
],
|
],
|
||||||
"directory": "/home/martino/Projects/marte_debug/Test/Integration",
|
"directory": "/home/martino/Projects/marte_debug/Source/Components/Interfaces/WebDebugService",
|
||||||
"output": "../../Build/x86-linux/Test/Integration/Integration/SchedulerTest.o"
|
"output": "../../../..//Build/x86-linux/Components/Interfaces/WebDebugService/WebDebugService.o"
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "TraceTest.cpp",
|
|
||||||
"arguments": [
|
|
||||||
"g++",
|
|
||||||
"-c",
|
|
||||||
"-I../../Source/Core/Types/Result",
|
|
||||||
"-I../../Source/Core/Types/Vec",
|
|
||||||
"-I../../Source/Components/Interfaces/DebugService",
|
|
||||||
"-I../../Source/Components/Interfaces/TCPLogger",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L0Types",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L2Objects",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L3Streams",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Messages",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Logger",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Configuration",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L6App",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L3Services",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4Messages",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L3Streams",
|
|
||||||
"-fPIC",
|
|
||||||
"-Wall",
|
|
||||||
"-std=c++98",
|
|
||||||
"-Werror",
|
|
||||||
"-Wno-invalid-offsetof",
|
|
||||||
"-Wno-unused-variable",
|
|
||||||
"-fno-strict-aliasing",
|
|
||||||
"-frtti",
|
|
||||||
"-DMARTe2_TEST_ENVIRONMENT=GTest",
|
|
||||||
"-DARCHITECTURE=x86_gcc",
|
|
||||||
"-DENVIRONMENT=Linux",
|
|
||||||
"-DUSE_PTHREAD",
|
|
||||||
"-pthread",
|
|
||||||
"-Wno-deprecated-declarations",
|
|
||||||
"-Wno-unused-value",
|
|
||||||
"-g",
|
|
||||||
"-ggdb",
|
|
||||||
"TraceTest.cpp",
|
|
||||||
"-o",
|
|
||||||
"../../Build/x86-linux/Test/Integration/Integration/TraceTest.o"
|
|
||||||
],
|
|
||||||
"directory": "/home/martino/Projects/marte_debug/Test/Integration",
|
|
||||||
"output": "../../Build/x86-linux/Test/Integration/Integration/TraceTest.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "ValidationTest.cpp",
|
|
||||||
"arguments": [
|
|
||||||
"g++",
|
|
||||||
"-c",
|
|
||||||
"-I../../Source/Core/Types/Result",
|
|
||||||
"-I../../Source/Core/Types/Vec",
|
|
||||||
"-I../../Source/Components/Interfaces/DebugService",
|
|
||||||
"-I../../Source/Components/Interfaces/TCPLogger",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L0Types",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L2Objects",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L3Streams",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Messages",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Logger",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Configuration",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L6App",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L3Services",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4Messages",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L3Streams",
|
|
||||||
"-fPIC",
|
|
||||||
"-Wall",
|
|
||||||
"-std=c++98",
|
|
||||||
"-Werror",
|
|
||||||
"-Wno-invalid-offsetof",
|
|
||||||
"-Wno-unused-variable",
|
|
||||||
"-fno-strict-aliasing",
|
|
||||||
"-frtti",
|
|
||||||
"-DMARTe2_TEST_ENVIRONMENT=GTest",
|
|
||||||
"-DARCHITECTURE=x86_gcc",
|
|
||||||
"-DENVIRONMENT=Linux",
|
|
||||||
"-DUSE_PTHREAD",
|
|
||||||
"-pthread",
|
|
||||||
"-Wno-deprecated-declarations",
|
|
||||||
"-Wno-unused-value",
|
|
||||||
"-g",
|
|
||||||
"-ggdb",
|
|
||||||
"ValidationTest.cpp",
|
|
||||||
"-o",
|
|
||||||
"../../Build/x86-linux/Test/Integration/Integration/ValidationTest.o"
|
|
||||||
],
|
|
||||||
"directory": "/home/martino/Projects/marte_debug/Test/Integration",
|
|
||||||
"output": "../../Build/x86-linux/Test/Integration/Integration/ValidationTest.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "ConfigCommandTest.cpp",
|
|
||||||
"arguments": [
|
|
||||||
"g++",
|
|
||||||
"-c",
|
|
||||||
"-I../../Source/Core/Types/Result",
|
|
||||||
"-I../../Source/Core/Types/Vec",
|
|
||||||
"-I../../Source/Components/Interfaces/DebugService",
|
|
||||||
"-I../../Source/Components/Interfaces/TCPLogger",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L0Types",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L2Objects",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L3Streams",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Messages",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Logger",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Configuration",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L6App",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L3Services",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4Messages",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L3Streams",
|
|
||||||
"-fPIC",
|
|
||||||
"-Wall",
|
|
||||||
"-std=c++98",
|
|
||||||
"-Werror",
|
|
||||||
"-Wno-invalid-offsetof",
|
|
||||||
"-Wno-unused-variable",
|
|
||||||
"-fno-strict-aliasing",
|
|
||||||
"-frtti",
|
|
||||||
"-DMARTe2_TEST_ENVIRONMENT=GTest",
|
|
||||||
"-DARCHITECTURE=x86_gcc",
|
|
||||||
"-DENVIRONMENT=Linux",
|
|
||||||
"-DUSE_PTHREAD",
|
|
||||||
"-pthread",
|
|
||||||
"-Wno-deprecated-declarations",
|
|
||||||
"-Wno-unused-value",
|
|
||||||
"-g",
|
|
||||||
"-ggdb",
|
|
||||||
"ConfigCommandTest.cpp",
|
|
||||||
"-o",
|
|
||||||
"../../Build/x86-linux/Test/Integration/Integration/ConfigCommandTest.o"
|
|
||||||
],
|
|
||||||
"directory": "/home/martino/Projects/marte_debug/Test/Integration",
|
|
||||||
"output": "../../Build/x86-linux/Test/Integration/Integration/ConfigCommandTest.o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"file": "IntegrationTests.cpp",
|
|
||||||
"arguments": [
|
|
||||||
"g++",
|
|
||||||
"-c",
|
|
||||||
"-I../../Source/Core/Types/Result",
|
|
||||||
"-I../../Source/Core/Types/Vec",
|
|
||||||
"-I../../Source/Components/Interfaces/DebugService",
|
|
||||||
"-I../../Source/Components/Interfaces/TCPLogger",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L0Types",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L2Objects",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L3Streams",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Messages",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Logger",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L4Configuration",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/BareMetal/L6App",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L3Services",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4Messages",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L4LoggerService",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/Scheduler/L5GAMs",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L1Portability",
|
|
||||||
"-I/home/martino/Projects/marte_debug/dependency/MARTe2/Source/Core/FileSystem/L3Streams",
|
|
||||||
"-fPIC",
|
|
||||||
"-Wall",
|
|
||||||
"-std=c++98",
|
|
||||||
"-Werror",
|
|
||||||
"-Wno-invalid-offsetof",
|
|
||||||
"-Wno-unused-variable",
|
|
||||||
"-fno-strict-aliasing",
|
|
||||||
"-frtti",
|
|
||||||
"-DMARTe2_TEST_ENVIRONMENT=GTest",
|
|
||||||
"-DARCHITECTURE=x86_gcc",
|
|
||||||
"-DENVIRONMENT=Linux",
|
|
||||||
"-DUSE_PTHREAD",
|
|
||||||
"-pthread",
|
|
||||||
"-Wno-deprecated-declarations",
|
|
||||||
"-Wno-unused-value",
|
|
||||||
"-g",
|
|
||||||
"-ggdb",
|
|
||||||
"IntegrationTests.cpp",
|
|
||||||
"-o",
|
|
||||||
"../../Build/x86-linux/Test/Integration/Integration/IntegrationTests.o"
|
|
||||||
],
|
|
||||||
"directory": "/home/martino/Projects/marte_debug/Test/Integration",
|
|
||||||
"output": "../../Build/x86-linux/Test/Integration/Integration/IntegrationTests.o"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
# Get the directory of this script
|
# Get the directory of this script
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
export MARTe2_DIR=$DIR/dependency/MARTe2
|
export MARTe2_DIR=$HOME/workspace/MARTe2
|
||||||
export MARTe2_Components_DIR=$DIR/dependency/MARTe2-components
|
export MARTe2_Components_DIR=$HOME/workspace/MARTe2-components
|
||||||
export TARGET=x86-linux
|
export TARGET=x86-linux
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MARTe2_DIR/Build/$TARGET/Core
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MARTe2_DIR/Build/$TARGET/Core
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MARTe2_Components_DIR/Build/$TARGET/Components
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MARTe2_Components_DIR/Build/$TARGET/Components
|
||||||
|
|||||||
Reference in New Issue
Block a user