-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
132 lines (95 loc) · 2.67 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QProcess>
#include <QList>
#include <QStack>
#include <qepicspv.h>
#include "expert.h"
#include "logs.h"
#include "plots.h"
#include "client.h"
#include "macros.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_chkBoxInfIterations_stateChanged(int);
void on_btnStartCorrection_clicked();
void print_stdout();
void on_btnStopCorrection_clicked();
void on_correctionEnd(int);
void disableInputs();
void enableInputs();
void onNumIterationsInit(const QVariant &);
void onIncludeRfInit(const QVariant &);
void onApplyRegularizationInit(const QVariant &);
void onCorrectionStatusInit(const QVariant &);
void onCorrectionStatusChanged(const QVariant &);
void on_btnExpert_clicked();
void startLocalLogging();
void logLocalData();
void logDataSSH();
void on_btnHistoryLogs_clicked();
void checkRfOnlyRun();
void frequencyPvInit(const QVariant &);
void on_btnPlots_clicked();
void on_btnRemoveCorrection_clicked();
void saveCorrectorsAndRF();
void onStackLengthChanged(int);
signals:
void stackLengthChanged(int);
private:
Ui::MainWindow *ui;
const double thresholdFreq;
const QString remoteHost;
bool inf_iterations;
double currentFreq, prevFreq;
QString base_path;
QString data_path;
QString logs_path;
QString pm_path;
QFile* logFile;
QTimer* loggingTimer;
QEpicsPV* energy;
QEpicsPV* num_iterations;
QEpicsPV* num_singular_values;
QEpicsPV* correction_factor;
QEpicsPV* max_frequency_change;
QEpicsPV* max_current_change;
QEpicsPV* max_read_fail;
QEpicsPV* correction_status;
QEpicsPV* include_rf;
QEpicsPV* apply_regularization;
QEpicsPV* regularization_Param;
QEpicsPV* sampling_frequency;
QEpicsPV* getFrequency;
QEpicsPV* setFrequency;
QList<QEpicsPV*> getCorrectors_currents;
QList<QString> setCorrectors_currents;
QStack<std::array<double, 65>> correctionStack;
/*Expert References*/
QEpicsPV* rf_only;
QEpicsPV* debug_mode;
QEpicsPV* normalize_inputs;
QEpicsPV* scale_outputs;
QEpicsPV* control_algo;
QEpicsPV* estimation_algo;
/*Averaging Expert*/
QEpicsPV* window_size;
QEpicsPV* smoothing_factor;
QEpicsPV* avg_algo;
/*End Averaging Expert*/
QProcess* correction_process;
QProcess* logProcess;
Expert* expert;
Logs* historyLogs;
Plots* plots;
};
#endif // MAINWINDOW_H