MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / parseStatusHandle

Function parseStatusHandle

src/core/StreamStatus.h:13–25  ·  view source on GitHub ↗

Parse a hex-or-decimal handle/token string (e.g. "0x12345678" or "305419896") into a quint32. Returns 0 on failure.

Source from the content-addressed store, hash-verified

11// Parse a hex-or-decimal handle/token string (e.g. "0x12345678" or "305419896")
12// into a quint32. Returns 0 on failure.
13inline quint32 parseStatusHandle(QString text)
14{
15 text = text.trimmed();
16 bool ok = false;
17 quint32 value = text.toUInt(&ok, 0);
18 if (ok)
19 return value;
20
21 if (text.startsWith(QStringLiteral("0x"), Qt::CaseInsensitive))
22 text = text.mid(2);
23 value = text.toUInt(&ok, 16);
24 return ok ? value : 0;
25}
26
27// Return true if a stream-status key-value map either omits client_handle
28// (legacy firmware) or explicitly matches our own handle. Current firmware can

Callers 5

streamStatusBelongsToUsFunction · 0.85
isDeadOrphanDaxRxStatusFunction · 0.85
parseStreamTokenFunction · 0.85
parseFlexIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected