##// END OF EJS Templates
Minor upgrade on rmapplugin...
leroy -
r27:237de88e9fa6 default
parent child
Show More
@@ -0,0 +1,66
1 #include "lfrspectrogram.h"
2
3 class SpectrogramData: public QwtRasterData
4 {
5 public:
6 SpectrogramData():
7 QwtRasterData(QwtDoubleRect(-1.5, -1.5, 3.0, 3.0))
8 {
9 }
10
11 virtual QwtRasterData *copy() const
12 {
13 return new SpectrogramData();
14 }
15
16 virtual QwtDoubleInterval range() const
17 {
18 return QwtDoubleInterval(0.0, 10.0);
19 }
20
21 virtual double value(double x, double y) const
22 {
23 const double c = 0.842;
24
25 const double v1 = x * x + (y-c) * (y+c);
26 const double v2 = x * (y+c) + x * (y+c);
27
28 return 1.0 / (v1 * v1 + v2 * v2);
29 }
30 };
31
32 LFRSpectrogram::LFRSpectrogram(QWidget *parent) :
33 QWidget(parent)
34 {
35 mainLayout = new QVBoxLayout();
36 plot_spectrogram = new QwtPlot();
37 spectrogram = new QwtPlotSpectrogram(tr("spectrogram"));
38
39 QwtLinearColorMap colorMap(Qt::darkCyan, Qt::red);
40 colorMap.addColorStop(0.1, Qt::cyan);
41 colorMap.addColorStop(0.6, Qt::green);
42 colorMap.addColorStop(0.95, Qt::yellow);
43
44 spectrogram->setColorMap(colorMap);
45 spectrogram->setData( SpectrogramData() );
46 spectrogram->attach(plot_spectrogram);
47
48 // A color bar on the right axis
49 QwtScaleWidget *rightAxis = plot_spectrogram->axisWidget(QwtPlot::yRight);
50 rightAxis->setTitle("Intensity");
51 rightAxis->setColorBarEnabled(true);
52 rightAxis->setColorMap(spectrogram->data().range(),
53 spectrogram->colorMap());
54
55 plot_spectrogram->setAxisScale(QwtPlot::yRight,
56 spectrogram->data().range().minValue(),
57 spectrogram->data().range().maxValue() );
58 plot_spectrogram->enableAxis(QwtPlot::yRight);
59
60 plot_spectrogram->plotLayout()->setAlignCanvasToScales(true);
61 plot_spectrogram->replot();
62
63 mainLayout->addWidget(plot_spectrogram);
64
65 this->setLayout(mainLayout);
66 }
@@ -0,0 +1,34
1 #ifndef LFRSPECTROGRAM_H
2 #define LFRSPECTROGRAM_H
3
4 #include <QWidget>
5 #include <QVBoxLayout>
6
7 #include <qwt5-qt4/qwt_plot.h>
8 #include <qwt5-qt4/qwt_plot_spectrogram.h>
9 #include <qwt5-qt4/qwt_color_map.h>
10 #include <qwt5-qt4/qwt_scale_widget.h>
11 #include <qwt5-qt4/qwt_plot_layout.h>
12
13 class LFRSpectrogram : public QWidget
14 {
15 Q_OBJECT
16 public:
17 explicit LFRSpectrogram(QWidget *parent = 0);
18
19 signals:
20
21 public slots:
22
23 private:
24
25 QVBoxLayout* mainLayout;
26 QwtPlot* plot_spectrogram;
27 QwtPlotSpectrogram* spectrogram;
28
29 QwtPlotLayout *plotLayout();
30 const QwtPlotLayout *plotLayout() const;
31
32 };
33
34 #endif // LFRSPECTROGRAM_H
@@ -1,6 +1,6
1 <?xml version="1.0" encoding="UTF-8"?>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE QtCreatorProject>
2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by Qt Creator 2.4.1, 2013-06-18T15:38:00. -->
3 <!-- Written by Qt Creator 2.4.1, 2013-06-27T15:10:56. -->
4 <qtcreator>
4 <qtcreator>
5 <data>
5 <data>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -5,6 +5,26 HKDisplay::HKDisplay(QWidget *parent) :
5 {
5 {
6 mainLayout = new QGridLayout();
6 mainLayout = new QGridLayout();
7
7
8 setupLFRStatusWord();
9 setupLFRSWVersion();
10 setupTCStatistics();
11 setupAnomalyStatistics();
12 setupSpaceWireIFStatistics();
13 setupErrorCountersSpaceWire();
14
15 mainLayout->addWidget(groupbox_lfrStatusWord, 0,0,1,1);
16 mainLayout->addWidget(groupbox_lfrSWVersion, 0,1,1,1);
17 mainLayout->addWidget(groupbox_tcStatistics, 1,0,1,1);
18 mainLayout->addWidget(groupbox_anomalyStatistics, 1,1,1,1);
19 mainLayout->addWidget(groupbox_spacewireIFStatisctics, 1, 2, 1, 1);
20 mainLayout->addWidget(groupbox_errorCountersSpaceWire, 1, 3, 1, 1);
21 mainLayout->setColumnStretch(4, 1);
22
23 this->setLayout(mainLayout);
24 }
25
26 void HKDisplay::setupLFRStatusWord()
27 {
8 groupbox_lfrStatusWord = new QGroupBox("LFR Status Word");
28 groupbox_lfrStatusWord = new QGroupBox("LFR Status Word");
9 box_lfrStatusWord = new QVBoxLayout();
29 box_lfrStatusWord = new QVBoxLayout();
10 hk_lfr_mode = new QLabel("hk_lfr_mode: -");
30 hk_lfr_mode = new QLabel("hk_lfr_mode: -");
@@ -21,7 +41,10 HKDisplay::HKDisplay(QWidget *parent) :
21 box_lfrStatusWord->addWidget(hk_lfr_reset_cause);
41 box_lfrStatusWord->addWidget(hk_lfr_reset_cause);
22 box_lfrStatusWord->insertStretch(6);
42 box_lfrStatusWord->insertStretch(6);
23 groupbox_lfrStatusWord->setLayout(box_lfrStatusWord);
43 groupbox_lfrStatusWord->setLayout(box_lfrStatusWord);
44 }
24
45
46 void HKDisplay::setupLFRSWVersion()
47 {
25 groupbox_lfrSWVersion = new QGroupBox("LFR Software Version");
48 groupbox_lfrSWVersion = new QGroupBox("LFR Software Version");
26 box_lfrSWVersion = new QVBoxLayout();
49 box_lfrSWVersion = new QVBoxLayout();
27 sy_lfr_sw_version_n1 = new QLabel("sy_lfr_sw_version_n1: -");
50 sy_lfr_sw_version_n1 = new QLabel("sy_lfr_sw_version_n1: -");
@@ -34,7 +57,10 HKDisplay::HKDisplay(QWidget *parent) :
34 box_lfrSWVersion->addWidget(sy_lfr_sw_version_n4);
57 box_lfrSWVersion->addWidget(sy_lfr_sw_version_n4);
35 box_lfrSWVersion->insertStretch(4);
58 box_lfrSWVersion->insertStretch(4);
36 groupbox_lfrSWVersion->setLayout(box_lfrSWVersion);
59 groupbox_lfrSWVersion->setLayout(box_lfrSWVersion);
60 }
37
61
62 void HKDisplay::setupTCStatistics()
63 {
38 groupbox_tcStatistics = new QGroupBox("TC Statistics");
64 groupbox_tcStatistics = new QGroupBox("TC Statistics");
39 box_tcStatistics = new QVBoxLayout();
65 box_tcStatistics = new QVBoxLayout();
40 hk_lfr_update_info_tc_cnt = new QLabel("hk_lfr_update_info_tc_cnt: -");
66 hk_lfr_update_info_tc_cnt = new QLabel("hk_lfr_update_info_tc_cnt: -");
@@ -63,7 +89,10 HKDisplay::HKDisplay(QWidget *parent) :
63 box_tcStatistics->addWidget(hk_lfr_last_rej_tc_time);
89 box_tcStatistics->addWidget(hk_lfr_last_rej_tc_time);
64 box_tcStatistics->insertStretch(12, 1);
90 box_tcStatistics->insertStretch(12, 1);
65 groupbox_tcStatistics->setLayout(box_tcStatistics);
91 groupbox_tcStatistics->setLayout(box_tcStatistics);
92 }
66
93
94 void HKDisplay::setupAnomalyStatistics()
95 {
67 groupbox_anomalyStatistics = new QGroupBox("Anomaly Statistics");
96 groupbox_anomalyStatistics = new QGroupBox("Anomaly Statistics");
68 box_anomalyStatistics = new QVBoxLayout();
97 box_anomalyStatistics = new QVBoxLayout();
69 hk_lfr_le_cnt = new QLabel("hk_lfr_le_cnt: -");
98 hk_lfr_le_cnt = new QLabel("hk_lfr_le_cnt: -");
@@ -80,13 +109,61 HKDisplay::HKDisplay(QWidget *parent) :
80 box_anomalyStatistics->addWidget(hk_lfr_last_er_time);
109 box_anomalyStatistics->addWidget(hk_lfr_last_er_time);
81 box_anomalyStatistics->insertStretch(6, 1);
110 box_anomalyStatistics->insertStretch(6, 1);
82 groupbox_anomalyStatistics->setLayout(box_anomalyStatistics);
111 groupbox_anomalyStatistics->setLayout(box_anomalyStatistics);
112 }
83
113
84 mainLayout->addWidget(groupbox_lfrStatusWord, 0,0,1,1);
114 void HKDisplay::setupSpaceWireIFStatistics()
85 mainLayout->addWidget(groupbox_lfrSWVersion, 0,1,1,1);
115 {
86 mainLayout->addWidget(groupbox_tcStatistics, 1,0,1,1);
116 groupbox_spacewireIFStatisctics = new QGroupBox("SpaceWire IF Statistics");
87 mainLayout->addWidget(groupbox_anomalyStatistics, 1,1,1,1);
117 box_spacewireIFStatisctics = new QVBoxLayout();
118
119 hk_lfr_dpu_spw_pkt_rcv_cnt = new QLabel("hk_lfr_dpu_spw_pkt_rcv_cnt: -");
120 hk_lfr_dpu_spw_pkt_sent_cnt = new QLabel("hk_lfr_dpu_spw_pkt_sent_cnt: -");
121 hk_lfr_dpu_spw_tick_out_cnt = new QLabel("hk_lfr_dpu_spw_tick_out_cnt: -");
122 hk_lfr_dpu_spw_last_timc = new QLabel("hk_lfr_dpu_spw_last_timc: -");
123
124 box_spacewireIFStatisctics->addWidget(hk_lfr_dpu_spw_pkt_rcv_cnt);
125 box_spacewireIFStatisctics->addWidget(hk_lfr_dpu_spw_pkt_sent_cnt);
126 box_spacewireIFStatisctics->addWidget(hk_lfr_dpu_spw_tick_out_cnt);
127 box_spacewireIFStatisctics->addWidget(hk_lfr_dpu_spw_last_timc);
128 box_spacewireIFStatisctics->insertStretch(5);
129
130 groupbox_spacewireIFStatisctics->setLayout(box_spacewireIFStatisctics->layout());
131 }
132
133 void HKDisplay::setupErrorCountersSpaceWire()
134 {
135 groupbox_errorCountersSpaceWire = new QGroupBox("SpaceWire Error Counters");
136 box_errorCountersSpaceWire = new QVBoxLayout();
88
137
89 this->setLayout(mainLayout);
138 hk_lfr_dpu_spw_parity = new QLabel("hk_lfr_dpu_spw_parity: -");
139 hk_lfr_dpu_spw_disconnect = new QLabel("hk_lfr_dpu_spw_disconnect: -");
140 hk_lfr_dpu_spw_escape = new QLabel("hk_lfr_dpu_spw_escape: -");
141 hk_lfr_dpu_spw_credit = new QLabel("hk_lfr_dpu_spw_credit: -");
142 hk_lfr_dpu_spw_write_sync = new QLabel("hk_lfr_dpu_spw_write_sync: -");
143 hk_lfr_dpu_spw_rx_ahb = new QLabel("hk_lfr_dpu_spw_rx_ahb: -");
144 hk_lfr_dpu_spw_tx_ahb = new QLabel("hk_lfr_dpu_spw_tx_ahb: -");
145 hk_lfr_dpu_spw_header_crc = new QLabel("hk_lfr_dpu_spw_header_crc: -");
146 hk_lfr_dpu_spw_data_crc = new QLabel("hk_lfr_dpu_spw_data_crc: -");
147 hk_lfr_dpu_spw_early_eop = new QLabel("hk_lfr_dpu_spw_early_eop: -");
148 hk_lfr_dpu_spw_invalid_addr = new QLabel("hk_lfr_dpu_spw_invalid_addr: -");
149 hk_lfr_dpu_spw_eep = new QLabel("hk_lfr_dpu_spw_eep: -");
150 hk_lfr_dpu_spw_rx_too_big = new QLabel("hk_lfr_dpu_spw_rx_too_big: -");
151
152 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_parity);
153 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_disconnect);
154 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_escape);
155 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_credit);
156 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_write_sync);
157 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_rx_ahb);
158 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_tx_ahb);
159 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_header_crc);
160 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_data_crc);
161 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_early_eop);
162 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_invalid_addr);
163 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_eep);
164 box_errorCountersSpaceWire->addWidget(hk_lfr_dpu_spw_rx_too_big);
165
166 groupbox_errorCountersSpaceWire->setLayout(box_errorCountersSpaceWire->layout());
90 }
167 }
91
168
92 void HKDisplay::displayPacket(TMPacketToRead *tmPacketToRead)
169 void HKDisplay::displayPacket(TMPacketToRead *tmPacketToRead)
@@ -102,10 +179,11 void HKDisplay::displayPacket(TMPacketTo
102 housekeepingPacket = (Packet_TM_LFR_HK_t *) tmPacketToRead->Value;
179 housekeepingPacket = (Packet_TM_LFR_HK_t *) tmPacketToRead->Value;
103
180
104 updateLFRMode(housekeepingPacket);
181 updateLFRMode(housekeepingPacket);
105
106 updateSWVersion(housekeepingPacket);
182 updateSWVersion(housekeepingPacket);
107
108 updateTCStatistics(housekeepingPacket);
183 updateTCStatistics(housekeepingPacket);
184 updateAnomalyStatistics(housekeepingPacket);
185 updateSpaceWireIFStatistics(housekeepingPacket);
186 updateErrorCountersSpaceWire(housekeepingPacket);
109 }
187 }
110 }
188 }
111
189
@@ -203,3 +281,118 void HKDisplay::updateTCStatistics(Packe
203 )
281 )
204 );
282 );
205 }
283 }
284
285 void HKDisplay::updateAnomalyStatistics(Packet_TM_LFR_HK_t *housekeepingPacket)
286 {
287 // Anomaly Statistics
288 hk_lfr_le_cnt->setText("hk_lfr_le_cnt: "
289 + QString::number(
290 housekeepingPacket->hk_lfr_le_cnt[0] * 256
291 + housekeepingPacket->hk_lfr_le_cnt[1])
292 );
293 hk_lfr_me_cnt->setText("hk_lfr_me_cnt: "
294 + QString::number(
295 housekeepingPacket->hk_lfr_me_cnt[0] * 256
296 + housekeepingPacket->hk_lfr_me_cnt[1])
297 );
298 hk_lfr_he_cnt->setText("hk_lfr_he_cnt: "
299 + QString::number(
300 housekeepingPacket->hk_lfr_he_cnt[0] * 256
301 + housekeepingPacket->hk_lfr_he_cnt[1])
302 );
303 hk_lfr_last_er_rid->setText("hk_lfr_last_er_rid: "
304 + QString::number(
305 housekeepingPacket->hk_lfr_last_er_rid[0] * 256
306 + housekeepingPacket->hk_lfr_last_er_rid[1])
307 );
308 hk_lfr_last_er_code->setText("hk_lfr_last_er_code: "
309 + QString::number(
310 housekeepingPacket->hk_lfr_last_er_code)
311 );
312 hk_lfr_last_er_time->setText("hk_lfr_last_er_time: "
313 + QString::number(
314 (housekeepingPacket->hk_lfr_last_er_time[0] << 24)
315 + (housekeepingPacket->hk_lfr_last_er_time[1] << 16)
316 + (housekeepingPacket->hk_lfr_last_er_time[2] << 8)
317 + (housekeepingPacket->hk_lfr_last_er_time[3]), 16
318 )
319 );
320 }
321
322 void HKDisplay::updateSpaceWireIFStatistics(Packet_TM_LFR_HK_t *housekeepingPacket)
323 {
324 hk_lfr_dpu_spw_pkt_rcv_cnt->setText("hk_lfr_dpu_spw_pkt_rcv_cnt: "
325 + QString::number(
326 housekeepingPacket->hk_lfr_dpu_spw_pkt_rcv_cnt[0] * 256
327 + housekeepingPacket->hk_lfr_dpu_spw_pkt_rcv_cnt[1])
328 );
329 hk_lfr_dpu_spw_pkt_sent_cnt->setText("hk_lfr_dpu_spw_pkt_sent_cnt: "
330 + QString::number(
331 housekeepingPacket->hk_lfr_dpu_spw_pkt_sent_cnt[0] * 256
332 + housekeepingPacket->hk_lfr_dpu_spw_pkt_sent_cnt[1])
333 );
334 hk_lfr_dpu_spw_tick_out_cnt->setText("hk_lfr_dpu_spw_tick_out_cnt: "
335 + QString::number(
336 housekeepingPacket->hk_lfr_dpu_spw_tick_out_cnt)
337 );
338 hk_lfr_dpu_spw_last_timc->setText("hk_lfr_dpu_spw_last_timc: "
339 + QString::number(
340 housekeepingPacket->hk_lfr_dpu_spw_last_timc)
341 );
342 }
343
344 void HKDisplay::updateErrorCountersSpaceWire(Packet_TM_LFR_HK_t *housekeepingPacket)
345 {
346 hk_lfr_dpu_spw_parity->setText("hk_lfr_dpu_spw_parity: "
347 + QString::number(
348 housekeepingPacket->hk_lfr_dpu_spw_parity)
349 );
350 hk_lfr_dpu_spw_disconnect->setText("hk_lfr_dpu_spw_disconnect: "
351 + QString::number(
352 housekeepingPacket->hk_lfr_dpu_spw_disconnect)
353 );
354 hk_lfr_dpu_spw_escape->setText("hk_lfr_dpu_spw_escape: "
355 + QString::number(
356 housekeepingPacket->hk_lfr_dpu_spw_escape)
357 );
358 hk_lfr_dpu_spw_credit->setText("hk_lfr_dpu_spw_credit: "
359 + QString::number(
360 housekeepingPacket->hk_lfr_dpu_spw_credit)
361 );
362 hk_lfr_dpu_spw_write_sync->setText("hk_lfr_dpu_spw_write_sync: "
363 + QString::number(
364 housekeepingPacket->hk_lfr_dpu_spw_write_sync)
365 );
366 hk_lfr_dpu_spw_rx_ahb->setText("hk_lfr_dpu_spw_rx_ahb: "
367 + QString::number(
368 housekeepingPacket->hk_lfr_dpu_spw_rx_ahb)
369 );
370 hk_lfr_dpu_spw_tx_ahb->setText("hk_lfr_dpu_spw_tx_ahb: "
371 + QString::number(
372 housekeepingPacket->hk_lfr_dpu_spw_tx_ahb)
373 );
374 hk_lfr_dpu_spw_header_crc->setText("hk_lfr_dpu_spw_header_crc: "
375 + QString::number(
376 housekeepingPacket->hk_lfr_dpu_spw_header_crc)
377 );
378 hk_lfr_dpu_spw_data_crc->setText("hk_lfr_dpu_spw_data_crc: "
379 + QString::number(
380 housekeepingPacket->hk_lfr_dpu_spw_data_crc)
381 );
382 hk_lfr_dpu_spw_early_eop->setText("hk_lfr_dpu_spw_early_eop: "
383 + QString::number(
384 housekeepingPacket->hk_lfr_dpu_spw_early_eop)
385 );
386 hk_lfr_dpu_spw_invalid_addr->setText("hk_lfr_dpu_spw_invalid_addr: "
387 + QString::number(
388 housekeepingPacket->hk_lfr_dpu_spw_invalid_addr)
389 );
390 hk_lfr_dpu_spw_eep->setText("hk_lfr_dpu_spw_eep: "
391 + QString::number(
392 housekeepingPacket->hk_lfr_dpu_spw_eep)
393 );
394 hk_lfr_dpu_spw_rx_too_big->setText("hk_lfr_dpu_spw_rx_too_big: "
395 + QString::number(
396 housekeepingPacket->hk_lfr_dpu_spw_rx_too_big)
397 );
398 }
@@ -17,9 +17,20 class HKDisplay : public QWidget
17 public:
17 public:
18 explicit HKDisplay(QWidget *parent = 0);
18 explicit HKDisplay(QWidget *parent = 0);
19 void displayPacket(TMPacketToRead *tmPacketToRead);
19 void displayPacket(TMPacketToRead *tmPacketToRead);
20
21 void setupLFRStatusWord();
22 void setupLFRSWVersion();
23 void setupTCStatistics();
24 void setupAnomalyStatistics();
25 void setupSpaceWireIFStatistics();
26 void setupErrorCountersSpaceWire();
27
20 void updateLFRMode(Packet_TM_LFR_HK_t *housekeepingPacket);
28 void updateLFRMode(Packet_TM_LFR_HK_t *housekeepingPacket);
21 void updateSWVersion(Packet_TM_LFR_HK_t *housekeepingPacket);
29 void updateSWVersion(Packet_TM_LFR_HK_t *housekeepingPacket);
22 void updateTCStatistics(Packet_TM_LFR_HK_t *housekeepingPacket);
30 void updateTCStatistics(Packet_TM_LFR_HK_t *housekeepingPacket);
31 void updateAnomalyStatistics(Packet_TM_LFR_HK_t *housekeepingPacket);
32 void updateSpaceWireIFStatistics(Packet_TM_LFR_HK_t *housekeepingPacket);
33 void updateErrorCountersSpaceWire(Packet_TM_LFR_HK_t *housekeepingPacket);
23
34
24 signals:
35 signals:
25 void displayMessage(QString message);
36 void displayMessage(QString message);
@@ -1,6 +1,6
1 #############################################################################
1 #############################################################################
2 # Makefile for building: gselesia
2 # Makefile for building: lfrsgse
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Tue Jun 18 10:19:47 2013
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jun 28 13:46:55 2013
4 # Project: gselesia.pro
4 # Project: gselesia.pro
5 # Template: app
5 # Template: app
6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro
6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro
@@ -113,9 +113,9 DIST = /usr/lib64/qt4/mkspecs/c
113 /usr/lib64/qt4/mkspecs/features/lex.prf \
113 /usr/lib64/qt4/mkspecs/features/lex.prf \
114 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
114 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
115 gselesia.pro
115 gselesia.pro
116 QMAKE_TARGET = gselesia
116 QMAKE_TARGET = lfrsgse
117 DESTDIR =
117 DESTDIR =
118 TARGET = gselesia
118 TARGET = lfrsgse
119
119
120 first: all
120 first: all
121 ####### Implicit rules
121 ####### Implicit rules
@@ -205,8 +205,8 qmake: FORCE
205 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro
205 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro
206
206
207 dist:
207 dist:
208 @$(CHK_DIR_EXISTS) .tmp/gselesia1.0.0 || $(MKDIR) .tmp/gselesia1.0.0
208 @$(CHK_DIR_EXISTS) .tmp/lfrsgse1.0.0 || $(MKDIR) .tmp/lfrsgse1.0.0
209 $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/gselesia1.0.0/ && $(COPY_FILE) --parents mainwindow.h mainwindowui.h ../common_PLE/qipdialogbox.h lfrxmlhandler.h lfrxmlwriter.h ../rmapplugin/tmstatistics.h ../rmapplugin/tmpackettoread.h ../rmapplugin/wfpacket.h ../common_PLE/hkdisplay.h ../rmapplugin/params.h ../../DEV_PLE/header/ccsds_types.h lfrxmlparser.h lfrspectrogram.h .tmp/gselesia1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp mainwindowui.cpp ../common_PLE/qipdialogbox.cpp lfrxmlhandler.cpp lfrxmlwriter.cpp ../rmapplugin/tmstatistics.cpp ../rmapplugin/tmpackettoread.cpp ../rmapplugin/wfpacket.cpp ../common_PLE/hkdisplay.cpp lfrxmlparser.cpp lfrspectrogram.cpp .tmp/gselesia1.0.0/ && (cd `dirname .tmp/gselesia1.0.0` && $(TAR) gselesia1.0.0.tar gselesia1.0.0 && $(COMPRESS) gselesia1.0.0.tar) && $(MOVE) `dirname .tmp/gselesia1.0.0`/gselesia1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/gselesia1.0.0
209 $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/lfrsgse1.0.0/ && $(COPY_FILE) --parents mainwindow.h mainwindowui.h ../common_PLE/qipdialogbox.h lfrxmlhandler.h lfrxmlwriter.h ../rmapplugin/tmstatistics.h ../rmapplugin/tmpackettoread.h ../rmapplugin/wfpacket.h ../common_PLE/hkdisplay.h ../rmapplugin/params.h ../../DEV_PLE/header/ccsds_types.h lfrxmlparser.h lfrspectrogram.h .tmp/lfrsgse1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp mainwindowui.cpp ../common_PLE/qipdialogbox.cpp lfrxmlhandler.cpp lfrxmlwriter.cpp ../rmapplugin/tmstatistics.cpp ../rmapplugin/tmpackettoread.cpp ../rmapplugin/wfpacket.cpp ../common_PLE/hkdisplay.cpp lfrxmlparser.cpp lfrspectrogram.cpp .tmp/lfrsgse1.0.0/ && (cd `dirname .tmp/lfrsgse1.0.0` && $(TAR) lfrsgse1.0.0.tar lfrsgse1.0.0 && $(COMPRESS) lfrsgse1.0.0.tar) && $(MOVE) `dirname .tmp/lfrsgse1.0.0`/lfrsgse1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/lfrsgse1.0.0
210
210
211
211
212 clean:compiler_clean
212 clean:compiler_clean
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -1,6 +1,6
1 <?xml version="1.0" encoding="UTF-8"?>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE QtCreatorProject>
2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by Qt Creator 2.4.1, 2013-06-18T10:58:40. -->
3 <!-- Written by Qt Creator 2.4.1, 2013-06-28T13:47:27. -->
4 <qtcreator>
4 <qtcreator>
5 <data>
5 <data>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -26,6 +26,7 void LFRXmlParser::processIncomingStr(QS
26 xmlBuffer.remove(0, indexOfStopStr + stopStr.size());
26 xmlBuffer.remove(0, indexOfStopStr + stopStr.size());
27 result = findPattern( startStr, stopStr, &indexOfStartStr, &indexOfStopStr);
27 result = findPattern( startStr, stopStr, &indexOfStartStr, &indexOfStopStr);
28 }
28 }
29 emit processPacketStore();
29 }
30 }
30
31
31 int LFRXmlParser::findPattern(QString startStr, QString stopStr, int *indexOfStartStr, int *indexOfStopStr)
32 int LFRXmlParser::findPattern(QString startStr, QString stopStr, int *indexOfStartStr, int *indexOfStopStr)
@@ -59,5 +60,6 void LFRXmlParser::processIncomingData(c
59 ccsdsData = (unsigned char *) values;
60 ccsdsData = (unsigned char *) values;
60
61
61 incomingPacket = new TMPacketToRead(ccsdsData, ccsdsSize);
62 incomingPacket = new TMPacketToRead(ccsdsData, ccsdsSize);
62 emit sendPacket( incomingPacket );
63
64 generalCCSDSPacketStore->append(incomingPacket);
63 }
65 }
@@ -12,10 +12,11 public:
12 void processIncomingStr(QString incomingStr);
12 void processIncomingStr(QString incomingStr);
13 int findPattern(QString startStr, QString stopStr, int *indexOfStartStr, int *indexOfStopStr);
13 int findPattern(QString startStr, QString stopStr, int *indexOfStartStr, int *indexOfStopStr);
14 void processIncomingData(const QString &ch);
14 void processIncomingData(const QString &ch);
15 QList<TMPacketToRead*> *generalCCSDSPacketStore;
15
16
16 signals:
17 signals:
17 void sendMessage(QString);
18 void sendMessage(QString);
18 void sendPacket(TMPacketToRead *incomingPacket);
19 void processPacketStore();
19
20
20 public slots:
21 public slots:
21
22
@@ -29,6 +29,8 MainWindow::MainWindow(QWidget *parent)
29
29
30 UI = new MainWindowUI();
30 UI = new MainWindowUI();
31
31
32 lfrXmlParser->generalCCSDSPacketStore = &this->generalCCSDSPacketStore;
33
32 initSocketStatesList();
34 initSocketStatesList();
33
35
34 this->setLayout(UI->layout());
36 this->setLayout(UI->layout());
@@ -59,8 +61,8 MainWindow::MainWindow(QWidget *parent)
59 connect(this->lfrXmlParser, SIGNAL(sendMessage(QString)),
61 connect(this->lfrXmlParser, SIGNAL(sendMessage(QString)),
60 this, SLOT(displayOnConsole(QString)));
62 this, SLOT(displayOnConsole(QString)));
61 //
63 //
62 connect(this->lfrXmlParser, SIGNAL(sendPacket(TMPacketToRead*)),
64 connect(this->lfrXmlParser, SIGNAL(processPacketStore()),
63 this, SLOT(processIncomingPacket(TMPacketToRead*)));
65 this, SLOT(processPacketStore()));
64 //
66 //
65 connect(this->UI->button_resetStatistics, SIGNAL(clicked()),
67 connect(this->UI->button_resetStatistics, SIGNAL(clicked()),
66 this, SLOT(resetStatistics()));
68 this, SLOT(resetStatistics()));
@@ -208,25 +210,6 void MainWindow::readDataOnSocketEchoSer
208 dataArray.clear();
210 dataArray.clear();
209 }
211 }
210
212
211 void MainWindow::processIncomingData(const QString &ch)
212 {
213 QByteArray newdat;
214 char *values;
215 unsigned char *ccsdsData;
216 unsigned int ccsdsSize = 0;
217
218 TMPacketToRead *incomingPacket;
219
220 newdat = QByteArray::fromHex(ch.toAscii());
221
222 values = (char*) newdat.data();
223 ccsdsSize = newdat.size();
224 ccsdsData = (unsigned char *) values;
225
226 incomingPacket = new TMPacketToRead(ccsdsData, ccsdsSize);
227 processIncomingPacket( incomingPacket );
228 }
229
230 void MainWindow::displayOnConsole(QString message)
213 void MainWindow::displayOnConsole(QString message)
231 {
214 {
232 this->UI->displayOnConsole( message );
215 this->UI->displayOnConsole( message );
@@ -274,16 +257,24 void MainWindow::preProcessPacket(TMPack
274 sub = packet->Value[12]; // SUBTYPE
257 sub = packet->Value[12]; // SUBTYPE
275 sid = 0;
258 sid = 0;
276 length = packet->Value[8] * 256 + packet->Value[9];
259 length = packet->Value[8] * 256 + packet->Value[9];
260 // compare length in the packet with the size of the packet
261 if ( (length + 1 + 10) != (packet->size))
262 {
263 displayOnConsole("reception of " + QString::number(packet->size)
264 + " bytes instead of " + QString::number(length + 1 + 10));
265 }
277 coarse_t = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16)
266 coarse_t = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16)
278 + packet->Value[16] * pow(2, 8) + packet->Value[17];
267 + packet->Value[16] * pow(2, 8) + packet->Value[17];
279 fine_t = packet->Value[18] * pow(2, 8) + packet->Value[19];
268 fine_t = packet->Value[18] * pow(2, 8) + packet->Value[19];
280
269
281 if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8))
270 if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8))
282 sid = packet->Value[20] * 256 + packet->Value[21];
271 sid = packet->Value[20] * 256 + packet->Value[21];
272 else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25))
273 sid = 1;
283 else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3))
274 else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3))
284 sid = packet->Value[20];
275 sid = packet->Value[20];
285 else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25))
276 else if ((pid == 79) & (cat == 12) & (typ == 21) & (sub == 3))
286 sid = 1;
277 sid = packet->Value[20];
287
278
288 this->UI->tmStatistics->updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t);
279 this->UI->tmStatistics->updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t);
289
280
@@ -312,6 +303,15 void MainWindow::preProcessPacket(TMPack
312 case SID_NORMAL_CWF_F3:
303 case SID_NORMAL_CWF_F3:
313 buildWFAndDisplay(packet, &wfPacketNormal[3], 3);
304 buildWFAndDisplay(packet, &wfPacketNormal[3], 3);
314 break;
305 break;
306 case SID_BURST_CWF_F2:
307 buildWFAndDisplayBurst(packet, &wfPacketBurst);
308 break;
309 case SID_SBM1_CWF_F1:
310 buildWFAndDisplaySBM1(packet, &wfPacketSBM1);
311 break;
312 case SID_SBM2_CWF_F2:
313 buildWFAndDisplaySBM2(packet, &wfPacketSBM2);
314 break;
315 }
315 }
316 }
316 }
317 }
317 }
@@ -325,8 +325,8 void MainWindow::buildWFAndDisplay(TMPac
325 unsigned int blk_nr = 0;
325 unsigned int blk_nr = 0;
326
326
327 pkt_nr = packet->Value[23]; // PKT_NR
327 pkt_nr = packet->Value[23]; // PKT_NR
328 blk_nr = packet->Value[24] * 256 + packet->Value[25];
328 blk_nr = packet->Value[30] * 256 + packet->Value[31];
329 data = &packet->Value[26]; // start of the first data block;
329 data = &packet->Value[32]; // start of the first data block;
330 j = (pkt_nr-1) * 340;
330 j = (pkt_nr-1) * 340;
331 for ( i=0; i<blk_nr; i++ ){
331 for ( i=0; i<blk_nr; i++ ){
332 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
332 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
@@ -347,6 +347,102 void MainWindow::buildWFAndDisplay(TMPac
347 }
347 }
348 }
348 }
349
349
350 void MainWindow::buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket)
351 {
352 unsigned int i = 0;
353 unsigned int j = 0;
354 unsigned char *data;
355 static unsigned char pkt_nr = 1;
356 unsigned int blk_nr = 0;
357
358 blk_nr = packet->Value[28] * 256 + packet->Value[29];
359 data = &packet->Value[30]; // start of the first data block;
360 j = (pkt_nr-1) * 340;
361 for ( i=0; i<blk_nr; i++ ){
362 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
363 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
364 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
365 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
366 wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
367 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) );
368 }
369 pkt_nr = pkt_nr + 1;
370 if (blk_nr == 8)
371 {
372 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_v, 0);
373 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_e1, 1);
374 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_e2, 2);
375 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b1, 3);
376 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b2, 4);
377 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b3, 5);
378 pkt_nr = 1;
379 }
380 }
381
382 void MainWindow::buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket)
383 {
384 unsigned int i = 0;
385 unsigned int j = 0;
386 unsigned char *data;
387 static unsigned char pkt_nr = 1;
388 unsigned int blk_nr = 0;
389
390 blk_nr = packet->Value[28] * 256 + packet->Value[29];
391 data = &packet->Value[30]; // start of the first data block;
392 j = (pkt_nr-1) * 340;
393 for ( i=0; i<blk_nr; i++ ){
394 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
395 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
396 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
397 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
398 wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
399 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) );
400 }
401 pkt_nr = pkt_nr + 1;
402 if (blk_nr == 8)
403 {
404 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_v, 0);
405 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e1, 1);
406 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e2, 2);
407 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b1, 3);
408 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b2, 4);
409 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b3, 5);
410 pkt_nr = 1;
411 }
412 }
413
414 void MainWindow::buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket)
415 {
416 unsigned int i = 0;
417 unsigned int j = 0;
418 unsigned char *data;
419 static unsigned char pkt_nr = 1;
420 unsigned int blk_nr = 0;
421
422 blk_nr = packet->Value[28] * 256 + packet->Value[29];
423 data = &packet->Value[30]; // start of the first data block;
424 j = (pkt_nr-1) * 340;
425 for ( i=0; i<blk_nr; i++ ){
426 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
427 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
428 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
429 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
430 wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
431 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) );
432 }
433 pkt_nr = pkt_nr + 1;
434 if (blk_nr == 8)
435 {
436 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_v, 0);
437 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_e1, 1);
438 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_e2, 2);
439 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b1, 3);
440 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b2, 4);
441 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b3, 5);
442 pkt_nr = 1;
443 }
444 }
445
350 void MainWindow::processIncomingPacket(TMPacketToRead *packet)
446 void MainWindow::processIncomingPacket(TMPacketToRead *packet)
351 {
447 {
352 totalOfBytes = totalOfBytes + packet->size;
448 totalOfBytes = totalOfBytes + packet->size;
@@ -354,7 +450,6 void MainWindow::processIncomingPacket(T
354 this->UI->totalOfBytesHasChanged(totalOfBytes);
450 this->UI->totalOfBytesHasChanged(totalOfBytes);
355 this->UI->totalOfPacketsHasChanged(totalOfPackets);
451 this->UI->totalOfPacketsHasChanged(totalOfPackets);
356 preProcessPacket(packet);
452 preProcessPacket(packet);
357 packet->deleteLater();
358 }
453 }
359
454
360 void MainWindow::resetStatistics()
455 void MainWindow::resetStatistics()
@@ -364,3 +459,14 void MainWindow::resetStatistics()
364 this->UI->totalOfBytesHasChanged(totalOfBytes);
459 this->UI->totalOfBytesHasChanged(totalOfBytes);
365 this->UI->totalOfPacketsHasChanged(totalOfPackets);
460 this->UI->totalOfPacketsHasChanged(totalOfPackets);
366 }
461 }
462
463 void MainWindow::processPacketStore()
464 {
465 TMPacketToRead *packet;
466 while(!generalCCSDSPacketStore.isEmpty())
467 {
468 packet = generalCCSDSPacketStore.takeFirst();
469 processIncomingPacket(packet);
470 delete(packet);
471 }
472 }
@@ -22,10 +22,12 public:
22 ~MainWindow();
22 ~MainWindow();
23
23
24 void displayNetworkInterfaces();
24 void displayNetworkInterfaces();
25 void processIncomingData(const QString &ch);
26 void initSocketStatesList();
25 void initSocketStatesList();
27 void preProcessPacket(TMPacketToRead *packet);
26 void preProcessPacket(TMPacketToRead *packet);
28 void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page);
27 void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page);
28 void buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket);
29 void buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket);
30 void buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket);
29
31
30 private:
32 private:
31 QByteArray dataArray;
33 QByteArray dataArray;
@@ -55,6 +57,9 private:
55 LFRXmlWriter *lfrXmlWriter;
57 LFRXmlWriter *lfrXmlWriter;
56
58
57 WFPacket wfPacketNormal[4];
59 WFPacket wfPacketNormal[4];
60 WFPacket wfPacketBurst;
61 WFPacket wfPacketSBM1;
62 WFPacket wfPacketSBM2;
58
63
59 bool parsingContinue;
64 bool parsingContinue;
60
65
@@ -74,6 +79,7 public slots:
74 void socket_TMEcho_ServerHasChanged();
79 void socket_TMEcho_ServerHasChanged();
75 void processIncomingPacket(TMPacketToRead *packet);
80 void processIncomingPacket(TMPacketToRead *packet);
76 void resetStatistics();
81 void resetStatistics();
82 void processPacketStore();
77 };
83 };
78
84
79 #endif // MAINWINDOW_H
85 #endif // MAINWINDOW_H
@@ -20,12 +20,17 MainWindowUI::MainWindowUI(QWidget *pare
20 spwTabWidgetPage2 = new QWidget;
20 spwTabWidgetPage2 = new QWidget;
21 spwTabWidgetPage3 = new QWidget;
21 spwTabWidgetPage3 = new QWidget;
22 spwTabWidgetPage4 = new QWidget;
22 spwTabWidgetPage4 = new QWidget;
23 spwTabWidgetPage5 = new QWidget;
23 spwTabWidgetPage5 = new QWidget; // WFRM BURST
24 spwTabWidgetPage6 = new QWidget; // WFRM SBM1
25 spwTabWidgetPage7 = new QWidget; // WFRM SBM2
24
26
25 tmStatistics = new TMStatistics;
27 tmStatistics = new TMStatistics;
26
28
27 wfDisplay = new WFDisplay;
29 wfDisplay = new WFDisplay();
28 hkDisplay = new HKDisplay;
30 wfPageBurst = new WFPage();
31 wfPageSBM1 = new WFPage();
32 wfPageSBM2 = new WFPage();
33 hkDisplay = new HKDisplay();
29 lfrSpectrogam = new LFRSpectrogram();
34 lfrSpectrogam = new LFRSpectrogram();
30
35
31 spinbox_TMServerPort = new QSpinBox();
36 spinbox_TMServerPort = new QSpinBox();
@@ -89,7 +94,10 MainWindowUI::MainWindowUI(QWidget *pare
89 spwTabWidget->addTab(spwTabWidgetPage0, tr("Connection"));
94 spwTabWidget->addTab(spwTabWidgetPage0, tr("Connection"));
90 spwTabWidget->addTab(spwTabWidgetPage1, tr("TM Statistics"));
95 spwTabWidget->addTab(spwTabWidgetPage1, tr("TM Statistics"));
91 spwTabWidget->addTab(spwTabWidgetPage3, tr("HK"));
96 spwTabWidget->addTab(spwTabWidgetPage3, tr("HK"));
92 spwTabWidget->addTab(spwTabWidgetPage2, tr("Waveforms"));
97 spwTabWidget->addTab(spwTabWidgetPage2, tr("WFRM NORM"));
98 spwTabWidget->addTab(spwTabWidgetPage5, tr("WFRM BURST"));
99 spwTabWidget->addTab(spwTabWidgetPage6, tr("WFRM SBM1"));
100 spwTabWidget->addTab(spwTabWidgetPage7, tr("WFRM SBM2"));
93 spwTabWidget->addTab(spwTabWidgetPage4, tr("Spectrograms"));
101 spwTabWidget->addTab(spwTabWidgetPage4, tr("Spectrograms"));
94
102
95 spwTabWidgetPage0->setLayout(mainLayout);
103 spwTabWidgetPage0->setLayout(mainLayout);
@@ -97,6 +105,9 MainWindowUI::MainWindowUI(QWidget *pare
97 spwTabWidgetPage2->setLayout(wfDisplay->layout());
105 spwTabWidgetPage2->setLayout(wfDisplay->layout());
98 spwTabWidgetPage3->setLayout(hkDisplay->layout());
106 spwTabWidgetPage3->setLayout(hkDisplay->layout());
99 spwTabWidgetPage4->setLayout(lfrSpectrogam->layout());
107 spwTabWidgetPage4->setLayout(lfrSpectrogam->layout());
108 spwTabWidgetPage5->setLayout(wfPageBurst->layout());
109 spwTabWidgetPage6->setLayout(wfPageSBM1->layout());
110 spwTabWidgetPage7->setLayout(wfPageSBM2->layout());
100
111
101 layout_overallLayout->addWidget(spwTabWidget);
112 layout_overallLayout->addWidget(spwTabWidget);
102
113
@@ -36,10 +36,15 public:
36 QWidget* spwTabWidgetPage3;
36 QWidget* spwTabWidgetPage3;
37 QWidget* spwTabWidgetPage4;
37 QWidget* spwTabWidgetPage4;
38 QWidget* spwTabWidgetPage5;
38 QWidget* spwTabWidgetPage5;
39 QWidget* spwTabWidgetPage6;
40 QWidget* spwTabWidgetPage7;
39
41
40 TMStatistics* tmStatistics;
42 TMStatistics* tmStatistics;
41
43
42 WFDisplay* wfDisplay;
44 WFDisplay* wfDisplay;
45 WFPage* wfPageBurst;
46 WFPage* wfPageSBM1;
47 WFPage* wfPageSBM2;
43 HKDisplay* hkDisplay;
48 HKDisplay* hkDisplay;
44 LFRSpectrogram* lfrSpectrogam;
49 LFRSpectrogram* lfrSpectrogam;
45
50
@@ -278,10 +278,12 void rmapplugin::preProcessPacket(TMPack
278
278
279 if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8))
279 if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8))
280 sid = packet->Value[20] * 256 + packet->Value[21];
280 sid = packet->Value[20] * 256 + packet->Value[21];
281 else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25))
282 sid = 1;
281 else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3))
283 else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3))
282 sid = packet->Value[20];
284 sid = packet->Value[20];
283 else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25))
285 else if ((pid == 79) & (cat == 12) & (typ == 21) & (sub == 3))
284 sid = 1;
286 sid = packet->Value[20];
285
287
286 emit updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t);
288 emit updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t);
287
289
@@ -7,7 +7,7 TMStatistics::TMStatistics(QWidget *pare
7 {
7 {
8 // Create Fonts
8 // Create Fonts
9 QFont font;
9 QFont font;
10 font = QFont(this->fontInfo().family(), STATISTICS_FONT_SIZE, QFont::Light);
10 //font = QFont(this->fontInfo().family(), STATISTICS_FONT_SIZE, QFont::Light);
11
11
12 label_UNKNOWN = new QLabel("UNKNOWN");
12 label_UNKNOWN = new QLabel("UNKNOWN");
13 label_UNKNOWN_nb = new QLabel("-");
13 label_UNKNOWN_nb = new QLabel("-");
@@ -70,7 +70,7 TMStatistics::TMStatistics(QWidget *pare
70
70
71 //**********************
71 //**********************
72 // TM_LFR_SCIENCE_BURST_
72 // TM_LFR_SCIENCE_BURST_
73 label_BURST_CWF_F2 = new QLabel("CWF_F3");
73 label_BURST_CWF_F2 = new QLabel("CWF_F2");
74 label_BURST_BP1_F0 = new QLabel("BP1_F0");
74 label_BURST_BP1_F0 = new QLabel("BP1_F0");
75 label_BURST_BP2_F0 = new QLabel("BP2_F0");
75 label_BURST_BP2_F0 = new QLabel("BP2_F0");
76 label_BURST_BP1_F1 = new QLabel("BP1_F1");
76 label_BURST_BP1_F1 = new QLabel("BP1_F1");
@@ -192,7 +192,7 void TMStatistics::initConstants()
192 BURST_BP2_F0_nb = 0;
192 BURST_BP2_F0_nb = 0;
193 BURST_BP1_F1_nb = 0;
193 BURST_BP1_F1_nb = 0;
194 BURST_BP2_F1_nb = 0;
194 BURST_BP2_F1_nb = 0;
195 SBM1_CWF_F2_nb = 0;
195 SBM1_CWF_F1_nb = 0;
196 SBM1_BP1_F0_nb = 0;
196 SBM1_BP1_F0_nb = 0;
197 SBM1_BP2_F0_nb = 0;
197 SBM1_BP2_F0_nb = 0;
198 SBM2_CWF_F2_nb = 0;
198 SBM2_CWF_F2_nb = 0;
@@ -371,6 +371,12 void TMStatistics::resetStatistics()
371 label_NORM_SWF_F2_nb->setText("-");
371 label_NORM_SWF_F2_nb->setText("-");
372 label_NORM_CWF_F3_nb->setText("-");
372 label_NORM_CWF_F3_nb->setText("-");
373 //
373 //
374 label_BURST_CWF_F2_nb->setText("-");
375 //
376 label_SBM1_CWF_F1_nb->setText("-");
377 //
378 label_SBM2_CWF_F2_nb->setText("-");
379 //
374 label_PID_is->setText("-");
380 label_PID_is->setText("-");
375 label_CAT_is->setText("-");
381 label_CAT_is->setText("-");
376 label_TYP_is->setText("-");
382 label_TYP_is->setText("-");
@@ -465,6 +471,11 void TMStatistics::updateStatistics(unsi
465 NORM_CWF_F3_nb = NORM_CWF_F3_nb + 1;
471 NORM_CWF_F3_nb = NORM_CWF_F3_nb + 1;
466 label_NORM_CWF_F3_nb->setText(QString::number(NORM_CWF_F3_nb));
472 label_NORM_CWF_F3_nb->setText(QString::number(NORM_CWF_F3_nb));
467 }
473 }
474 else if (sid == 2)
475 {
476 BURST_CWF_F2_nb = BURST_CWF_F2_nb + 1;
477 label_BURST_CWF_F2_nb->setText(QString::number(BURST_CWF_F2_nb));
478 }
468 else if (sid == 3)
479 else if (sid == 3)
469 {
480 {
470 NORM_SWF_F0_nb = NORM_SWF_F0_nb + 1;
481 NORM_SWF_F0_nb = NORM_SWF_F0_nb + 1;
@@ -480,6 +491,16 void TMStatistics::updateStatistics(unsi
480 NORM_SWF_F2_nb = NORM_SWF_F2_nb + 1;
491 NORM_SWF_F2_nb = NORM_SWF_F2_nb + 1;
481 label_NORM_SWF_F2_nb->setText(QString::number(NORM_SWF_F2_nb));
492 label_NORM_SWF_F2_nb->setText(QString::number(NORM_SWF_F2_nb));
482 }
493 }
494 else if (sid == 24)
495 {
496 SBM1_CWF_F1_nb = SBM1_CWF_F1_nb + 1;
497 label_SBM1_CWF_F1_nb->setText(QString::number(SBM1_CWF_F1_nb));
498 }
499 else if (sid == 25)
500 {
501 SBM2_CWF_F2_nb = SBM2_CWF_F2_nb + 1;
502 label_SBM2_CWF_F2_nb->setText(QString::number(SBM2_CWF_F2_nb));
503 }
483 else
504 else
484 {
505 {
485 incrementUnknown();
506 incrementUnknown();
@@ -51,7 +51,7 public:
51 unsigned int BURST_BP2_F0_nb;
51 unsigned int BURST_BP2_F0_nb;
52 unsigned int BURST_BP1_F1_nb;
52 unsigned int BURST_BP1_F1_nb;
53 unsigned int BURST_BP2_F1_nb;
53 unsigned int BURST_BP2_F1_nb;
54 unsigned int SBM1_CWF_F2_nb;
54 unsigned int SBM1_CWF_F1_nb;
55 unsigned int SBM1_BP1_F0_nb;
55 unsigned int SBM1_BP1_F0_nb;
56 unsigned int SBM1_BP2_F0_nb;
56 unsigned int SBM1_BP2_F0_nb;
57 unsigned int SBM2_CWF_F2_nb;
57 unsigned int SBM2_CWF_F2_nb;
@@ -1,6 +1,6
1 #############################################################################
1 #############################################################################
2 # Makefile for building: libwfdisplay.so.1.0.0
2 # Makefile for building: libwfdisplay.so.1.0.0
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri May 31 14:14:01 2013
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jun 28 09:02:23 2013
4 # Project: wfdisplay.pro
4 # Project: wfdisplay.pro
5 # Template: lib
5 # Template: lib
6 # Command: /usr/bin/qmake-qt4 -o Makefile wfdisplay.pro
6 # Command: /usr/bin/qmake-qt4 -o Makefile wfdisplay.pro
@@ -61,7 +61,7 DIST = /usr/lib64/qt4/mkspecs/c
61 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
61 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
62 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
62 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
63 /usr/lib64/qt4/mkspecs/qconfig.pri \
63 /usr/lib64/qt4/mkspecs/qconfig.pri \
64 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \
64 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
65 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
65 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
66 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
66 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
67 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
67 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
@@ -134,7 +134,7 Makefile: wfdisplay.pro /usr/lib64/qt4/
134 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
134 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
135 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
135 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
136 /usr/lib64/qt4/mkspecs/qconfig.pri \
136 /usr/lib64/qt4/mkspecs/qconfig.pri \
137 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \
137 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
138 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
138 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
139 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
139 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
140 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
140 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
@@ -161,7 +161,7 Makefile: wfdisplay.pro /usr/lib64/qt4/
161 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
161 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
162 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
162 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
163 /usr/lib64/qt4/mkspecs/qconfig.pri:
163 /usr/lib64/qt4/mkspecs/qconfig.pri:
164 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri:
164 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri:
165 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
165 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
166 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
166 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
167 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
167 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
@@ -13,10 +13,10 WFDisplay::WFDisplay(QWidget *parent) :
13 page_f2 = new WFPage;
13 page_f2 = new WFPage;
14 page_f3 = new WFPage;
14 page_f3 = new WFPage;
15
15
16 spwTabWidget->addTab(page_f0, tr("f0"));
16 spwTabWidget->addTab(page_f0, tr("f0 (24576 Hz)"));
17 spwTabWidget->addTab(page_f1, tr("f1"));
17 spwTabWidget->addTab(page_f1, tr("f1 (4096 Hz"));
18 spwTabWidget->addTab(page_f2, tr("f2"));
18 spwTabWidget->addTab(page_f2, tr("f2 (256 Hz)"));
19 spwTabWidget->addTab(page_f3, tr("f3"));
19 spwTabWidget->addTab(page_f3, tr("f3 (16 Hz)"));
20
20
21 waveforms_LAYOUT->addWidget(spwTabWidget);
21 waveforms_LAYOUT->addWidget(spwTabWidget);
22
22
@@ -1,6 +1,6
1 <?xml version="1.0" encoding="UTF-8"?>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE QtCreatorProject>
2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by Qt Creator 2.4.1, 2013-05-31T15:27:20. -->
3 <!-- Written by Qt Creator 2.4.1, 2013-06-28T13:26:54. -->
4 <qtcreator>
4 <qtcreator>
5 <data>
5 <data>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -244,7 +244,7
244 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
244 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
245 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
245 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
246 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
246 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
247 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
247 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
248 </valuemap>
248 </valuemap>
249 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
249 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
250 </valuemap>
250 </valuemap>
@@ -10,10 +10,8 WFPage::WFPage(QWidget *parent) :
10 wfPlot_b2 = new WFPlot();
10 wfPlot_b2 = new WFPlot();
11 wfPlot_b3 = new WFPlot();
11 wfPlot_b3 = new WFPlot();
12 //
12 //
13 //wfPlot_v->customPlot->setTitle("v");
13 wfPlot_v->customPlot->setTitle("v");
14 wfPlot_v->customPlot->setGraphName(0, "v");
14 wfPlot_e1->customPlot->setTitle("e1");
15 //wfPlot_e1->customPlot->setTitle("e1");
16 wfPlot_e1->customPlot->setGraphName(0, "e1");
17 wfPlot_e2->customPlot->setTitle("e2");
15 wfPlot_e2->customPlot->setTitle("e2");
18 wfPlot_b1->customPlot->setTitle("b1");
16 wfPlot_b1->customPlot->setTitle("b1");
19 wfPlot_b2->customPlot->setTitle("b2");
17 wfPlot_b2->customPlot->setTitle("b2");
General Comments 0
You need to be logged in to leave comments. Login now