Quellcode durchsuchen

chore: rename module to sdr-wideband-suite

master
Jan Svabenik vor 8 Stunden
Ursprung
Commit
9576e2c26d
40 geänderte Dateien mit 86 neuen und 86 gelöschten Zeilen
  1. +10
    -10
      cmd/sdrd/dsp_loop.go
  2. +4
    -4
      cmd/sdrd/helpers.go
  3. +7
    -7
      cmd/sdrd/http_handlers.go
  4. +1
    -1
      cmd/sdrd/hub.go
  5. +9
    -9
      cmd/sdrd/main.go
  6. +2
    -2
      cmd/sdrd/source_manager.go
  7. +4
    -4
      cmd/sdrd/types.go
  8. +1
    -1
      cmd/sdrd/ws_handlers.go
  9. +1
    -1
      go.mod
  10. +1
    -1
      internal/demod/fm.go
  11. +1
    -1
      internal/demod/gpudemod/batch_runner_test.go
  12. +1
    -1
      internal/demod/gpudemod/batch_runner_windows.go
  13. +2
    -2
      internal/demod/gpudemod/gpudemod.go
  14. +2
    -2
      internal/demod/gpudemod/gpudemod_windows.go
  15. +1
    -1
      internal/demod/gpudemod/validation.go
  16. +1
    -1
      internal/demod/gpudemod/validation_extra.go
  17. +1
    -1
      internal/demod/gpudemod/validation_test.go
  18. +3
    -3
      internal/detector/detector.go
  19. +2
    -2
      internal/detector/detector_test.go
  20. +1
    -1
      internal/events/reader.go
  21. +1
    -1
      internal/events/reader_test.go
  22. +1
    -1
      internal/mock/source.go
  23. +2
    -2
      internal/pipeline/refiner.go
  24. +2
    -2
      internal/pipeline/types.go
  25. +2
    -2
      internal/recorder/cpu_audio.go
  26. +1
    -1
      internal/recorder/decode.go
  27. +1
    -1
      internal/recorder/decode_on_demand.go
  28. +3
    -3
      internal/recorder/demod.go
  29. +1
    -1
      internal/recorder/demod_helpers.go
  30. +1
    -1
      internal/recorder/demod_live.go
  31. +1
    -1
      internal/recorder/gpu_audio.go
  32. +2
    -2
      internal/recorder/metadata.go
  33. +1
    -1
      internal/recorder/rds.go
  34. +2
    -2
      internal/recorder/recorder.go
  35. +4
    -4
      internal/recorder/streamer.go
  36. +2
    -2
      internal/recorder/wfm_hybrid.go
  37. +1
    -1
      internal/runtime/runtime.go
  38. +1
    -1
      internal/runtime/runtime_test.go
  39. +1
    -1
      internal/sdrplay/sdrplay.go
  40. +1
    -1
      internal/sdrplay/sdrplay_stub.go

+ 10
- 10
cmd/sdrd/dsp_loop.go Datei anzeigen

@@ -12,16 +12,16 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"


"sdr-visual-suite/internal/classifier"
"sdr-visual-suite/internal/config"
"sdr-visual-suite/internal/demod"
"sdr-visual-suite/internal/detector"
"sdr-visual-suite/internal/dsp"
fftutil "sdr-visual-suite/internal/fft"
"sdr-visual-suite/internal/fft/gpufft"
"sdr-visual-suite/internal/rds"
"sdr-visual-suite/internal/recorder"
"sdr-visual-suite/internal/pipeline"
"sdr-wideband-suite/internal/classifier"
"sdr-wideband-suite/internal/config"
"sdr-wideband-suite/internal/demod"
"sdr-wideband-suite/internal/detector"
"sdr-wideband-suite/internal/dsp"
fftutil "sdr-wideband-suite/internal/fft"
"sdr-wideband-suite/internal/fft/gpufft"
"sdr-wideband-suite/internal/rds"
"sdr-wideband-suite/internal/recorder"
"sdr-wideband-suite/internal/pipeline"
) )


func runDSP(ctx context.Context, srcMgr *sourceManager, cfg config.Config, det *detector.Detector, window []float64, h *hub, eventFile *os.File, eventMu *sync.RWMutex, updates <-chan dspUpdate, gpuState *gpuStatus, rec *recorder.Manager, sigSnap *signalSnapshot, extractMgr *extractionManager) { func runDSP(ctx context.Context, srcMgr *sourceManager, cfg config.Config, det *detector.Detector, window []float64, h *hub, eventFile *os.File, eventMu *sync.RWMutex, updates <-chan dspUpdate, gpuState *gpuStatus, rec *recorder.Manager, sigSnap *signalSnapshot, extractMgr *extractionManager) {


+ 4
- 4
cmd/sdrd/helpers.go Datei anzeigen

@@ -7,10 +7,10 @@ import (
"strconv" "strconv"
"time" "time"


"sdr-visual-suite/internal/config"
"sdr-visual-suite/internal/demod/gpudemod"
"sdr-visual-suite/internal/detector"
"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/config"
"sdr-wideband-suite/internal/demod/gpudemod"
"sdr-wideband-suite/internal/detector"
"sdr-wideband-suite/internal/dsp"
) )


func mustParseDuration(raw string, fallback time.Duration) time.Duration { func mustParseDuration(raw string, fallback time.Duration) time.Duration {


+ 7
- 7
cmd/sdrd/http_handlers.go Datei anzeigen

@@ -12,13 +12,13 @@ import (
"sync" "sync"
"time" "time"


"sdr-visual-suite/internal/config"
"sdr-visual-suite/internal/detector"
"sdr-visual-suite/internal/events"
"sdr-visual-suite/internal/pipeline"
fftutil "sdr-visual-suite/internal/fft"
"sdr-visual-suite/internal/recorder"
"sdr-visual-suite/internal/runtime"
"sdr-wideband-suite/internal/config"
"sdr-wideband-suite/internal/detector"
"sdr-wideband-suite/internal/events"
"sdr-wideband-suite/internal/pipeline"
fftutil "sdr-wideband-suite/internal/fft"
"sdr-wideband-suite/internal/recorder"
"sdr-wideband-suite/internal/runtime"
) )


func registerAPIHandlers(mux *http.ServeMux, cfgPath string, cfgManager *runtime.Manager, srcMgr *sourceManager, dspUpdates chan dspUpdate, gpuState *gpuStatus, recMgr *recorder.Manager, sigSnap *signalSnapshot, eventMu *sync.RWMutex) { func registerAPIHandlers(mux *http.ServeMux, cfgPath string, cfgManager *runtime.Manager, srcMgr *sourceManager, dspUpdates chan dspUpdate, gpuState *gpuStatus, recMgr *recorder.Manager, sigSnap *signalSnapshot, eventMu *sync.RWMutex) {


+ 1
- 1
cmd/sdrd/hub.go Datei anzeigen

@@ -7,7 +7,7 @@ import (
"math" "math"
"time" "time"


"sdr-visual-suite/internal/detector"
"sdr-wideband-suite/internal/detector"
) )


func (s *signalSnapshot) set(sig []detector.Signal) { func (s *signalSnapshot) set(sig []detector.Signal) {


+ 9
- 9
cmd/sdrd/main.go Datei anzeigen

@@ -13,15 +13,15 @@ import (
"syscall" "syscall"
"time" "time"


"sdr-visual-suite/internal/config"
"sdr-visual-suite/internal/detector"
fftutil "sdr-visual-suite/internal/fft"
"sdr-visual-suite/internal/fft/gpufft"
"sdr-visual-suite/internal/mock"
"sdr-visual-suite/internal/recorder"
"sdr-visual-suite/internal/runtime"
"sdr-visual-suite/internal/sdr"
"sdr-visual-suite/internal/sdrplay"
"sdr-wideband-suite/internal/config"
"sdr-wideband-suite/internal/detector"
fftutil "sdr-wideband-suite/internal/fft"
"sdr-wideband-suite/internal/fft/gpufft"
"sdr-wideband-suite/internal/mock"
"sdr-wideband-suite/internal/recorder"
"sdr-wideband-suite/internal/runtime"
"sdr-wideband-suite/internal/sdr"
"sdr-wideband-suite/internal/sdrplay"
) )


func main() { func main() {


+ 2
- 2
cmd/sdrd/source_manager.go Datei anzeigen

@@ -1,8 +1,8 @@
package main package main


import ( import (
"sdr-visual-suite/internal/config"
"sdr-visual-suite/internal/sdr"
"sdr-wideband-suite/internal/config"
"sdr-wideband-suite/internal/sdr"
) )


func (m *sourceManager) Restart(cfg config.Config) error { func (m *sourceManager) Restart(cfg config.Config) error {


+ 4
- 4
cmd/sdrd/types.go Datei anzeigen

@@ -6,10 +6,10 @@ import (


"github.com/gorilla/websocket" "github.com/gorilla/websocket"


"sdr-visual-suite/internal/config"
"sdr-visual-suite/internal/demod/gpudemod"
"sdr-visual-suite/internal/detector"
"sdr-visual-suite/internal/sdr"
"sdr-wideband-suite/internal/config"
"sdr-wideband-suite/internal/demod/gpudemod"
"sdr-wideband-suite/internal/detector"
"sdr-wideband-suite/internal/sdr"
) )


type SpectrumDebug struct { type SpectrumDebug struct {


+ 1
- 1
cmd/sdrd/ws_handlers.go Datei anzeigen

@@ -9,7 +9,7 @@ import (


"github.com/gorilla/websocket" "github.com/gorilla/websocket"


"sdr-visual-suite/internal/recorder"
"sdr-wideband-suite/internal/recorder"
) )


func registerWSHandlers(mux *http.ServeMux, h *hub, recMgr *recorder.Manager) { func registerWSHandlers(mux *http.ServeMux, h *hub, recMgr *recorder.Manager) {


+ 1
- 1
go.mod Datei anzeigen

@@ -1,4 +1,4 @@
module sdr-visual-suite
module sdr-wideband-suite


go 1.22 go 1.22




+ 1
- 1
internal/demod/fm.go Datei anzeigen

@@ -3,7 +3,7 @@ package demod
import ( import (
"math" "math"


"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/dsp"
) )


type NFM struct{} type NFM struct{}


+ 1
- 1
internal/demod/gpudemod/batch_runner_test.go Datei anzeigen

@@ -5,7 +5,7 @@ import (
"math/cmplx" "math/cmplx"
"testing" "testing"


"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/dsp"
) )


func TestMixedBandwidthBatch(t *testing.T) { func TestMixedBandwidthBatch(t *testing.T) {


+ 1
- 1
internal/demod/gpudemod/batch_runner_windows.go Datei anzeigen

@@ -12,7 +12,7 @@ import (
"math" "math"
"unsafe" "unsafe"


"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/dsp"
) )


type slotBuffers struct { type slotBuffers struct {


+ 2
- 2
internal/demod/gpudemod/gpudemod.go Datei anzeigen

@@ -74,8 +74,8 @@ import (
"math" "math"
"unsafe" "unsafe"


"sdr-visual-suite/internal/demod"
"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/demod"
"sdr-wideband-suite/internal/dsp"
) )


type DemodType int type DemodType int


+ 2
- 2
internal/demod/gpudemod/gpudemod_windows.go Datei anzeigen

@@ -19,8 +19,8 @@ import (
"sync" "sync"
"unsafe" "unsafe"


"sdr-visual-suite/internal/demod"
"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/demod"
"sdr-wideband-suite/internal/dsp"
) )


type DemodType int type DemodType int


+ 1
- 1
internal/demod/gpudemod/validation.go Datei anzeigen

@@ -5,7 +5,7 @@ package gpudemod
import ( import (
"math/cmplx" "math/cmplx"


"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/dsp"
) )


// ValidateFreqShift compares a candidate shifted IQ stream against the CPU DSP // ValidateFreqShift compares a candidate shifted IQ stream against the CPU DSP


+ 1
- 1
internal/demod/gpudemod/validation_extra.go Datei anzeigen

@@ -5,7 +5,7 @@ package gpudemod
import ( import (
"math/cmplx" "math/cmplx"


"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/dsp"
) )


func ValidateFIR(iq []complex64, taps []float32, filtered []complex64, tol float64) bool { func ValidateFIR(iq []complex64, taps []float32, filtered []complex64, tol float64) bool {


+ 1
- 1
internal/demod/gpudemod/validation_test.go Datei anzeigen

@@ -5,7 +5,7 @@ package gpudemod
import ( import (
"testing" "testing"


"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/dsp"
) )


func TestValidateFreqShiftRejectsMismatchedLength(t *testing.T) { func TestValidateFreqShiftRejectsMismatchedLength(t *testing.T) {


+ 3
- 3
internal/detector/detector.go Datei anzeigen

@@ -5,9 +5,9 @@ import (
"sort" "sort"
"time" "time"


"sdr-visual-suite/internal/cfar"
"sdr-visual-suite/internal/classifier"
"sdr-visual-suite/internal/config"
"sdr-wideband-suite/internal/cfar"
"sdr-wideband-suite/internal/classifier"
"sdr-wideband-suite/internal/config"
) )


type Event struct { type Event struct {


+ 2
- 2
internal/detector/detector_test.go Datei anzeigen

@@ -4,8 +4,8 @@ import (
"testing" "testing"
"time" "time"


"sdr-visual-suite/internal/classifier"
"sdr-visual-suite/internal/config"
"sdr-wideband-suite/internal/classifier"
"sdr-wideband-suite/internal/config"
) )


func TestDetectorCreatesEvent(t *testing.T) { func TestDetectorCreatesEvent(t *testing.T) {


+ 1
- 1
internal/events/reader.go Datei anzeigen

@@ -8,7 +8,7 @@ import (
"os" "os"
"time" "time"


"sdr-visual-suite/internal/detector"
"sdr-wideband-suite/internal/detector"
) )


const ( const (


+ 1
- 1
internal/events/reader_test.go Datei anzeigen

@@ -7,7 +7,7 @@ import (
"testing" "testing"
"time" "time"


"sdr-visual-suite/internal/detector"
"sdr-wideband-suite/internal/detector"
) )


func TestReadRecent(t *testing.T) { func TestReadRecent(t *testing.T) {


+ 1
- 1
internal/mock/source.go Datei anzeigen

@@ -6,7 +6,7 @@ import (
"sync" "sync"
"time" "time"


"sdr-visual-suite/internal/sdr"
"sdr-wideband-suite/internal/sdr"
) )


type Source struct { type Source struct {


+ 2
- 2
internal/pipeline/refiner.go Datei anzeigen

@@ -1,8 +1,8 @@
package pipeline package pipeline


import ( import (
"sdr-visual-suite/internal/classifier"
"sdr-visual-suite/internal/detector"
"sdr-wideband-suite/internal/classifier"
"sdr-wideband-suite/internal/detector"
) )


// RefineCandidates upgrades coarse detector candidates into refined signals // RefineCandidates upgrades coarse detector candidates into refined signals


+ 2
- 2
internal/pipeline/types.go Datei anzeigen

@@ -1,8 +1,8 @@
package pipeline package pipeline


import ( import (
"sdr-visual-suite/internal/classifier"
"sdr-visual-suite/internal/detector"
"sdr-wideband-suite/internal/classifier"
"sdr-wideband-suite/internal/detector"
) )


// Candidate is the coarse output of the surveillance detector. // Candidate is the coarse output of the surveillance detector.


+ 2
- 2
internal/recorder/cpu_audio.go Datei anzeigen

@@ -3,8 +3,8 @@ package recorder
import ( import (
"math" "math"


"sdr-visual-suite/internal/demod"
"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/demod"
"sdr-wideband-suite/internal/dsp"
) )


func demodAudioCPU(d demod.Demodulator, iq []complex64, sampleRate int, offset float64, bw float64) ([]float32, int) { func demodAudioCPU(d demod.Demodulator, iq []complex64, sampleRate int, offset float64, bw float64) ([]float32, int) {


+ 1
- 1
internal/recorder/decode.go Datei anzeigen

@@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"path/filepath" "path/filepath"


"sdr-visual-suite/internal/decoder"
"sdr-wideband-suite/internal/decoder"
) )


func (m *Manager) runDecodeIfConfigured(mod string, iqPath string, sampleRate int, files map[string]any, dir string) { func (m *Manager) runDecodeIfConfigured(mod string, iqPath string, sampleRate int, files map[string]any, dir string) {


+ 1
- 1
internal/recorder/decode_on_demand.go Datei anzeigen

@@ -3,7 +3,7 @@ package recorder
import ( import (
"errors" "errors"


"sdr-visual-suite/internal/decoder"
"sdr-wideband-suite/internal/decoder"
) )


func DecodeOnDemand(cmd string, iqPath string, sampleRate int, audioPath string) (decoder.Result, error) { func DecodeOnDemand(cmd string, iqPath string, sampleRate int, audioPath string) (decoder.Result, error) {


+ 3
- 3
internal/recorder/demod.go Datei anzeigen

@@ -5,9 +5,9 @@ import (
"log" "log"
"path/filepath" "path/filepath"


"sdr-visual-suite/internal/classifier"
"sdr-visual-suite/internal/demod"
"sdr-visual-suite/internal/detector"
"sdr-wideband-suite/internal/classifier"
"sdr-wideband-suite/internal/demod"
"sdr-wideband-suite/internal/detector"
) )


func (m *Manager) demodAndWrite(dir string, ev detector.Event, iq []complex64, files map[string]any) error { func (m *Manager) demodAndWrite(dir string, ev detector.Event, iq []complex64, files map[string]any) error {


+ 1
- 1
internal/recorder/demod_helpers.go Datei anzeigen

@@ -1,6 +1,6 @@
package recorder package recorder


import "sdr-visual-suite/internal/demod/gpudemod"
import "sdr-wideband-suite/internal/demod/gpudemod"


func gpuModeFor(name string) (gpudemod.DemodType, bool) { func gpuModeFor(name string) (gpudemod.DemodType, bool) {
switch name { switch name {


+ 1
- 1
internal/recorder/demod_live.go Datei anzeigen

@@ -7,7 +7,7 @@ import (
"math" "math"
"time" "time"


"sdr-visual-suite/internal/demod"
"sdr-wideband-suite/internal/demod"
) )


// DemodLive demodulates a recent window and returns WAV bytes. // DemodLive demodulates a recent window and returns WAV bytes.


+ 1
- 1
internal/recorder/gpu_audio.go Datei anzeigen

@@ -3,7 +3,7 @@ package recorder
import ( import (
"log" "log"


"sdr-visual-suite/internal/demod/gpudemod"
"sdr-wideband-suite/internal/demod/gpudemod"
) )


func tryGPUAudio(gpu *gpudemod.Engine, label string, iq []complex64, offset float64, bw float64, gpuMode gpudemod.DemodType) ([]float32, int, bool) { func tryGPUAudio(gpu *gpudemod.Engine, label string, iq []complex64, offset float64, bw float64, gpuMode gpudemod.DemodType) ([]float32, int, bool) {


+ 2
- 2
internal/recorder/metadata.go Datei anzeigen

@@ -6,8 +6,8 @@ import (
"path/filepath" "path/filepath"
"time" "time"


"sdr-visual-suite/internal/classifier"
"sdr-visual-suite/internal/detector"
"sdr-wideband-suite/internal/classifier"
"sdr-wideband-suite/internal/detector"
) )


type Meta struct { type Meta struct {


+ 1
- 1
internal/recorder/rds.go Datei anzeigen

@@ -1,6 +1,6 @@
package recorder package recorder


import "sdr-visual-suite/internal/rds"
import "sdr-wideband-suite/internal/rds"


type rdsdecoder struct{ rds.Decoder } type rdsdecoder struct{ rds.Decoder }




+ 2
- 2
internal/recorder/recorder.go Datei anzeigen

@@ -10,8 +10,8 @@ import (
"sync" "sync"
"time" "time"


"sdr-visual-suite/internal/demod/gpudemod"
"sdr-visual-suite/internal/detector"
"sdr-wideband-suite/internal/demod/gpudemod"
"sdr-wideband-suite/internal/detector"
) )


type Policy struct { type Policy struct {


+ 4
- 4
internal/recorder/streamer.go Datei anzeigen

@@ -14,10 +14,10 @@ import (
"sync" "sync"
"time" "time"


"sdr-visual-suite/internal/classifier"
"sdr-visual-suite/internal/demod"
"sdr-visual-suite/internal/detector"
"sdr-visual-suite/internal/dsp"
"sdr-wideband-suite/internal/classifier"
"sdr-wideband-suite/internal/demod"
"sdr-wideband-suite/internal/detector"
"sdr-wideband-suite/internal/dsp"
) )


// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------


+ 2
- 2
internal/recorder/wfm_hybrid.go Datei anzeigen

@@ -3,8 +3,8 @@ package recorder
import ( import (
"log" "log"


"sdr-visual-suite/internal/demod"
"sdr-visual-suite/internal/demod/gpudemod"
"sdr-wideband-suite/internal/demod"
"sdr-wideband-suite/internal/demod/gpudemod"
) )


type wfmHybridResult struct { type wfmHybridResult struct {


+ 1
- 1
internal/runtime/runtime.go Datei anzeigen

@@ -6,7 +6,7 @@ import (
"strings" "strings"
"sync" "sync"


"sdr-visual-suite/internal/config"
"sdr-wideband-suite/internal/config"
) )


type ConfigUpdate struct { type ConfigUpdate struct {


+ 1
- 1
internal/runtime/runtime_test.go Datei anzeigen

@@ -3,7 +3,7 @@ package runtime
import ( import (
"testing" "testing"


"sdr-visual-suite/internal/config"
"sdr-wideband-suite/internal/config"
) )


func TestApplyConfigUpdate(t *testing.T) { func TestApplyConfigUpdate(t *testing.T) {


+ 1
- 1
internal/sdrplay/sdrplay.go Datei anzeigen

@@ -77,7 +77,7 @@ import (
"time" "time"
"unsafe" "unsafe"


"sdr-visual-suite/internal/sdr"
"sdr-wideband-suite/internal/sdr"
) )


type Source struct { type Source struct {


+ 1
- 1
internal/sdrplay/sdrplay_stub.go Datei anzeigen

@@ -2,7 +2,7 @@


package sdrplay package sdrplay


import "sdr-visual-suite/internal/sdr"
import "sdr-wideband-suite/internal/sdr"


func New(sampleRate int, centerHz float64, gainDb float64, bwKHz int) (sdr.Source, error) { func New(sampleRate int, centerHz float64, gainDb float64, bwKHz int) (sdr.Source, error) {
return nil, sdr.ErrNotImplemented return nil, sdr.ErrNotImplemented


Laden…
Abbrechen
Speichern