MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / RadioModule

Method RadioModule

decoder_modules/radio/src/main.cpp:34–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32class RadioModule : public ModuleManager::Instance {
33public:
34 RadioModule(std::string name) {
35 this->name = name;
36
37 vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, 0, 200000, 200000, 50000, 200000, false);
38
39 ns.init(vfo->output);
40
41 config.acquire();
42 if (!config.conf.contains(name)) {
43 config.conf[name]["selectedDemodId"] = 1;
44 }
45 demodId = config.conf[name]["selectedDemodId"];
46 config.release(true);
47
48 wfmDemod.init(name, vfo, audioSampRate, 200000, &config);
49 fmDemod.init(name, vfo, audioSampRate, 12500, &config);
50 amDemod.init(name, vfo, audioSampRate, 12500, &config);
51 usbDemod.init(name, vfo, audioSampRate, 3000, &config);
52 lsbDemod.init(name, vfo, audioSampRate, 3000, &config);
53 dsbDemod.init(name, vfo, audioSampRate, 6000, &config);
54 rawDemod.init(name, vfo, audioSampRate, audioSampRate, &config);
55 cwDemod.init(name, vfo, audioSampRate, 200, &config);
56
57 srChangeHandler.ctx = this;
58 srChangeHandler.handler = sampleRateChangeHandler;
59 stream.init(wfmDemod.getOutput(), &srChangeHandler, audioSampRate);
60 sigpath::sinkManager.registerStream(name, &stream);
61
62 selectDemodById(demodId);
63
64 stream.start();
65
66 gui::menu.registerEntry(name, menuHandler, this, this);
67
68 core::modComManager.registerInterface("radio", name, moduleInterfaceHandler, this);
69 }
70
71 ~RadioModule() {
72 core::modComManager.unregisterInterface(name);

Callers

nothing calls this directly

Calls 9

createVFOMethod · 0.80
registerStreamMethod · 0.80
registerEntryMethod · 0.80
registerInterfaceMethod · 0.80
initMethod · 0.45
acquireMethod · 0.45
releaseMethod · 0.45
getOutputMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected