libSDRForge
Loading...
Searching...
No Matches
sdrforge.weather.same_stream.StreamingSameCapture Class Reference

Bounded recorder with deterministic chunk handling. More...

Public Member Functions

None __init__ (self, int sample_rate, *, float max_seconds=15.0)
 Provide init behavior.
None reset (self)
 Provide reset behavior.
int buffered_samples (self)
 Provide buffered samples behavior.
bool truncated (self)
 Provide truncated behavior.
None feed (self, np.ndarray pcm)
 Provide feed behavior.
SameCaptureResult flush (self)
 Provide flush behavior.

Public Attributes

 sample_rate = sample_rate
 max_samples = max(1, int(sample_rate * max_seconds))

Protected Attributes

list _chunks = []
int _length = 0
bool _truncated = False

Detailed Description

Bounded recorder with deterministic chunk handling.

Constructor & Destructor Documentation

◆ __init__()

None sdrforge.weather.same_stream.StreamingSameCapture.__init__ ( self,
int sample_rate,
* ,
float max_seconds = 15.0 )

Provide init behavior.

Parameters
selfThe current instance.
sample_rateThe sample rate value.
max_secondsThe max seconds value.

Member Function Documentation

◆ buffered_samples()

int sdrforge.weather.same_stream.StreamingSameCapture.buffered_samples ( self)

Provide buffered samples behavior.

Parameters
selfThe current instance.
Returns
The operation result.

◆ feed()

None sdrforge.weather.same_stream.StreamingSameCapture.feed ( self,
np.ndarray pcm )

Provide feed behavior.

Parameters
selfThe current instance.
pcmThe pcm value.

◆ flush()

SameCaptureResult sdrforge.weather.same_stream.StreamingSameCapture.flush ( self)

Provide flush behavior.

Parameters
selfThe current instance.
Returns
The operation result.

◆ reset()

None sdrforge.weather.same_stream.StreamingSameCapture.reset ( self)

Provide reset behavior.

Parameters
selfThe current instance.

◆ truncated()

bool sdrforge.weather.same_stream.StreamingSameCapture.truncated ( self)

Provide truncated behavior.

Parameters
selfThe current instance.
Returns
The operation result.

Member Data Documentation

◆ _chunks

list sdrforge.weather.same_stream.StreamingSameCapture._chunks = []
protected

◆ _length

int sdrforge.weather.same_stream.StreamingSameCapture._length = 0
protected

◆ _truncated

bool sdrforge.weather.same_stream.StreamingSameCapture._truncated = False
protected

◆ max_samples

sdrforge.weather.same_stream.StreamingSameCapture.max_samples = max(1, int(sample_rate * max_seconds))

◆ sample_rate

sdrforge.weather.same_stream.StreamingSameCapture.sample_rate = sample_rate

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