libSDRForge
Loading...
Searching...
No Matches
sdrforge.telemetry.snapshots Namespace Reference

Build JSON-safe receiver snapshots without coupling DSP to networking. More...

Functions

Any _json_value (Any value)
dict[str, Any] spectrum_snapshot (np.ndarray power_db, *, int center_frequency_hz, int sample_rate_hz, int|None timestamp_ns=None)
 Describe ordered FFT bins spanning the given sample rate.
dict[str, Any] receiver_snapshot (Any receiver, *, int|None timestamp_ns=None, str mode="WFM", int|None bandwidth_hz=None, int|None frequency_hz=None, bool running=True)
 Build a common receiver status payload, with WFM-only metadata.

Detailed Description

Build JSON-safe receiver snapshots without coupling DSP to networking.

Function Documentation

◆ _json_value()

Any sdrforge.telemetry.snapshots._json_value ( Any value)
protected
Convert common DSP and metadata values to strict JSON values.

◆ receiver_snapshot()

dict[str, Any] sdrforge.telemetry.snapshots.receiver_snapshot ( Any receiver,
* ,
int | None timestamp_ns = None,
str mode = "WFM",
int | None bandwidth_hz = None,
int | None frequency_hz = None,
bool running = True )

Build a common receiver status payload, with WFM-only metadata.

Parameters
receiverThe receiver value.
timestamp_nsThe timestamp ns value.
modeThe mode value.
bandwidth_hzThe bandwidth hz value.
frequency_hzThe frequency hz value.
runningThe running value.
Returns
The operation result.

◆ spectrum_snapshot()

dict[str, Any] sdrforge.telemetry.snapshots.spectrum_snapshot ( np.ndarray power_db,
* ,
int center_frequency_hz,
int sample_rate_hz,
int | None timestamp_ns = None )

Describe ordered FFT bins spanning the given sample rate.

power_db must already be fftshift-ordered and converted to dB by the upstream spectrum analyzer. No FFT work is performed here.

Parameters
power_dbThe power_db value.
center_frequency_hzThe center_frequency_hz value.
sample_rate_hzThe sample rate in hertz.
timestamp_nsThe timestamp_ns value.
Returns
The operation result.