libSDRForge
Loading...
Searching...
No Matches
sdrforge.adapters.simulated_iq.SimulatedIqSource Class Reference

Provide simulated iq source behavior. More...

Inheritance diagram for sdrforge.adapters.simulated_iq.SimulatedIqSource:
sdrforge.interfaces.sdr_source_if.SdrSourceIf

Public Member Functions

None __init__ (self, *, int block_samples=24_000)
 Initialize the instance.
None open (self)
 Open the component.
None close (self)
 Close the component.
bool is_connected (self)
 Return whether the connected.
SdrCapabilities get_capabilities (self)
 Return the capabilities.
None set_center_frequency (self, int frequency_hz)
 Set the center frequency.
int get_center_frequency (self)
 Return the center frequency.
int get_sample_rate (self)
 Return the sample rate.
None set_sample_rate (self, int sample_rate_hz)
 Set the sample rate.
None set_gain (self, float|None gain_db)
 Set the gain.
None start (self)
 Start the component.
None stop (self)
 Stop the component.
IqBlock read_iq (self)
 Read iq.

Public Attributes

 block_samples = block_samples
int frequency_hz = 104_300_000
int sample_rate_hz = 2_400_000

Protected Attributes

bool _open = False
bool _running = False
int _sample_index = 0
float _next_read = 0.0

Detailed Description

Provide simulated iq source behavior.

Constructor & Destructor Documentation

◆ __init__()

None sdrforge.adapters.simulated_iq.SimulatedIqSource.__init__ ( self,
* ,
int block_samples = 24_000 )

Initialize the instance.

Parameters
selfThe current instance.
block_samplesThe block_samples value.

Member Function Documentation

◆ close()

None sdrforge.adapters.simulated_iq.SimulatedIqSource.close ( self)

Close the component.

Parameters
selfThe current instance.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ get_capabilities()

SdrCapabilities sdrforge.adapters.simulated_iq.SimulatedIqSource.get_capabilities ( self)

Return the capabilities.

Parameters
selfThe current instance.
Returns
The operation result.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ get_center_frequency()

int sdrforge.adapters.simulated_iq.SimulatedIqSource.get_center_frequency ( self)

Return the center frequency.

Parameters
selfThe current instance.
Returns
The operation result.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ get_sample_rate()

int sdrforge.adapters.simulated_iq.SimulatedIqSource.get_sample_rate ( self)

Return the sample rate.

Parameters
selfThe current instance.
Returns
The operation result.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ is_connected()

bool sdrforge.adapters.simulated_iq.SimulatedIqSource.is_connected ( self)

Return whether the connected.

Parameters
selfThe current instance.
Returns
The operation result.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ open()

None sdrforge.adapters.simulated_iq.SimulatedIqSource.open ( self)

Open the component.

Parameters
selfThe current instance.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ read_iq()

IqBlock sdrforge.adapters.simulated_iq.SimulatedIqSource.read_iq ( self)

Read iq.

Parameters
selfThe current instance.
Returns
The operation result.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ set_center_frequency()

None sdrforge.adapters.simulated_iq.SimulatedIqSource.set_center_frequency ( self,
int frequency_hz )

Set the center frequency.

Parameters
selfThe current instance.
frequency_hzThe frequency in hertz.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ set_gain()

None sdrforge.adapters.simulated_iq.SimulatedIqSource.set_gain ( self,
float | None gain_db )

Set the gain.

Parameters
selfThe current instance.
gain_dbThe tuner gain in decibels, or None for automatic gain.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ set_sample_rate()

None sdrforge.adapters.simulated_iq.SimulatedIqSource.set_sample_rate ( self,
int sample_rate_hz )

Set the sample rate.

Parameters
selfThe current instance.
sample_rate_hzThe sample rate in hertz.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ start()

None sdrforge.adapters.simulated_iq.SimulatedIqSource.start ( self)

Start the component.

Parameters
selfThe current instance.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

◆ stop()

None sdrforge.adapters.simulated_iq.SimulatedIqSource.stop ( self)

Stop the component.

Parameters
selfThe current instance.

Reimplemented from sdrforge.interfaces.sdr_source_if.SdrSourceIf.

Member Data Documentation

◆ _next_read

float sdrforge.adapters.simulated_iq.SimulatedIqSource._next_read = 0.0
protected

◆ _open

bool sdrforge.adapters.simulated_iq.SimulatedIqSource._open = False
protected

◆ _running

bool sdrforge.adapters.simulated_iq.SimulatedIqSource._running = False
protected

◆ _sample_index

int sdrforge.adapters.simulated_iq.SimulatedIqSource._sample_index = 0
protected

◆ block_samples

sdrforge.adapters.simulated_iq.SimulatedIqSource.block_samples = block_samples

◆ frequency_hz

int sdrforge.adapters.simulated_iq.SimulatedIqSource.frequency_hz = 104_300_000

◆ sample_rate_hz

int sdrforge.adapters.simulated_iq.SimulatedIqSource.sample_rate_hz = 2_400_000

The documentation for this class was generated from the following file: