##// END OF EJS Templates
tmstatistics updated
leroy -
r74:98a2ff79bb0a default
parent child
Show More
@@ -1,1088 +1,1112
1 #include "tmstatistics.h"
1 #include "tmstatistics.h"
2 #include <QtWidgets>
2 #include <QtWidgets>
3 #include <QFontInfo>
3 #include <QFontInfo>
4 #include <stdio.h>
4 #include <stdio.h>
5 #include <QFileDialog>
5 #include <QFileDialog>
6
6
7 TMStatistics::TMStatistics(QWidget *parent) :
7 TMStatistics::TMStatistics(QWidget *parent) :
8 QWidget(parent)
8 QWidget(parent)
9 {
9 {
10 // Create Fonts
10 // Create Fonts
11 QFont font;
11 QFont font;
12 font = QFont(this->fontInfo().family(), STATISTICS_FONT_SIZE, QFont::Light);
12 font = QFont(this->fontInfo().family(), STATISTICS_FONT_SIZE, QFont::Light);
13
13
14 label_UNKNOWN = new QLabel("UNKNOWN");
14 label_UNKNOWN = new QLabel("UNKNOWN");
15 label_UNKNOWN_nb = new QLabel("-");
15 label_UNKNOWN_nb = new QLabel("-");
16 label_TC_LFR_UPDATE_TIME = new QLabel("TC_LFR_UPDATE_TIME");
16 label_TC_LFR_UPDATE_TIME = new QLabel("TC_LFR_UPDATE_TIME");
17 label_TC_LFR_UPDATE_TIME_nb = new QLabel("-");
17 label_TC_LFR_UPDATE_TIME_nb = new QLabel("-");
18
18
19 mainLayout = new QGridLayout();
19 mainLayout = new QGridLayout();
20 layout_stat = new QGridLayout(); // TM stastictics
20 layout_stat = new QGridLayout(); // TM stastictics
21 layout_NORM = new QGridLayout(); // TM_LFR_SCIENCE_NORMAL_
21 layout_NORM = new QGridLayout(); // TM_LFR_SCIENCE_NORMAL_
22 layout_BURST = new QGridLayout(); // TM_LFR_SCIENCE_BURST_
22 layout_BURST = new QGridLayout(); // TM_LFR_SCIENCE_BURST_
23 layout_SBM1 = new QGridLayout(); // TM_LFR_SCIENCE_SBM1_
23 layout_SBM1 = new QGridLayout(); // TM_LFR_SCIENCE_SBM1_
24 layout_SBM2 = new QGridLayout(); // TM_LFR_SCIENCE_SBM2_
24 layout_SBM2 = new QGridLayout(); // TM_LFR_SCIENCE_SBM2_
25 layout_last = new QGridLayout(); // last TM description
25 layout_last = new QGridLayout(); // last TM description
26 layout_record = new QVBoxLayout();
26 layout_record = new QVBoxLayout();
27
27
28 //***************
28 //***************
29 // TM_LFR_TC_EXE_
29 // TM_LFR_TC_EXE_
30 label_SUCC = new QLabel("SUCCESS");
30 label_SUCC = new QLabel("SUCCESS");
31 label_INCO = new QLabel("INCONSISTENT");
31 label_INCO = new QLabel("INCONSISTENT");
32 label_NOTE = new QLabel("NOT_EXECUTABLE");
32 label_NOTE = new QLabel("NOT_EXECUTABLE");
33 label_NOTI = new QLabel("NOT_IMPLEMENTED");
33 label_NOTI = new QLabel("NOT_IMPLEMENTED");
34 label_ERRO = new QLabel("ERROR");
34 label_ERRO = new QLabel("ERROR");
35 label_CORR = new QLabel("CORRUPTED");
35 label_CORR = new QLabel("CORRUPTED");
36 label_HK = new QLabel("TM_LFR_HK");
36 label_HK = new QLabel("TM_LFR_HK");
37 label_DUMP = new QLabel("TM_LFR_PARAMETER_DUMP");
37 label_DUMP = new QLabel("TM_LFR_PARAMETER_DUMP");
38 //
38 //
39 label_SUCC_nb = new QLabel("-");
39 label_SUCC_nb = new QLabel("-");
40 label_INCO_nb = new QLabel("-");
40 label_INCO_nb = new QLabel("-");
41 label_NOTE_nb = new QLabel("-");
41 label_NOTE_nb = new QLabel("-");
42 label_NOTI_nb = new QLabel("-");
42 label_NOTI_nb = new QLabel("-");
43 label_ERRO_nb = new QLabel("-");
43 label_ERRO_nb = new QLabel("-");
44 label_CORR_nb = new QLabel("-");
44 label_CORR_nb = new QLabel("-");
45 label_HK_nb = new QLabel("-");
45 label_HK_nb = new QLabel("-");
46 label_DUMP_nb = new QLabel("-");
46 label_DUMP_nb = new QLabel("-");
47
47
48 //***********************
48 //***********************
49 // TM_LFR_SCIENCE_NORMAL_
49 // TM_LFR_SCIENCE_NORMAL_
50 label_NORM_SWF_F0 = new QLabel("SWF_F0");
50 label_NORM_SWF_F0 = new QLabel("SWF_F0");
51 label_NORM_SWF_F1 = new QLabel("SWF_F1");
51 label_NORM_SWF_F1 = new QLabel("SWF_F1");
52 label_NORM_SWF_F2 = new QLabel("SWF_F2");
52 label_NORM_SWF_F2 = new QLabel("SWF_F2");
53 label_NORM_CWF_F3 = new QLabel("CWF_F3");
53 label_NORM_CWF_F3 = new QLabel("CWF_F3");
54 label_NORM_CWF_LONG_F3 = new QLabel("LONG_F3");
54 label_NORM_CWF_LONG_F3 = new QLabel("LONG_F3");
55 label_NORM_ASM_F0 = new QLabel("ASM_F0");
55 label_NORM_ASM_F0 = new QLabel("ASM_F0");
56 label_NORM_ASM_F1 = new QLabel("ASM_F1");
56 label_NORM_ASM_F1 = new QLabel("ASM_F1");
57 label_NORM_ASM_F2 = new QLabel("ASM_F2");
57 label_NORM_ASM_F2 = new QLabel("ASM_F2");
58 label_NORM_BP1_F0 = new QLabel("BP1_F0");
58 label_NORM_BP1_F0 = new QLabel("BP1_F0");
59 label_NORM_BP1_F1 = new QLabel("BP1_F1");
59 label_NORM_BP1_F1 = new QLabel("BP1_F1");
60 label_NORM_BP1_F2 = new QLabel("BP1_F2");
60 label_NORM_BP1_F2 = new QLabel("BP1_F2");
61 label_NORM_BP2_F0 = new QLabel("BP2_F0");
61 label_NORM_BP2_F0 = new QLabel("BP2_F0");
62 label_NORM_BP2_F1 = new QLabel("BP2_F1");
62 label_NORM_BP2_F1 = new QLabel("BP2_F1");
63 label_NORM_BP2_F2 = new QLabel("BP2_F2");
63 label_NORM_BP2_F2 = new QLabel("BP2_F2");
64 //
64 //
65 label_NORM_SWF_F0_nb = new QLabel("-");
65 label_NORM_SWF_F0_nb = new QLabel("-");
66 label_NORM_SWF_F1_nb = new QLabel("-");
66 label_NORM_SWF_F1_nb = new QLabel("-");
67 label_NORM_SWF_F2_nb = new QLabel("-");
67 label_NORM_SWF_F2_nb = new QLabel("-");
68 label_NORM_CWF_F3_nb = new QLabel("-");
68 label_NORM_CWF_F3_nb = new QLabel("-");
69 label_NORM_CWF_LONG_F3_nb = new QLabel("-");
69 label_NORM_CWF_LONG_F3_nb = new QLabel("-");
70 label_NORM_ASM_F0_nb = new QLabel("-");
70 label_NORM_ASM_F0_nb = new QLabel("-");
71 label_NORM_ASM_F1_nb = new QLabel("-");
71 label_NORM_ASM_F1_nb = new QLabel("-");
72 label_NORM_ASM_F2_nb = new QLabel("-");
72 label_NORM_ASM_F2_nb = new QLabel("-");
73 label_NORM_BP1_F0_nb = new QLabel("-");
73 label_NORM_BP1_F0_nb = new QLabel("-");
74 label_NORM_BP1_F1_nb = new QLabel("-");
74 label_NORM_BP1_F1_nb = new QLabel("-");
75 label_NORM_BP1_F2_nb = new QLabel("-");
75 label_NORM_BP1_F2_nb = new QLabel("-");
76 label_NORM_BP2_F0_nb = new QLabel("-");
76 label_NORM_BP2_F0_nb = new QLabel("-");
77 label_NORM_BP2_F1_nb = new QLabel("-");
77 label_NORM_BP2_F1_nb = new QLabel("-");
78 label_NORM_BP2_F2_nb = new QLabel("-");
78 label_NORM_BP2_F2_nb = new QLabel("-");
79
79
80 //**********************
80 //**********************
81 // TM_LFR_SCIENCE_BURST_
81 // TM_LFR_SCIENCE_BURST_
82 label_BURST_CWF_F2 = new QLabel("CWF_F2");
82 label_BURST_CWF_F2 = new QLabel("CWF_F2");
83 label_BURST_BP1_F0 = new QLabel("BP1_F0");
83 label_BURST_BP1_F0 = new QLabel("BP1_F0");
84 label_BURST_BP2_F0 = new QLabel("BP2_F0");
84 label_BURST_BP2_F0 = new QLabel("BP2_F0");
85 label_BURST_BP1_F1 = new QLabel("BP1_F1");
85 label_BURST_BP1_F1 = new QLabel("BP1_F1");
86 label_BURST_BP2_F1 = new QLabel("BP2_F1");
86 label_BURST_BP2_F1 = new QLabel("BP2_F1");
87 //
87 //
88 label_BURST_CWF_F2_nb = new QLabel("-");
88 label_BURST_CWF_F2_nb = new QLabel("-");
89 label_BURST_BP1_F0_nb = new QLabel("-");
89 label_BURST_BP1_F0_nb = new QLabel("-");
90 label_BURST_BP2_F0_nb = new QLabel("-");
90 label_BURST_BP2_F0_nb = new QLabel("-");
91 label_BURST_BP1_F1_nb = new QLabel("-");
91 label_BURST_BP1_F1_nb = new QLabel("-");
92 label_BURST_BP2_F1_nb = new QLabel("-");
92 label_BURST_BP2_F1_nb = new QLabel("-");
93
93
94 //*********************
94 //*********************
95 // TM_LFR_SCIENCE_SBM1_
95 // TM_LFR_SCIENCE_SBM1_
96 label_SBM1_CWF_F1 = new QLabel("CWF_F1");
96 label_SBM1_CWF_F1 = new QLabel("CWF_F1");
97 label_SBM1_BP1_F0 = new QLabel("BP1_F0");
97 label_SBM1_BP1_F0 = new QLabel("BP1_F0");
98 label_SBM1_BP2_F0 = new QLabel("BP2_F0");
98 label_SBM1_BP2_F0 = new QLabel("BP2_F0");
99 //
99 //
100 label_SBM1_CWF_F1_nb = new QLabel("-");
100 label_SBM1_CWF_F1_nb = new QLabel("-");
101 label_SBM1_BP1_F0_nb = new QLabel("-");
101 label_SBM1_BP1_F0_nb = new QLabel("-");
102 label_SBM1_BP2_F0_nb = new QLabel("-");
102 label_SBM1_BP2_F0_nb = new QLabel("-");
103
103
104 //*********************
104 //*********************
105 // TM_LFR_SCIENCE_SBM2_
105 // TM_LFR_SCIENCE_SBM2_
106 label_SBM2_CWF_F2 = new QLabel("CWF_F2");
106 label_SBM2_CWF_F2 = new QLabel("CWF_F2");
107 label_SBM2_BP1_F0 = new QLabel("BP1_F0");
107 label_SBM2_BP1_F0 = new QLabel("BP1_F0");
108 label_SBM2_BP2_F0 = new QLabel("BP2_F0");
108 label_SBM2_BP2_F0 = new QLabel("BP2_F0");
109 label_SBM2_BP1_F1 = new QLabel("BP1_F1");
109 label_SBM2_BP1_F1 = new QLabel("BP1_F1");
110 label_SBM2_BP2_F1 = new QLabel("BP2_F1");
110 label_SBM2_BP2_F1 = new QLabel("BP2_F1");
111 //
111 //
112 label_SBM2_CWF_F2_nb = new QLabel("-");
112 label_SBM2_CWF_F2_nb = new QLabel("-");
113 label_SBM2_BP1_F0_nb = new QLabel("-");
113 label_SBM2_BP1_F0_nb = new QLabel("-");
114 label_SBM2_BP2_F0_nb = new QLabel("-");
114 label_SBM2_BP2_F0_nb = new QLabel("-");
115 label_SBM2_BP1_F1_nb = new QLabel("-");
115 label_SBM2_BP1_F1_nb = new QLabel("-");
116 label_SBM2_BP2_F1_nb = new QLabel("-");
116 label_SBM2_BP2_F1_nb = new QLabel("-");
117
117
118 //********
118 //********
119 // LAST TM
119 // LAST TM
120 label_PID = new QLabel("PID");
120 label_PID = new QLabel("PID");
121 label_CAT = new QLabel("CAT");
121 label_CAT = new QLabel("CAT");
122 label_TYP = new QLabel("Type");
122 label_TYP = new QLabel("Type");
123 label_SUB = new QLabel("Subtype");
123 label_SUB = new QLabel("Subtype");
124 label_SID = new QLabel("SID");
124 label_SID = new QLabel("SID");
125 label_SIZ = new QLabel("Length");
125 label_SIZ = new QLabel("Length");
126 label_coarse_time = new QLabel("Coarse time: ");
126 label_coarse_time = new QLabel("Coarse time: ");
127 label_fine_time = new QLabel("Fine time: ");
127 label_fine_time = new QLabel("Fine time: ");
128 //
128 //
129 label_PID_is = new QLabel("-");
129 label_PID_is = new QLabel("-");
130 label_CAT_is = new QLabel("-");
130 label_CAT_is = new QLabel("-");
131 label_TYP_is = new QLabel("-");
131 label_TYP_is = new QLabel("-");
132 label_SUB_is = new QLabel("-");
132 label_SUB_is = new QLabel("-");
133 label_SID_is = new QLabel("-");
133 label_SID_is = new QLabel("-");
134 label_SIZ_is = new QLabel("-");
134 label_SIZ_is = new QLabel("-");
135 label_coarse_time_val = new QLabel("-");
135 label_coarse_time_val = new QLabel("-");
136 label_fine_time_val = new QLabel("-");
136 label_fine_time_val = new QLabel("-");
137
137
138 // QPushButton
138 // QPushButton
139 button_reset_stat = new QPushButton("reset stat");
139 button_reset_stat = new QPushButton("reset stat");
140 button_chooseDir = new QPushButton("choose dir");
140 button_chooseDir = new QPushButton("choose dir");
141
141
142 //QCheckBox
142 //QCheckBox
143 checkbox_packetLog = new QCheckBox("Log packets");
143 checkbox_packetLog = new QCheckBox("Log packets");
144 checkbox_packetRecording = new QCheckBox("Store packets (RAW)");
144 checkbox_packetRecording = new QCheckBox("Store packets (RAW)");
145 checkbox_CSVPacketRecording = new QCheckBox("Store Packets (CSV)");
145 checkbox_CSVPacketRecording = new QCheckBox("Store Packets (CSV)");
146 label_currentDir = new QLabel("Current Dir: -");
146 label_currentDir = new QLabel("Current Dir: -");
147
147
148 //**********
148 //**********
149 // QGroupBox
149 // QGroupBox
150 this->setStyleSheet("QGroupBox {border: 1px solid black; }");
150 this->setStyleSheet("QGroupBox {border: 1px solid black; }");
151
151
152 groupbox_stat = new QGroupBox("TM_LFR_TC_EXE_");
152 groupbox_stat = new QGroupBox("TM_LFR_TC_EXE_");
153 groupbox_NORM = new QGroupBox("TM_LFR_SCIENCE_NORMAL_");
153 groupbox_NORM = new QGroupBox("TM_LFR_SCIENCE_NORMAL_");
154 groupbox_BURST = new QGroupBox("TM_LFR_SCIENCE_BURST_");
154 groupbox_BURST = new QGroupBox("TM_LFR_SCIENCE_BURST_");
155 groupbox_SBM1 = new QGroupBox("TM_LFR_SCIENCE_SBM1_");
155 groupbox_SBM1 = new QGroupBox("TM_LFR_SCIENCE_SBM1_");
156 groupbox_SBM2 = new QGroupBox("TM_LFR_SCIENCE_SBM2_");
156 groupbox_SBM2 = new QGroupBox("TM_LFR_SCIENCE_SBM2_");
157 groupbox_last = new QGroupBox("Last TM received");
157 groupbox_last = new QGroupBox("Last TM received");
158 groupbox_record = new QGroupBox("Packet recording");
158 groupbox_record = new QGroupBox("Packet recording");
159
159
160 this->readSettings();
160 this->readSettings();
161 logFile = new QFile();
161 logFile = new QFile();
162 packetLogFile = new QFile();
162 packetLogFile = new QFile();
163 csvPacketRecordFile = new QFile();
163 csvPacketRecordFile = new QFile();
164 logFileEn = false;
164 logFileEn = false;
165 packetLogFileEn = false;
165 packetLogFileEn = false;
166 csvPacketRecordFileEn = false;
166 csvPacketRecordFileEn = false;
167
167
168 initConstants();
168 initConstants();
169
169
170 buildMonitor_NORM();
170 buildMonitor_NORM();
171 buildMonitor_BURST();
171 buildMonitor_BURST();
172 buildMonitor_SBM1();
172 buildMonitor_SBM1();
173 buildMonitor_SBM2();
173 buildMonitor_SBM2();
174 buildMonitor();
174 buildMonitor();
175
175
176 groupbox_stat->setFont(font);
176 groupbox_stat->setFont(font);
177 groupbox_NORM->setFont(font);
177 groupbox_NORM->setFont(font);
178 groupbox_BURST->setFont(font);
178 groupbox_BURST->setFont(font);
179 groupbox_SBM1->setFont(font);
179 groupbox_SBM1->setFont(font);
180 groupbox_SBM2->setFont(font);
180 groupbox_SBM2->setFont(font);
181 groupbox_last->setFont(font);
181 groupbox_last->setFont(font);
182 groupbox_record->setFont(font);
182 groupbox_record->setFont(font);
183
183
184 connect(this->button_reset_stat, SIGNAL(clicked()), this, SLOT(resetStatistics()));
184 connect(this->button_reset_stat, SIGNAL(clicked()), this, SLOT(resetStatistics()));
185 connect(this->button_chooseDir, SIGNAL(clicked()), this, SLOT(chooseDir()));
185 connect(this->button_chooseDir, SIGNAL(clicked()), this, SLOT(chooseDir()));
186
186
187 connect(this->checkbox_packetLog, SIGNAL(stateChanged(int)),
187 connect(this->checkbox_packetLog, SIGNAL(stateChanged(int)),
188 this, SLOT(logPackets(int)));
188 this, SLOT(logPackets(int)));
189 connect(this->checkbox_packetRecording, SIGNAL(stateChanged(int)),
189 connect(this->checkbox_packetRecording, SIGNAL(stateChanged(int)),
190 this, SLOT(storePackets(int)));
190 this, SLOT(storePackets(int)));
191 connect(this->checkbox_CSVPacketRecording, SIGNAL(stateChanged(int)),
191 connect(this->checkbox_CSVPacketRecording, SIGNAL(stateChanged(int)),
192 this, SLOT(storeCSVPackets(int)));
192 this, SLOT(storeCSVPackets(int)));
193 }
193 }
194
194
195 TMStatistics::~TMStatistics()
195 TMStatistics::~TMStatistics()
196 {
196 {
197 this->writeSettings();
197 this->writeSettings();
198 }
198 }
199
199
200 void TMStatistics::initConstants()
200 void TMStatistics::initConstants()
201 {
201 {
202 UNKNOWN_nb = 0;
202 UNKNOWN_nb = 0;
203 TC_LFR_UPDATE_TIME_nb = 0;
203 TC_LFR_UPDATE_TIME_nb = 0;
204
204
205 // TM_LFR_TC_EXE_
205 // TM_LFR_TC_EXE_
206 SUCC_nb = 0;
206 SUCC_nb = 0;
207 INCO_nb = 0;
207 INCO_nb = 0;
208 NOTE_nb = 0;
208 NOTE_nb = 0;
209 NOTI_nb = 0;
209 NOTI_nb = 0;
210 ERRO_nb = 0;
210 ERRO_nb = 0;
211 CORR_nb = 0;
211 CORR_nb = 0;
212 HK_nb = 0;
212 HK_nb = 0;
213 DUMP_nb = 0;
213 DUMP_nb = 0;
214
214
215 // TM_LFR_SCIENCE_NORMAL_
215 // TM_LFR_SCIENCE_NORMAL_
216 NORM_SWF_F0_nb = 0;
216 NORM_SWF_F0_nb = 0;
217 NORM_SWF_F1_nb = 0;
217 NORM_SWF_F1_nb = 0;
218 NORM_SWF_F2_nb = 0;
218 NORM_SWF_F2_nb = 0;
219 NORM_CWF_F3_nb = 0;
219 NORM_CWF_F3_nb = 0;
220 NORM_CWF_LONG_F3_nb = 0;
220 NORM_CWF_LONG_F3_nb = 0;
221 NORM_ASM_F0_nb = 0;
221 NORM_ASM_F0_nb = 0;
222 NORM_ASM_F1_nb = 0;
222 NORM_ASM_F1_nb = 0;
223 NORM_ASM_F2_nb = 0;
223 NORM_ASM_F2_nb = 0;
224 NORM_BP1_F0_nb = 0;
224 NORM_BP1_F0_nb = 0;
225 NORM_BP1_F1_nb = 0;
225 NORM_BP1_F1_nb = 0;
226 NORM_BP1_F2_nb = 0;
226 NORM_BP1_F2_nb = 0;
227 NORM_BP2_F0_nb = 0;
227 NORM_BP2_F0_nb = 0;
228 NORM_BP2_F1_nb = 0;
228 NORM_BP2_F1_nb = 0;
229 NORM_BP2_F2_nb = 0;
229 NORM_BP2_F2_nb = 0;
230
230
231 BURST_CWF_F2_nb = 0;
231 BURST_CWF_F2_nb = 0;
232 BURST_BP1_F0_nb = 0;
232 BURST_BP1_F0_nb = 0;
233 BURST_BP2_F0_nb = 0;
233 BURST_BP2_F0_nb = 0;
234 BURST_BP1_F1_nb = 0;
234 BURST_BP1_F1_nb = 0;
235 BURST_BP2_F1_nb = 0;
235 BURST_BP2_F1_nb = 0;
236 SBM1_CWF_F1_nb = 0;
236 SBM1_CWF_F1_nb = 0;
237 SBM1_BP1_F0_nb = 0;
237 SBM1_BP1_F0_nb = 0;
238 SBM1_BP2_F0_nb = 0;
238 SBM1_BP2_F0_nb = 0;
239 SBM2_CWF_F2_nb = 0;
239 SBM2_CWF_F2_nb = 0;
240 SBM2_BP1_F0_nb = 0;
240 SBM2_BP1_F0_nb = 0;
241 SBM2_BP2_F0_nb = 0;
241 SBM2_BP2_F0_nb = 0;
242 SBM2_BP1_F1_nb = 0;
242 SBM2_BP1_F1_nb = 0;
243 SBM2_BP2_F1_nb = 0;
243 SBM2_BP2_F1_nb = 0;
244 }
244 }
245
245
246 void TMStatistics::buildMonitor_NORM()
246 void TMStatistics::buildMonitor_NORM()
247 {
247 {
248 layout_NORM->addWidget(label_NORM_SWF_F0, 0, 0, 1, 1);
248 layout_NORM->addWidget(label_NORM_SWF_F0, 0, 0, 1, 1);
249 layout_NORM->addWidget(label_NORM_SWF_F1, 1, 0, 1, 1);
249 layout_NORM->addWidget(label_NORM_SWF_F1, 1, 0, 1, 1);
250 layout_NORM->addWidget(label_NORM_SWF_F2, 2, 0, 1, 1);
250 layout_NORM->addWidget(label_NORM_SWF_F2, 2, 0, 1, 1);
251 layout_NORM->addWidget(label_NORM_CWF_F3, 3, 0, 1, 1);
251 layout_NORM->addWidget(label_NORM_CWF_F3, 3, 0, 1, 1);
252 //
252 //
253 layout_NORM->addWidget(label_NORM_SWF_F0_nb, 0, 1, 1, 1);
253 layout_NORM->addWidget(label_NORM_SWF_F0_nb, 0, 1, 1, 1);
254 layout_NORM->addWidget(label_NORM_SWF_F1_nb, 1, 1, 1, 1);
254 layout_NORM->addWidget(label_NORM_SWF_F1_nb, 1, 1, 1, 1);
255 layout_NORM->addWidget(label_NORM_SWF_F2_nb, 2, 1, 1, 1);
255 layout_NORM->addWidget(label_NORM_SWF_F2_nb, 2, 1, 1, 1);
256 layout_NORM->addWidget(label_NORM_CWF_F3_nb, 3, 1, 1, 1);
256 layout_NORM->addWidget(label_NORM_CWF_F3_nb, 3, 1, 1, 1);
257 //
257 //
258 layout_NORM->addWidget(label_NORM_ASM_F0, 4, 0, 1, 1);
258 layout_NORM->addWidget(label_NORM_ASM_F0, 4, 0, 1, 1);
259 layout_NORM->addWidget(label_NORM_ASM_F1, 5, 0, 1, 1);
259 layout_NORM->addWidget(label_NORM_ASM_F1, 5, 0, 1, 1);
260 layout_NORM->addWidget(label_NORM_ASM_F2, 6, 0, 1, 1);
260 layout_NORM->addWidget(label_NORM_ASM_F2, 6, 0, 1, 1);
261 //
261 //
262 layout_NORM->addWidget(label_NORM_ASM_F0_nb, 4, 1, 1, 1);
262 layout_NORM->addWidget(label_NORM_ASM_F0_nb, 4, 1, 1, 1);
263 layout_NORM->addWidget(label_NORM_ASM_F1_nb, 5, 1, 1, 1);
263 layout_NORM->addWidget(label_NORM_ASM_F1_nb, 5, 1, 1, 1);
264 layout_NORM->addWidget(label_NORM_ASM_F2_nb, 6, 1, 1, 1);
264 layout_NORM->addWidget(label_NORM_ASM_F2_nb, 6, 1, 1, 1);
265 //
265 //
266 layout_NORM->addWidget(label_NORM_BP1_F0, 0, 2, 1, 1);
266 layout_NORM->addWidget(label_NORM_BP1_F0, 0, 2, 1, 1);
267 layout_NORM->addWidget(label_NORM_BP1_F1, 1, 2, 1, 1);
267 layout_NORM->addWidget(label_NORM_BP1_F1, 1, 2, 1, 1);
268 layout_NORM->addWidget(label_NORM_BP1_F2, 2, 2, 1, 1);
268 layout_NORM->addWidget(label_NORM_BP1_F2, 2, 2, 1, 1);
269 layout_NORM->addWidget(label_NORM_CWF_LONG_F3, 3, 2, 1, 1);
269 layout_NORM->addWidget(label_NORM_CWF_LONG_F3, 3, 2, 1, 1);
270 layout_NORM->addWidget(label_NORM_BP2_F0, 4, 2, 1, 1);
270 layout_NORM->addWidget(label_NORM_BP2_F0, 4, 2, 1, 1);
271 layout_NORM->addWidget(label_NORM_BP2_F1, 5, 2, 1, 1);
271 layout_NORM->addWidget(label_NORM_BP2_F1, 5, 2, 1, 1);
272 layout_NORM->addWidget(label_NORM_BP2_F2, 6, 2, 1, 1);
272 layout_NORM->addWidget(label_NORM_BP2_F2, 6, 2, 1, 1);
273 //
273 //
274 layout_NORM->addWidget(label_NORM_BP1_F0_nb, 0, 3, 1, 1);
274 layout_NORM->addWidget(label_NORM_BP1_F0_nb, 0, 3, 1, 1);
275 layout_NORM->addWidget(label_NORM_BP1_F1_nb, 1, 3, 1, 1);
275 layout_NORM->addWidget(label_NORM_BP1_F1_nb, 1, 3, 1, 1);
276 layout_NORM->addWidget(label_NORM_BP1_F2_nb, 2, 3, 1, 1);
276 layout_NORM->addWidget(label_NORM_BP1_F2_nb, 2, 3, 1, 1);
277 layout_NORM->addWidget(label_NORM_CWF_LONG_F3_nb, 3, 3, 1, 1);
277 layout_NORM->addWidget(label_NORM_CWF_LONG_F3_nb, 3, 3, 1, 1);
278 layout_NORM->addWidget(label_NORM_BP2_F0_nb, 4, 3, 1, 1);
278 layout_NORM->addWidget(label_NORM_BP2_F0_nb, 4, 3, 1, 1);
279 layout_NORM->addWidget(label_NORM_BP2_F1_nb, 5, 3, 1, 1);
279 layout_NORM->addWidget(label_NORM_BP2_F1_nb, 5, 3, 1, 1);
280 layout_NORM->addWidget(label_NORM_BP2_F2_nb, 6, 3, 1, 1);
280 layout_NORM->addWidget(label_NORM_BP2_F2_nb, 6, 3, 1, 1);
281 }
281 }
282
282
283 void TMStatistics::buildMonitor_BURST()
283 void TMStatistics::buildMonitor_BURST()
284 {
284 {
285 layout_BURST->addWidget(label_BURST_CWF_F2, 0, 0, 1, 1);
285 layout_BURST->addWidget(label_BURST_CWF_F2, 0, 0, 1, 1);
286 layout_BURST->addWidget(label_BURST_BP1_F0, 1, 0, 1, 1);
286 layout_BURST->addWidget(label_BURST_BP1_F0, 1, 0, 1, 1);
287 layout_BURST->addWidget(label_BURST_BP2_F0, 2, 0, 1, 1);
287 layout_BURST->addWidget(label_BURST_BP2_F0, 2, 0, 1, 1);
288 layout_BURST->addWidget(label_BURST_BP1_F1, 3, 0, 1, 1);
288 layout_BURST->addWidget(label_BURST_BP1_F1, 3, 0, 1, 1);
289 layout_BURST->addWidget(label_BURST_BP2_F1, 4, 0, 1, 1);
289 layout_BURST->addWidget(label_BURST_BP2_F1, 4, 0, 1, 1);
290 //
290 //
291 layout_BURST->addWidget(label_BURST_CWF_F2_nb, 0, 1, 1, 1);
291 layout_BURST->addWidget(label_BURST_CWF_F2_nb, 0, 1, 1, 1);
292 layout_BURST->addWidget(label_BURST_BP1_F0_nb, 1, 1, 1, 1);
292 layout_BURST->addWidget(label_BURST_BP1_F0_nb, 1, 1, 1, 1);
293 layout_BURST->addWidget(label_BURST_BP2_F0_nb, 2, 1, 1, 1);
293 layout_BURST->addWidget(label_BURST_BP2_F0_nb, 2, 1, 1, 1);
294 layout_BURST->addWidget(label_BURST_BP1_F1_nb, 3, 1, 1, 1);
294 layout_BURST->addWidget(label_BURST_BP1_F1_nb, 3, 1, 1, 1);
295 layout_BURST->addWidget(label_BURST_BP2_F1_nb, 4, 1, 1, 1);
295 layout_BURST->addWidget(label_BURST_BP2_F1_nb, 4, 1, 1, 1);
296 //
296 //
297 layout_BURST->setRowStretch(5, 1);
297 layout_BURST->setRowStretch(5, 1);
298 layout_BURST->setColumnStretch(2,1);
298 layout_BURST->setColumnStretch(2,1);
299 }
299 }
300
300
301 void TMStatistics::buildMonitor_SBM1()
301 void TMStatistics::buildMonitor_SBM1()
302 {
302 {
303 layout_SBM1->addWidget(label_SBM1_CWF_F1, 0, 0, 1, 1);
303 layout_SBM1->addWidget(label_SBM1_CWF_F1, 0, 0, 1, 1);
304 layout_SBM1->addWidget(label_SBM1_BP1_F0, 1, 0, 1, 1);
304 layout_SBM1->addWidget(label_SBM1_BP1_F0, 1, 0, 1, 1);
305 layout_SBM1->addWidget(label_SBM1_BP2_F0, 2, 0, 1, 1);
305 layout_SBM1->addWidget(label_SBM1_BP2_F0, 2, 0, 1, 1);
306 //
306 //
307 layout_SBM1->addWidget(label_SBM1_CWF_F1_nb, 0, 1, 1, 1);
307 layout_SBM1->addWidget(label_SBM1_CWF_F1_nb, 0, 1, 1, 1);
308 layout_SBM1->addWidget(label_SBM1_BP1_F0_nb, 1, 1, 1, 1);
308 layout_SBM1->addWidget(label_SBM1_BP1_F0_nb, 1, 1, 1, 1);
309 layout_SBM1->addWidget(label_SBM1_BP2_F0_nb, 2, 1, 1, 1);
309 layout_SBM1->addWidget(label_SBM1_BP2_F0_nb, 2, 1, 1, 1);
310 //
310 //
311 layout_SBM1->setRowStretch(3, 1);
311 layout_SBM1->setRowStretch(3, 1);
312 layout_SBM1->setColumnStretch(2,1);
312 layout_SBM1->setColumnStretch(2,1);
313 }
313 }
314
314
315 void TMStatistics::buildMonitor_SBM2()
315 void TMStatistics::buildMonitor_SBM2()
316 {
316 {
317 layout_SBM2->addWidget(label_SBM2_CWF_F2, 0, 0, 1, 1);
317 layout_SBM2->addWidget(label_SBM2_CWF_F2, 0, 0, 1, 1);
318 layout_SBM2->addWidget(label_SBM2_BP1_F0, 1, 0, 1, 1);
318 layout_SBM2->addWidget(label_SBM2_BP1_F0, 1, 0, 1, 1);
319 layout_SBM2->addWidget(label_SBM2_BP2_F0, 2, 0, 1, 1);
319 layout_SBM2->addWidget(label_SBM2_BP2_F0, 2, 0, 1, 1);
320 layout_SBM2->addWidget(label_SBM2_BP1_F1, 3, 0, 1, 1);
320 layout_SBM2->addWidget(label_SBM2_BP1_F1, 3, 0, 1, 1);
321 layout_SBM2->addWidget(label_SBM2_BP2_F1, 4, 0, 1, 1);
321 layout_SBM2->addWidget(label_SBM2_BP2_F1, 4, 0, 1, 1);
322 //
322 //
323 layout_SBM2->addWidget(label_SBM2_CWF_F2_nb, 0, 1, 1, 1);
323 layout_SBM2->addWidget(label_SBM2_CWF_F2_nb, 0, 1, 1, 1);
324 layout_SBM2->addWidget(label_SBM2_BP1_F0_nb, 1, 1, 1, 1);
324 layout_SBM2->addWidget(label_SBM2_BP1_F0_nb, 1, 1, 1, 1);
325 layout_SBM2->addWidget(label_SBM2_BP2_F0_nb, 2, 1, 1, 1);
325 layout_SBM2->addWidget(label_SBM2_BP2_F0_nb, 2, 1, 1, 1);
326 layout_SBM2->addWidget(label_SBM2_BP1_F1_nb, 3, 1, 1, 1);
326 layout_SBM2->addWidget(label_SBM2_BP1_F1_nb, 3, 1, 1, 1);
327 layout_SBM2->addWidget(label_SBM2_BP2_F1_nb, 4, 1, 1, 1);
327 layout_SBM2->addWidget(label_SBM2_BP2_F1_nb, 4, 1, 1, 1);
328 //
328 //
329 layout_SBM2->setRowStretch(5, 1);
329 layout_SBM2->setRowStretch(5, 1);
330 layout_SBM2->setColumnStretch(2,1);
330 layout_SBM2->setColumnStretch(2,1);
331 }
331 }
332
332
333 void TMStatistics::buildMonitor()
333 void TMStatistics::buildMonitor()
334 {
334 {
335 //***************
335 //***************
336 // TM_LFR_TC_EXE_
336 // TM_LFR_TC_EXE_
337 layout_stat->addWidget(label_SUCC, 0, 0, 1, 1);
337 layout_stat->addWidget(label_SUCC, 0, 0, 1, 1);
338 layout_stat->addWidget(label_INCO, 1, 0, 1, 1);
338 layout_stat->addWidget(label_INCO, 1, 0, 1, 1);
339 layout_stat->addWidget(label_NOTE, 2, 0, 1, 1);
339 layout_stat->addWidget(label_NOTE, 2, 0, 1, 1);
340 layout_stat->addWidget(label_NOTI, 3, 0, 1, 1);
340 layout_stat->addWidget(label_NOTI, 3, 0, 1, 1);
341 layout_stat->addWidget(label_ERRO, 4, 0, 1, 1);
341 layout_stat->addWidget(label_ERRO, 4, 0, 1, 1);
342 layout_stat->addWidget(label_CORR, 5, 0, 1, 1);
342 layout_stat->addWidget(label_CORR, 5, 0, 1, 1);
343 layout_stat->addWidget(label_HK, 6, 0, 1, 1);
343 layout_stat->addWidget(label_HK, 6, 0, 1, 1);
344 layout_stat->addWidget(label_DUMP, 7, 0, 1, 1);
344 layout_stat->addWidget(label_DUMP, 7, 0, 1, 1);
345 //
345 //
346 layout_stat->addWidget(label_SUCC_nb, 0, 1, 1, 1);
346 layout_stat->addWidget(label_SUCC_nb, 0, 1, 1, 1);
347 layout_stat->addWidget(label_INCO_nb, 1, 1, 1, 1);
347 layout_stat->addWidget(label_INCO_nb, 1, 1, 1, 1);
348 layout_stat->addWidget(label_NOTE_nb, 2, 1, 1, 1);
348 layout_stat->addWidget(label_NOTE_nb, 2, 1, 1, 1);
349 layout_stat->addWidget(label_NOTI_nb, 3, 1, 1, 1);
349 layout_stat->addWidget(label_NOTI_nb, 3, 1, 1, 1);
350 layout_stat->addWidget(label_ERRO_nb, 4, 1, 1, 1);
350 layout_stat->addWidget(label_ERRO_nb, 4, 1, 1, 1);
351 layout_stat->addWidget(label_CORR_nb, 5, 1, 1, 1);
351 layout_stat->addWidget(label_CORR_nb, 5, 1, 1, 1);
352 layout_stat->addWidget(label_HK_nb, 6, 1, 1, 1);
352 layout_stat->addWidget(label_HK_nb, 6, 1, 1, 1);
353 layout_stat->addWidget(label_DUMP_nb, 7, 1, 1, 1);
353 layout_stat->addWidget(label_DUMP_nb, 7, 1, 1, 1);
354
354
355 //********
355 //********
356 // LAST TM
356 // LAST TM
357 layout_last->addWidget(label_PID, 0, 0, 1, 1);
357 layout_last->addWidget(label_PID, 0, 0, 1, 1);
358 layout_last->addWidget(label_CAT, 0, 1, 1, 1);
358 layout_last->addWidget(label_CAT, 0, 1, 1, 1);
359 layout_last->addWidget(label_TYP, 0, 2, 1, 1);
359 layout_last->addWidget(label_TYP, 0, 2, 1, 1);
360 layout_last->addWidget(label_SUB, 0, 3, 1, 1);
360 layout_last->addWidget(label_SUB, 0, 3, 1, 1);
361 layout_last->addWidget(label_SID, 0, 4, 1, 1);
361 layout_last->addWidget(label_SID, 0, 4, 1, 1);
362 layout_last->addWidget(label_SIZ, 0, 5, 1, 1);
362 layout_last->addWidget(label_SIZ, 0, 5, 1, 1);
363 //
363 //
364 layout_last->addWidget(label_PID_is, 1, 0, 1, 1);
364 layout_last->addWidget(label_PID_is, 1, 0, 1, 1);
365 layout_last->addWidget(label_CAT_is, 1, 1, 1, 1);
365 layout_last->addWidget(label_CAT_is, 1, 1, 1, 1);
366 layout_last->addWidget(label_TYP_is, 1, 2, 1, 1);
366 layout_last->addWidget(label_TYP_is, 1, 2, 1, 1);
367 layout_last->addWidget(label_SUB_is, 1, 3, 1, 1);
367 layout_last->addWidget(label_SUB_is, 1, 3, 1, 1);
368 layout_last->addWidget(label_SID_is, 1, 4, 1, 1);
368 layout_last->addWidget(label_SID_is, 1, 4, 1, 1);
369 layout_last->addWidget(label_SIZ_is, 1, 5, 1, 1);
369 layout_last->addWidget(label_SIZ_is, 1, 5, 1, 1);
370 //
370 //
371 layout_last->addWidget(label_coarse_time, 2, 0, 1, 1);
371 layout_last->addWidget(label_coarse_time, 2, 0, 1, 1);
372 layout_last->addWidget(label_coarse_time_val, 2, 1, 1, 1);
372 layout_last->addWidget(label_coarse_time_val, 2, 1, 1, 1);
373 layout_last->addWidget(label_fine_time, 2, 2, 1, 1);
373 layout_last->addWidget(label_fine_time, 2, 2, 1, 1);
374 layout_last->addWidget(label_fine_time_val, 2, 3, 1, 1);
374 layout_last->addWidget(label_fine_time_val, 2, 3, 1, 1);
375 //
375 //
376 layout_last->addWidget(label_UNKNOWN, 3, 0, 1, 1);
376 layout_last->addWidget(label_UNKNOWN, 3, 0, 1, 1);
377 layout_last->addWidget(label_UNKNOWN_nb, 3, 1, 1, 1);
377 layout_last->addWidget(label_UNKNOWN_nb, 3, 1, 1, 1);
378 layout_last->addWidget(label_TC_LFR_UPDATE_TIME, 3, 2, 1, 1);
378 layout_last->addWidget(label_TC_LFR_UPDATE_TIME, 3, 2, 1, 1);
379 layout_last->addWidget(label_TC_LFR_UPDATE_TIME_nb, 3, 3, 1, 1);
379 layout_last->addWidget(label_TC_LFR_UPDATE_TIME_nb, 3, 3, 1, 1);
380
380
381 layout_record->addWidget(checkbox_packetLog);
381 layout_record->addWidget(checkbox_packetLog);
382 layout_record->addWidget(checkbox_packetRecording);
382 layout_record->addWidget(checkbox_packetRecording);
383 layout_record->addWidget(checkbox_CSVPacketRecording);
383 layout_record->addWidget(checkbox_CSVPacketRecording);
384 layout_record->addWidget(button_chooseDir);
384 layout_record->addWidget(button_chooseDir);
385 layout_record->addWidget(label_currentDir);
385 layout_record->addWidget(label_currentDir);
386 layout_record->insertStretch(4, 1);
386 layout_record->insertStretch(4, 1);
387
387
388 //***********
388 //***********
389 // groupboxes
389 // groupboxes
390 groupbox_stat->setLayout(layout_stat);
390 groupbox_stat->setLayout(layout_stat);
391 groupbox_NORM->setLayout(layout_NORM);
391 groupbox_NORM->setLayout(layout_NORM);
392 groupbox_BURST->setLayout(layout_BURST);
392 groupbox_BURST->setLayout(layout_BURST);
393 groupbox_SBM1->setLayout(layout_SBM1);
393 groupbox_SBM1->setLayout(layout_SBM1);
394 groupbox_SBM2->setLayout(layout_SBM2);
394 groupbox_SBM2->setLayout(layout_SBM2);
395 groupbox_last->setLayout(layout_last);
395 groupbox_last->setLayout(layout_last);
396 groupbox_record->setLayout(layout_record);
396 groupbox_record->setLayout(layout_record);
397 //
397 //
398 mainLayout->addWidget(groupbox_stat, 0, 0, 1, 1);
398 mainLayout->addWidget(groupbox_stat, 0, 0, 1, 1);
399 mainLayout->addWidget(groupbox_NORM, 1, 0, 1, 1);
399 mainLayout->addWidget(groupbox_NORM, 1, 0, 1, 1);
400 mainLayout->addWidget(groupbox_last, 2, 0, 1, 3);
400 mainLayout->addWidget(groupbox_last, 2, 0, 1, 3);
401 mainLayout->addWidget(groupbox_SBM1, 0, 1, 1, 1);
401 mainLayout->addWidget(groupbox_SBM1, 0, 1, 1, 1);
402 mainLayout->addWidget(groupbox_SBM2, 0, 2, 1, 1);
402 mainLayout->addWidget(groupbox_SBM2, 0, 2, 1, 1);
403 mainLayout->addWidget(groupbox_BURST, 1, 1, 1, 1);
403 mainLayout->addWidget(groupbox_BURST, 1, 1, 1, 1);
404 mainLayout->addWidget(groupbox_record, 1, 2, 1, 1);
404 mainLayout->addWidget(groupbox_record, 1, 2, 1, 1);
405 mainLayout->addWidget(button_reset_stat, 3, 0, 1, 3);
405 mainLayout->addWidget(button_reset_stat, 3, 0, 1, 3);
406 mainLayout->setColumnStretch(3, 1);
406 mainLayout->setColumnStretch(3, 1);
407 mainLayout->setRowStretch(4, 1);
407 mainLayout->setRowStretch(4, 1);
408 //
408 //
409 this->setLayout(mainLayout);
409 this->setLayout(mainLayout);
410 }
410 }
411
411
412 void TMStatistics::resetStatistics()
412 void TMStatistics::resetStatistics()
413 {
413 {
414 initConstants();
414 initConstants();
415 //
415 //
416 label_UNKNOWN_nb->setText("-");
416 label_UNKNOWN_nb->setText("-");
417 label_TC_LFR_UPDATE_TIME_nb->setText("-");
417 label_TC_LFR_UPDATE_TIME_nb->setText("-");
418 label_SUCC_nb->setText("-");
418 label_SUCC_nb->setText("-");
419 label_INCO_nb->setText("-");
419 label_INCO_nb->setText("-");
420 label_NOTE_nb->setText("-");
420 label_NOTE_nb->setText("-");
421 label_NOTI_nb->setText("-");
421 label_NOTI_nb->setText("-");
422 label_ERRO_nb->setText("-");
422 label_ERRO_nb->setText("-");
423 label_CORR_nb->setText("-");
423 label_CORR_nb->setText("-");
424 label_HK_nb->setText("-");
424 label_HK_nb->setText("-");
425 label_DUMP_nb->setText("-");
425 label_DUMP_nb->setText("-");
426 //
426 //
427 label_NORM_SWF_F0_nb->setText("-");
427 label_NORM_SWF_F0_nb->setText("-");
428 label_NORM_SWF_F1_nb->setText("-");
428 label_NORM_SWF_F1_nb->setText("-");
429 label_NORM_SWF_F2_nb->setText("-");
429 label_NORM_SWF_F2_nb->setText("-");
430 label_NORM_CWF_F3_nb->setText("-");
430 label_NORM_CWF_F3_nb->setText("-");
431 label_NORM_CWF_LONG_F3_nb->setText("-");
431 label_NORM_CWF_LONG_F3_nb->setText("-");
432 label_NORM_BP1_F0_nb->setText("-");
432 label_NORM_BP1_F0_nb->setText("-");
433 label_NORM_BP1_F1_nb->setText("-");
433 label_NORM_BP1_F1_nb->setText("-");
434 label_NORM_BP1_F2_nb->setText("-");
434 label_NORM_BP1_F2_nb->setText("-");
435 label_NORM_BP2_F0_nb->setText("-");
435 label_NORM_BP2_F0_nb->setText("-");
436 label_NORM_BP2_F1_nb->setText("-");
436 label_NORM_BP2_F1_nb->setText("-");
437 label_NORM_BP2_F2_nb->setText("-");
437 label_NORM_BP2_F2_nb->setText("-");
438 label_NORM_ASM_F0_nb->setText("-");
438 label_NORM_ASM_F0_nb->setText("-");
439 label_NORM_ASM_F1_nb->setText("-");
439 label_NORM_ASM_F1_nb->setText("-");
440 label_NORM_ASM_F2_nb->setText("-");
440 label_NORM_ASM_F2_nb->setText("-");
441 //
441 //
442 label_BURST_CWF_F2_nb->setText("-");
442 label_BURST_CWF_F2_nb->setText("-");
443 label_BURST_BP1_F0_nb->setText("-");
443 label_BURST_BP1_F0_nb->setText("-");
444 label_BURST_BP2_F0_nb->setText("-");
444 label_BURST_BP2_F0_nb->setText("-");
445 label_BURST_BP1_F1_nb->setText("-");
446 label_BURST_BP2_F1_nb->setText("-");
445 //
447 //
446 label_SBM1_CWF_F1_nb->setText("-");
448 label_SBM1_CWF_F1_nb->setText("-");
447 label_SBM1_BP1_F0_nb->setText("-");
449 label_SBM1_BP1_F0_nb->setText("-");
448 label_SBM1_BP2_F0_nb->setText("-");
450 label_SBM1_BP2_F0_nb->setText("-");
449 //
451 //
450 label_SBM2_CWF_F2_nb->setText("-");
452 label_SBM2_CWF_F2_nb->setText("-");
451 label_SBM2_BP1_F0_nb->setText("-");
453 label_SBM2_BP1_F0_nb->setText("-");
452 label_SBM2_BP2_F0_nb->setText("-");
454 label_SBM2_BP2_F0_nb->setText("-");
455 label_SBM2_BP1_F1_nb->setText("-");
456 label_SBM2_BP2_F1_nb->setText("-");
453 //
457 //
454 label_PID_is->setText("-");
458 label_PID_is->setText("-");
455 label_CAT_is->setText("-");
459 label_CAT_is->setText("-");
456 label_TYP_is->setText("-");
460 label_TYP_is->setText("-");
457 label_SUB_is->setText("-");
461 label_SUB_is->setText("-");
458 label_SID_is->setText("-");
462 label_SID_is->setText("-");
459 label_SIZ_is->setText("-");
463 label_SIZ_is->setText("-");
460 //
464 //
461 label_coarse_time_val->setText("-");
465 label_coarse_time_val->setText("-");
462 label_fine_time_val->setText("-");
466 label_fine_time_val->setText("-");
463 }
467 }
464
468
465 void TMStatistics::updateStatistics(unsigned char pid, unsigned char cat,
469 void TMStatistics::updateStatistics(unsigned char pid, unsigned char cat,
466 unsigned char typ, unsigned char sub,
470 unsigned char typ, unsigned char sub,
467 unsigned int sid, unsigned int length,
471 unsigned int sid, unsigned int length,
468 unsigned int coarse_t, unsigned int fine_t)
472 unsigned int coarse_t, unsigned int fine_t)
469 {
473 {
470 if (cat == TM_PACKET_CAT_TC_EXE)
474 if (cat == TM_PACKET_CAT_TC_EXE)
471 {
475 {
472 if (typ == TM_TYPE_TC_EXE)
476 if (typ == TM_TYPE_TC_EXE)
473 {
477 {
474 if (sub == TM_SUBTYPE_EXE_OK)
478 if (sub == TM_SUBTYPE_EXE_OK)
475 {
479 {
476 SUCC_nb = SUCC_nb + 1;
480 SUCC_nb = SUCC_nb + 1;
477 label_SUCC_nb->setText(QString::number(SUCC_nb));
481 label_SUCC_nb->setText(QString::number(SUCC_nb));
478 }
482 }
479 else if (sub == TM_SUBTYPE_EXE_NOK)
483 else if (sub == TM_SUBTYPE_EXE_NOK)
480 {
484 {
481 if (sid == WRONG_APP_DATA)
485 if (sid == WRONG_APP_DATA)
482 {
486 {
483 INCO_nb = INCO_nb + 1;
487 INCO_nb = INCO_nb + 1;
484 label_INCO_nb->setText(QString::number(INCO_nb));
488 label_INCO_nb->setText(QString::number(INCO_nb));
485 }
489 }
486 else if (sid == TC_NOT_EXE)
490 else if (sid == TC_NOT_EXE)
487 {
491 {
488 NOTE_nb = NOTE_nb + 1;
492 NOTE_nb = NOTE_nb + 1;
489 label_NOTE_nb->setText(QString::number(NOTE_nb));
493 label_NOTE_nb->setText(QString::number(NOTE_nb));
490 }
494 }
491 else if (sid == FUNCT_NOT_IMPL)
495 else if (sid == FUNCT_NOT_IMPL)
492 {
496 {
493 NOTI_nb = NOTI_nb + 1;
497 NOTI_nb = NOTI_nb + 1;
494 label_NOTI_nb->setText(QString::number(NOTI_nb));
498 label_NOTI_nb->setText(QString::number(NOTI_nb));
495 }
499 }
496 else if (sid == FAIL_DETECTED)
500 else if (sid == FAIL_DETECTED)
497 {
501 {
498 ERRO_nb = ERRO_nb + 1;
502 ERRO_nb = ERRO_nb + 1;
499 label_ERRO_nb->setText(QString::number(ERRO_nb));
503 label_ERRO_nb->setText(QString::number(ERRO_nb));
500 }
504 }
501 else if (sid == CORRUPTED)
505 else if (sid == CORRUPTED)
502 {
506 {
503 CORR_nb = CORR_nb + 1;
507 CORR_nb = CORR_nb + 1;
504 label_CORR_nb->setText(QString::number(CORR_nb));
508 label_CORR_nb->setText(QString::number(CORR_nb));
505 }
509 }
506 else incrementUnknown();
510 else incrementUnknown();
507 }
511 }
508 else incrementUnknown();
512 else incrementUnknown();
509 }
513 }
510 else
514 else
511 incrementUnknown();
515 incrementUnknown();
512 }
516 }
513 else if (cat == TM_PACKET_CAT_HK)
517 else if (cat == TM_PACKET_CAT_HK)
514 {
518 {
515 if (typ == TM_TYPE_HK)
519 if (typ == TM_TYPE_HK)
516 {
520 {
517 if (sub == TM_SUBTYPE_HK)
521 if (sub == TM_SUBTYPE_HK)
518 if (sid == SID_HK)
522 if (sid == SID_HK)
519 {
523 {
520 HK_nb = HK_nb + 1;
524 HK_nb = HK_nb + 1;
521 label_HK_nb->setText(QString::number(HK_nb));
525 label_HK_nb->setText(QString::number(HK_nb));
522 }
526 }
523 else
527 else
524 {
528 {
525 incrementUnknown();
529 incrementUnknown();
526 }
530 }
527 else
531 else
528 {
532 {
529 incrementUnknown();
533 incrementUnknown();
530 }
534 }
531 }
535 }
532 else
536 else
533 {
537 {
534 incrementUnknown();
538 incrementUnknown();
535 }
539 }
536 }
540 }
537 else if (cat == TM_PACKET_CAT_PARAMETER_DUMP)
541 else if (cat == TM_PACKET_CAT_PARAMETER_DUMP)
538 {
542 {
539 if (typ == TM_TYPE_PARAMETER_DUMP)
543 if (typ == TM_TYPE_PARAMETER_DUMP)
540 {
544 {
541 if (sub == TM_SUBTYPE_PARAMETER_DUMP)
545 if (sub == TM_SUBTYPE_PARAMETER_DUMP)
542 if (sid == SID_PARAMETER_DUMP)
546 if (sid == SID_PARAMETER_DUMP)
543 {
547 {
544 DUMP_nb = DUMP_nb + 1;
548 DUMP_nb = DUMP_nb + 1;
545 label_DUMP_nb->setText(QString::number(DUMP_nb));
549 label_DUMP_nb->setText(QString::number(DUMP_nb));
546 }
550 }
547 else
551 else
548 {
552 {
549 incrementUnknown();
553 incrementUnknown();
550 }
554 }
551 else
555 else
552 {
556 {
553 incrementUnknown();
557 incrementUnknown();
554 }
558 }
555 }
559 }
556 else
560 else
557 {
561 {
558 incrementUnknown();
562 incrementUnknown();
559 }
563 }
560 }
564 }
561 else if (cat == TM_PACKET_CAT_SCIENCE)
565 else if (cat == TM_PACKET_CAT_SCIENCE)
562 {
566 {
563 if (typ == TM_TYPE_LFR_SCIENCE)
567 if (typ == TM_TYPE_LFR_SCIENCE)
564 {
568 {
565 if (sub == TM_SUBTYPE_SCIENCE)
569 if (sub == TM_SUBTYPE_SCIENCE)
566 {
570 {
567 if (sid == SID_NORM_CWF_F3)
571 if (sid == SID_NORM_CWF_F3)
568 {
572 {
569 NORM_CWF_F3_nb = NORM_CWF_F3_nb + 1;
573 NORM_CWF_F3_nb = NORM_CWF_F3_nb + 1;
570 label_NORM_CWF_F3_nb->setText(QString::number(NORM_CWF_F3_nb));
574 label_NORM_CWF_F3_nb->setText(QString::number(NORM_CWF_F3_nb));
571 }
575 }
572 if (sid == SID_NORM_CWF_LONG_F3)
576 else if (sid == SID_NORM_CWF_LONG_F3)
573 {
577 {
574 NORM_CWF_LONG_F3_nb = NORM_CWF_LONG_F3_nb + 1;
578 NORM_CWF_LONG_F3_nb = NORM_CWF_LONG_F3_nb + 1;
575 label_NORM_CWF_LONG_F3_nb->setText(QString::number(NORM_CWF_LONG_F3_nb));
579 label_NORM_CWF_LONG_F3_nb->setText(QString::number(NORM_CWF_LONG_F3_nb));
576 }
580 }
577 else if (sid == SID_BURST_CWF_F2)
581 else if (sid == SID_BURST_CWF_F2)
578 {
582 {
579 BURST_CWF_F2_nb = BURST_CWF_F2_nb + 1;
583 BURST_CWF_F2_nb = BURST_CWF_F2_nb + 1;
580 label_BURST_CWF_F2_nb->setText(QString::number(BURST_CWF_F2_nb));
584 label_BURST_CWF_F2_nb->setText(QString::number(BURST_CWF_F2_nb));
581 }
585 }
582 else if (sid == SID_NORM_SWF_F0)
586 else if (sid == SID_NORM_SWF_F0)
583 {
587 {
584 NORM_SWF_F0_nb = NORM_SWF_F0_nb + 1;
588 NORM_SWF_F0_nb = NORM_SWF_F0_nb + 1;
585 label_NORM_SWF_F0_nb->setText(QString::number(NORM_SWF_F0_nb));
589 label_NORM_SWF_F0_nb->setText(QString::number(NORM_SWF_F0_nb));
586 }
590 }
587 else if (sid == SID_NORM_SWF_F1)
591 else if (sid == SID_NORM_SWF_F1)
588 {
592 {
589 NORM_SWF_F1_nb = NORM_SWF_F1_nb + 1;
593 NORM_SWF_F1_nb = NORM_SWF_F1_nb + 1;
590 label_NORM_SWF_F1_nb->setText(QString::number(NORM_SWF_F1_nb));
594 label_NORM_SWF_F1_nb->setText(QString::number(NORM_SWF_F1_nb));
591 }
595 }
592 else if (sid == SID_NORM_SWF_F2)
596 else if (sid == SID_NORM_SWF_F2)
593 {
597 {
594 NORM_SWF_F2_nb = NORM_SWF_F2_nb + 1;
598 NORM_SWF_F2_nb = NORM_SWF_F2_nb + 1;
595 label_NORM_SWF_F2_nb->setText(QString::number(NORM_SWF_F2_nb));
599 label_NORM_SWF_F2_nb->setText(QString::number(NORM_SWF_F2_nb));
596 }
600 }
597 else if (sid == SID_NORM_ASM_F0)
601 else if (sid == SID_NORM_ASM_F0)
598 {
602 {
599 NORM_ASM_F0_nb = NORM_ASM_F0_nb + 1;
603 NORM_ASM_F0_nb = NORM_ASM_F0_nb + 1;
600 label_NORM_ASM_F0_nb->setText(QString::number(NORM_ASM_F0_nb));
604 label_NORM_ASM_F0_nb->setText(QString::number(NORM_ASM_F0_nb));
601 }
605 }
602 else if (sid == SID_NORM_ASM_F1)
606 else if (sid == SID_NORM_ASM_F1)
603 {
607 {
604 NORM_ASM_F1_nb = NORM_ASM_F1_nb + 1;
608 NORM_ASM_F1_nb = NORM_ASM_F1_nb + 1;
605 label_NORM_ASM_F1_nb->setText(QString::number(NORM_ASM_F1_nb));
609 label_NORM_ASM_F1_nb->setText(QString::number(NORM_ASM_F1_nb));
606 }
610 }
607 else if (sid == SID_NORM_ASM_F2)
611 else if (sid == SID_NORM_ASM_F2)
608 {
612 {
609 NORM_ASM_F2_nb = NORM_ASM_F2_nb + 1;
613 NORM_ASM_F2_nb = NORM_ASM_F2_nb + 1;
610 label_NORM_ASM_F2_nb->setText(QString::number(NORM_ASM_F2_nb));
614 label_NORM_ASM_F2_nb->setText(QString::number(NORM_ASM_F2_nb));
611 }
615 }
612 else if (sid == SID_NORM_BP1_F0)
616 else if (sid == SID_NORM_BP1_F0)
613 {
617 {
614 NORM_BP1_F0_nb = NORM_BP1_F0_nb + 1;
618 NORM_BP1_F0_nb = NORM_BP1_F0_nb + 1;
615 label_NORM_BP1_F0_nb->setText(QString::number(NORM_BP1_F0_nb));
619 label_NORM_BP1_F0_nb->setText(QString::number(NORM_BP1_F0_nb));
616 }
620 }
617 else if (sid == SID_NORM_BP1_F1)
621 else if (sid == SID_NORM_BP1_F1)
618 {
622 {
619 NORM_BP1_F1_nb = NORM_BP1_F1_nb + 1;
623 NORM_BP1_F1_nb = NORM_BP1_F1_nb + 1;
620 label_NORM_BP1_F1_nb->setText(QString::number(NORM_BP1_F1_nb));
624 label_NORM_BP1_F1_nb->setText(QString::number(NORM_BP1_F1_nb));
621 }
625 }
622 else if (sid == SID_NORM_BP1_F2)
626 else if (sid == SID_NORM_BP1_F2)
623 {
627 {
624 NORM_BP1_F2_nb = NORM_BP1_F2_nb + 1;
628 NORM_BP1_F2_nb = NORM_BP1_F2_nb + 1;
625 label_NORM_BP1_F2_nb->setText(QString::number(NORM_BP1_F2_nb));
629 label_NORM_BP1_F2_nb->setText(QString::number(NORM_BP1_F2_nb));
626 }
630 }
627 else if (sid == SID_NORM_BP2_F0)
631 else if (sid == SID_NORM_BP2_F0)
628 {
632 {
629 NORM_BP2_F0_nb = NORM_BP2_F0_nb + 1;
633 NORM_BP2_F0_nb = NORM_BP2_F0_nb + 1;
630 label_NORM_BP2_F0_nb->setText(QString::number(NORM_BP2_F0_nb));
634 label_NORM_BP2_F0_nb->setText(QString::number(NORM_BP2_F0_nb));
631 }
635 }
632 else if (sid == SID_NORM_BP2_F1)
636 else if (sid == SID_NORM_BP2_F1)
633 {
637 {
634 NORM_BP2_F1_nb = NORM_BP2_F1_nb + 1;
638 NORM_BP2_F1_nb = NORM_BP2_F1_nb + 1;
635 label_NORM_BP2_F1_nb->setText(QString::number(NORM_BP2_F1_nb));
639 label_NORM_BP2_F1_nb->setText(QString::number(NORM_BP2_F1_nb));
636 }
640 }
637 else if (sid == SID_NORM_BP2_F2)
641 else if (sid == SID_NORM_BP2_F2)
638 {
642 {
639 NORM_BP2_F2_nb = NORM_BP2_F2_nb + 1;
643 NORM_BP2_F2_nb = NORM_BP2_F2_nb + 1;
640 label_NORM_BP2_F2_nb->setText(QString::number(NORM_BP2_F2_nb));
644 label_NORM_BP2_F2_nb->setText(QString::number(NORM_BP2_F2_nb));
641 }
645 }
642 else if (sid == SID_BURST_BP1_F0)
646 else if (sid == SID_BURST_BP1_F0)
643 {
647 {
644 BURST_BP1_F0_nb = BURST_BP1_F0_nb + 1;
648 BURST_BP1_F0_nb = BURST_BP1_F0_nb + 1;
645 label_BURST_BP1_F0_nb->setText(QString::number(BURST_BP1_F0_nb));
649 label_BURST_BP1_F0_nb->setText(QString::number(BURST_BP1_F0_nb));
646 }
650 }
647 else if (sid == SID_BURST_BP2_F0)
651 else if (sid == SID_BURST_BP2_F0)
648 {
652 {
649 BURST_BP2_F0_nb = BURST_BP2_F0_nb + 1;
653 BURST_BP2_F0_nb = BURST_BP2_F0_nb + 1;
650 label_BURST_BP2_F0_nb->setText(QString::number(BURST_BP2_F0_nb));
654 label_BURST_BP2_F0_nb->setText(QString::number(BURST_BP2_F0_nb));
651 }
655 }
656 else if (sid == SID_BURST_BP1_F1)
657 {
658 BURST_BP1_F1_nb = BURST_BP1_F1_nb + 1;
659 label_BURST_BP1_F1_nb->setText(QString::number(BURST_BP1_F1_nb));
660 }
661 else if (sid == SID_BURST_BP2_F1)
662 {
663 BURST_BP2_F1_nb = BURST_BP2_F1_nb + 1;
664 label_BURST_BP2_F1_nb->setText(QString::number(BURST_BP2_F1_nb));
665 }
652 else if (sid == SID_SBM1_CWF_F1)
666 else if (sid == SID_SBM1_CWF_F1)
653 {
667 {
654 SBM1_CWF_F1_nb = SBM1_CWF_F1_nb + 1;
668 SBM1_CWF_F1_nb = SBM1_CWF_F1_nb + 1;
655 label_SBM1_CWF_F1_nb->setText(QString::number(SBM1_CWF_F1_nb));
669 label_SBM1_CWF_F1_nb->setText(QString::number(SBM1_CWF_F1_nb));
656 }
670 }
657 else if (sid == SID_SBM2_CWF_F2)
671 else if (sid == SID_SBM2_CWF_F2)
658 {
672 {
659 SBM2_CWF_F2_nb = SBM2_CWF_F2_nb + 1;
673 SBM2_CWF_F2_nb = SBM2_CWF_F2_nb + 1;
660 label_SBM2_CWF_F2_nb->setText(QString::number(SBM2_CWF_F2_nb));
674 label_SBM2_CWF_F2_nb->setText(QString::number(SBM2_CWF_F2_nb));
661 }
675 }
662 else if (sid == SID_SBM1_BP1_F0)
676 else if (sid == SID_SBM1_BP1_F0)
663 {
677 {
664 SBM1_BP1_F0_nb = SBM1_BP1_F0_nb + 1;
678 SBM1_BP1_F0_nb = SBM1_BP1_F0_nb + 1;
665 label_SBM1_BP1_F0_nb->setText(QString::number(SBM1_BP1_F0_nb));
679 label_SBM1_BP1_F0_nb->setText(QString::number(SBM1_BP1_F0_nb));
666 }
680 }
667 else if (sid == SID_SBM1_BP2_F0)
681 else if (sid == SID_SBM1_BP2_F0)
668 {
682 {
669 SBM1_BP2_F0_nb = SBM1_BP2_F0_nb + 1;
683 SBM1_BP2_F0_nb = SBM1_BP2_F0_nb + 1;
670 label_SBM1_BP2_F0_nb->setText(QString::number(SBM1_BP2_F0_nb));
684 label_SBM1_BP2_F0_nb->setText(QString::number(SBM1_BP2_F0_nb));
671 }
685 }
672 else if (sid == SID_SBM2_BP1_F0)
686 else if (sid == SID_SBM2_BP1_F0)
673 {
687 {
674 SBM2_BP1_F0_nb = SBM2_BP1_F0_nb + 1;
688 SBM2_BP1_F0_nb = SBM2_BP1_F0_nb + 1;
675 label_SBM2_BP1_F0_nb->setText(QString::number(SBM2_BP1_F0_nb));
689 label_SBM2_BP1_F0_nb->setText(QString::number(SBM2_BP1_F0_nb));
676 }
690 }
677 else if (sid == SID_SBM2_BP2_F0)
691 else if (sid == SID_SBM2_BP2_F0)
678 {
692 {
679 SBM2_BP2_F0_nb = SBM2_BP2_F0_nb + 1;
693 SBM2_BP2_F0_nb = SBM2_BP2_F0_nb + 1;
680 label_SBM2_BP2_F0_nb->setText(QString::number(SBM2_BP2_F0_nb));
694 label_SBM2_BP2_F0_nb->setText(QString::number(SBM2_BP2_F0_nb));
681 }
695 }
696 else if (sid == SID_SBM2_BP1_F1)
697 {
698 SBM2_BP1_F1_nb = SBM2_BP1_F1_nb + 1;
699 label_SBM2_BP1_F1_nb->setText(QString::number(SBM2_BP1_F1_nb));
700 }
701 else if (sid == SID_SBM2_BP2_F1)
702 {
703 SBM2_BP2_F1_nb = SBM2_BP2_F1_nb + 1;
704 label_SBM2_BP2_F1_nb->setText(QString::number(SBM2_BP2_F1_nb));
705 }
682 else
706 else
683 {
707 {
684 incrementUnknown();
708 incrementUnknown();
685 }
709 }
686 }
710 }
687 }
711 }
688 else if (typ == TC_TYPE_TIME)
712 else if (typ == TC_TYPE_TIME)
689 {
713 {
690 increment_TC_LFR_UPDATE_TIME();
714 increment_TC_LFR_UPDATE_TIME();
691 }
715 }
692 else
716 else
693 {
717 {
694 incrementUnknown();
718 incrementUnknown();
695 }
719 }
696 }
720 }
697 else
721 else
698 {
722 {
699 incrementUnknown();
723 incrementUnknown();
700 }
724 }
701
725
702 if ( !( (typ==TC_TYPE_TIME) & (sub==TC_SUBTYPE_UPDT_TIME) ) )
726 if ( !( (typ==TC_TYPE_TIME) & (sub==TC_SUBTYPE_UPDT_TIME) ) )
703 {
727 {
704 label_PID_is->setText(QString::number(pid));
728 label_PID_is->setText(QString::number(pid));
705 label_CAT_is->setText(QString::number(cat));
729 label_CAT_is->setText(QString::number(cat));
706 label_TYP_is->setText(QString::number(typ));
730 label_TYP_is->setText(QString::number(typ));
707 label_SUB_is->setText(QString::number(sub));
731 label_SUB_is->setText(QString::number(sub));
708 label_SID_is->setText(QString::number(sid));
732 label_SID_is->setText(QString::number(sid));
709 label_SIZ_is->setText(QString::number(length));
733 label_SIZ_is->setText(QString::number(length));
710 label_coarse_time_val->setText(QString::number(coarse_t, 16));
734 label_coarse_time_val->setText(QString::number(coarse_t, 16));
711 label_fine_time_val->setText(QString::number(fine_t, 16));
735 label_fine_time_val->setText(QString::number(fine_t, 16));
712
736
713 emit lastTMTimeHasChanged( coarse_t );
737 emit lastTMTimeHasChanged( coarse_t );
714 }
738 }
715 }
739 }
716
740
717 void TMStatistics::incrementUnknown()
741 void TMStatistics::incrementUnknown()
718 {
742 {
719 UNKNOWN_nb = UNKNOWN_nb + 1;
743 UNKNOWN_nb = UNKNOWN_nb + 1;
720 label_UNKNOWN_nb->setText(QString::number(UNKNOWN_nb));
744 label_UNKNOWN_nb->setText(QString::number(UNKNOWN_nb));
721 }
745 }
722
746
723 void TMStatistics::increment_TC_LFR_UPDATE_TIME()
747 void TMStatistics::increment_TC_LFR_UPDATE_TIME()
724 {
748 {
725 TC_LFR_UPDATE_TIME_nb = TC_LFR_UPDATE_TIME_nb + 1;
749 TC_LFR_UPDATE_TIME_nb = TC_LFR_UPDATE_TIME_nb + 1;
726 label_TC_LFR_UPDATE_TIME_nb->setText(QString::number(TC_LFR_UPDATE_TIME_nb));
750 label_TC_LFR_UPDATE_TIME_nb->setText(QString::number(TC_LFR_UPDATE_TIME_nb));
727 }
751 }
728
752
729 unsigned char TMStatistics::getPID(TMPacketToRead *packet)
753 unsigned char TMStatistics::getPID(TMPacketToRead *packet)
730 {
754 {
731 unsigned char pid = 0;
755 unsigned char pid = 0;
732
756
733 pid = ((packet->Value[4] & 0x07) << 4) + ((packet->Value[5] & 0xf0) >> 4);
757 pid = ((packet->Value[4] & 0x07) << 4) + ((packet->Value[5] & 0xf0) >> 4);
734
758
735 return pid;
759 return pid;
736 }
760 }
737
761
738 unsigned char TMStatistics::getCAT(TMPacketToRead *packet)
762 unsigned char TMStatistics::getCAT(TMPacketToRead *packet)
739 {
763 {
740 unsigned char cat = 0;
764 unsigned char cat = 0;
741
765
742 cat = packet->Value[5] & 0x0f;
766 cat = packet->Value[5] & 0x0f;
743
767
744 return cat;
768 return cat;
745 }
769 }
746
770
747 unsigned char TMStatistics::getSegmentationGroupingFlag(TMPacketToRead *packet)
771 unsigned char TMStatistics::getSegmentationGroupingFlag(TMPacketToRead *packet)
748 {
772 {
749 unsigned char segmentationGroupingFlag;
773 unsigned char segmentationGroupingFlag;
750
774
751 segmentationGroupingFlag = (unsigned char) (packet->Value[6] >> 6);
775 segmentationGroupingFlag = (unsigned char) (packet->Value[6] >> 6);
752
776
753 return segmentationGroupingFlag;
777 return segmentationGroupingFlag;
754 }
778 }
755
779
756 unsigned char TMStatistics::getTYPE(TMPacketToRead *packet)
780 unsigned char TMStatistics::getTYPE(TMPacketToRead *packet)
757 {
781 {
758 unsigned char typ = 0;
782 unsigned char typ = 0;
759
783
760 typ = packet->Value[11]; // TYPE
784 typ = packet->Value[11]; // TYPE
761
785
762 return typ;
786 return typ;
763 }
787 }
764
788
765 unsigned char TMStatistics::getSUBTYPE(TMPacketToRead *packet)
789 unsigned char TMStatistics::getSUBTYPE(TMPacketToRead *packet)
766 {
790 {
767 unsigned char sub = 0;
791 unsigned char sub = 0;
768
792
769 sub = packet->Value[12]; // SUBTYPE
793 sub = packet->Value[12]; // SUBTYPE
770
794
771 return sub;
795 return sub;
772 }
796 }
773
797
774 unsigned int TMStatistics::getLENGTH(TMPacketToRead *packet)
798 unsigned int TMStatistics::getLENGTH(TMPacketToRead *packet)
775 {
799 {
776 unsigned int length = 0;
800 unsigned int length = 0;
777
801
778 length = packet->Value[8] * 256 + packet->Value[9];
802 length = packet->Value[8] * 256 + packet->Value[9];
779
803
780 return length;
804 return length;
781 }
805 }
782
806
783 unsigned int TMStatistics::getCoarseTime(TMPacketToRead *packet)
807 unsigned int TMStatistics::getCoarseTime(TMPacketToRead *packet)
784 {
808 {
785 unsigned int coarse = 0;
809 unsigned int coarse = 0;
786
810
787 coarse = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16)
811 coarse = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16)
788 + packet->Value[16] * pow(2, 8) + packet->Value[17];
812 + packet->Value[16] * pow(2, 8) + packet->Value[17];
789
813
790 return coarse;
814 return coarse;
791 }
815 }
792
816
793 unsigned int TMStatistics::getFineTime(TMPacketToRead *packet)
817 unsigned int TMStatistics::getFineTime(TMPacketToRead *packet)
794 {
818 {
795 unsigned int fine = 0;
819 unsigned int fine = 0;
796
820
797 fine = packet->Value[18] * pow(2, 8) + packet->Value[19];
821 fine = packet->Value[18] * pow(2, 8) + packet->Value[19];
798
822
799 return fine;
823 return fine;
800 }
824 }
801
825
802 unsigned int TMStatistics::getSID(TMPacketToRead *packet,
826 unsigned int TMStatistics::getSID(TMPacketToRead *packet,
803 unsigned char pid, unsigned char cat,
827 unsigned char pid, unsigned char cat,
804 unsigned char typ, unsigned char sub)
828 unsigned char typ, unsigned char sub)
805 {
829 {
806 unsigned int sid = 0;
830 unsigned int sid = 0;
807 QString packetName;
831 QString packetName;
808 QTime currentTime;
832 QTime currentTime;
809 QDate currentDate;
833 QDate currentDate;
810 unsigned int i;
834 unsigned int i;
811
835
812 if ((pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_TC_EXE)
836 if ((pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_TC_EXE)
813 & (typ == TM_TYPE_TC_EXE) & (sub == TM_SUBTYPE_EXE_NOK))
837 & (typ == TM_TYPE_TC_EXE) & (sub == TM_SUBTYPE_EXE_NOK))
814 sid = packet->Value[20] * 256 + packet->Value[21];
838 sid = packet->Value[20] * 256 + packet->Value[21];
815 else if ((pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_HK)
839 else if ((pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_HK)
816 & (typ == TM_TYPE_HK) & (sub == TM_SUBTYPE_HK))
840 & (typ == TM_TYPE_HK) & (sub == TM_SUBTYPE_HK))
817 sid = SID_HK;
841 sid = SID_HK;
818 else if ((pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_PARAMETER_DUMP)
842 else if ((pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_PARAMETER_DUMP)
819 & (typ == TM_TYPE_PARAMETER_DUMP) & (sub == TM_SUBTYPE_PARAMETER_DUMP))
843 & (typ == TM_TYPE_PARAMETER_DUMP) & (sub == TM_SUBTYPE_PARAMETER_DUMP))
820 sid = SID_PARAMETER_DUMP;
844 sid = SID_PARAMETER_DUMP;
821 else if ((pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_SCIENCE)
845 else if ((pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_SCIENCE)
822 & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE))
846 & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE))
823 sid = packet->Value[20];
847 sid = packet->Value[20];
824 else if ((pid == TM_PACKET_PID_BURST_SBM1_SBM2) & (cat == TM_PACKET_CAT_SCIENCE)
848 else if ((pid == TM_PACKET_PID_BURST_SBM1_SBM2) & (cat == TM_PACKET_CAT_SCIENCE)
825 & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE))
849 & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE))
826 sid = packet->Value[20];
850 sid = packet->Value[20];
827
851
828 if (logFileEn == true)
852 if (logFileEn == true)
829 {
853 {
830 logFile->write((char *) &packet->Value[4], (packet->size-4));
854 logFile->write((char *) &packet->Value[4], (packet->size-4));
831 }
855 }
832
856
833 currentTime = QTime::currentTime();
857 currentTime = QTime::currentTime();
834 currentDate = QDate::currentDate();
858 currentDate = QDate::currentDate();
835
859
836 if (packetLogFileEn == true)
860 if (packetLogFileEn == true)
837 {
861 {
838 packetName = getPacketName( typ, sub, sid);
862 packetName = getPacketName( typ, sub, sid);
839
863
840 *(this->packetLogFileStrm)
864 *(this->packetLogFileStrm)
841 << QString::number(currentDate.year()) + " "
865 << QString::number(currentDate.year()) + " "
842 << QString::number(currentDate.month()) + " "
866 << QString::number(currentDate.month()) + " "
843 << QString::number(currentDate.day()) + " "
867 << QString::number(currentDate.day()) + " "
844 << QTime::currentTime().toString() + ":"
868 << QTime::currentTime().toString() + ":"
845 << QString::number(currentTime.msec()) + " "
869 << QString::number(currentTime.msec()) + " "
846 << packetName
870 << packetName
847 << " time = 0x " + QString::number(
871 << " time = 0x " + QString::number(
848 (packet->Value[14] << 24) + (packet->Value[15] << 16) + (packet->Value[16] << 8) + packet->Value[17],
872 (packet->Value[14] << 24) + (packet->Value[15] << 16) + (packet->Value[16] << 8) + packet->Value[17],
849 16).right(8)
873 16).right(8)
850 << " " + QString::number( (packet->Value[18] << 8) + packet->Value[19], 16)
874 << " " + QString::number( (packet->Value[18] << 8) + packet->Value[19], 16)
851 << endl;
875 << endl;
852 }
876 }
853
877
854 if (csvPacketRecordFileEn == true)
878 if (csvPacketRecordFileEn == true)
855 {
879 {
856 *(this->csvPacketRecordFileStrm)
880 *(this->csvPacketRecordFileStrm)
857 << QString::number(currentDate.year()) + " "
881 << QString::number(currentDate.year()) + " "
858 << QString::number(currentDate.month()) + " "
882 << QString::number(currentDate.month()) + " "
859 << QString::number(currentDate.day()) + " "
883 << QString::number(currentDate.day()) + " "
860 << QTime::currentTime().toString() + ":"
884 << QTime::currentTime().toString() + ":"
861 << QString::number(currentTime.msec());
885 << QString::number(currentTime.msec());
862 for (i=0; i< packet->size; i++)
886 for (i=0; i< packet->size; i++)
863 {
887 {
864 *(this->csvPacketRecordFileStrm)
888 *(this->csvPacketRecordFileStrm)
865 << ", " + QString::number( packet->Value[i] );
889 << ", " + QString::number( packet->Value[i] );
866 }
890 }
867 *(this->csvPacketRecordFileStrm)
891 *(this->csvPacketRecordFileStrm)
868 << endl;
892 << endl;
869 }
893 }
870
894
871 return sid;
895 return sid;
872 }
896 }
873
897
874 void TMStatistics::buildFileName()
898 void TMStatistics::buildFileName()
875 {
899 {
876 QTime time;
900 QTime time;
877 QDate date;
901 QDate date;
878 QString dateTime;
902 QString dateTime;
879 QString prefix;
903 QString prefix;
880
904
881 date = QDate::currentDate();
905 date = QDate::currentDate();
882 time = QTime::currentTime();
906 time = QTime::currentTime();
883
907
884 dateTime = QString::number( date.year() ) + "_"
908 dateTime = QString::number( date.year() ) + "_"
885 + QString::number( date.month() ) + "_"
909 + QString::number( date.month() ) + "_"
886 + QString::number( date.day() ) + "-"
910 + QString::number( date.day() ) + "-"
887 + QString::number( time.hour() ) + "_"
911 + QString::number( time.hour() ) + "_"
888 + QString::number( time.minute() ) + "_"
912 + QString::number( time.minute() ) + "_"
889 + QString::number( time.second() );
913 + QString::number( time.second() );
890
914
891 prefix = defaultStorageDirectory + "/" + dateTime + "_" ;
915 prefix = defaultStorageDirectory + "/" + dateTime + "_" ;
892
916
893 if(this->logFile->isOpen()) this->logFile->close();
917 if(this->logFile->isOpen()) this->logFile->close();
894 this->logFile->setFileName( prefix + "packet_record.data");
918 this->logFile->setFileName( prefix + "packet_record.data");
895 if(this->logFile->open(QIODevice::WriteOnly))
919 if(this->logFile->open(QIODevice::WriteOnly))
896 this->logFileStrm = new QTextStream(this->logFile);
920 this->logFileStrm = new QTextStream(this->logFile);
897 }
921 }
898
922
899 void TMStatistics::buildPacketLogFileName()
923 void TMStatistics::buildPacketLogFileName()
900 {
924 {
901 QTime time;
925 QTime time;
902 QDate date;
926 QDate date;
903 QString dateTime;
927 QString dateTime;
904 QString prefix;
928 QString prefix;
905
929
906 date = QDate::currentDate();
930 date = QDate::currentDate();
907 time = QTime::currentTime();
931 time = QTime::currentTime();
908
932
909 dateTime = QString::number( date.year() ) + "_"
933 dateTime = QString::number( date.year() ) + "_"
910 + QString::number( date.month() ) + "_"
934 + QString::number( date.month() ) + "_"
911 + QString::number( date.day() ) + "-"
935 + QString::number( date.day() ) + "-"
912 + QString::number( time.hour() ) + "_"
936 + QString::number( time.hour() ) + "_"
913 + QString::number( time.minute() ) + "_"
937 + QString::number( time.minute() ) + "_"
914 + QString::number( time.second() );
938 + QString::number( time.second() );
915
939
916 prefix = defaultStorageDirectory + "/" + dateTime + "_" ;
940 prefix = defaultStorageDirectory + "/" + dateTime + "_" ;
917
941
918 if(this->packetLogFile->isOpen()) this->packetLogFile->close();
942 if(this->packetLogFile->isOpen()) this->packetLogFile->close();
919 this->packetLogFile->setFileName( prefix + "packet_log.data");
943 this->packetLogFile->setFileName( prefix + "packet_log.data");
920 if(this->packetLogFile->open(QIODevice::WriteOnly))
944 if(this->packetLogFile->open(QIODevice::WriteOnly))
921 this->packetLogFileStrm = new QTextStream(this->packetLogFile);
945 this->packetLogFileStrm = new QTextStream(this->packetLogFile);
922 }
946 }
923
947
924 void TMStatistics::buildCSVPacketRecordFileName()
948 void TMStatistics::buildCSVPacketRecordFileName()
925 {
949 {
926 QTime time;
950 QTime time;
927 QDate date;
951 QDate date;
928 QString dateTime;
952 QString dateTime;
929 QString prefix;
953 QString prefix;
930
954
931 date = QDate::currentDate();
955 date = QDate::currentDate();
932 time = QTime::currentTime();
956 time = QTime::currentTime();
933
957
934 dateTime = QString::number( date.year() ) + "_"
958 dateTime = QString::number( date.year() ) + "_"
935 + QString::number( date.month() ) + "_"
959 + QString::number( date.month() ) + "_"
936 + QString::number( date.day() ) + "-"
960 + QString::number( date.day() ) + "-"
937 + QString::number( time.hour() ) + "_"
961 + QString::number( time.hour() ) + "_"
938 + QString::number( time.minute() ) + "_"
962 + QString::number( time.minute() ) + "_"
939 + QString::number( time.second() );
963 + QString::number( time.second() );
940
964
941 prefix = defaultStorageDirectory + "/" + dateTime + "_" ;
965 prefix = defaultStorageDirectory + "/" + dateTime + "_" ;
942
966
943 if(this->csvPacketRecordFile->isOpen()) this->csvPacketRecordFile->close();
967 if(this->csvPacketRecordFile->isOpen()) this->csvPacketRecordFile->close();
944 this->csvPacketRecordFile->setFileName( prefix + "packet_record.csv");
968 this->csvPacketRecordFile->setFileName( prefix + "packet_record.csv");
945 if(this->csvPacketRecordFile->open(QIODevice::WriteOnly))
969 if(this->csvPacketRecordFile->open(QIODevice::WriteOnly))
946 this->csvPacketRecordFileStrm = new QTextStream(this->csvPacketRecordFile);
970 this->csvPacketRecordFileStrm = new QTextStream(this->csvPacketRecordFile);
947 }
971 }
948
972
949 void TMStatistics::storePackets( int state )
973 void TMStatistics::storePackets( int state )
950 {
974 {
951 if (state == Qt::Checked)
975 if (state == Qt::Checked)
952 {
976 {
953 buildFileName();
977 buildFileName();
954 logFileEn = true;
978 logFileEn = true;
955 }
979 }
956 else
980 else
957 {
981 {
958 if(this->logFile->isOpen()) this->logFile->close();
982 if(this->logFile->isOpen()) this->logFile->close();
959 logFileEn = false;
983 logFileEn = false;
960 }
984 }
961 }
985 }
962
986
963 void TMStatistics::storeCSVPackets( int state )
987 void TMStatistics::storeCSVPackets( int state )
964 {
988 {
965 if (state == Qt::Checked)
989 if (state == Qt::Checked)
966 {
990 {
967 buildCSVPacketRecordFileName();
991 buildCSVPacketRecordFileName();
968 csvPacketRecordFileEn = true;
992 csvPacketRecordFileEn = true;
969 }
993 }
970 else
994 else
971 {
995 {
972 if(this->csvPacketRecordFile->isOpen()) this->csvPacketRecordFile->close();
996 if(this->csvPacketRecordFile->isOpen()) this->csvPacketRecordFile->close();
973 csvPacketRecordFileEn = false;
997 csvPacketRecordFileEn = false;
974 }
998 }
975 }
999 }
976
1000
977 void TMStatistics::logPackets( int state )
1001 void TMStatistics::logPackets( int state )
978 {
1002 {
979 if (state == Qt::Checked)
1003 if (state == Qt::Checked)
980 {
1004 {
981 buildPacketLogFileName();
1005 buildPacketLogFileName();
982 packetLogFileEn = true;
1006 packetLogFileEn = true;
983 }
1007 }
984 else
1008 else
985 {
1009 {
986 if(this->packetLogFile->isOpen()) this->packetLogFile->close();
1010 if(this->packetLogFile->isOpen()) this->packetLogFile->close();
987 packetLogFileEn = false;
1011 packetLogFileEn = false;
988 }
1012 }
989 }
1013 }
990
1014
991 void TMStatistics::chooseDir()
1015 void TMStatistics::chooseDir()
992 {
1016 {
993 QString tmpDefaultStorageDirectory;
1017 QString tmpDefaultStorageDirectory;
994 tmpDefaultStorageDirectory = QFileDialog::getExistingDirectory(this,
1018 tmpDefaultStorageDirectory = QFileDialog::getExistingDirectory(this,
995 "choose the directory",
1019 "choose the directory",
996 QDir::homePath(),
1020 QDir::homePath(),
997 QFileDialog::ShowDirsOnly);
1021 QFileDialog::ShowDirsOnly);
998
1022
999 if( !tmpDefaultStorageDirectory.isEmpty() )
1023 if( !tmpDefaultStorageDirectory.isEmpty() )
1000 {
1024 {
1001 defaultStorageDirectory = tmpDefaultStorageDirectory;
1025 defaultStorageDirectory = tmpDefaultStorageDirectory;
1002 }
1026 }
1003
1027
1004 label_currentDir->setText(defaultStorageDirectory);
1028 label_currentDir->setText(defaultStorageDirectory);
1005 }
1029 }
1006
1030
1007 void TMStatistics::closeEvent(QCloseEvent *event)
1031 void TMStatistics::closeEvent(QCloseEvent *event)
1008 {
1032 {
1009 if(this->logFile->isOpen())
1033 if(this->logFile->isOpen())
1010 {
1034 {
1011 this->logFileStrm->flush();
1035 this->logFileStrm->flush();
1012 this->logFile->waitForBytesWritten(3000);
1036 this->logFile->waitForBytesWritten(3000);
1013 this->logFile->close();
1037 this->logFile->close();
1014 }
1038 }
1015 event->accept();
1039 event->accept();
1016 }
1040 }
1017
1041
1018 QString TMStatistics::getPacketName(unsigned char type, unsigned char subtype, unsigned int sid)
1042 QString TMStatistics::getPacketName(unsigned char type, unsigned char subtype, unsigned int sid)
1019 {
1043 {
1020 QString packetName = "default";
1044 QString packetName = "default";
1021 if (type == TM_TYPE_TC_EXE)
1045 if (type == TM_TYPE_TC_EXE)
1022 {
1046 {
1023 if (subtype== TM_SUBTYPE_EXE_OK) packetName = "TM_LFR_TC_EXE_SUCCESS";
1047 if (subtype== TM_SUBTYPE_EXE_OK) packetName = "TM_LFR_TC_EXE_SUCCESS";
1024 if (subtype == TM_SUBTYPE_EXE_NOK)
1048 if (subtype == TM_SUBTYPE_EXE_NOK)
1025 {
1049 {
1026 if (sid == WRONG_APP_DATA) packetName = "TM_LFR_TC_EXE_INCONSISTENT";
1050 if (sid == WRONG_APP_DATA) packetName = "TM_LFR_TC_EXE_INCONSISTENT";
1027 if (sid == TC_NOT_EXE) packetName = "TM_LFR_TC_EXE_NOT_EXECUTABLE";
1051 if (sid == TC_NOT_EXE) packetName = "TM_LFR_TC_EXE_NOT_EXECUTABLE";
1028 if (sid == FUNCT_NOT_IMPL) packetName = "TM_LFR_TC_EXE_NOT_IMPLEMENTED";
1052 if (sid == FUNCT_NOT_IMPL) packetName = "TM_LFR_TC_EXE_NOT_IMPLEMENTED";
1029 if (sid == FAIL_DETECTED) packetName = "TM_LFR_TC_EXE_ERROR";
1053 if (sid == FAIL_DETECTED) packetName = "TM_LFR_TC_EXE_ERROR";
1030 if (sid == CORRUPTED) packetName = "TM_LFR_TC_EXE_CORRUPTED";
1054 if (sid == CORRUPTED) packetName = "TM_LFR_TC_EXE_CORRUPTED";
1031 }
1055 }
1032 }
1056 }
1033 if (type == TM_TYPE_HK)
1057 if (type == TM_TYPE_HK)
1034 {
1058 {
1035 if (subtype == TM_SUBTYPE_HK)
1059 if (subtype == TM_SUBTYPE_HK)
1036 {
1060 {
1037 if (sid == SID_HK) packetName = "TM_LFR_HK";
1061 if (sid == SID_HK) packetName = "TM_LFR_HK";
1038 if (sid == SID_PARAMETER_DUMP) packetName = "TM_LFR_PARAMETER_DUMP";
1062 if (sid == SID_PARAMETER_DUMP) packetName = "TM_LFR_PARAMETER_DUMP";
1039 }
1063 }
1040 }
1064 }
1041 if (type == TM_TYPE_LFR_SCIENCE)
1065 if (type == TM_TYPE_LFR_SCIENCE)
1042 {
1066 {
1043 if (subtype == TM_SUBTYPE_SCIENCE)
1067 if (subtype == TM_SUBTYPE_SCIENCE)
1044 {
1068 {
1045 if (sid == SID_NORM_SWF_F0) packetName = "TM_LFR_SCIENCE_NORMAL_SWF_F0";
1069 if (sid == SID_NORM_SWF_F0) packetName = "TM_LFR_SCIENCE_NORMAL_SWF_F0";
1046 if (sid == SID_NORM_SWF_F1) packetName = "TM_LFR_SCIENCE_NORMAL_SWF_F1";
1070 if (sid == SID_NORM_SWF_F1) packetName = "TM_LFR_SCIENCE_NORMAL_SWF_F1";
1047 if (sid == SID_NORM_SWF_F2) packetName = "TM_LFR_SCIENCE_NORMAL_SWF_F2";
1071 if (sid == SID_NORM_SWF_F2) packetName = "TM_LFR_SCIENCE_NORMAL_SWF_F2";
1048 if (sid == SID_NORM_CWF_F3) packetName = "TM_LFR_SCIENCE_NORMAL_CWF_F3";
1072 if (sid == SID_NORM_CWF_F3) packetName = "TM_LFR_SCIENCE_NORMAL_CWF_F3";
1049 if (sid == SID_BURST_CWF_F2) packetName = "TM_LFR_SCIENCE_BURST_CWF_F2";
1073 if (sid == SID_BURST_CWF_F2) packetName = "TM_LFR_SCIENCE_BURST_CWF_F2";
1050 if (sid == SID_SBM1_CWF_F1) packetName = "TM_LFR_SCIENCE_SBM1_CWF_F1";
1074 if (sid == SID_SBM1_CWF_F1) packetName = "TM_LFR_SCIENCE_SBM1_CWF_F1";
1051 if (sid == SID_SBM2_CWF_F2) packetName = "TM_LFR_SCIENCE_SBM2_CWF_F2";
1075 if (sid == SID_SBM2_CWF_F2) packetName = "TM_LFR_SCIENCE_SBM2_CWF_F2";
1052 if (sid == SID_NORM_ASM_F0) packetName = "TM_LFR_SCIENCE_NORMAL_ASM_F0";
1076 if (sid == SID_NORM_ASM_F0) packetName = "TM_LFR_SCIENCE_NORMAL_ASM_F0";
1053 if (sid == SID_NORM_ASM_F1) packetName = "TM_LFR_SCIENCE_NORMAL_ASM_F1";
1077 if (sid == SID_NORM_ASM_F1) packetName = "TM_LFR_SCIENCE_NORMAL_ASM_F1";
1054 if (sid == SID_NORM_ASM_F2) packetName = "TM_LFR_SCIENCE_NORMAL_ASM_F2";
1078 if (sid == SID_NORM_ASM_F2) packetName = "TM_LFR_SCIENCE_NORMAL_ASM_F2";
1055 if (sid == SID_NORM_BP1_F0) packetName = "TM_LFR_SCIENCE_NORMAL_BP1_F0";
1079 if (sid == SID_NORM_BP1_F0) packetName = "TM_LFR_SCIENCE_NORMAL_BP1_F0";
1056 if (sid == SID_NORM_BP1_F1) packetName = "TM_LFR_SCIENCE_NORMAL_BP1_F1";
1080 if (sid == SID_NORM_BP1_F1) packetName = "TM_LFR_SCIENCE_NORMAL_BP1_F1";
1057 if (sid == SID_NORM_BP1_F2) packetName = "TM_LFR_SCIENCE_NORMAL_BP1_F2";
1081 if (sid == SID_NORM_BP1_F2) packetName = "TM_LFR_SCIENCE_NORMAL_BP1_F2";
1058 if (sid == SID_NORM_BP2_F0) packetName = "TM_LFR_SCIENCE_NORMAL_BP2_F0";
1082 if (sid == SID_NORM_BP2_F0) packetName = "TM_LFR_SCIENCE_NORMAL_BP2_F0";
1059 if (sid == SID_NORM_BP2_F1) packetName = "TM_LFR_SCIENCE_NORMAL_BP2_F1";
1083 if (sid == SID_NORM_BP2_F1) packetName = "TM_LFR_SCIENCE_NORMAL_BP2_F1";
1060 if (sid == SID_NORM_BP2_F2) packetName = "TM_LFR_SCIENCE_NORMAL_BP2_F2";
1084 if (sid == SID_NORM_BP2_F2) packetName = "TM_LFR_SCIENCE_NORMAL_BP2_F2";
1061 if (sid == SID_BURST_BP1_F0) packetName = "TM_LFR_SCIENCE_BURST_BP1_F0";
1085 if (sid == SID_BURST_BP1_F0) packetName = "TM_LFR_SCIENCE_BURST_BP1_F0";
1062 if (sid == SID_BURST_BP2_F0) packetName = "TM_LFR_SCIENCE_BURST_BP2_F0";
1086 if (sid == SID_BURST_BP2_F0) packetName = "TM_LFR_SCIENCE_BURST_BP2_F0";
1063 if (sid == SID_BURST_BP1_F1) packetName = "TM_LFR_SCIENCE_BURST_BP1_F1";
1087 if (sid == SID_BURST_BP1_F1) packetName = "TM_LFR_SCIENCE_BURST_BP1_F1";
1064 if (sid == SID_BURST_BP2_F1) packetName = "TM_LFR_SCIENCE_BURST_BP2_F1";
1088 if (sid == SID_BURST_BP2_F1) packetName = "TM_LFR_SCIENCE_BURST_BP2_F1";
1065 if (sid == SID_SBM1_BP1_F0) packetName = "TM_LFR_SCIENCE_SBM1_BP1_F0";
1089 if (sid == SID_SBM1_BP1_F0) packetName = "TM_LFR_SCIENCE_SBM1_BP1_F0";
1066 if (sid == SID_SBM1_BP2_F0) packetName = "TM_LFR_SCIENCE_SBM1_BP2_F0";
1090 if (sid == SID_SBM1_BP2_F0) packetName = "TM_LFR_SCIENCE_SBM1_BP2_F0";
1067 if (sid == SID_SBM2_BP1_F0) packetName = "TM_LFR_SCIENCE_SBM2_BP1_F0";
1091 if (sid == SID_SBM2_BP1_F0) packetName = "TM_LFR_SCIENCE_SBM2_BP1_F0";
1068 if (sid == SID_SBM2_BP2_F0) packetName = "TM_LFR_SCIENCE_SBM2_BP2_F0";
1092 if (sid == SID_SBM2_BP2_F0) packetName = "TM_LFR_SCIENCE_SBM2_BP2_F0";
1069 if (sid == SID_SBM2_BP1_F1) packetName = "TM_LFR_SCIENCE_SBM2_BP1_F1";
1093 if (sid == SID_SBM2_BP1_F1) packetName = "TM_LFR_SCIENCE_SBM2_BP1_F1";
1070 if (sid == SID_SBM2_BP2_F1) packetName = "TM_LFR_SCIENCE_SBM2_BP2_F1";
1094 if (sid == SID_SBM2_BP2_F1) packetName = "TM_LFR_SCIENCE_SBM2_BP2_F1";
1071 }
1095 }
1072 }
1096 }
1073
1097
1074 return packetName;
1098 return packetName;
1075 }
1099 }
1076
1100
1077 void TMStatistics::readSettings()
1101 void TMStatistics::readSettings()
1078 {
1102 {
1079 QSettings settings("lpp", "lfrsgse");
1103 QSettings settings("lpp", "lfrsgse");
1080 defaultStorageDirectory = settings.value( "defaultStorageDirectory", QDir::homePath() ).toString();
1104 defaultStorageDirectory = settings.value( "defaultStorageDirectory", QDir::homePath() ).toString();
1081 label_currentDir->setText(defaultStorageDirectory);
1105 label_currentDir->setText(defaultStorageDirectory);
1082 }
1106 }
1083
1107
1084 void TMStatistics::writeSettings()
1108 void TMStatistics::writeSettings()
1085 {
1109 {
1086 QSettings settings("lpp", "lfrsgse");
1110 QSettings settings("lpp", "lfrsgse");
1087 settings.setValue("defaultStorageDirectory", defaultStorageDirectory);
1111 settings.setValue("defaultStorageDirectory", defaultStorageDirectory);
1088 }
1112 }
General Comments 0
You need to be logged in to leave comments. Login now