@@ -0,0 +1,398 | |||||
|
1 | #include "hkdisplay.h" | |||
|
2 | ||||
|
3 | HKDisplay::HKDisplay(QWidget *parent) : | |||
|
4 | QWidget(parent) | |||
|
5 | { | |||
|
6 | mainLayout = new QGridLayout(); | |||
|
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 | { | |||
|
28 | groupbox_lfrStatusWord = new QGroupBox("LFR Status Word"); | |||
|
29 | box_lfrStatusWord = new QVBoxLayout(); | |||
|
30 | hk_lfr_mode = new QLabel("hk_lfr_mode: -"); | |||
|
31 | hk_lfr_dpu_spw_enabled = new QLabel("hk_lfr_dpu_spw_enabled: -"); | |||
|
32 | hk_lfr_dpu_link_state = new QLabel("hk_lfr_dpu_link_state: -"); | |||
|
33 | sy_lfr_watchdog_enabled = new QLabel("sy_lfr_watchdog_enabled: -"); | |||
|
34 | hk_lfr_calib_enabled = new QLabel("hk_lfr_calib_enabled: -"); | |||
|
35 | hk_lfr_reset_cause = new QLabel("hk_lfr_reset_cause: -"); | |||
|
36 | box_lfrStatusWord->addWidget(hk_lfr_mode); | |||
|
37 | box_lfrStatusWord->addWidget(hk_lfr_dpu_spw_enabled); | |||
|
38 | box_lfrStatusWord->addWidget(hk_lfr_dpu_link_state); | |||
|
39 | box_lfrStatusWord->addWidget(sy_lfr_watchdog_enabled); | |||
|
40 | box_lfrStatusWord->addWidget(hk_lfr_calib_enabled); | |||
|
41 | box_lfrStatusWord->addWidget(hk_lfr_reset_cause); | |||
|
42 | box_lfrStatusWord->insertStretch(6); | |||
|
43 | groupbox_lfrStatusWord->setLayout(box_lfrStatusWord); | |||
|
44 | } | |||
|
45 | ||||
|
46 | void HKDisplay::setupLFRSWVersion() | |||
|
47 | { | |||
|
48 | groupbox_lfrSWVersion = new QGroupBox("LFR Software Version"); | |||
|
49 | box_lfrSWVersion = new QVBoxLayout(); | |||
|
50 | sy_lfr_sw_version_n1 = new QLabel("sy_lfr_sw_version_n1: -"); | |||
|
51 | sy_lfr_sw_version_n2 = new QLabel("sy_lfr_sw_version_n2: -"); | |||
|
52 | sy_lfr_sw_version_n3 = new QLabel("sy_lfr_sw_version_n3: -"); | |||
|
53 | sy_lfr_sw_version_n4 = new QLabel("sy_lfr_sw_version_n4: -"); | |||
|
54 | box_lfrSWVersion->addWidget(sy_lfr_sw_version_n1); | |||
|
55 | box_lfrSWVersion->addWidget(sy_lfr_sw_version_n2); | |||
|
56 | box_lfrSWVersion->addWidget(sy_lfr_sw_version_n3); | |||
|
57 | box_lfrSWVersion->addWidget(sy_lfr_sw_version_n4); | |||
|
58 | box_lfrSWVersion->insertStretch(4); | |||
|
59 | groupbox_lfrSWVersion->setLayout(box_lfrSWVersion); | |||
|
60 | } | |||
|
61 | ||||
|
62 | void HKDisplay::setupTCStatistics() | |||
|
63 | { | |||
|
64 | groupbox_tcStatistics = new QGroupBox("TC Statistics"); | |||
|
65 | box_tcStatistics = new QVBoxLayout(); | |||
|
66 | hk_lfr_update_info_tc_cnt = new QLabel("hk_lfr_update_info_tc_cnt: -"); | |||
|
67 | hk_lfr_update_time_tc_cnt = new QLabel("hk_lfr_update_time_tc_cnt: -"); | |||
|
68 | hk_dpu_exe_tc_lfr_cnt = new QLabel("hk_dpu_exe_tc_lfr_cnt: -"); | |||
|
69 | hk_dpu_rej_tc_lfr_cnt = new QLabel("hk_dpu_rej_tc_lfr_cnt: -"); | |||
|
70 | hk_lfr_last_exe_tc_id = new QLabel("hk_lfr_last_exe_tc_id: -"); | |||
|
71 | hk_lfr_last_exe_tc_type = new QLabel("hk_lfr_last_exe_tc_type: -"); | |||
|
72 | hk_lfr_last_exe_tc_subtype = new QLabel("hk_lfr_last_exe_tc_subtype: -"); | |||
|
73 | hk_lfr_last_exe_tc_time = new QLabel("hk_lfr_last_exe_tc_time: -"); | |||
|
74 | hk_lfr_last_rej_tc_id = new QLabel("hk_lfr_last_rej_tc_id: -"); | |||
|
75 | hk_lfr_last_rej_tc_type = new QLabel("hk_lfr_last_rej_tc_type: -"); | |||
|
76 | hk_lfr_last_rej_tc_subtype = new QLabel("hk_lfr_last_rej_tc_subtype: -"); | |||
|
77 | hk_lfr_last_rej_tc_time = new QLabel("hk_lfr_last_rej_tc_time: -"); | |||
|
78 | box_tcStatistics->addWidget(hk_lfr_update_info_tc_cnt); | |||
|
79 | box_tcStatistics->addWidget(hk_lfr_update_time_tc_cnt); | |||
|
80 | box_tcStatistics->addWidget(hk_dpu_exe_tc_lfr_cnt); | |||
|
81 | box_tcStatistics->addWidget(hk_dpu_rej_tc_lfr_cnt); | |||
|
82 | box_tcStatistics->addWidget(hk_lfr_last_exe_tc_id); | |||
|
83 | box_tcStatistics->addWidget(hk_lfr_last_exe_tc_type); | |||
|
84 | box_tcStatistics->addWidget(hk_lfr_last_exe_tc_subtype); | |||
|
85 | box_tcStatistics->addWidget(hk_lfr_last_exe_tc_time); | |||
|
86 | box_tcStatistics->addWidget(hk_lfr_last_rej_tc_id); | |||
|
87 | box_tcStatistics->addWidget(hk_lfr_last_rej_tc_type); | |||
|
88 | box_tcStatistics->addWidget(hk_lfr_last_rej_tc_subtype); | |||
|
89 | box_tcStatistics->addWidget(hk_lfr_last_rej_tc_time); | |||
|
90 | box_tcStatistics->insertStretch(12, 1); | |||
|
91 | groupbox_tcStatistics->setLayout(box_tcStatistics); | |||
|
92 | } | |||
|
93 | ||||
|
94 | void HKDisplay::setupAnomalyStatistics() | |||
|
95 | { | |||
|
96 | groupbox_anomalyStatistics = new QGroupBox("Anomaly Statistics"); | |||
|
97 | box_anomalyStatistics = new QVBoxLayout(); | |||
|
98 | hk_lfr_le_cnt = new QLabel("hk_lfr_le_cnt: -"); | |||
|
99 | hk_lfr_me_cnt = new QLabel("hk_lfr_me_cnt: -"); | |||
|
100 | hk_lfr_he_cnt = new QLabel("hk_lfr_he_cnt: -"); | |||
|
101 | hk_lfr_last_er_rid = new QLabel("hk_lfr_last_er_rid: -"); | |||
|
102 | hk_lfr_last_er_code = new QLabel("hk_lfr_last_er_code: -"); | |||
|
103 | hk_lfr_last_er_time = new QLabel("hk_lfr_last_er_time: -"); | |||
|
104 | box_anomalyStatistics->addWidget(hk_lfr_le_cnt); | |||
|
105 | box_anomalyStatistics->addWidget(hk_lfr_me_cnt); | |||
|
106 | box_anomalyStatistics->addWidget(hk_lfr_he_cnt); | |||
|
107 | box_anomalyStatistics->addWidget(hk_lfr_last_er_rid); | |||
|
108 | box_anomalyStatistics->addWidget(hk_lfr_last_er_code); | |||
|
109 | box_anomalyStatistics->addWidget(hk_lfr_last_er_time); | |||
|
110 | box_anomalyStatistics->insertStretch(6, 1); | |||
|
111 | groupbox_anomalyStatistics->setLayout(box_anomalyStatistics); | |||
|
112 | } | |||
|
113 | ||||
|
114 | void HKDisplay::setupSpaceWireIFStatistics() | |||
|
115 | { | |||
|
116 | groupbox_spacewireIFStatisctics = new QGroupBox("SpaceWire IF Statistics"); | |||
|
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(); | |||
|
137 | ||||
|
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()); | |||
|
167 | } | |||
|
168 | ||||
|
169 | void HKDisplay::displayPacket(TMPacketToRead *tmPacketToRead) | |||
|
170 | { | |||
|
171 | Packet_TM_LFR_HK_t *housekeepingPacket; | |||
|
172 | if (tmPacketToRead->size != HK_PACKET_SIZE) { | |||
|
173 | emit displayMessage("in displayPacket *** HK packet size is " | |||
|
174 | + QString::number(tmPacketToRead->size) | |||
|
175 | + " instead of " | |||
|
176 | + QString::number(HK_PACKET_SIZE)); | |||
|
177 | } | |||
|
178 | else { | |||
|
179 | housekeepingPacket = (Packet_TM_LFR_HK_t *) tmPacketToRead->Value; | |||
|
180 | ||||
|
181 | updateLFRMode(housekeepingPacket); | |||
|
182 | updateSWVersion(housekeepingPacket); | |||
|
183 | updateTCStatistics(housekeepingPacket); | |||
|
184 | updateAnomalyStatistics(housekeepingPacket); | |||
|
185 | updateSpaceWireIFStatistics(housekeepingPacket); | |||
|
186 | updateErrorCountersSpaceWire(housekeepingPacket); | |||
|
187 | } | |||
|
188 | } | |||
|
189 | ||||
|
190 | void HKDisplay::updateLFRMode(Packet_TM_LFR_HK_t *housekeepingPacket) | |||
|
191 | { | |||
|
192 | hk_lfr_mode->setText("hk_lfr_mode: " | |||
|
193 | +QString::number( ( (housekeepingPacket->lfr_status_word[0] & 0x70) >> 4 ) ) | |||
|
194 | ); | |||
|
195 | ||||
|
196 | } | |||
|
197 | ||||
|
198 | void HKDisplay::updateSWVersion(Packet_TM_LFR_HK_t *housekeepingPacket) | |||
|
199 | { | |||
|
200 | sy_lfr_sw_version_n1->setText("sy_lfr_sw_version_n1: " | |||
|
201 | +QString::number( housekeepingPacket->lfr_sw_version[0] ) | |||
|
202 | ); | |||
|
203 | sy_lfr_sw_version_n2->setText("sy_lfr_sw_version_n2: " | |||
|
204 | +QString::number( housekeepingPacket->lfr_sw_version[1] ) | |||
|
205 | ); | |||
|
206 | sy_lfr_sw_version_n3->setText("sy_lfr_sw_version_n3: " | |||
|
207 | +QString::number( housekeepingPacket->lfr_sw_version[2] ) | |||
|
208 | ); | |||
|
209 | sy_lfr_sw_version_n4->setText("sy_lfr_sw_version_n4: " | |||
|
210 | +QString::number( housekeepingPacket->lfr_sw_version[3] ) | |||
|
211 | ); | |||
|
212 | } | |||
|
213 | ||||
|
214 | void HKDisplay::updateTCStatistics(Packet_TM_LFR_HK_t *housekeepingPacket) | |||
|
215 | { | |||
|
216 | // TC Statistics | |||
|
217 | hk_lfr_update_info_tc_cnt->setText("hk_lfr_update_info_tc_cnt: " | |||
|
218 | + QString::number( | |||
|
219 | housekeepingPacket->hk_lfr_update_info_tc_cnt[0] * 256 | |||
|
220 | + housekeepingPacket->hk_lfr_update_info_tc_cnt[1]) | |||
|
221 | ); | |||
|
222 | hk_lfr_update_time_tc_cnt->setText("hk_lfr_update_time_tc_cnt: " | |||
|
223 | + QString::number( | |||
|
224 | housekeepingPacket->hk_lfr_update_time_tc_cnt[0] * 256 | |||
|
225 | + housekeepingPacket->hk_lfr_update_time_tc_cnt[1]) | |||
|
226 | ); | |||
|
227 | hk_dpu_exe_tc_lfr_cnt->setText("hk_dpu_exe_tc_lfr_cnt: " | |||
|
228 | + QString::number( | |||
|
229 | housekeepingPacket->hk_dpu_exe_tc_lfr_cnt[0] * 256 | |||
|
230 | + housekeepingPacket->hk_dpu_exe_tc_lfr_cnt[1]) | |||
|
231 | ); | |||
|
232 | hk_dpu_rej_tc_lfr_cnt->setText("hk_dpu_rej_tc_lfr_cnt: " | |||
|
233 | + QString::number( | |||
|
234 | housekeepingPacket->hk_dpu_rej_tc_lfr_cnt[0] * 256 | |||
|
235 | + housekeepingPacket->hk_dpu_rej_tc_lfr_cnt[1]) | |||
|
236 | ); | |||
|
237 | hk_lfr_last_exe_tc_id->setText("hk_lfr_last_exe_tc_id: " | |||
|
238 | + QString::number( | |||
|
239 | housekeepingPacket->hk_lfr_last_exe_tc_id[0] * 256 | |||
|
240 | + housekeepingPacket->hk_lfr_last_exe_tc_id[1], 16) | |||
|
241 | ); | |||
|
242 | hk_lfr_last_exe_tc_type->setText("hk_lfr_last_exe_tc_type: " | |||
|
243 | + QString::number( | |||
|
244 | housekeepingPacket->hk_lfr_last_exe_tc_type[0] * 256 | |||
|
245 | + housekeepingPacket->hk_lfr_last_exe_tc_type[1]) | |||
|
246 | ); | |||
|
247 | hk_lfr_last_exe_tc_subtype->setText("hk_lfr_last_exe_tc_subtype: " | |||
|
248 | + QString::number( | |||
|
249 | housekeepingPacket->hk_lfr_last_exe_tc_subtype[0] * 256 | |||
|
250 | + housekeepingPacket->hk_lfr_last_exe_tc_subtype[1]) | |||
|
251 | ); | |||
|
252 | hk_lfr_last_exe_tc_time->setText("hk_lfr_last_exe_tc_time: " | |||
|
253 | + QString::number( | |||
|
254 | (housekeepingPacket->hk_lfr_last_exe_tc_time[0] << 24) | |||
|
255 | + (housekeepingPacket->hk_lfr_last_exe_tc_time[1] << 16) | |||
|
256 | + (housekeepingPacket->hk_lfr_last_exe_tc_time[2] << 8) | |||
|
257 | + (housekeepingPacket->hk_lfr_last_exe_tc_time[3]), 16 | |||
|
258 | ) | |||
|
259 | ); | |||
|
260 | hk_lfr_last_rej_tc_id->setText("hk_lfr_last_rej_tc_id: " | |||
|
261 | + QString::number( | |||
|
262 | housekeepingPacket->hk_lfr_last_rej_tc_id[0] * 256 | |||
|
263 | + housekeepingPacket->hk_lfr_last_rej_tc_id[1], 16) | |||
|
264 | ); | |||
|
265 | hk_lfr_last_rej_tc_type->setText("hk_lfr_last_rej_tc_type: " | |||
|
266 | + QString::number( | |||
|
267 | housekeepingPacket->hk_lfr_last_rej_tc_type[0] * 256 | |||
|
268 | + housekeepingPacket->hk_lfr_last_rej_tc_type[1]) | |||
|
269 | ); | |||
|
270 | hk_lfr_last_rej_tc_subtype->setText("hk_lfr_last_rej_tc_subtype: " | |||
|
271 | + QString::number( | |||
|
272 | housekeepingPacket->hk_lfr_last_rej_tc_subtype[0] * 256 | |||
|
273 | + housekeepingPacket->hk_lfr_last_rej_tc_subtype[1]) | |||
|
274 | ); | |||
|
275 | hk_lfr_last_rej_tc_time->setText("hk_lfr_last_rej_tc_time: " | |||
|
276 | + QString::number( | |||
|
277 | (housekeepingPacket->hk_lfr_last_rej_tc_time[0] << 24) | |||
|
278 | + (housekeepingPacket->hk_lfr_last_rej_tc_time[1] << 16) | |||
|
279 | + (housekeepingPacket->hk_lfr_last_rej_tc_time[2] << 8) | |||
|
280 | + (housekeepingPacket->hk_lfr_last_rej_tc_time[3]), 16 | |||
|
281 | ) | |||
|
282 | ); | |||
|
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 | } |
@@ -0,0 +1,168 | |||||
|
1 | #ifndef HKDISPLAY_H | |||
|
2 | #define HKDISPLAY_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <QLabel> | |||
|
6 | #include <QGroupBox> | |||
|
7 | #include <QVBoxLayout> | |||
|
8 | #include <QGridLayout> | |||
|
9 | #include "tmpackettoread.h" | |||
|
10 | #include "ccsds_types.h" | |||
|
11 | ||||
|
12 | #define HK_PACKET_SIZE 126 + 4 | |||
|
13 | ||||
|
14 | class HKDisplay : public QWidget | |||
|
15 | { | |||
|
16 | Q_OBJECT | |||
|
17 | public: | |||
|
18 | explicit HKDisplay(QWidget *parent = 0); | |||
|
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 | ||||
|
28 | void updateLFRMode(Packet_TM_LFR_HK_t *housekeepingPacket); | |||
|
29 | void updateSWVersion(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); | |||
|
34 | ||||
|
35 | signals: | |||
|
36 | void displayMessage(QString message); | |||
|
37 | ||||
|
38 | public slots: | |||
|
39 | ||||
|
40 | private: | |||
|
41 | QGroupBox *groupbox_lfrStatusWord; | |||
|
42 | QGroupBox *groupbox_lfrSWVersion; | |||
|
43 | QGroupBox *groupbox_tcStatistics; | |||
|
44 | QGroupBox *groupbox_anomalyStatistics; | |||
|
45 | //*********************************** | |||
|
46 | //*********************************** | |||
|
47 | QGroupBox *groupbox_vhdlBlockStatus; | |||
|
48 | QGroupBox *groupbox_spacewireIFStatisctics; | |||
|
49 | QGroupBox *groupbox_ahbErrorStatistics; | |||
|
50 | QGroupBox *groupbox_temperatures; | |||
|
51 | QGroupBox *groupbox_errorCountersSpaceWire; | |||
|
52 | QGroupBox *groupbox_errorCountersTime; | |||
|
53 | ||||
|
54 | QGridLayout *mainLayout; | |||
|
55 | QVBoxLayout *box_lfrStatusWord; | |||
|
56 | QVBoxLayout *box_lfrSWVersion; | |||
|
57 | QVBoxLayout *box_tcStatistics; | |||
|
58 | QVBoxLayout *box_anomalyStatistics; | |||
|
59 | //*********************************** | |||
|
60 | //*********************************** | |||
|
61 | QVBoxLayout *box_vhdlBlockStatus; | |||
|
62 | QVBoxLayout *box_spacewireIFStatisctics; | |||
|
63 | QVBoxLayout *box_ahbErrorStatistics; | |||
|
64 | QVBoxLayout *box_temperatures; | |||
|
65 | QVBoxLayout *box_errorCountersSpaceWire; | |||
|
66 | QVBoxLayout *box_errorCountersTime; | |||
|
67 | ||||
|
68 | QLabel *hk_lfr_mode; | |||
|
69 | QLabel *hk_lfr_dpu_spw_enabled; | |||
|
70 | QLabel *hk_lfr_dpu_link_state; | |||
|
71 | QLabel *sy_lfr_watchdog_enabled; | |||
|
72 | QLabel *hk_lfr_calib_enabled; | |||
|
73 | QLabel *hk_lfr_reset_cause; | |||
|
74 | // sy_lfr_sw_version_ | |||
|
75 | QLabel *sy_lfr_sw_version_n1; | |||
|
76 | QLabel *sy_lfr_sw_version_n2; | |||
|
77 | QLabel *sy_lfr_sw_version_n3; | |||
|
78 | QLabel *sy_lfr_sw_version_n4; | |||
|
79 | QLabel *hk_lfr_update_info_tc_cnt; | |||
|
80 | QLabel *hk_lfr_update_time_tc_cnt; | |||
|
81 | QLabel *hk_dpu_exe_tc_lfr_cnt; | |||
|
82 | QLabel *hk_dpu_rej_tc_lfr_cnt; | |||
|
83 | // hk_lfr_last_exe_tc_ | |||
|
84 | QLabel *hk_lfr_last_exe_tc_id; | |||
|
85 | QLabel *hk_lfr_last_exe_tc_type; | |||
|
86 | QLabel *hk_lfr_last_exe_tc_subtype; | |||
|
87 | QLabel *hk_lfr_last_exe_tc_time; | |||
|
88 | // hk_lfr_last_rej_tc_ | |||
|
89 | QLabel *hk_lfr_last_rej_tc_id; | |||
|
90 | QLabel *hk_lfr_last_rej_tc_type; | |||
|
91 | QLabel *hk_lfr_last_rej_tc_subtype; | |||
|
92 | QLabel *hk_lfr_last_rej_tc_time; | |||
|
93 | ||||
|
94 | QLabel *hk_lfr_le_cnt; | |||
|
95 | QLabel *hk_lfr_me_cnt; | |||
|
96 | QLabel *hk_lfr_he_cnt; | |||
|
97 | // hk_lfr_last_er | |||
|
98 | QLabel *hk_lfr_last_er_rid; | |||
|
99 | QLabel *hk_lfr_last_er_code; | |||
|
100 | QLabel *hk_lfr_last_er_time; | |||
|
101 | //*********************************** | |||
|
102 | //*********************************** | |||
|
103 | //hk_lfr_vhdl_ | |||
|
104 | QLabel *hk_lfr_vhdl_aa; | |||
|
105 | QLabel *hk_lfr_vhdl_sm; | |||
|
106 | QLabel *hk_lfr_vhdl_fft; | |||
|
107 | QLabel *hk_lfr_vhdl_sr; | |||
|
108 | QLabel *hk_lfr_vhdl_cic; | |||
|
109 | QLabel *hk_lfr_vhdl_hk; | |||
|
110 | QLabel *hk_lfr_vhdl_iir; | |||
|
111 | QLabel *hk_lfr_vhdl_cal; | |||
|
112 | // hk_lfr_dpu_spw_ | |||
|
113 | QLabel *hk_lfr_dpu_spw_pkt_rcv_cnt; | |||
|
114 | QLabel *hk_lfr_dpu_spw_pkt_sent_cnt; | |||
|
115 | QLabel *hk_lfr_dpu_spw_tick_out_cnt; | |||
|
116 | QLabel *hk_lfr_dpu_spw_last_timc; | |||
|
117 | // hk_lfr_last_fail_addr | |||
|
118 | QLabel *hk_lfr_last_fail_addr; | |||
|
119 | // hk_lfr_temp_ | |||
|
120 | QLabel *hk_lfr_temp_scm; | |||
|
121 | QLabel *hk_lfr_temp_pcb; | |||
|
122 | QLabel *hk_lfr_temp_fpga; | |||
|
123 | // hk_lfr_dpu_spw_ | |||
|
124 | QLabel *hk_lfr_dpu_spw_parity; | |||
|
125 | QLabel *hk_lfr_dpu_spw_disconnect; | |||
|
126 | QLabel *hk_lfr_dpu_spw_escape; | |||
|
127 | QLabel *hk_lfr_dpu_spw_credit; | |||
|
128 | QLabel *hk_lfr_dpu_spw_write_sync; | |||
|
129 | QLabel *hk_lfr_dpu_spw_rx_ahb; | |||
|
130 | QLabel *hk_lfr_dpu_spw_tx_ahb; | |||
|
131 | QLabel *hk_lfr_dpu_spw_header_crc; | |||
|
132 | QLabel *hk_lfr_dpu_spw_data_crc; | |||
|
133 | QLabel *hk_lfr_dpu_spw_early_eop; | |||
|
134 | QLabel *hk_lfr_dpu_spw_invalid_addr; | |||
|
135 | QLabel *hk_lfr_dpu_spw_eep; | |||
|
136 | QLabel *hk_lfr_dpu_spw_rx_too_big; | |||
|
137 | // hk_lfr_timecode_ | |||
|
138 | QLabel *hk_lfr_timecode_erroneous; | |||
|
139 | QLabel *hk_lfr_timecode_missing; | |||
|
140 | QLabel *hk_lfr_timecode_invalid; | |||
|
141 | // hk_lfr_time_ | |||
|
142 | QLabel *hk_lfr_time_timecode_it; | |||
|
143 | QLabel *hk_lfr_time_not_synchro; | |||
|
144 | QLabel *hk_lfr_time_timecode_ctr; | |||
|
145 | // hk_lfr_buffer_dpu_ | |||
|
146 | QLabel *hk_lfr_buffer_dpu_tc_fifo; | |||
|
147 | QLabel *hk_lfr_buffer_dpu_tm_fifo; | |||
|
148 | // hk_lfr_ahb_ | |||
|
149 | QLabel *hk_lfr_ahb_correctable; | |||
|
150 | QLabel *hk_lfr_ahb_uncorrectable; | |||
|
151 | QLabel *hk_lfr_ahb_fails_trans; | |||
|
152 | // hk_lfr_adc_ | |||
|
153 | QLabel *hk_lfr_adc_failure; | |||
|
154 | QLabel *hk_lfr_adc_timeout; | |||
|
155 | QLabel *hk_lfr_toomany_err; | |||
|
156 | // hk_lfr_cpu_ | |||
|
157 | QLabel *hk_lfr_cpu_write_err; | |||
|
158 | QLabel *hk_lfr_cpu_ins_access_err; | |||
|
159 | QLabel *hk_lfr_cpu_illegal_ins; | |||
|
160 | QLabel *hk_lfr_cpu_privilegied_ins; | |||
|
161 | QLabel *hk_lfr_cpu_register_hw; | |||
|
162 | QLabel *hk_lfr_cpu_not_aligned; | |||
|
163 | QLabel *hk_lfr_cpu_data_exception; | |||
|
164 | QLabel *hk_lfr_cpu_div_exception; | |||
|
165 | QLabel *hk_lfr_cpu_arith_overflow; | |||
|
166 | }; | |||
|
167 | ||||
|
168 | #endif // HKDISPLAY_H |
@@ -0,0 +1,378 | |||||
|
1 | ############################################################################# | |||
|
2 | # Makefile for building: lfrsgse | |||
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jun 28 13:46:55 2013 | |||
|
4 | # Project: gselesia.pro | |||
|
5 | # Template: app | |||
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |||
|
7 | ############################################################################# | |||
|
8 | ||||
|
9 | ####### Compiler, tools and options | |||
|
10 | ||||
|
11 | CC = gcc | |||
|
12 | CXX = g++ | |||
|
13 | DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED | |||
|
14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT $(DEFINES) | |||
|
15 | CXXFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT $(DEFINES) | |||
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include -I. -I../common_PLE -I../rmapplugin -I../../DEV_PLE/header -I/usr/include/lppmon/common -I/usr/include/lppmon/wfdisplay -I. | |||
|
17 | LINK = g++ | |||
|
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro | |||
|
19 | LIBS = $(SUBLIBS) -L/usr/lib64 -llppmoncommon -lwfdisplay -lqwt5-qt4 -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread | |||
|
20 | AR = ar cqs | |||
|
21 | RANLIB = | |||
|
22 | QMAKE = /usr/bin/qmake-qt4 | |||
|
23 | TAR = tar -cf | |||
|
24 | COMPRESS = gzip -9f | |||
|
25 | COPY = cp -f | |||
|
26 | SED = sed | |||
|
27 | COPY_FILE = $(COPY) | |||
|
28 | COPY_DIR = $(COPY) -r | |||
|
29 | STRIP = | |||
|
30 | INSTALL_FILE = install -m 644 -p | |||
|
31 | INSTALL_DIR = $(COPY_DIR) | |||
|
32 | INSTALL_PROGRAM = install -m 755 -p | |||
|
33 | DEL_FILE = rm -f | |||
|
34 | SYMLINK = ln -f -s | |||
|
35 | DEL_DIR = rmdir | |||
|
36 | MOVE = mv -f | |||
|
37 | CHK_DIR_EXISTS= test -d | |||
|
38 | MKDIR = mkdir -p | |||
|
39 | ||||
|
40 | ####### Output directory | |||
|
41 | ||||
|
42 | OBJECTS_DIR = ./ | |||
|
43 | ||||
|
44 | ####### Files | |||
|
45 | ||||
|
46 | SOURCES = main.cpp \ | |||
|
47 | mainwindow.cpp \ | |||
|
48 | mainwindowui.cpp \ | |||
|
49 | ../common_PLE/qipdialogbox.cpp \ | |||
|
50 | lfrxmlhandler.cpp \ | |||
|
51 | lfrxmlwriter.cpp \ | |||
|
52 | ../rmapplugin/tmstatistics.cpp \ | |||
|
53 | ../rmapplugin/tmpackettoread.cpp \ | |||
|
54 | ../rmapplugin/wfpacket.cpp \ | |||
|
55 | ../common_PLE/hkdisplay.cpp \ | |||
|
56 | lfrxmlparser.cpp \ | |||
|
57 | lfrspectrogram.cpp moc_mainwindow.cpp \ | |||
|
58 | moc_mainwindowui.cpp \ | |||
|
59 | moc_qipdialogbox.cpp \ | |||
|
60 | moc_lfrxmlhandler.cpp \ | |||
|
61 | moc_lfrxmlwriter.cpp \ | |||
|
62 | moc_tmstatistics.cpp \ | |||
|
63 | moc_tmpackettoread.cpp \ | |||
|
64 | moc_wfpacket.cpp \ | |||
|
65 | moc_hkdisplay.cpp \ | |||
|
66 | moc_lfrxmlparser.cpp \ | |||
|
67 | moc_lfrspectrogram.cpp | |||
|
68 | OBJECTS = main.o \ | |||
|
69 | mainwindow.o \ | |||
|
70 | mainwindowui.o \ | |||
|
71 | qipdialogbox.o \ | |||
|
72 | lfrxmlhandler.o \ | |||
|
73 | lfrxmlwriter.o \ | |||
|
74 | tmstatistics.o \ | |||
|
75 | tmpackettoread.o \ | |||
|
76 | wfpacket.o \ | |||
|
77 | hkdisplay.o \ | |||
|
78 | lfrxmlparser.o \ | |||
|
79 | lfrspectrogram.o \ | |||
|
80 | moc_mainwindow.o \ | |||
|
81 | moc_mainwindowui.o \ | |||
|
82 | moc_qipdialogbox.o \ | |||
|
83 | moc_lfrxmlhandler.o \ | |||
|
84 | moc_lfrxmlwriter.o \ | |||
|
85 | moc_tmstatistics.o \ | |||
|
86 | moc_tmpackettoread.o \ | |||
|
87 | moc_wfpacket.o \ | |||
|
88 | moc_hkdisplay.o \ | |||
|
89 | moc_lfrxmlparser.o \ | |||
|
90 | moc_lfrspectrogram.o | |||
|
91 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |||
|
92 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |||
|
93 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |||
|
94 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |||
|
95 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |||
|
96 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |||
|
97 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |||
|
98 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |||
|
99 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |||
|
100 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |||
|
101 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |||
|
102 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |||
|
103 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |||
|
104 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |||
|
105 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |||
|
106 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |||
|
107 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |||
|
108 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |||
|
109 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |||
|
110 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |||
|
111 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |||
|
112 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |||
|
113 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |||
|
114 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |||
|
115 | gselesia.pro | |||
|
116 | QMAKE_TARGET = lfrsgse | |||
|
117 | DESTDIR = | |||
|
118 | TARGET = lfrsgse | |||
|
119 | ||||
|
120 | first: all | |||
|
121 | ####### Implicit rules | |||
|
122 | ||||
|
123 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |||
|
124 | ||||
|
125 | .cpp.o: | |||
|
126 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
127 | ||||
|
128 | .cc.o: | |||
|
129 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
130 | ||||
|
131 | .cxx.o: | |||
|
132 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
133 | ||||
|
134 | .C.o: | |||
|
135 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
136 | ||||
|
137 | .c.o: | |||
|
138 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
139 | ||||
|
140 | ####### Build rules | |||
|
141 | ||||
|
142 | all: Makefile $(TARGET) | |||
|
143 | ||||
|
144 | $(TARGET): $(OBJECTS) | |||
|
145 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |||
|
146 | ||||
|
147 | Makefile: gselesia.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |||
|
148 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |||
|
149 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |||
|
150 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |||
|
151 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |||
|
152 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |||
|
153 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |||
|
154 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |||
|
155 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |||
|
156 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |||
|
157 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |||
|
158 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |||
|
159 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |||
|
160 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |||
|
161 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |||
|
162 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |||
|
163 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |||
|
164 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |||
|
165 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |||
|
166 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |||
|
167 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |||
|
168 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |||
|
169 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |||
|
170 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |||
|
171 | /usr/lib64/libQtXml.prl \ | |||
|
172 | /usr/lib64/libQtCore.prl \ | |||
|
173 | /usr/lib64/libQtGui.prl \ | |||
|
174 | /usr/lib64/libQtNetwork.prl | |||
|
175 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |||
|
176 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |||
|
177 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |||
|
178 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |||
|
179 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |||
|
180 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |||
|
181 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |||
|
182 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |||
|
183 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |||
|
184 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |||
|
185 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |||
|
186 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |||
|
187 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |||
|
188 | /usr/lib64/qt4/mkspecs/features/release.prf: | |||
|
189 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |||
|
190 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |||
|
191 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |||
|
192 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |||
|
193 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |||
|
194 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |||
|
195 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |||
|
196 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |||
|
197 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |||
|
198 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |||
|
199 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |||
|
200 | /usr/lib64/libQtXml.prl: | |||
|
201 | /usr/lib64/libQtCore.prl: | |||
|
202 | /usr/lib64/libQtGui.prl: | |||
|
203 | /usr/lib64/libQtNetwork.prl: | |||
|
204 | qmake: FORCE | |||
|
205 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |||
|
206 | ||||
|
207 | dist: | |||
|
208 | @$(CHK_DIR_EXISTS) .tmp/lfrsgse1.0.0 || $(MKDIR) .tmp/lfrsgse1.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 | ||||
|
211 | ||||
|
212 | clean:compiler_clean | |||
|
213 | -$(DEL_FILE) $(OBJECTS) | |||
|
214 | -$(DEL_FILE) *~ core *.core | |||
|
215 | ||||
|
216 | ||||
|
217 | ####### Sub-libraries | |||
|
218 | ||||
|
219 | distclean: clean | |||
|
220 | -$(DEL_FILE) $(TARGET) | |||
|
221 | -$(DEL_FILE) Makefile | |||
|
222 | ||||
|
223 | ||||
|
224 | check: first | |||
|
225 | ||||
|
226 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |||
|
227 | ||||
|
228 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |||
|
229 | ||||
|
230 | compiler_moc_header_make_all: moc_mainwindow.cpp moc_mainwindowui.cpp moc_qipdialogbox.cpp moc_lfrxmlhandler.cpp moc_lfrxmlwriter.cpp moc_tmstatistics.cpp moc_tmpackettoread.cpp moc_wfpacket.cpp moc_hkdisplay.cpp moc_lfrxmlparser.cpp moc_lfrspectrogram.cpp | |||
|
231 | compiler_moc_header_clean: | |||
|
232 | -$(DEL_FILE) moc_mainwindow.cpp moc_mainwindowui.cpp moc_qipdialogbox.cpp moc_lfrxmlhandler.cpp moc_lfrxmlwriter.cpp moc_tmstatistics.cpp moc_tmpackettoread.cpp moc_wfpacket.cpp moc_hkdisplay.cpp moc_lfrxmlparser.cpp moc_lfrspectrogram.cpp | |||
|
233 | moc_mainwindow.cpp: lfrxmlhandler.h \ | |||
|
234 | lfrxmlwriter.h \ | |||
|
235 | mainwindowui.h \ | |||
|
236 | lfrspectrogram.h \ | |||
|
237 | lfrxmlparser.h \ | |||
|
238 | mainwindow.h | |||
|
239 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp | |||
|
240 | ||||
|
241 | moc_mainwindowui.cpp: lfrspectrogram.h \ | |||
|
242 | mainwindowui.h | |||
|
243 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindowui.h -o moc_mainwindowui.cpp | |||
|
244 | ||||
|
245 | moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h | |||
|
246 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc_qipdialogbox.cpp | |||
|
247 | ||||
|
248 | moc_lfrxmlhandler.cpp: lfrxmlhandler.h | |||
|
249 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlhandler.h -o moc_lfrxmlhandler.cpp | |||
|
250 | ||||
|
251 | moc_lfrxmlwriter.cpp: lfrxmlwriter.h | |||
|
252 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlwriter.h -o moc_lfrxmlwriter.cpp | |||
|
253 | ||||
|
254 | moc_tmstatistics.cpp: ../rmapplugin/tmstatistics.h | |||
|
255 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/tmstatistics.h -o moc_tmstatistics.cpp | |||
|
256 | ||||
|
257 | moc_tmpackettoread.cpp: ../rmapplugin/tmpackettoread.h | |||
|
258 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/tmpackettoread.h -o moc_tmpackettoread.cpp | |||
|
259 | ||||
|
260 | moc_wfpacket.cpp: ../rmapplugin/wfpacket.h | |||
|
261 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/wfpacket.h -o moc_wfpacket.cpp | |||
|
262 | ||||
|
263 | moc_hkdisplay.cpp: ../common_PLE/hkdisplay.h | |||
|
264 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/hkdisplay.h -o moc_hkdisplay.cpp | |||
|
265 | ||||
|
266 | moc_lfrxmlparser.cpp: lfrxmlparser.h | |||
|
267 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlparser.h -o moc_lfrxmlparser.cpp | |||
|
268 | ||||
|
269 | moc_lfrspectrogram.cpp: lfrspectrogram.h | |||
|
270 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrspectrogram.h -o moc_lfrspectrogram.cpp | |||
|
271 | ||||
|
272 | compiler_rcc_make_all: | |||
|
273 | compiler_rcc_clean: | |||
|
274 | compiler_image_collection_make_all: qmake_image_collection.cpp | |||
|
275 | compiler_image_collection_clean: | |||
|
276 | -$(DEL_FILE) qmake_image_collection.cpp | |||
|
277 | compiler_moc_source_make_all: | |||
|
278 | compiler_moc_source_clean: | |||
|
279 | compiler_uic_make_all: | |||
|
280 | compiler_uic_clean: | |||
|
281 | compiler_yacc_decl_make_all: | |||
|
282 | compiler_yacc_decl_clean: | |||
|
283 | compiler_yacc_impl_make_all: | |||
|
284 | compiler_yacc_impl_clean: | |||
|
285 | compiler_lex_make_all: | |||
|
286 | compiler_lex_clean: | |||
|
287 | compiler_clean: compiler_moc_header_clean | |||
|
288 | ||||
|
289 | ####### Compile | |||
|
290 | ||||
|
291 | main.o: main.cpp mainwindow.h \ | |||
|
292 | lfrxmlhandler.h \ | |||
|
293 | lfrxmlwriter.h \ | |||
|
294 | mainwindowui.h \ | |||
|
295 | lfrspectrogram.h \ | |||
|
296 | lfrxmlparser.h | |||
|
297 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp | |||
|
298 | ||||
|
299 | mainwindow.o: mainwindow.cpp mainwindow.h \ | |||
|
300 | lfrxmlhandler.h \ | |||
|
301 | lfrxmlwriter.h \ | |||
|
302 | mainwindowui.h \ | |||
|
303 | lfrspectrogram.h \ | |||
|
304 | lfrxmlparser.h | |||
|
305 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp | |||
|
306 | ||||
|
307 | mainwindowui.o: mainwindowui.cpp mainwindowui.h \ | |||
|
308 | lfrspectrogram.h | |||
|
309 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindowui.o mainwindowui.cpp | |||
|
310 | ||||
|
311 | qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h | |||
|
312 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qipdialogbox.o ../common_PLE/qipdialogbox.cpp | |||
|
313 | ||||
|
314 | lfrxmlhandler.o: lfrxmlhandler.cpp lfrxmlhandler.h | |||
|
315 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlhandler.o lfrxmlhandler.cpp | |||
|
316 | ||||
|
317 | lfrxmlwriter.o: lfrxmlwriter.cpp lfrxmlwriter.h | |||
|
318 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlwriter.o lfrxmlwriter.cpp | |||
|
319 | ||||
|
320 | tmstatistics.o: ../rmapplugin/tmstatistics.cpp ../rmapplugin/tmstatistics.h | |||
|
321 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmstatistics.o ../rmapplugin/tmstatistics.cpp | |||
|
322 | ||||
|
323 | tmpackettoread.o: ../rmapplugin/tmpackettoread.cpp ../rmapplugin/tmpackettoread.h | |||
|
324 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmpackettoread.o ../rmapplugin/tmpackettoread.cpp | |||
|
325 | ||||
|
326 | wfpacket.o: ../rmapplugin/wfpacket.cpp ../rmapplugin/wfpacket.h | |||
|
327 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfpacket.o ../rmapplugin/wfpacket.cpp | |||
|
328 | ||||
|
329 | hkdisplay.o: ../common_PLE/hkdisplay.cpp ../common_PLE/hkdisplay.h | |||
|
330 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hkdisplay.o ../common_PLE/hkdisplay.cpp | |||
|
331 | ||||
|
332 | lfrxmlparser.o: lfrxmlparser.cpp lfrxmlparser.h | |||
|
333 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlparser.o lfrxmlparser.cpp | |||
|
334 | ||||
|
335 | lfrspectrogram.o: lfrspectrogram.cpp lfrspectrogram.h | |||
|
336 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrspectrogram.o lfrspectrogram.cpp | |||
|
337 | ||||
|
338 | moc_mainwindow.o: moc_mainwindow.cpp | |||
|
339 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp | |||
|
340 | ||||
|
341 | moc_mainwindowui.o: moc_mainwindowui.cpp | |||
|
342 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindowui.o moc_mainwindowui.cpp | |||
|
343 | ||||
|
344 | moc_qipdialogbox.o: moc_qipdialogbox.cpp | |||
|
345 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qipdialogbox.o moc_qipdialogbox.cpp | |||
|
346 | ||||
|
347 | moc_lfrxmlhandler.o: moc_lfrxmlhandler.cpp | |||
|
348 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlhandler.o moc_lfrxmlhandler.cpp | |||
|
349 | ||||
|
350 | moc_lfrxmlwriter.o: moc_lfrxmlwriter.cpp | |||
|
351 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlwriter.o moc_lfrxmlwriter.cpp | |||
|
352 | ||||
|
353 | moc_tmstatistics.o: moc_tmstatistics.cpp | |||
|
354 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tmstatistics.o moc_tmstatistics.cpp | |||
|
355 | ||||
|
356 | moc_tmpackettoread.o: moc_tmpackettoread.cpp | |||
|
357 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tmpackettoread.o moc_tmpackettoread.cpp | |||
|
358 | ||||
|
359 | moc_wfpacket.o: moc_wfpacket.cpp | |||
|
360 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfpacket.o moc_wfpacket.cpp | |||
|
361 | ||||
|
362 | moc_hkdisplay.o: moc_hkdisplay.cpp | |||
|
363 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_hkdisplay.o moc_hkdisplay.cpp | |||
|
364 | ||||
|
365 | moc_lfrxmlparser.o: moc_lfrxmlparser.cpp | |||
|
366 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlparser.o moc_lfrxmlparser.cpp | |||
|
367 | ||||
|
368 | moc_lfrspectrogram.o: moc_lfrspectrogram.cpp | |||
|
369 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrspectrogram.o moc_lfrspectrogram.cpp | |||
|
370 | ||||
|
371 | ####### Install | |||
|
372 | ||||
|
373 | install: FORCE | |||
|
374 | ||||
|
375 | uninstall: FORCE | |||
|
376 | ||||
|
377 | FORCE: | |||
|
378 |
@@ -0,0 +1,1 | |||||
|
1 | <?xml version="1.0" encoding="UTF-8"?><persons><person firstname="yza" surname="bcd" number="756776">kamlesh</person><person firstname="stu" surname="vwx" number="87654">kamlesh</person><person firstname="mno" surname="pqr" number="12356">kamlesh</person><person firstname="ghi" surname="jkl" number="67890">kamlesh</person><person firstname="abc" surname="def" number="12345">kamlesh</person></persons> |
1 | NO CONTENT: new file 100755, binary diff hidden |
|
NO CONTENT: new file 100755, binary diff hidden |
@@ -0,0 +1,52 | |||||
|
1 | #------------------------------------------------- | |||
|
2 | # | |||
|
3 | # Project created by QtCreator 2013-05-03T14:05:02 | |||
|
4 | # | |||
|
5 | #------------------------------------------------- | |||
|
6 | ||||
|
7 | QT += core gui | |||
|
8 | QT += network | |||
|
9 | QT += xml | |||
|
10 | ||||
|
11 | TARGET = gselesia | |||
|
12 | TEMPLATE = app | |||
|
13 | ||||
|
14 | INCLUDEPATH += \ | |||
|
15 | $${PWD} \ | |||
|
16 | ../common_PLE \ | |||
|
17 | ../rmapplugin \ | |||
|
18 | ../../DEV_PLE/header \ | |||
|
19 | $$[QT_INSTALL_HEADERS]/lppmon/common \ | |||
|
20 | $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay | |||
|
21 | ||||
|
22 | LIBS += -llppmoncommon -lwfdisplay -lqwt5-qt4 | |||
|
23 | ||||
|
24 | SOURCES += main.cpp\ | |||
|
25 | mainwindow.cpp \ | |||
|
26 | mainwindowui.cpp \ | |||
|
27 | ../common_PLE/qipdialogbox.cpp \ | |||
|
28 | lfrxmlhandler.cpp \ | |||
|
29 | lfrxmlwriter.cpp \ | |||
|
30 | ../rmapplugin/tmstatistics.cpp \ | |||
|
31 | ../rmapplugin/tmpackettoread.cpp \ | |||
|
32 | ../rmapplugin/wfpacket.cpp \ | |||
|
33 | ../common_PLE/hkdisplay.cpp \ | |||
|
34 | lfrxmlparser.cpp \ | |||
|
35 | lfrspectrogram.cpp | |||
|
36 | ||||
|
37 | HEADERS += mainwindow.h \ | |||
|
38 | mainwindowui.h \ | |||
|
39 | ../common_PLE/qipdialogbox.h \ | |||
|
40 | lfrxmlhandler.h \ | |||
|
41 | lfrxmlwriter.h \ | |||
|
42 | ../rmapplugin/tmstatistics.h \ | |||
|
43 | ../rmapplugin/tmpackettoread.h \ | |||
|
44 | ../rmapplugin/wfpacket.h \ | |||
|
45 | ../common_PLE/hkdisplay.h \ | |||
|
46 | ../rmapplugin/params.h \ | |||
|
47 | ../../DEV_PLE/header/ccsds_types.h \ | |||
|
48 | lfrxmlparser.h \ | |||
|
49 | lfrspectrogram.h | |||
|
50 | ||||
|
51 | ||||
|
52 |
@@ -0,0 +1,265 | |||||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |||
|
2 | <!DOCTYPE QtCreatorProject> | |||
|
3 | <!-- Written by Qt Creator 2.4.1, 2013-06-28T13:47:27. --> | |||
|
4 | <qtcreator> | |||
|
5 | <data> | |||
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |||
|
7 | <value type="int">0</value> | |||
|
8 | </data> | |||
|
9 | <data> | |||
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |||
|
11 | <valuemap type="QVariantMap"> | |||
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |||
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |||
|
14 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |||
|
15 | <value type="QString" key="language">Cpp</value> | |||
|
16 | <valuemap type="QVariantMap" key="value"> | |||
|
17 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |||
|
18 | </valuemap> | |||
|
19 | </valuemap> | |||
|
20 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |||
|
21 | <value type="QString" key="language">QmlJS</value> | |||
|
22 | <valuemap type="QVariantMap" key="value"> | |||
|
23 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |||
|
24 | </valuemap> | |||
|
25 | </valuemap> | |||
|
26 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |||
|
27 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |||
|
28 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |||
|
29 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |||
|
30 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |||
|
31 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |||
|
32 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |||
|
33 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |||
|
34 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |||
|
35 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |||
|
36 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |||
|
37 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |||
|
38 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |||
|
39 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |||
|
40 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |||
|
41 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |||
|
42 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |||
|
43 | </valuemap> | |||
|
44 | </data> | |||
|
45 | <data> | |||
|
46 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |||
|
47 | <valuemap type="QVariantMap"/> | |||
|
48 | </data> | |||
|
49 | <data> | |||
|
50 | <variable>ProjectExplorer.Project.Target.0</variable> | |||
|
51 | <valuemap type="QVariantMap"> | |||
|
52 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | |||
|
53 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | |||
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value> | |||
|
55 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |||
|
56 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |||
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |||
|
58 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |||
|
59 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> | |||
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |||
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |||
|
62 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |||
|
63 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |||
|
65 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |||
|
66 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |||
|
67 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |||
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |||
|
69 | </valuemap> | |||
|
70 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |||
|
71 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |||
|
72 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |||
|
74 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |||
|
75 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |||
|
76 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |||
|
77 | </valuemap> | |||
|
78 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |||
|
79 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |||
|
80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |||
|
82 | </valuemap> | |||
|
83 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |||
|
84 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |||
|
85 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |||
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |||
|
88 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |||
|
89 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |||
|
90 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |||
|
91 | </valuemap> | |||
|
92 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |||
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |||
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |||
|
96 | </valuemap> | |||
|
97 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |||
|
98 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |||
|
99 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |||
|
100 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |||
|
101 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
102 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |||
|
103 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |||
|
104 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/GSE_LESIA/gselesia</value> | |||
|
105 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |||
|
106 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |||
|
107 | </valuemap> | |||
|
108 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> | |||
|
109 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> | |||
|
110 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |||
|
111 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |||
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |||
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |||
|
115 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |||
|
116 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |||
|
117 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |||
|
118 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |||
|
119 | </valuemap> | |||
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |||
|
121 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |||
|
122 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |||
|
124 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |||
|
125 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |||
|
126 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |||
|
127 | </valuemap> | |||
|
128 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |||
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |||
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
131 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |||
|
132 | </valuemap> | |||
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |||
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |||
|
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |||
|
136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |||
|
138 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |||
|
139 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |||
|
140 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |||
|
141 | </valuemap> | |||
|
142 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |||
|
143 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |||
|
144 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |||
|
146 | </valuemap> | |||
|
147 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |||
|
148 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |||
|
149 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |||
|
150 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> | |||
|
151 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |||
|
153 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | |||
|
154 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/GSE_LESIA/gselesia</value> | |||
|
155 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |||
|
156 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |||
|
157 | </valuemap> | |||
|
158 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> | |||
|
159 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |||
|
160 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |||
|
161 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |||
|
162 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |||
|
163 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |||
|
165 | </valuemap> | |||
|
166 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |||
|
167 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |||
|
168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |||
|
170 | </valuemap> | |||
|
171 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |||
|
172 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |||
|
173 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |||
|
174 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |||
|
175 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |||
|
176 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |||
|
177 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |||
|
178 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |||
|
179 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |||
|
180 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |||
|
181 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |||
|
182 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |||
|
183 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |||
|
184 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |||
|
185 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |||
|
186 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |||
|
187 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |||
|
188 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |||
|
189 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |||
|
190 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |||
|
191 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |||
|
192 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |||
|
193 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |||
|
194 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |||
|
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |||
|
196 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |||
|
197 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |||
|
198 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |||
|
199 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |||
|
200 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |||
|
201 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |||
|
202 | <value type="int">0</value> | |||
|
203 | <value type="int">1</value> | |||
|
204 | <value type="int">2</value> | |||
|
205 | <value type="int">3</value> | |||
|
206 | <value type="int">4</value> | |||
|
207 | <value type="int">5</value> | |||
|
208 | <value type="int">6</value> | |||
|
209 | <value type="int">7</value> | |||
|
210 | <value type="int">8</value> | |||
|
211 | <value type="int">9</value> | |||
|
212 | <value type="int">10</value> | |||
|
213 | <value type="int">11</value> | |||
|
214 | <value type="int">12</value> | |||
|
215 | <value type="int">13</value> | |||
|
216 | <value type="int">14</value> | |||
|
217 | </valuelist> | |||
|
218 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |||
|
219 | <value type="int">0</value> | |||
|
220 | <value type="int">1</value> | |||
|
221 | <value type="int">2</value> | |||
|
222 | <value type="int">3</value> | |||
|
223 | <value type="int">4</value> | |||
|
224 | <value type="int">5</value> | |||
|
225 | <value type="int">6</value> | |||
|
226 | <value type="int">7</value> | |||
|
227 | <value type="int">8</value> | |||
|
228 | <value type="int">9</value> | |||
|
229 | <value type="int">10</value> | |||
|
230 | <value type="int">11</value> | |||
|
231 | <value type="int">12</value> | |||
|
232 | <value type="int">13</value> | |||
|
233 | <value type="int">14</value> | |||
|
234 | </valuelist> | |||
|
235 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">gselesia</value> | |||
|
236 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
237 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value> | |||
|
238 | <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value> | |||
|
239 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |||
|
240 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">gselesia.pro</value> | |||
|
241 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |||
|
242 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> | |||
|
243 | <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/> | |||
|
244 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |||
|
245 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |||
|
246 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |||
|
247 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |||
|
248 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |||
|
249 | </valuemap> | |||
|
250 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |||
|
251 | </valuemap> | |||
|
252 | </data> | |||
|
253 | <data> | |||
|
254 | <variable>ProjectExplorer.Project.TargetCount</variable> | |||
|
255 | <value type="int">1</value> | |||
|
256 | </data> | |||
|
257 | <data> | |||
|
258 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |||
|
259 | <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |||
|
260 | </data> | |||
|
261 | <data> | |||
|
262 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |||
|
263 | <value type="int">10</value> | |||
|
264 | </data> | |||
|
265 | </qtcreator> |
@@ -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 |
@@ -0,0 +1,106 | |||||
|
1 | #include "lfrxmlhandler.h" | |||
|
2 | #include <QDebug> | |||
|
3 | ||||
|
4 | LFRXmlHandler::LFRXmlHandler(QObject *parent) : | |||
|
5 | QObject(parent) | |||
|
6 | { | |||
|
7 | } | |||
|
8 | ||||
|
9 | /*! | |||
|
10 | Reset the state of the handler to ensure that new documents are | |||
|
11 | read correctly. | |||
|
12 | ||||
|
13 | We return true to indicate that parsing should continue. | |||
|
14 | */ | |||
|
15 | ||||
|
16 | bool LFRXmlHandler::startDocument() | |||
|
17 | { | |||
|
18 | elementName.clear(); | |||
|
19 | elementIndentation.clear(); | |||
|
20 | indentationLevel = 0; | |||
|
21 | ||||
|
22 | return true; | |||
|
23 | } | |||
|
24 | ||||
|
25 | /*! | |||
|
26 | Process each starting element in the XML document. | |||
|
27 | ||||
|
28 | Append the element name to the list of elements found; add its | |||
|
29 | corresponding indentation level to the list of indentation levels. | |||
|
30 | ||||
|
31 | Increase the level of indentation by one column. | |||
|
32 | ||||
|
33 | We return true to indicate that parsing should continue. | |||
|
34 | */ | |||
|
35 | ||||
|
36 | bool LFRXmlHandler::startElement(const QString &, const QString &, | |||
|
37 | const QString & qName, const QXmlAttributes &) | |||
|
38 | { | |||
|
39 | elementName.append(qName); | |||
|
40 | elementIndentation.append(indentationLevel); | |||
|
41 | indentationLevel += 1; | |||
|
42 | ||||
|
43 | if (qName == "EventBinary") | |||
|
44 | { | |||
|
45 | emit displayMessage("EventBinary detected"); | |||
|
46 | } | |||
|
47 | ||||
|
48 | return true; | |||
|
49 | } | |||
|
50 | ||||
|
51 | /*! | |||
|
52 | Process each ending element in the XML document. | |||
|
53 | ||||
|
54 | Decrease the level of indentation by one column. | |||
|
55 | ||||
|
56 | We return true to indicate that parsing should continue. | |||
|
57 | */ | |||
|
58 | ||||
|
59 | bool LFRXmlHandler::endElement(const QString &, const QString &, | |||
|
60 | const QString & qName) | |||
|
61 | { | |||
|
62 | if (qName == "EventTime") | |||
|
63 | { | |||
|
64 | emit displayMessage("/EventTime detected"); | |||
|
65 | } | |||
|
66 | indentationLevel -= 1; | |||
|
67 | ||||
|
68 | return true; | |||
|
69 | } | |||
|
70 | ||||
|
71 | /*! | |||
|
72 | Report a fatal parsing error, and return false to indicate to the reader | |||
|
73 | that parsing should stop. | |||
|
74 | */ | |||
|
75 | ||||
|
76 | bool LFRXmlHandler::fatalError (const QXmlParseException & exception) | |||
|
77 | { | |||
|
78 | qWarning() << QString("Fatal error on line %1, column %2: %3").arg( | |||
|
79 | exception.lineNumber()).arg(exception.columnNumber()).arg( | |||
|
80 | exception.message()); | |||
|
81 | ||||
|
82 | return true; | |||
|
83 | } | |||
|
84 | ||||
|
85 | /*! | |||
|
86 | Return the list of element names found. | |||
|
87 | */ | |||
|
88 | ||||
|
89 | QStringList& LFRXmlHandler::names () | |||
|
90 | { | |||
|
91 | return elementName; | |||
|
92 | } | |||
|
93 | ||||
|
94 | /*! | |||
|
95 | Return the list of indentations used for each element found. | |||
|
96 | */ | |||
|
97 | ||||
|
98 | QList<int>& LFRXmlHandler::indentations () | |||
|
99 | { | |||
|
100 | return elementIndentation; | |||
|
101 | } | |||
|
102 | ||||
|
103 | void LFRXmlHandler::packetStoreHasChanged(QList<TMPacketToRead *> *ccsdsPacketStore) | |||
|
104 | { | |||
|
105 | this->ccsdsPacketStore = ccsdsPacketStore; | |||
|
106 | } |
@@ -0,0 +1,39 | |||||
|
1 | #ifndef LFRXMLHANDLER_H | |||
|
2 | #define LFRXMLHANDLER_H | |||
|
3 | ||||
|
4 | #include <QObject> | |||
|
5 | #include <QXmlDefaultHandler> | |||
|
6 | #include "tmpackettoread.h" | |||
|
7 | ||||
|
8 | class LFRXmlHandler : public QObject, public QXmlDefaultHandler | |||
|
9 | { | |||
|
10 | Q_OBJECT | |||
|
11 | ||||
|
12 | public: | |||
|
13 | explicit LFRXmlHandler(QObject *parent = 0); | |||
|
14 | ||||
|
15 | bool startDocument(); | |||
|
16 | bool startElement(const QString &, const QString &, const QString &qName, | |||
|
17 | const QXmlAttributes &); | |||
|
18 | bool endElement(const QString &, const QString &, const QString & qName); | |||
|
19 | ||||
|
20 | bool fatalError(const QXmlParseException &exception); | |||
|
21 | ||||
|
22 | QStringList& names(); | |||
|
23 | QList<int>& indentations(); | |||
|
24 | ||||
|
25 | void packetStoreHasChanged(QList<TMPacketToRead*> *ccsdsPacketStore); | |||
|
26 | ||||
|
27 | private: | |||
|
28 | QList<TMPacketToRead*> *ccsdsPacketStore; | |||
|
29 | ||||
|
30 | int indentationLevel; | |||
|
31 | QStringList elementName; | |||
|
32 | QList<int> elementIndentation; | |||
|
33 | ||||
|
34 | signals: | |||
|
35 | void displayMessage(QString); | |||
|
36 | ||||
|
37 | }; | |||
|
38 | ||||
|
39 | #endif // LFRXMLHANDLER_H |
@@ -0,0 +1,65 | |||||
|
1 | #include "lfrxmlparser.h" | |||
|
2 | ||||
|
3 | LFRXmlParser::LFRXmlParser(QObject *parent) : | |||
|
4 | QObject(parent) | |||
|
5 | { | |||
|
6 | } | |||
|
7 | ||||
|
8 | void LFRXmlParser::processIncomingStr(QString incomingStr) | |||
|
9 | { | |||
|
10 | int indexOfStartStr; | |||
|
11 | int indexOfStopStr; | |||
|
12 | int result; | |||
|
13 | QString eventBinaryStr; | |||
|
14 | QString startStr = "<EventBinary>"; | |||
|
15 | QString stopStr = "</EventBinary>"; | |||
|
16 | ||||
|
17 | xmlBuffer.append(incomingStr); | |||
|
18 | ||||
|
19 | result = findPattern( startStr, stopStr, &indexOfStartStr, &indexOfStopStr); | |||
|
20 | while( result !=-1 ) | |||
|
21 | { | |||
|
22 | eventBinaryStr = xmlBuffer.mid( | |||
|
23 | indexOfStartStr + startStr.size(), | |||
|
24 | indexOfStopStr - (indexOfStartStr + startStr.size() ) ); | |||
|
25 | processIncomingData( eventBinaryStr ); | |||
|
26 | xmlBuffer.remove(0, indexOfStopStr + stopStr.size()); | |||
|
27 | result = findPattern( startStr, stopStr, &indexOfStartStr, &indexOfStopStr); | |||
|
28 | } | |||
|
29 | emit processPacketStore(); | |||
|
30 | } | |||
|
31 | ||||
|
32 | int LFRXmlParser::findPattern(QString startStr, QString stopStr, int *indexOfStartStr, int *indexOfStopStr) | |||
|
33 | { | |||
|
34 | *indexOfStartStr = xmlBuffer.indexOf(startStr); | |||
|
35 | *indexOfStopStr = xmlBuffer.indexOf(stopStr); | |||
|
36 | ||||
|
37 | if ( (*indexOfStartStr==-1) | (*indexOfStopStr==-1) | (*indexOfStartStr > *indexOfStopStr) ) | |||
|
38 | { | |||
|
39 | return -1; | |||
|
40 | } | |||
|
41 | else | |||
|
42 | { | |||
|
43 | return 0; | |||
|
44 | } | |||
|
45 | } | |||
|
46 | ||||
|
47 | void LFRXmlParser::processIncomingData(const QString &ch) | |||
|
48 | { | |||
|
49 | QByteArray newdat; | |||
|
50 | char *values; | |||
|
51 | unsigned char *ccsdsData; | |||
|
52 | unsigned int ccsdsSize = 0; | |||
|
53 | ||||
|
54 | TMPacketToRead *incomingPacket; | |||
|
55 | ||||
|
56 | newdat = QByteArray::fromHex(ch.toAscii()); | |||
|
57 | ||||
|
58 | values = (char*) newdat.data(); | |||
|
59 | ccsdsSize = newdat.size(); | |||
|
60 | ccsdsData = (unsigned char *) values; | |||
|
61 | ||||
|
62 | incomingPacket = new TMPacketToRead(ccsdsData, ccsdsSize); | |||
|
63 | ||||
|
64 | generalCCSDSPacketStore->append(incomingPacket); | |||
|
65 | } |
@@ -0,0 +1,28 | |||||
|
1 | #ifndef LFRXMLPARSER_H | |||
|
2 | #define LFRXMLPARSER_H | |||
|
3 | ||||
|
4 | #include <QObject> | |||
|
5 | #include <tmpackettoread.h> | |||
|
6 | ||||
|
7 | class LFRXmlParser : public QObject | |||
|
8 | { | |||
|
9 | Q_OBJECT | |||
|
10 | public: | |||
|
11 | explicit LFRXmlParser(QObject *parent = 0); | |||
|
12 | void processIncomingStr(QString incomingStr); | |||
|
13 | int findPattern(QString startStr, QString stopStr, int *indexOfStartStr, int *indexOfStopStr); | |||
|
14 | void processIncomingData(const QString &ch); | |||
|
15 | QList<TMPacketToRead*> *generalCCSDSPacketStore; | |||
|
16 | ||||
|
17 | signals: | |||
|
18 | void sendMessage(QString); | |||
|
19 | void processPacketStore(); | |||
|
20 | ||||
|
21 | public slots: | |||
|
22 | ||||
|
23 | private: | |||
|
24 | QString xmlBuffer; | |||
|
25 | ||||
|
26 | }; | |||
|
27 | ||||
|
28 | #endif // LFRXMLPARSER_H |
@@ -0,0 +1,49 | |||||
|
1 | #include "lfrxmlwriter.h" | |||
|
2 | #include <QFile> | |||
|
3 | #include <QMessageBox> | |||
|
4 | ||||
|
5 | LFRXmlWriter::LFRXmlWriter(QWidget *parent) : | |||
|
6 | QObject(parent) | |||
|
7 | { | |||
|
8 | socketTM = NULL; | |||
|
9 | xmlWriter = new QXmlStreamWriter(); | |||
|
10 | } | |||
|
11 | ||||
|
12 | LFRXmlWriter::~LFRXmlWriter() | |||
|
13 | { | |||
|
14 | ||||
|
15 | } | |||
|
16 | ||||
|
17 | void LFRXmlWriter::setSocketTM(QTcpSocket *socket) | |||
|
18 | { | |||
|
19 | this->socketTM = socket; | |||
|
20 | xmlWriter->setDevice(this->socketTM); | |||
|
21 | } | |||
|
22 | ||||
|
23 | void LFRXmlWriter::sendXML_TC_Acknowledgment() | |||
|
24 | { | |||
|
25 | xmlWriter->writeStartElement("TCAck"); | |||
|
26 | xmlWriter->writeAttribute("ID", "0"); | |||
|
27 | xmlWriter->writeEndElement(); | |||
|
28 | } | |||
|
29 | ||||
|
30 | void LFRXmlWriter::sendXML_TC_rejection() | |||
|
31 | { | |||
|
32 | xmlWriter->writeStartElement("TCNAck"); | |||
|
33 | xmlWriter->writeAttribute("ID", "0"); | |||
|
34 | xmlWriter->writeStartElement("Reason"); | |||
|
35 | xmlWriter->writeEndElement(); | |||
|
36 | xmlWriter->writeEndElement(); | |||
|
37 | } | |||
|
38 | ||||
|
39 | void LFRXmlWriter::sendXML_GSE_HK() | |||
|
40 | { | |||
|
41 | xmlWriter->writeStartElement("TM"); | |||
|
42 | xmlWriter->writeStartElement("Name"); | |||
|
43 | xmlWriter->writeEndElement(); | |||
|
44 | xmlWriter->writeStartElement("Content"); | |||
|
45 | xmlWriter->writeCharacters("FFFFCC0099"); | |||
|
46 | xmlWriter->writeEndElement(); | |||
|
47 | xmlWriter->writeEndElement(); | |||
|
48 | xmlWriter->writeEndElement(); | |||
|
49 | } |
@@ -0,0 +1,29 | |||||
|
1 | #ifndef LFRXMLWRITER_H | |||
|
2 | #define LFRXMLWRITER_H | |||
|
3 | ||||
|
4 | #include <QObject> | |||
|
5 | #include <QXmlStreamWriter> | |||
|
6 | #include <QMap> | |||
|
7 | #include <QTcpSocket> | |||
|
8 | ||||
|
9 | class LFRXmlWriter : public QObject | |||
|
10 | { | |||
|
11 | Q_OBJECT | |||
|
12 | ||||
|
13 | public: | |||
|
14 | LFRXmlWriter(QWidget *parent = 0); | |||
|
15 | ~LFRXmlWriter(); | |||
|
16 | ||||
|
17 | private: | |||
|
18 | QTcpSocket *socketTM; | |||
|
19 | QXmlStreamWriter* xmlWriter; | |||
|
20 | ||||
|
21 | public slots: | |||
|
22 | void setSocketTM(QTcpSocket *socket); | |||
|
23 | void sendXML_TC_Acknowledgment(); | |||
|
24 | void sendXML_TC_rejection(); | |||
|
25 | void sendXML_GSE_HK(); | |||
|
26 | ||||
|
27 | }; | |||
|
28 | ||||
|
29 | #endif // LFRXMLWRITER_H |
@@ -0,0 +1,12 | |||||
|
1 | #include <QtGui/QApplication> | |||
|
2 | #include "mainwindow.h" | |||
|
3 | #include <lfrxmlwriter.h> | |||
|
4 | ||||
|
5 | int main(int argc, char *argv[]) | |||
|
6 | { | |||
|
7 | QApplication a(argc, argv); | |||
|
8 | MainWindow w; | |||
|
9 | w.show(); | |||
|
10 | ||||
|
11 | return a.exec(); | |||
|
12 | } |
@@ -0,0 +1,472 | |||||
|
1 | #include "mainwindow.h" | |||
|
2 | #include <iostream> | |||
|
3 | #include <QNetworkInterface> | |||
|
4 | ||||
|
5 | MainWindow::MainWindow(QWidget *parent) | |||
|
6 | : QWidget(parent) | |||
|
7 | { | |||
|
8 | parsingContinue = false; | |||
|
9 | totalOfBytes = 0; | |||
|
10 | totalOfPackets = 0; | |||
|
11 | ||||
|
12 | analyserSGSEServerTC = new QTcpServer(); | |||
|
13 | analyserSGSEServerTM = new QTcpServer(); | |||
|
14 | ||||
|
15 | socketTC = NULL; | |||
|
16 | socketTM = NULL; | |||
|
17 | socketEchoServer = new QTcpSocket(); | |||
|
18 | ||||
|
19 | //**** | |||
|
20 | // XML | |||
|
21 | // xml handlers | |||
|
22 | xmlHandler = new LFRXmlHandler(); | |||
|
23 | // xml sources | |||
|
24 | sourceTC = new QXmlInputSource(); | |||
|
25 | // xml writer | |||
|
26 | lfrXmlWriter = new LFRXmlWriter(); | |||
|
27 | // setup xml parser for the echo bridge | |||
|
28 | lfrXmlParser = new LFRXmlParser(); | |||
|
29 | ||||
|
30 | UI = new MainWindowUI(); | |||
|
31 | ||||
|
32 | lfrXmlParser->generalCCSDSPacketStore = &this->generalCCSDSPacketStore; | |||
|
33 | ||||
|
34 | initSocketStatesList(); | |||
|
35 | ||||
|
36 | this->setLayout(UI->layout()); | |||
|
37 | ||||
|
38 | connect(this->UI->button_openServerTCTM, SIGNAL(clicked()), this, SLOT(listenOnTCTMPorts())); | |||
|
39 | connect(this->UI->button_testServerTCTM, SIGNAL(clicked()), this, SLOT(testTCTMPorts())); | |||
|
40 | connect(this->UI->button_openSocketEchoServer, SIGNAL(clicked()), this, SLOT(openEchoServer())); | |||
|
41 | // | |||
|
42 | connect(this->analyserSGSEServerTC, SIGNAL(newConnection()), this, SLOT(newConnectionOnTCServer())); | |||
|
43 | connect(this->analyserSGSEServerTM, SIGNAL(newConnection()), this, SLOT(newConnectionOnTMServer())); | |||
|
44 | // | |||
|
45 | connect(this, SIGNAL(socketTMHasChanged(QTcpSocket*)), this->lfrXmlWriter, SLOT(setSocketTM(QTcpSocket*))); | |||
|
46 | connect(this->UI->button_TCAcknowledgement, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_TC_Acknowledgment())); | |||
|
47 | connect(this->UI->button_TCRejection, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_TC_rejection())); | |||
|
48 | connect(this->UI->button_GSEHK, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_GSE_HK())); | |||
|
49 | ||||
|
50 | // socket echo server | |||
|
51 | connect(this->socketEchoServer, SIGNAL(stateChanged(QAbstractSocket::SocketState)), | |||
|
52 | this, SLOT(socket_TMEcho_ServerHasChanged())); | |||
|
53 | connect(this->socketEchoServer, SIGNAL(readyRead()), | |||
|
54 | this, SLOT(readDataOnSocketEchoServer())); | |||
|
55 | ||||
|
56 | // display on console | |||
|
57 | connect(this->xmlHandler, SIGNAL(displayMessage(QString)), | |||
|
58 | this, SLOT(displayOnConsole(QString))); | |||
|
59 | connect(this->UI->hkDisplay, SIGNAL(displayMessage(QString)), | |||
|
60 | this, SLOT(displayOnConsole(QString))); | |||
|
61 | connect(this->lfrXmlParser, SIGNAL(sendMessage(QString)), | |||
|
62 | this, SLOT(displayOnConsole(QString))); | |||
|
63 | // | |||
|
64 | connect(this->lfrXmlParser, SIGNAL(processPacketStore()), | |||
|
65 | this, SLOT(processPacketStore())); | |||
|
66 | // | |||
|
67 | connect(this->UI->button_resetStatistics, SIGNAL(clicked()), | |||
|
68 | this, SLOT(resetStatistics())); | |||
|
69 | ||||
|
70 | displayNetworkInterfaces(); | |||
|
71 | ||||
|
72 | this->xmlHandler->packetStoreHasChanged(&generalCCSDSPacketStore); | |||
|
73 | }; | |||
|
74 | ||||
|
75 | MainWindow::~MainWindow() | |||
|
76 | { | |||
|
77 | ||||
|
78 | } | |||
|
79 | ||||
|
80 | void MainWindow::displayNetworkInterfaces() | |||
|
81 | { | |||
|
82 | QList<QHostAddress> list = QNetworkInterface::allAddresses(); | |||
|
83 | this->displayOnConsole("Network interfaces:"); | |||
|
84 | for(int nIter=0; nIter<list.count(); nIter++) | |||
|
85 | { | |||
|
86 | this->UI->displayOnConsole(list[nIter].toString()); | |||
|
87 | } | |||
|
88 | } | |||
|
89 | ||||
|
90 | void MainWindow::listenOnTCTMPorts() | |||
|
91 | { | |||
|
92 | QString str; | |||
|
93 | ||||
|
94 | //*** | |||
|
95 | // TC | |||
|
96 | analyserSGSEServerTC->listen(QHostAddress::Any, this->UI->getTCPort()); | |||
|
97 | str = analyserSGSEServerTC->errorString(); | |||
|
98 | if (!str.isEmpty()) | |||
|
99 | { | |||
|
100 | this->displayOnConsole(str); | |||
|
101 | } | |||
|
102 | this->displayOnConsole("Listening TC on port " | |||
|
103 | + QString::number(this->UI->getTCPort()) | |||
|
104 | ); | |||
|
105 | ||||
|
106 | //*** | |||
|
107 | // TM | |||
|
108 | analyserSGSEServerTM->listen(QHostAddress::Any, this->UI->getTMPort()); | |||
|
109 | str = analyserSGSEServerTM->errorString(); | |||
|
110 | if (!str.isEmpty()) | |||
|
111 | { | |||
|
112 | this->displayOnConsole(str); | |||
|
113 | } | |||
|
114 | this->displayOnConsole("Listening TM on port " | |||
|
115 | + QString::number(this->UI->getTMPort()) | |||
|
116 | ); | |||
|
117 | } | |||
|
118 | ||||
|
119 | void MainWindow::testTCTMPorts() | |||
|
120 | { | |||
|
121 | if (socketTC != NULL) | |||
|
122 | { | |||
|
123 | this->displayOnConsole("TC socket *** " + socketStates.at(socketTC->state()) ); | |||
|
124 | } | |||
|
125 | else | |||
|
126 | { | |||
|
127 | this->displayOnConsole("TC socket *** not tested, (socketTC) is NULL" ); | |||
|
128 | } | |||
|
129 | if (socketTM != NULL) | |||
|
130 | { | |||
|
131 | this->displayOnConsole("TM socket *** " + socketStates.at(socketTM->state()) ); | |||
|
132 | } | |||
|
133 | else | |||
|
134 | { | |||
|
135 | this->displayOnConsole("TM socket *** not tested, (socketTM) is NULL" ); | |||
|
136 | } | |||
|
137 | } | |||
|
138 | ||||
|
139 | void MainWindow::newConnectionOnTCServer() | |||
|
140 | { | |||
|
141 | this->displayOnConsole("got new connection on TC port"); | |||
|
142 | socketTC = analyserSGSEServerTC->nextPendingConnection(); | |||
|
143 | this->displayOnConsole("TC socket *** " + socketStates.at(socketTC->state()) ); | |||
|
144 | connect(this->socketTC, SIGNAL(readyRead()), this, SLOT(readDataOnTCPort())); | |||
|
145 | } | |||
|
146 | ||||
|
147 | void MainWindow::newConnectionOnTMServer() | |||
|
148 | { | |||
|
149 | this->displayOnConsole("got new connection on TM port"); | |||
|
150 | socketTM = analyserSGSEServerTM->nextPendingConnection(); | |||
|
151 | this->displayOnConsole("TM socket *** " + socketStates.at(socketTM->state()) ); | |||
|
152 | connect(this->socketTM, SIGNAL(readyRead()), this, SLOT(readDataOnTMPort())); | |||
|
153 | ||||
|
154 | emit socketTMHasChanged(this->socketTM); | |||
|
155 | } | |||
|
156 | ||||
|
157 | void MainWindow::readDataOnTCPort() | |||
|
158 | { | |||
|
159 | bool ok; | |||
|
160 | int nbBytesAvailable = 0; | |||
|
161 | ||||
|
162 | nbBytesAvailable = socketTC->bytesAvailable(); | |||
|
163 | buffer = (char *) malloc(nbBytesAvailable); | |||
|
164 | socketTC->read(buffer, nbBytesAvailable); | |||
|
165 | ||||
|
166 | this->displayOnConsole("readDataOnTCPort *** " | |||
|
167 | + QString::number(nbBytesAvailable) | |||
|
168 | + " read"); | |||
|
169 | ||||
|
170 | QByteArray xmlData( buffer, nbBytesAvailable); | |||
|
171 | ||||
|
172 | free(buffer); | |||
|
173 | ||||
|
174 | sourceTC->setData( xmlData ); | |||
|
175 | ||||
|
176 | xmlReader.setContentHandler(xmlHandler); | |||
|
177 | xmlReader.setErrorHandler(xmlHandler); | |||
|
178 | ||||
|
179 | ok = xmlReader.parse(sourceTC); | |||
|
180 | if (!ok) { | |||
|
181 | std::cout << "Parsing failed." << std::endl; | |||
|
182 | } | |||
|
183 | else { | |||
|
184 | QStringList names = xmlHandler->names(); | |||
|
185 | QList<int> indentations = xmlHandler->indentations(); | |||
|
186 | ||||
|
187 | int items = names.count(); | |||
|
188 | ||||
|
189 | for (int i = 0; i < items; ++i) { | |||
|
190 | displayOnConsole( | |||
|
191 | names[i] | |||
|
192 | + " --- identations: " | |||
|
193 | + QString::number(indentations[i])); | |||
|
194 | } | |||
|
195 | } | |||
|
196 | } | |||
|
197 | ||||
|
198 | void MainWindow::readDataOnTMPort() | |||
|
199 | { | |||
|
200 | this->displayOnConsole("TM data received, begin parsing"); | |||
|
201 | } | |||
|
202 | ||||
|
203 | void MainWindow::readDataOnSocketEchoServer() | |||
|
204 | { | |||
|
205 | QString dataString; | |||
|
206 | ||||
|
207 | dataArray.append(socketEchoServer->readAll()); | |||
|
208 | dataString = QString::fromAscii(dataArray); | |||
|
209 | this->lfrXmlParser->processIncomingStr(dataString); | |||
|
210 | dataArray.clear(); | |||
|
211 | } | |||
|
212 | ||||
|
213 | void MainWindow::displayOnConsole(QString message) | |||
|
214 | { | |||
|
215 | this->UI->displayOnConsole( message ); | |||
|
216 | } | |||
|
217 | ||||
|
218 | void MainWindow::initSocketStatesList() | |||
|
219 | { | |||
|
220 | socketStates.append("The socket is not connected"); | |||
|
221 | socketStates.append("The socket is performing a host name lookup"); | |||
|
222 | socketStates.append("The socket has started establishing a connection"); | |||
|
223 | socketStates.append("A connection is established"); | |||
|
224 | socketStates.append("The socket is bound to an address and port (for servers)"); | |||
|
225 | socketStates.append("The socket is about to close (data may still be waiting to be written)"); | |||
|
226 | socketStates.append("For internal use only"); | |||
|
227 | } | |||
|
228 | ||||
|
229 | void MainWindow::openEchoServer() | |||
|
230 | { | |||
|
231 | socketEchoServer->connectToHost(this->UI->serverTMEchoDialogBox->getIP(), | |||
|
232 | this->UI->spinbox_serverTMEchoPort->value()); | |||
|
233 | //socketEchoServer->open(); | |||
|
234 | } | |||
|
235 | ||||
|
236 | void MainWindow::socket_TMEcho_ServerHasChanged() | |||
|
237 | { | |||
|
238 | this->displayOnConsole("TM Echo Socket socket *** " + socketStates.at(socketEchoServer->state()) ); | |||
|
239 | } | |||
|
240 | ||||
|
241 | void MainWindow::preProcessPacket(TMPacketToRead *packet) | |||
|
242 | { | |||
|
243 | unsigned char pid = 0; | |||
|
244 | unsigned char cat = 0; | |||
|
245 | unsigned char typ = 0; | |||
|
246 | unsigned char sub = 0; | |||
|
247 | unsigned int sid = 0; | |||
|
248 | unsigned int length = 0; | |||
|
249 | unsigned int coarse_t = 0; | |||
|
250 | unsigned int fine_t = 0; | |||
|
251 | ||||
|
252 | //********************************* | |||
|
253 | // get the parameters of the packet | |||
|
254 | pid = ((packet->Value[4] & 0x07) << 4) + ((packet->Value[5] & 0xf0) >> 4); | |||
|
255 | cat = packet->Value[5] & 0x0f; | |||
|
256 | typ = packet->Value[11]; // TYPE | |||
|
257 | sub = packet->Value[12]; // SUBTYPE | |||
|
258 | sid = 0; | |||
|
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 | } | |||
|
266 | coarse_t = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16) | |||
|
267 | + packet->Value[16] * pow(2, 8) + packet->Value[17]; | |||
|
268 | fine_t = packet->Value[18] * pow(2, 8) + packet->Value[19]; | |||
|
269 | ||||
|
270 | if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8)) | |||
|
271 | sid = packet->Value[20] * 256 + packet->Value[21]; | |||
|
272 | else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25)) | |||
|
273 | sid = 1; | |||
|
274 | else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3)) | |||
|
275 | sid = packet->Value[20]; | |||
|
276 | else if ((pid == 79) & (cat == 12) & (typ == 21) & (sub == 3)) | |||
|
277 | sid = packet->Value[20]; | |||
|
278 | ||||
|
279 | this->UI->tmStatistics->updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t); | |||
|
280 | ||||
|
281 | //*************************************************** | |||
|
282 | // if the packet is an HK packet, display its content | |||
|
283 | if ( (typ == TYPE_HK) & (sub == SUBTYPE_HK) ) | |||
|
284 | { | |||
|
285 | this->UI->hkDisplay->displayPacket(packet); | |||
|
286 | } | |||
|
287 | ||||
|
288 | //**************************************** | |||
|
289 | // if the packet is a waveform, display it | |||
|
290 | if ( (typ == 21) & (sub == 3) ) | |||
|
291 | { | |||
|
292 | sid = packet->Value[20]; // SID | |||
|
293 | switch (sid){ | |||
|
294 | case SID_NORMAL_SWF_F0: | |||
|
295 | buildWFAndDisplay(packet, &wfPacketNormal[0], 0); | |||
|
296 | break; | |||
|
297 | case SID_NORMAL_SWF_F1: | |||
|
298 | buildWFAndDisplay(packet, &wfPacketNormal[1], 1); | |||
|
299 | break; | |||
|
300 | case SID_NORMAL_SWF_F2: | |||
|
301 | buildWFAndDisplay(packet, &wfPacketNormal[2], 2); | |||
|
302 | break; | |||
|
303 | case SID_NORMAL_CWF_F3: | |||
|
304 | buildWFAndDisplay(packet, &wfPacketNormal[3], 3); | |||
|
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 | } | |||
|
316 | } | |||
|
317 | } | |||
|
318 | ||||
|
319 | void MainWindow::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) | |||
|
320 | { | |||
|
321 | unsigned int i = 0; | |||
|
322 | unsigned int j = 0; | |||
|
323 | unsigned char *data; | |||
|
324 | unsigned char pkt_nr = 0; | |||
|
325 | unsigned int blk_nr = 0; | |||
|
326 | ||||
|
327 | pkt_nr = packet->Value[23]; // PKT_NR | |||
|
328 | blk_nr = packet->Value[30] * 256 + packet->Value[31]; | |||
|
329 | data = &packet->Value[32]; // start of the first data block; | |||
|
330 | j = (pkt_nr-1) * 340; | |||
|
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]) ); | |||
|
333 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |||
|
334 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |||
|
335 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |||
|
336 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |||
|
337 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |||
|
338 | } | |||
|
339 | if (pkt_nr == 7) | |||
|
340 | { | |||
|
341 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); | |||
|
342 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); | |||
|
343 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); | |||
|
344 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); | |||
|
345 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); | |||
|
346 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5); | |||
|
347 | } | |||
|
348 | } | |||
|
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 | ||||
|
446 | void MainWindow::processIncomingPacket(TMPacketToRead *packet) | |||
|
447 | { | |||
|
448 | totalOfBytes = totalOfBytes + packet->size; | |||
|
449 | totalOfPackets = totalOfPackets + 1; | |||
|
450 | this->UI->totalOfBytesHasChanged(totalOfBytes); | |||
|
451 | this->UI->totalOfPacketsHasChanged(totalOfPackets); | |||
|
452 | preProcessPacket(packet); | |||
|
453 | } | |||
|
454 | ||||
|
455 | void MainWindow::resetStatistics() | |||
|
456 | { | |||
|
457 | totalOfBytes = 0; | |||
|
458 | totalOfPackets = 0; | |||
|
459 | this->UI->totalOfBytesHasChanged(totalOfBytes); | |||
|
460 | this->UI->totalOfPacketsHasChanged(totalOfPackets); | |||
|
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 | } |
@@ -0,0 +1,85 | |||||
|
1 | #ifndef MAINWINDOW_H | |||
|
2 | #define MAINWINDOW_H | |||
|
3 | ||||
|
4 | #include <QtGui/QMainWindow> | |||
|
5 | #include <QTcpServer> | |||
|
6 | #include <QTcpSocket> | |||
|
7 | #include <QXmlSimpleReader> | |||
|
8 | ||||
|
9 | #include <lfrxmlhandler.h> | |||
|
10 | #include <lfrxmlwriter.h> | |||
|
11 | #include <mainwindowui.h> | |||
|
12 | #include "tmpackettoread.h" | |||
|
13 | #include "wfpacket.h" | |||
|
14 | #include "lfrxmlparser.h" | |||
|
15 | ||||
|
16 | class MainWindow : public QWidget | |||
|
17 | { | |||
|
18 | Q_OBJECT | |||
|
19 | ||||
|
20 | public: | |||
|
21 | MainWindow(QWidget *parent = 0); | |||
|
22 | ~MainWindow(); | |||
|
23 | ||||
|
24 | void displayNetworkInterfaces(); | |||
|
25 | void initSocketStatesList(); | |||
|
26 | void preProcessPacket(TMPacketToRead *packet); | |||
|
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); | |||
|
31 | ||||
|
32 | private: | |||
|
33 | QByteArray dataArray; | |||
|
34 | ||||
|
35 | QList<TMPacketToRead*> generalCCSDSPacketStore; | |||
|
36 | ||||
|
37 | QTcpServer *analyserSGSEServerTC; | |||
|
38 | QTcpServer *analyserSGSEServerTM; | |||
|
39 | QTcpSocket *socketTC; | |||
|
40 | QTcpSocket *socketTM; | |||
|
41 | QTcpSocket *socketEchoServer; | |||
|
42 | ||||
|
43 | unsigned int totalOfBytes; | |||
|
44 | unsigned int totalOfPackets; | |||
|
45 | ||||
|
46 | QXmlSimpleReader xmlReader; | |||
|
47 | QXmlInputSource *sourceTC; | |||
|
48 | LFRXmlHandler *xmlHandler; | |||
|
49 | LFRXmlParser *lfrXmlParser; | |||
|
50 | ||||
|
51 | QList<QString> socketStates; | |||
|
52 | ||||
|
53 | char *buffer; | |||
|
54 | ||||
|
55 | MainWindowUI *UI; | |||
|
56 | ||||
|
57 | LFRXmlWriter *lfrXmlWriter; | |||
|
58 | ||||
|
59 | WFPacket wfPacketNormal[4]; | |||
|
60 | WFPacket wfPacketBurst; | |||
|
61 | WFPacket wfPacketSBM1; | |||
|
62 | WFPacket wfPacketSBM2; | |||
|
63 | ||||
|
64 | bool parsingContinue; | |||
|
65 | ||||
|
66 | signals: | |||
|
67 | void socketTMHasChanged(QTcpSocket *socket); | |||
|
68 | ||||
|
69 | public slots: | |||
|
70 | void displayOnConsole(QString message); | |||
|
71 | void listenOnTCTMPorts(); | |||
|
72 | void testTCTMPorts(); | |||
|
73 | void newConnectionOnTCServer(); | |||
|
74 | void newConnectionOnTMServer(); | |||
|
75 | void readDataOnTCPort(); | |||
|
76 | void readDataOnTMPort(); | |||
|
77 | void readDataOnSocketEchoServer(); | |||
|
78 | void openEchoServer(); | |||
|
79 | void socket_TMEcho_ServerHasChanged(); | |||
|
80 | void processIncomingPacket(TMPacketToRead *packet); | |||
|
81 | void resetStatistics(); | |||
|
82 | void processPacketStore(); | |||
|
83 | }; | |||
|
84 | ||||
|
85 | #endif // MAINWINDOW_H |
@@ -0,0 +1,162 | |||||
|
1 | #include "mainwindowui.h" | |||
|
2 | ||||
|
3 | MainWindowUI::MainWindowUI(QWidget *parent) : | |||
|
4 | QWidget(parent) | |||
|
5 | { | |||
|
6 | label_serverTMEcho = new QLabel(tr("TM Echo Server address")); | |||
|
7 | label_serverTMEchoPort = new QLabel(tr("TM Echo Server Port")); | |||
|
8 | label_TMServerPort = new QLabel(tr("TM Server Port:")); | |||
|
9 | label_TCServerPort = new QLabel(tr("TC Server Port:")); | |||
|
10 | label_currentTCTMServer = new QLabel(tr("Current IP address:")); | |||
|
11 | label_currentTCTMServerIP = new QLabel(tr("-")); | |||
|
12 | label_totalOfBytes = new QLabel(tr("Received Bytes: -")); | |||
|
13 | label_totalOfPackets = new QLabel(tr("Received Packets: -")); | |||
|
14 | ||||
|
15 | console = new QTextEdit(); | |||
|
16 | ||||
|
17 | spwTabWidget = new QTabWidget; | |||
|
18 | spwTabWidgetPage0 = new QWidget; | |||
|
19 | spwTabWidgetPage1 = new QWidget; | |||
|
20 | spwTabWidgetPage2 = new QWidget; | |||
|
21 | spwTabWidgetPage3 = new QWidget; | |||
|
22 | spwTabWidgetPage4 = new QWidget; | |||
|
23 | spwTabWidgetPage5 = new QWidget; // WFRM BURST | |||
|
24 | spwTabWidgetPage6 = new QWidget; // WFRM SBM1 | |||
|
25 | spwTabWidgetPage7 = new QWidget; // WFRM SBM2 | |||
|
26 | ||||
|
27 | tmStatistics = new TMStatistics; | |||
|
28 | ||||
|
29 | wfDisplay = new WFDisplay(); | |||
|
30 | wfPageBurst = new WFPage(); | |||
|
31 | wfPageSBM1 = new WFPage(); | |||
|
32 | wfPageSBM2 = new WFPage(); | |||
|
33 | hkDisplay = new HKDisplay(); | |||
|
34 | lfrSpectrogam = new LFRSpectrogram(); | |||
|
35 | ||||
|
36 | spinbox_TMServerPort = new QSpinBox(); | |||
|
37 | spinbox_TCServerPort = new QSpinBox(); | |||
|
38 | spinbox_serverTMEchoPort = new QSpinBox(); | |||
|
39 | spinbox_TMServerPort->setRange(59000, 65535); | |||
|
40 | spinbox_TCServerPort->setRange(59001, 65535); | |||
|
41 | spinbox_serverTMEchoPort->setRange(59002, 65535); | |||
|
42 | ||||
|
43 | button_openServerTCTM = new QPushButton(tr("Open TC / TM Ports")); | |||
|
44 | button_testServerTCTM = new QPushButton(tr("Test TC / TM Ports")); | |||
|
45 | button_openSocketEchoServer = new QPushButton(tr("Open Echo Server")); | |||
|
46 | button_TCAcknowledgement = new QPushButton(tr("send TC Acknowledgement")); | |||
|
47 | button_TCRejection = new QPushButton(tr("send TC rejection")); | |||
|
48 | button_GSEHK = new QPushButton(tr("send GSE HK")); | |||
|
49 | button_clearConsole = new QPushButton(tr("Clear console")); | |||
|
50 | button_resetStatistics = new QPushButton(tr("Reset statistics")); | |||
|
51 | ||||
|
52 | serverTMEchoDialogBox = new QIPDialogBox(); | |||
|
53 | serverTMEchoDialogBox->setIP(127, 0, 0, 1); | |||
|
54 | ||||
|
55 | groupbox_TMEcho = new QGroupBox(tr("TM Echo Server")); | |||
|
56 | groupbox_ports = new QGroupBox(tr("Ports for the TM and TC Servers")); | |||
|
57 | groupbox_TMToForeignGSETester = new QGroupBox(tr("Send TM to the foreign GSE tester")); | |||
|
58 | ||||
|
59 | layout_TMEcho = new QVBoxLayout(); | |||
|
60 | layout_overallLayout = new QVBoxLayout(); | |||
|
61 | layout_ports = new QGridLayout(); | |||
|
62 | layout_TMToForeignGSETester = new QVBoxLayout(); | |||
|
63 | mainLayout = new QGridLayout(); | |||
|
64 | ||||
|
65 | layout_TMEcho->addWidget(label_serverTMEcho); | |||
|
66 | layout_TMEcho->addWidget(serverTMEchoDialogBox); | |||
|
67 | layout_TMEcho->addWidget(label_serverTMEchoPort); | |||
|
68 | layout_TMEcho->addWidget(spinbox_serverTMEchoPort); | |||
|
69 | layout_TMEcho->addWidget(button_openSocketEchoServer); | |||
|
70 | layout_TMEcho->addWidget(label_totalOfPackets); | |||
|
71 | layout_TMEcho->addWidget(label_totalOfBytes); | |||
|
72 | layout_TMEcho->addWidget(button_resetStatistics); | |||
|
73 | groupbox_TMEcho->setLayout(layout_TMEcho); | |||
|
74 | ||||
|
75 | layout_ports->addWidget(label_TMServerPort, 0, 0, 1, 1); | |||
|
76 | layout_ports->addWidget(spinbox_TMServerPort, 0, 1, 1, 1); | |||
|
77 | layout_ports->addWidget(label_TCServerPort, 1, 0, 1, 1); | |||
|
78 | layout_ports->addWidget(spinbox_TCServerPort, 1, 1, 1, 1); | |||
|
79 | layout_ports->addWidget(button_openServerTCTM, 2, 0, 1, 2); | |||
|
80 | layout_ports->addWidget(button_testServerTCTM, 3, 0, 1, 2); | |||
|
81 | groupbox_ports->setLayout(layout_ports); | |||
|
82 | ||||
|
83 | layout_TMToForeignGSETester->addWidget(button_TCAcknowledgement); | |||
|
84 | layout_TMToForeignGSETester->addWidget(button_TCRejection); | |||
|
85 | layout_TMToForeignGSETester->addWidget(button_GSEHK); | |||
|
86 | groupbox_TMToForeignGSETester->setLayout(layout_TMToForeignGSETester); | |||
|
87 | ||||
|
88 | mainLayout->addWidget(groupbox_TMEcho, 0, 0, 1, 1); | |||
|
89 | mainLayout->addWidget(groupbox_ports, 1, 0, 1, 1); | |||
|
90 | mainLayout->addWidget(groupbox_TMToForeignGSETester, 2, 0, 1, 1); | |||
|
91 | mainLayout->addWidget(console, 0, 1, 2, 2); | |||
|
92 | mainLayout->addWidget(button_clearConsole, 3, 1, 1, 2); | |||
|
93 | ||||
|
94 | spwTabWidget->addTab(spwTabWidgetPage0, tr("Connection")); | |||
|
95 | spwTabWidget->addTab(spwTabWidgetPage1, tr("TM Statistics")); | |||
|
96 | spwTabWidget->addTab(spwTabWidgetPage3, tr("HK")); | |||
|
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")); | |||
|
101 | spwTabWidget->addTab(spwTabWidgetPage4, tr("Spectrograms")); | |||
|
102 | ||||
|
103 | spwTabWidgetPage0->setLayout(mainLayout); | |||
|
104 | spwTabWidgetPage1->setLayout(tmStatistics->layout()); | |||
|
105 | spwTabWidgetPage2->setLayout(wfDisplay->layout()); | |||
|
106 | spwTabWidgetPage3->setLayout(hkDisplay->layout()); | |||
|
107 | spwTabWidgetPage4->setLayout(lfrSpectrogam->layout()); | |||
|
108 | spwTabWidgetPage5->setLayout(wfPageBurst->layout()); | |||
|
109 | spwTabWidgetPage6->setLayout(wfPageSBM1->layout()); | |||
|
110 | spwTabWidgetPage7->setLayout(wfPageSBM2->layout()); | |||
|
111 | ||||
|
112 | layout_overallLayout->addWidget(spwTabWidget); | |||
|
113 | ||||
|
114 | this->setLayout(layout_overallLayout); | |||
|
115 | ||||
|
116 | connect(this->button_clearConsole, SIGNAL(clicked()), this, SLOT(clearConsole())); | |||
|
117 | } | |||
|
118 | ||||
|
119 | QString MainWindowUI::getTMEchoServerAddress() | |||
|
120 | { | |||
|
121 | return(serverTMEchoDialogBox->getIP()); | |||
|
122 | } | |||
|
123 | ||||
|
124 | void MainWindowUI::setTCTMServerAddressIP(QString address) | |||
|
125 | { | |||
|
126 | label_currentTCTMServerIP->setText(address); | |||
|
127 | } | |||
|
128 | ||||
|
129 | int MainWindowUI::getTMPort() | |||
|
130 | { | |||
|
131 | return spinbox_TMServerPort->value(); | |||
|
132 | } | |||
|
133 | ||||
|
134 | int MainWindowUI::getTCPort() | |||
|
135 | { | |||
|
136 | return spinbox_TCServerPort->value(); | |||
|
137 | } | |||
|
138 | ||||
|
139 | void MainWindowUI::displayOnConsole(QString message) | |||
|
140 | { | |||
|
141 | console->append(message); | |||
|
142 | } | |||
|
143 | ||||
|
144 | void MainWindowUI::clearConsole() | |||
|
145 | { | |||
|
146 | console->clear(); | |||
|
147 | } | |||
|
148 | ||||
|
149 | void MainWindowUI::totalOfBytesHasChanged(unsigned int nbBytes) | |||
|
150 | { | |||
|
151 | label_totalOfBytes->setText( | |||
|
152 | "Received Bytes: " | |||
|
153 | + QString::number(nbBytes)); | |||
|
154 | } | |||
|
155 | ||||
|
156 | void MainWindowUI::totalOfPacketsHasChanged(unsigned int nbPackets) | |||
|
157 | { | |||
|
158 | label_totalOfPackets->setText( | |||
|
159 | "Received Packets: " | |||
|
160 | + QString::number(nbPackets)); | |||
|
161 | } | |||
|
162 |
@@ -0,0 +1,101 | |||||
|
1 | #ifndef MAINWINDOWUI_H | |||
|
2 | #define MAINWINDOWUI_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <qipdialogbox.h> | |||
|
6 | #include <QLabel> | |||
|
7 | #include <QPushButton> | |||
|
8 | #include <QGridLayout> | |||
|
9 | #include <QVBoxLayout> | |||
|
10 | #include <QGroupBox> | |||
|
11 | #include <QSpinBox> | |||
|
12 | #include <QTextEdit> | |||
|
13 | #include <QTabWidget> | |||
|
14 | ||||
|
15 | #include "tmstatistics.h" | |||
|
16 | #include "wfdisplay.h" | |||
|
17 | #include "hkdisplay.h" | |||
|
18 | #include "lfrspectrogram.h" | |||
|
19 | ||||
|
20 | class MainWindowUI : public QWidget | |||
|
21 | { | |||
|
22 | Q_OBJECT | |||
|
23 | public: | |||
|
24 | explicit MainWindowUI(QWidget *parent = 0); | |||
|
25 | ||||
|
26 | void setTCTMServerAddressIP(QString address); | |||
|
27 | QString getTMEchoServerAddress(); | |||
|
28 | int getTMPort(); | |||
|
29 | int getTCPort(); | |||
|
30 | void displayOnConsole(QString message); | |||
|
31 | ||||
|
32 | QTabWidget *spwTabWidget; | |||
|
33 | QWidget* spwTabWidgetPage0; | |||
|
34 | QWidget* spwTabWidgetPage1; | |||
|
35 | QWidget* spwTabWidgetPage2; | |||
|
36 | QWidget* spwTabWidgetPage3; | |||
|
37 | QWidget* spwTabWidgetPage4; | |||
|
38 | QWidget* spwTabWidgetPage5; | |||
|
39 | QWidget* spwTabWidgetPage6; | |||
|
40 | QWidget* spwTabWidgetPage7; | |||
|
41 | ||||
|
42 | TMStatistics* tmStatistics; | |||
|
43 | ||||
|
44 | WFDisplay* wfDisplay; | |||
|
45 | WFPage* wfPageBurst; | |||
|
46 | WFPage* wfPageSBM1; | |||
|
47 | WFPage* wfPageSBM2; | |||
|
48 | HKDisplay* hkDisplay; | |||
|
49 | LFRSpectrogram* lfrSpectrogam; | |||
|
50 | ||||
|
51 | QWidget* widget_spectrogram; | |||
|
52 | ||||
|
53 | QPushButton *button_openServerTCTM; | |||
|
54 | QPushButton *button_testServerTCTM; | |||
|
55 | QPushButton *button_openSocketEchoServer; | |||
|
56 | QPushButton *button_TCAcknowledgement; | |||
|
57 | QPushButton *button_TCRejection; | |||
|
58 | QPushButton *button_GSEHK; | |||
|
59 | QPushButton *button_clearConsole; | |||
|
60 | QPushButton *button_resetStatistics; | |||
|
61 | ||||
|
62 | QIPDialogBox *serverTMEchoDialogBox; | |||
|
63 | ||||
|
64 | QSpinBox *spinbox_serverTMEchoPort; | |||
|
65 | ||||
|
66 | signals: | |||
|
67 | ||||
|
68 | public slots: | |||
|
69 | void clearConsole(); | |||
|
70 | void totalOfBytesHasChanged(unsigned int nbBytes); | |||
|
71 | void totalOfPacketsHasChanged(unsigned int nbPackets); | |||
|
72 | ||||
|
73 | private: | |||
|
74 | QLabel *label_serverTMEcho; | |||
|
75 | QLabel *label_serverTMEchoPort; | |||
|
76 | QLabel *label_TMServerPort; | |||
|
77 | QLabel *label_TCServerPort; | |||
|
78 | QLabel *label_currentTCTMServer; | |||
|
79 | QLabel *label_currentTCTMServerIP; | |||
|
80 | QLabel *label_totalOfBytes; | |||
|
81 | QLabel *label_totalOfPackets; | |||
|
82 | ||||
|
83 | QTextEdit *console; | |||
|
84 | ||||
|
85 | QSpinBox *spinbox_TMServerPort; | |||
|
86 | QSpinBox *spinbox_TCServerPort; | |||
|
87 | ||||
|
88 | QGroupBox *groupbox_TMEcho; | |||
|
89 | QGroupBox *groupbox_ports; | |||
|
90 | QGroupBox *groupbox_TMToForeignGSETester; | |||
|
91 | ||||
|
92 | QVBoxLayout *layout_TMEcho; | |||
|
93 | QVBoxLayout *layout_TMToForeignGSETester; | |||
|
94 | QVBoxLayout *layout_overallLayout; | |||
|
95 | ||||
|
96 | QGridLayout *mainLayout; | |||
|
97 | QGridLayout *layout_ports; | |||
|
98 | ||||
|
99 | }; | |||
|
100 | ||||
|
101 | #endif // MAINWINDOWUI_H |
@@ -0,0 +1,52 | |||||
|
1 | #ifndef PARAMS_H | |||
|
2 | #define PARAMS_H | |||
|
3 | ||||
|
4 | #define XMAX 2048 | |||
|
5 | #define YMAX 35000 | |||
|
6 | #define FONT_SIZE_WAVEFORM_TITLE 10 | |||
|
7 | #define DEFAULT_SIZE 2048 | |||
|
8 | #define BLK_SIZE 12 | |||
|
9 | ||||
|
10 | //**************** | |||
|
11 | // TM packets SIDs | |||
|
12 | #define SID_NORMAL_SWF_F0 3 | |||
|
13 | #define SID_NORMAL_SWF_F1 4 | |||
|
14 | #define SID_NORMAL_SWF_F2 5 | |||
|
15 | #define SID_NORMAL_CWF_F3 1 | |||
|
16 | #define SID_NORMAL_ASM_F0 11 | |||
|
17 | #define SID_NORMAL_ASM_F1 12 | |||
|
18 | #define SID_NORMAL_ASM_F2 13 | |||
|
19 | #define SID_NORMAL_BP1_F0 14 | |||
|
20 | #define SID_NORMAL_BP1_F1 15 | |||
|
21 | #define SID_NORMAL_BP1_F2 16 | |||
|
22 | #define SID_NORMAL_BP2_F0 19 | |||
|
23 | #define SID_NORMAL_BP2_F1 20 | |||
|
24 | #define SID_NORMAL_BP2_F2 21 | |||
|
25 | // | |||
|
26 | #define SID_BURST_CWF_F2 2 | |||
|
27 | #define SID_BURST_BP1_F0 17 | |||
|
28 | #define SID_BURST_BP2_F0 22 | |||
|
29 | #define SID_BURST_BP1_F1 18 | |||
|
30 | #define SID_BURST_BP2_F1 23 | |||
|
31 | // | |||
|
32 | #define SID_SBM1_CWF_F1 24 | |||
|
33 | #define SID_SBM1_BP1_F0 28 | |||
|
34 | #define SID_SBM1_BP2_F0 31 | |||
|
35 | // | |||
|
36 | #define SID_SBM2_CWF_F2 25 | |||
|
37 | #define SID_SBM2_BP1_F0 29 | |||
|
38 | #define SID_SBM2_BP2_F0 32 | |||
|
39 | #define SID_SBM2_BP1_F1 30 | |||
|
40 | #define SID_SBM2_BP2_F1 33 | |||
|
41 | ||||
|
42 | #define TYPE_HK 3 | |||
|
43 | ||||
|
44 | #define SUBTYPE_HK 25 | |||
|
45 | ||||
|
46 | //***** | |||
|
47 | // RMAP | |||
|
48 | #define DEFAULT_DESTINATION_KEY 2 | |||
|
49 | #define DEFAULT_SOURCE 1 | |||
|
50 | #define DEFAULT_TARGET 254 | |||
|
51 | ||||
|
52 | #endif // PARAMS_H |
@@ -0,0 +1,253 | |||||
|
1 | #include "tmechobridge.h" | |||
|
2 | ||||
|
3 | TMEchoBridge::TMEchoBridge(QWidget *parent) : | |||
|
4 | QWidget(parent) | |||
|
5 | { | |||
|
6 | totalOfBytes = 0; | |||
|
7 | totalOfPackets = 0; | |||
|
8 | totalOfPacketsDropped = 0; | |||
|
9 | ||||
|
10 | tmEchoBridgeServer = new QTcpServer(); | |||
|
11 | tmEchoBridgeSocket = new QTcpSocket(); | |||
|
12 | xmlWriter = new QXmlStreamWriter(); | |||
|
13 | ||||
|
14 | console = new QTextEdit(); | |||
|
15 | ||||
|
16 | label_TMServerPort = new QLabel(tr("TM Server Port:")); | |||
|
17 | label_totalOfBytes = new QLabel(tr("Number of TM bytes sent: -")); | |||
|
18 | label_totalOfPackets = new QLabel(tr("Number of TM packets sent: -")); | |||
|
19 | label_totalOfPacketsDropped = new QLabel(tr("Number of TM packets dropped: -")); | |||
|
20 | ||||
|
21 | spinbox_TMServerPort = new QSpinBox(); | |||
|
22 | spinbox_TMServerPort->setRange(59002, 65535); | |||
|
23 | ||||
|
24 | button_openServerTCTM = new QPushButton(tr("Open Port")); | |||
|
25 | button_testServerTCTM = new QPushButton(tr("Test Port")); | |||
|
26 | button_sendTestPacket = new QPushButton(tr("Send a test packet")); | |||
|
27 | button_clearConsole = new QPushButton(tr("Clear console")); | |||
|
28 | button_resetTMStatistics = new QPushButton(tr("Reset TM Statistics")); | |||
|
29 | ||||
|
30 | groupbox_ports = new QGroupBox(tr("Port of the TM Echo Bridge")); | |||
|
31 | ||||
|
32 | layout_ports = new QGridLayout(); | |||
|
33 | mainLayout = new QGridLayout(); | |||
|
34 | ||||
|
35 | initSocketStatesList(); | |||
|
36 | ||||
|
37 | layout_ports->addWidget(label_TMServerPort, 0, 0, 1, 1); | |||
|
38 | layout_ports->addWidget(spinbox_TMServerPort, 0, 1, 1, 1); | |||
|
39 | layout_ports->addWidget(button_openServerTCTM, 2, 0, 1, 2); | |||
|
40 | layout_ports->addWidget(button_testServerTCTM, 3, 0, 1, 2); | |||
|
41 | layout_ports->addWidget(button_sendTestPacket, 4, 0, 1, 2); | |||
|
42 | layout_ports->addWidget(label_totalOfPackets, 5, 0, 1, 2); | |||
|
43 | layout_ports->addWidget(label_totalOfBytes, 6, 0, 1, 2); | |||
|
44 | layout_ports->addWidget(label_totalOfPacketsDropped, 7, 0, 1, 2); | |||
|
45 | layout_ports->addWidget(button_resetTMStatistics, 8, 0, 1, 2); | |||
|
46 | layout_ports->setRowStretch(9, 1); | |||
|
47 | layout_ports->setColumnStretch(2, 1); | |||
|
48 | ||||
|
49 | groupbox_ports->setLayout(layout_ports); | |||
|
50 | ||||
|
51 | mainLayout->addWidget(groupbox_ports, 0, 0, 1, 1); | |||
|
52 | mainLayout->addWidget(console, 0, 1, 1, 1); | |||
|
53 | mainLayout->addWidget(button_clearConsole, 1, 1, 1, 1); | |||
|
54 | ||||
|
55 | this->setLayout(mainLayout); | |||
|
56 | ||||
|
57 | connect(this->tmEchoBridgeServer, SIGNAL(newConnection()), this, SLOT(newConnectionOnTMEchoBridgeServer())); | |||
|
58 | connect(this->button_openServerTCTM, SIGNAL(clicked()), this, SLOT(listenOnTMEchoBridgePort())); | |||
|
59 | connect(this->button_testServerTCTM, SIGNAL(clicked()), this, SLOT(testTMEchoBridgePort())); | |||
|
60 | connect(this->button_sendTestPacket, SIGNAL(clicked()), this, SLOT(sendXML_GSE_HK())); | |||
|
61 | connect(this->button_clearConsole, SIGNAL(clicked()), this, SLOT(clearConsole())); | |||
|
62 | connect(this->button_resetTMStatistics, SIGNAL(clicked()), this, SLOT(resetTMStatistics())); | |||
|
63 | } | |||
|
64 | ||||
|
65 | void TMEchoBridge::listenOnTMEchoBridgePort() | |||
|
66 | { | |||
|
67 | QString str; | |||
|
68 | ||||
|
69 | tmEchoBridgeServer->listen(QHostAddress::Any, this->getTMPort()); | |||
|
70 | str = tmEchoBridgeServer->errorString(); | |||
|
71 | if (!str.isEmpty()) | |||
|
72 | { | |||
|
73 | this->displayOnConsole(str); | |||
|
74 | } | |||
|
75 | this->displayOnConsole("Listening TM on port " | |||
|
76 | + QString::number(this->getTMPort()) | |||
|
77 | ); | |||
|
78 | } | |||
|
79 | ||||
|
80 | void TMEchoBridge::testTMEchoBridgePort() | |||
|
81 | { | |||
|
82 | if (tmEchoBridgeSocket != NULL) | |||
|
83 | { | |||
|
84 | this->displayOnConsole("TM socket *** " + socketStates.at(tmEchoBridgeSocket->state()) ); | |||
|
85 | } | |||
|
86 | else | |||
|
87 | { | |||
|
88 | this->displayOnConsole("TC socket *** not tested, (socketTC) is NULL" ); | |||
|
89 | } | |||
|
90 | } | |||
|
91 | ||||
|
92 | void TMEchoBridge::newConnectionOnTMEchoBridgeServer() | |||
|
93 | { | |||
|
94 | this->displayOnConsole("got new connection on TM port"); | |||
|
95 | tmEchoBridgeSocket = tmEchoBridgeServer->nextPendingConnection(); | |||
|
96 | this->displayOnConsole("TM socket *** " + socketStates.at(tmEchoBridgeSocket->state()) ); | |||
|
97 | xmlWriter->setDevice(this->tmEchoBridgeSocket); | |||
|
98 | } | |||
|
99 | ||||
|
100 | int TMEchoBridge::getTMPort() | |||
|
101 | { | |||
|
102 | return spinbox_TMServerPort->value(); | |||
|
103 | } | |||
|
104 | ||||
|
105 | void TMEchoBridge::displayOnConsole(QString message) | |||
|
106 | { | |||
|
107 | console->append(message); | |||
|
108 | } | |||
|
109 | ||||
|
110 | void TMEchoBridge::initSocketStatesList() | |||
|
111 | { | |||
|
112 | socketStates.append("The socket is not connected"); | |||
|
113 | socketStates.append("The socket is performing a host name lookup"); | |||
|
114 | socketStates.append("The socket has started establishing a connection"); | |||
|
115 | socketStates.append("A connection is established"); | |||
|
116 | socketStates.append("The socket is bound to an address and port (for servers)"); | |||
|
117 | socketStates.append("The socket is about to close (data may still be waiting to be written)"); | |||
|
118 | socketStates.append("For internal use only"); | |||
|
119 | } | |||
|
120 | ||||
|
121 | void TMEchoBridge::sendXML_GSE_HK() | |||
|
122 | { | |||
|
123 | char data[10]; | |||
|
124 | for (int i = 0; i <10; i++) | |||
|
125 | { | |||
|
126 | data[i] = i; | |||
|
127 | } | |||
|
128 | if (tmEchoBridgeSocket->state() == QAbstractSocket::ConnectedState) | |||
|
129 | { | |||
|
130 | xmlWriter->writeStartDocument(); | |||
|
131 | ||||
|
132 | xmlWriter->writeStartElement("Event"); | |||
|
133 | ||||
|
134 | // EventDate | |||
|
135 | xmlWriter->writeStartElement("EventDate"); | |||
|
136 | xmlWriter->writeEndElement(); | |||
|
137 | ||||
|
138 | // Event Time | |||
|
139 | xmlWriter->writeStartElement("EventTime"); | |||
|
140 | xmlWriter->writeEndElement(); | |||
|
141 | ||||
|
142 | // EventBinary | |||
|
143 | xmlWriter->writeStartElement("EventBinary"); | |||
|
144 | xmlWriter->writeCharacters("FFFFCC0099"); | |||
|
145 | xmlWriter->writeCharacters(QString::fromLocal8Bit(data, 10)); | |||
|
146 | xmlWriter->writeEndElement(); | |||
|
147 | ||||
|
148 | xmlWriter->writeEndElement(); | |||
|
149 | ||||
|
150 | xmlWriter->writeEndDocument(); | |||
|
151 | } | |||
|
152 | else | |||
|
153 | { | |||
|
154 | this->displayOnConsole("TM socket *** " + socketStates.at(tmEchoBridgeSocket->state()) ); | |||
|
155 | } | |||
|
156 | } | |||
|
157 | ||||
|
158 | void TMEchoBridge::sendTMPacket(TMPacketToRead *tmPacketToRead) | |||
|
159 | { | |||
|
160 | if (tmEchoBridgeSocket->state() == QAbstractSocket::ConnectedState) | |||
|
161 | { | |||
|
162 | // START DOCUMENT | |||
|
163 | //xmlWriter->writeStartDocument(); | |||
|
164 | ||||
|
165 | // <Event> | |||
|
166 | xmlWriter->writeStartElement("Event"); | |||
|
167 | ||||
|
168 | // <EventDate> | |||
|
169 | xmlWriter->writeStartElement("EventDate"); | |||
|
170 | xmlWriter->writeEndElement(); | |||
|
171 | ||||
|
172 | // <Event Time> | |||
|
173 | xmlWriter->writeStartElement("EventTime"); | |||
|
174 | xmlWriter->writeEndElement(); | |||
|
175 | ||||
|
176 | // <EventBinary> | |||
|
177 | xmlWriter->writeStartElement("EventBinary"); | |||
|
178 | xmlWriter->writeCharacters( | |||
|
179 | QByteArray::fromRawData( (char*) tmPacketToRead->Value, tmPacketToRead->size).toHex() | |||
|
180 | ); | |||
|
181 | //tmEchoBridgeSocket->write(QByteArray::fromRawData( (char*) tmPacketToRead->Value, tmPacketToRead->size)); | |||
|
182 | xmlWriter->writeEndElement(); | |||
|
183 | ||||
|
184 | // </Event> | |||
|
185 | xmlWriter->writeEndElement(); | |||
|
186 | ||||
|
187 | // END DOCUMENT | |||
|
188 | xmlWriter->writeEndDocument(); | |||
|
189 | ||||
|
190 | tmEchoBridgeSocket->flush(); | |||
|
191 | ||||
|
192 | totalOfBytes = totalOfBytes + tmPacketToRead->size; | |||
|
193 | totalOfPackets = totalOfPackets + 1; | |||
|
194 | label_totalOfBytes->setText("Number of TM bytes sent: " + QString::number(totalOfBytes)); | |||
|
195 | label_totalOfPackets->setText("Number of TM packets sent: " + QString::number(totalOfPackets)); | |||
|
196 | } | |||
|
197 | else | |||
|
198 | { | |||
|
199 | totalOfPacketsDropped = totalOfPacketsDropped + 1; | |||
|
200 | label_totalOfPacketsDropped->setText("Number of TM packets dropped: " + QString::number(totalOfPacketsDropped)); | |||
|
201 | } | |||
|
202 | } | |||
|
203 | ||||
|
204 | void TMEchoBridge::sendTMPacket_v2(TMPacketToRead *tmPacketToRead) | |||
|
205 | { | |||
|
206 | QByteArray ccsdsArray; | |||
|
207 | QTime echoBridgeTimeout; | |||
|
208 | ||||
|
209 | if (tmEchoBridgeSocket->state() == QAbstractSocket::ConnectedState) | |||
|
210 | { | |||
|
211 | ccsdsArray.append("<Event>"); | |||
|
212 | ||||
|
213 | ccsdsArray.append("<EventDate>"); | |||
|
214 | ccsdsArray.append("</EventDate>"); | |||
|
215 | ||||
|
216 | ccsdsArray.append("<EventTime>"); | |||
|
217 | ccsdsArray.append("</EventTime>"); | |||
|
218 | ||||
|
219 | ccsdsArray.append("<EventBinary>"); | |||
|
220 | ccsdsArray.append(QByteArray::fromRawData( (char*) tmPacketToRead->Value, tmPacketToRead->size).toHex()); | |||
|
221 | ccsdsArray.append("</EventBinary>"); | |||
|
222 | ||||
|
223 | ccsdsArray.append("</Event>"); | |||
|
224 | ||||
|
225 | tmEchoBridgeSocket->write(ccsdsArray); | |||
|
226 | tmEchoBridgeSocket->flush(); | |||
|
227 | ||||
|
228 | totalOfBytes = totalOfBytes + tmPacketToRead->size; | |||
|
229 | totalOfPackets = totalOfPackets + 1; | |||
|
230 | label_totalOfBytes->setText("Number of TM bytes sent: " + QString::number(totalOfBytes)); | |||
|
231 | label_totalOfPackets->setText("Number of TM packets sent: " + QString::number(totalOfPackets)); | |||
|
232 | } | |||
|
233 | else | |||
|
234 | { | |||
|
235 | totalOfPacketsDropped = totalOfPacketsDropped + 1; | |||
|
236 | label_totalOfPacketsDropped->setText("Number of TM packets dropped: " + QString::number(totalOfPacketsDropped)); | |||
|
237 | } | |||
|
238 | } | |||
|
239 | ||||
|
240 | void TMEchoBridge::clearConsole() | |||
|
241 | { | |||
|
242 | this->console->clear(); | |||
|
243 | } | |||
|
244 | ||||
|
245 | void TMEchoBridge::resetTMStatistics() | |||
|
246 | { | |||
|
247 | label_totalOfBytes->setText("Number of TM bytes sent: -"); | |||
|
248 | label_totalOfPackets->setText("Number of TM packets sent: -"); | |||
|
249 | label_totalOfPacketsDropped->setText("Number of TM packets dropped: -"); | |||
|
250 | totalOfBytes = 0; | |||
|
251 | totalOfPackets = 0; | |||
|
252 | totalOfPacketsDropped = 0; | |||
|
253 | } |
@@ -0,0 +1,73 | |||||
|
1 | #ifndef TMECHOBRIDGE_H | |||
|
2 | #define TMECHOBRIDGE_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <QTcpServer> | |||
|
6 | #include <QTcpSocket> | |||
|
7 | #include <QLabel> | |||
|
8 | #include <QSpinBox> | |||
|
9 | #include <QPushButton> | |||
|
10 | #include <QGroupBox> | |||
|
11 | #include <QGridLayout> | |||
|
12 | #include <QTextEdit> | |||
|
13 | #include <QXmlStreamWriter> | |||
|
14 | #include <QTime> | |||
|
15 | #include "tmpackettoread.h" | |||
|
16 | ||||
|
17 | class TMEchoBridge : public QWidget | |||
|
18 | { | |||
|
19 | Q_OBJECT | |||
|
20 | public: | |||
|
21 | explicit TMEchoBridge(QWidget *parent = 0); | |||
|
22 | ||||
|
23 | signals: | |||
|
24 | ||||
|
25 | public slots: | |||
|
26 | void listenOnTMEchoBridgePort(); | |||
|
27 | void testTMEchoBridgePort(); | |||
|
28 | void newConnectionOnTMEchoBridgeServer(); | |||
|
29 | int getTMPort(); | |||
|
30 | void displayOnConsole(QString message); | |||
|
31 | void initSocketStatesList(); | |||
|
32 | void newConnectionOnTCServer(); | |||
|
33 | void sendXML_GSE_HK(); | |||
|
34 | void sendTMPacket(TMPacketToRead *tmPacketToRead); | |||
|
35 | void sendTMPacket_v2(TMPacketToRead *tmPacketToRead); | |||
|
36 | void clearConsole(); | |||
|
37 | void resetTMStatistics(); | |||
|
38 | ||||
|
39 | private: | |||
|
40 | QList<QString> socketStates; | |||
|
41 | ||||
|
42 | unsigned int totalOfBytes; | |||
|
43 | unsigned int totalOfPackets; | |||
|
44 | unsigned int totalOfPacketsDropped; | |||
|
45 | ||||
|
46 | QTcpServer *tmEchoBridgeServer; | |||
|
47 | QTcpSocket *tmEchoBridgeSocket; | |||
|
48 | ||||
|
49 | QXmlStreamWriter *xmlWriter; | |||
|
50 | ||||
|
51 | QTextEdit *console; | |||
|
52 | ||||
|
53 | QLabel *label_TMServerPort; | |||
|
54 | QLabel *label_totalOfBytes; | |||
|
55 | QLabel *label_totalOfPackets; | |||
|
56 | QLabel *label_totalOfPacketsDropped; | |||
|
57 | ||||
|
58 | QSpinBox *spinbox_TMServerPort; | |||
|
59 | ||||
|
60 | QPushButton *button_openServerTCTM; | |||
|
61 | QPushButton *button_testServerTCTM; | |||
|
62 | QPushButton *button_sendTestPacket; | |||
|
63 | QPushButton *button_clearConsole; | |||
|
64 | QPushButton *button_resetTMStatistics; | |||
|
65 | ||||
|
66 | QGroupBox *groupbox_ports; | |||
|
67 | ||||
|
68 | QGridLayout *layout_ports; | |||
|
69 | QGridLayout *mainLayout; | |||
|
70 | ||||
|
71 | }; | |||
|
72 | ||||
|
73 | #endif // TMECHOBRIDGE_H |
This diff has been collapsed as it changes many lines, (540 lines changed) Show them Hide them | |||||
@@ -0,0 +1,540 | |||||
|
1 | #include "tmstatistics.h" | |||
|
2 | #include <QtGui> | |||
|
3 | #include <QFontInfo> | |||
|
4 | ||||
|
5 | TMStatistics::TMStatistics(QWidget *parent) : | |||
|
6 | QWidget(parent) | |||
|
7 | { | |||
|
8 | // Create Fonts | |||
|
9 | QFont font; | |||
|
10 | //font = QFont(this->fontInfo().family(), STATISTICS_FONT_SIZE, QFont::Light); | |||
|
11 | ||||
|
12 | label_UNKNOWN = new QLabel("UNKNOWN"); | |||
|
13 | label_UNKNOWN_nb = new QLabel("-"); | |||
|
14 | ||||
|
15 | mainLayout = new QGridLayout(); | |||
|
16 | layout_stat = new QGridLayout(); // TM stastictics | |||
|
17 | layout_NORM = new QGridLayout(); // TM_LFR_SCIENCE_NORMAL_ | |||
|
18 | layout_BURST = new QGridLayout(); // TM_LFR_SCIENCE_BURST_ | |||
|
19 | layout_SBM1 = new QGridLayout(); // TM_LFR_SCIENCE_SBM1_ | |||
|
20 | layout_SBM2 = new QGridLayout(); // TM_LFR_SCIENCE_SBM2_ | |||
|
21 | layout_last = new QGridLayout(); // last TM description | |||
|
22 | ||||
|
23 | //*************** | |||
|
24 | // TM_LFR_TC_EXE_ | |||
|
25 | label_SUCC = new QLabel("SUCCESS"); | |||
|
26 | label_INCO = new QLabel("INCONSISTENT"); | |||
|
27 | label_NOTE = new QLabel("NOT_EXECUTABLE"); | |||
|
28 | label_NOTI = new QLabel("NOT_IMPLEMENTED"); | |||
|
29 | label_ERRO = new QLabel("ERROR"); | |||
|
30 | label_CORR = new QLabel("CORRUPTED"); | |||
|
31 | label_HK = new QLabel("TM_LFR_HK"); | |||
|
32 | // | |||
|
33 | label_SUCC_nb = new QLabel("-"); | |||
|
34 | label_INCO_nb = new QLabel("-"); | |||
|
35 | label_NOTE_nb = new QLabel("-"); | |||
|
36 | label_NOTI_nb = new QLabel("-"); | |||
|
37 | label_ERRO_nb = new QLabel("-"); | |||
|
38 | label_CORR_nb = new QLabel("-"); | |||
|
39 | label_HK_nb = new QLabel("-"); | |||
|
40 | ||||
|
41 | //*********************** | |||
|
42 | // TM_LFR_SCIENCE_NORMAL_ | |||
|
43 | label_NORM_SWF_F0 = new QLabel("SWF_F0"); | |||
|
44 | label_NORM_SWF_F1 = new QLabel("SWF_F1"); | |||
|
45 | label_NORM_SWF_F2 = new QLabel("SWF_F2"); | |||
|
46 | label_NORM_CWF_F3 = new QLabel("CWF_F3"); | |||
|
47 | label_NORM_ASM_F0 = new QLabel("ASM_F0"); | |||
|
48 | label_NORM_ASM_F1 = new QLabel("ASM_F1"); | |||
|
49 | label_NORM_ASM_F2 = new QLabel("ASM_F2"); | |||
|
50 | label_NORM_BP1_F0 = new QLabel("BP1_F0"); | |||
|
51 | label_NORM_BP1_F1 = new QLabel("BP1_F1"); | |||
|
52 | label_NORM_BP1_F2 = new QLabel("BP1_F2"); | |||
|
53 | label_NORM_BP2_F0 = new QLabel("BP2_F0"); | |||
|
54 | label_NORM_BP2_F1 = new QLabel("BP2_F1"); | |||
|
55 | label_NORM_BP2_F2 = new QLabel("BP2_F2"); | |||
|
56 | // | |||
|
57 | label_NORM_SWF_F0_nb = new QLabel("-"); | |||
|
58 | label_NORM_SWF_F1_nb = new QLabel("-"); | |||
|
59 | label_NORM_SWF_F2_nb = new QLabel("-"); | |||
|
60 | label_NORM_CWF_F3_nb = new QLabel("-"); | |||
|
61 | label_NORM_ASM_F0_nb = new QLabel("-"); | |||
|
62 | label_NORM_ASM_F1_nb = new QLabel("-"); | |||
|
63 | label_NORM_ASM_F2_nb = new QLabel("-"); | |||
|
64 | label_NORM_BP1_F0_nb = new QLabel("-"); | |||
|
65 | label_NORM_BP1_F1_nb = new QLabel("-"); | |||
|
66 | label_NORM_BP1_F2_nb = new QLabel("-"); | |||
|
67 | label_NORM_BP2_F0_nb = new QLabel("-"); | |||
|
68 | label_NORM_BP2_F1_nb = new QLabel("-"); | |||
|
69 | label_NORM_BP2_F2_nb = new QLabel("-"); | |||
|
70 | ||||
|
71 | //********************** | |||
|
72 | // TM_LFR_SCIENCE_BURST_ | |||
|
73 | label_BURST_CWF_F2 = new QLabel("CWF_F2"); | |||
|
74 | label_BURST_BP1_F0 = new QLabel("BP1_F0"); | |||
|
75 | label_BURST_BP2_F0 = new QLabel("BP2_F0"); | |||
|
76 | label_BURST_BP1_F1 = new QLabel("BP1_F1"); | |||
|
77 | label_BURST_BP2_F1 = new QLabel("BP2_F1"); | |||
|
78 | // | |||
|
79 | label_BURST_CWF_F2_nb = new QLabel("-"); | |||
|
80 | label_BURST_BP1_F0_nb = new QLabel("-"); | |||
|
81 | label_BURST_BP2_F0_nb = new QLabel("-"); | |||
|
82 | label_BURST_BP1_F1_nb = new QLabel("-"); | |||
|
83 | label_BURST_BP2_F1_nb = new QLabel("-"); | |||
|
84 | ||||
|
85 | //********************* | |||
|
86 | // TM_LFR_SCIENCE_SBM1_ | |||
|
87 | label_SBM1_CWF_F1 = new QLabel("CWF_F1"); | |||
|
88 | label_SBM1_BP1_F0 = new QLabel("BP1_F0"); | |||
|
89 | label_SBM1_BP2_F0 = new QLabel("BP2_F0"); | |||
|
90 | // | |||
|
91 | label_SBM1_CWF_F1_nb = new QLabel("-"); | |||
|
92 | label_SBM1_BP1_F0_nb = new QLabel("-"); | |||
|
93 | label_SBM1_BP2_F0_nb = new QLabel("-"); | |||
|
94 | ||||
|
95 | //********************* | |||
|
96 | // TM_LFR_SCIENCE_SBM2_ | |||
|
97 | label_SBM2_CWF_F2 = new QLabel("CWF_F2"); | |||
|
98 | label_SBM2_BP1_F0 = new QLabel("BP1_F0"); | |||
|
99 | label_SBM2_BP2_F0 = new QLabel("BP2_F0"); | |||
|
100 | label_SBM2_BP1_F1 = new QLabel("BP1_F1"); | |||
|
101 | label_SBM2_BP2_F1 = new QLabel("BP2_F1"); | |||
|
102 | // | |||
|
103 | label_SBM2_CWF_F2_nb = new QLabel("-"); | |||
|
104 | label_SBM2_BP1_F0_nb = new QLabel("-"); | |||
|
105 | label_SBM2_BP2_F0_nb = new QLabel("-"); | |||
|
106 | label_SBM2_BP1_F1_nb = new QLabel("-"); | |||
|
107 | label_SBM2_BP2_F1_nb = new QLabel("-"); | |||
|
108 | ||||
|
109 | //******** | |||
|
110 | // LAST TM | |||
|
111 | label_PID = new QLabel("PID"); | |||
|
112 | label_CAT = new QLabel("CAT"); | |||
|
113 | label_TYP = new QLabel("Type"); | |||
|
114 | label_SUB = new QLabel("Subtype"); | |||
|
115 | label_SID = new QLabel("SID"); | |||
|
116 | label_SIZ = new QLabel("Length"); | |||
|
117 | label_coarse_time = new QLabel("Coarse time: "); | |||
|
118 | label_fine_time = new QLabel("Fine time: "); | |||
|
119 | // | |||
|
120 | label_PID_is = new QLabel("-"); | |||
|
121 | label_CAT_is = new QLabel("-"); | |||
|
122 | label_TYP_is = new QLabel("-"); | |||
|
123 | label_SUB_is = new QLabel("-"); | |||
|
124 | label_SID_is = new QLabel("-"); | |||
|
125 | label_SIZ_is = new QLabel("-"); | |||
|
126 | label_coarse_time_val = new QLabel("-"); | |||
|
127 | label_fine_time_val = new QLabel("-"); | |||
|
128 | ||||
|
129 | // QPushButton | |||
|
130 | button_reset_stat = new QPushButton("reset stat"); | |||
|
131 | ||||
|
132 | //********** | |||
|
133 | // QGroupBox | |||
|
134 | this->setStyleSheet("QGroupBox {border: 1px solid black; }"); | |||
|
135 | ||||
|
136 | groupbox_stat = new QGroupBox("TM_LFR_TC_EXE_"); | |||
|
137 | groupbox_NORM = new QGroupBox("TM_LFR_SCIENCE_NORMAL_"); | |||
|
138 | groupbox_BURST = new QGroupBox("TM_LFR_SCIENCE_BURST_"); | |||
|
139 | groupbox_SBM1 = new QGroupBox("TM_LFR_SCIENCE_SBM1_"); | |||
|
140 | groupbox_SBM2 = new QGroupBox("TM_LFR_SCIENCE_SBM2_"); | |||
|
141 | groupbox_last = new QGroupBox("Last TM received"); | |||
|
142 | ||||
|
143 | groupbox_stat->setFont(font); | |||
|
144 | groupbox_NORM->setFont(font); | |||
|
145 | groupbox_BURST->setFont(font); | |||
|
146 | groupbox_SBM1->setFont(font); | |||
|
147 | groupbox_SBM2->setFont(font); | |||
|
148 | groupbox_last->setFont(font); | |||
|
149 | ||||
|
150 | initConstants(); | |||
|
151 | ||||
|
152 | buildMonitor_NORM(); | |||
|
153 | buildMonitor_BURST(); | |||
|
154 | buildMonitor_SBM1(); | |||
|
155 | buildMonitor_SBM2(); | |||
|
156 | buildMonitor(); | |||
|
157 | ||||
|
158 | connect(this->button_reset_stat, SIGNAL(clicked()), this, SLOT(resetStatistics())); | |||
|
159 | ||||
|
160 | } | |||
|
161 | ||||
|
162 | void TMStatistics::initConstants() | |||
|
163 | { | |||
|
164 | UNKNOWN_nb = 0; | |||
|
165 | ||||
|
166 | // TM_LFR_SCIENCE_NORMAL_ | |||
|
167 | SUCC_nb = 0; | |||
|
168 | INCO_nb = 0; | |||
|
169 | NOTE_nb = 0; | |||
|
170 | NOTI_nb = 0; | |||
|
171 | ERRO_nb = 0; | |||
|
172 | CORR_nb = 0; | |||
|
173 | HK_nb = 0; | |||
|
174 | ||||
|
175 | // TM_LFR_SCIENCE_NORMAL_ | |||
|
176 | NORM_SWF_F0_nb = 0; | |||
|
177 | NORM_SWF_F1_nb = 0; | |||
|
178 | NORM_SWF_F2_nb = 0; | |||
|
179 | NORM_CWF_F3_nb = 0; | |||
|
180 | NORM_ASM_F0_nb = 0; | |||
|
181 | NORM_ASM_F1_nb = 0; | |||
|
182 | NORM_ASM_F2_nb = 0; | |||
|
183 | NORM_BP1_F0_nb = 0; | |||
|
184 | NORM_BP1_F1_nb = 0; | |||
|
185 | NORM_BP1_F2_nb = 0; | |||
|
186 | NORM_BP2_F0_nb = 0; | |||
|
187 | NORM_BP2_F1_nb = 0; | |||
|
188 | NORM_BP2_F2_nb = 0; | |||
|
189 | ||||
|
190 | BURST_CWF_F2_nb = 0; | |||
|
191 | BURST_BP1_F0_nb = 0; | |||
|
192 | BURST_BP2_F0_nb = 0; | |||
|
193 | BURST_BP1_F1_nb = 0; | |||
|
194 | BURST_BP2_F1_nb = 0; | |||
|
195 | SBM1_CWF_F1_nb = 0; | |||
|
196 | SBM1_BP1_F0_nb = 0; | |||
|
197 | SBM1_BP2_F0_nb = 0; | |||
|
198 | SBM2_CWF_F2_nb = 0; | |||
|
199 | SBM2_BP1_F0_nb = 0; | |||
|
200 | SBM2_BP2_F0_nb = 0; | |||
|
201 | SBM2_BP1_F1_nb = 0; | |||
|
202 | SBM2_BP2_F1_nb = 0; | |||
|
203 | } | |||
|
204 | ||||
|
205 | void TMStatistics::buildMonitor_NORM() | |||
|
206 | { | |||
|
207 | layout_NORM->addWidget(label_NORM_SWF_F0, 0, 0, 1, 1); | |||
|
208 | layout_NORM->addWidget(label_NORM_SWF_F1, 1, 0, 1, 1); | |||
|
209 | layout_NORM->addWidget(label_NORM_SWF_F2, 2, 0, 1, 1); | |||
|
210 | layout_NORM->addWidget(label_NORM_CWF_F3, 3, 0, 1, 1); | |||
|
211 | // | |||
|
212 | layout_NORM->addWidget(label_NORM_SWF_F0_nb, 0, 1, 1, 1); | |||
|
213 | layout_NORM->addWidget(label_NORM_SWF_F1_nb, 1, 1, 1, 1); | |||
|
214 | layout_NORM->addWidget(label_NORM_SWF_F2_nb, 2, 1, 1, 1); | |||
|
215 | layout_NORM->addWidget(label_NORM_CWF_F3_nb, 3, 1, 1, 1); | |||
|
216 | // | |||
|
217 | layout_NORM->addWidget(label_NORM_ASM_F0, 4, 0, 1, 1); | |||
|
218 | layout_NORM->addWidget(label_NORM_ASM_F1, 5, 0, 1, 1); | |||
|
219 | layout_NORM->addWidget(label_NORM_ASM_F2, 6, 0, 1, 1); | |||
|
220 | // | |||
|
221 | layout_NORM->addWidget(label_NORM_ASM_F0_nb, 4, 1, 1, 1); | |||
|
222 | layout_NORM->addWidget(label_NORM_ASM_F1_nb, 5, 1, 1, 1); | |||
|
223 | layout_NORM->addWidget(label_NORM_ASM_F2_nb, 6, 1, 1, 1); | |||
|
224 | // | |||
|
225 | layout_NORM->addWidget(label_NORM_BP1_F0, 0, 2, 1, 1); | |||
|
226 | layout_NORM->addWidget(label_NORM_BP1_F1, 1, 2, 1, 1); | |||
|
227 | layout_NORM->addWidget(label_NORM_BP1_F2, 2, 2, 1, 1); | |||
|
228 | layout_NORM->addWidget(label_NORM_BP2_F0, 3, 2, 1, 1); | |||
|
229 | layout_NORM->addWidget(label_NORM_BP2_F1, 4, 2, 1, 1); | |||
|
230 | layout_NORM->addWidget(label_NORM_BP2_F2, 5, 2, 1, 1); | |||
|
231 | // | |||
|
232 | layout_NORM->addWidget(label_NORM_BP1_F0_nb, 0, 3, 1, 1); | |||
|
233 | layout_NORM->addWidget(label_NORM_BP1_F1_nb, 1, 3, 1, 1); | |||
|
234 | layout_NORM->addWidget(label_NORM_BP1_F2_nb, 2, 3, 1, 1); | |||
|
235 | layout_NORM->addWidget(label_NORM_BP2_F0_nb, 3, 3, 1, 1); | |||
|
236 | layout_NORM->addWidget(label_NORM_BP2_F1_nb, 4, 3, 1, 1); | |||
|
237 | layout_NORM->addWidget(label_NORM_BP2_F2_nb, 5, 3, 1, 1); | |||
|
238 | } | |||
|
239 | ||||
|
240 | void TMStatistics::buildMonitor_BURST() | |||
|
241 | { | |||
|
242 | layout_BURST->addWidget(label_BURST_CWF_F2, 0, 0, 1, 1); | |||
|
243 | layout_BURST->addWidget(label_BURST_BP1_F0, 1, 0, 1, 1); | |||
|
244 | layout_BURST->addWidget(label_BURST_BP2_F0, 2, 0, 1, 1); | |||
|
245 | layout_BURST->addWidget(label_BURST_BP1_F1, 3, 0, 1, 1); | |||
|
246 | layout_BURST->addWidget(label_BURST_BP2_F1, 4, 0, 1, 1); | |||
|
247 | // | |||
|
248 | layout_BURST->addWidget(label_BURST_CWF_F2_nb, 0, 1, 1, 1); | |||
|
249 | layout_BURST->addWidget(label_BURST_BP1_F0_nb, 1, 1, 1, 1); | |||
|
250 | layout_BURST->addWidget(label_BURST_BP2_F0_nb, 2, 1, 1, 1); | |||
|
251 | layout_BURST->addWidget(label_BURST_BP1_F1_nb, 3, 1, 1, 1); | |||
|
252 | layout_BURST->addWidget(label_BURST_BP2_F1_nb, 4, 1, 1, 1); | |||
|
253 | // | |||
|
254 | layout_BURST->setRowStretch(5, 1); | |||
|
255 | layout_BURST->setColumnStretch(2,1); | |||
|
256 | } | |||
|
257 | ||||
|
258 | void TMStatistics::buildMonitor_SBM1() | |||
|
259 | { | |||
|
260 | layout_SBM1->addWidget(label_SBM1_CWF_F1, 0, 0, 1, 1); | |||
|
261 | layout_SBM1->addWidget(label_SBM1_BP1_F0, 1, 0, 1, 1); | |||
|
262 | layout_SBM1->addWidget(label_SBM1_BP2_F0, 2, 0, 1, 1); | |||
|
263 | // | |||
|
264 | layout_SBM1->addWidget(label_SBM1_CWF_F1_nb, 0, 1, 1, 1); | |||
|
265 | layout_SBM1->addWidget(label_SBM1_BP1_F0_nb, 1, 1, 1, 1); | |||
|
266 | layout_SBM1->addWidget(label_SBM1_BP2_F0_nb, 2, 1, 1, 1); | |||
|
267 | // | |||
|
268 | layout_SBM1->setRowStretch(3, 1); | |||
|
269 | layout_SBM1->setColumnStretch(2,1); | |||
|
270 | } | |||
|
271 | ||||
|
272 | void TMStatistics::buildMonitor_SBM2() | |||
|
273 | { | |||
|
274 | layout_SBM2->addWidget(label_SBM2_CWF_F2, 0, 0, 1, 1); | |||
|
275 | layout_SBM2->addWidget(label_SBM2_BP1_F0, 1, 0, 1, 1); | |||
|
276 | layout_SBM2->addWidget(label_SBM2_BP2_F0, 2, 0, 1, 1); | |||
|
277 | layout_SBM2->addWidget(label_SBM2_BP1_F1, 3, 0, 1, 1); | |||
|
278 | layout_SBM2->addWidget(label_SBM2_BP2_F1, 4, 0, 1, 1); | |||
|
279 | // | |||
|
280 | layout_SBM2->addWidget(label_SBM2_CWF_F2_nb, 0, 1, 1, 1); | |||
|
281 | layout_SBM2->addWidget(label_SBM2_BP1_F0_nb, 1, 1, 1, 1); | |||
|
282 | layout_SBM2->addWidget(label_SBM2_BP2_F0_nb, 2, 1, 1, 1); | |||
|
283 | layout_SBM2->addWidget(label_SBM2_BP1_F1_nb, 3, 1, 1, 1); | |||
|
284 | layout_SBM2->addWidget(label_SBM2_BP2_F1_nb, 4, 1, 1, 1); | |||
|
285 | // | |||
|
286 | layout_SBM2->setRowStretch(5, 1); | |||
|
287 | layout_SBM2->setColumnStretch(2,1); | |||
|
288 | } | |||
|
289 | ||||
|
290 | void TMStatistics::buildMonitor() | |||
|
291 | { | |||
|
292 | //*************** | |||
|
293 | // TM_LFR_TC_EXE_ | |||
|
294 | layout_stat->addWidget(label_SUCC, 0, 0, 1, 1); | |||
|
295 | layout_stat->addWidget(label_INCO, 1, 0, 1, 1); | |||
|
296 | layout_stat->addWidget(label_NOTE, 2, 0, 1, 1); | |||
|
297 | layout_stat->addWidget(label_NOTI, 3, 0, 1, 1); | |||
|
298 | layout_stat->addWidget(label_ERRO, 4, 0, 1, 1); | |||
|
299 | layout_stat->addWidget(label_CORR, 5, 0, 1, 1); | |||
|
300 | layout_stat->addWidget(label_HK, 6, 0, 1, 1); | |||
|
301 | // | |||
|
302 | layout_stat->addWidget(label_SUCC_nb, 0, 1, 1, 1); | |||
|
303 | layout_stat->addWidget(label_INCO_nb, 1, 1, 1, 1); | |||
|
304 | layout_stat->addWidget(label_NOTE_nb, 2, 1, 1, 1); | |||
|
305 | layout_stat->addWidget(label_NOTI_nb, 3, 1, 1, 1); | |||
|
306 | layout_stat->addWidget(label_ERRO_nb, 4, 1, 1, 1); | |||
|
307 | layout_stat->addWidget(label_CORR_nb, 5, 1, 1, 1); | |||
|
308 | layout_stat->addWidget(label_HK_nb, 6, 1, 1, 1); | |||
|
309 | ||||
|
310 | //******** | |||
|
311 | // LAST TM | |||
|
312 | layout_last->addWidget(label_PID, 0, 0, 1, 1); | |||
|
313 | layout_last->addWidget(label_CAT, 0, 1, 1, 1); | |||
|
314 | layout_last->addWidget(label_TYP, 0, 2, 1, 1); | |||
|
315 | layout_last->addWidget(label_SUB, 0, 3, 1, 1); | |||
|
316 | layout_last->addWidget(label_SID, 0, 4, 1, 1); | |||
|
317 | layout_last->addWidget(label_SIZ, 0, 5, 1, 1); | |||
|
318 | // | |||
|
319 | layout_last->addWidget(label_PID_is, 1, 0, 1, 1); | |||
|
320 | layout_last->addWidget(label_CAT_is, 1, 1, 1, 1); | |||
|
321 | layout_last->addWidget(label_TYP_is, 1, 2, 1, 1); | |||
|
322 | layout_last->addWidget(label_SUB_is, 1, 3, 1, 1); | |||
|
323 | layout_last->addWidget(label_SID_is, 1, 4, 1, 1); | |||
|
324 | layout_last->addWidget(label_SIZ_is, 1, 5, 1, 1); | |||
|
325 | // | |||
|
326 | layout_last->addWidget(label_coarse_time, 2, 0, 1, 1); | |||
|
327 | layout_last->addWidget(label_coarse_time_val, 2, 1, 1, 1); | |||
|
328 | layout_last->addWidget(label_fine_time, 2, 2, 1, 1); | |||
|
329 | layout_last->addWidget(label_fine_time_val, 2, 3, 1, 1); | |||
|
330 | // | |||
|
331 | layout_last->addWidget(label_UNKNOWN, 3, 0, 1, 1); | |||
|
332 | layout_last->addWidget(label_UNKNOWN_nb, 3, 1, 1, 1); | |||
|
333 | ||||
|
334 | //*********** | |||
|
335 | // groupboxes | |||
|
336 | groupbox_stat->setLayout(layout_stat); | |||
|
337 | groupbox_NORM->setLayout(layout_NORM); | |||
|
338 | groupbox_BURST->setLayout(layout_BURST); | |||
|
339 | groupbox_SBM1->setLayout(layout_SBM1); | |||
|
340 | groupbox_SBM2->setLayout(layout_SBM2); | |||
|
341 | groupbox_last->setLayout(layout_last); | |||
|
342 | // | |||
|
343 | mainLayout->addWidget(groupbox_stat, 0, 0, 1, 1); | |||
|
344 | mainLayout->addWidget(groupbox_NORM, 1, 0, 1, 1); | |||
|
345 | mainLayout->addWidget(groupbox_last, 2, 0, 1, 2); | |||
|
346 | mainLayout->addWidget(groupbox_SBM1, 0, 1, 1, 1); | |||
|
347 | mainLayout->addWidget(groupbox_SBM2, 0, 2, 1, 1); | |||
|
348 | mainLayout->addWidget(groupbox_BURST, 1, 1, 1, 1); | |||
|
349 | mainLayout->addWidget(button_reset_stat, 3, 0, 1, 2); | |||
|
350 | mainLayout->setColumnStretch(3, 1); | |||
|
351 | mainLayout->setRowStretch(4, 1); | |||
|
352 | // | |||
|
353 | this->setLayout(mainLayout); | |||
|
354 | } | |||
|
355 | ||||
|
356 | void TMStatistics::resetStatistics() | |||
|
357 | { | |||
|
358 | initConstants(); | |||
|
359 | // | |||
|
360 | label_UNKNOWN_nb->setText("-"); | |||
|
361 | label_SUCC_nb->setText("-"); | |||
|
362 | label_INCO_nb->setText("-"); | |||
|
363 | label_NOTE_nb->setText("-"); | |||
|
364 | label_NOTI_nb->setText("-"); | |||
|
365 | label_ERRO_nb->setText("-"); | |||
|
366 | label_CORR_nb->setText("-"); | |||
|
367 | label_HK_nb->setText("-"); | |||
|
368 | // | |||
|
369 | label_NORM_SWF_F0_nb->setText("-"); | |||
|
370 | label_NORM_SWF_F1_nb->setText("-"); | |||
|
371 | label_NORM_SWF_F2_nb->setText("-"); | |||
|
372 | label_NORM_CWF_F3_nb->setText("-"); | |||
|
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 | // | |||
|
380 | label_PID_is->setText("-"); | |||
|
381 | label_CAT_is->setText("-"); | |||
|
382 | label_TYP_is->setText("-"); | |||
|
383 | label_SUB_is->setText("-"); | |||
|
384 | label_SID_is->setText("-"); | |||
|
385 | label_SIZ_is->setText("-"); | |||
|
386 | // | |||
|
387 | label_coarse_time_val->setText("-"); | |||
|
388 | label_fine_time_val->setText("-"); | |||
|
389 | } | |||
|
390 | ||||
|
391 | void TMStatistics::updateStatistics(unsigned char pid, unsigned char cat, | |||
|
392 | unsigned char typ, unsigned char sub, | |||
|
393 | unsigned int sid, unsigned int length, | |||
|
394 | unsigned int coarse_t, unsigned int fine_t) | |||
|
395 | { | |||
|
396 | if (cat == 1) | |||
|
397 | { | |||
|
398 | if (typ == 1) | |||
|
399 | { | |||
|
400 | if (sub == 7) | |||
|
401 | { | |||
|
402 | SUCC_nb = SUCC_nb + 1; | |||
|
403 | label_SUCC_nb->setText(QString::number(SUCC_nb)); | |||
|
404 | } | |||
|
405 | else if (sub == 8) | |||
|
406 | { | |||
|
407 | if (sid == 5) | |||
|
408 | { | |||
|
409 | INCO_nb = INCO_nb + 1; | |||
|
410 | label_INCO_nb->setText(QString::number(INCO_nb)); | |||
|
411 | } | |||
|
412 | else if (sid == 40000) | |||
|
413 | { | |||
|
414 | NOTE_nb = NOTE_nb + 1; | |||
|
415 | label_NOTE_nb->setText(QString::number(NOTE_nb)); | |||
|
416 | } | |||
|
417 | else if (sid == 40002) | |||
|
418 | { | |||
|
419 | NOTI_nb = NOTI_nb + 1; | |||
|
420 | label_NOTI_nb->setText(QString::number(NOTI_nb)); | |||
|
421 | } | |||
|
422 | else if (sid == 40003) | |||
|
423 | { | |||
|
424 | ERRO_nb = ERRO_nb + 1; | |||
|
425 | label_ERRO_nb->setText(QString::number(ERRO_nb)); | |||
|
426 | } | |||
|
427 | else if (sid == 40005) | |||
|
428 | { | |||
|
429 | CORR_nb = CORR_nb + 1; | |||
|
430 | label_CORR_nb->setText(QString::number(CORR_nb)); | |||
|
431 | } | |||
|
432 | else incrementUnknown(); | |||
|
433 | } | |||
|
434 | else incrementUnknown(); | |||
|
435 | } | |||
|
436 | else | |||
|
437 | incrementUnknown(); | |||
|
438 | } | |||
|
439 | else if (cat == 4) | |||
|
440 | { | |||
|
441 | if (typ == 3) | |||
|
442 | { | |||
|
443 | if (sub == 25) | |||
|
444 | if (sid == 1) | |||
|
445 | { | |||
|
446 | HK_nb = HK_nb + 1; | |||
|
447 | label_HK_nb->setText(QString::number(HK_nb)); | |||
|
448 | } | |||
|
449 | else | |||
|
450 | { | |||
|
451 | incrementUnknown(); | |||
|
452 | } | |||
|
453 | else | |||
|
454 | { | |||
|
455 | incrementUnknown(); | |||
|
456 | } | |||
|
457 | } | |||
|
458 | else | |||
|
459 | { | |||
|
460 | incrementUnknown(); | |||
|
461 | } | |||
|
462 | } | |||
|
463 | else if (cat == 12) | |||
|
464 | { | |||
|
465 | if (typ == 21) | |||
|
466 | { | |||
|
467 | if (sub == 3) | |||
|
468 | { | |||
|
469 | if (sid == 1) | |||
|
470 | { | |||
|
471 | NORM_CWF_F3_nb = NORM_CWF_F3_nb + 1; | |||
|
472 | label_NORM_CWF_F3_nb->setText(QString::number(NORM_CWF_F3_nb)); | |||
|
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 | } | |||
|
479 | else if (sid == 3) | |||
|
480 | { | |||
|
481 | NORM_SWF_F0_nb = NORM_SWF_F0_nb + 1; | |||
|
482 | label_NORM_SWF_F0_nb->setText(QString::number(NORM_SWF_F0_nb)); | |||
|
483 | } | |||
|
484 | else if (sid == 4) | |||
|
485 | { | |||
|
486 | NORM_SWF_F1_nb = NORM_SWF_F1_nb + 1; | |||
|
487 | label_NORM_SWF_F1_nb->setText(QString::number(NORM_SWF_F1_nb)); | |||
|
488 | } | |||
|
489 | else if (sid == 5) | |||
|
490 | { | |||
|
491 | NORM_SWF_F2_nb = NORM_SWF_F2_nb + 1; | |||
|
492 | label_NORM_SWF_F2_nb->setText(QString::number(NORM_SWF_F2_nb)); | |||
|
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 | } | |||
|
504 | else | |||
|
505 | { | |||
|
506 | incrementUnknown(); | |||
|
507 | } | |||
|
508 | } | |||
|
509 | } | |||
|
510 | else | |||
|
511 | { | |||
|
512 | incrementUnknown(); | |||
|
513 | } | |||
|
514 | } | |||
|
515 | else | |||
|
516 | { | |||
|
517 | incrementUnknown(); | |||
|
518 | } | |||
|
519 | ||||
|
520 | label_PID_is->setText(QString::number(pid)); | |||
|
521 | label_CAT_is->setText(QString::number(cat)); | |||
|
522 | label_TYP_is->setText(QString::number(typ)); | |||
|
523 | label_SUB_is->setText(QString::number(sub)); | |||
|
524 | label_SID_is->setText(QString::number(sid)); | |||
|
525 | label_SIZ_is->setText(QString::number(length)); | |||
|
526 | label_coarse_time_val->setText(QString::number(coarse_t, 16)); | |||
|
527 | label_fine_time_val->setText(QString::number(fine_t, 16)); | |||
|
528 | } | |||
|
529 | ||||
|
530 | void TMStatistics::incrementUnknown() | |||
|
531 | { | |||
|
532 | UNKNOWN_nb = UNKNOWN_nb + 1; | |||
|
533 | label_UNKNOWN_nb->setText(QString::number(UNKNOWN_nb)); | |||
|
534 | } | |||
|
535 | ||||
|
536 | ||||
|
537 | ||||
|
538 | ||||
|
539 | ||||
|
540 |
@@ -0,0 +1,205 | |||||
|
1 | #ifndef TMSTATISTICS_H | |||
|
2 | #define TMSTATISTICS_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <QLabel> | |||
|
6 | #include <QPushButton> | |||
|
7 | #include <QGridLayout> | |||
|
8 | #include <QVBoxLayout> | |||
|
9 | #include <QGroupBox> | |||
|
10 | ||||
|
11 | #define STATISTICS_FONT_SIZE 9 | |||
|
12 | ||||
|
13 | class TMStatistics : public QWidget | |||
|
14 | { | |||
|
15 | Q_OBJECT | |||
|
16 | public: | |||
|
17 | ||||
|
18 | explicit TMStatistics(QWidget *parent = 0); | |||
|
19 | void initConstants(); | |||
|
20 | void buildMonitor_BURST(); | |||
|
21 | void buildMonitor_SBM1(); | |||
|
22 | void buildMonitor_SBM2(); | |||
|
23 | void buildMonitor_NORM(); | |||
|
24 | void buildMonitor(); | |||
|
25 | void incrementUnknown(); | |||
|
26 | ||||
|
27 | unsigned int UNKNOWN_nb; | |||
|
28 | unsigned int SUCC_nb; | |||
|
29 | unsigned int INCO_nb; | |||
|
30 | unsigned int NOTE_nb; | |||
|
31 | unsigned int NOTI_nb; | |||
|
32 | unsigned int ERRO_nb; | |||
|
33 | unsigned int CORR_nb; | |||
|
34 | unsigned int HK_nb; | |||
|
35 | unsigned int NORM_SWF_F0_nb; | |||
|
36 | unsigned int NORM_SWF_F1_nb; | |||
|
37 | unsigned int NORM_SWF_F2_nb; | |||
|
38 | unsigned int NORM_CWF_F3_nb; | |||
|
39 | unsigned int NORM_ASM_F0_nb; | |||
|
40 | unsigned int NORM_ASM_F1_nb; | |||
|
41 | unsigned int NORM_ASM_F2_nb; | |||
|
42 | unsigned int NORM_BP1_F0_nb; | |||
|
43 | unsigned int NORM_BP1_F1_nb; | |||
|
44 | unsigned int NORM_BP1_F2_nb; | |||
|
45 | unsigned int NORM_BP2_F0_nb; | |||
|
46 | unsigned int NORM_BP2_F1_nb; | |||
|
47 | unsigned int NORM_BP2_F2_nb; | |||
|
48 | // | |||
|
49 | unsigned int BURST_CWF_F2_nb; | |||
|
50 | unsigned int BURST_BP1_F0_nb; | |||
|
51 | unsigned int BURST_BP2_F0_nb; | |||
|
52 | unsigned int BURST_BP1_F1_nb; | |||
|
53 | unsigned int BURST_BP2_F1_nb; | |||
|
54 | unsigned int SBM1_CWF_F1_nb; | |||
|
55 | unsigned int SBM1_BP1_F0_nb; | |||
|
56 | unsigned int SBM1_BP2_F0_nb; | |||
|
57 | unsigned int SBM2_CWF_F2_nb; | |||
|
58 | unsigned int SBM2_BP1_F0_nb; | |||
|
59 | unsigned int SBM2_BP2_F0_nb; | |||
|
60 | unsigned int SBM2_BP1_F1_nb; | |||
|
61 | unsigned int SBM2_BP2_F1_nb; | |||
|
62 | ||||
|
63 | //******* | |||
|
64 | // QLabel | |||
|
65 | QLabel *label_UNKNOWN; | |||
|
66 | QLabel *label_UNKNOWN_nb; | |||
|
67 | ||||
|
68 | //*************** | |||
|
69 | // TM_LFR_TC_EXE_ | |||
|
70 | QLabel *label_SUCC; | |||
|
71 | QLabel *label_INCO; | |||
|
72 | QLabel *label_NOTE; | |||
|
73 | QLabel *label_NOTI; | |||
|
74 | QLabel *label_ERRO; | |||
|
75 | QLabel *label_CORR; | |||
|
76 | QLabel *label_HK; | |||
|
77 | // | |||
|
78 | QLabel *label_SUCC_nb; | |||
|
79 | QLabel *label_INCO_nb; | |||
|
80 | QLabel *label_NOTE_nb; | |||
|
81 | QLabel *label_NOTI_nb; | |||
|
82 | QLabel *label_ERRO_nb; | |||
|
83 | QLabel *label_CORR_nb; | |||
|
84 | QLabel *label_HK_nb; | |||
|
85 | ||||
|
86 | //*********************** | |||
|
87 | // TM_LFR_SCIENCE_NORMAL_ | |||
|
88 | QLabel *label_NORM_SWF_F0; | |||
|
89 | QLabel *label_NORM_SWF_F1; | |||
|
90 | QLabel *label_NORM_SWF_F2; | |||
|
91 | QLabel *label_NORM_CWF_F3; | |||
|
92 | QLabel *label_NORM_ASM_F0; | |||
|
93 | QLabel *label_NORM_ASM_F1; | |||
|
94 | QLabel *label_NORM_ASM_F2; | |||
|
95 | QLabel *label_NORM_BP1_F0; | |||
|
96 | QLabel *label_NORM_BP1_F1; | |||
|
97 | QLabel *label_NORM_BP1_F2; | |||
|
98 | QLabel *label_NORM_BP2_F0; | |||
|
99 | QLabel *label_NORM_BP2_F1; | |||
|
100 | QLabel *label_NORM_BP2_F2; | |||
|
101 | // | |||
|
102 | QLabel *label_NORM_SWF_F0_nb; | |||
|
103 | QLabel *label_NORM_SWF_F1_nb; | |||
|
104 | QLabel *label_NORM_SWF_F2_nb; | |||
|
105 | QLabel *label_NORM_CWF_F3_nb; | |||
|
106 | QLabel *label_NORM_ASM_F0_nb; | |||
|
107 | QLabel *label_NORM_ASM_F1_nb; | |||
|
108 | QLabel *label_NORM_ASM_F2_nb; | |||
|
109 | QLabel *label_NORM_BP1_F0_nb; | |||
|
110 | QLabel *label_NORM_BP1_F1_nb; | |||
|
111 | QLabel *label_NORM_BP1_F2_nb; | |||
|
112 | QLabel *label_NORM_BP2_F0_nb; | |||
|
113 | QLabel *label_NORM_BP2_F1_nb; | |||
|
114 | QLabel *label_NORM_BP2_F2_nb; | |||
|
115 | ||||
|
116 | //********************** | |||
|
117 | // TM_LFR_SCIENCE_BURST_ | |||
|
118 | QLabel *label_BURST_CWF_F2; | |||
|
119 | QLabel *label_BURST_BP1_F0; | |||
|
120 | QLabel *label_BURST_BP2_F0; | |||
|
121 | QLabel *label_BURST_BP1_F1; | |||
|
122 | QLabel *label_BURST_BP2_F1; | |||
|
123 | // | |||
|
124 | QLabel *label_BURST_CWF_F2_nb; | |||
|
125 | QLabel *label_BURST_BP1_F0_nb; | |||
|
126 | QLabel *label_BURST_BP2_F0_nb; | |||
|
127 | QLabel *label_BURST_BP1_F1_nb; | |||
|
128 | QLabel *label_BURST_BP2_F1_nb; | |||
|
129 | ||||
|
130 | //********************* | |||
|
131 | // TM_LFR_SCIENCE_SBM1_ | |||
|
132 | QLabel *label_SBM1_CWF_F1; | |||
|
133 | QLabel *label_SBM1_BP1_F0; | |||
|
134 | QLabel *label_SBM1_BP2_F0; | |||
|
135 | // | |||
|
136 | QLabel *label_SBM1_CWF_F1_nb; | |||
|
137 | QLabel *label_SBM1_BP1_F0_nb; | |||
|
138 | QLabel *label_SBM1_BP2_F0_nb; | |||
|
139 | ||||
|
140 | //********************* | |||
|
141 | // TM_LFR_SCIENCE_SBM2_ | |||
|
142 | QLabel *label_SBM2_CWF_F2; | |||
|
143 | QLabel *label_SBM2_BP1_F0; | |||
|
144 | QLabel *label_SBM2_BP2_F0; | |||
|
145 | QLabel *label_SBM2_BP1_F1; | |||
|
146 | QLabel *label_SBM2_BP2_F1; | |||
|
147 | // | |||
|
148 | QLabel *label_SBM2_CWF_F2_nb; | |||
|
149 | QLabel *label_SBM2_BP1_F0_nb; | |||
|
150 | QLabel *label_SBM2_BP2_F0_nb; | |||
|
151 | QLabel *label_SBM2_BP1_F1_nb; | |||
|
152 | QLabel *label_SBM2_BP2_F1_nb; | |||
|
153 | ||||
|
154 | //******** | |||
|
155 | // LAST TM | |||
|
156 | QLabel *label_PID; | |||
|
157 | QLabel *label_CAT; | |||
|
158 | QLabel *label_TYP; | |||
|
159 | QLabel *label_SUB; | |||
|
160 | QLabel *label_SID; | |||
|
161 | QLabel *label_SIZ; | |||
|
162 | QLabel *label_coarse_time; | |||
|
163 | QLabel *label_fine_time; | |||
|
164 | // | |||
|
165 | QLabel *label_PID_is; | |||
|
166 | QLabel *label_CAT_is; | |||
|
167 | QLabel *label_TYP_is; | |||
|
168 | QLabel *label_SUB_is; | |||
|
169 | QLabel *label_SID_is; | |||
|
170 | QLabel *label_SIZ_is; | |||
|
171 | QLabel *label_coarse_time_val; | |||
|
172 | QLabel *label_fine_time_val; | |||
|
173 | ||||
|
174 | // Layouts | |||
|
175 | QGridLayout *mainLayout; | |||
|
176 | QGridLayout *layout_stat; // TM stastictics | |||
|
177 | QGridLayout *layout_NORM; // TM_LFR_SCIENCE_NORMAL_ | |||
|
178 | QGridLayout *layout_BURST; // TM_LFR_SCIENCE_BURST_ | |||
|
179 | QGridLayout *layout_SBM1; // TM_LFR_SCIENCE_SBM1_ | |||
|
180 | QGridLayout *layout_SBM2; // TM_LFR_SCIENCE_SBM2_ | |||
|
181 | QGridLayout *layout_last; // last TM description | |||
|
182 | ||||
|
183 | // QPushButton | |||
|
184 | QPushButton *button_reset_stat; | |||
|
185 | ||||
|
186 | // QGroupBox | |||
|
187 | QGroupBox *groupbox_stat; | |||
|
188 | QGroupBox *groupbox_NORM; | |||
|
189 | QGroupBox *groupbox_BURST; | |||
|
190 | QGroupBox *groupbox_SBM1; | |||
|
191 | QGroupBox *groupbox_SBM2; | |||
|
192 | QGroupBox *groupbox_last; | |||
|
193 | ||||
|
194 | signals: | |||
|
195 | ||||
|
196 | public slots: | |||
|
197 | void resetStatistics(); | |||
|
198 | void updateStatistics(unsigned char pid, unsigned char cat, | |||
|
199 | unsigned char typ, unsigned char sub, | |||
|
200 | unsigned int sid, unsigned int length, | |||
|
201 | unsigned int coarse_t, unsigned int fine_t); | |||
|
202 | ||||
|
203 | }; | |||
|
204 | ||||
|
205 | #endif // TMSTATISTICS_H |
@@ -0,0 +1,52 | |||||
|
1 | #include "wfdisplay.h" | |||
|
2 | #include <QApplication> | |||
|
3 | ||||
|
4 | WFDisplay::WFDisplay(QWidget *parent) : | |||
|
5 | QWidget(parent) | |||
|
6 | { | |||
|
7 | waveforms_LAYOUT = new QVBoxLayout; | |||
|
8 | ||||
|
9 | spwTabWidget = new QTabWidget; | |||
|
10 | ||||
|
11 | page_f0 = new WFPage; | |||
|
12 | page_f1 = new WFPage; | |||
|
13 | page_f2 = new WFPage; | |||
|
14 | page_f3 = new WFPage; | |||
|
15 | ||||
|
16 | spwTabWidget->addTab(page_f0, tr("f0")); | |||
|
17 | spwTabWidget->addTab(page_f1, tr("f1")); | |||
|
18 | spwTabWidget->addTab(page_f2, tr("f2")); | |||
|
19 | spwTabWidget->addTab(page_f3, tr("f3")); | |||
|
20 | ||||
|
21 | waveforms_LAYOUT->addWidget(spwTabWidget); | |||
|
22 | ||||
|
23 | this->setLayout(waveforms_LAYOUT); | |||
|
24 | ||||
|
25 | } | |||
|
26 | ||||
|
27 | void WFDisplay::displayOnPlot(short *data, unsigned char num_page, unsigned char num) | |||
|
28 | { | |||
|
29 | QVector<double> x(XMAX), y(XMAX); | |||
|
30 | ||||
|
31 | for (int i=0; i<XMAX; ++i) | |||
|
32 | { | |||
|
33 | x[i] = i; | |||
|
34 | y[i] = (double) data[i]; | |||
|
35 | } | |||
|
36 | switch(num_page){ | |||
|
37 | case 0: | |||
|
38 | page_f0->displayOnPlot(data, num); | |||
|
39 | break; | |||
|
40 | case 1: | |||
|
41 | page_f1->displayOnPlot(data, num); | |||
|
42 | break; | |||
|
43 | case 2: | |||
|
44 | page_f2->displayOnPlot(data, num); | |||
|
45 | break; | |||
|
46 | case 3: | |||
|
47 | page_f3->displayOnPlot(data, num); | |||
|
48 | break; | |||
|
49 | } | |||
|
50 | ||||
|
51 | } | |||
|
52 |
@@ -0,0 +1,37 | |||||
|
1 | #ifndef WFDISPLAY_H | |||
|
2 | #define WFDISPLAY_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <lppmonplot.h> | |||
|
6 | #include <QGridLayout> | |||
|
7 | #include <QVBoxLayout> | |||
|
8 | #include <wfplot.h> | |||
|
9 | #include <wfpage.h> | |||
|
10 | #include <QTabWidget> | |||
|
11 | #include <params.h> | |||
|
12 | ||||
|
13 | class WFDisplay : public QWidget | |||
|
14 | { | |||
|
15 | Q_OBJECT | |||
|
16 | public: | |||
|
17 | explicit WFDisplay(QWidget *parent = 0); | |||
|
18 | ||||
|
19 | WFPage * page_f0; | |||
|
20 | WFPage * page_f1; | |||
|
21 | WFPage * page_f2; | |||
|
22 | WFPage * page_f3; | |||
|
23 | ||||
|
24 | QTabWidget *spwTabWidget; | |||
|
25 | ||||
|
26 | QVBoxLayout *waveforms_LAYOUT; | |||
|
27 | ||||
|
28 | void displayOnPlot(short *data, unsigned char num_page, unsigned char num); | |||
|
29 | ||||
|
30 | ||||
|
31 | signals: | |||
|
32 | ||||
|
33 | public slots: | |||
|
34 | ||||
|
35 | }; | |||
|
36 | ||||
|
37 | #endif // WFDISPLAY_H |
@@ -0,0 +1,24 | |||||
|
1 | #include "wfpacket.h" | |||
|
2 | ||||
|
3 | WFPacket::WFPacket(QObject *parent) : | |||
|
4 | QObject(parent) | |||
|
5 | { | |||
|
6 | this->nbSamples = XMAX; | |||
|
7 | // | |||
|
8 | wf_v = (short*) malloc(2*XMAX); | |||
|
9 | wf_e1 = (short*) malloc(2*XMAX); | |||
|
10 | wf_e2 = (short*) malloc(2*XMAX); | |||
|
11 | wf_b1 = (short*) malloc(2*XMAX); | |||
|
12 | wf_b2 = (short*) malloc(2*XMAX); | |||
|
13 | wf_b3 = (short*) malloc(2*XMAX); | |||
|
14 | } | |||
|
15 | ||||
|
16 | WFPacket::~WFPacket() | |||
|
17 | { | |||
|
18 | free(wf_v); | |||
|
19 | free(wf_e1); | |||
|
20 | free(wf_e2); | |||
|
21 | free(wf_b1); | |||
|
22 | free(wf_b2); | |||
|
23 | free(wf_b3); | |||
|
24 | } |
@@ -0,0 +1,27 | |||||
|
1 | #ifndef WFPACKET_H | |||
|
2 | #define WFPACKET_H | |||
|
3 | ||||
|
4 | #include <QObject> | |||
|
5 | #include <params.h> | |||
|
6 | ||||
|
7 | class WFPacket : public QObject | |||
|
8 | { | |||
|
9 | Q_OBJECT | |||
|
10 | public: | |||
|
11 | explicit WFPacket(QObject *parent = 0); | |||
|
12 | ~WFPacket(); | |||
|
13 | unsigned int nbSamples; | |||
|
14 | short *wf_v; | |||
|
15 | short *wf_e1; | |||
|
16 | short *wf_e2; | |||
|
17 | short *wf_b1; | |||
|
18 | short *wf_b2; | |||
|
19 | short *wf_b3; | |||
|
20 | ||||
|
21 | signals: | |||
|
22 | ||||
|
23 | public slots: | |||
|
24 | ||||
|
25 | }; | |||
|
26 | ||||
|
27 | #endif // WFPACKET_H |
@@ -0,0 +1,55 | |||||
|
1 | #include "wfpage.h" | |||
|
2 | ||||
|
3 | WFPage::WFPage(QWidget *parent) : | |||
|
4 | QWidget(parent) | |||
|
5 | { | |||
|
6 | wfPlot_v = new WFPlot(); | |||
|
7 | wfPlot_e1 = new WFPlot(); | |||
|
8 | wfPlot_e2 = new WFPlot(); | |||
|
9 | wfPlot_b1 = new WFPlot(); | |||
|
10 | wfPlot_b2 = new WFPlot(); | |||
|
11 | wfPlot_b3 = new WFPlot(); | |||
|
12 | // | |||
|
13 | //wfPlot_v->customPlot->setTitle("v"); | |||
|
14 | wfPlot_v->customPlot->setGraphName(0, "v"); | |||
|
15 | //wfPlot_e1->customPlot->setTitle("e1"); | |||
|
16 | wfPlot_e1->customPlot->setGraphName(0, "e1"); | |||
|
17 | wfPlot_e2->customPlot->setTitle("e2"); | |||
|
18 | wfPlot_b1->customPlot->setTitle("b1"); | |||
|
19 | wfPlot_b2->customPlot->setTitle("b2"); | |||
|
20 | wfPlot_b3->customPlot->setTitle("b3"); | |||
|
21 | // | |||
|
22 | mainLayout = new QGridLayout; | |||
|
23 | mainLayout->addWidget(wfPlot_v, 0, 0, 1, 1); | |||
|
24 | mainLayout->addWidget(wfPlot_e1, 0, 1, 1, 1); | |||
|
25 | mainLayout->addWidget(wfPlot_e2, 0, 2, 1, 1); | |||
|
26 | mainLayout->addWidget(wfPlot_b1, 1, 0, 1, 1); | |||
|
27 | mainLayout->addWidget(wfPlot_b2, 1, 1, 1, 1); | |||
|
28 | mainLayout->addWidget(wfPlot_b3, 1, 2, 1, 1); | |||
|
29 | // | |||
|
30 | this->setLayout(mainLayout); | |||
|
31 | } | |||
|
32 | ||||
|
33 | void WFPage::displayOnPlot(short *data, unsigned char num) | |||
|
34 | { | |||
|
35 | switch(num){ | |||
|
36 | case 0: | |||
|
37 | wfPlot_v->displayOnPlot(data, DEFAULT_SIZE); | |||
|
38 | break; | |||
|
39 | case 1: | |||
|
40 | wfPlot_e1->displayOnPlot(data, DEFAULT_SIZE); | |||
|
41 | break; | |||
|
42 | case 2: | |||
|
43 | wfPlot_e2->displayOnPlot(data, DEFAULT_SIZE); | |||
|
44 | break; | |||
|
45 | case 3: | |||
|
46 | wfPlot_b1->displayOnPlot(data, DEFAULT_SIZE); | |||
|
47 | break; | |||
|
48 | case 4: | |||
|
49 | wfPlot_b2->displayOnPlot(data, DEFAULT_SIZE); | |||
|
50 | break; | |||
|
51 | case 5: | |||
|
52 | wfPlot_b3->displayOnPlot(data, DEFAULT_SIZE); | |||
|
53 | break; | |||
|
54 | } | |||
|
55 | } |
@@ -0,0 +1,31 | |||||
|
1 | #ifndef WFPAGE_H | |||
|
2 | #define WFPAGE_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <wfplot.h> | |||
|
6 | #include <params.h> | |||
|
7 | ||||
|
8 | class WFPage : public QWidget | |||
|
9 | { | |||
|
10 | Q_OBJECT | |||
|
11 | public: | |||
|
12 | explicit WFPage(QWidget *parent = 0); | |||
|
13 | ||||
|
14 | WFPlot *wfPlot_v; | |||
|
15 | WFPlot *wfPlot_e1; | |||
|
16 | WFPlot *wfPlot_e2; | |||
|
17 | WFPlot *wfPlot_b1; | |||
|
18 | WFPlot *wfPlot_b2; | |||
|
19 | WFPlot *wfPlot_b3; | |||
|
20 | ||||
|
21 | QGridLayout *mainLayout; | |||
|
22 | ||||
|
23 | void displayOnPlot(short *data, unsigned char num); | |||
|
24 | ||||
|
25 | signals: | |||
|
26 | ||||
|
27 | public slots: | |||
|
28 | ||||
|
29 | }; | |||
|
30 | ||||
|
31 | #endif // WFPAGE_H |
@@ -0,0 +1,48 | |||||
|
1 | #include "wfplot.h" | |||
|
2 | #include <QFontInfo> | |||
|
3 | ||||
|
4 | WFPlot::WFPlot(QWidget *parent) : | |||
|
5 | QWidget(parent) | |||
|
6 | { | |||
|
7 | // Create Fonts | |||
|
8 | QFont font; | |||
|
9 | font = QFont(this->fontInfo().family(), FONT_SIZE_WAVEFORM_TITLE, QFont::Light); | |||
|
10 | customPlot = new LppMonPlot(); | |||
|
11 | mainLayout = new QVBoxLayout(); | |||
|
12 | ||||
|
13 | customPlot->setXaxisRange(0, XMAX); | |||
|
14 | customPlot->setYaxisRange(-YMAX, YMAX); | |||
|
15 | //customPlot->setTitleFont(font); | |||
|
16 | ||||
|
17 | customPlot->addGraph(); | |||
|
18 | ||||
|
19 | mainLayout->addWidget(customPlot); | |||
|
20 | ||||
|
21 | this->setLayout(mainLayout); | |||
|
22 | } | |||
|
23 | ||||
|
24 | ||||
|
25 | ||||
|
26 | void WFPlot::displayOnPlot(short *data, unsigned int size) | |||
|
27 | { | |||
|
28 | QList<QVariant> qListX; | |||
|
29 | QList<QVariant> qListY; | |||
|
30 | qListX.clear(); | |||
|
31 | qListY.clear(); | |||
|
32 | ||||
|
33 | for (unsigned int i=0; i<size; ++i) | |||
|
34 | { | |||
|
35 | qListX.append(i); | |||
|
36 | qListY.append( (double) data[i] ); | |||
|
37 | } | |||
|
38 | ||||
|
39 | customPlot->setGraphData(0, qListX, qListY); | |||
|
40 | customPlot->rescaleAxis(); | |||
|
41 | customPlot->setGraphName(0, "v"); | |||
|
42 | } | |||
|
43 | ||||
|
44 | ||||
|
45 | ||||
|
46 | ||||
|
47 | ||||
|
48 |
@@ -0,0 +1,26 | |||||
|
1 | #ifndef WFPLOT_H | |||
|
2 | #define WFPLOT_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <QVBoxLayout> | |||
|
6 | #include <params.h> | |||
|
7 | #include <lppmonplot.h> | |||
|
8 | ||||
|
9 | class WFPlot : public QWidget | |||
|
10 | { | |||
|
11 | Q_OBJECT | |||
|
12 | public: | |||
|
13 | explicit WFPlot(QWidget *parent = 0); | |||
|
14 | ||||
|
15 | void displayOnPlot(short *data, unsigned int size); | |||
|
16 | ||||
|
17 | LppMonPlot *customPlot; | |||
|
18 | QVBoxLayout *mainLayout; | |||
|
19 | ||||
|
20 | signals: | |||
|
21 | ||||
|
22 | public slots: | |||
|
23 | ||||
|
24 | }; | |||
|
25 | ||||
|
26 | #endif // WFPLOT_H |
@@ -0,0 +1,308 | |||||
|
1 | ############################################################################# | |||
|
2 | # Makefile for building: libwfdisplay.so.1.0.0 | |||
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jun 28 09:02:23 2013 | |||
|
4 | # Project: wfdisplay.pro | |||
|
5 | # Template: lib | |||
|
6 | # Command: /usr/bin/qmake-qt4 -o Makefile wfdisplay.pro | |||
|
7 | ############################################################################# | |||
|
8 | ||||
|
9 | ####### Compiler, tools and options | |||
|
10 | ||||
|
11 | CC = gcc | |||
|
12 | CXX = g++ | |||
|
13 | DEFINES = -DWFDISPLAY_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED | |||
|
14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) | |||
|
15 | CXXFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) | |||
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I/usr/include/lppmon/common -I. | |||
|
17 | LINK = g++ | |||
|
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro -shared -Wl,-soname,libwfdisplay.so.1 | |||
|
19 | LIBS = $(SUBLIBS) -L/usr/lib64 -llppmoncommon -lQtGui -lQtCore -lpthread | |||
|
20 | AR = ar cqs | |||
|
21 | RANLIB = | |||
|
22 | QMAKE = /usr/bin/qmake-qt4 | |||
|
23 | TAR = tar -cf | |||
|
24 | COMPRESS = gzip -9f | |||
|
25 | COPY = cp -f | |||
|
26 | SED = sed | |||
|
27 | COPY_FILE = $(COPY) | |||
|
28 | COPY_DIR = $(COPY) -r | |||
|
29 | STRIP = | |||
|
30 | INSTALL_FILE = install -m 644 -p | |||
|
31 | INSTALL_DIR = $(COPY_DIR) | |||
|
32 | INSTALL_PROGRAM = install -m 755 -p | |||
|
33 | DEL_FILE = rm -f | |||
|
34 | SYMLINK = ln -f -s | |||
|
35 | DEL_DIR = rmdir | |||
|
36 | MOVE = mv -f | |||
|
37 | CHK_DIR_EXISTS= test -d | |||
|
38 | MKDIR = mkdir -p | |||
|
39 | ||||
|
40 | ####### Output directory | |||
|
41 | ||||
|
42 | OBJECTS_DIR = ./ | |||
|
43 | ||||
|
44 | ####### Files | |||
|
45 | ||||
|
46 | SOURCES = wfdisplay.cpp \ | |||
|
47 | wfplot.cpp \ | |||
|
48 | wfpage.cpp moc_wfdisplay.cpp \ | |||
|
49 | moc_wfplot.cpp \ | |||
|
50 | moc_wfpage.cpp | |||
|
51 | OBJECTS = wfdisplay.o \ | |||
|
52 | wfplot.o \ | |||
|
53 | wfpage.o \ | |||
|
54 | moc_wfdisplay.o \ | |||
|
55 | moc_wfplot.o \ | |||
|
56 | moc_wfpage.o | |||
|
57 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |||
|
58 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |||
|
59 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |||
|
60 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |||
|
61 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |||
|
62 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |||
|
63 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |||
|
64 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |||
|
65 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |||
|
66 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |||
|
67 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |||
|
68 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |||
|
69 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |||
|
70 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |||
|
71 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |||
|
72 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |||
|
73 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |||
|
74 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |||
|
75 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |||
|
76 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |||
|
77 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |||
|
78 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |||
|
79 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |||
|
80 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |||
|
81 | wfdisplay.pro | |||
|
82 | QMAKE_TARGET = wfdisplay | |||
|
83 | DESTDIR = | |||
|
84 | TARGET = libwfdisplay.so.1.0.0 | |||
|
85 | TARGETA = libwfdisplay.a | |||
|
86 | TARGETD = libwfdisplay.so.1.0.0 | |||
|
87 | TARGET0 = libwfdisplay.so | |||
|
88 | TARGET1 = libwfdisplay.so.1 | |||
|
89 | TARGET2 = libwfdisplay.so.1.0 | |||
|
90 | ||||
|
91 | first: all | |||
|
92 | ####### Implicit rules | |||
|
93 | ||||
|
94 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |||
|
95 | ||||
|
96 | .cpp.o: | |||
|
97 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
98 | ||||
|
99 | .cc.o: | |||
|
100 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
101 | ||||
|
102 | .cxx.o: | |||
|
103 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
104 | ||||
|
105 | .C.o: | |||
|
106 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
107 | ||||
|
108 | .c.o: | |||
|
109 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |||
|
110 | ||||
|
111 | ####### Build rules | |||
|
112 | ||||
|
113 | all: Makefile $(TARGET) | |||
|
114 | ||||
|
115 | $(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) | |||
|
116 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) | |||
|
117 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) | |||
|
118 | -ln -s $(TARGET) $(TARGET0) | |||
|
119 | -ln -s $(TARGET) $(TARGET1) | |||
|
120 | -ln -s $(TARGET) $(TARGET2) | |||
|
121 | ||||
|
122 | ||||
|
123 | ||||
|
124 | staticlib: $(TARGETA) | |||
|
125 | ||||
|
126 | $(TARGETA): $(OBJECTS) $(OBJCOMP) | |||
|
127 | -$(DEL_FILE) $(TARGETA) | |||
|
128 | $(AR) $(TARGETA) $(OBJECTS) | |||
|
129 | ||||
|
130 | Makefile: wfdisplay.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |||
|
131 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |||
|
132 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |||
|
133 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |||
|
134 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |||
|
135 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |||
|
136 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |||
|
137 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |||
|
138 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |||
|
139 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |||
|
140 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |||
|
141 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |||
|
142 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |||
|
143 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |||
|
144 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |||
|
145 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |||
|
146 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |||
|
147 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |||
|
148 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |||
|
149 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |||
|
150 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |||
|
151 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |||
|
152 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |||
|
153 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |||
|
154 | /usr/lib64/libQtGui.prl \ | |||
|
155 | /usr/lib64/libQtCore.prl | |||
|
156 | $(QMAKE) -o Makefile wfdisplay.pro | |||
|
157 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |||
|
158 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |||
|
159 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |||
|
160 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |||
|
161 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |||
|
162 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |||
|
163 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |||
|
164 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |||
|
165 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |||
|
166 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |||
|
167 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |||
|
168 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |||
|
169 | /usr/lib64/qt4/mkspecs/features/release.prf: | |||
|
170 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |||
|
171 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |||
|
172 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |||
|
173 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |||
|
174 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |||
|
175 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |||
|
176 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |||
|
177 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |||
|
178 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |||
|
179 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |||
|
180 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |||
|
181 | /usr/lib64/libQtGui.prl: | |||
|
182 | /usr/lib64/libQtCore.prl: | |||
|
183 | qmake: FORCE | |||
|
184 | @$(QMAKE) -o Makefile wfdisplay.pro | |||
|
185 | ||||
|
186 | dist: | |||
|
187 | @$(CHK_DIR_EXISTS) .tmp/wfdisplay1.0.0 || $(MKDIR) .tmp/wfdisplay1.0.0 | |||
|
188 | $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/wfdisplay1.0.0/ && $(COPY_FILE) --parents wfdisplay.h wfdisplay_global.h wfplot.h wfpage.h params.h .tmp/wfdisplay1.0.0/ && $(COPY_FILE) --parents wfdisplay.cpp wfplot.cpp wfpage.cpp .tmp/wfdisplay1.0.0/ && (cd `dirname .tmp/wfdisplay1.0.0` && $(TAR) wfdisplay1.0.0.tar wfdisplay1.0.0 && $(COMPRESS) wfdisplay1.0.0.tar) && $(MOVE) `dirname .tmp/wfdisplay1.0.0`/wfdisplay1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/wfdisplay1.0.0 | |||
|
189 | ||||
|
190 | ||||
|
191 | clean:compiler_clean | |||
|
192 | -$(DEL_FILE) $(OBJECTS) | |||
|
193 | -$(DEL_FILE) *~ core *.core | |||
|
194 | ||||
|
195 | ||||
|
196 | ####### Sub-libraries | |||
|
197 | ||||
|
198 | distclean: clean | |||
|
199 | -$(DEL_FILE) $(TARGET) | |||
|
200 | -$(DEL_FILE) $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETA) | |||
|
201 | -$(DEL_FILE) Makefile | |||
|
202 | ||||
|
203 | ||||
|
204 | check: first | |||
|
205 | ||||
|
206 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |||
|
207 | ||||
|
208 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |||
|
209 | ||||
|
210 | compiler_moc_header_make_all: moc_wfdisplay.cpp moc_wfplot.cpp moc_wfpage.cpp | |||
|
211 | compiler_moc_header_clean: | |||
|
212 | -$(DEL_FILE) moc_wfdisplay.cpp moc_wfplot.cpp moc_wfpage.cpp | |||
|
213 | moc_wfdisplay.cpp: wfdisplay_global.h \ | |||
|
214 | wfpage.h \ | |||
|
215 | wfplot.h \ | |||
|
216 | params.h \ | |||
|
217 | wfdisplay.h | |||
|
218 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfdisplay.h -o moc_wfdisplay.cpp | |||
|
219 | ||||
|
220 | moc_wfplot.cpp: wfplot.h | |||
|
221 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfplot.h -o moc_wfplot.cpp | |||
|
222 | ||||
|
223 | moc_wfpage.cpp: wfplot.h \ | |||
|
224 | params.h \ | |||
|
225 | wfpage.h | |||
|
226 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfpage.h -o moc_wfpage.cpp | |||
|
227 | ||||
|
228 | compiler_rcc_make_all: | |||
|
229 | compiler_rcc_clean: | |||
|
230 | compiler_image_collection_make_all: qmake_image_collection.cpp | |||
|
231 | compiler_image_collection_clean: | |||
|
232 | -$(DEL_FILE) qmake_image_collection.cpp | |||
|
233 | compiler_moc_source_make_all: | |||
|
234 | compiler_moc_source_clean: | |||
|
235 | compiler_uic_make_all: | |||
|
236 | compiler_uic_clean: | |||
|
237 | compiler_yacc_decl_make_all: | |||
|
238 | compiler_yacc_decl_clean: | |||
|
239 | compiler_yacc_impl_make_all: | |||
|
240 | compiler_yacc_impl_clean: | |||
|
241 | compiler_lex_make_all: | |||
|
242 | compiler_lex_clean: | |||
|
243 | compiler_clean: compiler_moc_header_clean | |||
|
244 | ||||
|
245 | ####### Compile | |||
|
246 | ||||
|
247 | wfdisplay.o: wfdisplay.cpp wfdisplay.h \ | |||
|
248 | wfdisplay_global.h \ | |||
|
249 | wfpage.h \ | |||
|
250 | wfplot.h \ | |||
|
251 | params.h | |||
|
252 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfdisplay.o wfdisplay.cpp | |||
|
253 | ||||
|
254 | wfplot.o: wfplot.cpp wfplot.h \ | |||
|
255 | params.h | |||
|
256 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfplot.o wfplot.cpp | |||
|
257 | ||||
|
258 | wfpage.o: wfpage.cpp wfpage.h \ | |||
|
259 | wfplot.h \ | |||
|
260 | params.h | |||
|
261 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfpage.o wfpage.cpp | |||
|
262 | ||||
|
263 | moc_wfdisplay.o: moc_wfdisplay.cpp | |||
|
264 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfdisplay.o moc_wfdisplay.cpp | |||
|
265 | ||||
|
266 | moc_wfplot.o: moc_wfplot.cpp | |||
|
267 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfplot.o moc_wfplot.cpp | |||
|
268 | ||||
|
269 | moc_wfpage.o: moc_wfpage.cpp | |||
|
270 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfpage.o moc_wfpage.cpp | |||
|
271 | ||||
|
272 | ####### Install | |||
|
273 | ||||
|
274 | install_header: first FORCE | |||
|
275 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ || $(MKDIR) $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |||
|
276 | -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfdisplay.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |||
|
277 | -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfdisplay_global.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |||
|
278 | -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfpage.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |||
|
279 | ||||
|
280 | ||||
|
281 | uninstall_header: FORCE | |||
|
282 | -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/wfdisplay.h | |||
|
283 | -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/wfdisplay_global.h | |||
|
284 | -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/wfpage.h | |||
|
285 | -$(DEL_DIR) $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |||
|
286 | ||||
|
287 | ||||
|
288 | install_target: first FORCE | |||
|
289 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib64/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib64/ | |||
|
290 | -$(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/usr/lib64/$(TARGET)" | |||
|
291 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/lib64/$(TARGET0)" | |||
|
292 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/lib64/$(TARGET1)" | |||
|
293 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/lib64/$(TARGET2)" | |||
|
294 | ||||
|
295 | uninstall_target: FORCE | |||
|
296 | -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib64/$(TARGET)" | |||
|
297 | -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib64/$(TARGET0)" | |||
|
298 | -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib64/$(TARGET1)" | |||
|
299 | -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib64/$(TARGET2)" | |||
|
300 | -$(DEL_DIR) $(INSTALL_ROOT)/usr/lib64/ | |||
|
301 | ||||
|
302 | ||||
|
303 | install: install_header install_target FORCE | |||
|
304 | ||||
|
305 | uninstall: uninstall_header uninstall_target FORCE | |||
|
306 | ||||
|
307 | FORCE: | |||
|
308 |
@@ -0,0 +1,9 | |||||
|
1 | #ifndef PARAMS_H | |||
|
2 | #define PARAMS_H | |||
|
3 | ||||
|
4 | #define FONT_SIZE_WAVEFORM_TITLE 10 | |||
|
5 | #define XMAX 2048 | |||
|
6 | #define YMAX 15000 | |||
|
7 | #define DEFAULT_SIZE 2048 | |||
|
8 | ||||
|
9 | #endif // PARAMS_H |
@@ -0,0 +1,51 | |||||
|
1 | #include "wfdisplay.h" | |||
|
2 | ||||
|
3 | ||||
|
4 | WFDisplay::WFDisplay(QWidget *parent) : | |||
|
5 | QWidget(parent) | |||
|
6 | { | |||
|
7 | waveforms_LAYOUT = new QVBoxLayout; | |||
|
8 | ||||
|
9 | spwTabWidget = new QTabWidget; | |||
|
10 | ||||
|
11 | page_f0 = new WFPage; | |||
|
12 | page_f1 = new WFPage; | |||
|
13 | page_f2 = new WFPage; | |||
|
14 | page_f3 = new WFPage; | |||
|
15 | ||||
|
16 | spwTabWidget->addTab(page_f0, tr("f0 (24576 Hz)")); | |||
|
17 | spwTabWidget->addTab(page_f1, tr("f1 (4096 Hz")); | |||
|
18 | spwTabWidget->addTab(page_f2, tr("f2 (256 Hz)")); | |||
|
19 | spwTabWidget->addTab(page_f3, tr("f3 (16 Hz)")); | |||
|
20 | ||||
|
21 | waveforms_LAYOUT->addWidget(spwTabWidget); | |||
|
22 | ||||
|
23 | this->setLayout(waveforms_LAYOUT); | |||
|
24 | ||||
|
25 | } | |||
|
26 | ||||
|
27 | void WFDisplay::displayOnPlot(short *data, unsigned char num_page, unsigned char num) | |||
|
28 | { | |||
|
29 | QVector<double> x(XMAX), y(XMAX); | |||
|
30 | ||||
|
31 | for (int i=0; i<XMAX; ++i) | |||
|
32 | { | |||
|
33 | x[i] = i; | |||
|
34 | y[i] = (double) data[i]; | |||
|
35 | } | |||
|
36 | switch(num_page){ | |||
|
37 | case 0: | |||
|
38 | page_f0->displayOnPlot(data, num); | |||
|
39 | break; | |||
|
40 | case 1: | |||
|
41 | page_f1->displayOnPlot(data, num); | |||
|
42 | break; | |||
|
43 | case 2: | |||
|
44 | page_f2->displayOnPlot(data, num); | |||
|
45 | break; | |||
|
46 | case 3: | |||
|
47 | page_f3->displayOnPlot(data, num); | |||
|
48 | break; | |||
|
49 | } | |||
|
50 | ||||
|
51 | } |
@@ -0,0 +1,39 | |||||
|
1 | #ifndef WFDISPLAY_H | |||
|
2 | #define WFDISPLAY_H | |||
|
3 | ||||
|
4 | #include "wfdisplay_global.h" | |||
|
5 | ||||
|
6 | #include <QWidget> | |||
|
7 | #include <QGridLayout> | |||
|
8 | #include <QVBoxLayout> | |||
|
9 | #include <wfpage.h> | |||
|
10 | #include <QTabWidget> | |||
|
11 | ||||
|
12 | #define XMAX 2048 | |||
|
13 | ||||
|
14 | class WFDISPLAYSHARED_EXPORT WFDisplay : public QWidget | |||
|
15 | { | |||
|
16 | Q_OBJECT | |||
|
17 | public: | |||
|
18 | explicit WFDisplay(QWidget *parent = 0); | |||
|
19 | ||||
|
20 | WFPage * page_f0; | |||
|
21 | WFPage * page_f1; | |||
|
22 | WFPage * page_f2; | |||
|
23 | WFPage * page_f3; | |||
|
24 | ||||
|
25 | QTabWidget *spwTabWidget; | |||
|
26 | ||||
|
27 | QVBoxLayout *waveforms_LAYOUT; | |||
|
28 | ||||
|
29 | void displayOnPlot(short *data, unsigned char num_page, unsigned char num); | |||
|
30 | ||||
|
31 | ||||
|
32 | signals: | |||
|
33 | ||||
|
34 | public slots: | |||
|
35 | ||||
|
36 | }; | |||
|
37 | ||||
|
38 | ||||
|
39 | #endif // WFDISPLAY_H |
@@ -0,0 +1,41 | |||||
|
1 | #------------------------------------------------- | |||
|
2 | # | |||
|
3 | # Project created by QtCreator 2013-05-31T12:59:38 | |||
|
4 | # | |||
|
5 | #------------------------------------------------- | |||
|
6 | ||||
|
7 | TARGET = wfdisplay | |||
|
8 | TEMPLATE = lib | |||
|
9 | ||||
|
10 | INCLUDEPATH += \ | |||
|
11 | $${PWD} \ | |||
|
12 | $$[QT_INSTALL_HEADERS]/lppmon/common | |||
|
13 | ||||
|
14 | LIBS += -llppmoncommon | |||
|
15 | ||||
|
16 | DEFINES += WFDISPLAY_LIBRARY | |||
|
17 | ||||
|
18 | SOURCES += wfdisplay.cpp \ | |||
|
19 | wfplot.cpp \ | |||
|
20 | wfpage.cpp | |||
|
21 | ||||
|
22 | ||||
|
23 | HEADERS += wfdisplay.h\ | |||
|
24 | wfdisplay_global.h \ | |||
|
25 | wfplot.h \ | |||
|
26 | wfpage.h \ | |||
|
27 | params.h | |||
|
28 | ||||
|
29 | ||||
|
30 | header.path = $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay | |||
|
31 | header.files = \ | |||
|
32 | wfdisplay.h \ | |||
|
33 | wfdisplay_global.h \ | |||
|
34 | wfpage.h | |||
|
35 | ||||
|
36 | target.path = $$[QT_INSTALL_LIBS] | |||
|
37 | isEmpty(target.path) { | |||
|
38 | target.path = $(QTDIR)/lib | |||
|
39 | } | |||
|
40 | ||||
|
41 | INSTALLS += header target |
@@ -0,0 +1,264 | |||||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |||
|
2 | <!DOCTYPE QtCreatorProject> | |||
|
3 | <!-- Written by Qt Creator 2.4.1, 2013-06-28T13:26:54. --> | |||
|
4 | <qtcreator> | |||
|
5 | <data> | |||
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |||
|
7 | <value type="int">0</value> | |||
|
8 | </data> | |||
|
9 | <data> | |||
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |||
|
11 | <valuemap type="QVariantMap"> | |||
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |||
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |||
|
14 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |||
|
15 | <value type="QString" key="language">Cpp</value> | |||
|
16 | <valuemap type="QVariantMap" key="value"> | |||
|
17 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |||
|
18 | </valuemap> | |||
|
19 | </valuemap> | |||
|
20 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |||
|
21 | <value type="QString" key="language">QmlJS</value> | |||
|
22 | <valuemap type="QVariantMap" key="value"> | |||
|
23 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |||
|
24 | </valuemap> | |||
|
25 | </valuemap> | |||
|
26 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |||
|
27 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |||
|
28 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |||
|
29 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |||
|
30 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |||
|
31 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |||
|
32 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |||
|
33 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |||
|
34 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |||
|
35 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |||
|
36 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |||
|
37 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |||
|
38 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |||
|
39 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |||
|
40 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |||
|
41 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |||
|
42 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |||
|
43 | </valuemap> | |||
|
44 | </data> | |||
|
45 | <data> | |||
|
46 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |||
|
47 | <valuemap type="QVariantMap"/> | |||
|
48 | </data> | |||
|
49 | <data> | |||
|
50 | <variable>ProjectExplorer.Project.Target.0</variable> | |||
|
51 | <valuemap type="QVariantMap"> | |||
|
52 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | |||
|
53 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | |||
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value> | |||
|
55 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |||
|
56 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |||
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |||
|
58 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |||
|
59 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> | |||
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |||
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |||
|
62 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |||
|
63 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |||
|
65 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |||
|
66 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |||
|
67 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |||
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |||
|
69 | </valuemap> | |||
|
70 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |||
|
71 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |||
|
72 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |||
|
74 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |||
|
75 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |||
|
76 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |||
|
77 | </valuemap> | |||
|
78 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |||
|
79 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |||
|
80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |||
|
82 | </valuemap> | |||
|
83 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |||
|
84 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |||
|
85 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |||
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |||
|
88 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |||
|
89 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |||
|
90 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |||
|
91 | </valuemap> | |||
|
92 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |||
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |||
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |||
|
96 | </valuemap> | |||
|
97 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |||
|
98 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |||
|
99 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |||
|
100 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |||
|
101 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
102 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |||
|
103 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |||
|
104 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay</value> | |||
|
105 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |||
|
106 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |||
|
107 | </valuemap> | |||
|
108 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> | |||
|
109 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> | |||
|
110 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |||
|
111 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |||
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |||
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |||
|
115 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |||
|
116 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |||
|
117 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |||
|
118 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |||
|
119 | </valuemap> | |||
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |||
|
121 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |||
|
122 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |||
|
124 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |||
|
125 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |||
|
126 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |||
|
127 | </valuemap> | |||
|
128 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |||
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |||
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
131 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |||
|
132 | </valuemap> | |||
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |||
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |||
|
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |||
|
136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |||
|
138 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |||
|
139 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |||
|
140 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |||
|
141 | </valuemap> | |||
|
142 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |||
|
143 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |||
|
144 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |||
|
146 | </valuemap> | |||
|
147 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |||
|
148 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |||
|
149 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |||
|
150 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> | |||
|
151 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |||
|
153 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | |||
|
154 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay</value> | |||
|
155 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |||
|
156 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |||
|
157 | </valuemap> | |||
|
158 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> | |||
|
159 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |||
|
160 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |||
|
161 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |||
|
162 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |||
|
163 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |||
|
165 | </valuemap> | |||
|
166 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |||
|
167 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |||
|
168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |||
|
170 | </valuemap> | |||
|
171 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |||
|
172 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |||
|
173 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |||
|
174 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |||
|
175 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |||
|
176 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |||
|
177 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |||
|
178 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |||
|
179 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |||
|
180 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |||
|
181 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |||
|
182 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |||
|
183 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |||
|
184 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |||
|
185 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |||
|
186 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |||
|
187 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |||
|
188 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |||
|
189 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |||
|
190 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |||
|
191 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |||
|
192 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |||
|
193 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |||
|
194 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |||
|
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |||
|
196 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |||
|
197 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |||
|
198 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |||
|
199 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |||
|
200 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |||
|
201 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |||
|
202 | <value type="int">0</value> | |||
|
203 | <value type="int">1</value> | |||
|
204 | <value type="int">2</value> | |||
|
205 | <value type="int">3</value> | |||
|
206 | <value type="int">4</value> | |||
|
207 | <value type="int">5</value> | |||
|
208 | <value type="int">6</value> | |||
|
209 | <value type="int">7</value> | |||
|
210 | <value type="int">8</value> | |||
|
211 | <value type="int">9</value> | |||
|
212 | <value type="int">10</value> | |||
|
213 | <value type="int">11</value> | |||
|
214 | <value type="int">12</value> | |||
|
215 | <value type="int">13</value> | |||
|
216 | <value type="int">14</value> | |||
|
217 | </valuelist> | |||
|
218 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |||
|
219 | <value type="int">0</value> | |||
|
220 | <value type="int">1</value> | |||
|
221 | <value type="int">2</value> | |||
|
222 | <value type="int">3</value> | |||
|
223 | <value type="int">4</value> | |||
|
224 | <value type="int">5</value> | |||
|
225 | <value type="int">6</value> | |||
|
226 | <value type="int">7</value> | |||
|
227 | <value type="int">8</value> | |||
|
228 | <value type="int">9</value> | |||
|
229 | <value type="int">10</value> | |||
|
230 | <value type="int">11</value> | |||
|
231 | <value type="int">12</value> | |||
|
232 | <value type="int">13</value> | |||
|
233 | <value type="int">14</value> | |||
|
234 | </valuelist> | |||
|
235 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> | |||
|
236 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> | |||
|
237 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value> | |||
|
238 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> | |||
|
239 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> | |||
|
240 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> | |||
|
241 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value> | |||
|
242 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
243 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> | |||
|
244 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |||
|
245 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |||
|
246 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |||
|
247 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |||
|
248 | </valuemap> | |||
|
249 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |||
|
250 | </valuemap> | |||
|
251 | </data> | |||
|
252 | <data> | |||
|
253 | <variable>ProjectExplorer.Project.TargetCount</variable> | |||
|
254 | <value type="int">1</value> | |||
|
255 | </data> | |||
|
256 | <data> | |||
|
257 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |||
|
258 | <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |||
|
259 | </data> | |||
|
260 | <data> | |||
|
261 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |||
|
262 | <value type="int">10</value> | |||
|
263 | </data> | |||
|
264 | </qtcreator> |
@@ -0,0 +1,52 | |||||
|
1 | #include "wfdisplay.h" | |||
|
2 | #include <QApplication> | |||
|
3 | ||||
|
4 | WFDisplay::WFDisplay(QWidget *parent) : | |||
|
5 | QWidget(parent) | |||
|
6 | { | |||
|
7 | waveforms_LAYOUT = new QVBoxLayout; | |||
|
8 | ||||
|
9 | spwTabWidget = new QTabWidget; | |||
|
10 | ||||
|
11 | page_f0 = new WFPage; | |||
|
12 | page_f1 = new WFPage; | |||
|
13 | page_f2 = new WFPage; | |||
|
14 | page_f3 = new WFPage; | |||
|
15 | ||||
|
16 | spwTabWidget->addTab(page_f0, tr("f0")); | |||
|
17 | spwTabWidget->addTab(page_f1, tr("f1")); | |||
|
18 | spwTabWidget->addTab(page_f2, tr("f2")); | |||
|
19 | spwTabWidget->addTab(page_f3, tr("f3")); | |||
|
20 | ||||
|
21 | waveforms_LAYOUT->addWidget(spwTabWidget); | |||
|
22 | ||||
|
23 | this->setLayout(waveforms_LAYOUT); | |||
|
24 | ||||
|
25 | } | |||
|
26 | ||||
|
27 | void WFDisplay::displayOnPlot(short *data, unsigned char num_page, unsigned char num) | |||
|
28 | { | |||
|
29 | QVector<double> x(XMAX), y(XMAX); | |||
|
30 | ||||
|
31 | for (int i=0; i<XMAX; ++i) | |||
|
32 | { | |||
|
33 | x[i] = i; | |||
|
34 | y[i] = (double) data[i]; | |||
|
35 | } | |||
|
36 | switch(num_page){ | |||
|
37 | case 0: | |||
|
38 | page_f0->displayOnPlot(data, num); | |||
|
39 | break; | |||
|
40 | case 1: | |||
|
41 | page_f1->displayOnPlot(data, num); | |||
|
42 | break; | |||
|
43 | case 2: | |||
|
44 | page_f2->displayOnPlot(data, num); | |||
|
45 | break; | |||
|
46 | case 3: | |||
|
47 | page_f3->displayOnPlot(data, num); | |||
|
48 | break; | |||
|
49 | } | |||
|
50 | ||||
|
51 | } | |||
|
52 |
@@ -0,0 +1,37 | |||||
|
1 | #ifndef WFDISPLAY_H | |||
|
2 | #define WFDISPLAY_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <lppmonplot.h> | |||
|
6 | #include <QGridLayout> | |||
|
7 | #include <QVBoxLayout> | |||
|
8 | #include <wfplot.h> | |||
|
9 | #include <wfpage.h> | |||
|
10 | #include <QTabWidget> | |||
|
11 | #include <params.h> | |||
|
12 | ||||
|
13 | class WFDisplay : public QWidget | |||
|
14 | { | |||
|
15 | Q_OBJECT | |||
|
16 | public: | |||
|
17 | explicit WFDisplay(QWidget *parent = 0); | |||
|
18 | ||||
|
19 | WFPage * page_f0; | |||
|
20 | WFPage * page_f1; | |||
|
21 | WFPage * page_f2; | |||
|
22 | WFPage * page_f3; | |||
|
23 | ||||
|
24 | QTabWidget *spwTabWidget; | |||
|
25 | ||||
|
26 | QVBoxLayout *waveforms_LAYOUT; | |||
|
27 | ||||
|
28 | void displayOnPlot(short *data, unsigned char num_page, unsigned char num); | |||
|
29 | ||||
|
30 | ||||
|
31 | signals: | |||
|
32 | ||||
|
33 | public slots: | |||
|
34 | ||||
|
35 | }; | |||
|
36 | ||||
|
37 | #endif // WFDISPLAY_H |
@@ -0,0 +1,12 | |||||
|
1 | #ifndef WFDISPLAY_GLOBAL_H | |||
|
2 | #define WFDISPLAY_GLOBAL_H | |||
|
3 | ||||
|
4 | #include <QtCore/qglobal.h> | |||
|
5 | ||||
|
6 | #if defined(WFDISPLAY_LIBRARY) | |||
|
7 | # define WFDISPLAYSHARED_EXPORT Q_DECL_EXPORT | |||
|
8 | #else | |||
|
9 | # define WFDISPLAYSHARED_EXPORT Q_DECL_IMPORT | |||
|
10 | #endif | |||
|
11 | ||||
|
12 | #endif // WFDISPLAY_GLOBAL_H |
@@ -0,0 +1,53 | |||||
|
1 | #include "wfpage.h" | |||
|
2 | ||||
|
3 | WFPage::WFPage(QWidget *parent) : | |||
|
4 | QWidget(parent) | |||
|
5 | { | |||
|
6 | wfPlot_v = new WFPlot(); | |||
|
7 | wfPlot_e1 = new WFPlot(); | |||
|
8 | wfPlot_e2 = new WFPlot(); | |||
|
9 | wfPlot_b1 = new WFPlot(); | |||
|
10 | wfPlot_b2 = new WFPlot(); | |||
|
11 | wfPlot_b3 = new WFPlot(); | |||
|
12 | // | |||
|
13 | wfPlot_v->customPlot->setTitle("v"); | |||
|
14 | wfPlot_e1->customPlot->setTitle("e1"); | |||
|
15 | wfPlot_e2->customPlot->setTitle("e2"); | |||
|
16 | wfPlot_b1->customPlot->setTitle("b1"); | |||
|
17 | wfPlot_b2->customPlot->setTitle("b2"); | |||
|
18 | wfPlot_b3->customPlot->setTitle("b3"); | |||
|
19 | // | |||
|
20 | mainLayout = new QGridLayout; | |||
|
21 | mainLayout->addWidget(wfPlot_v, 0, 0, 1, 1); | |||
|
22 | mainLayout->addWidget(wfPlot_e1, 0, 1, 1, 1); | |||
|
23 | mainLayout->addWidget(wfPlot_e2, 0, 2, 1, 1); | |||
|
24 | mainLayout->addWidget(wfPlot_b1, 1, 0, 1, 1); | |||
|
25 | mainLayout->addWidget(wfPlot_b2, 1, 1, 1, 1); | |||
|
26 | mainLayout->addWidget(wfPlot_b3, 1, 2, 1, 1); | |||
|
27 | // | |||
|
28 | this->setLayout(mainLayout); | |||
|
29 | } | |||
|
30 | ||||
|
31 | void WFPage::displayOnPlot(short *data, unsigned char num) | |||
|
32 | { | |||
|
33 | switch(num){ | |||
|
34 | case 0: | |||
|
35 | wfPlot_v->displayOnPlot(data, DEFAULT_SIZE); | |||
|
36 | break; | |||
|
37 | case 1: | |||
|
38 | wfPlot_e1->displayOnPlot(data, DEFAULT_SIZE); | |||
|
39 | break; | |||
|
40 | case 2: | |||
|
41 | wfPlot_e2->displayOnPlot(data, DEFAULT_SIZE); | |||
|
42 | break; | |||
|
43 | case 3: | |||
|
44 | wfPlot_b1->displayOnPlot(data, DEFAULT_SIZE); | |||
|
45 | break; | |||
|
46 | case 4: | |||
|
47 | wfPlot_b2->displayOnPlot(data, DEFAULT_SIZE); | |||
|
48 | break; | |||
|
49 | case 5: | |||
|
50 | wfPlot_b3->displayOnPlot(data, DEFAULT_SIZE); | |||
|
51 | break; | |||
|
52 | } | |||
|
53 | } |
@@ -0,0 +1,31 | |||||
|
1 | #ifndef WFPAGE_H | |||
|
2 | #define WFPAGE_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <wfplot.h> | |||
|
6 | #include <params.h> | |||
|
7 | ||||
|
8 | class WFPage : public QWidget | |||
|
9 | { | |||
|
10 | Q_OBJECT | |||
|
11 | public: | |||
|
12 | explicit WFPage(QWidget *parent = 0); | |||
|
13 | ||||
|
14 | WFPlot *wfPlot_v; | |||
|
15 | WFPlot *wfPlot_e1; | |||
|
16 | WFPlot *wfPlot_e2; | |||
|
17 | WFPlot *wfPlot_b1; | |||
|
18 | WFPlot *wfPlot_b2; | |||
|
19 | WFPlot *wfPlot_b3; | |||
|
20 | ||||
|
21 | QGridLayout *mainLayout; | |||
|
22 | ||||
|
23 | void displayOnPlot(short *data, unsigned char num); | |||
|
24 | ||||
|
25 | signals: | |||
|
26 | ||||
|
27 | public slots: | |||
|
28 | ||||
|
29 | }; | |||
|
30 | ||||
|
31 | #endif // WFPAGE_H |
@@ -0,0 +1,49 | |||||
|
1 | #include "wfplot.h" | |||
|
2 | #include <QFontInfo> | |||
|
3 | #include <params.h> | |||
|
4 | ||||
|
5 | WFPlot::WFPlot(QWidget *parent) : | |||
|
6 | QWidget(parent) | |||
|
7 | { | |||
|
8 | // Create Fonts | |||
|
9 | QFont font; | |||
|
10 | font = QFont(this->fontInfo().family(), FONT_SIZE_WAVEFORM_TITLE, QFont::Light); | |||
|
11 | customPlot = new LppMonPlot(); | |||
|
12 | mainLayout = new QVBoxLayout(); | |||
|
13 | ||||
|
14 | customPlot->setXaxisRange(0, XMAX); | |||
|
15 | customPlot->setYaxisRange(-YMAX, YMAX); | |||
|
16 | //customPlot->setTitleFont(font); | |||
|
17 | ||||
|
18 | customPlot->addGraph(); | |||
|
19 | ||||
|
20 | mainLayout->addWidget(customPlot); | |||
|
21 | ||||
|
22 | this->setLayout(mainLayout); | |||
|
23 | } | |||
|
24 | ||||
|
25 | ||||
|
26 | ||||
|
27 | void WFPlot::displayOnPlot(short *data, unsigned int size) | |||
|
28 | { | |||
|
29 | QList<QVariant> qListX; | |||
|
30 | QList<QVariant> qListY; | |||
|
31 | qListX.clear(); | |||
|
32 | qListY.clear(); | |||
|
33 | ||||
|
34 | for (unsigned int i=0; i<size; ++i) | |||
|
35 | { | |||
|
36 | qListX.append(i); | |||
|
37 | qListY.append( (double) data[i] ); | |||
|
38 | } | |||
|
39 | ||||
|
40 | customPlot->setGraphData(0, qListX, qListY); | |||
|
41 | customPlot->rescaleAxis(); | |||
|
42 | customPlot->setGraphName(0, "v"); | |||
|
43 | } | |||
|
44 | ||||
|
45 | ||||
|
46 | ||||
|
47 | ||||
|
48 | ||||
|
49 |
@@ -0,0 +1,25 | |||||
|
1 | #ifndef WFPLOT_H | |||
|
2 | #define WFPLOT_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <QVBoxLayout> | |||
|
6 | #include <lppmonplot.h> | |||
|
7 | ||||
|
8 | class WFPlot : public QWidget | |||
|
9 | { | |||
|
10 | Q_OBJECT | |||
|
11 | public: | |||
|
12 | explicit WFPlot(QWidget *parent = 0); | |||
|
13 | ||||
|
14 | void displayOnPlot(short *data, unsigned int size); | |||
|
15 | ||||
|
16 | LppMonPlot *customPlot; | |||
|
17 | QVBoxLayout *mainLayout; | |||
|
18 | ||||
|
19 | signals: | |||
|
20 | ||||
|
21 | public slots: | |||
|
22 | ||||
|
23 | }; | |||
|
24 | ||||
|
25 | #endif // WFPLOT_H |
@@ -461,10 +461,7 int gresb::receiveSPWPacketLoop(unsigned | |||||
461 | { |
|
461 | { | |
462 | result = receiveSPWPacket(requestID); |
|
462 | result = receiveSPWPacket(requestID); | |
463 | } |
|
463 | } | |
464 | if (!ccsdsPacketStore.isEmpty()) |
|
464 | ||
465 | { |
|
|||
466 | emit packetStoreNotEmpty(); |
|
|||
467 | } |
|
|||
468 | return result; |
|
465 | return result; | |
469 | } |
|
466 | } | |
470 |
|
467 | |||
@@ -533,10 +530,10 int gresb::receiveSPWPacket(unsigned cha | |||||
533 |
|
530 | |||
534 | unsigned int gresb::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) |
|
531 | unsigned int gresb::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) | |
535 | { |
|
532 | { | |
536 |
TMPacketToRead * |
|
533 | TMPacketToRead *generalPacket; | |
537 |
|
534 | |||
538 |
|
|
535 | generalPacket = new TMPacketToRead(ccsdsPacket, size); | |
539 | ccsdsPacketStore.append(packet); |
|
536 | emit sendPacket(generalPacket); | |
540 |
|
537 | |||
541 | return 1; |
|
538 | return 1; | |
542 | } |
|
539 | } |
@@ -27,15 +27,15 public: | |||||
27 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
27 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
28 |
|
28 | |||
29 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
29 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
30 | QList<TMPacketToRead*> ccsdsPacketStore; |
|
30 | ||
|
31 | gresbStatusEnquiry* spwLinkStatusEnquiry; | |||
31 |
|
32 | |||
32 | signals: |
|
33 | signals: | |
33 | void sendMessage(QString message); |
|
34 | void sendMessage(QString message); | |
|
35 | void sendPacket(TMPacketToRead*); | |||
34 | void isOpen(bool); |
|
36 | void isOpen(bool); | |
35 | void RMAP_write_reply_setText(QString); |
|
37 | void RMAP_write_reply_setText(QString); | |
36 | void appendToLog(QString); |
|
38 | void appendToLog(QString); | |
37 | void ccsdsPacketAvailable(unsigned char*, unsigned int); |
|
|||
38 | void packetStoreNotEmpty(); |
|
|||
39 |
|
39 | |||
40 | public slots: |
|
40 | public slots: | |
41 | void Open(); |
|
41 | void Open(); | |
@@ -95,8 +95,6 private: | |||||
95 | QTcpSocket *RMAPReceive_SOCKET; |
|
95 | QTcpSocket *RMAPReceive_SOCKET; | |
96 | QTcpSocket *GRESBStatusQuery_SOCKET; |
|
96 | QTcpSocket *GRESBStatusQuery_SOCKET; | |
97 |
|
97 | |||
98 | gresbStatusEnquiry* spwLinkStatusEnquiry; |
|
|||
99 |
|
||||
100 | // Packet receiver |
|
98 | // Packet receiver | |
101 | QSemaphore *rmapPacketSEMAPHORE; |
|
99 | QSemaphore *rmapPacketSEMAPHORE; | |
102 | QSemaphore *ccsdsPacketSEMAPHORE; |
|
100 | QSemaphore *ccsdsPacketSEMAPHORE; |
@@ -37,10 +37,10 RMAP::RMAP(RMAP_command_codes commandCod | |||||
37 | default: |
|
37 | default: | |
38 | break; |
|
38 | break; | |
39 | } |
|
39 | } | |
40 |
RMAPHeader.targetLogicalAddress = targetLogicalAddress |
|
40 | RMAPHeader.targetLogicalAddress = targetLogicalAddress; | |
41 | RMAPHeader.protocolIdentifier = 0x01; // 0x01 is the protocole identifier for RMAP |
|
41 | RMAPHeader.protocolIdentifier = 0x01; // 0x01 is the protocole identifier for RMAP | |
42 | RMAPHeader.instruction = (packetType<<6) + (command<<2) + (replyAddressLength); |
|
42 | RMAPHeader.instruction = (packetType<<6) + (command<<2) + (replyAddressLength); | |
43 |
RMAPHeader.key = |
|
43 | RMAPHeader.key = DEFAULT_DESTINATION_KEY; // used for command authorization | |
44 | RMAPHeader.initiatorLogicalAddress = initiatorLogicalAddress; // 0 is the default address for the GRESB module |
|
44 | RMAPHeader.initiatorLogicalAddress = initiatorLogicalAddress; // 0 is the default address for the GRESB module | |
45 | RMAPHeader.transactionIdentifier1 = 0x00; |
|
45 | RMAPHeader.transactionIdentifier1 = 0x00; | |
46 | RMAPHeader.transactionIdentifier0 = 0x01; |
|
46 | RMAPHeader.transactionIdentifier0 = 0x01; |
@@ -2,6 +2,7 | |||||
2 | #define RMAPOPERATIONS_H |
|
2 | #define RMAPOPERATIONS_H | |
3 |
|
3 | |||
4 | #include "qhexspinbox.h" |
|
4 | #include "qhexspinbox.h" | |
|
5 | #include <params.h> | |||
5 |
|
6 | |||
6 | #define READ_WRITE_MAX_COUNTS 4096 // in words |
|
7 | #define READ_WRITE_MAX_COUNTS 4096 // in words | |
7 | #define RMAP_MAX_DATA_LENGTH 4*READ_WRITE_MAX_COUNTS // in bytes, shall be lower than the limit size of SPW packet of the GRESB bridge |
|
8 | #define RMAP_MAX_DATA_LENGTH 4*READ_WRITE_MAX_COUNTS // in bytes, shall be lower than the limit size of SPW packet of the GRESB bridge | |
@@ -10,9 +11,6 | |||||
10 | #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS |
|
11 | #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS | |
11 | #define RMAP_MAX_PACKET_LENGTH RMAP_READ_REPLY_HEADER_LENGTH + RMAP_MAX_DATA_LENGTH + RMAP_DATA_CRC_LENGTH |
|
12 | #define RMAP_MAX_PACKET_LENGTH RMAP_READ_REPLY_HEADER_LENGTH + RMAP_MAX_DATA_LENGTH + RMAP_DATA_CRC_LENGTH | |
12 |
|
13 | |||
13 | #define DEFAULT_SOURCE 0 |
|
|||
14 | #define DEFAULT_TARGET 254 |
|
|||
15 |
|
||||
16 | static const unsigned char RMAP_CRCTable[] = { |
|
14 | static const unsigned char RMAP_CRCTable[] = { | |
17 | 0x00, 0x91, 0xe3, 0x72, 0x07, 0x96, 0xe4, 0x75, |
|
15 | 0x00, 0x91, 0xe3, 0x72, 0x07, 0x96, 0xe4, 0x75, | |
18 | 0x0e, 0x9f, 0xed, 0x7c, 0x09, 0x98, 0xea, 0x7b, |
|
16 | 0x0e, 0x9f, 0xed, 0x7c, 0x09, 0x98, 0xea, 0x7b, |
@@ -59,6 +59,9 rmapplugin::rmapplugin(QWidget *parent) | |||||
59 | //** |
|
59 | //** | |
60 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(fetchPacketSig()), |
|
60 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(fetchPacketSig()), | |
61 | this, SLOT(fetchPacket()), Qt::DirectConnection ); |
|
61 | this, SLOT(fetchPacket()), Qt::DirectConnection ); | |
|
62 | //*** | |||
|
63 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(nbPacketHasChanged(int)), | |||
|
64 | this, SLOT(nbPacketHasChanged(int))); | |||
62 | //************** |
|
65 | //************** | |
63 |
|
66 | |||
64 | //************** |
|
67 | //************** | |
@@ -74,50 +77,44 rmapplugin::rmapplugin(QWidget *parent) | |||||
74 |
|
77 | |||
75 | connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(openBridge())); |
|
78 | connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(openBridge())); | |
76 | connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(closeBridge())); |
|
79 | connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(closeBridge())); | |
77 |
|
80 | connect(this, SIGNAL( | ||
78 | // CCSDS |
|
81 | updateStatistics(unsigned char,unsigned char,unsigned char,unsigned char,uint,uint,uint,uint) | |
79 | connect(this->UI->sendCCSDSCommandButton, SIGNAL(clicked()), this, SLOT(sendCCSDS())); |
|
82 | ), | |
80 | connect(this->UI->send_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(send_TC_LFR_UPDATE_TIME())); |
|
83 | this->UI->tmStatistics, SLOT( | |
81 | connect(this->UI->reset_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(reset_TC_LFR_UPDATE_TIME())); |
|
84 | updateStatistics(unsigned char,unsigned char,unsigned char,unsigned char,uint,uint,uint,uint) | |
|
85 | )); | |||
82 |
|
86 | |||
83 | // spectralMAtricesDMASimulator |
|
87 | //****** | |
84 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginRead(uint*,uint,uint)), this, SLOT(Read(uint*,uint,uint))); |
|
|||
85 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginWrite(uint*,uint,uint)), this, SLOT(Write(uint*,uint,uint))); |
|
|||
86 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
|||
87 |
|
||||
88 | // GRESB |
|
88 | // GRESB | |
89 | connect(this->UI->gresbBridge, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
89 | connect(this->UI->gresbBridge, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); | |
90 | connect(this->UI->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); |
|
90 | connect(this->UI->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); | |
91 | connect(this->UI->gresbBridge, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); |
|
91 | connect(this->UI->gresbBridge, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); | |
92 | connect(this->UI->gresbBridge, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); |
|
92 | connect(this->UI->gresbBridge, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); | |
93 | connect(this->UI->gresbBridge, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), |
|
|||
94 | this, SLOT(processCCSDSPacket(unsigned char*,uint))); |
|
|||
95 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->gresbBridge, SLOT(ccsdsPacketIsProcessed())); |
|
93 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->gresbBridge, SLOT(ccsdsPacketIsProcessed())); | |
96 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
94 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
97 | this->UI->gresbBridge, SLOT(targetHasChanged(int))); |
|
95 | this->UI->gresbBridge, SLOT(targetHasChanged(int))); | |
98 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
96 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
99 | this->UI->gresbBridge, SLOT(sourceHasChanged(int))); |
|
97 | this->UI->gresbBridge, SLOT(sourceHasChanged(int))); | |
100 |
connect(this->UI->gresbBridge, SIGNAL( |
|
98 | connect(this->UI->gresbBridge, SIGNAL(sendPacket(TMPacketToRead*)), | |
101 | this, SLOT(processPacketStore())); |
|
99 | this, SLOT(receivePacketFromBridge(TMPacketToRead*)), Qt::DirectConnection); | |
102 |
|
100 | |||
|
101 | //************ | |||
103 | // Star Dundee |
|
102 | // Star Dundee | |
104 | connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
103 | connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); | |
105 | connect(this->UI->starDundee, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); |
|
104 | connect(this->UI->starDundee, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); | |
106 | connect(this->UI->starDundee, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); |
|
105 | connect(this->UI->starDundee, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); | |
107 | connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); |
|
106 | connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); | |
108 | connect(this->UI->starDundee, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), |
|
|||
109 | this, SLOT(processCCSDSPacket(unsigned char*,uint))); |
|
|||
110 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->starDundee, SLOT(ccsdsPacketIsProcessed())); |
|
107 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->starDundee, SLOT(ccsdsPacketIsProcessed())); | |
111 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
108 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
112 | this->UI->starDundee, SLOT(targetHasChanged(int))); |
|
109 | this->UI->starDundee, SLOT(targetHasChanged(int))); | |
113 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
110 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
114 | this->UI->starDundee, SLOT(sourceHasChanged(int))); |
|
111 | this->UI->starDundee, SLOT(sourceHasChanged(int))); | |
115 |
connect(this->UI->starDundee, SIGNAL( |
|
112 | connect(this->UI->starDundee, SIGNAL(sendPacket(TMPacketToRead*)), | |
116 | this, SLOT(processPacketStore())); |
|
113 | this, SLOT(receivePacketFromBridge(TMPacketToRead*)), Qt::DirectConnection); | |
117 |
|
114 | |||
118 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); |
|
115 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); | |
119 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(updatePacketStore(selectedBridge))); |
|
|||
120 |
|
116 | |||
|
117 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->generalCCSDSPacketStore); | |||
121 | } |
|
118 | } | |
122 |
|
119 | |||
123 | rmapplugin::~rmapplugin() |
|
120 | rmapplugin::~rmapplugin() | |
@@ -193,51 +190,6 unsigned int rmapplugin::WriteSPW(char * | |||||
193 | return result; |
|
190 | return result; | |
194 | } |
|
191 | } | |
195 |
|
192 | |||
196 | void rmapplugin::sendCCSDS() // SLOT |
|
|||
197 | { |
|
|||
198 | unsigned int nbBYTES_application_data = 8; |
|
|||
199 | unsigned int count; |
|
|||
200 | char *tab; |
|
|||
201 | unsigned char packetErrorControl1 = 0xaa; |
|
|||
202 | unsigned char packetErrorControl0 = 0xbb; |
|
|||
203 |
|
||||
204 | ccsds_command = new ccsds(1, 0, 0, nbBYTES_application_data+12, 0, 0, 0, 0, 0); // +12 => packet header 6 bytes + data field header 4 bytes + packet error control 2 bytes |
|
|||
205 | /* unsigned char data_field_header, |
|
|||
206 | unsigned char processID, |
|
|||
207 | unsigned int sequence_count, |
|
|||
208 | unsigned int packet_length, |
|
|||
209 | unsigned char acceptance, |
|
|||
210 | unsigned int completion, |
|
|||
211 | unsigned char service_type, |
|
|||
212 | unsigned char service_subtype, |
|
|||
213 | unsigned char sourceID*/ |
|
|||
214 |
|
||||
215 | count = nbBYTES_application_data+12; // 12 is the size in bytes of the header |
|
|||
216 | tab = (char*) malloc(count); |
|
|||
217 | tab[0] = ccsds_command->ccsds_header->packetId1; |
|
|||
218 | tab[1] = ccsds_command->ccsds_header->packetId0; |
|
|||
219 | tab[2] = ccsds_command->ccsds_header->packetSequenceControl1; |
|
|||
220 | tab[3] = ccsds_command->ccsds_header->packetSequenceControl0; |
|
|||
221 | tab[4] = ccsds_command->ccsds_header->packetLength1; |
|
|||
222 | tab[5] = ccsds_command->ccsds_header->packetLength0; |
|
|||
223 | tab[6] = ccsds_command->ccsds_header->dataFieldHeader3; |
|
|||
224 | tab[7] = ccsds_command->ccsds_header->dataFieldHeader2; |
|
|||
225 | tab[8] = ccsds_command->ccsds_header->dataFieldHeader1; |
|
|||
226 | tab[9] = ccsds_command->ccsds_header->dataFieldHeader0; |
|
|||
227 | tab[10]=0x00; |
|
|||
228 | tab[11]=0x00; |
|
|||
229 | tab[12]=0x00; |
|
|||
230 | tab[13]=0x00; |
|
|||
231 | tab[14]=0x00; |
|
|||
232 | tab[15]=0x00; |
|
|||
233 | tab[nbBYTES_application_data+10] = packetErrorControl1; |
|
|||
234 | tab[nbBYTES_application_data+11] = packetErrorControl0; |
|
|||
235 |
|
||||
236 | WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00); |
|
|||
237 |
|
||||
238 | free(tab); |
|
|||
239 | } |
|
|||
240 |
|
||||
241 | void rmapplugin::openBridge() |
|
193 | void rmapplugin::openBridge() | |
242 | { |
|
194 | { | |
243 | switch(currentBridge) |
|
195 | switch(currentBridge) | |
@@ -268,59 +220,6 void rmapplugin::closeBridge() | |||||
268 | } |
|
220 | } | |
269 | } |
|
221 | } | |
270 |
|
222 | |||
271 | void rmapplugin::send_TC_LFR_UPDATE_TIME() |
|
|||
272 | { |
|
|||
273 | unsigned int nbBYTES_application_data = 6; // Time at CUC format is on 48 bits / 6 bytes |
|
|||
274 | unsigned int count; |
|
|||
275 | char *tab; |
|
|||
276 | unsigned char packetErrorControl1 = 0xaa; |
|
|||
277 | unsigned char packetErrorControl0 = 0xbb; |
|
|||
278 |
|
||||
279 | ccsds_command = new ccsds(1, 11, 0, nbBYTES_application_data, 1, 1, 9, 129, 0); |
|
|||
280 | /* unsigned char data_field_header, |
|
|||
281 | unsigned char processID, |
|
|||
282 | unsigned int sequence_count, |
|
|||
283 | unsigned int packet_length, |
|
|||
284 | unsigned char acceptance, |
|
|||
285 | unsigned int completion, |
|
|||
286 | unsigned char service_type, |
|
|||
287 | unsigned char service_subtype, |
|
|||
288 | unsigned char sourceID*/ |
|
|||
289 |
|
||||
290 | count = nbBYTES_application_data+12; // +12 => packet header 6 bytes + data field header 4 bytes + packet error control 2 bytes |
|
|||
291 | tab = (char*) malloc(count); |
|
|||
292 | tab[0] = ccsds_command->ccsds_header->packetId1; |
|
|||
293 | tab[1] = ccsds_command->ccsds_header->packetId0; |
|
|||
294 | tab[2] = ccsds_command->ccsds_header->packetSequenceControl1; |
|
|||
295 | tab[3] = ccsds_command->ccsds_header->packetSequenceControl0; |
|
|||
296 | tab[4] = ccsds_command->ccsds_header->packetLength1; |
|
|||
297 | tab[5] = ccsds_command->ccsds_header->packetLength0; |
|
|||
298 | tab[6] = ccsds_command->ccsds_header->dataFieldHeader3; |
|
|||
299 | tab[7] = ccsds_command->ccsds_header->dataFieldHeader2; |
|
|||
300 | tab[8] = ccsds_command->ccsds_header->dataFieldHeader1; |
|
|||
301 | tab[9] = ccsds_command->ccsds_header->dataFieldHeader0; |
|
|||
302 | tab[10] = (unsigned char) (time_COARSE>>24); |
|
|||
303 | tab[11] = (unsigned char) (time_COARSE>>18); |
|
|||
304 | tab[12] = (unsigned char) (time_COARSE>>8); |
|
|||
305 | tab[13] = (unsigned char) (time_COARSE); |
|
|||
306 | tab[14] = (unsigned char) (time_FINE>>8); |
|
|||
307 | tab[15] = (unsigned char) (time_FINE); |
|
|||
308 | tab[nbBYTES_application_data+10] = packetErrorControl1; |
|
|||
309 | tab[nbBYTES_application_data+11] = packetErrorControl0; |
|
|||
310 |
|
||||
311 | WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00); |
|
|||
312 |
|
||||
313 | time_COARSE = time_COARSE+1; |
|
|||
314 |
|
||||
315 | free(tab); |
|
|||
316 | } |
|
|||
317 |
|
||||
318 | void rmapplugin::reset_TC_LFR_UPDATE_TIME() |
|
|||
319 | { |
|
|||
320 | time_COARSE = 0; |
|
|||
321 | time_FINE = 0; |
|
|||
322 | } |
|
|||
323 |
|
||||
324 | void rmapplugin::RMAP_write_reply_setText(QString text) |
|
223 | void rmapplugin::RMAP_write_reply_setText(QString text) | |
325 | { |
|
224 | { | |
326 | this->UI->RMAP_write_reply->setText(text); |
|
225 | this->UI->RMAP_write_reply->setText(text); | |
@@ -341,6 +240,112 void rmapplugin::setValueSourceAddress(u | |||||
341 | this->UI->rmapSourceLogicalAddressSpinBox->setValue(newAddress); |
|
240 | this->UI->rmapSourceLogicalAddressSpinBox->setValue(newAddress); | |
342 | } |
|
241 | } | |
343 |
|
242 | |||
|
243 | void rmapplugin::receivePacketFromBridge(TMPacketToRead *packet) | |||
|
244 | { | |||
|
245 | preProcessPacket(packet); | |||
|
246 | ||||
|
247 | // Send the packet to the TM echo bridge for processing | |||
|
248 | this->UI->tmEchoBridge->sendTMPacket_v2(packet); | |||
|
249 | //this->UI->tmEchoBridge->sendTMPacket_alternative(packet); | |||
|
250 | ||||
|
251 | this->generalCCSDSPacketStore.append(packet); | |||
|
252 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(generalCCSDSPacketStore.size())); | |||
|
253 | processPacketStore(); | |||
|
254 | } | |||
|
255 | ||||
|
256 | void rmapplugin::preProcessPacket(TMPacketToRead *packet) | |||
|
257 | { | |||
|
258 | unsigned char pid = 0; | |||
|
259 | unsigned char cat = 0; | |||
|
260 | unsigned char typ = 0; | |||
|
261 | unsigned char sub = 0; | |||
|
262 | unsigned int sid = 0; | |||
|
263 | unsigned int length = 0; | |||
|
264 | unsigned int coarse_t = 0; | |||
|
265 | unsigned int fine_t = 0; | |||
|
266 | ||||
|
267 | //********************************* | |||
|
268 | // get the parameters of the packet | |||
|
269 | pid = ((packet->Value[4] & 0x07) << 4) + ((packet->Value[5] & 0xf0) >> 4); | |||
|
270 | cat = packet->Value[5] & 0x0f; | |||
|
271 | typ = packet->Value[11]; // TYPE | |||
|
272 | sub = packet->Value[12]; // SUBTYPE | |||
|
273 | sid = 0; | |||
|
274 | length = packet->Value[8] * 256 + packet->Value[9]; | |||
|
275 | coarse_t = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16) | |||
|
276 | + packet->Value[16] * pow(2, 8) + packet->Value[17]; | |||
|
277 | fine_t = packet->Value[18] * pow(2, 8) + packet->Value[19]; | |||
|
278 | ||||
|
279 | if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8)) | |||
|
280 | sid = packet->Value[20] * 256 + packet->Value[21]; | |||
|
281 | else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25)) | |||
|
282 | sid = 1; | |||
|
283 | else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3)) | |||
|
284 | sid = packet->Value[20]; | |||
|
285 | else if ((pid == 79) & (cat == 12) & (typ == 21) & (sub == 3)) | |||
|
286 | sid = packet->Value[20]; | |||
|
287 | ||||
|
288 | emit updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t); | |||
|
289 | ||||
|
290 | ||||
|
291 | //**************************************** | |||
|
292 | // if the packet is a waveform, display it | |||
|
293 | /*if ( (typ == 21) & (sub == 3) ) | |||
|
294 | { | |||
|
295 | sid = packet->Value[20]; // SID | |||
|
296 | switch (sid){ | |||
|
297 | case SID_NORMAL_SWF_F0: | |||
|
298 | buildWFAndDisplay(packet, &wfPacketNormal[0], 0); | |||
|
299 | break; | |||
|
300 | case SID_NORMAL_SWF_F1: | |||
|
301 | buildWFAndDisplay(packet, &wfPacketNormal[1], 1); | |||
|
302 | break; | |||
|
303 | case SID_NORMAL_SWF_F2: | |||
|
304 | buildWFAndDisplay(packet, &wfPacketNormal[2], 2); | |||
|
305 | break; | |||
|
306 | case SID_NORMAL_CWF_F3: | |||
|
307 | buildWFAndDisplay(packet, &wfPacketNormal[3], 3); | |||
|
308 | break; | |||
|
309 | } | |||
|
310 | }*/ | |||
|
311 | } | |||
|
312 | ||||
|
313 | void rmapplugin::nbPacketHasChanged(int nb) | |||
|
314 | { | |||
|
315 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(nb)); | |||
|
316 | } | |||
|
317 | ||||
|
318 | void rmapplugin::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) | |||
|
319 | { | |||
|
320 | unsigned int i = 0; | |||
|
321 | unsigned int j = 0; | |||
|
322 | unsigned char *data; | |||
|
323 | unsigned char pkt_nr = 0; | |||
|
324 | unsigned int blk_nr = 0; | |||
|
325 | ||||
|
326 | pkt_nr = packet->Value[23]; // PKT_NR | |||
|
327 | blk_nr = packet->Value[24] * 256 + packet->Value[25]; | |||
|
328 | data = &packet->Value[26]; // start of the first data block; | |||
|
329 | j = (pkt_nr-1) * 340; | |||
|
330 | for ( i=0; i<blk_nr; i++ ){ | |||
|
331 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |||
|
332 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |||
|
333 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |||
|
334 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |||
|
335 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |||
|
336 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |||
|
337 | } | |||
|
338 | if (pkt_nr == 7) | |||
|
339 | { | |||
|
340 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); | |||
|
341 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); | |||
|
342 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); | |||
|
343 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); | |||
|
344 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); | |||
|
345 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5); | |||
|
346 | } | |||
|
347 | } | |||
|
348 | ||||
344 | ///////////////////// |
|
349 | ///////////////////// | |
345 | // INTERNAL FUNCTIONS |
|
350 | // INTERNAL FUNCTIONS | |
346 |
|
351 | |||
@@ -382,21 +387,6 void rmapplugin::processPacketStore() | |||||
382 | ((rmappluginPythonWrapper*)this->pyObject)->processPacketStore(); |
|
387 | ((rmappluginPythonWrapper*)this->pyObject)->processPacketStore(); | |
383 | } |
|
388 | } | |
384 |
|
389 | |||
385 | void rmapplugin::updatePacketStore(selectedBridge bridge) |
|
|||
386 | { |
|
|||
387 | switch(bridge) |
|
|||
388 | { |
|
|||
389 | case selectedBridgeIsGRESB : |
|
|||
390 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->UI->gresbBridge->ccsdsPacketStore); |
|
|||
391 | break; |
|
|||
392 | case selectedBridgeIsStarDundee : |
|
|||
393 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->UI->starDundee->ccsdsPacketStore); |
|
|||
394 | break; |
|
|||
395 | default: |
|
|||
396 | break; |
|
|||
397 | } |
|
|||
398 | } |
|
|||
399 |
|
||||
400 | int rmapplugin::fetchPacket() |
|
390 | int rmapplugin::fetchPacket() | |
401 | { |
|
391 | { | |
402 | int ret = 0; |
|
392 | int ret = 0; |
@@ -31,9 +31,12 | |||||
31 | #include <QTime> |
|
31 | #include <QTime> | |
32 | #include <ccsds.h> |
|
32 | #include <ccsds.h> | |
33 | #include <QSemaphore> |
|
33 | #include <QSemaphore> | |
|
34 | #include <wfpacket.h> | |||
34 |
|
35 | |||
35 | #include <lppmonplugin.h> |
|
36 | #include <lppmonplugin.h> | |
36 |
|
37 | |||
|
38 | #include "tmpackettoread.h" | |||
|
39 | ||||
37 | #define APPENDTOLOG(message) this->UI->appendToLogFile(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": " + message) |
|
40 | #define APPENDTOLOG(message) this->UI->appendToLogFile(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": " + message) | |
38 |
|
41 | |||
39 | #define READ_WRITE_MAX_COUNTS 4096 // in words |
|
42 | #define READ_WRITE_MAX_COUNTS 4096 // in words | |
@@ -49,6 +52,10 class rmapplugin : public lppmonplugin | |||||
49 | public: |
|
52 | public: | |
50 | explicit rmapplugin(QWidget *parent = 0); |
|
53 | explicit rmapplugin(QWidget *parent = 0); | |
51 | ~rmapplugin(); |
|
54 | ~rmapplugin(); | |
|
55 | QList<TMPacketToRead*> generalCCSDSPacketStore; | |||
|
56 | void preProcessPacket(TMPacketToRead *packet); | |||
|
57 | WFPacket wfPacketNormal[4]; | |||
|
58 | void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); | |||
52 |
|
59 | |||
53 | public slots: |
|
60 | public slots: | |
54 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
61 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); | |
@@ -61,11 +68,10 public slots: | |||||
61 | void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
68 | void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
62 | void processPacketStore(); |
|
69 | void processPacketStore(); | |
63 | void updatePacketStore(selectedBridge bridge); |
|
70 | void updatePacketStore(selectedBridge bridge); | |
|
71 | void nbPacketHasChanged(int nb); | |||
64 | int fetchPacket(); |
|
72 | int fetchPacket(); | |
|
73 | void receivePacketFromBridge(TMPacketToRead* packet); | |||
65 | // |
|
74 | // | |
66 | void sendCCSDS(); |
|
|||
67 | void send_TC_LFR_UPDATE_TIME(); |
|
|||
68 | void reset_TC_LFR_UPDATE_TIME(); |
|
|||
69 | void displayOnConsole(QString message) {this->UI->console->append(message);} |
|
75 | void displayOnConsole(QString message) {this->UI->console->append(message);} | |
70 | // |
|
76 | // | |
71 | void RMAP_write_reply_setText(QString text); |
|
77 | void RMAP_write_reply_setText(QString text); | |
@@ -76,6 +82,10 public slots: | |||||
76 |
|
82 | |||
77 | signals: |
|
83 | signals: | |
78 | void ccsdsPacketIsProcessed(); |
|
84 | void ccsdsPacketIsProcessed(); | |
|
85 | void updateStatistics(unsigned char pid, unsigned char cat, | |||
|
86 | unsigned char typ, unsigned char sub, | |||
|
87 | unsigned int sid, unsigned int length, | |||
|
88 | unsigned int coarse_t, unsigned int fine_t); | |||
79 |
|
89 | |||
80 | private: |
|
90 | private: | |
81 | selectedBridge currentBridge; |
|
91 | selectedBridge currentBridge; |
@@ -37,14 +37,20 HEADERS += \ | |||||
37 | ccsds.h \ |
|
37 | ccsds.h \ | |
38 | ../common_PLE/qipdialogbox.h \ |
|
38 | ../common_PLE/qipdialogbox.h \ | |
39 | ../common_PLE/gresbstatusenquiry.h \ |
|
39 | ../common_PLE/gresbstatusenquiry.h \ | |
40 | spectralmatricesdmasimulator.h \ |
|
|||
41 | rmappluginpythonwrapper.h \ |
|
40 | rmappluginpythonwrapper.h \ | |
42 | stardundee.h \ |
|
41 | stardundee.h \ | |
43 | ../spw_usb_driver_v2.61/inc/spw_usb_api.h \ |
|
42 | ../spw_usb_driver_v2.61/inc/spw_usb_api.h \ | |
44 | ../spw_usb_driver_v2.61/inc/spw_config_library.h \ |
|
43 | ../spw_usb_driver_v2.61/inc/spw_config_library.h \ | |
45 | gresb.h \ |
|
44 | gresb.h \ | |
46 | tcpackettosend.h \ |
|
45 | tcpackettosend.h \ | |
47 | tmpackettoread.h |
|
46 | tmpackettoread.h \ | |
|
47 | wfdisplay.h \ | |||
|
48 | tmstatistics.h \ | |||
|
49 | wfplot.h \ | |||
|
50 | wfpage.h \ | |||
|
51 | wfpacket.h \ | |||
|
52 | params.h \ | |||
|
53 | tmechobridge.h | |||
48 |
|
54 | |||
49 |
|
55 | |||
50 | SOURCES += \ |
|
56 | SOURCES += \ | |
@@ -54,12 +60,17 SOURCES += \ | |||||
54 | ccsds.cpp \ |
|
60 | ccsds.cpp \ | |
55 | ../common_PLE/qipdialogbox.cpp \ |
|
61 | ../common_PLE/qipdialogbox.cpp \ | |
56 | ../common_PLE/gresbstatusenquiry.cpp \ |
|
62 | ../common_PLE/gresbstatusenquiry.cpp \ | |
57 | spectralmatricesdmasimulator.cpp \ |
|
|||
58 | rmappluginpythonwrapper.cpp \ |
|
63 | rmappluginpythonwrapper.cpp \ | |
59 | stardundee.cpp \ |
|
64 | stardundee.cpp \ | |
60 | gresb.cpp \ |
|
65 | gresb.cpp \ | |
61 | tcpackettosend.cpp \ |
|
66 | tcpackettosend.cpp \ | |
62 | tmpackettoread.cpp |
|
67 | tmpackettoread.cpp \ | |
|
68 | wfdisplay.cpp \ | |||
|
69 | tmstatistics.cpp \ | |||
|
70 | wfplot.cpp \ | |||
|
71 | wfpage.cpp \ | |||
|
72 | wfpacket.cpp \ | |||
|
73 | tmechobridge.cpp | |||
63 |
|
74 | |||
64 |
|
75 | |||
65 |
|
76 |
@@ -25,7 +25,7 QList<QVariant> rmappluginPythonWrapper: | |||||
25 | } |
|
25 | } | |
26 | delete(ccsdsPacket); |
|
26 | delete(ccsdsPacket); | |
27 | } |
|
27 | } | |
28 |
|
28 | emit nbPacketHasChanged(ccsdsPacketStore->size()); | ||
29 | return result; |
|
29 | return result; | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
@@ -120,28 +120,9 void rmappluginPythonWrapper::sendTC() | |||||
120 | } |
|
120 | } | |
121 | } |
|
121 | } | |
122 |
|
122 | |||
123 | /*unsigned int rmappluginPythonWrapper::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) |
|
|||
124 | { |
|
|||
125 | unsigned int i; |
|
|||
126 | TMPacketToRead ccsdsPacketToStore; |
|
|||
127 |
|
||||
128 | ccsdsPacketToStore.size = size; |
|
|||
129 | for(i=0; i<size; i++) |
|
|||
130 | { |
|
|||
131 | //ccsdsPacket0[i] = ccsdsPacket[i]; |
|
|||
132 | ccsdsPacketToStore.data[i] = ccsdsPacket[i]; |
|
|||
133 | } |
|
|||
134 | ccsdsPacketStore->append(ccsdsPacketToStore); |
|
|||
135 | emit ccsdsPacketIsAvailable(size); |
|
|||
136 | return 1; |
|
|||
137 | }*/ |
|
|||
138 |
|
||||
139 | void rmappluginPythonWrapper::processPacketStore() |
|
123 | void rmappluginPythonWrapper::processPacketStore() | |
140 | { |
|
124 | { | |
141 | while (!ccsdsPacketStore->isEmpty()) |
|
125 | emit ccsdsPacketIsAvailable(ccsdsPacketStore->at(0)->size); | |
142 | { |
|
|||
143 | emit ccsdsPacketIsAvailable(ccsdsPacketStore->at(0)->size); |
|
|||
144 | } |
|
|||
145 | } |
|
126 | } | |
146 |
|
127 | |||
147 | void rmappluginPythonWrapper::setTargetAddressValue(unsigned int address) |
|
128 | void rmappluginPythonWrapper::setTargetAddressValue(unsigned int address) |
@@ -34,6 +34,7 signals: | |||||
34 | void processPacketStoreNowSig(); |
|
34 | void processPacketStoreNowSig(); | |
35 | void sendMessage(QString message); |
|
35 | void sendMessage(QString message); | |
36 | int fetchPacketSig(); |
|
36 | int fetchPacketSig(); | |
|
37 | void nbPacketHasChanged(int nb); | |||
37 |
|
38 | |||
38 | public slots: |
|
39 | public slots: | |
39 | QList<QVariant> ReadSPW(unsigned int size=0); |
|
40 | QList<QVariant> ReadSPW(unsigned int size=0); |
@@ -24,19 +24,21 | |||||
24 | rmapPluginUI::rmapPluginUI(QWidget *parent) : |
|
24 | rmapPluginUI::rmapPluginUI(QWidget *parent) : | |
25 | QWidget(parent) |
|
25 | QWidget(parent) | |
26 | { |
|
26 | { | |
27 | spectralMatricesDMASimulator = new SpectralMatricesDMASimulator; |
|
|||
28 | spwTabWidget = new QTabWidget; |
|
27 | spwTabWidget = new QTabWidget; | |
|
28 | // | |||
29 | QWidget* spwTabWidgetPage0 = new QWidget; |
|
29 | QWidget* spwTabWidgetPage0 = new QWidget; | |
30 | QWidget* spwTabWidgetPage1 = new QWidget; |
|
|||
31 | QWidget* spwTabWidgetPage2 = new QWidget; |
|
30 | QWidget* spwTabWidgetPage2 = new QWidget; | |
32 | QWidget* spwTabWidgetPage3 = new QWidget; |
|
31 | QWidget* spwTabWidgetPage3 = new QWidget; | |
33 | QWidget* spwTabWidgetPage4 = new QWidget; |
|
32 | QWidget* spwTabWidgetPage4 = new QWidget; | |
|
33 | QWidget* spwTabWidgetPage5 = new QWidget; | |||
|
34 | QWidget* spwTabWidgetPage6 = new QWidget; | |||
|
35 | // | |||
34 | bridgeWidget = new QWidget; |
|
36 | bridgeWidget = new QWidget; | |
35 | mainLayout = new QVBoxLayout; |
|
37 | mainLayout = new QVBoxLayout; | |
36 | connectionLayout = new QGridLayout; |
|
|||
37 | ccsdsLayout = new QVBoxLayout; |
|
38 | ccsdsLayout = new QVBoxLayout; | |
38 | consoleLayout = new QVBoxLayout; |
|
39 | consoleLayout = new QVBoxLayout; | |
39 | selectionLayout = new QVBoxLayout; |
|
40 | selectionLayout = new QVBoxLayout; | |
|
41 | connectionLayout = new QGridLayout; | |||
40 | bridgeSelection_LAYOUT = new QGridLayout; |
|
42 | bridgeSelection_LAYOUT = new QGridLayout; | |
41 | generalParameters_LAYOUT = new QGridLayout; |
|
43 | generalParameters_LAYOUT = new QGridLayout; | |
42 |
|
44 | |||
@@ -54,7 +56,6 rmapPluginUI::rmapPluginUI(QWidget *pare | |||||
54 | logFileName = new QLabel; |
|
56 | logFileName = new QLabel; | |
55 | gresbStatusQueryLabel = new QLabel(tr("Status query socket (port 3010): waiting for connection")); |
|
57 | gresbStatusQueryLabel = new QLabel(tr("Status query socket (port 3010): waiting for connection")); | |
56 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); |
|
58 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); | |
57 | sendCCSDSCommandLabel = new QLabel(tr("Address of the target")); |
|
|||
58 | nbPacketInStore = new QLabel(tr("nb packets in store: -")); |
|
59 | nbPacketInStore = new QLabel(tr("nb packets in store: -")); | |
59 |
|
60 | |||
60 | //*** QPUSHBUTTON ***// |
|
61 | //*** QPUSHBUTTON ***// | |
@@ -65,9 +66,6 rmapPluginUI::rmapPluginUI(QWidget *pare | |||||
65 | logFileChooseButton = new QPushButton(tr("Choose file")); |
|
66 | logFileChooseButton = new QPushButton(tr("Choose file")); | |
66 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
67 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); | |
67 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
68 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); | |
68 | sendCCSDSCommandButton = new QPushButton(tr("Send CCSDS Command")); |
|
|||
69 | send_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("Send TC_LFR_UPDATE_TIME Packet")); |
|
|||
70 | reset_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("reset the TC_LFR_UPDATE_TIME Packet coarse and fine times")); |
|
|||
71 | clearConsoleButton = new QPushButton(tr("Clear")); |
|
69 | clearConsoleButton = new QPushButton(tr("Clear")); | |
72 |
|
70 | |||
73 | selectGRESB_BUTTON = new QRadioButton(tr("GRESB")); |
|
71 | selectGRESB_BUTTON = new QRadioButton(tr("GRESB")); | |
@@ -82,24 +80,22 rmapPluginUI::rmapPluginUI(QWidget *pare | |||||
82 | gresbVirtualLinkSpinBox->setRange(0, 4); |
|
80 | gresbVirtualLinkSpinBox->setRange(0, 4); | |
83 | gresbVirtualLinkSpinBox->setValue(1); |
|
81 | gresbVirtualLinkSpinBox->setValue(1); | |
84 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); |
|
82 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); | |
85 | rmapSourceLogicalAddressSpinBox->setValue(0); |
|
|||
86 | rmapTargetLogicalAddressSpinBox->setRange(0, 255); |
|
83 | rmapTargetLogicalAddressSpinBox->setRange(0, 255); | |
87 | spwLinkSpinBox->setRange(0, 2); |
|
84 | spwLinkSpinBox->setRange(0, 2); | |
88 | spwLinkSpinBox->setValue(0); |
|
85 | spwLinkSpinBox->setValue(0); | |
89 | CCSDSTargetLogicalAddressSpinBox->setRange(0,255); |
|
|||
90 | CCSDSTargetLogicalAddressSpinBox->setValue(0); |
|
|||
91 |
|
86 | |||
92 | //*** MISC **// |
|
87 | //*** MISC **// | |
93 | starDundee = new StarDundee; |
|
88 | starDundee = new StarDundee; | |
94 | gresbBridge = new gresb; |
|
89 | gresbBridge = new gresb; | |
|
90 | tmEchoBridge = new TMEchoBridge(); | |||
95 | console = new QTextEdit; |
|
91 | console = new QTextEdit; | |
96 | //gresbBridgeIPDialogBox = new QIPDialogBox; |
|
|||
97 | gresbStatusQueryDialog = new QDialog; |
|
92 | gresbStatusQueryDialog = new QDialog; | |
98 | logEnableCheckBox = new QCheckBox(tr("Enable Logs")); |
|
93 | logEnableCheckBox = new QCheckBox(tr("Enable Logs")); | |
99 | RMAP_write_verify = new QCheckBox(tr("data checked before write\nlimited to 4 bytes\nNOT IMPLEMENTED")); |
|
94 | RMAP_write_verify = new QCheckBox(tr("data checked before write\nlimited to 4 bytes\nNOT IMPLEMENTED")); | |
100 | RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable")); |
|
95 | RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable")); | |
101 | spwLinkStatusEnquiry = new gresbStatusEnquiry; |
|
|||
102 | logFile = new QFile(); |
|
96 | logFile = new QFile(); | |
|
97 | wfDisplay = new WFDisplay(); | |||
|
98 | tmStatistics = new TMStatistics(); | |||
103 |
|
99 | |||
104 | logFileEn = false; |
|
100 | logFileEn = false; | |
105 |
|
101 | |||
@@ -108,6 +104,7 rmapPluginUI::rmapPluginUI(QWidget *pare | |||||
108 |
|
104 | |||
109 | bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1); |
|
105 | bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1); | |
110 | bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1); |
|
106 | bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1); | |
|
107 | ||||
111 | bridgeSelection_LAYOUT->setRowStretch(1, 1); |
|
108 | bridgeSelection_LAYOUT->setRowStretch(1, 1); | |
112 | bridgeSelection_LAYOUT->setColumnStretch(2, 1); |
|
109 | bridgeSelection_LAYOUT->setColumnStretch(2, 1); | |
113 |
|
110 | |||
@@ -136,12 +133,8 rmapPluginUI::rmapPluginUI(QWidget *pare | |||||
136 | selectionLayout->addWidget(gresb_GROUPBOX); |
|
133 | selectionLayout->addWidget(gresb_GROUPBOX); | |
137 | selectionLayout->addWidget(stardundee_GROUPBOX); |
|
134 | selectionLayout->addWidget(stardundee_GROUPBOX); | |
138 |
|
135 | |||
139 | ccsdsLayout->addWidget(sendCCSDSCommandButton); |
|
136 | //******** | |
140 | ccsdsLayout->addWidget(send_TC_LFR_UPDATE_TIME_Button); |
|
137 | // CONSOLE | |
141 | ccsdsLayout->addWidget(reset_TC_LFR_UPDATE_TIME_Button); |
|
|||
142 | ccsdsLayout->addWidget(sendCCSDSCommandLabel); |
|
|||
143 | ccsdsLayout->addWidget(CCSDSTargetLogicalAddressSpinBox); |
|
|||
144 |
|
||||
145 | consoleLayout->addWidget(console); |
|
138 | consoleLayout->addWidget(console); | |
146 | consoleLayout->addWidget(clearConsoleButton); |
|
139 | consoleLayout->addWidget(clearConsoleButton); | |
147 | consoleLayout->addWidget(nbPacketInStore); |
|
140 | consoleLayout->addWidget(nbPacketInStore); | |
@@ -151,16 +144,18 rmapPluginUI::rmapPluginUI(QWidget *pare | |||||
151 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); |
|
144 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); | |
152 |
|
145 | |||
153 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); |
|
146 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); | |
154 | spwTabWidget->addTab(spwTabWidgetPage1, tr("ccsds")); |
|
|||
155 | spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); |
|
147 | spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); | |
156 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); |
|
148 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); | |
157 |
spwTabWidget->addTab(spwTabWidgetPage4, tr(" |
|
149 | spwTabWidget->addTab(spwTabWidgetPage4, tr("TM statistics")); | |
|
150 | //spwTabWidget->addTab(spwTabWidgetPage5, tr("waveforms")); | |||
|
151 | spwTabWidget->addTab(spwTabWidgetPage6, tr("TM Echo Bridge")); | |||
158 |
|
152 | |||
159 | spwTabWidgetPage0->setLayout(selectionLayout); |
|
153 | spwTabWidgetPage0->setLayout(selectionLayout); | |
160 |
spwTabWidgetPage |
|
154 | spwTabWidgetPage2->setLayout(this->gresbBridge->spwLinkStatusEnquiry->mainLayout); | |
161 | spwTabWidgetPage2->setLayout(this->spwLinkStatusEnquiry->mainLayout); |
|
|||
162 | spwTabWidgetPage3->setLayout(consoleLayout); |
|
155 | spwTabWidgetPage3->setLayout(consoleLayout); | |
163 |
spwTabWidgetPage4->setLayout( |
|
156 | spwTabWidgetPage4->setLayout(tmStatistics->layout()); | |
|
157 | spwTabWidgetPage5->setLayout(wfDisplay->layout()); | |||
|
158 | spwTabWidgetPage6->setLayout(tmEchoBridge->layout()); | |||
164 |
|
159 | |||
165 | mainLayout->addWidget(spwTabWidget); |
|
160 | mainLayout->addWidget(spwTabWidget); | |
166 | setLayout(mainLayout); |
|
161 | setLayout(mainLayout); |
@@ -40,11 +40,13 | |||||
40 | #include <rmapoperations.h> |
|
40 | #include <rmapoperations.h> | |
41 | #include <gresbstatusenquiry.h> |
|
41 | #include <gresbstatusenquiry.h> | |
42 | #include <QTextEdit> |
|
42 | #include <QTextEdit> | |
43 | #include "spectralmatricesdmasimulator.h" |
|
|||
44 | #include <stardundee.h> |
|
43 | #include <stardundee.h> | |
45 | #include <gresb.h> |
|
44 | #include <gresb.h> | |
46 | #include <QRadioButton> |
|
45 | #include <QRadioButton> | |
47 | #include <QGroupBox> |
|
46 | #include <QGroupBox> | |
|
47 | #include "wfdisplay.h" | |||
|
48 | #include "tmstatistics.h" | |||
|
49 | #include "tmechobridge.h" | |||
48 |
|
50 | |||
49 | enum selectedBridge{ |
|
51 | enum selectedBridge{ | |
50 | selectedBridgeIsUnknown, |
|
52 | selectedBridgeIsUnknown, | |
@@ -81,8 +83,6 public: | |||||
81 | QSpinBox* rmapTargetLogicalAddressSpinBox; |
|
83 | QSpinBox* rmapTargetLogicalAddressSpinBox; | |
82 | QSpinBox* CCSDSTargetLogicalAddressSpinBox; |
|
84 | QSpinBox* CCSDSTargetLogicalAddressSpinBox; | |
83 |
|
85 | |||
84 | //QIPDialogBox* gresbBridgeIPDialogBox; |
|
|||
85 |
|
||||
86 | QCheckBox *logEnableCheckBox; |
|
86 | QCheckBox *logEnableCheckBox; | |
87 | QCheckBox *RMAP_write_verify; |
|
87 | QCheckBox *RMAP_write_verify; | |
88 | QCheckBox *RMAP_write_reply; |
|
88 | QCheckBox *RMAP_write_reply; | |
@@ -96,16 +96,19 public: | |||||
96 |
|
96 | |||
97 | QDialog* gresbStatusQueryDialog; |
|
97 | QDialog* gresbStatusQueryDialog; | |
98 |
|
98 | |||
99 | gresbStatusEnquiry* spwLinkStatusEnquiry; |
|
99 | QTextEdit* console; | |
100 |
|
100 | |||
101 | SpectralMatricesDMASimulator *spectralMatricesDMASimulator; |
|
101 | WFDisplay* wfDisplay; | |
102 |
|
102 | |||
103 | QTextEdit* console; |
|
103 | TMStatistics* tmStatistics; | |
104 |
|
104 | |||
105 | // SPACEWIRE BRIDGES |
|
105 | // SPACEWIRE BRIDGES | |
106 | StarDundee *starDundee; |
|
106 | StarDundee *starDundee; | |
107 | gresb *gresbBridge; |
|
107 | gresb *gresbBridge; | |
108 |
|
108 | |||
|
109 | // TM Echo Bridge | |||
|
110 | TMEchoBridge * tmEchoBridge; | |||
|
111 | ||||
109 | bool islogfileenable(); |
|
112 | bool islogfileenable(); | |
110 | void appendToLogFile(const QString & text); |
|
113 | void appendToLogFile(const QString & text); | |
111 | void closeEvent(QCloseEvent *event); |
|
114 | void closeEvent(QCloseEvent *event); | |
@@ -136,13 +139,13 private: | |||||
136 | QLabel *logFileName; |
|
139 | QLabel *logFileName; | |
137 |
|
140 | |||
138 | QGridLayout *bridgeSelection_LAYOUT; |
|
141 | QGridLayout *bridgeSelection_LAYOUT; | |
|
142 | QGridLayout *connectionLayout; | |||
|
143 | QGridLayout *gresbStatusQueryDialogLayout; | |||
|
144 | QGridLayout *generalParameters_LAYOUT; | |||
139 | QVBoxLayout *selectionLayout; |
|
145 | QVBoxLayout *selectionLayout; | |
140 | QVBoxLayout *mainLayout; |
|
146 | QVBoxLayout *mainLayout; | |
141 | QGridLayout *connectionLayout; |
|
|||
142 | QVBoxLayout *ccsdsLayout; |
|
147 | QVBoxLayout *ccsdsLayout; | |
143 | QVBoxLayout *consoleLayout; |
|
148 | QVBoxLayout *consoleLayout; | |
144 | QGridLayout *gresbStatusQueryDialogLayout; |
|
|||
145 | QGridLayout *generalParameters_LAYOUT; |
|
|||
146 |
|
149 | |||
147 | QTabWidget *spwTabWidget; |
|
150 | QTabWidget *spwTabWidget; | |
148 |
|
151 |
@@ -734,10 +734,7 int StarDundee::receiveSPWPacketLoop(uns | |||||
734 | { |
|
734 | { | |
735 | result = receiveSPWPacket(requestID); |
|
735 | result = receiveSPWPacket(requestID); | |
736 | } |
|
736 | } | |
737 | if (!ccsdsPacketStore.isEmpty()) |
|
737 | ||
738 | { |
|
|||
739 | emit packetStoreNotEmpty(); |
|
|||
740 | } |
|
|||
741 | return result; |
|
738 | return result; | |
742 | } |
|
739 | } | |
743 |
|
740 | |||
@@ -811,8 +808,6 int StarDundee::receiveSPWPacket(unsigne | |||||
811 | } |
|
808 | } | |
812 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; |
|
809 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; | |
813 | ccsdsPacketSize = packetLength; |
|
810 | ccsdsPacketSize = packetLength; | |
814 | //ccsdsPacketSEMAPHORE->release(); |
|
|||
815 | //emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); |
|
|||
816 | emit appendToLog("CCSDS packet of size " + QString::number(packetLength) + " received"); |
|
811 | emit appendToLog("CCSDS packet of size " + QString::number(packetLength) + " received"); | |
817 | emit appendToLog("packet received, byte0 " + QString::number(spwPacket[0], 16) |
|
812 | emit appendToLog("packet received, byte0 " + QString::number(spwPacket[0], 16) | |
818 | + " *** byte1 " + QString::number(spwPacket[1], 16) |
|
813 | + " *** byte1 " + QString::number(spwPacket[1], 16) | |
@@ -832,10 +827,10 int StarDundee::receiveSPWPacket(unsigne | |||||
832 |
|
827 | |||
833 | unsigned int StarDundee::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) |
|
828 | unsigned int StarDundee::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) | |
834 | { |
|
829 | { | |
835 |
TMPacketToRead * |
|
830 | TMPacketToRead *generalPacket; | |
836 |
|
831 | |||
837 |
|
|
832 | generalPacket = new TMPacketToRead(ccsdsPacket, size); | |
838 | ccsdsPacketStore.append(packet); |
|
833 | emit sendPacket(generalPacket); | |
839 |
|
834 | |||
840 | return 1; |
|
835 | return 1; | |
841 | } |
|
836 | } |
@@ -31,15 +31,13 public: | |||||
31 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
31 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
32 |
|
32 | |||
33 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
33 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
34 | QList<TMPacketToRead*> ccsdsPacketStore; |
|
|||
35 |
|
34 | |||
36 | signals: |
|
35 | signals: | |
37 | void sendMessage(QString message); |
|
36 | void sendMessage(QString message); | |
|
37 | void sendPacket(TMPacketToRead*); | |||
38 | void isOpen(bool); |
|
38 | void isOpen(bool); | |
39 | void RMAP_write_reply_setText(QString); |
|
39 | void RMAP_write_reply_setText(QString); | |
40 | void appendToLog(QString); |
|
40 | void appendToLog(QString); | |
41 | void ccsdsPacketAvailable(unsigned char*, unsigned int); |
|
|||
42 | void packetStoreNotEmpty(); |
|
|||
43 |
|
41 | |||
44 | public slots: |
|
42 | public slots: | |
45 | void Open(); |
|
43 | void Open(); |
@@ -92,6 +92,8 void MainWindow::sendOnePacketAndOneTime | |||||
92 |
|
92 | |||
93 | unsigned int MainWindow::Open() |
|
93 | unsigned int MainWindow::Open() | |
94 | { |
|
94 | { | |
|
95 | U32 dwTickEnableStatus; | |||
|
96 | ||||
95 | if (!USBSpaceWire_Open(&hDevice, UI->usbDeviceNumber_SPINBOX->value())) // Open the USB device |
|
97 | if (!USBSpaceWire_Open(&hDevice, UI->usbDeviceNumber_SPINBOX->value())) // Open the USB device | |
96 | { |
|
98 | { | |
97 | emit sendMessage("ERR *** in Open *** USBSpaceWire_Open(&hDevice, 0))"); |
|
99 | emit sendMessage("ERR *** in Open *** USBSpaceWire_Open(&hDevice, 0))"); | |
@@ -119,6 +121,16 unsigned int MainWindow::Open() | |||||
119 | emit sendMessage("ERR *** in Open *** Could not reset timecodes\n"); |
|
121 | emit sendMessage("ERR *** in Open *** Could not reset timecodes\n"); | |
120 | } |
|
122 | } | |
121 | emit sendMessage("OK *** in Open *** reset timecodes"); |
|
123 | emit sendMessage("OK *** in Open *** reset timecodes"); | |
|
124 | ||||
|
125 | // Clear the tick enable register | |||
|
126 | if (CFGSpaceWire_SetTickEnableStatus(hDevice, 6) != CFG_TRANSFER_SUCCESS) | |||
|
127 | emit sendMessage("Could not clear the tick enable register"); | |||
|
128 | else | |||
|
129 | emit sendMessage("Cleared the tick enable register"); | |||
|
130 | ||||
|
131 | CFGSpaceWire_GetTickEnableStatus(hDevice, &dwTickEnableStatus); | |||
|
132 | emit sendMessage("OK *** in Open *** CFGSpaceWire_GetTickEnableStatus, code is " + QString::number(dwTickEnableStatus, 2)); | |||
|
133 | ||||
122 | } |
|
134 | } | |
123 |
|
135 | |||
124 | unsigned int MainWindow::getLinkStatus(unsigned char link) |
|
136 | unsigned int MainWindow::getLinkStatus(unsigned char link) |
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-0 |
|
3 | <!-- Written by Qt Creator 2.4.1, 2013-05-03T15:28:00. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now