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

Function section1

tests/rigctld_test.cpp:282–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280// ═════════════════════════════════════════════════════════════════════════════
281
282void section1(RigctlClient& c, Runner& r)
283{
284 r.section(QStringLiteral("Section 1 — Connection & Initialization"));
285
286 // 1.2 dump_state
287 QStringList lines = c.send(QStringLiteral("\\dump_state"));
288 bool hasDone = std::any_of(lines.cbegin(), lines.cend(),
289 [](const QString& l){ return l.contains(QLatin1String("done")); });
290 r.check(QStringLiteral(R"(1.2 dump_state returns capability block ending with "done")"),
291 c.ok(lines) && hasDone,
292 hasDone ? QString() : lines.join(QStringLiteral(" | ")).right(80));
293
294 // 1.3 get_info (no extended-mode support — use sendRaw)
295 QStringList raw = c.sendRaw(QStringLiteral("\\get_info"), 1);
296 r.check(QStringLiteral("1.3 get_info returns a non-empty string"),
297 !raw.isEmpty() && !raw[0].trimmed().isEmpty(),
298 raw.isEmpty() ? QStringLiteral("(no response)") : raw[0]);
299
300 // 1.4 get_rig_info
301 lines = c.send(QStringLiteral("\\get_rig_info"));
302 const QString info = c.field(lines, QStringLiteral("Info"));
303 r.check(QStringLiteral("1.4 get_rig_info returns RPRT 0 with Info field"),
304 c.ok(lines) && !info.isEmpty(), info);
305}
306
307// ═════════════════════════════════════════════════════════════════════════════
308// Section 1b — Hamlib Init Probe Commands (WSJT-X / client compatibility)

Callers 1

mainFunction · 0.70

Calls 8

containsMethod · 0.80
sendRawMethod · 0.80
sectionMethod · 0.45
sendMethod · 0.45
checkMethod · 0.45
okMethod · 0.45
isEmptyMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected