Files
CubicSDR/docs/design
2026-07-24 01:31:12 -04:00
..
2026-07-24 01:31:12 -04:00
2026-07-24 00:44:59 -04:00
2026-07-24 01:31:12 -04:00
2026-07-24 01:31:12 -04:00

CubicSDR Architecture

This directory contains architectural documentation for CubicSDR. These documents are designed to be expanded as the codebase evolves.

Documents

Document Description
Signal Flow Complete data path from SDR hardware to audio output, including queue topology and buffer management
Threading Model Thread inventory, lifecycle management, synchronization mechanisms, and producer-consumer patterns
Modem System Modem plugin architecture, factory registration, data processing pipeline, and available modem types

Quick Reference

Source Directory Layout

src/
  sdr/           SDR hardware interaction (SoapySDR wrapper)
  demod/         Demodulator lifecycle and processing
  audio/         Audio output (RtAudio) and recording
  visual/        OpenGL canvas rendering
  modules/modem/ Modem plugins (analog and digital)
  process/       FFT and visual data processing
  util/          Core utilities (queues, timers, data trees)
  rig/           Hamlib CAT control (optional)
  forms/         UI forms (device selection, bookmarks, dialogs)
  panel/         Display panels (scope, spectrum, waterfall, meter)

Key Classes

Class File Role
CubicSDR src/CubicSDR.h Application singleton, owns all global threads
AppFrame src/AppFrame.h Main wxWidgets window, UI event loop
AppConfig src/AppConfig.h Application configuration persistence
SDRThread src/sdr/SoapySDRThread.h Reads IQ samples from hardware
SDRPostThread src/sdr/SDRPostThread.h Channelizes and distributes IQ data
SDREnumerator src/sdr/SDREnumerator.h Background device discovery
DemodulatorInstance src/demod/DemodulatorInstance.h Orchestrates one demodulator's thread chain
DemodulatorMgr src/demod/DemodulatorMgr.h Manages all demodulator instances
DemodulatorWorkerThread src/demod/DemodulatorWorkerThread.h Offloaded modem/filter creation
Modem src/modules/modem/Modem.h Abstract modem base class with factory pattern
AudioThread src/audio/AudioThread.h Manages RtAudio output device
AudioSinkThread src/audio/AudioSinkThread.h Per-demod audio sink (base class)
AudioSinkFileThread src/audio/AudioSinkFileThread.h WAV file recording
IOThread src/IOThread.h Base class for all worker threads
ThreadBlockingQueue src/util/ThreadBlockingQueue.h Primary inter-thread communication mechanism

CMakeLists.txt Source/Header Mismatches

The CMakeLists.txt source file lists have several entries in the wrong category:

File Listed As Should Be
src/sdr/SoapySDRThread.h Source Header
src/panel/MeterPanel.h Source Header
src/sdr/SoapySDRThread.cpp Header Source
src/ui/UITestCanvas.cpp Header Source
src/ui/UITestContext.cpp Header Source

These mismatches don't affect the build (CMake treats both lists as source files for compilation), but they misrepresent the project structure and should be corrected.