7 #include <QActionGroup> 11 #include <QThreadPool> 16 #include <QPlainTextEdit> 17 #include <QStandardItemModel> 18 #include <QSortFilterProxyModel> 20 #include <QStringList> 21 #include <QProgressBar> 26 #include <QStateMachine> 38 #include "GUI/environment.h" 40 #include "GUI/atmosphereplot.h" 50 #include "logger_interface.h" 65 explicit SEPIA(QMainWindow *parent = 0);
74 QVariant &property(
int which,
bool cmd,
int sub = 0);
75 bool inRange(
double LOfreq);
77 bool tuningModified()
const;
79 double dewarPressure()
const {
return dewar_p; }
80 double dewarTemperature()
const {
return dewar_T; }
82 int bandInUse()
const;
113 void updateMonitorItem(
const QString &name, DWORD addr,
float value,
char unit,
int gain);
126 void showStatus(
const QString &msg,
int timeout = 5000);
128 void logScript(
const QString &msg);
130 double from,
double to,
int steps);
133 void machineStarted();
134 void machineStopped();
135 void machineFinished();
142 void enterFreqDialog();
149 void enterScanDialog();
151 void enterDefluxDialog();
157 void enableExpert(
bool flag);
165 void tableDialog(QAction *action);
167 void execMethod(ScpiRequest::Method method, QList<QVariant> params);
171 void sendUdpMessage(
Sepia::Channel band,
const QString &msg,
const QHostAddress host,
const quint16 port);
172 void cryostatUpdate(
double Ta,
double Tb,
double Tc,
double Td,
double p,
bool ups);
173 void cryoLoop(
double T);
186 void shutdownChannel();
187 void faultTriggered(Sepia::ErrorCode code);
188 void selectBand(QAction *action);
190 void startScanning(
bool flag =
true);
195 void selectMirrorPosition(QAction *action);
199 void enableGUIelements(
bool enable);
200 void enableExpertMode(
bool expert);
204 QVector<double> x, QVector<double> y, QVector<double> z,
205 const QString &xlab,
const QString &ylab);
206 void tunedSystem(
bool ok);
209 void tunedLO(
bool ok);
225 void filterMonitor(
const QString &expr);
226 void cartridgeStateChanged(Cartridge::InternalState s);
230 void channelInitialize(
bool withDeflux);
231 void tuningRequest(
double Hz);
232 void triggerScript();
236 void demagnetizeMixers(
bool p0s1,
bool p0s2,
bool p1s1,
bool p1s2);
237 void defluxMixerPairs(
bool p0,
bool p1);
238 void setCoilCurrents();
241 void cryoUpdate(
float,
float,
float,
float,
float);
257 org::apex::Sepia::LoggerInterface *logger;
270 void registerTypes();
271 void createFileMenu();
272 void createBandMenu();
273 void createTuneMenu();
274 void createToolsMenu();
275 void createMirrorMenu();
276 void createHelpMenu();
278 void setupStatusTab();
279 void setupMonitorTab();
281 void setupAtmosphereTab();
283 void connectToHardware();
286 QStringList mcChannels;
288 QList<QUdpSocket *> scpiSockets;
293 QActionGroup *bandSelection;
294 QActionGroup *mirrorSelection;
295 QActionGroup *tblSelection;
310 Sepia::ErrorCode lastError;
315 BackendSwitch *backendSwitch;
328 QAction *actionBand5;
329 QAction *actionBand7;
330 QAction *actionBand9;
332 QAction *actionInitialize;
333 QAction *actionReset;
334 QAction *actionShutdown;
336 QAction *actionSetFrequency;
337 QAction *actionTuneLO;
338 QAction *actionTuneMixer;
339 QAction *actionTuningTable;
345 QAction *actionDeflux;
346 QAction *actionCartridge;
347 QAction *actionIFswitch;
348 QAction *actionBEswitch;
349 QAction *actionAgilent;
350 QAction *actionScript;
351 QAction *actionExpert;
353 QAction *homeSelection;
354 QAction *band5Selection;
355 QAction *band7Selection;
356 QAction *band9Selection;
357 QAction *resetSelection;
360 QAction *actionAbout;
365 QWidget *atmosphereTab;
367 QTabWidget *tabWidget;
368 QTableView *mcTableView;
369 QLineEdit *mcTableFilter;
370 QSortFilterProxyModel *proxyModel;
371 QStandardItemModel *mcModel;
373 QPlainTextEdit *scpiLog;
374 QPlainTextEdit *scriptLog;
375 AtmospherePlot *atmosphere;
377 QStatusBar *statusbar;
378 QProgressBar *progress;
381 QStateMachine machine;
MirrorPosition
Possible positions for the selection mirror on the calibration unit.
Definition: calunit.h:31
The main class of the GUI application.
Definition: sepia.h:60
void updateProperty(int key, const QVariant &value, int sub=0)
Update a property.
Definition: sepia.cpp:703
Stage
An enumeration for the stages of a low noise amplifier.
Definition: constants.h:35
void showProgress(int percent)
Show progress via the status bar of the main window.
Definition: sepia.cpp:1579
A header file for commonly used constants.
A class to represent the local oscillator in the GUI.
Definition: localoscillator.h:26
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
A class to represent the phase lock loop in the GUI.
Definition: phaselockloop.h:19
A virtual class representing a device.
Definition: device.h:16
A virtual class representing a cartridge.
Definition: cartridge.h:267
A class to control the Acromag GP-I/O unit.
Definition: acromag.h:26
void showStatus(const QString &msg, int timeout=5000)
Show a message via the status bar of the main window.
Definition: sepia.cpp:1585
void updateMonitorItem(const QString &name, DWORD addr, float value, char unit, int gain)
Update the GUI with new data from the M&C unit (CANbus).
Definition: sepia.cpp:1521
A class to control the selection mirror of the calibration unit.
Definition: selectmirror.h:21
Sideband
This enum specifies the various sideband configurations.
Definition: localoscillator.h:42
A class for representing the state of the selection mirror via the GUI.
Definition: calunit.h:21
State
The State enum.
Definition: device.h:22
A class to represent a 2SB mixer in the GUI.
Definition: dualsidebandmixer.h:23
Channel
An enumeration for the three SEPIA channels (cartridges).
Definition: constants.h:66
A class to control the Agilent signal generator.
Definition: agilent.h:18
Device::State status()
Get current device status.
Definition: sepia.cpp:188
A virtual class representing a device.
void setStatus(Device::State state)
Set a new device status.
Definition: sepia.cpp:193