Base Relacs Plugins  0.9.8
Public Member Functions | Protected Member Functions | List of all members
LinearAttenuate Class Reference

#include <linearattenuate.h>

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

Public Member Functions

 LinearAttenuate (void)
 
 ~LinearAttenuate (void)
 
double gain (void) const
 
void setGain (double gain)
 
double offset (void) const
 
void setOffset (double offset)
 
void setGain (double gain, double offset)
 
virtual void setDeviceIdent (const string &ident)
 
virtual void notify (void)
 
virtual void init (void)
 
- Public Member Functions inherited from Attenuate
 Attenuate (void)
 
 Attenuate (const string &deviceclass, const string &intensityname="intensity", const string &intensityunit="dB", const string &intensityformat="%6.2f", const string &frequencyname="", const string &frequencyunit="Hz", const string &frequencyformat="%7.0f")
 
virtual ~Attenuate (void)
 
int open (Device &att, int line)
 
virtual int open (Device &att) override
 
virtual int open (const string &device) override
 
virtual bool isOpen (void) const
 
virtual void close (void)
 
void clear (void)
 
double minIntensity (double frequency=0.0) const
 
double maxIntensity (double frequency=0.0) const
 
void intensities (vector< double > &ints, double frequency=0.0) const
 
virtual void save (const string &path) const
 
int write (double &intensity, double frequency, double &level)
 
int testWrite (double &intensity, double frequency, double &level)
 
int mute (void)
 
int testMute (void)
 
int attenuate (double &level)
 
int testAttenuate (double &level)
 
string intensityName (void) const
 
void setIntensityName (const string &name)
 
string intensityUnit (void) const
 
void setIntensityUnit (const string &unit)
 
string intensityFormat (void) const
 
void setIntensityFormat (const string &format)
 
string frequencyName (void) const
 
void setFrequencyName (const string &name)
 
string frequencyUnit (void) const
 
void setFrequencyUnit (const string &unit)
 
string frequencyFormat (void) const
 
void setFrequencyFormat (const string &format)
 
int aoChannel (void) const
 
void setAOChannel (int channel)
 
string aoDevice (void) const
 
void setAODevice (const string &deviceid)
 
Attenuatorattenuator (void)
 
const Attenuatorattenuator (void) const
 
bool noAttenuator (void) const
 
virtual int reset (void)
 
- Public Member Functions inherited from ConfigClass
 ConfigClass (const string &ident, int group=0, int mode=0xffff, int selectmask=0)
 
 ConfigClass (const ConfigClass &C)
 
virtual ~ConfigClass (void)
 
const string & configIdent (void) const
 
void setConfigIdent (const string &ident)
 
int configGroup (void) const
 
void setConfigGroup (int group)
 
int configMode (void) const
 
void setConfigMode (int mode)
 
void addConfigMode (int mode)
 
void delConfigMode (int mode)
 
int configSelectMask (void) const
 
void setConfigSelectMask (int mask)
 
void addConfig (void)
 
void readConfig (void)
 
virtual void readConfig (StrQueue &sq)
 
virtual void saveConfig (ofstream &str)
 
virtual int configSize (void) const
 
virtual void config (void)
 
virtual void preConfig (void)
 

Protected Member Functions

int decibel (double intensity, double frequency, double &db) const
 
void intensity (double &intens, double frequency, double decibel) const
 
- Protected Member Functions inherited from Attenuate
virtual void initOptions () override
 

Additional Inherited Members

- Public Types inherited from ConfigClass
enum  Action
 
- Static Public Member Functions inherited from ConfigClass
static void setConfigureClasses (ConfigureClasses *cfg)
 
- Static Public Attributes inherited from Attenuate
static const double MuteAttenuationLevel
 
static const double MuteIntensity
 
static const int NotOpen
 
static const int InvalidDevice
 
static const int ReadError
 
static const int WriteError
 
static const int Underflow
 
static const int Overflow
 
static const int IntensityUnderflow
 
static const int IntensityOverflow
 
static const int IntensityError
 

Detailed Description

[Attenuate] Linear conversion of intensity to attenuation level independent of carrier frequency.

Author
Jan Benda
Version
1.1
Options
  • line: the line on the attenuator
  • aodevice: the identifier analog output device
  • aochannel: the channel of the analog output device
  • intensityname: name of the intensity variable
  • intensityunit: unit of the intensity variable
  • intensityformat: format string for the intensity variable

Constructor & Destructor Documentation

LinearAttenuate ( void  )

Constructor.

References Attenuate::initOptions().

~LinearAttenuate ( void  )

Destructor.

Member Function Documentation

double gain ( void  ) const
void setGain ( double  gain)

Set the gain factor to gain.

References LinearAttenuate::gain().

Referenced by SetAttenuatorGain::main(), and LinearAttenuate::setGain().

double offset ( void  ) const

Returns the offset.

Referenced by LinearAttenuate::setOffset().

void setOffset ( double  offset)

Set the offset to offset.

References LinearAttenuate::offset().

Referenced by LinearAttenuate::setGain().

void setGain ( double  gain,
double  offset 
)

Set the gain factor to gain and the offset to offset.

References LinearAttenuate::setGain(), and LinearAttenuate::setOffset().

void setDeviceIdent ( const string &  ident)
virtual

Set the device and the config identifier string to ident.

References ConfigClass::setConfigIdent().

void notify ( void  )
virtual

Set the Gain and Offset variable if the config is changed.

void init ( void  )
virtual

Adds offset and gain to the info().

Reimplemented from Attenuate.

int decibel ( double  intensity,
double  frequency,
double &  db 
) const
protectedvirtual

Transform the requested intensity intensity for the carrier frequency frequency of the signal into db decibel which are used to set the attenuation level. If intensity is set to MuteIntensity, the attenuator is muted.

Implements Attenuate.

References Attenuate::MuteAttenuationLevel, and Attenuate::MuteIntensity.

void intensity ( double &  intens,
double  frequency,
double  decibel 
) const
protectedvirtual

Transform the attenuation level decibel for the carrier frequency frequency of the signal into the intesity intens. If decibel equals MuteAttenuationLevel, then intens returns MuteIntensity. This function is the inverse function of decibel().

Implements Attenuate.

References Attenuate::MuteAttenuationLevel, and Attenuate::MuteIntensity.


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