SEPIA
Software documentation for the APEX SEPIA receivers
LocalOscillator Class Reference

A class to represent the local oscillator in the GUI. More...

#include <localoscillator.h>

Inherits QWidget.

Public Types

enum  Sideband { DSB = 0, LSB = 1, USB = 2 }
 This enum specifies the various sideband configurations. More...
 
enum  Polarity { NEGATIVE = 400, POSITIVE = 401 }
 This enum specifies possible polarities. More...
 

Public Slots

void reset ()
 reset the widget after a band de-selection
 
void setFrequency (double ghz)
 Setter function for commanded LO frequency. More...
 
void setSkyFrequency (double GHz)
 Set a new commanded sky frequency. More...
 
void setSB (LocalOscillator::Sideband sb)
 Set a new commanded sideband. More...
 
void setSideband (const QString &sb)
 Set a new commanded sideband given as string. More...
 
void setSynthGHz (double GHz)
 Set the commanded synthesizer frequency. More...
 
void setSynthdBm (double dbm)
 Set the commanded synthesizer signal strength. More...
 
void setRange (double lower, double upper)
 Specify tuning range of LO. More...
 
void setModified (bool flag)
 Setter function for the modified flag. More...
 
void tune ()
 Trigger LO tuning. More...
 
void setTuned (bool flag)
 Update actual values based on success of tuning. More...
 

Public Member Functions

double frequency () const
 Getter function for commanded LO frequency. More...
 
double skyFrequency (bool cmd=true) const
 Query the sky frequency. More...
 
Sideband SB (bool cmd=true) const
 Query the sideband. More...
 
double refFrequency (bool cmd=true) const
 Query the reference (i.e. synthesizer) frequency. More...
 
QString sideband () const
 Get sideband information as a string. More...
 
bool isTuned () const
 Query if LO is tuned. More...
 
bool isModified () const
 Query if commanded frequency requires re-tuning. More...
 
double lowerLimit () const
 Query the lower limit of the LO tuning range. More...
 
double upperLimit () const
 Query the upper limit of the LO tuning range. More...
 

Detailed Description

A class to represent the local oscillator in the GUI.

Member Enumeration Documentation

◆ Polarity

This enum specifies possible polarities.

Enumerator
NEGATIVE 

negative polarity

POSITIVE 

positive polarity

◆ Sideband

This enum specifies the various sideband configurations.

Note that DSB is actually not referenced in the code and is basically used as undefined.

Enumerator
DSB 

double side band

LSB 

lower side band

USB 

upper side band

Member Function Documentation

◆ frequency()

double LocalOscillator::frequency ( ) const

Getter function for commanded LO frequency.

Returns
the commanded LO frequency in GHz.

◆ isModified()

bool LocalOscillator::isModified ( ) const
inline

Query if commanded frequency requires re-tuning.

Returns
true or false (frequency is within range of PLL).

◆ isTuned()

bool LocalOscillator::isTuned ( ) const
inline

Query if LO is tuned.

Returns
true or false.

◆ lowerLimit()

double LocalOscillator::lowerLimit ( ) const
inline

Query the lower limit of the LO tuning range.

Returns
the lower limit of the LO tuning range in GHz.

◆ refFrequency()

double LocalOscillator::refFrequency ( bool  cmd = true) const

Query the reference (i.e. synthesizer) frequency.

Parameters
cmdif true return commanded value, else return actual value.
Returns
synthesizer frequency (commanded or actual) in GHz.

◆ SB()

LocalOscillator::Sideband LocalOscillator::SB ( bool  cmd = true) const

Query the sideband.

Parameters
cmdif true return commanded value, else return actual value.
Returns
commanded or actual sideband (LocalOscillator::LSB or LocalOscillato::USB).

◆ setFrequency

void LocalOscillator::setFrequency ( double  ghz)
slot

Setter function for commanded LO frequency.

This function will update the labels showing the LSB and USB sky frequencies as well as modify the commanded sky frequency, based on the value of the currently commanded sideband.

Parameters
ghzthe commanded LO frequency in GHz.

◆ setModified

void LocalOscillator::setModified ( bool  flag)
inlineslot

Setter function for the modified flag.

Parameters
flagtrue or false.

◆ setRange

void LocalOscillator::setRange ( double  lower,
double  upper 
)
slot

Specify tuning range of LO.

Parameters
lowerthe lower limit of the LO tuning range in GHz.
upperthe upper limit of the LO tuning range in GHz.

◆ setSB

void LocalOscillator::setSB ( LocalOscillator::Sideband  sb)
slot

Set a new commanded sideband.

This function will update the value shown by the spinbox.

Parameters
sbcommanded sideband (LocalOscillator::LSB or LocalOscillato::USB).

◆ setSideband

void LocalOscillator::setSideband ( const QString &  sb)
slot

Set a new commanded sideband given as string.

Parameters
sbstring holding "LSB" or "USB".

◆ setSkyFrequency

void LocalOscillator::setSkyFrequency ( double  GHz)
slot

Set a new commanded sky frequency.

This will calculate an LO frequency based on the currently commanded sideband, and will call setFrequency() with that value.

Parameters
GHzthe commanded sky frequency in GHz.

◆ setSynthdBm

void LocalOscillator::setSynthdBm ( double  dbm)
slot

Set the commanded synthesizer signal strength.

Parameters
dbmthe synthesizer signal strength in dBm

◆ setSynthGHz

void LocalOscillator::setSynthGHz ( double  GHz)
slot

Set the commanded synthesizer frequency.

Parameters
GHzthe new synthesizer frequency in GHz

◆ setTuned

void LocalOscillator::setTuned ( bool  flag)
slot

Update actual values based on success of tuning.

This function update actual values of LO and sky frequency as well as sideband information, based on success of tuning. In case of failure (return code is false), the actual LO and sky frequency will both be set to zero.

Parameters
flagtrue or false indicating success of LO tuning.

◆ sideband()

QString LocalOscillator::sideband ( ) const

Get sideband information as a string.

Returns
sideband as string "LSB" or "USB".

◆ skyFrequency()

double LocalOscillator::skyFrequency ( bool  cmd = true) const

Query the sky frequency.

Parameters
cmdif true return commanded value, else return actual value.
Returns
sky frequency (commanded or actual) in GHz.

◆ tune

void LocalOscillator::tune ( )
slot

Trigger LO tuning.

This function will emit the necessary signal (LOtuning(GHz)) to trigger an LO tuning.

◆ upperLimit()

double LocalOscillator::upperLimit ( ) const
inline

Query the upper limit of the LO tuning range.

Returns
the upper limit of the LO tuning range in GHz.

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