waterfall  0.2dev
 All Classes Files Functions Variables Enumerations Enumerator Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
SnapshotRecorder Class Reference

FFT data recorder which makes continuous snapshots of constants length. More...

#include <WaterfallBackend.h>

Classes

struct  Snapshot
 Specifies a snapshot within Recorder::buffer_ buffer. More...
 

Public Member Functions

 SnapshotRecorder (Ref< WaterfallBackend > backend, int snapshotLength, float leftFrequency, float rightFrequency)
 
virtual string getFileName (WFTime time)
 
virtual string getFileName (const char *typ, const char *ext, WFTime time)
 
virtual string getFileName (const string &typ, const string &origin, WFTime time)
 
virtual string getFileBasename (const char *typ, const char *ext, const string &origin, WFTime time)
 
virtual int requestBufferSize ()
 
virtual void start ()
 
virtual void stop ()
 
virtual void update ()
 
- Public Member Functions inherited from Recorder
 Recorder (Ref< WaterfallBackend > backend)
 
void setBuffer (RingBuffer2D< float > *buffer, FFTBackend::IQBuffer *rawBuffer, Mutex *bufferMutex, vector< RawDataHandle > *rawHandles)
 
int getSampleRate ()
 
int getFFTSampleRate ()
 
int fftMarkToRaw (int mark)
 
WFTime fftMarkToTime (int mark)
 
int fftSamplesToRaw (int sampleCount)
 Converts number of FFT samples to number raw I/Q samples.
 

Static Public Member Functions

static Ref< DIObject > make (Ref< DynObject > config, Ref< DIObject > parent)
 

Protected Types

typedef MethodThread< void,
SnapshotRecorder
Thread
 

Protected Member Functions

void * threadMethod ()
 
void startWriting ()
 
virtual void write (Snapshot snapshot)
 
virtual void writeRaw (Snapshot snapshot)
 

Protected Attributes

int snapshotLength_
 
float leftFrequency_
 
float rightFrequency_
 
bool writeUnfinished_
 
int snapshotRows_
 
int leftBin_
 
int rightBin_
 
Snapshot nextSnapshot_
 
Thread * workerThread_
 
Channel< Snapshotsnapshots_
 
- Protected Attributes inherited from Recorder
Ref< WaterfallBackendbackend_
 This recorder's backend.
 
RingBuffer2D< float > * buffer_
 FFT data buffer to record from.
 
FFTBackend::IQBufferrawBuffer_
 I/Q data buffer to record from.
 
Mutex * bufferMutex_
 Controls access to buffer_.
 
vector< RawDataHandle > * rawHandles_
 

Detailed Description

FFT data recorder which makes continuous snapshots of constants length.

Inheritance diagram for SnapshotRecorder:
Inheritance graph
[legend]
Collaboration diagram for SnapshotRecorder:
Collaboration graph
[legend]

Member Function Documentation

Ref< DIObject > SnapshotRecorder::make ( Ref< DynObject >  config,
Ref< DIObject >  parent 
)
static

The config values this method expects in parent are:

  • snapshot_length
  • low_freq
  • hi_freq
void SnapshotRecorder::write ( Snapshot  snapshot)
protectedvirtual
Bug:
There is a bug in the time mark in the data stream - it has been temporarily fixed here by using current time instead.

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