SEPIA
Software documentation for the APEX SEPIA receivers
lownoiseamplifier.h
1 /* Copyright 2017 Michael Olberg <michael.olberg@chalmers.se> */
2 #ifndef LOWNOISEAMPLIFIER_H
3 #define LOWNOISEAMPLIFIER_H
4 
5 #include <QWidget>
6 #include <QString>
7 #include <QDoubleSpinBox>
8 #include <QHBoxLayout>
9 #include <QVBoxLayout>
10 #include <QGridLayout>
11 #include <QLabel>
12 
13 #include "mixer.h"
14 #include "../property.h"
15 
16 class LNAstage : public QWidget
17 {
18  Q_OBJECT
19  Q_PROPERTY(float drainVoltage READ drainVoltage WRITE updateDrainVoltage)
20  Q_PROPERTY(float drainCurrent READ drainCurrent WRITE updateDrainCurrent)
21  Q_PROPERTY(float gateVoltage READ gateVoltage)
22  Q_PROPERTY(bool expertMode READ expertMode WRITE setExpertMode)
23 
24  public:
25  explicit LNAstage(LNA::Stage lna, QWidget *parent = 0);
26  ~LNAstage();
27 
28  float drainVoltage() const { return m_drainV.actual(); }
29  float drainCurrent() const { return m_drainC.actual(); }
30  float gateVoltage() const { return m_gateV; }
31  bool expertMode() const { return m_expert; }
32 
33  QLabel *stageLabel;
34  QLabel *drainV;
35  QLabel *drainC;
36  QLabel *gateV;
37 
38  public slots:
39  void updateDrainVoltage(float mV);
40  void setDrainVoltage(float mV);
41  void updateDrainCurrent(float mA);
42  void setDrainCurrent(float mA);
43  void updateGateVoltage(float mV);
44  void setExpertMode(bool flag);
45 
46  private:
47  Property<float> m_drainV;
48  Property<float> m_drainC;
49  float m_gateV;
50  const LNA::Stage m_lna;
51  bool m_expert;
52 };
53 
54 class LowNoiseAmplifier : public QWidget
55 {
56  Q_OBJECT
57  Q_PROPERTY(bool expertMode READ expertMode WRITE setExpertMode)
58 
59  public:
60  explicit LowNoiseAmplifier(Mixer::Polarization pol, Mixer::Element sis, QWidget *parent = 0);
61  ~LowNoiseAmplifier();
62  LNAstage *stage(LNA::Stage);
63  bool expertMode() const { return m_expert; }
64 
65  public slots:
66  void setExpertMode(bool flag);
67 
68  private:
69  LNAstage *m_stage[3];
70  const Mixer::Polarization m_pol;
71  const Mixer::Element m_sis;
72  bool m_expert;
73 };
74 
75 #endif // LOWNOISEAMPLIFIER_H
Stage
An enumeration for the stages of a low noise amplifier.
Definition: constants.h:35
Polarization
An enumeration for the two polarizations.
Definition: constants.h:9
Element
An enumeration for the two mixer elements in each polarization.
Definition: constants.h:17