InstroSDR#
- class InstroSDR(
- name: str,
- driver: SDRDriverBase,
- **kwargs: Any,
Bases:
InstrumentSoftware defined radio instrument that publishes IQ blocks and spectrum features.
Each IQ block publishes as one
Measurementwith paired.iand.qchannels per signal path, timestamped from the sample period the device reports.Initialize an InstroSDR.
- Parameters:
name (str) – Channel-name prefix for published data.
driver (SDRDriverBase) – Concrete vendor driver.
**kwargs – Passed to
Instrument:publishersandbackground_config,dataset_ridto attach aNominalCorePublisher, and any other keyword as a default tag.
Example
from instro.unstable.sdr import InstroSDR sdr = InstroSDR(name="sdr", driver=MyVendorSDR(...)) # any concrete SDRDriverBase sdr.open() try: sdr.set_center_freq(100e6) sdr.set_sample_rate(2.4e6) iq = sdr.measure_iq(n_samples=4096) spectrum = sdr.measure_spectrum(n_samples=4096) finally: sdr.close()
Attributes
Background daemon loop period. |
|
Return an insertion-ordered snapshot of all published channel names. |
|
The underlying hardware driver. |
Methods
Append |
|
Register a publisher to receive this instrument's Measurement/Command data. |
|
Stop the background daemon and close the driver. |
|
Acquire one block and return one channel's power spectral density. |
|
Replace all daemon functions with a single |
|
Return the next contiguous block from the running stream and publish it. |
|
Query the selected antenna port and publish it as |
|
Return how many samples are waiting on the receive stream. |
|
Query the IF or filter bandwidth and publish it as |
|
Query the RF center frequency and publish it as |
|
Return the most recent |
|
Query the reference oscillator correction and publish it as |
|
Query the gain and publish it as |
|
Query the gain mode and publish it as |
|
Query the IQ sample rate and publish it as |
|
Return the most recent sample for |
|
Report whether a stream is running. |
|
Acquire one time-aligned IQ block and publish it as paired |
|
Acquire one block and publish four scalar spectrum features per channel. |
|
Open the underlying driver. |
|
Fan |
|
Set the antenna port and publish it as |
|
Set the IF or filter bandwidth and publish it as |
|
Set the RF center frequency and publish it as |
|
Set the reference oscillator correction and publish it as |
|
Set the gain and publish it as |
|
Hand gain to the AGC or take manual control, and publish it as |
|
Set the IQ sample rate and publish it as |
|
Begin continuous acquisition. |
|
Stop the background daemon and every running hardware stream. |