Monitors digitizer levels and issues corrective commands. More...

#include <LevelMonitor.h>

Inheritance diagram for dsp::LevelMonitor:
Reference::Able Reference::HeapTracked

Public Member Functions

 LevelMonitor ()
 Constructor. More...
 
virtual ~LevelMonitor ()
 Destructor.
 
void set_integration (uint64_t npts)
 Set the number of points included in each calculation of thresholds.
 
virtual void monitor ()
 Using input and converter, calculate sampling thresholds. More...
 
virtual void monitor_abort ()
 Abort monitoring.
 
virtual int change_gain (unsigned ichan, unsigned ipol, unsigned idim, double scale)
 Change the gain in the given channel. More...
 
virtual int change_levels (unsigned ichan, unsigned ipol, unsigned idim, double offset)
 Change the level in the given channel. More...
 
virtual int accumulate_stats (std::vector< double > &mean, std::vector< double > &variance)
 Accumulate statistics about incoming data stream.
 
virtual int set_thresholds (std::vector< double > &mean, std::vector< double > &variance)
 Set the sampling thresholds based on mean and variance in each channel.
 
void set_max_iterations (unsigned)
 Set the maximum number of iterations before giving up.
 
void set_between_iterations (double seconds)
 Set the number of seconds to sleep between iterations.
 
void set_history (LevelHistory *history)
 Set the device to be used to plot/log the digitizer statistics.
 
void set_input (IOManager *input)
 Set the device to be used to plot/log the digitizer statistics.
 
void set_swap_polarizations (bool swap)
 Swap the polarizations.
 
void set_consecutive (bool swap)
 Read data consecutively (do not seek to end on each iteration)
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Static Public Attributes

static bool verbose = false
 Verbosity flag.
 
static bool connect
 Actually connect.
 

Protected Member Functions

void init ()
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

uint64_t n_integrate
 the number of points to integrate
 
uint64_t block_size
 the number of points to load in one iteration
 
unsigned max_iterations
 Number of iterations, 0 for infinite.
 
double between_iterations
 the amount of time to sleep between iterations
 
bool abort
 abort current integration
 
bool stop_after_good
 stop setting the thresholds after they are good
 
bool setting_thresholds
 call set_thresholds on each loop
 
double optimal_variance
 the optimal variance
 
double optimal_dBm
 the optimal dBm
 
double mean_tolerance
 the amount by which the mean may be off zero
 
double var_tolerance
 the amount by which the variance may be off optimal
 
bool far_from_good
 flag says we need to get on it
 
bool swap_polarizations
 Swap polarizations.
 
bool consecutive
 Read data consecutively.
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 

Detailed Description

Monitors digitizer levels and issues corrective commands.

Constructor & Destructor Documentation

◆ LevelMonitor()

dsp::LevelMonitor::LevelMonitor ( )

Constructor.

Initialize null values.

Member Function Documentation

◆ change_gain()

int dsp::LevelMonitor::change_gain ( unsigned  ichan,
unsigned  ipol,
unsigned  idim,
double  delta_gain 
)
virtual

Change the gain in the given channel.

This method should be redefined by sub-classes which implement actual control over a physical/virtual digitizer

◆ change_levels()

int dsp::LevelMonitor::change_levels ( unsigned  ichan,
unsigned  ipol,
unsigned  idim,
double  delta_mean 
)
virtual

Change the level in the given channel.

This method should be redefined by sub-classes which implement actual control over a physical/virtual digitizer

◆ monitor()

void dsp::LevelMonitor::monitor ( )
virtual

Using input and converter, calculate sampling thresholds.

Monitor the data coming from the Bit_Stream_Input and issue appropriate level-setting commands


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

Generated using doxygen 1.8.17