@@ -0,0 +1,471 | |||||
|
1 | #include "parameterdump.h" | |||
|
2 | ||||
|
3 | ParameterDump::ParameterDump(QWidget *parent) : | |||
|
4 | QWidget(parent) | |||
|
5 | { | |||
|
6 | this->buildTabParameterDump(); | |||
|
7 | ||||
|
8 | packetToSend = new TCPacketToSend(); | |||
|
9 | ||||
|
10 | this->setLayout(layout_parameterDump); | |||
|
11 | } | |||
|
12 | ||||
|
13 | void ParameterDump::buildTabParameterDump() | |||
|
14 | { | |||
|
15 | buildCOMM(); | |||
|
16 | buildNORM(); | |||
|
17 | buildBURST(); | |||
|
18 | buildSBM1(); | |||
|
19 | buildSBM2(); | |||
|
20 | buildActions(); | |||
|
21 | ||||
|
22 | layout_parameterDump = new QGridLayout(); | |||
|
23 | ||||
|
24 | layout_parameterDump->addWidget(groupbox_COMM, 0, 0, 1, 1); | |||
|
25 | layout_parameterDump->addWidget(groupbox_NORM, 0, 1, 1, 1); | |||
|
26 | layout_parameterDump->addWidget(groupbox_BURST, 1, 0, 1, 1); | |||
|
27 | layout_parameterDump->addWidget(groupbox_ACTIONS, 1, 1, 1, 1); | |||
|
28 | layout_parameterDump->addWidget(groupbox_SBM1,2 , 0, 1, 1); | |||
|
29 | layout_parameterDump->addWidget(groupbox_SBM2, 2, 1, 1, 1); | |||
|
30 | ||||
|
31 | layout_parameterDump->setRowStretch(3, 1); | |||
|
32 | layout_parameterDump->setColumnStretch(2, 1); | |||
|
33 | ||||
|
34 | layout_parameterDump->setRowStretch(3, 1); | |||
|
35 | layout_parameterDump->setColumnStretch(2, 1); | |||
|
36 | } | |||
|
37 | ||||
|
38 | void ParameterDump::buildCOMM() | |||
|
39 | { | |||
|
40 | groupbox_COMM = new QGroupBox(tr("COMMON_PAR")); | |||
|
41 | layout_COMM = new QGridLayout(); | |||
|
42 | ||||
|
43 | sy_lfr_bw = new QLabel("sy_lfr_bw "); | |||
|
44 | sy_lfr_sp0 = new QLabel("sy_lfr_sp0 "); | |||
|
45 | sy_lfr_sp1 = new QLabel("sy_lfr_sp1 "); | |||
|
46 | sy_lfr_r0 = new QLabel("sy_lfr_r0 "); | |||
|
47 | sy_lfr_r1 = new QLabel("sy_lfr_r1 "); | |||
|
48 | ||||
|
49 | spinbox_sy_lfr_bw = new QSpinBox(); | |||
|
50 | spinbox_sy_lfr_sp0 = new QSpinBox(); | |||
|
51 | spinbox_sy_lfr_sp1 = new QSpinBox(); | |||
|
52 | spinbox_sy_lfr_r0 = new QSpinBox(); | |||
|
53 | spinbox_sy_lfr_r1 = new QSpinBox(); | |||
|
54 | ||||
|
55 | spinbox_sy_lfr_bw->setRange(0, 1); | |||
|
56 | spinbox_sy_lfr_sp0->setRange(0, 1); | |||
|
57 | spinbox_sy_lfr_sp1->setRange(0, 1); | |||
|
58 | spinbox_sy_lfr_r0->setRange(0, 1); | |||
|
59 | spinbox_sy_lfr_r1->setRange(0, 1); | |||
|
60 | ||||
|
61 | spinbox_sy_lfr_bw->setValue(1); | |||
|
62 | spinbox_sy_lfr_sp0->setValue(0); | |||
|
63 | spinbox_sy_lfr_sp1->setValue(0); | |||
|
64 | spinbox_sy_lfr_r0->setValue(0); | |||
|
65 | spinbox_sy_lfr_r1->setValue(0); | |||
|
66 | ||||
|
67 | layout_COMM->addWidget(sy_lfr_bw, 0, 0, 1, 1); | |||
|
68 | layout_COMM->addWidget(sy_lfr_sp0, 1, 0, 1, 1); | |||
|
69 | layout_COMM->addWidget(sy_lfr_sp1, 2, 0, 1, 1); | |||
|
70 | layout_COMM->addWidget(sy_lfr_r0, 3, 0, 1, 1); | |||
|
71 | layout_COMM->addWidget(sy_lfr_r1, 4, 0, 1, 1); | |||
|
72 | ||||
|
73 | layout_COMM->addWidget(spinbox_sy_lfr_bw, 0, 1, 1, 1); | |||
|
74 | layout_COMM->addWidget(spinbox_sy_lfr_sp0, 1, 1, 1, 1); | |||
|
75 | layout_COMM->addWidget(spinbox_sy_lfr_sp1, 2, 1, 1, 1); | |||
|
76 | layout_COMM->addWidget(spinbox_sy_lfr_r0, 3, 1, 1, 1); | |||
|
77 | layout_COMM->addWidget(spinbox_sy_lfr_r1, 4, 1, 1, 1); | |||
|
78 | ||||
|
79 | layout_COMM->setColumnStretch(2, 1); | |||
|
80 | layout_COMM->setRowStretch(5, 1); | |||
|
81 | ||||
|
82 | groupbox_COMM->setLayout(layout_COMM); | |||
|
83 | } | |||
|
84 | ||||
|
85 | void ParameterDump::buildNORM() | |||
|
86 | { | |||
|
87 | groupbox_NORM = new QGroupBox(tr("NORMAL_PAR")); | |||
|
88 | layout_NORM = new QGridLayout(); | |||
|
89 | ||||
|
90 | sy_lfr_n_swf_l = new QLabel("sy_lfr_n_swf_l "); | |||
|
91 | sy_lfr_n_swf_p = new QLabel("sy_lfr_n_swf_p "); | |||
|
92 | sy_lfr_n_asm_p = new QLabel("sy_lfr_n_asm_p "); | |||
|
93 | sy_lfr_n_bp_p0 = new QLabel("sy_lfr_n_bp_p0 "); | |||
|
94 | sy_lfr_n_bp_p1 = new QLabel("sy_lfr_n_bp_p1 "); | |||
|
95 | ||||
|
96 | spinbox_sy_lfr_n_swf_l = new QSpinBox(); | |||
|
97 | spinbox_sy_lfr_n_swf_p = new QSpinBox(); | |||
|
98 | spinbox_sy_lfr_n_asm_p = new QSpinBox(); | |||
|
99 | spinbox_sy_lfr_n_bp_p0 = new QSpinBox(); | |||
|
100 | spinbox_sy_lfr_n_bp_p1 = new QSpinBox(); | |||
|
101 | ||||
|
102 | spinbox_sy_lfr_n_swf_l->setRange(256, 65535); | |||
|
103 | spinbox_sy_lfr_n_swf_p->setRange(16, 65535); | |||
|
104 | spinbox_sy_lfr_n_asm_p->setRange(2, 65535); | |||
|
105 | spinbox_sy_lfr_n_bp_p0->setRange(4, 255); | |||
|
106 | spinbox_sy_lfr_n_bp_p1->setRange(20, 255); | |||
|
107 | ||||
|
108 | spinbox_sy_lfr_n_swf_l->setValue(2048); | |||
|
109 | spinbox_sy_lfr_n_swf_p->setValue(300); | |||
|
110 | spinbox_sy_lfr_n_asm_p->setValue(3600); | |||
|
111 | spinbox_sy_lfr_n_bp_p0->setValue(4); | |||
|
112 | spinbox_sy_lfr_n_bp_p1->setValue(20); | |||
|
113 | ||||
|
114 | layout_NORM->addWidget(sy_lfr_n_swf_l, 0, 0, 1, 1); | |||
|
115 | layout_NORM->addWidget(sy_lfr_n_swf_p, 1, 0, 1, 1); | |||
|
116 | layout_NORM->addWidget(sy_lfr_n_asm_p, 2, 0, 1, 1); | |||
|
117 | layout_NORM->addWidget(sy_lfr_n_bp_p0, 3, 0, 1, 1); | |||
|
118 | layout_NORM->addWidget(sy_lfr_n_bp_p1, 4, 0, 1, 1); | |||
|
119 | ||||
|
120 | layout_NORM->addWidget(spinbox_sy_lfr_n_swf_l, 0, 1, 1, 1); | |||
|
121 | layout_NORM->addWidget(spinbox_sy_lfr_n_swf_p, 1, 1, 1, 1); | |||
|
122 | layout_NORM->addWidget(spinbox_sy_lfr_n_asm_p, 2, 1, 1, 1); | |||
|
123 | layout_NORM->addWidget(spinbox_sy_lfr_n_bp_p0, 3, 1, 1, 1); | |||
|
124 | layout_NORM->addWidget(spinbox_sy_lfr_n_bp_p1, 4, 1, 1, 1); | |||
|
125 | ||||
|
126 | layout_NORM->setColumnStretch(2, 1); | |||
|
127 | layout_NORM->setRowStretch(5, 1); | |||
|
128 | ||||
|
129 | groupbox_NORM->setLayout(layout_NORM); | |||
|
130 | } | |||
|
131 | ||||
|
132 | void ParameterDump::buildBURST() | |||
|
133 | { | |||
|
134 | groupbox_BURST = new QGroupBox(tr("BURST_PAR")); | |||
|
135 | layout_BURST = new QGridLayout(); | |||
|
136 | ||||
|
137 | sy_lfr_b_bp_p0 = new QLabel("sy_lfr_b_bp_p0 "); | |||
|
138 | sy_lfr_b_bp_p1 = new QLabel("sy_lfr_b_bp_p1 "); | |||
|
139 | ||||
|
140 | spinbox_sy_lfr_b_bp_p0 = new QSpinBox(); | |||
|
141 | spinbox_sy_lfr_b_bp_p1 = new QSpinBox(); | |||
|
142 | ||||
|
143 | spinbox_sy_lfr_b_bp_p0->setRange(1, 255); | |||
|
144 | spinbox_sy_lfr_b_bp_p1->setRange(5, 255); | |||
|
145 | ||||
|
146 | layout_BURST->addWidget(sy_lfr_b_bp_p0, 0, 0, 1, 1); | |||
|
147 | layout_BURST->addWidget(sy_lfr_b_bp_p1, 1, 0, 1, 1); | |||
|
148 | layout_BURST->addWidget(spinbox_sy_lfr_b_bp_p0, 0, 1, 1, 1); | |||
|
149 | layout_BURST->addWidget(spinbox_sy_lfr_b_bp_p1, 1, 1, 1, 1); | |||
|
150 | ||||
|
151 | layout_BURST->setColumnStretch(2, 1); | |||
|
152 | layout_BURST->setRowStretch(3, 1); | |||
|
153 | ||||
|
154 | groupbox_BURST->setLayout(layout_BURST); | |||
|
155 | } | |||
|
156 | ||||
|
157 | void ParameterDump::buildSBM1() | |||
|
158 | { | |||
|
159 | groupbox_SBM1 = new QGroupBox(tr("SBM1_PAR")); | |||
|
160 | layout_SBM1 = new QGridLayout(); | |||
|
161 | ||||
|
162 | sy_lfr_s1_bp_p0 = new QLabel("sy_lfr_s1_bp_p0 "); | |||
|
163 | sy_lfr_s1_bp_p1 = new QLabel("sy_lfr_s1_bp_p1 "); | |||
|
164 | ||||
|
165 | spinbox_sy_lfr_s1_bp_p0 = new QDoubleSpinBox(); | |||
|
166 | spinbox_sy_lfr_s1_bp_p1 = new QSpinBox(); | |||
|
167 | ||||
|
168 | spinbox_sy_lfr_s1_bp_p0->setRange(0.25, 0.25*256); | |||
|
169 | spinbox_sy_lfr_b_bp_p0->setValue(0.25); | |||
|
170 | spinbox_sy_lfr_s1_bp_p1->setRange(1, 255); | |||
|
171 | spinbox_sy_lfr_b_bp_p1->setValue(1); | |||
|
172 | ||||
|
173 | layout_SBM1->addWidget(sy_lfr_s1_bp_p0, 0, 0, 1, 1); | |||
|
174 | layout_SBM1->addWidget(sy_lfr_s1_bp_p1, 1, 0, 1, 1); | |||
|
175 | layout_SBM1->addWidget(spinbox_sy_lfr_s1_bp_p0, 0, 1, 1, 1); | |||
|
176 | layout_SBM1->addWidget(spinbox_sy_lfr_s1_bp_p1, 1, 1, 1, 1); | |||
|
177 | ||||
|
178 | layout_SBM1->setColumnStretch(2, 1); | |||
|
179 | layout_SBM1->setRowStretch(3, 1); | |||
|
180 | ||||
|
181 | groupbox_SBM1->setLayout(layout_SBM1); | |||
|
182 | } | |||
|
183 | ||||
|
184 | void ParameterDump::buildSBM2() | |||
|
185 | { | |||
|
186 | groupbox_SBM2 = new QGroupBox(tr("SBM2_PAR")); | |||
|
187 | layout_SBM2 = new QGridLayout(); | |||
|
188 | ||||
|
189 | sy_lfr_s2_bp_p0 = new QLabel("sy_lfr_s2_bp_p0 "); | |||
|
190 | sy_lfr_s2_bp_p1 = new QLabel("sy_lfr_s2_bp_p1 "); | |||
|
191 | ||||
|
192 | spinbox_sy_lfr_s2_bp_p0 = new QSpinBox(); | |||
|
193 | spinbox_sy_lfr_s2_bp_p1 = new QSpinBox(); | |||
|
194 | ||||
|
195 | spinbox_sy_lfr_s2_bp_p0->setRange(1, 255); | |||
|
196 | spinbox_sy_lfr_s2_bp_p1->setRange(5, 255); | |||
|
197 | ||||
|
198 | layout_SBM2->addWidget(sy_lfr_s2_bp_p0, 0, 0, 1, 1); | |||
|
199 | layout_SBM2->addWidget(sy_lfr_s2_bp_p1, 1, 0, 1, 1); | |||
|
200 | layout_SBM2->addWidget(spinbox_sy_lfr_s2_bp_p0, 0, 1, 1, 1); | |||
|
201 | layout_SBM2->addWidget(spinbox_sy_lfr_s2_bp_p1, 1, 1, 1, 1); | |||
|
202 | ||||
|
203 | layout_SBM2->setColumnStretch(2, 1); | |||
|
204 | layout_SBM2->setRowStretch(3, 1); | |||
|
205 | ||||
|
206 | groupbox_SBM2->setLayout(layout_SBM2); | |||
|
207 | } | |||
|
208 | ||||
|
209 | void ParameterDump::buildActions() | |||
|
210 | { | |||
|
211 | groupbox_ACTIONS = new QGroupBox(tr("Actions")); | |||
|
212 | layout_ACTIONS = new QGridLayout; | |||
|
213 | ||||
|
214 | button_loadCommon = new QPushButton(tr("LOAD_COMM")); | |||
|
215 | button_loadNormal = new QPushButton(tr("LOAD_NORM")); | |||
|
216 | button_loadBurst = new QPushButton(tr("LOAD_BURST")); | |||
|
217 | button_loadSBM1 = new QPushButton(tr("LOAD_SBM1")); | |||
|
218 | button_loadSBM2 = new QPushButton(tr("LOAD_SBM2")); | |||
|
219 | button_parameterDump = new QPushButton(tr("DUMP_PAR")); | |||
|
220 | ||||
|
221 | button_loadCommon->setEnabled(false); | |||
|
222 | button_loadNormal->setEnabled(false); | |||
|
223 | button_loadBurst->setEnabled(false); | |||
|
224 | button_loadSBM1->setEnabled(false); | |||
|
225 | button_loadSBM2->setEnabled(false); | |||
|
226 | button_parameterDump->setEnabled(false); | |||
|
227 | ||||
|
228 | layout_ACTIONS->addWidget(button_loadCommon, 0, 0, 1, 1); | |||
|
229 | layout_ACTIONS->addWidget(button_loadNormal, 0, 1, 1, 1); | |||
|
230 | layout_ACTIONS->addWidget(button_loadBurst, 1, 0, 1, 1); | |||
|
231 | layout_ACTIONS->addWidget(button_parameterDump, 1, 1, 1, 1); | |||
|
232 | layout_ACTIONS->addWidget(button_loadSBM1, 2, 0, 1, 1); | |||
|
233 | layout_ACTIONS->addWidget(button_loadSBM2, 2, 1, 1, 1); | |||
|
234 | ||||
|
235 | groupbox_ACTIONS->setLayout(layout_ACTIONS); | |||
|
236 | ||||
|
237 | connect(this->button_parameterDump, SIGNAL(clicked()), this, SLOT(sendParameterDump())); | |||
|
238 | connect(this->button_loadCommon, SIGNAL(clicked()), this, SLOT(sendLoadCommon())); | |||
|
239 | connect(this->button_loadNormal, SIGNAL(clicked()), this, SLOT(sendLoadNormal())); | |||
|
240 | connect(this->button_loadBurst, SIGNAL(clicked()), this, SLOT(sendLoadBurst())); | |||
|
241 | connect(this->button_loadSBM1, SIGNAL(clicked()), this, SLOT(sendLoadSBM1())); | |||
|
242 | connect(this->button_loadSBM2, SIGNAL(clicked()), this, SLOT(sendLoadSBM2())); | |||
|
243 | } | |||
|
244 | ||||
|
245 | void ParameterDump::updateParameterDump(TMPacketToRead *tmPacketToRead) | |||
|
246 | { | |||
|
247 | ||||
|
248 | Packet_TM_LFR_PARAMETER_DUMP_t *parameterPacket; | |||
|
249 | ||||
|
250 | parameterPacket = (Packet_TM_LFR_PARAMETER_DUMP_t *) tmPacketToRead->Value; | |||
|
251 | ||||
|
252 | // COMMON | |||
|
253 | spinbox_sy_lfr_bw->setValue( (parameterPacket->bw_sp0_sp1_r0_r1 & 0x10 ) >> 4 ); | |||
|
254 | spinbox_sy_lfr_sp0->setValue( (parameterPacket->bw_sp0_sp1_r0_r1 & 0x08 ) >> 3 ); | |||
|
255 | spinbox_sy_lfr_sp1->setValue( (parameterPacket->bw_sp0_sp1_r0_r1 & 0x04 ) >> 2 ); | |||
|
256 | spinbox_sy_lfr_r0->setValue( (parameterPacket->bw_sp0_sp1_r0_r1 & 0x02 ) >> 1 ); | |||
|
257 | spinbox_sy_lfr_r1->setValue( (parameterPacket->bw_sp0_sp1_r0_r1 & 0x01 ) ); | |||
|
258 | ||||
|
259 | // NORMAL | |||
|
260 | spinbox_sy_lfr_n_swf_l->setValue(parameterPacket->sy_lfr_n_swf_l[0] * 256 | |||
|
261 | + parameterPacket->sy_lfr_n_swf_l[1]); | |||
|
262 | spinbox_sy_lfr_n_swf_p->setValue(parameterPacket->sy_lfr_n_swf_p[0] * 256 | |||
|
263 | + parameterPacket->sy_lfr_n_swf_p[1]); | |||
|
264 | spinbox_sy_lfr_n_asm_p->setValue(parameterPacket->sy_lfr_n_asm_p[0] * 256 | |||
|
265 | + parameterPacket->sy_lfr_n_asm_p[1]); | |||
|
266 | spinbox_sy_lfr_n_bp_p0->setValue(parameterPacket->sy_lfr_n_bp_p0); | |||
|
267 | spinbox_sy_lfr_n_bp_p1->setValue(parameterPacket->sy_lfr_n_bp_p1); | |||
|
268 | ||||
|
269 | // BURST | |||
|
270 | spinbox_sy_lfr_b_bp_p0->setValue(parameterPacket->sy_lfr_b_bp_p0); | |||
|
271 | spinbox_sy_lfr_b_bp_p1->setValue(parameterPacket->sy_lfr_b_bp_p1); | |||
|
272 | ||||
|
273 | // SBM1 | |||
|
274 | spinbox_sy_lfr_s1_bp_p0->setValue(parameterPacket->sy_lfr_s1_bp_p0); | |||
|
275 | spinbox_sy_lfr_s1_bp_p1->setValue(parameterPacket->sy_lfr_s1_bp_p1); | |||
|
276 | ||||
|
277 | // SBM2 | |||
|
278 | spinbox_sy_lfr_s2_bp_p0->setValue(parameterPacket->sy_lfr_s2_bp_p0); | |||
|
279 | spinbox_sy_lfr_s2_bp_p1->setValue(parameterPacket->sy_lfr_s2_bp_p1); | |||
|
280 | } | |||
|
281 | ||||
|
282 | void ParameterDump::sendParameterDump() | |||
|
283 | { | |||
|
284 | Packet_TC_LFR_DUMP_PAR_t packet; | |||
|
285 | unsigned char crcAsTwoBytes[2]; | |||
|
286 | ||||
|
287 | packet.packetID[0] = (unsigned char) (TC_LFR_PACKET_ID >> 8); | |||
|
288 | packet.packetID[1] = (unsigned char) (TC_LFR_PACKET_ID ); | |||
|
289 | packet.packetSequenceControl[0] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL >> 8); | |||
|
290 | packet.packetSequenceControl[1] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL ); | |||
|
291 | packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_LFR_DUMP_PAR >> 8); | |||
|
292 | packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_LFR_DUMP_PAR ); | |||
|
293 | ||||
|
294 | packet.ccsdsSecHeaderFlag_pusVersion_ack = 0x19; | |||
|
295 | packet.serviceType = TC_TYPE_DEFAULT; | |||
|
296 | packet.serviceSubType = TC_SUBTYPE_DUMP; | |||
|
297 | packet.sourceID = SID_DEFAULT; | |||
|
298 | ||||
|
299 | packetToSend->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes, | |||
|
300 | PACKET_LENGTH_TC_LFR_DUMP_PAR + CCSDS_TC_TM_PACKET_OFFSET - 2); | |||
|
301 | packet.crc[0] = crcAsTwoBytes[0]; | |||
|
302 | packet.crc[1] = crcAsTwoBytes[1]; | |||
|
303 | ||||
|
304 | emit WriteSPWSig((char*) &packet, PACKET_LENGTH_TC_LFR_DUMP_PAR + CCSDS_TC_TM_PACKET_OFFSET, | |||
|
305 | CCSDS_NODE_ADDRESS, CCSDS_USER_APP); | |||
|
306 | } | |||
|
307 | ||||
|
308 | void ParameterDump::sendLoadCommon() | |||
|
309 | { | |||
|
310 | Packet_TC_LFR_LOAD_COMMON_PAR_t packet; | |||
|
311 | unsigned char crcAsTwoBytes[2]; | |||
|
312 | ||||
|
313 | packet.packetID[0] = (unsigned char) (TC_LFR_PACKET_ID >> 8); | |||
|
314 | packet.packetID[1] = (unsigned char) (TC_LFR_PACKET_ID ); | |||
|
315 | packet.packetSequenceControl[0] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL >> 8); | |||
|
316 | packet.packetSequenceControl[1] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL ); | |||
|
317 | packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_COMMON_PAR >> 8); | |||
|
318 | packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_COMMON_PAR ); | |||
|
319 | ||||
|
320 | packet.ccsdsSecHeaderFlag_pusVersion_ack = TC_LFR_DATA_FIELD_HEADER0; | |||
|
321 | packet.serviceType = TC_TYPE_DEFAULT; | |||
|
322 | packet.serviceSubType = TC_SUBTYPE_LOAD_COMMON_PAR; | |||
|
323 | packet.sourceID = SID_DEFAULT; | |||
|
324 | packet.spare = TC_LFR_LOAD_COMMON_PAR_SPARE; | |||
|
325 | packet.bw_sp0_sp1_r0_r1 = (spinbox_sy_lfr_bw->value() << 4) | |||
|
326 | + (spinbox_sy_lfr_sp0->value() << 3) | |||
|
327 | + (spinbox_sy_lfr_sp1->value() << 2) | |||
|
328 | + (spinbox_sy_lfr_r0->value() << 1) | |||
|
329 | + (spinbox_sy_lfr_r1->value() ); | |||
|
330 | ||||
|
331 | packetToSend->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes, | |||
|
332 | PACKET_LENGTH_TC_LFR_LOAD_COMMON_PAR + CCSDS_TC_TM_PACKET_OFFSET - 2); | |||
|
333 | packet.crc[0] = crcAsTwoBytes[0]; | |||
|
334 | packet.crc[1] = crcAsTwoBytes[1]; | |||
|
335 | ||||
|
336 | emit WriteSPWSig((char*) &packet, PACKET_LENGTH_TC_LFR_LOAD_COMMON_PAR + CCSDS_TC_TM_PACKET_OFFSET, | |||
|
337 | CCSDS_NODE_ADDRESS, CCSDS_USER_APP); | |||
|
338 | } | |||
|
339 | ||||
|
340 | void ParameterDump::sendLoadNormal() | |||
|
341 | { | |||
|
342 | Packet_TC_LFR_LOAD_NORMAL_PAR_t packet; | |||
|
343 | unsigned char crcAsTwoBytes[2]; | |||
|
344 | ||||
|
345 | packet.packetID[0] = (unsigned char) (TC_LFR_PACKET_ID >> 8); | |||
|
346 | packet.packetID[1] = (unsigned char) (TC_LFR_PACKET_ID ); | |||
|
347 | packet.packetSequenceControl[0] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL >> 8); | |||
|
348 | packet.packetSequenceControl[1] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL ); | |||
|
349 | packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_NORMAL_PAR >> 8); | |||
|
350 | packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_NORMAL_PAR ); | |||
|
351 | ||||
|
352 | packet.ccsdsSecHeaderFlag_pusVersion_ack = TC_LFR_DATA_FIELD_HEADER0; | |||
|
353 | packet.serviceType = TC_TYPE_DEFAULT; | |||
|
354 | packet.serviceSubType = TC_SUBTYPE_LOAD_NORMAL_PAR; | |||
|
355 | packet.sourceID = SID_DEFAULT; | |||
|
356 | packet.sy_lfr_n_swf_l[0] = (unsigned char) (spinbox_sy_lfr_n_swf_l->value() >> 8); | |||
|
357 | packet.sy_lfr_n_swf_l[1] = (unsigned char) (spinbox_sy_lfr_n_swf_l->value() ); | |||
|
358 | packet.sy_lfr_n_swf_p[0] = (unsigned char) (spinbox_sy_lfr_n_swf_p->value() >> 8); | |||
|
359 | packet.sy_lfr_n_swf_p[1] = (unsigned char) (spinbox_sy_lfr_n_swf_p->value() ); | |||
|
360 | packet.sy_lfr_n_asm_p[0] = (unsigned char) (spinbox_sy_lfr_n_asm_p->value() >> 8); | |||
|
361 | packet.sy_lfr_n_asm_p[1] = (unsigned char) (spinbox_sy_lfr_n_asm_p->value() ); | |||
|
362 | packet.sy_lfr_n_bp_p0 = (unsigned char) (spinbox_sy_lfr_n_bp_p0->value() ); | |||
|
363 | packet.sy_lfr_n_bp_p1 = (unsigned char) (spinbox_sy_lfr_n_bp_p1->value() ); | |||
|
364 | ||||
|
365 | packetToSend->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes, | |||
|
366 | PACKET_LENGTH_TC_LFR_LOAD_NORMAL_PAR + CCSDS_TC_TM_PACKET_OFFSET - 2); | |||
|
367 | packet.crc[0] = crcAsTwoBytes[0]; | |||
|
368 | packet.crc[1] = crcAsTwoBytes[1]; | |||
|
369 | ||||
|
370 | emit WriteSPWSig((char*) &packet, PACKET_LENGTH_TC_LFR_LOAD_NORMAL_PAR + CCSDS_TC_TM_PACKET_OFFSET, | |||
|
371 | CCSDS_NODE_ADDRESS, CCSDS_USER_APP); | |||
|
372 | } | |||
|
373 | ||||
|
374 | void ParameterDump::sendLoadBurst() | |||
|
375 | { | |||
|
376 | Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_t packet; | |||
|
377 | unsigned char crcAsTwoBytes[2]; | |||
|
378 | ||||
|
379 | packet.packetID[0] = (unsigned char) (TC_LFR_PACKET_ID >> 8); | |||
|
380 | packet.packetID[1] = (unsigned char) (TC_LFR_PACKET_ID ); | |||
|
381 | packet.packetSequenceControl[0] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL >> 8); | |||
|
382 | packet.packetSequenceControl[1] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL ); | |||
|
383 | packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_BURST_PAR >> 8); | |||
|
384 | packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_BURST_PAR ); | |||
|
385 | ||||
|
386 | packet.ccsdsSecHeaderFlag_pusVersion_ack = TC_LFR_DATA_FIELD_HEADER0; | |||
|
387 | packet.serviceType = TC_TYPE_DEFAULT; | |||
|
388 | packet.serviceSubType = TC_SUBTYPE_LOAD_BURST_PAR; | |||
|
389 | packet.sourceID = SID_DEFAULT; | |||
|
390 | packet.sy_lfr_bp_p0 = (unsigned char) (spinbox_sy_lfr_b_bp_p0->value() ); | |||
|
391 | packet.sy_lfr_bp_p1 = (unsigned char) (spinbox_sy_lfr_b_bp_p1->value() ); | |||
|
392 | ||||
|
393 | packetToSend->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes, | |||
|
394 | PACKET_LENGTH_TC_LFR_LOAD_BURST_PAR + CCSDS_TC_TM_PACKET_OFFSET - 2); | |||
|
395 | packet.crc[0] = crcAsTwoBytes[0]; | |||
|
396 | packet.crc[1] = crcAsTwoBytes[1]; | |||
|
397 | ||||
|
398 | emit WriteSPWSig((char*) &packet, PACKET_LENGTH_TC_LFR_LOAD_BURST_PAR + CCSDS_TC_TM_PACKET_OFFSET, | |||
|
399 | CCSDS_NODE_ADDRESS, CCSDS_USER_APP); | |||
|
400 | } | |||
|
401 | ||||
|
402 | void ParameterDump::sendLoadSBM1() | |||
|
403 | { | |||
|
404 | Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_t packet; | |||
|
405 | unsigned char crcAsTwoBytes[2]; | |||
|
406 | ||||
|
407 | packet.packetID[0] = (unsigned char) (TC_LFR_PACKET_ID >> 8); | |||
|
408 | packet.packetID[1] = (unsigned char) (TC_LFR_PACKET_ID ); | |||
|
409 | packet.packetSequenceControl[0] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL >> 8); | |||
|
410 | packet.packetSequenceControl[1] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL ); | |||
|
411 | packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_SBM1_PAR >> 8); | |||
|
412 | packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_SBM1_PAR ); | |||
|
413 | ||||
|
414 | packet.ccsdsSecHeaderFlag_pusVersion_ack = TC_LFR_DATA_FIELD_HEADER0; | |||
|
415 | packet.serviceType = TC_TYPE_DEFAULT; | |||
|
416 | packet.serviceSubType = TC_SUBTYPE_LOAD_SBM1_PAR; | |||
|
417 | packet.sourceID = SID_DEFAULT; | |||
|
418 | packet.sy_lfr_bp_p0 = (unsigned char) (spinbox_sy_lfr_s1_bp_p0->value() ); | |||
|
419 | packet.sy_lfr_bp_p1 = (unsigned char) (spinbox_sy_lfr_s1_bp_p1->value() ); | |||
|
420 | ||||
|
421 | packetToSend->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes, | |||
|
422 | PACKET_LENGTH_TC_LFR_LOAD_SBM1_PAR + CCSDS_TC_TM_PACKET_OFFSET - 2); | |||
|
423 | packet.crc[0] = crcAsTwoBytes[0]; | |||
|
424 | packet.crc[1] = crcAsTwoBytes[1]; | |||
|
425 | ||||
|
426 | emit WriteSPWSig((char*) &packet, PACKET_LENGTH_TC_LFR_LOAD_SBM1_PAR + CCSDS_TC_TM_PACKET_OFFSET, | |||
|
427 | CCSDS_NODE_ADDRESS, CCSDS_USER_APP); | |||
|
428 | } | |||
|
429 | ||||
|
430 | void ParameterDump::sendLoadSBM2() | |||
|
431 | { | |||
|
432 | Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_t packet; | |||
|
433 | unsigned char crcAsTwoBytes[2]; | |||
|
434 | ||||
|
435 | packet.packetID[0] = (unsigned char) (TC_LFR_PACKET_ID >> 8); | |||
|
436 | packet.packetID[1] = (unsigned char) (TC_LFR_PACKET_ID ); | |||
|
437 | packet.packetSequenceControl[0] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL >> 8); | |||
|
438 | packet.packetSequenceControl[1] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL ); | |||
|
439 | packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_SBM2_PAR >> 8); | |||
|
440 | packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_LFR_LOAD_SBM2_PAR ); | |||
|
441 | ||||
|
442 | packet.ccsdsSecHeaderFlag_pusVersion_ack = TC_LFR_DATA_FIELD_HEADER0; | |||
|
443 | packet.serviceType = TC_TYPE_DEFAULT; | |||
|
444 | packet.serviceSubType = TC_SUBTYPE_LOAD_SBM2_PAR; | |||
|
445 | packet.sourceID = SID_DEFAULT; | |||
|
446 | packet.sy_lfr_bp_p0 = (unsigned char) (spinbox_sy_lfr_s2_bp_p0->value() ); | |||
|
447 | packet.sy_lfr_bp_p1 = (unsigned char) (spinbox_sy_lfr_s2_bp_p1->value() ); | |||
|
448 | ||||
|
449 | packetToSend->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes, | |||
|
450 | PACKET_LENGTH_TC_LFR_LOAD_SBM2_PAR + CCSDS_TC_TM_PACKET_OFFSET - 2); | |||
|
451 | packet.crc[0] = crcAsTwoBytes[0]; | |||
|
452 | packet.crc[1] = crcAsTwoBytes[1]; | |||
|
453 | ||||
|
454 | emit WriteSPWSig((char*) &packet, PACKET_LENGTH_TC_LFR_LOAD_SBM2_PAR + CCSDS_TC_TM_PACKET_OFFSET, | |||
|
455 | CCSDS_NODE_ADDRESS, CCSDS_USER_APP); | |||
|
456 | } | |||
|
457 | ||||
|
458 | void ParameterDump::actionsSetEnabled(bool state) | |||
|
459 | { | |||
|
460 | button_parameterDump->setEnabled(state); | |||
|
461 | button_loadCommon->setEnabled(state); | |||
|
462 | button_loadNormal->setEnabled(state); | |||
|
463 | button_loadBurst->setEnabled(state); | |||
|
464 | button_loadSBM1->setEnabled(state); | |||
|
465 | button_loadSBM2->setEnabled(state); | |||
|
466 | } | |||
|
467 | ||||
|
468 | void ParameterDump::GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData) | |||
|
469 | { | |||
|
470 | packetToSend->GetCRCAsTwoBytes( data, crcAsTwoBytes, sizeOfData ); | |||
|
471 | } |
@@ -0,0 +1,115 | |||||
|
1 | #ifndef PARAMETERDUMP_H | |||
|
2 | #define PARAMETERDUMP_H | |||
|
3 | ||||
|
4 | #include <QGroupBox> | |||
|
5 | #include <QGridLayout> | |||
|
6 | #include <QPushButton> | |||
|
7 | #include <QLabel> | |||
|
8 | #include <QSpinBox> | |||
|
9 | #include <QDoubleSpinBox> | |||
|
10 | ||||
|
11 | #include <tmpackettoread.h> | |||
|
12 | #include <TC_types.h> | |||
|
13 | ||||
|
14 | #include "parameterdump_global.h" | |||
|
15 | #include "tcpackettosend.h" | |||
|
16 | ||||
|
17 | class PARAMETERDUMPSHARED_EXPORT ParameterDump : public QWidget | |||
|
18 | { | |||
|
19 | Q_OBJECT | |||
|
20 | public: | |||
|
21 | explicit ParameterDump(QWidget *parent = 0); | |||
|
22 | ||||
|
23 | void buildTabParameterDump(); | |||
|
24 | void buildCOMM(); | |||
|
25 | void buildNORM(); | |||
|
26 | void buildBURST(); | |||
|
27 | void buildSBM1(); | |||
|
28 | void buildSBM2(); | |||
|
29 | void buildActions(); | |||
|
30 | void updateParameterDump(TMPacketToRead *tmPacketToRead); | |||
|
31 | void actionsSetEnabled(bool state); | |||
|
32 | ||||
|
33 | void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData); | |||
|
34 | ||||
|
35 | QGroupBox* groupbox_parameterDump; | |||
|
36 | QGroupBox* groupbox_COMM; | |||
|
37 | QGroupBox* groupbox_NORM; | |||
|
38 | QGroupBox* groupbox_BURST; | |||
|
39 | QGroupBox* groupbox_SBM1; | |||
|
40 | QGroupBox* groupbox_SBM2; | |||
|
41 | QGroupBox* groupbox_ACTIONS; | |||
|
42 | ||||
|
43 | QGridLayout* layout_parameterDump; | |||
|
44 | QGridLayout* layout_COMM; | |||
|
45 | QGridLayout* layout_NORM; | |||
|
46 | QGridLayout* layout_BURST; | |||
|
47 | QGridLayout* layout_SBM1; | |||
|
48 | QGridLayout* layout_SBM2; | |||
|
49 | QGridLayout* layout_ACTIONS; | |||
|
50 | ||||
|
51 | QPushButton* button_loadCommon; | |||
|
52 | QPushButton* button_loadNormal; | |||
|
53 | QPushButton* button_loadBurst; | |||
|
54 | QPushButton* button_loadSBM1; | |||
|
55 | QPushButton* button_loadSBM2; | |||
|
56 | QPushButton* button_parameterDump; | |||
|
57 | // | |||
|
58 | QLabel* sy_lfr_bw; | |||
|
59 | QLabel* sy_lfr_sp0; | |||
|
60 | QLabel* sy_lfr_sp1; | |||
|
61 | QLabel* sy_lfr_r0; | |||
|
62 | QLabel* sy_lfr_r1; | |||
|
63 | // | |||
|
64 | QLabel* sy_lfr_n_swf_l; | |||
|
65 | QLabel* sy_lfr_n_swf_p; | |||
|
66 | QLabel* sy_lfr_n_asm_p; | |||
|
67 | QLabel* sy_lfr_n_bp_p0; | |||
|
68 | QLabel* sy_lfr_n_bp_p1; | |||
|
69 | // | |||
|
70 | QLabel* sy_lfr_b_bp_p0; | |||
|
71 | QLabel* sy_lfr_b_bp_p1; | |||
|
72 | // | |||
|
73 | QLabel* sy_lfr_s1_bp_p0; | |||
|
74 | QLabel* sy_lfr_s1_bp_p1; | |||
|
75 | // | |||
|
76 | QLabel* sy_lfr_s2_bp_p0; | |||
|
77 | QLabel* sy_lfr_s2_bp_p1; | |||
|
78 | ||||
|
79 | QSpinBox* spinbox_sy_lfr_bw; | |||
|
80 | QSpinBox* spinbox_sy_lfr_sp0; | |||
|
81 | QSpinBox* spinbox_sy_lfr_sp1; | |||
|
82 | QSpinBox* spinbox_sy_lfr_r0; | |||
|
83 | QSpinBox* spinbox_sy_lfr_r1; | |||
|
84 | // | |||
|
85 | QSpinBox* spinbox_sy_lfr_n_swf_l; | |||
|
86 | QSpinBox* spinbox_sy_lfr_n_swf_p; | |||
|
87 | QSpinBox* spinbox_sy_lfr_n_asm_p; | |||
|
88 | QSpinBox* spinbox_sy_lfr_n_bp_p0; | |||
|
89 | QSpinBox* spinbox_sy_lfr_n_bp_p1; | |||
|
90 | // | |||
|
91 | QSpinBox* spinbox_sy_lfr_b_bp_p0; | |||
|
92 | QSpinBox* spinbox_sy_lfr_b_bp_p1; | |||
|
93 | // | |||
|
94 | QDoubleSpinBox* spinbox_sy_lfr_s1_bp_p0; | |||
|
95 | QSpinBox* spinbox_sy_lfr_s1_bp_p1; | |||
|
96 | // | |||
|
97 | QSpinBox* spinbox_sy_lfr_s2_bp_p0; | |||
|
98 | QSpinBox* spinbox_sy_lfr_s2_bp_p1; | |||
|
99 | ||||
|
100 | TCPacketToSend* packetToSend; | |||
|
101 | ||||
|
102 | signals: | |||
|
103 | unsigned int WriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |||
|
104 | ||||
|
105 | public slots: | |||
|
106 | void sendParameterDump(); | |||
|
107 | void sendLoadCommon(); | |||
|
108 | void sendLoadNormal(); | |||
|
109 | void sendLoadBurst(); | |||
|
110 | void sendLoadSBM1(); | |||
|
111 | void sendLoadSBM2(); | |||
|
112 | ||||
|
113 | }; | |||
|
114 | ||||
|
115 | #endif // PARAMETERDUMP_H |
@@ -0,0 +1,38 | |||||
|
1 | #------------------------------------------------- | |||
|
2 | # | |||
|
3 | # Project created by QtCreator 2013-07-29T11:18:13 | |||
|
4 | # | |||
|
5 | #------------------------------------------------- | |||
|
6 | ||||
|
7 | TARGET = parameterdump | |||
|
8 | TEMPLATE = lib | |||
|
9 | ||||
|
10 | INCLUDEPATH += \ | |||
|
11 | ../../DEV_PLE/header \ | |||
|
12 | ../rmapplugin \ | |||
|
13 | $${PWD} | |||
|
14 | ||||
|
15 | DEFINES += PARAMETERDUMP_LIBRARY | |||
|
16 | ||||
|
17 | SOURCES += parameterdump.cpp \ | |||
|
18 | tcpackettosend.cpp \ | |||
|
19 | ../rmapplugin/tmpackettoread.cpp | |||
|
20 | ||||
|
21 | HEADERS += parameterdump.h \ | |||
|
22 | parameterdump_global.h \ | |||
|
23 | tcpackettosend.h \ | |||
|
24 | ../../DEV_PLE/header/ccsds_types.h \ | |||
|
25 | ../../DEV_PLE/header/TC_types.h \ | |||
|
26 | ../rmapplugin/tmpackettoread.h | |||
|
27 | ||||
|
28 | header.path = $$[QT_INSTALL_HEADERS]/lppmon/parameterdump | |||
|
29 | header.files = \ | |||
|
30 | parameterdump.h \ | |||
|
31 | parameterdump_global.h | |||
|
32 | ||||
|
33 | target.path = $$[QT_INSTALL_LIBS] | |||
|
34 | isEmpty(target.path) { | |||
|
35 | target.path = $(QTDIR)/lib | |||
|
36 | } | |||
|
37 | ||||
|
38 | INSTALLS += header target |
@@ -0,0 +1,12 | |||||
|
1 | #ifndef PARAMETERDUMP_GLOBAL_H | |||
|
2 | #define PARAMETERDUMP_GLOBAL_H | |||
|
3 | ||||
|
4 | #include <QtCore/qglobal.h> | |||
|
5 | ||||
|
6 | #if defined(PARAMETERDUMP_LIBRARY) | |||
|
7 | # define PARAMETERDUMPSHARED_EXPORT Q_DECL_EXPORT | |||
|
8 | #else | |||
|
9 | # define PARAMETERDUMPSHARED_EXPORT Q_DECL_IMPORT | |||
|
10 | #endif | |||
|
11 | ||||
|
12 | #endif // PARAMETERDUMP_GLOBAL_H |
@@ -0,0 +1,95 | |||||
|
1 | #include "entermode.h" | |||
|
2 | ||||
|
3 | EnterMode::EnterMode(QWidget *parent) : | |||
|
4 | QWidget(parent) | |||
|
5 | { | |||
|
6 | button_enterModeStandby = new QPushButton(tr("STANDBY")); | |||
|
7 | button_enterModeNormal = new QPushButton(tr("NORMAL")); | |||
|
8 | button_enterModeBurst = new QPushButton(tr("BURST")); | |||
|
9 | button_enterModeSBM1 = new QPushButton(tr("SBM1")); | |||
|
10 | button_enterModeSBM2 = new QPushButton(tr("SBM2")); | |||
|
11 | ||||
|
12 | mainLayout = new QGridLayout(); | |||
|
13 | overallLayout = new QGridLayout(); | |||
|
14 | ||||
|
15 | groupBox = new QGroupBox(tr("ENTER_MODE")); | |||
|
16 | ||||
|
17 | mainLayout->addWidget(button_enterModeStandby, 0, 0, 1, 1); | |||
|
18 | mainLayout->addWidget(button_enterModeNormal, 1, 0, 1, 1); | |||
|
19 | mainLayout->addWidget(button_enterModeBurst, 2, 0, 1, 1); | |||
|
20 | mainLayout->addWidget(button_enterModeSBM1, 3, 0, 1, 1); | |||
|
21 | mainLayout->addWidget(button_enterModeSBM2, 4, 0, 1, 1); | |||
|
22 | ||||
|
23 | mainLayout->setColumnStretch(1, 1); | |||
|
24 | mainLayout->setRowStretch(5, 1); | |||
|
25 | ||||
|
26 | groupBox->setLayout(mainLayout); | |||
|
27 | ||||
|
28 | parameterDump = new ParameterDump(); | |||
|
29 | ||||
|
30 | connect(this->button_enterModeStandby, SIGNAL(clicked()), this, SLOT(enterModeStandby())); | |||
|
31 | connect(this->button_enterModeNormal, SIGNAL(clicked()), this, SLOT(enterModeNormal())); | |||
|
32 | connect(this->button_enterModeBurst, SIGNAL(clicked()), this, SLOT(enterModeBurst())); | |||
|
33 | connect(this->button_enterModeSBM1, SIGNAL(clicked()), this, SLOT(enterModeSBM1())); | |||
|
34 | connect(this->button_enterModeSBM2, SIGNAL(clicked()), this, SLOT(enterModeSBM2())); | |||
|
35 | ||||
|
36 | overallLayout->addWidget(groupBox, 0, 0, 1, 1); | |||
|
37 | ||||
|
38 | this->setLayout(overallLayout); | |||
|
39 | } | |||
|
40 | ||||
|
41 | void EnterMode::sendEnterMode( unsigned char mode) | |||
|
42 | { | |||
|
43 | Packet_TC_LFR_ENTER_MODE_t packet; | |||
|
44 | unsigned char crcAsTwoBytes[2]; | |||
|
45 | ||||
|
46 | packet.packetID[0] = (unsigned char) (TC_LFR_PACKET_ID >> 8); | |||
|
47 | packet.packetID[1] = (unsigned char) (TC_LFR_PACKET_ID ); | |||
|
48 | packet.packetSequenceControl[0] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL >> 8); | |||
|
49 | packet.packetSequenceControl[1] = (unsigned char) (TC_LFR_PACKET_SEQUENCE_CONTROL ); | |||
|
50 | packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_LFR_ENTER_MODE >> 8); | |||
|
51 | packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_LFR_ENTER_MODE ); | |||
|
52 | ||||
|
53 | packet.ccsdsSecHeaderFlag_pusVersion_ack = 0x19; | |||
|
54 | packet.serviceType = TC_TYPE_DEFAULT; | |||
|
55 | packet.serviceSubType = TC_SUBTYPE_ENTER_MODE; | |||
|
56 | packet.sourceID = SID_DEFAULT; | |||
|
57 | packet.spare = 0x00; | |||
|
58 | packet.mode = mode; | |||
|
59 | packet.enterModeTime[0] = 0x00; | |||
|
60 | packet.enterModeTime[1] = 0x00; | |||
|
61 | packet.enterModeTime[2] = 0x00; | |||
|
62 | packet.enterModeTime[3] = 0x00; | |||
|
63 | packet.enterModeTime[4] = 0x00; | |||
|
64 | packet.enterModeTime[5] = 0x00; | |||
|
65 | ||||
|
66 | parameterDump->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes, | |||
|
67 | PACKET_LENGTH_TC_LFR_ENTER_MODE + CCSDS_TC_TM_PACKET_OFFSET - 2); | |||
|
68 | packet.crc[0] = crcAsTwoBytes[0]; | |||
|
69 | packet.crc[1] = crcAsTwoBytes[1]; | |||
|
70 | ||||
|
71 | emit WriteSPWSig((char*) &packet, PACKET_LENGTH_TC_LFR_ENTER_MODE + CCSDS_TC_TM_PACKET_OFFSET, | |||
|
72 | CCSDS_NODE_ADDRESS, CCSDS_USER_APP); | |||
|
73 | } | |||
|
74 | ||||
|
75 | void EnterMode::enterModeStandby() | |||
|
76 | { | |||
|
77 | sendEnterMode( 0 ); | |||
|
78 | } | |||
|
79 | ||||
|
80 | void EnterMode::enterModeNormal() | |||
|
81 | { | |||
|
82 | sendEnterMode( 1 ); | |||
|
83 | } | |||
|
84 | void EnterMode::enterModeBurst() | |||
|
85 | { | |||
|
86 | sendEnterMode( 2 ); | |||
|
87 | } | |||
|
88 | void EnterMode::enterModeSBM1() | |||
|
89 | { | |||
|
90 | sendEnterMode( 3 ); | |||
|
91 | } | |||
|
92 | void EnterMode::enterModeSBM2() | |||
|
93 | { | |||
|
94 | sendEnterMode( 4 ); | |||
|
95 | } |
@@ -0,0 +1,45 | |||||
|
1 | #ifndef ENTERMODE_H | |||
|
2 | #define ENTERMODE_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <QPushButton> | |||
|
6 | #include <QGridLayout> | |||
|
7 | #include <QGroupBox> | |||
|
8 | ||||
|
9 | #include <TC_types.h> | |||
|
10 | #include <parameterdump.h> | |||
|
11 | ||||
|
12 | class EnterMode : public QWidget | |||
|
13 | { | |||
|
14 | Q_OBJECT | |||
|
15 | public: | |||
|
16 | explicit EnterMode(QWidget *parent = 0); | |||
|
17 | ||||
|
18 | void sendEnterMode(unsigned char mode); | |||
|
19 | ||||
|
20 | QPushButton *button_enterModeStandby; | |||
|
21 | QPushButton *button_enterModeNormal; | |||
|
22 | QPushButton *button_enterModeBurst; | |||
|
23 | QPushButton *button_enterModeSBM1; | |||
|
24 | QPushButton *button_enterModeSBM2; | |||
|
25 | ||||
|
26 | QGridLayout *mainLayout; | |||
|
27 | QGridLayout *overallLayout; | |||
|
28 | ||||
|
29 | QGroupBox *groupBox; | |||
|
30 | ||||
|
31 | ParameterDump *parameterDump; | |||
|
32 | ||||
|
33 | signals: | |||
|
34 | unsigned int WriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |||
|
35 | ||||
|
36 | public slots: | |||
|
37 | void enterModeStandby(); | |||
|
38 | void enterModeNormal(); | |||
|
39 | void enterModeBurst(); | |||
|
40 | void enterModeSBM1(); | |||
|
41 | void enterModeSBM2(); | |||
|
42 | ||||
|
43 | }; | |||
|
44 | ||||
|
45 | #endif // ENTERMODE_H |
@@ -0,0 +1,28 | |||||
|
1 | #include "lfractions.h" | |||
|
2 | ||||
|
3 | LFRActions::LFRActions(QWidget *parent) : | |||
|
4 | QWidget(parent) | |||
|
5 | { | |||
|
6 | mainLayout = new QGridLayout(); | |||
|
7 | enterMode = new EnterMode(); | |||
|
8 | parameterDump = new ParameterDump(); | |||
|
9 | ||||
|
10 | parameterDump->actionsSetEnabled(true); | |||
|
11 | ||||
|
12 | mainLayout->addWidget(parameterDump, 0, 0, 1, 1); | |||
|
13 | mainLayout->addWidget(enterMode, 0, 1, 1, 1); | |||
|
14 | ||||
|
15 | mainLayout->setColumnStretch(2, 1); | |||
|
16 | mainLayout->setRowStretch(1, 1); | |||
|
17 | ||||
|
18 | this->setLayout(mainLayout); | |||
|
19 | ||||
|
20 | connect(this->enterMode, SIGNAL(WriteSPWSig(char*,uint,char,char)), | |||
|
21 | this, SLOT(reEmitWriteSPWSig(char*,uint,char,char))); | |||
|
22 | connect(this->parameterDump, SIGNAL(WriteSPWSig(char*,uint,char,char)), | |||
|
23 | this, SLOT(reEmitWriteSPWSig(char*,uint,char,char))); | |||
|
24 | } | |||
|
25 | ||||
|
26 | void LFRActions::reEmitWriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication){ | |||
|
27 | emit WriteSPWSig( Value, count, targetLogicalAddress, userApplication); | |||
|
28 | } |
@@ -0,0 +1,29 | |||||
|
1 | #ifndef LFRACTIONS_H | |||
|
2 | #define LFRACTIONS_H | |||
|
3 | ||||
|
4 | #include <QWidget> | |||
|
5 | #include <QGridLayout> | |||
|
6 | ||||
|
7 | #include <parameterdump.h> | |||
|
8 | ||||
|
9 | #include "entermode.h" | |||
|
10 | ||||
|
11 | class LFRActions : public QWidget | |||
|
12 | { | |||
|
13 | Q_OBJECT | |||
|
14 | public: | |||
|
15 | explicit LFRActions(QWidget *parent = 0); | |||
|
16 | ||||
|
17 | QGridLayout *mainLayout; | |||
|
18 | EnterMode *enterMode; | |||
|
19 | ParameterDump *parameterDump; | |||
|
20 | ||||
|
21 | signals: | |||
|
22 | unsigned int WriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |||
|
23 | ||||
|
24 | public slots: | |||
|
25 | void reEmitWriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |||
|
26 | ||||
|
27 | }; | |||
|
28 | ||||
|
29 | #endif // LFRACTIONS_H |
@@ -1,142 +1,142 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: PAULs_LPPMON_PLUGINS |
|
2 | # Makefile for building: PAULs_LPPMON_PLUGINS | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.4) on: Wed Jul |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Wed Jul 31 09:19:17 2013 | |
4 | # Project: PAULs_LPPMON_PLUGINS.pro |
|
4 | # Project: PAULs_LPPMON_PLUGINS.pro | |
5 | # Template: subdirs |
|
5 | # Template: subdirs | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | first: make_default |
|
9 | first: make_default | |
10 | MAKEFILE = Makefile |
|
10 | MAKEFILE = Makefile | |
11 | QMAKE = /usr/bin/qmake-qt4 |
|
11 | QMAKE = /usr/bin/qmake-qt4 | |
12 | DEL_FILE = rm -f |
|
12 | DEL_FILE = rm -f | |
13 | CHK_DIR_EXISTS= test -d |
|
13 | CHK_DIR_EXISTS= test -d | |
14 | MKDIR = mkdir -p |
|
14 | MKDIR = mkdir -p | |
15 | COPY = cp -f |
|
15 | COPY = cp -f | |
16 | COPY_FILE = $(COPY) |
|
16 | COPY_FILE = $(COPY) | |
17 | COPY_DIR = $(COPY) -r |
|
17 | COPY_DIR = $(COPY) -r | |
18 | INSTALL_FILE = install -m 644 -p |
|
18 | INSTALL_FILE = install -m 644 -p | |
19 | INSTALL_PROGRAM = install -m 755 -p |
|
19 | INSTALL_PROGRAM = install -m 755 -p | |
20 | INSTALL_DIR = $(COPY_DIR) |
|
20 | INSTALL_DIR = $(COPY_DIR) | |
21 | DEL_FILE = rm -f |
|
21 | DEL_FILE = rm -f | |
22 | SYMLINK = ln -f -s |
|
22 | SYMLINK = ln -f -s | |
23 | DEL_DIR = rmdir |
|
23 | DEL_DIR = rmdir | |
24 | MOVE = mv -f |
|
24 | MOVE = mv -f | |
25 | CHK_DIR_EXISTS= test -d |
|
25 | CHK_DIR_EXISTS= test -d | |
26 | MKDIR = mkdir -p |
|
26 | MKDIR = mkdir -p | |
27 | SUBTARGETS = \ |
|
27 | SUBTARGETS = \ | |
28 | sub-rmapplugin |
|
28 | sub-rmapplugin | |
29 |
|
29 | |||
30 | rmapplugin/$(MAKEFILE): |
|
30 | rmapplugin/$(MAKEFILE): | |
31 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ |
|
31 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ | |
32 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) |
|
32 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) | |
33 | sub-rmapplugin-qmake_all: FORCE |
|
33 | sub-rmapplugin-qmake_all: FORCE | |
34 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ |
|
34 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ | |
35 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) |
|
35 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) | |
36 | sub-rmapplugin: rmapplugin/$(MAKEFILE) FORCE |
|
36 | sub-rmapplugin: rmapplugin/$(MAKEFILE) FORCE | |
37 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
37 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) | |
38 | sub-rmapplugin-make_default-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
38 | sub-rmapplugin-make_default-ordered: rmapplugin/$(MAKEFILE) FORCE | |
39 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
39 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) | |
40 | sub-rmapplugin-make_default: rmapplugin/$(MAKEFILE) FORCE |
|
40 | sub-rmapplugin-make_default: rmapplugin/$(MAKEFILE) FORCE | |
41 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
41 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) | |
42 | sub-rmapplugin-make_first-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
42 | sub-rmapplugin-make_first-ordered: rmapplugin/$(MAKEFILE) FORCE | |
43 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first |
|
43 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first | |
44 | sub-rmapplugin-make_first: rmapplugin/$(MAKEFILE) FORCE |
|
44 | sub-rmapplugin-make_first: rmapplugin/$(MAKEFILE) FORCE | |
45 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first |
|
45 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first | |
46 | sub-rmapplugin-all-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
46 | sub-rmapplugin-all-ordered: rmapplugin/$(MAKEFILE) FORCE | |
47 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all |
|
47 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all | |
48 | sub-rmapplugin-all: rmapplugin/$(MAKEFILE) FORCE |
|
48 | sub-rmapplugin-all: rmapplugin/$(MAKEFILE) FORCE | |
49 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all |
|
49 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all | |
50 | sub-rmapplugin-clean-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
50 | sub-rmapplugin-clean-ordered: rmapplugin/$(MAKEFILE) FORCE | |
51 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean |
|
51 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean | |
52 | sub-rmapplugin-clean: rmapplugin/$(MAKEFILE) FORCE |
|
52 | sub-rmapplugin-clean: rmapplugin/$(MAKEFILE) FORCE | |
53 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean |
|
53 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean | |
54 | sub-rmapplugin-distclean-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
54 | sub-rmapplugin-distclean-ordered: rmapplugin/$(MAKEFILE) FORCE | |
55 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean |
|
55 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean | |
56 | sub-rmapplugin-distclean: rmapplugin/$(MAKEFILE) FORCE |
|
56 | sub-rmapplugin-distclean: rmapplugin/$(MAKEFILE) FORCE | |
57 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean |
|
57 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean | |
58 | sub-rmapplugin-install_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
58 | sub-rmapplugin-install_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE | |
59 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install |
|
59 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install | |
60 | sub-rmapplugin-install_subtargets: rmapplugin/$(MAKEFILE) FORCE |
|
60 | sub-rmapplugin-install_subtargets: rmapplugin/$(MAKEFILE) FORCE | |
61 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install |
|
61 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install | |
62 | sub-rmapplugin-uninstall_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
62 | sub-rmapplugin-uninstall_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE | |
63 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall |
|
63 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall | |
64 | sub-rmapplugin-uninstall_subtargets: rmapplugin/$(MAKEFILE) FORCE |
|
64 | sub-rmapplugin-uninstall_subtargets: rmapplugin/$(MAKEFILE) FORCE | |
65 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall |
|
65 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall | |
66 |
|
66 | |||
67 | Makefile: PAULs_LPPMON_PLUGINS.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
67 | Makefile: PAULs_LPPMON_PLUGINS.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
68 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
68 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
69 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
69 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
70 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
70 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
71 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
71 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
72 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
72 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
73 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
73 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
74 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
74 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
75 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
75 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
76 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
76 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
77 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
77 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
78 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
78 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
79 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
79 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
81 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
81 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
82 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
82 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
83 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
83 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
84 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
91 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
91 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro | |
92 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
92 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
93 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
93 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
94 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
94 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
95 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
95 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
96 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
96 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
97 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
97 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
98 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
98 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
99 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
99 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
100 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
100 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
101 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
101 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
102 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
102 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
103 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
103 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
104 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
104 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
105 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
105 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
106 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
106 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
107 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
107 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
108 | /usr/lib64/qt4/mkspecs/features/qt.prf: |
|
108 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |
109 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: |
|
109 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |
110 | /usr/lib64/qt4/mkspecs/features/moc.prf: |
|
110 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |
111 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
111 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
112 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
112 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
113 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
113 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
114 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
114 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
115 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
115 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
116 | qmake: qmake_all FORCE |
|
116 | qmake: qmake_all FORCE | |
117 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
117 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro | |
118 |
|
118 | |||
119 | qmake_all: sub-rmapplugin-qmake_all FORCE |
|
119 | qmake_all: sub-rmapplugin-qmake_all FORCE | |
120 |
|
120 | |||
121 | make_default: sub-rmapplugin-make_default-ordered FORCE |
|
121 | make_default: sub-rmapplugin-make_default-ordered FORCE | |
122 | make_first: sub-rmapplugin-make_first-ordered FORCE |
|
122 | make_first: sub-rmapplugin-make_first-ordered FORCE | |
123 | all: sub-rmapplugin-all-ordered FORCE |
|
123 | all: sub-rmapplugin-all-ordered FORCE | |
124 | clean: sub-rmapplugin-clean-ordered FORCE |
|
124 | clean: sub-rmapplugin-clean-ordered FORCE | |
125 | distclean: sub-rmapplugin-distclean-ordered FORCE |
|
125 | distclean: sub-rmapplugin-distclean-ordered FORCE | |
126 | -$(DEL_FILE) Makefile |
|
126 | -$(DEL_FILE) Makefile | |
127 | install_subtargets: sub-rmapplugin-install_subtargets-ordered FORCE |
|
127 | install_subtargets: sub-rmapplugin-install_subtargets-ordered FORCE | |
128 | uninstall_subtargets: sub-rmapplugin-uninstall_subtargets-ordered FORCE |
|
128 | uninstall_subtargets: sub-rmapplugin-uninstall_subtargets-ordered FORCE | |
129 |
|
129 | |||
130 | sub-rmapplugin-check_ordered: rmapplugin/$(MAKEFILE) |
|
130 | sub-rmapplugin-check_ordered: rmapplugin/$(MAKEFILE) | |
131 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) check |
|
131 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) check | |
132 | check: sub-rmapplugin-check_ordered |
|
132 | check: sub-rmapplugin-check_ordered | |
133 |
|
133 | |||
134 | mocclean: compiler_moc_header_clean compiler_moc_source_clean |
|
134 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |
135 |
|
135 | |||
136 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all |
|
136 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |
137 | install: install_subtargets FORCE |
|
137 | install: install_subtargets FORCE | |
138 |
|
138 | |||
139 | uninstall: uninstall_subtargets FORCE |
|
139 | uninstall: uninstall_subtargets FORCE | |
140 |
|
140 | |||
141 | FORCE: |
|
141 | FORCE: | |
142 |
|
142 |
@@ -1,195 +1,197 | |||||
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 QtCreator 2. |
|
3 | <!-- Written by QtCreator 2.8.0, 2013-08-01T14:58:01. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">0</value> |
|
7 | <value type="int">0</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | |
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
16 |
<value type="Q |
|
16 | <value type="QString" key="language">Cpp</value> | |
17 | <valuemap type="QVariantMap" key="value"> |
|
17 | <valuemap type="QVariantMap" key="value"> | |
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | </valuemap> |
|
20 | </valuemap> | |
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
22 |
<value type="Q |
|
22 | <value type="QString" key="language">QmlJS</value> | |
23 | <valuemap type="QVariantMap" key="value"> |
|
23 | <valuemap type="QVariantMap" key="value"> | |
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | </valuemap> |
|
26 | </valuemap> | |
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
|
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | |
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
45 | </valuemap> |
|
45 | </valuemap> | |
46 | </data> |
|
46 | </data> | |
47 | <data> |
|
47 | <data> | |
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
49 | <valuemap type="QVariantMap"/> |
|
49 | <valuemap type="QVariantMap"/> | |
50 | </data> |
|
50 | </data> | |
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
56 |
<value type="Q |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
66 |
<value type="Q |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
71 | </valuemap> |
|
71 | </valuemap> | |
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
76 |
<value type="Q |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
78 | <value type="QString">-w</value> |
|
78 | <value type="QString">-w</value> | |
79 | <value type="QString">-r</value> |
|
79 | <value type="QString">-r</value> | |
80 | </valuelist> |
|
80 | </valuelist> | |
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> |
|
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
84 | </valuemap> |
|
84 | </valuemap> | |
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
88 |
<value type="Q |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
89 | </valuemap> |
|
89 | </valuemap> | |
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
95 |
<value type="Q |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
97 | <value type="QString">-w</value> |
|
97 | <value type="QString">-w</value> | |
98 | <value type="QString">-r</value> |
|
98 | <value type="QString">-r</value> | |
99 | </valuelist> |
|
99 | </valuelist> | |
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> |
|
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
103 | </valuemap> |
|
103 | </valuemap> | |
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
107 |
<value type="Q |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
108 | </valuemap> |
|
108 | </valuemap> | |
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
114 |
<value type="Q |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> |
|
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
125 |
<value type="Q |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
126 | </valuemap> |
|
126 | </valuemap> | |
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
130 |
<value type="Q |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
131 | </valuemap> |
|
131 | </valuemap> | |
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |||
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
134 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
135 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
136 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
141 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
143 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
144 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
144 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
145 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
146 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
147 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
147 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
148 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
148 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
149 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
149 | <value type="int">0</value> |
|
150 | <value type="int">0</value> | |
150 | <value type="int">1</value> |
|
151 | <value type="int">1</value> | |
151 | <value type="int">2</value> |
|
152 | <value type="int">2</value> | |
152 | <value type="int">3</value> |
|
153 | <value type="int">3</value> | |
153 | <value type="int">4</value> |
|
154 | <value type="int">4</value> | |
154 | <value type="int">5</value> |
|
155 | <value type="int">5</value> | |
155 | <value type="int">6</value> |
|
156 | <value type="int">6</value> | |
156 | <value type="int">7</value> |
|
157 | <value type="int">7</value> | |
157 | <value type="int">8</value> |
|
158 | <value type="int">8</value> | |
158 | <value type="int">9</value> |
|
159 | <value type="int">9</value> | |
159 | <value type="int">10</value> |
|
160 | <value type="int">10</value> | |
160 | <value type="int">11</value> |
|
161 | <value type="int">11</value> | |
161 | <value type="int">12</value> |
|
162 | <value type="int">12</value> | |
162 | <value type="int">13</value> |
|
163 | <value type="int">13</value> | |
163 | <value type="int">14</value> |
|
164 | <value type="int">14</value> | |
164 | </valuelist> |
|
165 | </valuelist> | |
|
166 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |||
|
167 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |||
165 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
168 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> | |
166 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> |
|
|||
167 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">lppmon</value> |
|
169 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">lppmon</value> | |
168 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> |
|
170 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> | |
169 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> |
|
|||
170 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> |
|
171 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run lppmon</value> |
|
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run lppmon</value> | |
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
173 |
<value type="Q |
|
174 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> | |
174 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
175 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
175 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
176 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
|
177 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |||
176 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
178 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
177 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
179 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
178 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
180 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
179 | </valuemap> |
|
181 | </valuemap> | |
180 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
182 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
181 | </valuemap> |
|
183 | </valuemap> | |
182 | </data> |
|
184 | </data> | |
183 | <data> |
|
185 | <data> | |
184 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
186 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
185 | <value type="int">1</value> |
|
187 | <value type="int">1</value> | |
186 | </data> |
|
188 | </data> | |
187 | <data> |
|
189 | <data> | |
188 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
190 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
189 |
<value type="Q |
|
191 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
190 | </data> |
|
192 | </data> | |
191 | <data> |
|
193 | <data> | |
192 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
194 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
193 |
<value type="int">1 |
|
195 | <value type="int">14</value> | |
194 | </data> |
|
196 | </data> | |
195 | </qtcreator> |
|
197 | </qtcreator> |
@@ -1,409 +1,391 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 |
# Makefile for building: lfrsgse |
|
2 | # Makefile for building: lfrsgse | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.4) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Aug 1 07:46:21 2013 | |
4 | # Project: gselesia.pro |
|
4 | # Project: gselesia.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | ####### Compiler, tools and options |
|
9 | ####### Compiler, tools and options | |
10 |
|
10 | |||
11 | CC = gcc |
|
11 | CC = gcc | |
12 | CXX = g++ |
|
12 | CXX = g++ | |
13 | DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED |
|
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 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT $(DEFINES) |
|
14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -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 -grecord-gcc-switches -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 -grecord-gcc-switches -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. |
|
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/usr/include/lppmon/parameterdump -I. | |
17 | LINK = g++ |
|
17 | LINK = g++ | |
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro |
|
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro | |
19 | LIBS = $(SUBLIBS) -L/usr/lib64 -llppmoncommon -lwfdisplay -lqwt5-qt4 -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread |
|
19 | LIBS = $(SUBLIBS) -L/usr/lib64 -llppmoncommon -lwfdisplay -lqwt5-qt4 -lparameterdump -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread | |
20 | AR = ar cqs |
|
20 | AR = ar cqs | |
21 | RANLIB = |
|
21 | RANLIB = | |
22 | QMAKE = /usr/bin/qmake-qt4 |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
23 | TAR = tar -cf |
|
23 | TAR = tar -cf | |
24 | COMPRESS = gzip -9f |
|
24 | COMPRESS = gzip -9f | |
25 | COPY = cp -f |
|
25 | COPY = cp -f | |
26 | SED = sed |
|
26 | SED = sed | |
27 | COPY_FILE = $(COPY) |
|
27 | COPY_FILE = $(COPY) | |
28 | COPY_DIR = $(COPY) -r |
|
28 | COPY_DIR = $(COPY) -r | |
29 | STRIP = |
|
29 | STRIP = | |
30 | INSTALL_FILE = install -m 644 -p |
|
30 | INSTALL_FILE = install -m 644 -p | |
31 | INSTALL_DIR = $(COPY_DIR) |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
32 | INSTALL_PROGRAM = install -m 755 -p |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
33 | DEL_FILE = rm -f |
|
33 | DEL_FILE = rm -f | |
34 | SYMLINK = ln -f -s |
|
34 | SYMLINK = ln -f -s | |
35 | DEL_DIR = rmdir |
|
35 | DEL_DIR = rmdir | |
36 | MOVE = mv -f |
|
36 | MOVE = mv -f | |
37 | CHK_DIR_EXISTS= test -d |
|
37 | CHK_DIR_EXISTS= test -d | |
38 | MKDIR = mkdir -p |
|
38 | MKDIR = mkdir -p | |
39 |
|
39 | |||
40 | ####### Output directory |
|
40 | ####### Output directory | |
41 |
|
41 | |||
42 | OBJECTS_DIR = ./ |
|
42 | OBJECTS_DIR = ./ | |
43 |
|
43 | |||
44 | ####### Files |
|
44 | ####### Files | |
45 |
|
45 | |||
46 | SOURCES = main.cpp \ |
|
46 | SOURCES = main.cpp \ | |
47 | mainwindow.cpp \ |
|
47 | mainwindow.cpp \ | |
48 | mainwindowui.cpp \ |
|
48 | mainwindowui.cpp \ | |
49 | ../common_PLE/qipdialogbox.cpp \ |
|
|||
50 | lfrxmlhandler.cpp \ |
|
49 | lfrxmlhandler.cpp \ | |
51 | lfrxmlwriter.cpp \ |
|
50 | lfrxmlwriter.cpp \ | |
52 | ../rmapplugin/tmstatistics.cpp \ |
|
51 | ../rmapplugin/tmstatistics.cpp \ | |
53 | ../rmapplugin/tmpackettoread.cpp \ |
|
52 | ../rmapplugin/tmpackettoread.cpp \ | |
54 | ../rmapplugin/wfpacket.cpp \ |
|
53 | ../rmapplugin/wfpacket.cpp \ | |
55 | ../rmapplugin/spectrapacket.cpp \ |
|
54 | ../rmapplugin/spectrapacket.cpp \ | |
|
55 | ../common_PLE/qipdialogbox.cpp \ | |||
56 | ../common_PLE/hkdisplay.cpp \ |
|
56 | ../common_PLE/hkdisplay.cpp \ | |
57 | lfrxmlparser.cpp \ |
|
57 | lfrxmlparser.cpp \ | |
58 | lfrspectrogram.cpp \ |
|
58 | lfrspectrogram.cpp moc_mainwindow.cpp \ | |
59 | parameterdump.cpp moc_mainwindow.cpp \ |
|
|||
60 | moc_mainwindowui.cpp \ |
|
59 | moc_mainwindowui.cpp \ | |
61 | moc_qipdialogbox.cpp \ |
|
|||
62 | moc_lfrxmlhandler.cpp \ |
|
60 | moc_lfrxmlhandler.cpp \ | |
63 | moc_lfrxmlwriter.cpp \ |
|
61 | moc_lfrxmlwriter.cpp \ | |
64 | moc_tmstatistics.cpp \ |
|
62 | moc_tmstatistics.cpp \ | |
65 | moc_tmpackettoread.cpp \ |
|
63 | moc_tmpackettoread.cpp \ | |
66 | moc_wfpacket.cpp \ |
|
64 | moc_wfpacket.cpp \ | |
67 | moc_spectrapacket.cpp \ |
|
65 | moc_spectrapacket.cpp \ | |
|
66 | moc_qipdialogbox.cpp \ | |||
68 | moc_hkdisplay.cpp \ |
|
67 | moc_hkdisplay.cpp \ | |
69 | moc_lfrxmlparser.cpp \ |
|
68 | moc_lfrxmlparser.cpp \ | |
70 |
moc_lfrspectrogram.cpp |
|
69 | moc_lfrspectrogram.cpp | |
71 | moc_parameterdump.cpp |
|
|||
72 | OBJECTS = main.o \ |
|
70 | OBJECTS = main.o \ | |
73 | mainwindow.o \ |
|
71 | mainwindow.o \ | |
74 | mainwindowui.o \ |
|
72 | mainwindowui.o \ | |
75 | qipdialogbox.o \ |
|
|||
76 | lfrxmlhandler.o \ |
|
73 | lfrxmlhandler.o \ | |
77 | lfrxmlwriter.o \ |
|
74 | lfrxmlwriter.o \ | |
78 | tmstatistics.o \ |
|
75 | tmstatistics.o \ | |
79 | tmpackettoread.o \ |
|
76 | tmpackettoread.o \ | |
80 | wfpacket.o \ |
|
77 | wfpacket.o \ | |
81 | spectrapacket.o \ |
|
78 | spectrapacket.o \ | |
|
79 | qipdialogbox.o \ | |||
82 | hkdisplay.o \ |
|
80 | hkdisplay.o \ | |
83 | lfrxmlparser.o \ |
|
81 | lfrxmlparser.o \ | |
84 | lfrspectrogram.o \ |
|
82 | lfrspectrogram.o \ | |
85 | parameterdump.o \ |
|
|||
86 | moc_mainwindow.o \ |
|
83 | moc_mainwindow.o \ | |
87 | moc_mainwindowui.o \ |
|
84 | moc_mainwindowui.o \ | |
88 | moc_qipdialogbox.o \ |
|
|||
89 | moc_lfrxmlhandler.o \ |
|
85 | moc_lfrxmlhandler.o \ | |
90 | moc_lfrxmlwriter.o \ |
|
86 | moc_lfrxmlwriter.o \ | |
91 | moc_tmstatistics.o \ |
|
87 | moc_tmstatistics.o \ | |
92 | moc_tmpackettoread.o \ |
|
88 | moc_tmpackettoread.o \ | |
93 | moc_wfpacket.o \ |
|
89 | moc_wfpacket.o \ | |
94 | moc_spectrapacket.o \ |
|
90 | moc_spectrapacket.o \ | |
|
91 | moc_qipdialogbox.o \ | |||
95 | moc_hkdisplay.o \ |
|
92 | moc_hkdisplay.o \ | |
96 | moc_lfrxmlparser.o \ |
|
93 | moc_lfrxmlparser.o \ | |
97 |
moc_lfrspectrogram.o |
|
94 | moc_lfrspectrogram.o | |
98 | moc_parameterdump.o |
|
|||
99 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
95 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
100 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
96 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
101 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
97 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
102 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
98 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
103 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
99 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
104 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
100 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
105 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
101 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
106 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
102 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
107 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
103 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
108 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
104 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
109 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
105 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
110 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
106 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
111 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
107 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
112 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
108 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
113 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
109 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
114 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
110 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
115 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
111 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
116 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
112 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
117 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
113 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
118 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
114 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
119 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
115 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
120 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
116 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
121 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
117 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
122 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
118 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
123 | gselesia.pro |
|
119 | gselesia.pro | |
124 |
QMAKE_TARGET = lfrsgse |
|
120 | QMAKE_TARGET = lfrsgse | |
125 | DESTDIR = |
|
121 | DESTDIR = | |
126 |
TARGET = lfrsgse |
|
122 | TARGET = lfrsgse | |
127 |
|
123 | |||
128 | first: all |
|
124 | first: all | |
129 | ####### Implicit rules |
|
125 | ####### Implicit rules | |
130 |
|
126 | |||
131 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
127 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
132 |
|
128 | |||
133 | .cpp.o: |
|
129 | .cpp.o: | |
134 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
130 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
135 |
|
131 | |||
136 | .cc.o: |
|
132 | .cc.o: | |
137 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
133 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
138 |
|
134 | |||
139 | .cxx.o: |
|
135 | .cxx.o: | |
140 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
136 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
141 |
|
137 | |||
142 | .C.o: |
|
138 | .C.o: | |
143 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
139 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
144 |
|
140 | |||
145 | .c.o: |
|
141 | .c.o: | |
146 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
142 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
147 |
|
143 | |||
148 | ####### Build rules |
|
144 | ####### Build rules | |
149 |
|
145 | |||
150 | all: Makefile $(TARGET) |
|
146 | all: Makefile $(TARGET) | |
151 |
|
147 | |||
152 | $(TARGET): $(OBJECTS) |
|
148 | $(TARGET): $(OBJECTS) | |
153 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
149 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
154 |
|
150 | |||
155 | Makefile: gselesia.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
151 | Makefile: gselesia.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
156 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
152 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
157 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
153 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
158 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
154 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
159 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
155 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
160 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
156 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
161 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
157 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
162 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
158 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
163 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
159 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
164 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
160 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
165 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
161 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
166 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
162 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
167 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
163 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
168 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
164 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
169 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
165 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
170 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
166 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
171 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
167 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
172 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
168 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
173 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
169 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
174 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
170 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
175 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
171 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
176 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
172 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
177 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
173 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
178 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
174 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
179 | /usr/lib64/libQtXml.prl \ |
|
175 | /usr/lib64/libQtXml.prl \ | |
180 | /usr/lib64/libQtCore.prl \ |
|
176 | /usr/lib64/libQtCore.prl \ | |
181 | /usr/lib64/libQtGui.prl \ |
|
177 | /usr/lib64/libQtGui.prl \ | |
182 | /usr/lib64/libQtNetwork.prl |
|
178 | /usr/lib64/libQtNetwork.prl | |
183 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro |
|
179 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |
184 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
180 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
185 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
181 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
186 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
182 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
187 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
183 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
188 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
184 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
189 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
185 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
190 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
186 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
191 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
187 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
192 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
188 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
193 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
189 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
194 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
190 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
195 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
191 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
196 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
192 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
197 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
193 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
198 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
194 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
199 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
195 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
200 | /usr/lib64/qt4/mkspecs/features/qt.prf: |
|
196 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |
201 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: |
|
197 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |
202 | /usr/lib64/qt4/mkspecs/features/moc.prf: |
|
198 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |
203 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
199 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
204 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
200 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
205 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
201 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
206 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
202 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
207 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
203 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
208 | /usr/lib64/libQtXml.prl: |
|
204 | /usr/lib64/libQtXml.prl: | |
209 | /usr/lib64/libQtCore.prl: |
|
205 | /usr/lib64/libQtCore.prl: | |
210 | /usr/lib64/libQtGui.prl: |
|
206 | /usr/lib64/libQtGui.prl: | |
211 | /usr/lib64/libQtNetwork.prl: |
|
207 | /usr/lib64/libQtNetwork.prl: | |
212 | qmake: FORCE |
|
208 | qmake: FORCE | |
213 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro |
|
209 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |
214 |
|
210 | |||
215 | dist: |
|
211 | dist: | |
216 |
@$(CHK_DIR_EXISTS) .tmp/lfrsgse |
|
212 | @$(CHK_DIR_EXISTS) .tmp/lfrsgse1.0.0 || $(MKDIR) .tmp/lfrsgse1.0.0 | |
217 |
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/lfrsgse |
|
213 | $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/lfrsgse1.0.0/ && $(COPY_FILE) --parents mainwindow.h mainwindowui.h lfrxmlhandler.h lfrxmlwriter.h ../rmapplugin/tmstatistics.h ../rmapplugin/tmpackettoread.h ../rmapplugin/wfpacket.h ../rmapplugin/spectrapacket.h ../common_PLE/qipdialogbox.h ../common_PLE/hkdisplay.h ../rmapplugin/params.h ../../DEV_PLE/header/TC_types.h ../../DEV_PLE/header/ccsds_types.h lfrxmlparser.h lfrspectrogram.h .tmp/lfrsgse1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp mainwindowui.cpp lfrxmlhandler.cpp lfrxmlwriter.cpp ../rmapplugin/tmstatistics.cpp ../rmapplugin/tmpackettoread.cpp ../rmapplugin/wfpacket.cpp ../rmapplugin/spectrapacket.cpp ../common_PLE/qipdialogbox.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 | |
218 |
|
214 | |||
219 |
|
215 | |||
220 | clean:compiler_clean |
|
216 | clean:compiler_clean | |
221 | -$(DEL_FILE) $(OBJECTS) |
|
217 | -$(DEL_FILE) $(OBJECTS) | |
222 | -$(DEL_FILE) *~ core *.core |
|
218 | -$(DEL_FILE) *~ core *.core | |
223 |
|
219 | |||
224 |
|
220 | |||
225 | ####### Sub-libraries |
|
221 | ####### Sub-libraries | |
226 |
|
222 | |||
227 | distclean: clean |
|
223 | distclean: clean | |
228 | -$(DEL_FILE) $(TARGET) |
|
224 | -$(DEL_FILE) $(TARGET) | |
229 | -$(DEL_FILE) Makefile |
|
225 | -$(DEL_FILE) Makefile | |
230 |
|
226 | |||
231 |
|
227 | |||
232 | check: first |
|
228 | check: first | |
233 |
|
229 | |||
234 | mocclean: compiler_moc_header_clean compiler_moc_source_clean |
|
230 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |
235 |
|
231 | |||
236 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all |
|
232 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |
237 |
|
233 | |||
238 | 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_spectrapacket.cpp moc_hkdisplay.cpp moc_lfrxmlparser.cpp moc_lfrspectrogram.cpp moc_parameterdump.cpp |
|
234 | compiler_moc_header_make_all: moc_mainwindow.cpp moc_mainwindowui.cpp moc_lfrxmlhandler.cpp moc_lfrxmlwriter.cpp moc_tmstatistics.cpp moc_tmpackettoread.cpp moc_wfpacket.cpp moc_spectrapacket.cpp moc_qipdialogbox.cpp moc_hkdisplay.cpp moc_lfrxmlparser.cpp moc_lfrspectrogram.cpp | |
239 | compiler_moc_header_clean: |
|
235 | compiler_moc_header_clean: | |
240 | -$(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_spectrapacket.cpp moc_hkdisplay.cpp moc_lfrxmlparser.cpp moc_lfrspectrogram.cpp moc_parameterdump.cpp |
|
236 | -$(DEL_FILE) moc_mainwindow.cpp moc_mainwindowui.cpp moc_lfrxmlhandler.cpp moc_lfrxmlwriter.cpp moc_tmstatistics.cpp moc_tmpackettoread.cpp moc_wfpacket.cpp moc_spectrapacket.cpp moc_qipdialogbox.cpp moc_hkdisplay.cpp moc_lfrxmlparser.cpp moc_lfrspectrogram.cpp | |
241 | moc_mainwindow.cpp: lfrxmlhandler.h \ |
|
237 | moc_mainwindow.cpp: lfrxmlhandler.h \ | |
242 | lfrxmlwriter.h \ |
|
238 | lfrxmlwriter.h \ | |
243 | mainwindowui.h \ |
|
239 | mainwindowui.h \ | |
244 | lfrspectrogram.h \ |
|
240 | lfrspectrogram.h \ | |
245 | parameterdump.h \ |
|
|||
246 | lfrxmlparser.h \ |
|
241 | lfrxmlparser.h \ | |
247 | mainwindow.h |
|
242 | mainwindow.h | |
248 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp |
|
243 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp | |
249 |
|
244 | |||
250 | moc_mainwindowui.cpp: lfrspectrogram.h \ |
|
245 | moc_mainwindowui.cpp: lfrspectrogram.h \ | |
251 | parameterdump.h \ |
|
|||
252 | mainwindowui.h |
|
246 | mainwindowui.h | |
253 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindowui.h -o moc_mainwindowui.cpp |
|
247 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindowui.h -o moc_mainwindowui.cpp | |
254 |
|
248 | |||
255 | moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h |
|
|||
256 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc_qipdialogbox.cpp |
|
|||
257 |
|
||||
258 | moc_lfrxmlhandler.cpp: lfrxmlhandler.h |
|
249 | moc_lfrxmlhandler.cpp: lfrxmlhandler.h | |
259 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlhandler.h -o moc_lfrxmlhandler.cpp |
|
250 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlhandler.h -o moc_lfrxmlhandler.cpp | |
260 |
|
251 | |||
261 | moc_lfrxmlwriter.cpp: lfrxmlwriter.h |
|
252 | moc_lfrxmlwriter.cpp: lfrxmlwriter.h | |
262 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlwriter.h -o moc_lfrxmlwriter.cpp |
|
253 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlwriter.h -o moc_lfrxmlwriter.cpp | |
263 |
|
254 | |||
264 | moc_tmstatistics.cpp: ../rmapplugin/tmstatistics.h |
|
255 | moc_tmstatistics.cpp: ../rmapplugin/tmstatistics.h | |
265 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/tmstatistics.h -o moc_tmstatistics.cpp |
|
256 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/tmstatistics.h -o moc_tmstatistics.cpp | |
266 |
|
257 | |||
267 | moc_tmpackettoread.cpp: ../rmapplugin/tmpackettoread.h |
|
258 | moc_tmpackettoread.cpp: ../rmapplugin/tmpackettoread.h | |
268 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/tmpackettoread.h -o moc_tmpackettoread.cpp |
|
259 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/tmpackettoread.h -o moc_tmpackettoread.cpp | |
269 |
|
260 | |||
270 | moc_wfpacket.cpp: ../rmapplugin/wfpacket.h |
|
261 | moc_wfpacket.cpp: ../rmapplugin/wfpacket.h | |
271 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/wfpacket.h -o moc_wfpacket.cpp |
|
262 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/wfpacket.h -o moc_wfpacket.cpp | |
272 |
|
263 | |||
273 | moc_spectrapacket.cpp: ../rmapplugin/spectrapacket.h |
|
264 | moc_spectrapacket.cpp: ../rmapplugin/spectrapacket.h | |
274 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/spectrapacket.h -o moc_spectrapacket.cpp |
|
265 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/spectrapacket.h -o moc_spectrapacket.cpp | |
275 |
|
266 | |||
|
267 | moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h | |||
|
268 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc_qipdialogbox.cpp | |||
|
269 | ||||
276 | moc_hkdisplay.cpp: ../common_PLE/hkdisplay.h |
|
270 | moc_hkdisplay.cpp: ../common_PLE/hkdisplay.h | |
277 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/hkdisplay.h -o moc_hkdisplay.cpp |
|
271 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/hkdisplay.h -o moc_hkdisplay.cpp | |
278 |
|
272 | |||
279 | moc_lfrxmlparser.cpp: lfrxmlparser.h |
|
273 | moc_lfrxmlparser.cpp: lfrxmlparser.h | |
280 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlparser.h -o moc_lfrxmlparser.cpp |
|
274 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlparser.h -o moc_lfrxmlparser.cpp | |
281 |
|
275 | |||
282 | moc_lfrspectrogram.cpp: lfrspectrogram.h |
|
276 | moc_lfrspectrogram.cpp: lfrspectrogram.h | |
283 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrspectrogram.h -o moc_lfrspectrogram.cpp |
|
277 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrspectrogram.h -o moc_lfrspectrogram.cpp | |
284 |
|
278 | |||
285 | moc_parameterdump.cpp: parameterdump.h |
|
|||
286 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) parameterdump.h -o moc_parameterdump.cpp |
|
|||
287 |
|
||||
288 | compiler_rcc_make_all: |
|
279 | compiler_rcc_make_all: | |
289 | compiler_rcc_clean: |
|
280 | compiler_rcc_clean: | |
290 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
281 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
291 | compiler_image_collection_clean: |
|
282 | compiler_image_collection_clean: | |
292 | -$(DEL_FILE) qmake_image_collection.cpp |
|
283 | -$(DEL_FILE) qmake_image_collection.cpp | |
293 | compiler_moc_source_make_all: |
|
284 | compiler_moc_source_make_all: | |
294 | compiler_moc_source_clean: |
|
285 | compiler_moc_source_clean: | |
295 | compiler_uic_make_all: |
|
286 | compiler_uic_make_all: | |
296 | compiler_uic_clean: |
|
287 | compiler_uic_clean: | |
297 | compiler_yacc_decl_make_all: |
|
288 | compiler_yacc_decl_make_all: | |
298 | compiler_yacc_decl_clean: |
|
289 | compiler_yacc_decl_clean: | |
299 | compiler_yacc_impl_make_all: |
|
290 | compiler_yacc_impl_make_all: | |
300 | compiler_yacc_impl_clean: |
|
291 | compiler_yacc_impl_clean: | |
301 | compiler_lex_make_all: |
|
292 | compiler_lex_make_all: | |
302 | compiler_lex_clean: |
|
293 | compiler_lex_clean: | |
303 | compiler_clean: compiler_moc_header_clean |
|
294 | compiler_clean: compiler_moc_header_clean | |
304 |
|
295 | |||
305 | ####### Compile |
|
296 | ####### Compile | |
306 |
|
297 | |||
307 | main.o: main.cpp mainwindow.h \ |
|
298 | main.o: main.cpp mainwindow.h \ | |
308 | lfrxmlhandler.h \ |
|
299 | lfrxmlhandler.h \ | |
309 | lfrxmlwriter.h \ |
|
300 | lfrxmlwriter.h \ | |
310 | mainwindowui.h \ |
|
301 | mainwindowui.h \ | |
311 | lfrspectrogram.h \ |
|
302 | lfrspectrogram.h \ | |
312 | parameterdump.h \ |
|
|||
313 | lfrxmlparser.h |
|
303 | lfrxmlparser.h | |
314 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp |
|
304 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp | |
315 |
|
305 | |||
316 | mainwindow.o: mainwindow.cpp mainwindow.h \ |
|
306 | mainwindow.o: mainwindow.cpp mainwindow.h \ | |
317 | lfrxmlhandler.h \ |
|
307 | lfrxmlhandler.h \ | |
318 | lfrxmlwriter.h \ |
|
308 | lfrxmlwriter.h \ | |
319 | mainwindowui.h \ |
|
309 | mainwindowui.h \ | |
320 | lfrspectrogram.h \ |
|
310 | lfrspectrogram.h \ | |
321 | parameterdump.h \ |
|
|||
322 | lfrxmlparser.h |
|
311 | lfrxmlparser.h | |
323 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp |
|
312 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp | |
324 |
|
313 | |||
325 | mainwindowui.o: mainwindowui.cpp mainwindowui.h \ |
|
314 | mainwindowui.o: mainwindowui.cpp mainwindowui.h \ | |
326 |
lfrspectrogram.h |
|
315 | lfrspectrogram.h | |
327 | parameterdump.h |
|
|||
328 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindowui.o mainwindowui.cpp |
|
316 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindowui.o mainwindowui.cpp | |
329 |
|
317 | |||
330 | qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h |
|
|||
331 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qipdialogbox.o ../common_PLE/qipdialogbox.cpp |
|
|||
332 |
|
||||
333 | lfrxmlhandler.o: lfrxmlhandler.cpp lfrxmlhandler.h |
|
318 | lfrxmlhandler.o: lfrxmlhandler.cpp lfrxmlhandler.h | |
334 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlhandler.o lfrxmlhandler.cpp |
|
319 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlhandler.o lfrxmlhandler.cpp | |
335 |
|
320 | |||
336 | lfrxmlwriter.o: lfrxmlwriter.cpp lfrxmlwriter.h |
|
321 | lfrxmlwriter.o: lfrxmlwriter.cpp lfrxmlwriter.h | |
337 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlwriter.o lfrxmlwriter.cpp |
|
322 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlwriter.o lfrxmlwriter.cpp | |
338 |
|
323 | |||
339 | tmstatistics.o: ../rmapplugin/tmstatistics.cpp ../rmapplugin/tmstatistics.h |
|
324 | tmstatistics.o: ../rmapplugin/tmstatistics.cpp ../rmapplugin/tmstatistics.h | |
340 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmstatistics.o ../rmapplugin/tmstatistics.cpp |
|
325 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmstatistics.o ../rmapplugin/tmstatistics.cpp | |
341 |
|
326 | |||
342 | tmpackettoread.o: ../rmapplugin/tmpackettoread.cpp ../rmapplugin/tmpackettoread.h |
|
327 | tmpackettoread.o: ../rmapplugin/tmpackettoread.cpp ../rmapplugin/tmpackettoread.h | |
343 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmpackettoread.o ../rmapplugin/tmpackettoread.cpp |
|
328 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmpackettoread.o ../rmapplugin/tmpackettoread.cpp | |
344 |
|
329 | |||
345 | wfpacket.o: ../rmapplugin/wfpacket.cpp ../rmapplugin/wfpacket.h |
|
330 | wfpacket.o: ../rmapplugin/wfpacket.cpp ../rmapplugin/wfpacket.h | |
346 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfpacket.o ../rmapplugin/wfpacket.cpp |
|
331 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfpacket.o ../rmapplugin/wfpacket.cpp | |
347 |
|
332 | |||
348 | spectrapacket.o: ../rmapplugin/spectrapacket.cpp ../rmapplugin/spectrapacket.h |
|
333 | spectrapacket.o: ../rmapplugin/spectrapacket.cpp ../rmapplugin/spectrapacket.h | |
349 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spectrapacket.o ../rmapplugin/spectrapacket.cpp |
|
334 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spectrapacket.o ../rmapplugin/spectrapacket.cpp | |
350 |
|
335 | |||
|
336 | qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h | |||
|
337 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qipdialogbox.o ../common_PLE/qipdialogbox.cpp | |||
|
338 | ||||
351 | hkdisplay.o: ../common_PLE/hkdisplay.cpp ../common_PLE/hkdisplay.h |
|
339 | hkdisplay.o: ../common_PLE/hkdisplay.cpp ../common_PLE/hkdisplay.h | |
352 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hkdisplay.o ../common_PLE/hkdisplay.cpp |
|
340 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hkdisplay.o ../common_PLE/hkdisplay.cpp | |
353 |
|
341 | |||
354 | lfrxmlparser.o: lfrxmlparser.cpp lfrxmlparser.h |
|
342 | lfrxmlparser.o: lfrxmlparser.cpp lfrxmlparser.h | |
355 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlparser.o lfrxmlparser.cpp |
|
343 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlparser.o lfrxmlparser.cpp | |
356 |
|
344 | |||
357 | lfrspectrogram.o: lfrspectrogram.cpp lfrspectrogram.h |
|
345 | lfrspectrogram.o: lfrspectrogram.cpp lfrspectrogram.h | |
358 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrspectrogram.o lfrspectrogram.cpp |
|
346 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrspectrogram.o lfrspectrogram.cpp | |
359 |
|
347 | |||
360 | parameterdump.o: parameterdump.cpp parameterdump.h |
|
|||
361 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o parameterdump.o parameterdump.cpp |
|
|||
362 |
|
||||
363 | moc_mainwindow.o: moc_mainwindow.cpp |
|
348 | moc_mainwindow.o: moc_mainwindow.cpp | |
364 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp |
|
349 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp | |
365 |
|
350 | |||
366 | moc_mainwindowui.o: moc_mainwindowui.cpp |
|
351 | moc_mainwindowui.o: moc_mainwindowui.cpp | |
367 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindowui.o moc_mainwindowui.cpp |
|
352 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindowui.o moc_mainwindowui.cpp | |
368 |
|
353 | |||
369 | moc_qipdialogbox.o: moc_qipdialogbox.cpp |
|
|||
370 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qipdialogbox.o moc_qipdialogbox.cpp |
|
|||
371 |
|
||||
372 | moc_lfrxmlhandler.o: moc_lfrxmlhandler.cpp |
|
354 | moc_lfrxmlhandler.o: moc_lfrxmlhandler.cpp | |
373 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlhandler.o moc_lfrxmlhandler.cpp |
|
355 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlhandler.o moc_lfrxmlhandler.cpp | |
374 |
|
356 | |||
375 | moc_lfrxmlwriter.o: moc_lfrxmlwriter.cpp |
|
357 | moc_lfrxmlwriter.o: moc_lfrxmlwriter.cpp | |
376 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlwriter.o moc_lfrxmlwriter.cpp |
|
358 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlwriter.o moc_lfrxmlwriter.cpp | |
377 |
|
359 | |||
378 | moc_tmstatistics.o: moc_tmstatistics.cpp |
|
360 | moc_tmstatistics.o: moc_tmstatistics.cpp | |
379 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tmstatistics.o moc_tmstatistics.cpp |
|
361 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tmstatistics.o moc_tmstatistics.cpp | |
380 |
|
362 | |||
381 | moc_tmpackettoread.o: moc_tmpackettoread.cpp |
|
363 | moc_tmpackettoread.o: moc_tmpackettoread.cpp | |
382 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tmpackettoread.o moc_tmpackettoread.cpp |
|
364 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tmpackettoread.o moc_tmpackettoread.cpp | |
383 |
|
365 | |||
384 | moc_wfpacket.o: moc_wfpacket.cpp |
|
366 | moc_wfpacket.o: moc_wfpacket.cpp | |
385 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfpacket.o moc_wfpacket.cpp |
|
367 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfpacket.o moc_wfpacket.cpp | |
386 |
|
368 | |||
387 | moc_spectrapacket.o: moc_spectrapacket.cpp |
|
369 | moc_spectrapacket.o: moc_spectrapacket.cpp | |
388 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_spectrapacket.o moc_spectrapacket.cpp |
|
370 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_spectrapacket.o moc_spectrapacket.cpp | |
389 |
|
371 | |||
|
372 | moc_qipdialogbox.o: moc_qipdialogbox.cpp | |||
|
373 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qipdialogbox.o moc_qipdialogbox.cpp | |||
|
374 | ||||
390 | moc_hkdisplay.o: moc_hkdisplay.cpp |
|
375 | moc_hkdisplay.o: moc_hkdisplay.cpp | |
391 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_hkdisplay.o moc_hkdisplay.cpp |
|
376 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_hkdisplay.o moc_hkdisplay.cpp | |
392 |
|
377 | |||
393 | moc_lfrxmlparser.o: moc_lfrxmlparser.cpp |
|
378 | moc_lfrxmlparser.o: moc_lfrxmlparser.cpp | |
394 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlparser.o moc_lfrxmlparser.cpp |
|
379 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlparser.o moc_lfrxmlparser.cpp | |
395 |
|
380 | |||
396 | moc_lfrspectrogram.o: moc_lfrspectrogram.cpp |
|
381 | moc_lfrspectrogram.o: moc_lfrspectrogram.cpp | |
397 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrspectrogram.o moc_lfrspectrogram.cpp |
|
382 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrspectrogram.o moc_lfrspectrogram.cpp | |
398 |
|
383 | |||
399 | moc_parameterdump.o: moc_parameterdump.cpp |
|
|||
400 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_parameterdump.o moc_parameterdump.cpp |
|
|||
401 |
|
||||
402 | ####### Install |
|
384 | ####### Install | |
403 |
|
385 | |||
404 | install: FORCE |
|
386 | install: FORCE | |
405 |
|
387 | |||
406 | uninstall: FORCE |
|
388 | uninstall: FORCE | |
407 |
|
389 | |||
408 | FORCE: |
|
390 | FORCE: | |
409 |
|
391 |
@@ -1,56 +1,56 | |||||
1 | #------------------------------------------------- |
|
1 | #------------------------------------------------- | |
2 | # |
|
2 | # | |
3 | # Project created by QtCreator 2013-05-03T14:05:02 |
|
3 | # Project created by QtCreator 2013-05-03T14:05:02 | |
4 | # |
|
4 | # | |
5 | #------------------------------------------------- |
|
5 | #------------------------------------------------- | |
6 |
|
6 | |||
7 | QT += core gui |
|
7 | QT += core gui | |
8 | QT += network |
|
8 | QT += network | |
9 | QT += xml |
|
9 | QT += xml | |
10 |
|
10 | |||
11 |
TARGET = lfrsgse |
|
11 | TARGET = lfrsgse | |
12 | TEMPLATE = app |
|
12 | TEMPLATE = app | |
13 |
|
13 | |||
14 | INCLUDEPATH += \ |
|
14 | INCLUDEPATH += \ | |
15 | $${PWD} \ |
|
15 | $${PWD} \ | |
16 | ../common_PLE \ |
|
16 | ../common_PLE \ | |
17 | ../rmapplugin \ |
|
17 | ../rmapplugin \ | |
18 | ../../DEV_PLE/header \ |
|
18 | ../../DEV_PLE/header \ | |
19 | $$[QT_INSTALL_HEADERS]/lppmon/common \ |
|
19 | $$[QT_INSTALL_HEADERS]/lppmon/common \ | |
20 | $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay |
|
20 | $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay \ | |
|
21 | $$[QT_INSTALL_HEADERS]/lppmon/parameterdump | |||
21 |
|
22 | |||
22 | LIBS += -llppmoncommon -lwfdisplay -lqwt5-qt4 |
|
23 | LIBS += -llppmoncommon -lwfdisplay -lqwt5-qt4 -lparameterdump | |
23 |
|
24 | |||
24 | SOURCES += main.cpp\ |
|
25 | SOURCES += main.cpp\ | |
25 | mainwindow.cpp \ |
|
26 | mainwindow.cpp \ | |
26 | mainwindowui.cpp \ |
|
27 | mainwindowui.cpp \ | |
27 | ../common_PLE/qipdialogbox.cpp \ |
|
|||
28 | lfrxmlhandler.cpp \ |
|
28 | lfrxmlhandler.cpp \ | |
29 | lfrxmlwriter.cpp \ |
|
29 | lfrxmlwriter.cpp \ | |
30 | ../rmapplugin/tmstatistics.cpp \ |
|
30 | ../rmapplugin/tmstatistics.cpp \ | |
31 | ../rmapplugin/tmpackettoread.cpp \ |
|
31 | ../rmapplugin/tmpackettoread.cpp \ | |
32 | ../rmapplugin/wfpacket.cpp \ |
|
32 | ../rmapplugin/wfpacket.cpp \ | |
33 | ../rmapplugin/spectrapacket.cpp \ |
|
33 | ../rmapplugin/spectrapacket.cpp \ | |
|
34 | ../common_PLE/qipdialogbox.cpp \ | |||
34 | ../common_PLE/hkdisplay.cpp \ |
|
35 | ../common_PLE/hkdisplay.cpp \ | |
35 | lfrxmlparser.cpp \ |
|
36 | lfrxmlparser.cpp \ | |
36 |
lfrspectrogram.cpp |
|
37 | lfrspectrogram.cpp | |
37 | parameterdump.cpp |
|
|||
38 |
|
38 | |||
39 | HEADERS += mainwindow.h \ |
|
39 | HEADERS += mainwindow.h \ | |
40 | mainwindowui.h \ |
|
40 | mainwindowui.h \ | |
41 | ../common_PLE/qipdialogbox.h \ |
|
|||
42 | lfrxmlhandler.h \ |
|
41 | lfrxmlhandler.h \ | |
43 | lfrxmlwriter.h \ |
|
42 | lfrxmlwriter.h \ | |
44 | ../rmapplugin/tmstatistics.h \ |
|
43 | ../rmapplugin/tmstatistics.h \ | |
45 | ../rmapplugin/tmpackettoread.h \ |
|
44 | ../rmapplugin/tmpackettoread.h \ | |
46 | ../rmapplugin/wfpacket.h \ |
|
45 | ../rmapplugin/wfpacket.h \ | |
47 | ../rmapplugin/spectrapacket.h \ |
|
46 | ../rmapplugin/spectrapacket.h \ | |
|
47 | ../common_PLE/qipdialogbox.h \ | |||
48 | ../common_PLE/hkdisplay.h \ |
|
48 | ../common_PLE/hkdisplay.h \ | |
49 | ../rmapplugin/params.h \ |
|
49 | ../rmapplugin/params.h \ | |
|
50 | ../../DEV_PLE/header/TC_types.h \ | |||
50 | ../../DEV_PLE/header/ccsds_types.h \ |
|
51 | ../../DEV_PLE/header/ccsds_types.h \ | |
51 | lfrxmlparser.h \ |
|
52 | lfrxmlparser.h \ | |
52 |
lfrspectrogram.h |
|
53 | lfrspectrogram.h | |
53 | parameterdump.h |
|
|||
54 |
|
54 | |||
55 |
|
55 | |||
56 |
|
56 |
@@ -1,196 +1,198 | |||||
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 QtCreator 2. |
|
3 | <!-- Written by QtCreator 2.8.0, 2013-08-01T09:16:13. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">0</value> |
|
7 | <value type="int">0</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | |
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
16 |
<value type="Q |
|
16 | <value type="QString" key="language">Cpp</value> | |
17 | <valuemap type="QVariantMap" key="value"> |
|
17 | <valuemap type="QVariantMap" key="value"> | |
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | </valuemap> |
|
20 | </valuemap> | |
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
22 |
<value type="Q |
|
22 | <value type="QString" key="language">QmlJS</value> | |
23 | <valuemap type="QVariantMap" key="value"> |
|
23 | <valuemap type="QVariantMap" key="value"> | |
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | </valuemap> |
|
26 | </valuemap> | |
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
|
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | |
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
45 | </valuemap> |
|
45 | </valuemap> | |
46 | </data> |
|
46 | </data> | |
47 | <data> |
|
47 | <data> | |
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
49 | <valuemap type="QVariantMap"/> |
|
49 | <valuemap type="QVariantMap"/> | |
50 | </data> |
|
50 | </data> | |
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
56 |
<value type="Q |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
66 |
<value type="Q |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
71 | </valuemap> |
|
71 | </valuemap> | |
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
76 |
<value type="Q |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
78 | <value type="QString">-w</value> |
|
78 | <value type="QString">-w</value> | |
79 | <value type="QString">-r</value> |
|
79 | <value type="QString">-r</value> | |
80 | </valuelist> |
|
80 | </valuelist> | |
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> |
|
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
84 | </valuemap> |
|
84 | </valuemap> | |
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
88 |
<value type="Q |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
89 | </valuemap> |
|
89 | </valuemap> | |
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
95 |
<value type="Q |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
97 | <value type="QString">-w</value> |
|
97 | <value type="QString">-w</value> | |
98 | <value type="QString">-r</value> |
|
98 | <value type="QString">-r</value> | |
99 | </valuelist> |
|
99 | </valuelist> | |
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> |
|
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
103 | </valuemap> |
|
103 | </valuemap> | |
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
107 |
<value type="Q |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
108 | </valuemap> |
|
108 | </valuemap> | |
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
114 |
<value type="Q |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/gse_lesia</value> |
|
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/gse_lesia</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
125 |
<value type="Q |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
126 | </valuemap> |
|
126 | </valuemap> | |
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
130 |
<value type="Q |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
131 | </valuemap> |
|
131 | </valuemap> | |
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |||
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
134 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
135 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
136 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
141 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
143 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
144 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
144 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
145 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
146 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
147 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
147 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
148 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
148 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
149 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
149 | <value type="int">0</value> |
|
150 | <value type="int">0</value> | |
150 | <value type="int">1</value> |
|
151 | <value type="int">1</value> | |
151 | <value type="int">2</value> |
|
152 | <value type="int">2</value> | |
152 | <value type="int">3</value> |
|
153 | <value type="int">3</value> | |
153 | <value type="int">4</value> |
|
154 | <value type="int">4</value> | |
154 | <value type="int">5</value> |
|
155 | <value type="int">5</value> | |
155 | <value type="int">6</value> |
|
156 | <value type="int">6</value> | |
156 | <value type="int">7</value> |
|
157 | <value type="int">7</value> | |
157 | <value type="int">8</value> |
|
158 | <value type="int">8</value> | |
158 | <value type="int">9</value> |
|
159 | <value type="int">9</value> | |
159 | <value type="int">10</value> |
|
160 | <value type="int">10</value> | |
160 | <value type="int">11</value> |
|
161 | <value type="int">11</value> | |
161 | <value type="int">12</value> |
|
162 | <value type="int">12</value> | |
162 | <value type="int">13</value> |
|
163 | <value type="int">13</value> | |
163 | <value type="int">14</value> |
|
164 | <value type="int">14</value> | |
164 | </valuelist> |
|
165 | </valuelist> | |
|
166 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |||
|
167 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |||
165 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">gselesia</value> |
|
168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">gselesia</value> | |
166 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
167 |
<value type="Q |
|
170 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/LPPMON_PLUGINS_PAUL/gse_lesia/gselesia.pro</value> | |
168 | <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value> |
|
|||
169 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
171 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
170 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">gselesia.pro</value> |
|
172 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">gselesia.pro</value> | |
171 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
173 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
172 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> |
|
174 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> | |
173 | <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/> |
|
|||
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
175 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
176 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
176 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
177 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
|
178 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |||
177 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
179 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
178 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
180 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
179 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
181 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
180 | </valuemap> |
|
182 | </valuemap> | |
181 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
183 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
182 | </valuemap> |
|
184 | </valuemap> | |
183 | </data> |
|
185 | </data> | |
184 | <data> |
|
186 | <data> | |
185 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
187 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
186 | <value type="int">1</value> |
|
188 | <value type="int">1</value> | |
187 | </data> |
|
189 | </data> | |
188 | <data> |
|
190 | <data> | |
189 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
191 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
190 |
<value type="Q |
|
192 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
191 | </data> |
|
193 | </data> | |
192 | <data> |
|
194 | <data> | |
193 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
195 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
194 |
<value type="int">1 |
|
196 | <value type="int">14</value> | |
195 | </data> |
|
197 | </data> | |
196 | </qtcreator> |
|
198 | </qtcreator> |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -1,542 +1,580 | |||||
1 | #include "mainwindow.h" |
|
1 | #include "mainwindow.h" | |
2 | #include <iostream> |
|
2 | #include <iostream> | |
3 | #include <QNetworkInterface> |
|
3 | #include <QNetworkInterface> | |
4 |
|
4 | |||
5 | MainWindow::MainWindow(QWidget *parent) |
|
5 | MainWindow::MainWindow(QWidget *parent) | |
6 | : QMainWindow(parent) |
|
6 | : QMainWindow(parent) | |
7 | { |
|
7 | { | |
8 | parsingContinue = false; |
|
8 | parsingContinue = false; | |
9 | totalOfBytes = 0; |
|
9 | totalOfBytes = 0; | |
10 | totalOfPackets = 0; |
|
10 | totalOfPackets = 0; | |
11 |
|
11 | |||
12 | spectraPacketNormalSpectrumF0 = new SpectraPacket(this, 128); |
|
12 | spectraPacketNormalSpectrumF0 = new SpectraPacket(this, 128); | |
13 |
|
13 | |||
14 | //**** |
|
14 | //**** | |
15 | // XML |
|
15 | // XML | |
16 | // xml handlers |
|
16 | // xml handlers | |
17 | xmlHandler = new LFRXmlHandler(); |
|
17 | xmlHandler = new LFRXmlHandler(); | |
18 | // xml sources |
|
18 | // xml sources | |
19 | sourceTC = new QXmlInputSource(); |
|
19 | sourceTC = new QXmlInputSource(); | |
20 | // xml writer |
|
20 | // xml writer | |
21 | lfrXmlWriter = new LFRXmlWriter(); |
|
21 | lfrXmlWriter = new LFRXmlWriter(); | |
22 | // setup xml parser for the echo bridge |
|
22 | // setup xml parser for the echo bridge | |
23 | lfrXmlParser = new LFRXmlParser(); |
|
23 | lfrXmlParser = new LFRXmlParser(); | |
24 |
|
24 | |||
25 | UI = new MainWindowUI(); |
|
25 | UI = new MainWindowUI(); | |
26 | readSettings(); |
|
26 | readSettings(); | |
27 | this->UI->serverTMEchoDialogBox->setIP(echoBridgeIP0, echoBridgeIP1, echoBridgeIP2, echoBridgeIP3); |
|
27 | this->UI->serverTMEchoDialogBox->setIP(echoBridgeIP0, echoBridgeIP1, echoBridgeIP2, echoBridgeIP3); | |
28 |
|
28 | |||
29 | lfrXmlParser->generalCCSDSPacketStore = &this->generalCCSDSPacketStore; |
|
29 | lfrXmlParser->generalCCSDSPacketStore = &this->generalCCSDSPacketStore; | |
30 |
|
30 | |||
31 | initSocketStatesList(); |
|
31 | initSocketStatesList(); | |
32 |
|
32 | |||
33 | this->setCentralWidget(this->UI); |
|
33 | this->setCentralWidget(this->UI); | |
34 | //this->setLayout(UI->layout()); |
|
34 | //this->setLayout(UI->layout()); | |
35 |
|
35 | |||
36 | analyserSGSEServerTC = new QTcpServer(); |
|
36 | analyserSGSEServerTC = new QTcpServer(); | |
37 | analyserSGSEServerTM = new QTcpServer(); |
|
37 | analyserSGSEServerTM = new QTcpServer(); | |
38 |
|
38 | |||
39 | socketTC = NULL; |
|
39 | socketTC = NULL; | |
40 | socketTM = NULL; |
|
40 | socketTM = NULL; | |
41 | socketEchoServer = new QTcpSocket(); |
|
41 | socketEchoServer = new QTcpSocket(); | |
42 |
|
42 | |||
43 | connect(this->UI->button_openServerTCTM, SIGNAL(clicked()), this, SLOT(listenOnTCTMPorts())); |
|
43 | connect(this->UI->button_openServerTCTM, SIGNAL(clicked()), this, SLOT(listenOnTCTMPorts())); | |
44 | connect(this->UI->button_testServerTCTM, SIGNAL(clicked()), this, SLOT(testTCTMPorts())); |
|
44 | connect(this->UI->button_testServerTCTM, SIGNAL(clicked()), this, SLOT(testTCTMPorts())); | |
45 | connect(this->UI->button_openSocketEchoServer, SIGNAL(clicked()), this, SLOT(openEchoServer())); |
|
45 | connect(this->UI->button_openSocketEchoServer, SIGNAL(clicked()), this, SLOT(openEchoServer())); | |
46 | // |
|
46 | // | |
47 | connect(this->analyserSGSEServerTC, SIGNAL(newConnection()), this, SLOT(newConnectionOnTCServer())); |
|
47 | connect(this->analyserSGSEServerTC, SIGNAL(newConnection()), this, SLOT(newConnectionOnTCServer())); | |
48 | connect(this->analyserSGSEServerTM, SIGNAL(newConnection()), this, SLOT(newConnectionOnTMServer())); |
|
48 | connect(this->analyserSGSEServerTM, SIGNAL(newConnection()), this, SLOT(newConnectionOnTMServer())); | |
49 | // |
|
49 | // | |
50 | connect(this, SIGNAL(socketTMHasChanged(QTcpSocket*)), this->lfrXmlWriter, SLOT(setSocketTM(QTcpSocket*))); |
|
50 | connect(this, SIGNAL(socketTMHasChanged(QTcpSocket*)), this->lfrXmlWriter, SLOT(setSocketTM(QTcpSocket*))); | |
51 | connect(this->UI->button_TCAcknowledgement, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_TC_Acknowledgment())); |
|
51 | connect(this->UI->button_TCAcknowledgement, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_TC_Acknowledgment())); | |
52 | connect(this->UI->button_TCRejection, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_TC_rejection())); |
|
52 | connect(this->UI->button_TCRejection, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_TC_rejection())); | |
53 | connect(this->UI->button_GSEHK, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_GSE_HK())); |
|
53 | connect(this->UI->button_GSEHK, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_GSE_HK())); | |
54 |
|
54 | |||
55 | // socket echo server |
|
55 | // socket echo server | |
56 | connect(this->socketEchoServer, SIGNAL(stateChanged(QAbstractSocket::SocketState)), |
|
56 | connect(this->socketEchoServer, SIGNAL(stateChanged(QAbstractSocket::SocketState)), | |
57 | this, SLOT(socket_TMEcho_ServerHasChanged())); |
|
57 | this, SLOT(socket_TMEcho_ServerHasChanged())); | |
58 | connect(this->socketEchoServer, SIGNAL(readyRead()), |
|
58 | connect(this->socketEchoServer, SIGNAL(readyRead()), | |
59 | this, SLOT(readDataOnSocketEchoServer())); |
|
59 | this, SLOT(readDataOnSocketEchoServer())); | |
60 |
|
60 | |||
61 | // display on console |
|
61 | // display on console | |
62 | connect(this->xmlHandler, SIGNAL(displayMessage(QString)), |
|
62 | connect(this->xmlHandler, SIGNAL(displayMessage(QString)), | |
63 | this, SLOT(displayOnConsole(QString))); |
|
63 | this, SLOT(displayOnConsole(QString))); | |
64 | connect(this->UI->hkDisplay, SIGNAL(displayMessage(QString)), |
|
64 | connect(this->UI->hkDisplay, SIGNAL(displayMessage(QString)), | |
65 | this, SLOT(displayOnConsole(QString))); |
|
65 | this, SLOT(displayOnConsole(QString))); | |
66 | connect(this->lfrXmlParser, SIGNAL(sendMessage(QString)), |
|
66 | connect(this->lfrXmlParser, SIGNAL(sendMessage(QString)), | |
67 | this, SLOT(displayOnConsole(QString))); |
|
67 | this, SLOT(displayOnConsole(QString))); | |
68 | // |
|
68 | // | |
69 | connect(this->lfrXmlParser, SIGNAL(processPacketStore()), |
|
69 | connect(this->lfrXmlParser, SIGNAL(processPacketStore()), | |
70 | this, SLOT(processPacketStore())); |
|
70 | this, SLOT(processPacketStore())); | |
71 | // |
|
71 | // | |
72 | connect(this->UI->button_resetStatistics, SIGNAL(clicked()), |
|
72 | connect(this->UI->button_resetStatistics, SIGNAL(clicked()), | |
73 | this, SLOT(resetStatistics())); |
|
73 | this, SLOT(resetStatistics())); | |
74 |
|
74 | |||
75 | displayNetworkInterfaces(); |
|
75 | displayNetworkInterfaces(); | |
76 |
|
76 | |||
77 | this->xmlHandler->packetStoreHasChanged(&generalCCSDSPacketStore); |
|
77 | this->xmlHandler->packetStoreHasChanged(&generalCCSDSPacketStore); | |
78 | }; |
|
78 | }; | |
79 |
|
79 | |||
80 | MainWindow::~MainWindow() |
|
80 | MainWindow::~MainWindow() | |
81 | { |
|
81 | { | |
82 |
|
82 | |||
83 | } |
|
83 | } | |
84 |
|
84 | |||
85 | void MainWindow::displayNetworkInterfaces() |
|
85 | void MainWindow::displayNetworkInterfaces() | |
86 | { |
|
86 | { | |
87 | QList<QHostAddress> list = QNetworkInterface::allAddresses(); |
|
87 | QList<QHostAddress> list = QNetworkInterface::allAddresses(); | |
88 | this->displayOnConsole("Network interfaces:"); |
|
88 | this->displayOnConsole("Network interfaces:"); | |
89 | for(int nIter=0; nIter<list.count(); nIter++) |
|
89 | for(int nIter=0; nIter<list.count(); nIter++) | |
90 | { |
|
90 | { | |
91 | this->UI->displayOnConsole(list[nIter].toString()); |
|
91 | this->UI->displayOnConsole(list[nIter].toString()); | |
92 | } |
|
92 | } | |
93 | } |
|
93 | } | |
94 |
|
94 | |||
95 | void MainWindow::listenOnTCTMPorts() |
|
95 | void MainWindow::listenOnTCTMPorts() | |
96 | { |
|
96 | { | |
97 | QString str; |
|
97 | QString str; | |
98 |
|
98 | |||
99 | //*** |
|
99 | //*** | |
100 | // TC |
|
100 | // TC | |
101 | analyserSGSEServerTC->listen(QHostAddress::Any, this->UI->getTCPort()); |
|
101 | analyserSGSEServerTC->listen(QHostAddress::Any, this->UI->getTCPort()); | |
102 | str = analyserSGSEServerTC->errorString(); |
|
102 | str = analyserSGSEServerTC->errorString(); | |
103 | if (!str.isEmpty()) |
|
103 | if (!str.isEmpty()) | |
104 | { |
|
104 | { | |
105 | this->displayOnConsole(str); |
|
105 | this->displayOnConsole(str); | |
106 | } |
|
106 | } | |
107 | this->displayOnConsole("Listening TC on port " |
|
107 | this->displayOnConsole("Listening TC on port " | |
108 | + QString::number(this->UI->getTCPort()) |
|
108 | + QString::number(this->UI->getTCPort()) | |
109 | ); |
|
109 | ); | |
110 |
|
110 | |||
111 | //*** |
|
111 | //*** | |
112 | // TM |
|
112 | // TM | |
113 | analyserSGSEServerTM->listen(QHostAddress::Any, this->UI->getTMPort()); |
|
113 | analyserSGSEServerTM->listen(QHostAddress::Any, this->UI->getTMPort()); | |
114 | str = analyserSGSEServerTM->errorString(); |
|
114 | str = analyserSGSEServerTM->errorString(); | |
115 | if (!str.isEmpty()) |
|
115 | if (!str.isEmpty()) | |
116 | { |
|
116 | { | |
117 | this->displayOnConsole(str); |
|
117 | this->displayOnConsole(str); | |
118 | } |
|
118 | } | |
119 | this->displayOnConsole("Listening TM on port " |
|
119 | this->displayOnConsole("Listening TM on port " | |
120 | + QString::number(this->UI->getTMPort()) |
|
120 | + QString::number(this->UI->getTMPort()) | |
121 | ); |
|
121 | ); | |
122 | } |
|
122 | } | |
123 |
|
123 | |||
124 | void MainWindow::testTCTMPorts() |
|
124 | void MainWindow::testTCTMPorts() | |
125 | { |
|
125 | { | |
126 | if (socketTC != NULL) |
|
126 | if (socketTC != NULL) | |
127 | { |
|
127 | { | |
128 | this->displayOnConsole("TC socket *** " + socketStates.at(socketTC->state()) ); |
|
128 | this->displayOnConsole("TC socket *** " + socketStates.at(socketTC->state()) ); | |
129 | } |
|
129 | } | |
130 | else |
|
130 | else | |
131 | { |
|
131 | { | |
132 | this->displayOnConsole("TC socket *** not tested, (socketTC) is NULL" ); |
|
132 | this->displayOnConsole("TC socket *** not tested, (socketTC) is NULL" ); | |
133 | } |
|
133 | } | |
134 | if (socketTM != NULL) |
|
134 | if (socketTM != NULL) | |
135 | { |
|
135 | { | |
136 | this->displayOnConsole("TM socket *** " + socketStates.at(socketTM->state()) ); |
|
136 | this->displayOnConsole("TM socket *** " + socketStates.at(socketTM->state()) ); | |
137 | } |
|
137 | } | |
138 | else |
|
138 | else | |
139 | { |
|
139 | { | |
140 | this->displayOnConsole("TM socket *** not tested, (socketTM) is NULL" ); |
|
140 | this->displayOnConsole("TM socket *** not tested, (socketTM) is NULL" ); | |
141 | } |
|
141 | } | |
142 | } |
|
142 | } | |
143 |
|
143 | |||
144 | void MainWindow::newConnectionOnTCServer() |
|
144 | void MainWindow::newConnectionOnTCServer() | |
145 | { |
|
145 | { | |
146 | this->displayOnConsole("got new connection on TC port"); |
|
146 | this->displayOnConsole("got new connection on TC port"); | |
147 | socketTC = analyserSGSEServerTC->nextPendingConnection(); |
|
147 | socketTC = analyserSGSEServerTC->nextPendingConnection(); | |
148 | this->displayOnConsole("TC socket *** " + socketStates.at(socketTC->state()) ); |
|
148 | this->displayOnConsole("TC socket *** " + socketStates.at(socketTC->state()) ); | |
149 | connect(this->socketTC, SIGNAL(readyRead()), this, SLOT(readDataOnTCPort())); |
|
149 | connect(this->socketTC, SIGNAL(readyRead()), this, SLOT(readDataOnTCPort())); | |
150 | } |
|
150 | } | |
151 |
|
151 | |||
152 | void MainWindow::newConnectionOnTMServer() |
|
152 | void MainWindow::newConnectionOnTMServer() | |
153 | { |
|
153 | { | |
154 | this->displayOnConsole("got new connection on TM port"); |
|
154 | this->displayOnConsole("got new connection on TM port"); | |
155 | socketTM = analyserSGSEServerTM->nextPendingConnection(); |
|
155 | socketTM = analyserSGSEServerTM->nextPendingConnection(); | |
156 | this->displayOnConsole("TM socket *** " + socketStates.at(socketTM->state()) ); |
|
156 | this->displayOnConsole("TM socket *** " + socketStates.at(socketTM->state()) ); | |
157 | connect(this->socketTM, SIGNAL(readyRead()), this, SLOT(readDataOnTMPort())); |
|
157 | connect(this->socketTM, SIGNAL(readyRead()), this, SLOT(readDataOnTMPort())); | |
158 |
|
158 | |||
159 | emit socketTMHasChanged(this->socketTM); |
|
159 | emit socketTMHasChanged(this->socketTM); | |
160 | } |
|
160 | } | |
161 |
|
161 | |||
162 | void MainWindow::readDataOnTCPort() |
|
162 | void MainWindow::readDataOnTCPort() | |
163 | { |
|
163 | { | |
164 | bool ok; |
|
164 | bool ok; | |
165 | int nbBytesAvailable = 0; |
|
165 | int nbBytesAvailable = 0; | |
166 |
|
166 | |||
167 | nbBytesAvailable = socketTC->bytesAvailable(); |
|
167 | nbBytesAvailable = socketTC->bytesAvailable(); | |
168 | buffer = (char *) malloc(nbBytesAvailable); |
|
168 | buffer = (char *) malloc(nbBytesAvailable); | |
169 | socketTC->read(buffer, nbBytesAvailable); |
|
169 | socketTC->read(buffer, nbBytesAvailable); | |
170 |
|
170 | |||
171 | this->displayOnConsole("readDataOnTCPort *** " |
|
171 | this->displayOnConsole("readDataOnTCPort *** " | |
172 | + QString::number(nbBytesAvailable) |
|
172 | + QString::number(nbBytesAvailable) | |
173 | + " read"); |
|
173 | + " read"); | |
174 |
|
174 | |||
175 | QByteArray xmlData( buffer, nbBytesAvailable); |
|
175 | QByteArray xmlData( buffer, nbBytesAvailable); | |
176 |
|
176 | |||
177 | free(buffer); |
|
177 | free(buffer); | |
178 |
|
178 | |||
179 | sourceTC->setData( xmlData ); |
|
179 | sourceTC->setData( xmlData ); | |
180 |
|
180 | |||
181 | xmlReader.setContentHandler(xmlHandler); |
|
181 | xmlReader.setContentHandler(xmlHandler); | |
182 | xmlReader.setErrorHandler(xmlHandler); |
|
182 | xmlReader.setErrorHandler(xmlHandler); | |
183 |
|
183 | |||
184 | ok = xmlReader.parse(sourceTC); |
|
184 | ok = xmlReader.parse(sourceTC); | |
185 | if (!ok) { |
|
185 | if (!ok) { | |
186 | std::cout << "Parsing failed." << std::endl; |
|
186 | std::cout << "Parsing failed." << std::endl; | |
187 | } |
|
187 | } | |
188 | else { |
|
188 | else { | |
189 | QStringList names = xmlHandler->names(); |
|
189 | QStringList names = xmlHandler->names(); | |
190 | QList<int> indentations = xmlHandler->indentations(); |
|
190 | QList<int> indentations = xmlHandler->indentations(); | |
191 |
|
191 | |||
192 | int items = names.count(); |
|
192 | int items = names.count(); | |
193 |
|
193 | |||
194 | for (int i = 0; i < items; ++i) { |
|
194 | for (int i = 0; i < items; ++i) { | |
195 | displayOnConsole( |
|
195 | displayOnConsole( | |
196 | names[i] |
|
196 | names[i] | |
197 | + " --- identations: " |
|
197 | + " --- identations: " | |
198 | + QString::number(indentations[i])); |
|
198 | + QString::number(indentations[i])); | |
199 | } |
|
199 | } | |
200 | } |
|
200 | } | |
201 | } |
|
201 | } | |
202 |
|
202 | |||
203 | void MainWindow::readDataOnTMPort() |
|
203 | void MainWindow::readDataOnTMPort() | |
204 | { |
|
204 | { | |
205 | this->displayOnConsole("TM data received, begin parsing"); |
|
205 | this->displayOnConsole("TM data received, begin parsing"); | |
206 | } |
|
206 | } | |
207 |
|
207 | |||
208 | void MainWindow::readDataOnSocketEchoServer() |
|
208 | void MainWindow::readDataOnSocketEchoServer() | |
209 | { |
|
209 | { | |
210 | QString dataString; |
|
210 | QString dataString; | |
211 |
|
211 | |||
212 | dataArray.append(socketEchoServer->readAll()); |
|
212 | dataArray.append(socketEchoServer->readAll()); | |
213 | dataString = QString::fromAscii(dataArray); |
|
213 | dataString = QString::fromAscii(dataArray); | |
214 | this->lfrXmlParser->processIncomingStr(dataString); |
|
214 | this->lfrXmlParser->processIncomingStr(dataString); | |
215 | dataArray.clear(); |
|
215 | dataArray.clear(); | |
216 | } |
|
216 | } | |
217 |
|
217 | |||
218 | void MainWindow::displayOnConsole(QString message) |
|
218 | void MainWindow::displayOnConsole(QString message) | |
219 | { |
|
219 | { | |
220 | this->UI->displayOnConsole( message ); |
|
220 | this->UI->displayOnConsole( message ); | |
221 | } |
|
221 | } | |
222 |
|
222 | |||
223 | void MainWindow::initSocketStatesList() |
|
223 | void MainWindow::initSocketStatesList() | |
224 | { |
|
224 | { | |
225 | socketStates.append("The socket is not connected"); |
|
225 | socketStates.append("The socket is not connected"); | |
226 | socketStates.append("The socket is performing a host name lookup"); |
|
226 | socketStates.append("The socket is performing a host name lookup"); | |
227 | socketStates.append("The socket has started establishing a connection"); |
|
227 | socketStates.append("The socket has started establishing a connection"); | |
228 | socketStates.append("A connection is established"); |
|
228 | socketStates.append("A connection is established"); | |
229 | socketStates.append("The socket is bound to an address and port (for servers)"); |
|
229 | socketStates.append("The socket is bound to an address and port (for servers)"); | |
230 | socketStates.append("The socket is about to close (data may still be waiting to be written)"); |
|
230 | socketStates.append("The socket is about to close (data may still be waiting to be written)"); | |
231 | socketStates.append("For internal use only"); |
|
231 | socketStates.append("For internal use only"); | |
232 | } |
|
232 | } | |
233 |
|
233 | |||
234 | void MainWindow::openEchoServer() |
|
234 | void MainWindow::openEchoServer() | |
235 | { |
|
235 | { | |
236 | socketEchoServer->connectToHost(this->UI->serverTMEchoDialogBox->getIP(), |
|
236 | socketEchoServer->connectToHost(this->UI->serverTMEchoDialogBox->getIP(), | |
237 | this->UI->spinbox_serverTMEchoPort->value()); |
|
237 | this->UI->spinbox_serverTMEchoPort->value()); | |
238 | //socketEchoServer->open(); |
|
238 | //socketEchoServer->open(); | |
239 | } |
|
239 | } | |
240 |
|
240 | |||
241 | void MainWindow::socket_TMEcho_ServerHasChanged() |
|
241 | void MainWindow::socket_TMEcho_ServerHasChanged() | |
242 | { |
|
242 | { | |
243 | this->displayOnConsole("TM Echo Socket socket *** " + socketStates.at(socketEchoServer->state()) ); |
|
243 | this->displayOnConsole("TM Echo Socket socket *** " + socketStates.at(socketEchoServer->state()) ); | |
244 | } |
|
244 | } | |
245 |
|
245 | |||
246 | void MainWindow::preProcessPacket(TMPacketToRead *packet) |
|
|||
247 | { |
|
|||
248 | unsigned char pid = 0; |
|
|||
249 | unsigned char cat = 0; |
|
|||
250 | unsigned char typ = 0; |
|
|||
251 | unsigned char sub = 0; |
|
|||
252 | unsigned int sid = 0; |
|
|||
253 | unsigned int length = 0; |
|
|||
254 | unsigned int coarse_t = 0; |
|
|||
255 | unsigned int fine_t = 0; |
|
|||
256 |
|
||||
257 | //********************************* |
|
|||
258 | // get the parameters of the packet |
|
|||
259 | pid = this->UI->tmStatistics->getPID( packet ); |
|
|||
260 | cat = this->UI->tmStatistics->getCAT( packet ); |
|
|||
261 | typ = this->UI->tmStatistics->getTYPE( packet ); |
|
|||
262 | sub = this->UI->tmStatistics->getSUBTYPE( packet ); |
|
|||
263 | length = this->UI->tmStatistics->getLENGTH( packet ); |
|
|||
264 | coarse_t = this->UI->tmStatistics->getCoarseTime( packet ); |
|
|||
265 | fine_t = this->UI->tmStatistics->getFineTime( packet ); |
|
|||
266 | sid = this->UI->tmStatistics->getSID( packet, pid, cat, typ, sub ); |
|
|||
267 |
|
||||
268 | this->UI->tmStatistics->updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t); |
|
|||
269 |
|
||||
270 | // compare length in the packet with the size of the packet |
|
|||
271 | if ( (length + 1 + 10) != (packet->size)) |
|
|||
272 | { |
|
|||
273 | displayOnConsole("reception of " + QString::number(packet->size) |
|
|||
274 | + " bytes instead of " + QString::number(length + 1 + 10)); |
|
|||
275 | } |
|
|||
276 |
|
||||
277 | //*************************************************** |
|
|||
278 | // if the packet is an HK packet, display its content |
|
|||
279 | if ( (pid == 76) & (cat == 4) & (typ == TM_TYPE_HK) & (sub == TM_SUBTYPE_HK) ) |
|
|||
280 | { |
|
|||
281 | this->UI->hkDisplay->displayPacket(packet); |
|
|||
282 | } |
|
|||
283 |
|
||||
284 | //************************************************************** |
|
|||
285 | // if the packet is a parameter dump packet, display its content |
|
|||
286 | if ( (pid == 76) & (cat == 9) & (typ == TM_TYPE_PARAMETER_DUMP) & (sub == TM_SUBTYPE_PARAMETER_DUMP) ) |
|
|||
287 | { |
|
|||
288 | //this->UI->parameterDump->updateParameterDump(packet); |
|
|||
289 | } |
|
|||
290 |
|
||||
291 | //**************************************** |
|
|||
292 | // if the packet is a waveform, display it |
|
|||
293 | if ( (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE) ) |
|
|||
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 | case SID_BURST_CWF_F2: |
|
|||
310 | buildWFAndDisplayBurst(packet, &wfPacketBurst); |
|
|||
311 | break; |
|
|||
312 | case SID_SBM1_CWF_F1: |
|
|||
313 | buildWFAndDisplaySBM1(packet, &wfPacketSBM1); |
|
|||
314 | break; |
|
|||
315 | case SID_SBM2_CWF_F2: |
|
|||
316 | buildWFAndDisplaySBM2(packet, &wfPacketSBM2); |
|
|||
317 | break; |
|
|||
318 | case SID_NORMAL_ASM_F0: |
|
|||
319 | buildSpectrumAndDisplayNORM_F0(packet, spectraPacketNormalSpectrumF0); |
|
|||
320 | break; |
|
|||
321 | } |
|
|||
322 | } |
|
|||
323 | } |
|
|||
324 |
|
||||
325 | void MainWindow::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) |
|
246 | void MainWindow::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) | |
326 | { |
|
247 | { | |
327 | unsigned int i = 0; |
|
248 | unsigned int i = 0; | |
328 | unsigned int j = 0; |
|
249 | unsigned int j = 0; | |
329 | unsigned char *data; |
|
250 | unsigned char *data; | |
330 | unsigned char pkt_nr = 0; |
|
251 | unsigned char pkt_nr = 0; | |
331 | unsigned int blk_nr = 0; |
|
252 | unsigned int blk_nr = 0; | |
332 |
|
253 | |||
333 | pkt_nr = packet->Value[23]; // PKT_NR |
|
254 | pkt_nr = packet->Value[23]; // PKT_NR | |
334 | blk_nr = packet->Value[30] * 256 + packet->Value[31]; |
|
255 | blk_nr = packet->Value[30] * 256 + packet->Value[31]; | |
335 | data = &packet->Value[32]; // start of the first data block; |
|
256 | data = &packet->Value[32]; // start of the first data block; | |
336 | j = (pkt_nr-1) * 340; |
|
257 | j = (pkt_nr-1) * 340; | |
337 | for ( i=0; i<blk_nr; i++ ){ |
|
258 | for ( i=0; i<blk_nr; i++ ){ | |
338 |
wfPacket->wf_ |
|
259 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |
339 |
wfPacket->wf_ |
|
260 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |
340 |
wfPacket->wf_ |
|
261 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |
341 |
wfPacket->wf_ |
|
262 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |
342 |
wfPacket->wf_b |
|
263 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |
343 |
wfPacket->wf_b |
|
264 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |
344 | } |
|
265 | } | |
345 | if (pkt_nr == 7) |
|
266 | if (pkt_nr == 7) | |
346 | { |
|
267 | { | |
347 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); |
|
268 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); | |
348 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); |
|
269 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); | |
349 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); |
|
270 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); | |
350 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); |
|
271 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); | |
351 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); |
|
272 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); | |
352 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5); |
|
273 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5); | |
353 | } |
|
274 | } | |
354 | } |
|
275 | } | |
355 |
|
276 | |||
|
277 | void MainWindow::buildWFAndDisplay_CWF_F3(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) | |||
|
278 | { | |||
|
279 | unsigned int i = 0; | |||
|
280 | unsigned int j = 0; | |||
|
281 | unsigned char *data; | |||
|
282 | static unsigned char pkt_nr = 1; | |||
|
283 | unsigned int blk_nr = 0; | |||
|
284 | ||||
|
285 | blk_nr = packet->Value[28] * 256 + packet->Value[29]; | |||
|
286 | data = &packet->Value[30]; // start of the first data block; | |||
|
287 | j = (pkt_nr-1) * 340; | |||
|
288 | for ( i=0; i<blk_nr; i++ ){ | |||
|
289 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |||
|
290 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |||
|
291 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |||
|
292 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |||
|
293 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |||
|
294 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |||
|
295 | } | |||
|
296 | pkt_nr = pkt_nr + 1; | |||
|
297 | if (blk_nr == 8) | |||
|
298 | { | |||
|
299 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); | |||
|
300 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); | |||
|
301 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); | |||
|
302 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); | |||
|
303 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); | |||
|
304 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3,num_page, 5); | |||
|
305 | pkt_nr = 1; | |||
|
306 | } | |||
|
307 | } | |||
|
308 | ||||
356 | void MainWindow::buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket) |
|
309 | void MainWindow::buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket) | |
357 | { |
|
310 | { | |
358 | unsigned int i = 0; |
|
311 | unsigned int i = 0; | |
359 | unsigned int j = 0; |
|
312 | unsigned int j = 0; | |
360 | unsigned char *data; |
|
313 | unsigned char *data; | |
361 | static unsigned char pkt_nr = 1; |
|
314 | static unsigned char pkt_nr = 1; | |
362 | unsigned int blk_nr = 0; |
|
315 | unsigned int blk_nr = 0; | |
363 |
|
316 | |||
364 | blk_nr = packet->Value[28] * 256 + packet->Value[29]; |
|
317 | blk_nr = packet->Value[28] * 256 + packet->Value[29]; | |
365 | data = &packet->Value[30]; // start of the first data block; |
|
318 | data = &packet->Value[30]; // start of the first data block; | |
366 | j = (pkt_nr-1) * 340; |
|
319 | j = (pkt_nr-1) * 340; | |
367 | for ( i=0; i<blk_nr; i++ ){ |
|
320 | for ( i=0; i<blk_nr; i++ ){ | |
368 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); |
|
321 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |
369 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); |
|
322 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |
370 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); |
|
323 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |
371 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); |
|
324 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |
372 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); |
|
325 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |
373 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); |
|
326 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |
374 | } |
|
327 | } | |
375 | pkt_nr = pkt_nr + 1; |
|
328 | pkt_nr = pkt_nr + 1; | |
376 | if (blk_nr == 8) |
|
329 | if (blk_nr == 8) | |
377 | { |
|
330 | { | |
378 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_v, 0); |
|
331 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_v, 0); | |
379 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_e1, 1); |
|
332 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_e1, 1); | |
380 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_e2, 2); |
|
333 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_e2, 2); | |
381 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b1, 3); |
|
334 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b1, 3); | |
382 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b2, 4); |
|
335 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b2, 4); | |
383 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b3, 5); |
|
336 | this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b3, 5); | |
384 | pkt_nr = 1; |
|
337 | pkt_nr = 1; | |
385 | } |
|
338 | } | |
386 | } |
|
339 | } | |
387 |
|
340 | |||
388 | void MainWindow::buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket) |
|
341 | void MainWindow::buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket) | |
389 | { |
|
342 | { | |
390 | unsigned int i = 0; |
|
343 | unsigned int i = 0; | |
391 | unsigned int j = 0; |
|
344 | unsigned int j = 0; | |
392 | unsigned char *data; |
|
345 | unsigned char *data; | |
393 | static unsigned char pkt_nr = 1; |
|
346 | static unsigned char pkt_nr = 1; | |
394 | unsigned int blk_nr = 0; |
|
347 | unsigned int blk_nr = 0; | |
395 |
|
348 | |||
396 | blk_nr = packet->Value[28] * 256 + packet->Value[29]; |
|
349 | blk_nr = packet->Value[28] * 256 + packet->Value[29]; | |
397 | data = &packet->Value[30]; // start of the first data block; |
|
350 | data = &packet->Value[30]; // start of the first data block; | |
398 | j = (pkt_nr-1) * 340; |
|
351 | j = (pkt_nr-1) * 340; | |
399 | for ( i=0; i<blk_nr; i++ ){ |
|
352 | for ( i=0; i<blk_nr; i++ ){ | |
400 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); |
|
353 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |
401 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); |
|
354 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |
402 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); |
|
355 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |
403 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); |
|
356 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |
404 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); |
|
357 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |
405 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); |
|
358 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |
406 | } |
|
359 | } | |
407 | pkt_nr = pkt_nr + 1; |
|
360 | pkt_nr = pkt_nr + 1; | |
408 | if (blk_nr == 8) |
|
361 | if (blk_nr == 8) | |
409 | { |
|
362 | { | |
410 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_v, 0); |
|
363 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_v, 0); | |
411 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e1, 1); |
|
364 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e1, 1); | |
412 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e2, 2); |
|
365 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e2, 2); | |
413 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b1, 3); |
|
366 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b1, 3); | |
414 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b2, 4); |
|
367 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b2, 4); | |
415 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b3, 5); |
|
368 | this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b3, 5); | |
416 | pkt_nr = 1; |
|
369 | pkt_nr = 1; | |
417 | } |
|
370 | } | |
418 | } |
|
371 | } | |
419 |
|
372 | |||
420 | void MainWindow::buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket) |
|
373 | void MainWindow::buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket) | |
421 | { |
|
374 | { | |
422 | unsigned int i = 0; |
|
375 | unsigned int i = 0; | |
423 | unsigned int j = 0; |
|
376 | unsigned int j = 0; | |
424 | unsigned char *data; |
|
377 | unsigned char *data; | |
425 | static unsigned char pkt_nr = 1; |
|
378 | static unsigned char pkt_nr = 1; | |
426 | unsigned int blk_nr = 0; |
|
379 | unsigned int blk_nr = 0; | |
427 |
|
380 | |||
428 | blk_nr = packet->Value[28] * 256 + packet->Value[29]; |
|
381 | blk_nr = packet->Value[28] * 256 + packet->Value[29]; | |
429 | data = &packet->Value[30]; // start of the first data block; |
|
382 | data = &packet->Value[30]; // start of the first data block; | |
430 | j = (pkt_nr-1) * 340; |
|
383 | j = (pkt_nr-1) * 340; | |
431 | for ( i=0; i<blk_nr; i++ ){ |
|
384 | for ( i=0; i<blk_nr; i++ ){ | |
432 |
wfPacket->wf_ |
|
385 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |
433 |
wfPacket->wf_ |
|
386 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |
434 |
wfPacket->wf_ |
|
387 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |
435 |
wfPacket->wf_ |
|
388 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |
436 |
wfPacket->wf_b |
|
389 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |
437 |
wfPacket->wf_b |
|
390 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |
438 | } |
|
391 | } | |
439 | pkt_nr = pkt_nr + 1; |
|
392 | pkt_nr = pkt_nr + 1; | |
440 | if (blk_nr == 8) |
|
393 | if (blk_nr == 8) | |
441 | { |
|
394 | { | |
442 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_v, 0); |
|
395 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_v, 0); | |
443 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_e1, 1); |
|
396 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_e1, 1); | |
444 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_e2, 2); |
|
397 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_e2, 2); | |
445 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b1, 3); |
|
398 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b1, 3); | |
446 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b2, 4); |
|
399 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b2, 4); | |
447 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b3, 5); |
|
400 | this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b3, 5); | |
448 | pkt_nr = 1; |
|
401 | pkt_nr = 1; | |
449 | } |
|
402 | } | |
450 | } |
|
403 | } | |
451 |
|
404 | |||
452 | void MainWindow::buildSpectrumAndDisplayNORM_F0(TMPacketToRead *packet, SpectraPacket *spectraPacket) |
|
405 | void MainWindow::buildSpectrumAndDisplayNORM_F0(TMPacketToRead *packet, SpectraPacket *spectraPacket) | |
453 | { |
|
406 | { | |
454 | unsigned int i = 0; |
|
407 | unsigned int i = 0; | |
455 | unsigned int j = 0; |
|
408 | unsigned int j = 0; | |
456 | unsigned char *data; |
|
409 | unsigned char *data; | |
457 | char *aux; |
|
410 | char *aux; | |
458 | unsigned char nrASM; |
|
411 | unsigned char nrASM; | |
459 | unsigned int blkNR; |
|
412 | unsigned int blkNR; | |
460 |
|
413 | |||
461 | nrASM = packet->Value[23]; |
|
414 | nrASM = packet->Value[23]; | |
462 | blkNR = packet->Value[30] * 256 + packet->Value[31]; |
|
415 | blkNR = packet->Value[30] * 256 + packet->Value[31]; | |
463 | data = &packet->Value[32]; // start of the first data block; |
|
416 | data = &packet->Value[32]; // start of the first data block; | |
464 |
|
417 | |||
465 | j = (nrASM-1) * blkNR; |
|
418 | j = (nrASM-1) * blkNR; | |
466 | for ( i=0; i<blkNR; i++ ){ |
|
419 | for ( i=0; i<blkNR; i++ ){ | |
467 | aux = (char*) &spectraPacket->s11[j + i]; |
|
420 | aux = (char*) &spectraPacket->s11[j + i]; | |
468 | aux[3] = data[ (i * 50 + 2*0) ]; |
|
421 | aux[3] = data[ (i * 50 + 2*0) ]; | |
469 | aux[2] = data[ (i * 50 + 2*0) + 1]; |
|
422 | aux[2] = data[ (i * 50 + 2*0) + 1]; | |
470 | aux = (char*) &spectraPacket->s22[j + i]; |
|
423 | aux = (char*) &spectraPacket->s22[j + i]; | |
471 | aux[3] = data[ (i * 50 + 2*9) ]; |
|
424 | aux[3] = data[ (i * 50 + 2*9) ]; | |
472 | aux[2] = data[ (i * 50 + 2*9) + 1]; |
|
425 | aux[2] = data[ (i * 50 + 2*9) + 1]; | |
473 | aux = (char*) &spectraPacket->s33[j + i]; |
|
426 | aux = (char*) &spectraPacket->s33[j + i]; | |
474 | aux[3] = data[ (i * 50 + 2*16) ]; |
|
427 | aux[3] = data[ (i * 50 + 2*16) ]; | |
475 | aux[2] = data[ (i * 50 + 2*16) + 1]; |
|
428 | aux[2] = data[ (i * 50 + 2*16) + 1]; | |
476 | aux = (char*) &spectraPacket->s44[j + i]; |
|
429 | aux = (char*) &spectraPacket->s44[j + i]; | |
477 | aux[3] = data[ (i * 50 + 2*21) ]; |
|
430 | aux[3] = data[ (i * 50 + 2*21) ]; | |
478 | aux[2] = data[ (i * 50 + 2*21) + 1]; |
|
431 | aux[2] = data[ (i * 50 + 2*21) + 1]; | |
479 | aux = (char*) &spectraPacket->s55[j + i]; |
|
432 | aux = (char*) &spectraPacket->s55[j + i]; | |
480 | aux[3] = data[ (i * 50 + 2*24) ]; |
|
433 | aux[3] = data[ (i * 50 + 2*24) ]; | |
481 | aux[2] = data[ (i * 50 + 2*24) + 1]; |
|
434 | aux[2] = data[ (i * 50 + 2*24) + 1]; | |
482 | } |
|
435 | } | |
483 | if (nrASM == 2) |
|
436 | if (nrASM == 2) | |
484 | { |
|
437 | { | |
485 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s11, 0); |
|
438 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s11, 0); | |
486 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s22, 1); |
|
439 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s22, 1); | |
487 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s33, 2); |
|
440 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s33, 2); | |
488 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s44, 3); |
|
441 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s44, 3); | |
489 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s55, 4); |
|
442 | this->UI->pageSpectraNORM->displayOnPlotFloat(spectraPacket->s55, 4); | |
490 | } |
|
443 | } | |
491 | } |
|
444 | } | |
492 |
|
445 | |||
493 | void MainWindow::processIncomingPacket(TMPacketToRead *packet) |
|
|||
494 | { |
|
|||
495 | totalOfBytes = totalOfBytes + packet->size; |
|
|||
496 | totalOfPackets = totalOfPackets + 1; |
|
|||
497 | this->UI->totalOfBytesHasChanged(totalOfBytes); |
|
|||
498 | this->UI->totalOfPacketsHasChanged(totalOfPackets); |
|
|||
499 | preProcessPacket(packet); |
|
|||
500 | } |
|
|||
501 |
|
||||
502 | void MainWindow::resetStatistics() |
|
446 | void MainWindow::resetStatistics() | |
503 | { |
|
447 | { | |
504 | totalOfBytes = 0; |
|
448 | totalOfBytes = 0; | |
505 | totalOfPackets = 0; |
|
449 | totalOfPackets = 0; | |
506 | this->UI->totalOfBytesHasChanged(totalOfBytes); |
|
450 | this->UI->totalOfBytesHasChanged(totalOfBytes); | |
507 | this->UI->totalOfPacketsHasChanged(totalOfPackets); |
|
451 | this->UI->totalOfPacketsHasChanged(totalOfPackets); | |
508 | } |
|
452 | } | |
509 |
|
453 | |||
|
454 | //****************** | |||
|
455 | // packet processing | |||
|
456 | ||||
510 | void MainWindow::processPacketStore() |
|
457 | void MainWindow::processPacketStore() | |
511 | { |
|
458 | { | |
512 | TMPacketToRead *packet; |
|
459 | TMPacketToRead *packet; | |
513 | while(!generalCCSDSPacketStore.isEmpty()) |
|
460 | while(!generalCCSDSPacketStore.isEmpty()) | |
514 | { |
|
461 | { | |
515 | packet = generalCCSDSPacketStore.takeFirst(); |
|
462 | packet = generalCCSDSPacketStore.takeFirst(); | |
516 | processIncomingPacket(packet); |
|
463 | processIncomingPacket(packet); | |
517 | delete(packet); |
|
464 | delete(packet); | |
518 | } |
|
465 | } | |
519 | } |
|
466 | } | |
520 |
|
467 | |||
|
468 | void MainWindow::processIncomingPacket(TMPacketToRead *packet) | |||
|
469 | { | |||
|
470 | totalOfBytes = totalOfBytes + packet->size; | |||
|
471 | totalOfPackets = totalOfPackets + 1; | |||
|
472 | this->UI->totalOfBytesHasChanged(totalOfBytes); | |||
|
473 | this->UI->totalOfPacketsHasChanged(totalOfPackets); | |||
|
474 | preProcessPacket(packet); | |||
|
475 | } | |||
|
476 | ||||
|
477 | void MainWindow::preProcessPacket(TMPacketToRead *packet) | |||
|
478 | { | |||
|
479 | unsigned char pid = 0; | |||
|
480 | unsigned char cat = 0; | |||
|
481 | unsigned char typ = 0; | |||
|
482 | unsigned char sub = 0; | |||
|
483 | unsigned int sid = 0; | |||
|
484 | unsigned int length = 0; | |||
|
485 | unsigned int coarse_t = 0; | |||
|
486 | unsigned int fine_t = 0; | |||
|
487 | ||||
|
488 | //********************************* | |||
|
489 | // get the parameters of the packet | |||
|
490 | pid = this->UI->tmStatistics->getPID( packet ); | |||
|
491 | cat = this->UI->tmStatistics->getCAT( packet ); | |||
|
492 | typ = this->UI->tmStatistics->getTYPE( packet ); | |||
|
493 | sub = this->UI->tmStatistics->getSUBTYPE( packet ); | |||
|
494 | length = this->UI->tmStatistics->getLENGTH( packet ); | |||
|
495 | coarse_t = this->UI->tmStatistics->getCoarseTime( packet ); | |||
|
496 | fine_t = this->UI->tmStatistics->getFineTime( packet ); | |||
|
497 | sid = this->UI->tmStatistics->getSID( packet, pid, cat, typ, sub ); | |||
|
498 | ||||
|
499 | this->UI->tmStatistics->updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t); | |||
|
500 | ||||
|
501 | // compare length in the packet with the size of the packet | |||
|
502 | if ( (length + 1 + 10) != (packet->size)) | |||
|
503 | { | |||
|
504 | displayOnConsole("reception of " + QString::number(packet->size) | |||
|
505 | + " bytes instead of " + QString::number(length + 1 + 10)); | |||
|
506 | } | |||
|
507 | ||||
|
508 | //*************************************************** | |||
|
509 | // if the packet is an HK packet, display its content | |||
|
510 | if ( (pid == 76) & (cat == 4) & (typ == TM_TYPE_HK) & (sub == TM_SUBTYPE_HK) ) | |||
|
511 | { | |||
|
512 | this->UI->hkDisplay->displayPacket(packet); | |||
|
513 | } | |||
|
514 | ||||
|
515 | //************************************************************** | |||
|
516 | // if the packet is a parameter dump packet, display its content | |||
|
517 | if ( (pid == 76) & (cat == 9) & (typ == TM_TYPE_PARAMETER_DUMP) & (sub == TM_SUBTYPE_PARAMETER_DUMP) ) | |||
|
518 | { | |||
|
519 | this->UI->parameterDump->updateParameterDump(packet); | |||
|
520 | } | |||
|
521 | ||||
|
522 | //**************************************** | |||
|
523 | // if the packet is a waveform, display it | |||
|
524 | if ( (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE) ) | |||
|
525 | { | |||
|
526 | sid = packet->Value[20]; // SID | |||
|
527 | switch (sid){ | |||
|
528 | case SID_NORMAL_SWF_F0: | |||
|
529 | buildWFAndDisplay(packet, &wfPacketNormal[0], 0); | |||
|
530 | break; | |||
|
531 | case SID_NORMAL_SWF_F1: | |||
|
532 | buildWFAndDisplay(packet, &wfPacketNormal[1], 1); | |||
|
533 | break; | |||
|
534 | case SID_NORMAL_SWF_F2: | |||
|
535 | buildWFAndDisplay(packet, &wfPacketNormal[2], 2); | |||
|
536 | break; | |||
|
537 | case SID_NORMAL_CWF_F3: | |||
|
538 | buildWFAndDisplay_CWF_F3(packet, &wfPacketNormal[3], 3); | |||
|
539 | break; | |||
|
540 | case SID_BURST_CWF_F2: | |||
|
541 | buildWFAndDisplayBurst(packet, &wfPacketBurst); | |||
|
542 | break; | |||
|
543 | case SID_SBM1_CWF_F1: | |||
|
544 | buildWFAndDisplaySBM1(packet, &wfPacketSBM1); | |||
|
545 | break; | |||
|
546 | case SID_SBM2_CWF_F2: | |||
|
547 | buildWFAndDisplaySBM2(packet, &wfPacketSBM2); | |||
|
548 | break; | |||
|
549 | case SID_NORMAL_ASM_F0: | |||
|
550 | buildSpectrumAndDisplayNORM_F0(packet, spectraPacketNormalSpectrumF0); | |||
|
551 | break; | |||
|
552 | } | |||
|
553 | } | |||
|
554 | } | |||
|
555 | ||||
|
556 | //****************** | |||
|
557 | // general functions | |||
|
558 | ||||
521 | void MainWindow::readSettings() |
|
559 | void MainWindow::readSettings() | |
522 | { |
|
560 | { | |
523 | QSettings settings("lpp", "lfrsgse"); |
|
561 | QSettings settings("lpp", "lfrsgse"); | |
524 | echoBridgeIP0 = (unsigned char) settings.value("echoBridgeIP0", 127).toInt(); |
|
562 | echoBridgeIP0 = (unsigned char) settings.value("echoBridgeIP0", 127).toInt(); | |
525 | echoBridgeIP1 = (unsigned char) settings.value("echoBridgeIP1", 0).toInt(); |
|
563 | echoBridgeIP1 = (unsigned char) settings.value("echoBridgeIP1", 0).toInt(); | |
526 | echoBridgeIP2 = (unsigned char) settings.value("echoBridgeIP2", 0).toInt(); |
|
564 | echoBridgeIP2 = (unsigned char) settings.value("echoBridgeIP2", 0).toInt(); | |
527 | echoBridgeIP3 = (unsigned char) settings.value("echoBridgeIP3", 1).toInt(); |
|
565 | echoBridgeIP3 = (unsigned char) settings.value("echoBridgeIP3", 1).toInt(); | |
528 | } |
|
566 | } | |
529 |
|
567 | |||
530 | void MainWindow::writeSettings() |
|
568 | void MainWindow::writeSettings() | |
531 | { |
|
569 | { | |
532 | QSettings settings("lpp", "lfrsgse"); |
|
570 | QSettings settings("lpp", "lfrsgse"); | |
533 | settings.setValue("echoBridgeIP0", this->UI->serverTMEchoDialogBox->get_addressPart1()); |
|
571 | settings.setValue("echoBridgeIP0", this->UI->serverTMEchoDialogBox->get_addressPart1()); | |
534 | settings.setValue("echoBridgeIP1", this->UI->serverTMEchoDialogBox->get_addressPart2()); |
|
572 | settings.setValue("echoBridgeIP1", this->UI->serverTMEchoDialogBox->get_addressPart2()); | |
535 | settings.setValue("echoBridgeIP2", this->UI->serverTMEchoDialogBox->get_addressPart3()); |
|
573 | settings.setValue("echoBridgeIP2", this->UI->serverTMEchoDialogBox->get_addressPart3()); | |
536 | settings.setValue("echoBridgeIP3", this->UI->serverTMEchoDialogBox->get_addressPart4()); |
|
574 | settings.setValue("echoBridgeIP3", this->UI->serverTMEchoDialogBox->get_addressPart4()); | |
537 | } |
|
575 | } | |
538 |
|
576 | |||
539 | void MainWindow::closeEvent(QCloseEvent *) |
|
577 | void MainWindow::closeEvent(QCloseEvent *) | |
540 | { |
|
578 | { | |
541 | writeSettings(); |
|
579 | writeSettings(); | |
542 | } |
|
580 | } |
@@ -1,109 +1,110 | |||||
1 | #ifndef MAINWINDOW_H |
|
1 | #ifndef MAINWINDOW_H | |
2 | #define MAINWINDOW_H |
|
2 | #define MAINWINDOW_H | |
3 |
|
3 | |||
4 | #include <QTcpServer> |
|
4 | #include <QTcpServer> | |
5 | #include <QTcpSocket> |
|
5 | #include <QTcpSocket> | |
6 | #include <QXmlSimpleReader> |
|
6 | #include <QXmlSimpleReader> | |
7 | #include <QSettings> |
|
7 | #include <QSettings> | |
8 | #include <QMainWindow> |
|
8 | #include <QMainWindow> | |
9 |
|
9 | |||
10 | #include <lfrxmlhandler.h> |
|
10 | #include <lfrxmlhandler.h> | |
11 | #include <lfrxmlwriter.h> |
|
11 | #include <lfrxmlwriter.h> | |
12 | #include <mainwindowui.h> |
|
12 | #include <mainwindowui.h> | |
13 | #include "tmpackettoread.h" |
|
13 | #include "tmpackettoread.h" | |
14 | #include "wfpacket.h" |
|
14 | #include "wfpacket.h" | |
15 | #include "lfrxmlparser.h" |
|
15 | #include "lfrxmlparser.h" | |
16 | #include <spectrapacket.h> |
|
16 | #include <spectrapacket.h> | |
17 |
|
17 | |||
18 | class MainWindow : public QMainWindow |
|
18 | class MainWindow : public QMainWindow | |
19 | { |
|
19 | { | |
20 | Q_OBJECT |
|
20 | Q_OBJECT | |
21 |
|
21 | |||
22 | public: |
|
22 | public: | |
23 | MainWindow(QWidget *parent = 0); |
|
23 | MainWindow(QWidget *parent = 0); | |
24 | ~MainWindow(); |
|
24 | ~MainWindow(); | |
25 |
|
25 | |||
26 | void displayNetworkInterfaces(); |
|
26 | void displayNetworkInterfaces(); | |
27 | void initSocketStatesList(); |
|
27 | void initSocketStatesList(); | |
28 | // |
|
28 | // | |
29 | void preProcessPacket(TMPacketToRead *packet); |
|
29 | void preProcessPacket(TMPacketToRead *packet); | |
30 | unsigned char getPID(TMPacketToRead *packet); |
|
30 | unsigned char getPID(TMPacketToRead *packet); | |
31 | unsigned char getCAT(TMPacketToRead *packet); |
|
31 | unsigned char getCAT(TMPacketToRead *packet); | |
32 | unsigned char getTYPE(TMPacketToRead *packet); |
|
32 | unsigned char getTYPE(TMPacketToRead *packet); | |
33 | unsigned char getSUBTYPE(TMPacketToRead *packet); |
|
33 | unsigned char getSUBTYPE(TMPacketToRead *packet); | |
34 | unsigned int getLENGTH(TMPacketToRead *packet); |
|
34 | unsigned int getLENGTH(TMPacketToRead *packet); | |
35 | unsigned int getCoarseTime(TMPacketToRead *packet); |
|
35 | unsigned int getCoarseTime(TMPacketToRead *packet); | |
36 | unsigned int getFineTime(TMPacketToRead *packet); |
|
36 | unsigned int getFineTime(TMPacketToRead *packet); | |
37 | unsigned int getSID(TMPacketToRead *packet, unsigned char pid, unsigned char cat, unsigned char typ, unsigned char sub); |
|
37 | unsigned int getSID(TMPacketToRead *packet, unsigned char pid, unsigned char cat, unsigned char typ, unsigned char sub); | |
38 | // |
|
38 | // | |
39 | void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); |
|
39 | void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); | |
|
40 | void buildWFAndDisplay_CWF_F3(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); | |||
40 | void buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket); |
|
41 | void buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket); | |
41 | void buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket); |
|
42 | void buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket); | |
42 | void buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket); |
|
43 | void buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket); | |
43 | void buildSpectrumAndDisplayNORM_F0(TMPacketToRead *packet, SpectraPacket *spectraPacket); |
|
44 | void buildSpectrumAndDisplayNORM_F0(TMPacketToRead *packet, SpectraPacket *spectraPacket); | |
44 |
|
45 | |||
45 | protected: |
|
46 | protected: | |
46 | void closeEvent(QCloseEvent *); |
|
47 | void closeEvent(QCloseEvent *); | |
47 |
|
48 | |||
48 | private: |
|
49 | private: | |
49 | void readSettings(); |
|
50 | void readSettings(); | |
50 | void writeSettings(); |
|
51 | void writeSettings(); | |
51 | unsigned char echoBridgeIP0; |
|
52 | unsigned char echoBridgeIP0; | |
52 | unsigned char echoBridgeIP1; |
|
53 | unsigned char echoBridgeIP1; | |
53 | unsigned char echoBridgeIP2; |
|
54 | unsigned char echoBridgeIP2; | |
54 | unsigned char echoBridgeIP3; |
|
55 | unsigned char echoBridgeIP3; | |
55 |
|
56 | |||
56 | QByteArray dataArray; |
|
57 | QByteArray dataArray; | |
57 |
|
58 | |||
58 | QList<TMPacketToRead*> generalCCSDSPacketStore; |
|
59 | QList<TMPacketToRead*> generalCCSDSPacketStore; | |
59 |
|
60 | |||
60 | QTcpServer *analyserSGSEServerTC; |
|
61 | QTcpServer *analyserSGSEServerTC; | |
61 | QTcpServer *analyserSGSEServerTM; |
|
62 | QTcpServer *analyserSGSEServerTM; | |
62 | QTcpSocket *socketTC; |
|
63 | QTcpSocket *socketTC; | |
63 | QTcpSocket *socketTM; |
|
64 | QTcpSocket *socketTM; | |
64 | QTcpSocket *socketEchoServer; |
|
65 | QTcpSocket *socketEchoServer; | |
65 |
|
66 | |||
66 | unsigned int totalOfBytes; |
|
67 | unsigned int totalOfBytes; | |
67 | unsigned int totalOfPackets; |
|
68 | unsigned int totalOfPackets; | |
68 |
|
69 | |||
69 | QXmlSimpleReader xmlReader; |
|
70 | QXmlSimpleReader xmlReader; | |
70 | QXmlInputSource *sourceTC; |
|
71 | QXmlInputSource *sourceTC; | |
71 | LFRXmlHandler *xmlHandler; |
|
72 | LFRXmlHandler *xmlHandler; | |
72 | LFRXmlParser *lfrXmlParser; |
|
73 | LFRXmlParser *lfrXmlParser; | |
73 |
|
74 | |||
74 | QList<QString> socketStates; |
|
75 | QList<QString> socketStates; | |
75 |
|
76 | |||
76 | char *buffer; |
|
77 | char *buffer; | |
77 |
|
78 | |||
78 | MainWindowUI *UI; |
|
79 | MainWindowUI *UI; | |
79 |
|
80 | |||
80 | LFRXmlWriter *lfrXmlWriter; |
|
81 | LFRXmlWriter *lfrXmlWriter; | |
81 |
|
82 | |||
82 | WFPacket wfPacketNormal[4]; |
|
83 | WFPacket wfPacketNormal[4]; | |
83 | WFPacket wfPacketBurst; |
|
84 | WFPacket wfPacketBurst; | |
84 | WFPacket wfPacketSBM1; |
|
85 | WFPacket wfPacketSBM1; | |
85 | WFPacket wfPacketSBM2; |
|
86 | WFPacket wfPacketSBM2; | |
86 | SpectraPacket *spectraPacketNormalSpectrumF0; |
|
87 | SpectraPacket *spectraPacketNormalSpectrumF0; | |
87 |
|
88 | |||
88 | bool parsingContinue; |
|
89 | bool parsingContinue; | |
89 |
|
90 | |||
90 | signals: |
|
91 | signals: | |
91 | void socketTMHasChanged(QTcpSocket *socket); |
|
92 | void socketTMHasChanged(QTcpSocket *socket); | |
92 |
|
93 | |||
93 | public slots: |
|
94 | public slots: | |
94 | void displayOnConsole(QString message); |
|
95 | void displayOnConsole(QString message); | |
95 | void listenOnTCTMPorts(); |
|
96 | void listenOnTCTMPorts(); | |
96 | void testTCTMPorts(); |
|
97 | void testTCTMPorts(); | |
97 | void newConnectionOnTCServer(); |
|
98 | void newConnectionOnTCServer(); | |
98 | void newConnectionOnTMServer(); |
|
99 | void newConnectionOnTMServer(); | |
99 | void readDataOnTCPort(); |
|
100 | void readDataOnTCPort(); | |
100 | void readDataOnTMPort(); |
|
101 | void readDataOnTMPort(); | |
101 | void readDataOnSocketEchoServer(); |
|
102 | void readDataOnSocketEchoServer(); | |
102 | void openEchoServer(); |
|
103 | void openEchoServer(); | |
103 | void socket_TMEcho_ServerHasChanged(); |
|
104 | void socket_TMEcho_ServerHasChanged(); | |
104 | void processIncomingPacket(TMPacketToRead *packet); |
|
105 | void processIncomingPacket(TMPacketToRead *packet); | |
105 | void resetStatistics(); |
|
106 | void resetStatistics(); | |
106 | void processPacketStore(); |
|
107 | void processPacketStore(); | |
107 | }; |
|
108 | }; | |
108 |
|
109 | |||
109 | #endif // MAINWINDOW_H |
|
110 | #endif // MAINWINDOW_H |
@@ -1,107 +1,107 | |||||
1 | #ifndef MAINWINDOWUI_H |
|
1 | #ifndef MAINWINDOWUI_H | |
2 | #define MAINWINDOWUI_H |
|
2 | #define MAINWINDOWUI_H | |
3 |
|
3 | |||
4 | #include <QWidget> |
|
4 | #include <QWidget> | |
5 | #include <qipdialogbox.h> |
|
5 | #include <qipdialogbox.h> | |
6 | #include <QLabel> |
|
6 | #include <QLabel> | |
7 | #include <QPushButton> |
|
7 | #include <QPushButton> | |
8 | #include <QGridLayout> |
|
8 | #include <QGridLayout> | |
9 | #include <QVBoxLayout> |
|
9 | #include <QVBoxLayout> | |
10 | #include <QGroupBox> |
|
10 | #include <QGroupBox> | |
11 | #include <QSpinBox> |
|
11 | #include <QSpinBox> | |
12 | #include <QTextEdit> |
|
12 | #include <QTextEdit> | |
13 | #include <QTabWidget> |
|
13 | #include <QTabWidget> | |
14 |
|
14 | |||
15 | #include <wfdisplay.h> |
|
15 | #include <wfdisplay.h> | |
16 | #include <pagespectra.h> |
|
16 | #include <pagespectra.h> | |
|
17 | #include <parameterdump.h> | |||
17 |
|
18 | |||
18 | #include "tmstatistics.h" |
|
19 | #include "tmstatistics.h" | |
19 | #include "hkdisplay.h" |
|
20 | #include "hkdisplay.h" | |
20 | #include "lfrspectrogram.h" |
|
21 | #include "lfrspectrogram.h" | |
21 | #include "parameterdump.h" |
|
|||
22 |
|
22 | |||
23 | class MainWindowUI : public QWidget |
|
23 | class MainWindowUI : public QWidget | |
24 | { |
|
24 | { | |
25 | Q_OBJECT |
|
25 | Q_OBJECT | |
26 | public: |
|
26 | public: | |
27 | explicit MainWindowUI(QWidget *parent = 0); |
|
27 | explicit MainWindowUI(QWidget *parent = 0); | |
28 |
|
28 | |||
29 | void setTCTMServerAddressIP(QString address); |
|
29 | void setTCTMServerAddressIP(QString address); | |
30 | QString getTMEchoServerAddress(); |
|
30 | QString getTMEchoServerAddress(); | |
31 | int getTMPort(); |
|
31 | int getTMPort(); | |
32 | int getTCPort(); |
|
32 | int getTCPort(); | |
33 | void displayOnConsole(QString message); |
|
33 | void displayOnConsole(QString message); | |
34 |
|
34 | |||
35 | QTabWidget *spwTabWidget; |
|
35 | QTabWidget *spwTabWidget; | |
36 | QWidget* spwTabWidgetPage0; |
|
36 | QWidget* spwTabWidgetPage0; | |
37 | QWidget* spwTabWidgetPage1; |
|
37 | QWidget* spwTabWidgetPage1; | |
38 | QWidget* spwTabWidgetPage2; |
|
38 | QWidget* spwTabWidgetPage2; | |
39 | QWidget* spwTabWidgetPage3; |
|
39 | QWidget* spwTabWidgetPage3; | |
40 | QWidget* spwTabWidgetPage4; |
|
40 | QWidget* spwTabWidgetPage4; | |
41 | QWidget* spwTabWidgetPage5; |
|
41 | QWidget* spwTabWidgetPage5; | |
42 | QWidget* spwTabWidgetPage6; |
|
42 | QWidget* spwTabWidgetPage6; | |
43 | QWidget* spwTabWidgetPage7; |
|
43 | QWidget* spwTabWidgetPage7; | |
44 |
|
44 | |||
45 | TMStatistics* tmStatistics; |
|
45 | TMStatistics* tmStatistics; | |
46 |
|
46 | |||
47 | WFDisplay* wfDisplay; |
|
47 | WFDisplay* wfDisplay; | |
48 | WFPage* wfPageBurst; |
|
48 | WFPage* wfPageBurst; | |
49 | WFPage* wfPageSBM1; |
|
49 | WFPage* wfPageSBM1; | |
50 | WFPage* wfPageSBM2; |
|
50 | WFPage* wfPageSBM2; | |
51 | PageSpectra* pageSpectraNORM; |
|
51 | PageSpectra* pageSpectraNORM; | |
52 | HKDisplay* hkDisplay; |
|
52 | HKDisplay* hkDisplay; | |
53 | LFRSpectrogram* lfrSpectrogam; |
|
53 | LFRSpectrogram* lfrSpectrogam; | |
54 |
|
54 | |||
55 | QWidget* widget_spectrogram; |
|
55 | QWidget* widget_spectrogram; | |
56 |
|
56 | |||
57 | ParameterDump* parameterDump; |
|
57 | ParameterDump* parameterDump; | |
58 |
|
58 | |||
59 | QPushButton *button_openServerTCTM; |
|
59 | QPushButton *button_openServerTCTM; | |
60 | QPushButton *button_testServerTCTM; |
|
60 | QPushButton *button_testServerTCTM; | |
61 | QPushButton *button_openSocketEchoServer; |
|
61 | QPushButton *button_openSocketEchoServer; | |
62 | QPushButton *button_TCAcknowledgement; |
|
62 | QPushButton *button_TCAcknowledgement; | |
63 | QPushButton *button_TCRejection; |
|
63 | QPushButton *button_TCRejection; | |
64 | QPushButton *button_GSEHK; |
|
64 | QPushButton *button_GSEHK; | |
65 | QPushButton *button_clearConsole; |
|
65 | QPushButton *button_clearConsole; | |
66 | QPushButton *button_resetStatistics; |
|
66 | QPushButton *button_resetStatistics; | |
67 |
|
67 | |||
68 | QIPDialogBox *serverTMEchoDialogBox; |
|
68 | QIPDialogBox *serverTMEchoDialogBox; | |
69 |
|
69 | |||
70 | QSpinBox *spinbox_serverTMEchoPort; |
|
70 | QSpinBox *spinbox_serverTMEchoPort; | |
71 |
|
71 | |||
72 | signals: |
|
72 | signals: | |
73 |
|
73 | |||
74 | public slots: |
|
74 | public slots: | |
75 | void clearConsole(); |
|
75 | void clearConsole(); | |
76 | void totalOfBytesHasChanged(unsigned int nbBytes); |
|
76 | void totalOfBytesHasChanged(unsigned int nbBytes); | |
77 | void totalOfPacketsHasChanged(unsigned int nbPackets); |
|
77 | void totalOfPacketsHasChanged(unsigned int nbPackets); | |
78 |
|
78 | |||
79 | private: |
|
79 | private: | |
80 | QLabel *label_serverTMEcho; |
|
80 | QLabel *label_serverTMEcho; | |
81 | QLabel *label_serverTMEchoPort; |
|
81 | QLabel *label_serverTMEchoPort; | |
82 | QLabel *label_TMServerPort; |
|
82 | QLabel *label_TMServerPort; | |
83 | QLabel *label_TCServerPort; |
|
83 | QLabel *label_TCServerPort; | |
84 | QLabel *label_currentTCTMServer; |
|
84 | QLabel *label_currentTCTMServer; | |
85 | QLabel *label_currentTCTMServerIP; |
|
85 | QLabel *label_currentTCTMServerIP; | |
86 | QLabel *label_totalOfBytes; |
|
86 | QLabel *label_totalOfBytes; | |
87 | QLabel *label_totalOfPackets; |
|
87 | QLabel *label_totalOfPackets; | |
88 |
|
88 | |||
89 | QTextEdit *console; |
|
89 | QTextEdit *console; | |
90 |
|
90 | |||
91 | QSpinBox *spinbox_TMServerPort; |
|
91 | QSpinBox *spinbox_TMServerPort; | |
92 | QSpinBox *spinbox_TCServerPort; |
|
92 | QSpinBox *spinbox_TCServerPort; | |
93 |
|
93 | |||
94 | QGroupBox *groupbox_TMEcho; |
|
94 | QGroupBox *groupbox_TMEcho; | |
95 | QGroupBox *groupbox_ports; |
|
95 | QGroupBox *groupbox_ports; | |
96 | QGroupBox *groupbox_TMToForeignGSETester; |
|
96 | QGroupBox *groupbox_TMToForeignGSETester; | |
97 |
|
97 | |||
98 | QVBoxLayout *layout_TMEcho; |
|
98 | QVBoxLayout *layout_TMEcho; | |
99 | QVBoxLayout *layout_TMToForeignGSETester; |
|
99 | QVBoxLayout *layout_TMToForeignGSETester; | |
100 | QVBoxLayout *layout_overallLayout; |
|
100 | QVBoxLayout *layout_overallLayout; | |
101 |
|
101 | |||
102 | QGridLayout *mainLayout; |
|
102 | QGridLayout *mainLayout; | |
103 | QGridLayout *layout_ports; |
|
103 | QGridLayout *layout_ports; | |
104 |
|
104 | |||
105 | }; |
|
105 | }; | |
106 |
|
106 | |||
107 | #endif // MAINWINDOWUI_H |
|
107 | #endif // MAINWINDOWUI_H |
@@ -1,519 +1,555 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: librmapplugin.so.1.0.0 |
|
2 | # Makefile for building: librmapplugin.so.1.0.0 | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.4) on: Wed Jul |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Wed Jul 31 09:19:17 2013 | |
4 | # Project: rmapplugin.pro |
|
4 | # Project: rmapplugin.pro | |
5 | # Template: lib |
|
5 | # Template: lib | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | ####### Compiler, tools and options |
|
9 | ####### Compiler, tools and options | |
10 |
|
10 | |||
11 | CC = gcc |
|
11 | CC = gcc | |
12 | CXX = g++ |
|
12 | CXX = g++ | |
13 | DEFINES = -DPLUGIN=rmapplugin -DPLUGINHEADER="\"rmapplugin.h\"" -Ddriver_Name="\"RMAPPlugin\"" -Ddriver_Author="\"Paul Leroy paul.leroy@lpp.polytechnique.fr\"" -Ddriver_Version="\"1.1.2\"" -Ddriver_Description="\"AHB bus controler, works with Gaisler's AHB plugn' play bus.\"" -Ddriver_can_be_root=1 -Ddriver_can_be_child=0 -Ddriver_VID=0 -Ddriver_PID=0 -DLPPMON_VERSION="\"0.0.1\"" -DUNIXTRANSLATIONPATH -DLPPMON_PLUGINS_INSTALL_PATH="QDir::homePath()+\"/.lppmon/plugins\"" -DLPPMON_CONFIG_PATH="QDir::homePath()+\"/.lppmon/config\"" -DLPPMON_TRANSLATION_PATH="\"/etc/lppmon/translations\"" -DLPPMONPLUGIN_LIBRARY -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED |
|
13 | DEFINES = -DPLUGIN=rmapplugin -DPLUGINHEADER="\"rmapplugin.h\"" -Ddriver_Name="\"RMAPPlugin\"" -Ddriver_Author="\"Paul Leroy paul.leroy@lpp.polytechnique.fr\"" -Ddriver_Version="\"1.1.2\"" -Ddriver_Description="\"AHB bus controler, works with Gaisler's AHB plugn' play bus.\"" -Ddriver_can_be_root=1 -Ddriver_can_be_child=0 -Ddriver_VID=0 -Ddriver_PID=0 -DLPPMON_VERSION="\"0.0.1\"" -DUNIXTRANSLATIONPATH -DLPPMON_PLUGINS_INSTALL_PATH="QDir::homePath()+\"/.lppmon/plugins\"" -DLPPMON_CONFIG_PATH="QDir::homePath()+\"/.lppmon/config\"" -DLPPMON_TRANSLATION_PATH="\"/etc/lppmon/translations\"" -DLPPMONPLUGIN_LIBRARY -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 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) |
|
14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -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 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/usr/include/python2.7 -I/usr/include/python2.7 -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 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -W -D_REENTRANT -fPIC $(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../../DEV_PLE/header -I../spw_usb_driver_v2.63/inc -I/usr/include/lppmon/common -I/usr/include/lppmon/wfdisplay -I/usr/include/lppmon/common -I/usr/include/lppmon -I/usr/include/lppmon/pluginsInterface -I/usr/include/PythonQt -Imoc |
|
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../../DEV_PLE/header -I../spw_usb_driver_v2.63/inc -I/usr/include/lppmon/common -I/usr/include/lppmon/wfdisplay -I/usr/include/lppmon/parameterdump -I/usr/include/lppmon/common -I/usr/include/lppmon -I/usr/include/lppmon/pluginsInterface -I/usr/include/PythonQt -Imoc | |
17 | LINK = g++ |
|
17 | LINK = g++ | |
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro -shared -Wl,-soname,librmapplugin.so.1 |
|
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro -shared -Wl,-soname,librmapplugin.so.1 | |
19 | LIBS = $(SUBLIBS) -L/usr/lib64 ../spw_usb_driver_v2.63/lib/x86_64/libSpaceWireUSBAPI.so ../spw_usb_driver_v2.63/lib/x86_64/libConfigLibraryUSB.so -llppmoncommon -lwfdisplay -lqwt5-qt4 -ldl -lutil -lm -lpython2.7 -lPythonQt_QtAll -lPythonQt -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread |
|
19 | LIBS = $(SUBLIBS) -L/usr/lib64 ../spw_usb_driver_v2.63/lib/x86_64/libSpaceWireUSBAPI.so ../spw_usb_driver_v2.63/lib/x86_64/libConfigLibraryUSB.so -llppmoncommon -lwfdisplay -lqwt5-qt4 -lparameterdump -ldl -lutil -lm -lpython2.7 -lPythonQt_QtAll -lPythonQt -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread | |
20 | AR = ar cqs |
|
20 | AR = ar cqs | |
21 | RANLIB = |
|
21 | RANLIB = | |
22 | QMAKE = /usr/bin/qmake-qt4 |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
23 | TAR = tar -cf |
|
23 | TAR = tar -cf | |
24 | COMPRESS = gzip -9f |
|
24 | COMPRESS = gzip -9f | |
25 | COPY = cp -f |
|
25 | COPY = cp -f | |
26 | SED = sed |
|
26 | SED = sed | |
27 | COPY_FILE = $(COPY) |
|
27 | COPY_FILE = $(COPY) | |
28 | COPY_DIR = $(COPY) -r |
|
28 | COPY_DIR = $(COPY) -r | |
29 | STRIP = |
|
29 | STRIP = | |
30 | INSTALL_FILE = install -m 644 -p |
|
30 | INSTALL_FILE = install -m 644 -p | |
31 | INSTALL_DIR = $(COPY_DIR) |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
32 | INSTALL_PROGRAM = install -m 755 -p |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
33 | DEL_FILE = rm -f |
|
33 | DEL_FILE = rm -f | |
34 | SYMLINK = ln -f -s |
|
34 | SYMLINK = ln -f -s | |
35 | DEL_DIR = rmdir |
|
35 | DEL_DIR = rmdir | |
36 | MOVE = mv -f |
|
36 | MOVE = mv -f | |
37 | CHK_DIR_EXISTS= test -d |
|
37 | CHK_DIR_EXISTS= test -d | |
38 | MKDIR = mkdir -p |
|
38 | MKDIR = mkdir -p | |
39 |
|
39 | |||
40 | ####### Output directory |
|
40 | ####### Output directory | |
41 |
|
41 | |||
42 | OBJECTS_DIR = obj/ |
|
42 | OBJECTS_DIR = obj/ | |
43 |
|
43 | |||
44 | ####### Files |
|
44 | ####### Files | |
45 |
|
45 | |||
46 | SOURCES = rmapplugin.cpp \ |
|
46 | SOURCES = rmapplugin.cpp \ | |
47 | rmappluginui.cpp \ |
|
47 | rmappluginui.cpp \ | |
48 | rmapoperations.cpp \ |
|
48 | rmapoperations.cpp \ | |
49 | ccsds.cpp \ |
|
49 | ccsds.cpp \ | |
50 | ../common_PLE/qipdialogbox.cpp \ |
|
50 | ../common_PLE/qipdialogbox.cpp \ | |
51 | ../common_PLE/gresbstatusenquiry.cpp \ |
|
51 | ../common_PLE/gresbstatusenquiry.cpp \ | |
52 | rmappluginpythonwrapper.cpp \ |
|
52 | rmappluginpythonwrapper.cpp \ | |
53 | stardundee.cpp \ |
|
53 | stardundee.cpp \ | |
54 | gresb.cpp \ |
|
54 | gresb.cpp \ | |
55 | tcpackettosend.cpp \ |
|
55 | tcpackettosend.cpp \ | |
56 | tmpackettoread.cpp \ |
|
56 | tmpackettoread.cpp \ | |
57 | tmstatistics.cpp \ |
|
57 | tmstatistics.cpp \ | |
58 | wfpacket.cpp \ |
|
58 | wfpacket.cpp \ | |
59 | tmechobridge.cpp \ |
|
59 | tmechobridge.cpp \ | |
|
60 | entermode.cpp \ | |||
|
61 | lfractions.cpp \ | |||
60 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \ |
|
62 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \ | |
61 | moc/moc_rmapplugin.cpp \ |
|
63 | moc/moc_rmapplugin.cpp \ | |
62 | moc/moc_qipdialogbox.cpp \ |
|
64 | moc/moc_qipdialogbox.cpp \ | |
63 | moc/moc_gresbstatusenquiry.cpp \ |
|
65 | moc/moc_gresbstatusenquiry.cpp \ | |
64 | moc/moc_rmappluginpythonwrapper.cpp \ |
|
66 | moc/moc_rmappluginpythonwrapper.cpp \ | |
65 | moc/moc_stardundee.cpp \ |
|
67 | moc/moc_stardundee.cpp \ | |
66 | moc/moc_gresb.cpp \ |
|
68 | moc/moc_gresb.cpp \ | |
67 | moc/moc_tcpackettosend.cpp \ |
|
69 | moc/moc_tcpackettosend.cpp \ | |
68 | moc/moc_tmpackettoread.cpp \ |
|
70 | moc/moc_tmpackettoread.cpp \ | |
69 | moc/moc_tmstatistics.cpp \ |
|
71 | moc/moc_tmstatistics.cpp \ | |
70 | moc/moc_wfpacket.cpp \ |
|
72 | moc/moc_wfpacket.cpp \ | |
71 | moc/moc_tmechobridge.cpp \ |
|
73 | moc/moc_tmechobridge.cpp \ | |
|
74 | moc/moc_entermode.cpp \ | |||
|
75 | moc/moc_lfractions.cpp \ | |||
72 | moc/moc_genericPySysdriver.cpp \ |
|
76 | moc/moc_genericPySysdriver.cpp \ | |
73 | moc/moc_lppmonplugin.cpp |
|
77 | moc/moc_lppmonplugin.cpp | |
74 | OBJECTS = obj/rmapplugin.o \ |
|
78 | OBJECTS = obj/rmapplugin.o \ | |
75 | obj/rmappluginui.o \ |
|
79 | obj/rmappluginui.o \ | |
76 | obj/rmapoperations.o \ |
|
80 | obj/rmapoperations.o \ | |
77 | obj/ccsds.o \ |
|
81 | obj/ccsds.o \ | |
78 | obj/qipdialogbox.o \ |
|
82 | obj/qipdialogbox.o \ | |
79 | obj/gresbstatusenquiry.o \ |
|
83 | obj/gresbstatusenquiry.o \ | |
80 | obj/rmappluginpythonwrapper.o \ |
|
84 | obj/rmappluginpythonwrapper.o \ | |
81 | obj/stardundee.o \ |
|
85 | obj/stardundee.o \ | |
82 | obj/gresb.o \ |
|
86 | obj/gresb.o \ | |
83 | obj/tcpackettosend.o \ |
|
87 | obj/tcpackettosend.o \ | |
84 | obj/tmpackettoread.o \ |
|
88 | obj/tmpackettoread.o \ | |
85 | obj/tmstatistics.o \ |
|
89 | obj/tmstatistics.o \ | |
86 | obj/wfpacket.o \ |
|
90 | obj/wfpacket.o \ | |
87 | obj/tmechobridge.o \ |
|
91 | obj/tmechobridge.o \ | |
|
92 | obj/entermode.o \ | |||
|
93 | obj/lfractions.o \ | |||
88 | obj/lppmonplugininterface.o \ |
|
94 | obj/lppmonplugininterface.o \ | |
89 | obj/moc_rmappluginui.o \ |
|
95 | obj/moc_rmappluginui.o \ | |
90 | obj/moc_rmapplugin.o \ |
|
96 | obj/moc_rmapplugin.o \ | |
91 | obj/moc_qipdialogbox.o \ |
|
97 | obj/moc_qipdialogbox.o \ | |
92 | obj/moc_gresbstatusenquiry.o \ |
|
98 | obj/moc_gresbstatusenquiry.o \ | |
93 | obj/moc_rmappluginpythonwrapper.o \ |
|
99 | obj/moc_rmappluginpythonwrapper.o \ | |
94 | obj/moc_stardundee.o \ |
|
100 | obj/moc_stardundee.o \ | |
95 | obj/moc_gresb.o \ |
|
101 | obj/moc_gresb.o \ | |
96 | obj/moc_tcpackettosend.o \ |
|
102 | obj/moc_tcpackettosend.o \ | |
97 | obj/moc_tmpackettoread.o \ |
|
103 | obj/moc_tmpackettoread.o \ | |
98 | obj/moc_tmstatistics.o \ |
|
104 | obj/moc_tmstatistics.o \ | |
99 | obj/moc_wfpacket.o \ |
|
105 | obj/moc_wfpacket.o \ | |
100 | obj/moc_tmechobridge.o \ |
|
106 | obj/moc_tmechobridge.o \ | |
|
107 | obj/moc_entermode.o \ | |||
|
108 | obj/moc_lfractions.o \ | |||
101 | obj/moc_genericPySysdriver.o \ |
|
109 | obj/moc_genericPySysdriver.o \ | |
102 | obj/moc_lppmonplugin.o |
|
110 | obj/moc_lppmonplugin.o | |
103 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
111 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
104 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
112 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
105 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
113 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
106 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
114 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
107 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
115 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
108 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
116 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
109 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
117 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
110 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
118 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
111 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
119 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
112 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
120 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
113 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
121 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
114 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
122 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
115 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
123 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
116 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
124 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
117 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ |
|
125 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ | |
118 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ |
|
126 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ | |
119 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
127 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
120 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
128 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
121 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
129 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
122 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
130 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
123 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
131 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
124 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
132 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
125 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
133 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
126 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
134 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
127 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
135 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
128 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
136 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
129 | rmapplugin.pro |
|
137 | rmapplugin.pro | |
130 | QMAKE_TARGET = rmapplugin |
|
138 | QMAKE_TARGET = rmapplugin | |
131 | DESTDIR = bin/ |
|
139 | DESTDIR = bin/ | |
132 | TARGET = librmapplugin.so.1.0.0 |
|
140 | TARGET = librmapplugin.so.1.0.0 | |
133 | TARGETA = bin/librmapplugin.a |
|
141 | TARGETA = bin/librmapplugin.a | |
134 | TARGETD = librmapplugin.so.1.0.0 |
|
142 | TARGETD = librmapplugin.so.1.0.0 | |
135 | TARGET0 = librmapplugin.so |
|
143 | TARGET0 = librmapplugin.so | |
136 | TARGET1 = librmapplugin.so.1 |
|
144 | TARGET1 = librmapplugin.so.1 | |
137 | TARGET2 = librmapplugin.so.1.0 |
|
145 | TARGET2 = librmapplugin.so.1.0 | |
138 |
|
146 | |||
139 | first: all |
|
147 | first: all | |
140 | ####### Implicit rules |
|
148 | ####### Implicit rules | |
141 |
|
149 | |||
142 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
150 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
143 |
|
151 | |||
144 | .cpp.o: |
|
152 | .cpp.o: | |
145 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
153 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
146 |
|
154 | |||
147 | .cc.o: |
|
155 | .cc.o: | |
148 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
156 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
149 |
|
157 | |||
150 | .cxx.o: |
|
158 | .cxx.o: | |
151 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
159 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
152 |
|
160 | |||
153 | .C.o: |
|
161 | .C.o: | |
154 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
162 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
155 |
|
163 | |||
156 | .c.o: |
|
164 | .c.o: | |
157 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
165 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
158 |
|
166 | |||
159 | ####### Build rules |
|
167 | ####### Build rules | |
160 |
|
168 | |||
161 | all: Makefile bin/$(TARGET) |
|
169 | all: Makefile bin/$(TARGET) | |
162 |
|
170 | |||
163 | bin/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) |
|
171 | bin/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) | |
164 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
172 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
165 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) |
|
173 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) | |
166 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) |
|
174 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) | |
167 | -ln -s $(TARGET) $(TARGET0) |
|
175 | -ln -s $(TARGET) $(TARGET0) | |
168 | -ln -s $(TARGET) $(TARGET1) |
|
176 | -ln -s $(TARGET) $(TARGET1) | |
169 | -ln -s $(TARGET) $(TARGET2) |
|
177 | -ln -s $(TARGET) $(TARGET2) | |
170 | -$(DEL_FILE) bin/$(TARGET) |
|
178 | -$(DEL_FILE) bin/$(TARGET) | |
171 | -$(DEL_FILE) bin/$(TARGET0) |
|
179 | -$(DEL_FILE) bin/$(TARGET0) | |
172 | -$(DEL_FILE) bin/$(TARGET1) |
|
180 | -$(DEL_FILE) bin/$(TARGET1) | |
173 | -$(DEL_FILE) bin/$(TARGET2) |
|
181 | -$(DEL_FILE) bin/$(TARGET2) | |
174 | -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) bin/ |
|
182 | -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) bin/ | |
175 |
|
183 | |||
176 |
|
184 | |||
177 |
|
185 | |||
178 | staticlib: $(TARGETA) |
|
186 | staticlib: $(TARGETA) | |
179 |
|
187 | |||
180 | $(TARGETA): $(OBJECTS) $(OBJCOMP) |
|
188 | $(TARGETA): $(OBJECTS) $(OBJCOMP) | |
181 | -$(DEL_FILE) $(TARGETA) |
|
189 | -$(DEL_FILE) $(TARGETA) | |
182 | $(AR) $(TARGETA) $(OBJECTS) |
|
190 | $(AR) $(TARGETA) $(OBJECTS) | |
183 |
|
191 | |||
184 | Makefile: rmapplugin.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
192 | Makefile: rmapplugin.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
185 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
193 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
186 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
194 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
187 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
195 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
188 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
196 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
189 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
197 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
190 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
198 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
191 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
199 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
192 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
200 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
193 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
201 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
194 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
202 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
195 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
203 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
196 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
204 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
197 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
205 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
198 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ |
|
206 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ | |
199 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ |
|
207 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ | |
200 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
208 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
201 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
209 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
202 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
210 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
203 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
211 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
204 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
212 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
205 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
213 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
206 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
214 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
207 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
215 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
208 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
216 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
209 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
217 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
210 | /usr/lib64/libQtXml.prl \ |
|
218 | /usr/lib64/libQtXml.prl \ | |
211 | /usr/lib64/libQtCore.prl \ |
|
219 | /usr/lib64/libQtCore.prl \ | |
212 | /usr/lib64/libQtGui.prl \ |
|
220 | /usr/lib64/libQtGui.prl \ | |
213 | /usr/lib64/libQtNetwork.prl |
|
221 | /usr/lib64/libQtNetwork.prl | |
214 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
222 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro | |
215 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
223 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
216 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
224 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
217 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
225 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
218 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
226 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
219 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
227 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
220 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
228 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
221 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
229 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
222 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
230 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
223 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
231 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
224 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
232 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
225 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
233 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
226 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
234 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
227 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
235 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
228 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
236 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
229 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf: |
|
237 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf: | |
230 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf: |
|
238 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf: | |
231 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
239 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
232 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
240 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
233 | /usr/lib64/qt4/mkspecs/features/qt.prf: |
|
241 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |
234 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: |
|
242 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |
235 | /usr/lib64/qt4/mkspecs/features/moc.prf: |
|
243 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |
236 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
244 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
237 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
245 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
238 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
246 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
239 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
247 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
240 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
248 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
241 | /usr/lib64/libQtXml.prl: |
|
249 | /usr/lib64/libQtXml.prl: | |
242 | /usr/lib64/libQtCore.prl: |
|
250 | /usr/lib64/libQtCore.prl: | |
243 | /usr/lib64/libQtGui.prl: |
|
251 | /usr/lib64/libQtGui.prl: | |
244 | /usr/lib64/libQtNetwork.prl: |
|
252 | /usr/lib64/libQtNetwork.prl: | |
245 | qmake: FORCE |
|
253 | qmake: FORCE | |
246 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
254 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro | |
247 |
|
255 | |||
248 | dist: |
|
256 | dist: | |
249 | @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0 |
|
257 | @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0 | |
250 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents ../../DEV_PLE/header/ccsds_types.h rmappluginui.h rmapplugin.h rmapoperations.h ccsds.h ../common_PLE/qipdialogbox.h ../common_PLE/gresbstatusenquiry.h rmappluginpythonwrapper.h stardundee.h ../spw_usb_driver_v2.61/inc/spw_usb_api.h ../spw_usb_driver_v2.61/inc/spw_config_library.h gresb.h tcpackettosend.h tmpackettoread.h tmstatistics.h wfpacket.h params.h tmechobridge.h /usr/include/lppmon/genericPySysdriver.h /usr/include/lppmon/lppmonplugin.h obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmapplugin.cpp rmappluginui.cpp rmapoperations.cpp ccsds.cpp ../common_PLE/qipdialogbox.cpp ../common_PLE/gresbstatusenquiry.cpp rmappluginpythonwrapper.cpp stardundee.cpp gresb.cpp tcpackettosend.cpp tmpackettoread.cpp tmstatistics.cpp wfpacket.cpp tmechobridge.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp obj/rmapplugin1.0.0/ && (cd `dirname obj/rmapplugin1.0.0` && $(TAR) rmapplugin1.0.0.tar rmapplugin1.0.0 && $(COMPRESS) rmapplugin1.0.0.tar) && $(MOVE) `dirname obj/rmapplugin1.0.0`/rmapplugin1.0.0.tar.gz . && $(DEL_FILE) -r obj/rmapplugin1.0.0 |
|
258 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents ../../DEV_PLE/header/ccsds_types.h rmappluginui.h rmapplugin.h rmapoperations.h ccsds.h ../common_PLE/qipdialogbox.h ../common_PLE/gresbstatusenquiry.h rmappluginpythonwrapper.h stardundee.h ../spw_usb_driver_v2.61/inc/spw_usb_api.h ../spw_usb_driver_v2.61/inc/spw_config_library.h gresb.h tcpackettosend.h tmpackettoread.h tmstatistics.h wfpacket.h params.h tmechobridge.h entermode.h lfractions.h /usr/include/lppmon/genericPySysdriver.h /usr/include/lppmon/lppmonplugin.h obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmapplugin.cpp rmappluginui.cpp rmapoperations.cpp ccsds.cpp ../common_PLE/qipdialogbox.cpp ../common_PLE/gresbstatusenquiry.cpp rmappluginpythonwrapper.cpp stardundee.cpp gresb.cpp tcpackettosend.cpp tmpackettoread.cpp tmstatistics.cpp wfpacket.cpp tmechobridge.cpp entermode.cpp lfractions.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp obj/rmapplugin1.0.0/ && (cd `dirname obj/rmapplugin1.0.0` && $(TAR) rmapplugin1.0.0.tar rmapplugin1.0.0 && $(COMPRESS) rmapplugin1.0.0.tar) && $(MOVE) `dirname obj/rmapplugin1.0.0`/rmapplugin1.0.0.tar.gz . && $(DEL_FILE) -r obj/rmapplugin1.0.0 | |
251 |
|
259 | |||
252 |
|
260 | |||
253 | clean:compiler_clean |
|
261 | clean:compiler_clean | |
254 | -$(DEL_FILE) $(OBJECTS) |
|
262 | -$(DEL_FILE) $(OBJECTS) | |
255 | -$(DEL_FILE) *~ core *.core |
|
263 | -$(DEL_FILE) *~ core *.core | |
256 |
|
264 | |||
257 |
|
265 | |||
258 | ####### Sub-libraries |
|
266 | ####### Sub-libraries | |
259 |
|
267 | |||
260 | distclean: clean |
|
268 | distclean: clean | |
261 | -$(DEL_FILE) bin/$(TARGET) |
|
269 | -$(DEL_FILE) bin/$(TARGET) | |
262 | -$(DEL_FILE) bin/$(TARGET0) bin/$(TARGET1) bin/$(TARGET2) $(TARGETA) |
|
270 | -$(DEL_FILE) bin/$(TARGET0) bin/$(TARGET1) bin/$(TARGET2) $(TARGETA) | |
263 | -$(DEL_FILE) Makefile |
|
271 | -$(DEL_FILE) Makefile | |
264 |
|
272 | |||
265 |
|
273 | |||
266 | check: first |
|
274 | check: first | |
267 |
|
275 | |||
268 | mocclean: compiler_moc_header_clean compiler_moc_source_clean |
|
276 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |
269 |
|
277 | |||
270 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all |
|
278 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |
271 |
|
279 | |||
272 | compiler_moc_header_make_all: moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_tmstatistics.cpp moc/moc_wfpacket.cpp moc/moc_tmechobridge.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp |
|
280 | compiler_moc_header_make_all: moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_tmstatistics.cpp moc/moc_wfpacket.cpp moc/moc_tmechobridge.cpp moc/moc_entermode.cpp moc/moc_lfractions.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp | |
273 | compiler_moc_header_clean: |
|
281 | compiler_moc_header_clean: | |
274 | -$(DEL_FILE) moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_tmstatistics.cpp moc/moc_wfpacket.cpp moc/moc_tmechobridge.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp |
|
282 | -$(DEL_FILE) moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_tmstatistics.cpp moc/moc_wfpacket.cpp moc/moc_tmechobridge.cpp moc/moc_entermode.cpp moc/moc_lfractions.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp | |
275 | moc/moc_rmappluginui.cpp: rmapoperations.h \ |
|
283 | moc/moc_rmappluginui.cpp: rmapoperations.h \ | |
276 | params.h \ |
|
284 | params.h \ | |
277 | stardundee.h \ |
|
285 | stardundee.h \ | |
278 | ccsds.h \ |
|
286 | ccsds.h \ | |
279 | tmpackettoread.h \ |
|
287 | tmpackettoread.h \ | |
280 | gresb.h \ |
|
288 | gresb.h \ | |
281 | tmstatistics.h \ |
|
289 | tmstatistics.h \ | |
282 | tmechobridge.h \ |
|
290 | tmechobridge.h \ | |
|
291 | entermode.h \ | |||
|
292 | lfractions.h \ | |||
283 | rmappluginui.h |
|
293 | rmappluginui.h | |
284 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp |
|
294 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp | |
285 |
|
295 | |||
286 | moc/moc_rmapplugin.cpp: rmappluginui.h \ |
|
296 | moc/moc_rmapplugin.cpp: rmappluginui.h \ | |
287 | rmapoperations.h \ |
|
297 | rmapoperations.h \ | |
288 | params.h \ |
|
298 | params.h \ | |
289 | stardundee.h \ |
|
299 | stardundee.h \ | |
290 | ccsds.h \ |
|
300 | ccsds.h \ | |
291 | tmpackettoread.h \ |
|
301 | tmpackettoread.h \ | |
292 | gresb.h \ |
|
302 | gresb.h \ | |
293 | tmstatistics.h \ |
|
303 | tmstatistics.h \ | |
294 | tmechobridge.h \ |
|
304 | tmechobridge.h \ | |
|
305 | entermode.h \ | |||
|
306 | lfractions.h \ | |||
295 | wfpacket.h \ |
|
307 | wfpacket.h \ | |
296 | rmapplugin.h |
|
308 | rmapplugin.h | |
297 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp |
|
309 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp | |
298 |
|
310 | |||
299 | moc/moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h |
|
311 | moc/moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h | |
300 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc/moc_qipdialogbox.cpp |
|
312 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc/moc_qipdialogbox.cpp | |
301 |
|
313 | |||
302 | moc/moc_gresbstatusenquiry.cpp: ../common_PLE/gresbstatusenquiry.h |
|
314 | moc/moc_gresbstatusenquiry.cpp: ../common_PLE/gresbstatusenquiry.h | |
303 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/gresbstatusenquiry.h -o moc/moc_gresbstatusenquiry.cpp |
|
315 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/gresbstatusenquiry.h -o moc/moc_gresbstatusenquiry.cpp | |
304 |
|
316 | |||
305 | moc/moc_rmappluginpythonwrapper.cpp: rmapoperations.h \ |
|
317 | moc/moc_rmappluginpythonwrapper.cpp: rmapoperations.h \ | |
306 | params.h \ |
|
318 | params.h \ | |
307 | ccsds.h \ |
|
319 | ccsds.h \ | |
308 | tcpackettosend.h \ |
|
320 | tcpackettosend.h \ | |
309 | tmpackettoread.h \ |
|
321 | tmpackettoread.h \ | |
310 | rmappluginpythonwrapper.h |
|
322 | rmappluginpythonwrapper.h | |
311 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginpythonwrapper.h -o moc/moc_rmappluginpythonwrapper.cpp |
|
323 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginpythonwrapper.h -o moc/moc_rmappluginpythonwrapper.cpp | |
312 |
|
324 | |||
313 | moc/moc_stardundee.cpp: rmapoperations.h \ |
|
325 | moc/moc_stardundee.cpp: rmapoperations.h \ | |
314 | params.h \ |
|
326 | params.h \ | |
315 | ccsds.h \ |
|
327 | ccsds.h \ | |
316 | tmpackettoread.h \ |
|
328 | tmpackettoread.h \ | |
317 | stardundee.h |
|
329 | stardundee.h | |
318 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) stardundee.h -o moc/moc_stardundee.cpp |
|
330 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) stardundee.h -o moc/moc_stardundee.cpp | |
319 |
|
331 | |||
320 | moc/moc_gresb.cpp: rmapoperations.h \ |
|
332 | moc/moc_gresb.cpp: rmapoperations.h \ | |
321 | params.h \ |
|
333 | params.h \ | |
322 | ccsds.h \ |
|
334 | ccsds.h \ | |
323 | tmpackettoread.h \ |
|
335 | tmpackettoread.h \ | |
324 | gresb.h |
|
336 | gresb.h | |
325 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) gresb.h -o moc/moc_gresb.cpp |
|
337 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) gresb.h -o moc/moc_gresb.cpp | |
326 |
|
338 | |||
327 | moc/moc_tcpackettosend.cpp: tcpackettosend.h |
|
339 | moc/moc_tcpackettosend.cpp: tcpackettosend.h | |
328 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tcpackettosend.h -o moc/moc_tcpackettosend.cpp |
|
340 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tcpackettosend.h -o moc/moc_tcpackettosend.cpp | |
329 |
|
341 | |||
330 | moc/moc_tmpackettoread.cpp: tmpackettoread.h |
|
342 | moc/moc_tmpackettoread.cpp: tmpackettoread.h | |
331 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmpackettoread.h -o moc/moc_tmpackettoread.cpp |
|
343 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmpackettoread.h -o moc/moc_tmpackettoread.cpp | |
332 |
|
344 | |||
333 | moc/moc_tmstatistics.cpp: tmpackettoread.h \ |
|
345 | moc/moc_tmstatistics.cpp: tmpackettoread.h \ | |
334 | tmstatistics.h |
|
346 | tmstatistics.h | |
335 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmstatistics.h -o moc/moc_tmstatistics.cpp |
|
347 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmstatistics.h -o moc/moc_tmstatistics.cpp | |
336 |
|
348 | |||
337 | moc/moc_wfpacket.cpp: params.h \ |
|
349 | moc/moc_wfpacket.cpp: params.h \ | |
338 | wfpacket.h |
|
350 | wfpacket.h | |
339 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfpacket.h -o moc/moc_wfpacket.cpp |
|
351 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfpacket.h -o moc/moc_wfpacket.cpp | |
340 |
|
352 | |||
341 | moc/moc_tmechobridge.cpp: tmpackettoread.h \ |
|
353 | moc/moc_tmechobridge.cpp: tmpackettoread.h \ | |
342 | tmechobridge.h |
|
354 | tmechobridge.h | |
343 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmechobridge.h -o moc/moc_tmechobridge.cpp |
|
355 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmechobridge.h -o moc/moc_tmechobridge.cpp | |
344 |
|
356 | |||
|
357 | moc/moc_entermode.cpp: entermode.h | |||
|
358 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) entermode.h -o moc/moc_entermode.cpp | |||
|
359 | ||||
|
360 | moc/moc_lfractions.cpp: entermode.h \ | |||
|
361 | lfractions.h | |||
|
362 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfractions.h -o moc/moc_lfractions.cpp | |||
|
363 | ||||
345 | moc/moc_genericPySysdriver.cpp: /usr/include/lppmon/genericPySysdriver.h |
|
364 | moc/moc_genericPySysdriver.cpp: /usr/include/lppmon/genericPySysdriver.h | |
346 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp |
|
365 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp | |
347 |
|
366 | |||
348 | moc/moc_lppmonplugin.cpp: /usr/include/lppmon/lppmonplugin.h |
|
367 | moc/moc_lppmonplugin.cpp: /usr/include/lppmon/lppmonplugin.h | |
349 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/lppmonplugin.h -o moc/moc_lppmonplugin.cpp |
|
368 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/lppmonplugin.h -o moc/moc_lppmonplugin.cpp | |
350 |
|
369 | |||
351 | compiler_rcc_make_all: |
|
370 | compiler_rcc_make_all: | |
352 | compiler_rcc_clean: |
|
371 | compiler_rcc_clean: | |
353 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
372 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
354 | compiler_image_collection_clean: |
|
373 | compiler_image_collection_clean: | |
355 | -$(DEL_FILE) qmake_image_collection.cpp |
|
374 | -$(DEL_FILE) qmake_image_collection.cpp | |
356 | compiler_moc_source_make_all: |
|
375 | compiler_moc_source_make_all: | |
357 | compiler_moc_source_clean: |
|
376 | compiler_moc_source_clean: | |
358 | compiler_uic_make_all: |
|
377 | compiler_uic_make_all: | |
359 | compiler_uic_clean: |
|
378 | compiler_uic_clean: | |
360 | compiler_yacc_decl_make_all: |
|
379 | compiler_yacc_decl_make_all: | |
361 | compiler_yacc_decl_clean: |
|
380 | compiler_yacc_decl_clean: | |
362 | compiler_yacc_impl_make_all: |
|
381 | compiler_yacc_impl_make_all: | |
363 | compiler_yacc_impl_clean: |
|
382 | compiler_yacc_impl_clean: | |
364 | compiler_lex_make_all: |
|
383 | compiler_lex_make_all: | |
365 | compiler_lex_clean: |
|
384 | compiler_lex_clean: | |
366 | compiler_clean: compiler_moc_header_clean |
|
385 | compiler_clean: compiler_moc_header_clean | |
367 |
|
386 | |||
368 | ####### Compile |
|
387 | ####### Compile | |
369 |
|
388 | |||
370 | obj/rmapplugin.o: rmapplugin.cpp rmapplugin.h \ |
|
389 | obj/rmapplugin.o: rmapplugin.cpp rmapplugin.h \ | |
371 | rmappluginui.h \ |
|
390 | rmappluginui.h \ | |
372 | rmapoperations.h \ |
|
391 | rmapoperations.h \ | |
373 | params.h \ |
|
392 | params.h \ | |
374 | stardundee.h \ |
|
393 | stardundee.h \ | |
375 | ccsds.h \ |
|
394 | ccsds.h \ | |
376 | tmpackettoread.h \ |
|
395 | tmpackettoread.h \ | |
377 | gresb.h \ |
|
396 | gresb.h \ | |
378 | tmstatistics.h \ |
|
397 | tmstatistics.h \ | |
379 | tmechobridge.h \ |
|
398 | tmechobridge.h \ | |
|
399 | entermode.h \ | |||
|
400 | lfractions.h \ | |||
380 | wfpacket.h \ |
|
401 | wfpacket.h \ | |
381 | rmappluginpythonwrapper.h \ |
|
402 | rmappluginpythonwrapper.h \ | |
382 | tcpackettosend.h |
|
403 | tcpackettosend.h | |
383 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp |
|
404 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp | |
384 |
|
405 | |||
385 | obj/rmappluginui.o: rmappluginui.cpp rmapplugin.h \ |
|
406 | obj/rmappluginui.o: rmappluginui.cpp rmapplugin.h \ | |
386 | rmappluginui.h \ |
|
407 | rmappluginui.h \ | |
387 | rmapoperations.h \ |
|
408 | rmapoperations.h \ | |
388 | params.h \ |
|
409 | params.h \ | |
389 | stardundee.h \ |
|
410 | stardundee.h \ | |
390 | ccsds.h \ |
|
411 | ccsds.h \ | |
391 | tmpackettoread.h \ |
|
412 | tmpackettoread.h \ | |
392 | gresb.h \ |
|
413 | gresb.h \ | |
393 | tmstatistics.h \ |
|
414 | tmstatistics.h \ | |
394 | tmechobridge.h \ |
|
415 | tmechobridge.h \ | |
|
416 | entermode.h \ | |||
|
417 | lfractions.h \ | |||
395 | wfpacket.h |
|
418 | wfpacket.h | |
396 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp |
|
419 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp | |
397 |
|
420 | |||
398 | obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h \ |
|
421 | obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h \ | |
399 | params.h |
|
422 | params.h | |
400 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapoperations.o rmapoperations.cpp |
|
423 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapoperations.o rmapoperations.cpp | |
401 |
|
424 | |||
402 | obj/ccsds.o: ccsds.cpp ccsds.h |
|
425 | obj/ccsds.o: ccsds.cpp ccsds.h | |
403 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ccsds.o ccsds.cpp |
|
426 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ccsds.o ccsds.cpp | |
404 |
|
427 | |||
405 | obj/qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h |
|
428 | obj/qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h | |
406 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qipdialogbox.o ../common_PLE/qipdialogbox.cpp |
|
429 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qipdialogbox.o ../common_PLE/qipdialogbox.cpp | |
407 |
|
430 | |||
408 | obj/gresbstatusenquiry.o: ../common_PLE/gresbstatusenquiry.cpp ../common_PLE/gresbstatusenquiry.h |
|
431 | obj/gresbstatusenquiry.o: ../common_PLE/gresbstatusenquiry.cpp ../common_PLE/gresbstatusenquiry.h | |
409 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresbstatusenquiry.o ../common_PLE/gresbstatusenquiry.cpp |
|
432 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresbstatusenquiry.o ../common_PLE/gresbstatusenquiry.cpp | |
410 |
|
433 | |||
411 | obj/rmappluginpythonwrapper.o: rmappluginpythonwrapper.cpp rmappluginpythonwrapper.h \ |
|
434 | obj/rmappluginpythonwrapper.o: rmappluginpythonwrapper.cpp rmappluginpythonwrapper.h \ | |
412 | rmapoperations.h \ |
|
435 | rmapoperations.h \ | |
413 | params.h \ |
|
436 | params.h \ | |
414 | ccsds.h \ |
|
437 | ccsds.h \ | |
415 | tcpackettosend.h \ |
|
438 | tcpackettosend.h \ | |
416 | tmpackettoread.h |
|
439 | tmpackettoread.h | |
417 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginpythonwrapper.o rmappluginpythonwrapper.cpp |
|
440 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginpythonwrapper.o rmappluginpythonwrapper.cpp | |
418 |
|
441 | |||
419 | obj/stardundee.o: stardundee.cpp stardundee.h \ |
|
442 | obj/stardundee.o: stardundee.cpp stardundee.h \ | |
420 | rmapoperations.h \ |
|
443 | rmapoperations.h \ | |
421 | params.h \ |
|
444 | params.h \ | |
422 | ccsds.h \ |
|
445 | ccsds.h \ | |
423 | tmpackettoread.h |
|
446 | tmpackettoread.h | |
424 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/stardundee.o stardundee.cpp |
|
447 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/stardundee.o stardundee.cpp | |
425 |
|
448 | |||
426 | obj/gresb.o: gresb.cpp gresb.h \ |
|
449 | obj/gresb.o: gresb.cpp gresb.h \ | |
427 | rmapoperations.h \ |
|
450 | rmapoperations.h \ | |
428 | params.h \ |
|
451 | params.h \ | |
429 | ccsds.h \ |
|
452 | ccsds.h \ | |
430 | tmpackettoread.h |
|
453 | tmpackettoread.h | |
431 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresb.o gresb.cpp |
|
454 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresb.o gresb.cpp | |
432 |
|
455 | |||
433 | obj/tcpackettosend.o: tcpackettosend.cpp tcpackettosend.h |
|
456 | obj/tcpackettosend.o: tcpackettosend.cpp tcpackettosend.h | |
434 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tcpackettosend.o tcpackettosend.cpp |
|
457 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tcpackettosend.o tcpackettosend.cpp | |
435 |
|
458 | |||
436 | obj/tmpackettoread.o: tmpackettoread.cpp tmpackettoread.h |
|
459 | obj/tmpackettoread.o: tmpackettoread.cpp tmpackettoread.h | |
437 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmpackettoread.o tmpackettoread.cpp |
|
460 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmpackettoread.o tmpackettoread.cpp | |
438 |
|
461 | |||
439 | obj/tmstatistics.o: tmstatistics.cpp tmstatistics.h \ |
|
462 | obj/tmstatistics.o: tmstatistics.cpp tmstatistics.h \ | |
440 | tmpackettoread.h |
|
463 | tmpackettoread.h | |
441 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmstatistics.o tmstatistics.cpp |
|
464 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmstatistics.o tmstatistics.cpp | |
442 |
|
465 | |||
443 | obj/wfpacket.o: wfpacket.cpp wfpacket.h \ |
|
466 | obj/wfpacket.o: wfpacket.cpp wfpacket.h \ | |
444 | params.h |
|
467 | params.h | |
445 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/wfpacket.o wfpacket.cpp |
|
468 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/wfpacket.o wfpacket.cpp | |
446 |
|
469 | |||
447 | obj/tmechobridge.o: tmechobridge.cpp tmechobridge.h \ |
|
470 | obj/tmechobridge.o: tmechobridge.cpp tmechobridge.h \ | |
448 | tmpackettoread.h |
|
471 | tmpackettoread.h | |
449 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmechobridge.o tmechobridge.cpp |
|
472 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmechobridge.o tmechobridge.cpp | |
450 |
|
473 | |||
|
474 | obj/entermode.o: entermode.cpp entermode.h | |||
|
475 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/entermode.o entermode.cpp | |||
|
476 | ||||
|
477 | obj/lfractions.o: lfractions.cpp lfractions.h \ | |||
|
478 | entermode.h | |||
|
479 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lfractions.o lfractions.cpp | |||
|
480 | ||||
451 | obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \ |
|
481 | obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \ | |
452 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h |
|
482 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h | |
453 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp |
|
483 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp | |
454 |
|
484 | |||
455 | obj/moc_rmappluginui.o: moc/moc_rmappluginui.cpp |
|
485 | obj/moc_rmappluginui.o: moc/moc_rmappluginui.cpp | |
456 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginui.o moc/moc_rmappluginui.cpp |
|
486 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginui.o moc/moc_rmappluginui.cpp | |
457 |
|
487 | |||
458 | obj/moc_rmapplugin.o: moc/moc_rmapplugin.cpp |
|
488 | obj/moc_rmapplugin.o: moc/moc_rmapplugin.cpp | |
459 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmapplugin.o moc/moc_rmapplugin.cpp |
|
489 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmapplugin.o moc/moc_rmapplugin.cpp | |
460 |
|
490 | |||
461 | obj/moc_qipdialogbox.o: moc/moc_qipdialogbox.cpp |
|
491 | obj/moc_qipdialogbox.o: moc/moc_qipdialogbox.cpp | |
462 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_qipdialogbox.o moc/moc_qipdialogbox.cpp |
|
492 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_qipdialogbox.o moc/moc_qipdialogbox.cpp | |
463 |
|
493 | |||
464 | obj/moc_gresbstatusenquiry.o: moc/moc_gresbstatusenquiry.cpp |
|
494 | obj/moc_gresbstatusenquiry.o: moc/moc_gresbstatusenquiry.cpp | |
465 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresbstatusenquiry.o moc/moc_gresbstatusenquiry.cpp |
|
495 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresbstatusenquiry.o moc/moc_gresbstatusenquiry.cpp | |
466 |
|
496 | |||
467 | obj/moc_rmappluginpythonwrapper.o: moc/moc_rmappluginpythonwrapper.cpp |
|
497 | obj/moc_rmappluginpythonwrapper.o: moc/moc_rmappluginpythonwrapper.cpp | |
468 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginpythonwrapper.o moc/moc_rmappluginpythonwrapper.cpp |
|
498 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginpythonwrapper.o moc/moc_rmappluginpythonwrapper.cpp | |
469 |
|
499 | |||
470 | obj/moc_stardundee.o: moc/moc_stardundee.cpp |
|
500 | obj/moc_stardundee.o: moc/moc_stardundee.cpp | |
471 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_stardundee.o moc/moc_stardundee.cpp |
|
501 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_stardundee.o moc/moc_stardundee.cpp | |
472 |
|
502 | |||
473 | obj/moc_gresb.o: moc/moc_gresb.cpp |
|
503 | obj/moc_gresb.o: moc/moc_gresb.cpp | |
474 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresb.o moc/moc_gresb.cpp |
|
504 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresb.o moc/moc_gresb.cpp | |
475 |
|
505 | |||
476 | obj/moc_tcpackettosend.o: moc/moc_tcpackettosend.cpp |
|
506 | obj/moc_tcpackettosend.o: moc/moc_tcpackettosend.cpp | |
477 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tcpackettosend.o moc/moc_tcpackettosend.cpp |
|
507 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tcpackettosend.o moc/moc_tcpackettosend.cpp | |
478 |
|
508 | |||
479 | obj/moc_tmpackettoread.o: moc/moc_tmpackettoread.cpp |
|
509 | obj/moc_tmpackettoread.o: moc/moc_tmpackettoread.cpp | |
480 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmpackettoread.o moc/moc_tmpackettoread.cpp |
|
510 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmpackettoread.o moc/moc_tmpackettoread.cpp | |
481 |
|
511 | |||
482 | obj/moc_tmstatistics.o: moc/moc_tmstatistics.cpp |
|
512 | obj/moc_tmstatistics.o: moc/moc_tmstatistics.cpp | |
483 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmstatistics.o moc/moc_tmstatistics.cpp |
|
513 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmstatistics.o moc/moc_tmstatistics.cpp | |
484 |
|
514 | |||
485 | obj/moc_wfpacket.o: moc/moc_wfpacket.cpp |
|
515 | obj/moc_wfpacket.o: moc/moc_wfpacket.cpp | |
486 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_wfpacket.o moc/moc_wfpacket.cpp |
|
516 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_wfpacket.o moc/moc_wfpacket.cpp | |
487 |
|
517 | |||
488 | obj/moc_tmechobridge.o: moc/moc_tmechobridge.cpp |
|
518 | obj/moc_tmechobridge.o: moc/moc_tmechobridge.cpp | |
489 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmechobridge.o moc/moc_tmechobridge.cpp |
|
519 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmechobridge.o moc/moc_tmechobridge.cpp | |
490 |
|
520 | |||
|
521 | obj/moc_entermode.o: moc/moc_entermode.cpp | |||
|
522 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_entermode.o moc/moc_entermode.cpp | |||
|
523 | ||||
|
524 | obj/moc_lfractions.o: moc/moc_lfractions.cpp | |||
|
525 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lfractions.o moc/moc_lfractions.cpp | |||
|
526 | ||||
491 | obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp |
|
527 | obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp | |
492 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp |
|
528 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp | |
493 |
|
529 | |||
494 | obj/moc_lppmonplugin.o: moc/moc_lppmonplugin.cpp |
|
530 | obj/moc_lppmonplugin.o: moc/moc_lppmonplugin.cpp | |
495 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lppmonplugin.o moc/moc_lppmonplugin.cpp |
|
531 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lppmonplugin.o moc/moc_lppmonplugin.cpp | |
496 |
|
532 | |||
497 | ####### Install |
|
533 | ####### Install | |
498 |
|
534 | |||
499 | install_target: first FORCE |
|
535 | install_target: first FORCE | |
500 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ || $(MKDIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ |
|
536 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ || $(MKDIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ | |
501 | -$(INSTALL_PROGRAM) "bin/$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" |
|
537 | -$(INSTALL_PROGRAM) "bin/$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" | |
502 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" |
|
538 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" | |
503 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" |
|
539 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" | |
504 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" |
|
540 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" | |
505 |
|
541 | |||
506 | uninstall_target: FORCE |
|
542 | uninstall_target: FORCE | |
507 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" |
|
543 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" | |
508 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" |
|
544 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" | |
509 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" |
|
545 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" | |
510 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" |
|
546 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" | |
511 | -$(DEL_DIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ |
|
547 | -$(DEL_DIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ | |
512 |
|
548 | |||
513 |
|
549 | |||
514 | install: install_target FORCE |
|
550 | install: install_target FORCE | |
515 |
|
551 | |||
516 | uninstall: uninstall_target FORCE |
|
552 | uninstall: uninstall_target FORCE | |
517 |
|
553 | |||
518 | FORCE: |
|
554 | FORCE: | |
519 |
|
555 |
@@ -1,786 +1,809 | |||||
1 | #include "gresb.h" |
|
1 | #include "gresb.h" | |
2 | #include <QTime> |
|
2 | #include <QTime> | |
3 | #include <QHostAddress> |
|
3 | #include <QHostAddress> | |
4 |
|
4 | |||
5 | gresb::gresb(QWidget *parent) : |
|
5 | gresb::gresb(QWidget *parent) : | |
6 | QWidget(parent) |
|
6 | QWidget(parent) | |
7 | { |
|
7 | { | |
8 | RMAPSend_SOCKET = new QTcpSocket; |
|
8 | RMAPSend_SOCKET = new QTcpSocket; | |
9 | RMAPReceive_SOCKET = new QTcpSocket; |
|
9 | RMAPReceive_SOCKET = new QTcpSocket; | |
10 | GRESBStatusQuery_SOCKET = new QTcpSocket; |
|
10 | GRESBStatusQuery_SOCKET = new QTcpSocket; | |
11 |
|
11 | |||
12 | rmapPacketSEMAPHORE = new QSemaphore; |
|
12 | rmapPacketSEMAPHORE = new QSemaphore; | |
13 | ccsdsPacketSEMAPHORE = new QSemaphore; |
|
13 | ccsdsPacketSEMAPHORE = new QSemaphore; | |
14 | rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH); |
|
14 | rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH); | |
15 | ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH); |
|
15 | ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH); | |
16 | spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) ); |
|
16 | spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) ); | |
17 |
|
17 | |||
18 | commandCode = invalid0; // initialization of the command code for the RMAP transfers |
|
18 | commandCode = invalid0; // initialization of the command code for the RMAP transfers | |
19 | rmapTargetLogicalAddress = DEFAULT_TARGET; |
|
19 | rmapTargetLogicalAddress = DEFAULT_TARGET; | |
20 | rmapSourceLogicalAddress = DEFAULT_SOURCE; |
|
20 | rmapSourceLogicalAddress = DEFAULT_SOURCE; | |
21 |
|
21 | |||
22 | //*** QLABEL ***// |
|
22 | //*** QLABEL ***// | |
23 | gresbBridgeIPLabel = new QLabel(tr("GRESB Bridge IP: ")); |
|
23 | gresbBridgeIPLabel = new QLabel(tr("GRESB Bridge IP: ")); | |
24 | gresbVirtualLinkLabel = new QLabel(tr("GRESB Virtual Link: ")); |
|
24 | gresbVirtualLinkLabel = new QLabel(tr("GRESB Virtual Link: ")); | |
25 | spwLinkLabel = new QLabel(tr("GRESB SPW Link: ")); |
|
25 | spwLinkLabel = new QLabel(tr("GRESB SPW Link: ")); | |
26 | rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection")); |
|
26 | rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection")); | |
27 | rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection")); |
|
27 | rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection")); | |
28 | gresbStatusQueryLabel = new QLabel(tr("GRESB status query socket (port 3010): waiting for connection")); |
|
28 | gresbStatusQueryLabel = new QLabel(tr("GRESB status query socket (port 3010): waiting for connection")); | |
29 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); |
|
29 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); | |
30 |
|
30 | |||
31 | //*** SPINBOX ***// |
|
31 | //*** SPINBOX ***// | |
32 | gresbVirtualLinkSpinBox = new QSpinBox; |
|
32 | gresbVirtualLinkSpinBox = new QSpinBox; | |
33 | spwLinkSpinBox = new QSpinBox;; |
|
33 | spwLinkSpinBox = new QSpinBox;; | |
34 | gresbVirtualLinkSpinBox->setRange(0, 4); |
|
34 | gresbVirtualLinkSpinBox->setRange(0, 4); | |
35 | gresbVirtualLinkSpinBox->setValue(1); |
|
35 | gresbVirtualLinkSpinBox->setValue(1); | |
36 | spwLinkSpinBox->setRange(0, 2); |
|
36 | spwLinkSpinBox->setRange(0, 2); | |
37 | spwLinkSpinBox->setValue(0); |
|
37 | spwLinkSpinBox->setValue(0); | |
38 |
|
38 | |||
39 | //*** QPUSHBUTTON ***// |
|
39 | //*** QPUSHBUTTON ***// | |
40 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
40 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); | |
41 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
41 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); | |
42 |
|
42 | |||
43 | //*** LAYOUT ***// |
|
43 | //*** LAYOUT ***// | |
44 | connectionLayout = new QGridLayout; |
|
44 | connectionLayout = new QGridLayout; | |
45 |
|
45 | |||
46 | //*** MISC ***// |
|
46 | //*** MISC ***// | |
47 | gresbStatusQueryDialog = new QDialog; |
|
47 | gresbStatusQueryDialog = new QDialog; | |
48 | gresbBridgeIPDialogBox = new QIPDialogBox; |
|
48 | gresbBridgeIPDialogBox = new QIPDialogBox; | |
49 | spwLinkStatusEnquiry = new gresbStatusEnquiry; |
|
49 | spwLinkStatusEnquiry = new gresbStatusEnquiry; | |
50 |
|
50 | |||
|
51 | readSettings(); // get the stored settings for the IP address | |||
|
52 | ||||
51 | connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0); |
|
53 | connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0); | |
52 | connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0); |
|
54 | connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0); | |
53 | connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0); |
|
55 | connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0); | |
54 | connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0); |
|
56 | connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0); | |
55 | connectionLayout->addWidget(spwLinkLabel, 2, 0, 0); |
|
57 | connectionLayout->addWidget(spwLinkLabel, 2, 0, 0); | |
56 | connectionLayout->addWidget(spwLinkSpinBox, 2, 1, 0); |
|
58 | connectionLayout->addWidget(spwLinkSpinBox, 2, 1, 0); | |
57 | connectionLayout->addWidget(rmapSendStateLabel, 3, 0, 1, 2); |
|
59 | connectionLayout->addWidget(rmapSendStateLabel, 3, 0, 1, 2); | |
58 | connectionLayout->addWidget(rmapReceiveStateLabel, 4, 0, 1, 2); |
|
60 | connectionLayout->addWidget(rmapReceiveStateLabel, 4, 0, 1, 2); | |
59 | connectionLayout->addWidget(gresbStatusQueryLabel, 5, 0, 1, 2); |
|
61 | connectionLayout->addWidget(gresbStatusQueryLabel, 5, 0, 1, 2); | |
60 |
|
62 | |||
61 | connectionLayout->setRowStretch(6, 1); |
|
63 | connectionLayout->setRowStretch(6, 1); | |
62 | connectionLayout->setColumnStretch(2, 1); |
|
64 | connectionLayout->setColumnStretch(2, 1); | |
63 |
|
65 | |||
64 | // GRESB STATUS QUERY DIALOG |
|
66 | // GRESB STATUS QUERY DIALOG | |
65 | gresbStatusQueryDialogLayout = new QGridLayout; |
|
67 | gresbStatusQueryDialogLayout = new QGridLayout; | |
66 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryDialogLabel, 0, 0, 1, 2); |
|
68 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryDialogLabel, 0, 0, 1, 2); | |
67 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryRetryButton, 1, 0, 0); |
|
69 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryRetryButton, 1, 0, 0); | |
68 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryAbortButton, 1, 1, 0); |
|
70 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryAbortButton, 1, 1, 0); | |
69 | gresbStatusQueryDialog->setLayout(gresbStatusQueryDialogLayout); |
|
71 | gresbStatusQueryDialog->setLayout(gresbStatusQueryDialogLayout); | |
70 |
|
72 | |||
71 | this->setLayout(connectionLayout); |
|
73 | this->setLayout(connectionLayout); | |
72 |
|
74 | |||
73 | connect(RMAPSend_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPSendConnectionState(QAbstractSocket::SocketState))); |
|
75 | connect(RMAPSend_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPSendConnectionState(QAbstractSocket::SocketState))); | |
74 | connect(RMAPReceive_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPReceiveConnectionState(QAbstractSocket::SocketState))); |
|
76 | connect(RMAPReceive_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPReceiveConnectionState(QAbstractSocket::SocketState))); | |
75 | connect(GRESBStatusQuery_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(GRESBConnectionState(QAbstractSocket::SocketState))); |
|
77 | connect(GRESBStatusQuery_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(GRESBConnectionState(QAbstractSocket::SocketState))); | |
76 | connect(gresbStatusQueryRetryButton, SIGNAL(clicked()), this, SLOT(reTestSPWLink())); |
|
78 | connect(gresbStatusQueryRetryButton, SIGNAL(clicked()), this, SLOT(reTestSPWLink())); | |
77 | connect(gresbStatusQueryAbortButton, SIGNAL(clicked()), gresbStatusQueryDialog, SLOT(reject())); |
|
79 | connect(gresbStatusQueryAbortButton, SIGNAL(clicked()), gresbStatusQueryDialog, SLOT(reject())); | |
78 | connect(spwLinkStatusEnquiry->readSPWStatusButton, SIGNAL(clicked()), this, SLOT(GRESBStatusQuery())); |
|
80 | connect(spwLinkStatusEnquiry->readSPWStatusButton, SIGNAL(clicked()), this, SLOT(GRESBStatusQuery())); | |
79 | connect(this->RMAPReceive_SOCKET, SIGNAL(readyRead()), this, SLOT(receiveSPWPacketLoop())); |
|
81 | connect(this->RMAPReceive_SOCKET, SIGNAL(readyRead()), this, SLOT(receiveSPWPacketLoop())); | |
80 | } |
|
82 | } | |
81 |
|
83 | |||
82 | gresb::~gresb() |
|
84 | gresb::~gresb() | |
83 | { |
|
85 | { | |
84 | free(rmapPacket); |
|
86 | free(rmapPacket); | |
85 | free(ccsdsPacket); |
|
87 | free(ccsdsPacket); | |
86 | free(spwPacket); |
|
88 | free(spwPacket); | |
|
89 | ||||
|
90 | writeSettings(); | |||
87 | } |
|
91 | } | |
88 |
|
92 | |||
89 | unsigned int gresb::Write(unsigned int *Value, unsigned int count, unsigned int address) |
|
93 | unsigned int gresb::Write(unsigned int *Value, unsigned int count, unsigned int address) | |
90 | { |
|
94 | { | |
91 | unsigned int remainingCount = count; |
|
95 | unsigned int remainingCount = count; | |
92 | unsigned int iOffset = 0; |
|
96 | unsigned int iOffset = 0; | |
93 | QString console_message; |
|
97 | QString console_message; | |
94 | char* data; |
|
98 | char* data; | |
95 |
|
99 | |||
96 | if(rmapPacketSEMAPHORE->available()!=0) |
|
100 | if(rmapPacketSEMAPHORE->available()!=0) | |
97 | { |
|
101 | { | |
98 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped"); |
|
102 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped"); | |
99 | return 1; |
|
103 | return 1; | |
100 | } |
|
104 | } | |
101 |
|
105 | |||
102 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); |
|
106 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); | |
103 |
|
107 | |||
104 | data = (char*) malloc(READ_WRITE_MAX_COUNTS*4); |
|
108 | data = (char*) malloc(READ_WRITE_MAX_COUNTS*4); | |
105 |
|
109 | |||
106 | emit appendToLog(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); |
|
110 | emit appendToLog(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); | |
107 |
|
111 | |||
108 | while (remainingCount > READ_WRITE_MAX_COUNTS) |
|
112 | while (remainingCount > READ_WRITE_MAX_COUNTS) | |
109 | { |
|
113 | { | |
110 | for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++) |
|
114 | for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++) | |
111 | { |
|
115 | { | |
112 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); |
|
116 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); | |
113 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); |
|
117 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); | |
114 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); |
|
118 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); | |
115 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); |
|
119 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); | |
116 | } |
|
120 | } | |
117 |
|
121 | |||
118 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
122 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
119 | emit appendToLog(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
123 | emit appendToLog(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
120 |
|
124 | |||
121 | if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0) |
|
125 | if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0) | |
122 | { |
|
126 | { | |
123 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); |
|
127 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); | |
124 | return 1; |
|
128 | return 1; | |
125 | } |
|
129 | } | |
126 |
|
130 | |||
127 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; |
|
131 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; | |
128 | address = address + READ_WRITE_MAX_COUNTS * 4; |
|
132 | address = address + READ_WRITE_MAX_COUNTS * 4; | |
129 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; |
|
133 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; | |
130 | } |
|
134 | } | |
131 |
|
135 | |||
132 | if (remainingCount > 0) |
|
136 | if (remainingCount > 0) | |
133 | { |
|
137 | { | |
134 | for (unsigned int i = 0; i<remainingCount; i++) |
|
138 | for (unsigned int i = 0; i<remainingCount; i++) | |
135 | { |
|
139 | { | |
136 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); |
|
140 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); | |
137 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); |
|
141 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); | |
138 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); |
|
142 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); | |
139 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); |
|
143 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); | |
140 | } |
|
144 | } | |
141 |
|
145 | |||
142 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
146 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
143 | emit appendToLog(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
147 | emit appendToLog(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
144 |
|
148 | |||
145 | if (WriteBLOCK(data, remainingCount*4, address)==0) |
|
149 | if (WriteBLOCK(data, remainingCount*4, address)==0) | |
146 | { |
|
150 | { | |
147 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); |
|
151 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); | |
148 | return 1; |
|
152 | return 1; | |
149 | } |
|
153 | } | |
150 | } |
|
154 | } | |
151 |
|
155 | |||
152 | emit appendToLog(QString("*** STOP *** WRITE")); |
|
156 | emit appendToLog(QString("*** STOP *** WRITE")); | |
153 | free(data); |
|
157 | free(data); | |
154 | return count; |
|
158 | return count; | |
155 | } |
|
159 | } | |
156 |
|
160 | |||
157 | unsigned int gresb::Read(unsigned int *Value, unsigned int count, unsigned int address) |
|
161 | unsigned int gresb::Read(unsigned int *Value, unsigned int count, unsigned int address) | |
158 | { |
|
162 | { | |
159 | unsigned int remainingCount = count; |
|
163 | unsigned int remainingCount = count; | |
160 | unsigned int iOffset = 0; |
|
164 | unsigned int iOffset = 0; | |
161 | QString console_message; |
|
165 | QString console_message; | |
162 |
|
166 | |||
163 | if(rmapPacketSEMAPHORE->available()!=0) |
|
167 | if(rmapPacketSEMAPHORE->available()!=0) | |
164 | { |
|
168 | { | |
165 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped"); |
|
169 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped"); | |
166 | return 1; |
|
170 | return 1; | |
167 | } |
|
171 | } | |
168 | emit appendToLog(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); |
|
172 | emit appendToLog(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); | |
169 |
|
173 | |||
170 | while (remainingCount > READ_WRITE_MAX_COUNTS) |
|
174 | while (remainingCount > READ_WRITE_MAX_COUNTS) | |
171 | { |
|
175 | { | |
172 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
176 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
173 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
177 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
174 |
|
178 | |||
175 | if (ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0) |
|
179 | if (ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0) | |
176 | { |
|
180 | { | |
177 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); |
|
181 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); | |
178 | return 1; |
|
182 | return 1; | |
179 | } |
|
183 | } | |
180 |
|
184 | |||
181 | for(int i=0;i<READ_WRITE_MAX_COUNTS;i++) |
|
185 | for(int i=0;i<READ_WRITE_MAX_COUNTS;i++) | |
182 | { |
|
186 | { | |
183 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; |
|
187 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; | |
184 | for(int j=1;j<4;j++) |
|
188 | for(int j=1;j<4;j++) | |
185 | { |
|
189 | { | |
186 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; |
|
190 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; | |
187 | } |
|
191 | } | |
188 | } |
|
192 | } | |
189 |
|
193 | |||
190 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; |
|
194 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; | |
191 | address = address + READ_WRITE_MAX_COUNTS * 4; |
|
195 | address = address + READ_WRITE_MAX_COUNTS * 4; | |
192 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; |
|
196 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; | |
193 | rmapPacketSEMAPHORE->acquire(); |
|
197 | rmapPacketSEMAPHORE->acquire(); | |
194 | } |
|
198 | } | |
195 |
|
199 | |||
196 | if (remainingCount > 0) |
|
200 | if (remainingCount > 0) | |
197 | { |
|
201 | { | |
198 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
202 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
199 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
203 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
200 |
|
204 | |||
201 | if (ReadBLOCK(4*remainingCount, address)==0) |
|
205 | if (ReadBLOCK(4*remainingCount, address)==0) | |
202 | { |
|
206 | { | |
203 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); |
|
207 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); | |
204 | return 1; |
|
208 | return 1; | |
205 | } |
|
209 | } | |
206 |
|
210 | |||
207 | for(unsigned int i=0;i<remainingCount;i++) |
|
211 | for(unsigned int i=0;i<remainingCount;i++) | |
208 | { |
|
212 | { | |
209 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; |
|
213 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; | |
210 | for(int j=1;j<4;j++) |
|
214 | for(int j=1;j<4;j++) | |
211 | { |
|
215 | { | |
212 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; |
|
216 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; | |
213 | } |
|
217 | } | |
214 | } |
|
218 | } | |
215 | rmapPacketSEMAPHORE->acquire(); |
|
219 | rmapPacketSEMAPHORE->acquire(); | |
216 | } |
|
220 | } | |
217 |
|
221 | |||
218 | emit appendToLog(QString("*** STOP *** READ ")); |
|
222 | emit appendToLog(QString("*** STOP *** READ ")); | |
219 | return count; |
|
223 | return count; | |
220 | } |
|
224 | } | |
221 |
|
225 | |||
222 | unsigned int gresb::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address) |
|
226 | unsigned int gresb::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address) | |
223 | { |
|
227 | { | |
224 | QTime RMAPTimeout; |
|
228 | QTime RMAPTimeout; | |
225 | RMAP *RMAPCommand; |
|
229 | RMAP *RMAPCommand; | |
226 | int errorCode; |
|
230 | int errorCode; | |
227 | QString console_message; |
|
231 | QString console_message; | |
228 |
|
232 | |||
229 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) |
|
233 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
230 | { |
|
234 | { | |
231 | this->Close(); |
|
235 | this->Close(); | |
232 | return 1; |
|
236 | return 1; | |
233 | } |
|
237 | } | |
234 |
|
238 | |||
235 | RMAPCommand = new RMAP(commandCode, |
|
239 | RMAPCommand = new RMAP(commandCode, | |
236 | rmapTargetLogicalAddress, |
|
240 | rmapTargetLogicalAddress, | |
237 | rmapSourceLogicalAddress, |
|
241 | rmapSourceLogicalAddress, | |
238 | address, |
|
242 | address, | |
239 | nbBytes, |
|
243 | nbBytes, | |
240 | data); |
|
244 | data); | |
241 |
|
245 | |||
242 | // SEND GRESB HEADER |
|
246 | // SEND GRESB HEADER | |
243 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); |
|
247 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); | |
244 | // SEND SPACEWIRE PACKET HEADER |
|
248 | // SEND SPACEWIRE PACKET HEADER | |
245 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); |
|
249 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); | |
246 | // SEND DATA |
|
250 | // SEND DATA | |
247 | RMAPSend_SOCKET->write( data, nbBytes); |
|
251 | RMAPSend_SOCKET->write( data, nbBytes); | |
248 | // SEND DATA CRC |
|
252 | // SEND DATA CRC | |
249 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->dataCRC), 1); |
|
253 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->dataCRC), 1); | |
250 | RMAPTimeout.start(); |
|
254 | RMAPTimeout.start(); | |
251 | while(RMAPSend_SOCKET->bytesToWrite() > 0) |
|
255 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
252 | { |
|
256 | { | |
253 | RMAPSend_SOCKET->waitForBytesWritten(100); |
|
257 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
254 | if(RMAPTimeout.elapsed()>1000) |
|
258 | if(RMAPTimeout.elapsed()>1000) | |
255 | { |
|
259 | { | |
256 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** sending Write RMAP Command timeout"); |
|
260 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** sending Write RMAP Command timeout"); | |
257 | return 0; |
|
261 | return 0; | |
258 | } |
|
262 | } | |
259 | } |
|
263 | } | |
260 |
|
264 | |||
261 | if ( (commandCode == writeSingle_noVer_Rep) | (commandCode == writeInc_noVer_Rep) | |
|
265 | if ( (commandCode == writeSingle_noVer_Rep) | (commandCode == writeInc_noVer_Rep) | | |
262 | (commandCode == writeSingle_ver_rep) | (commandCode == writeInc_ver_rep) ) |
|
266 | (commandCode == writeSingle_ver_rep) | (commandCode == writeInc_ver_rep) ) | |
263 | { |
|
267 | { | |
264 | // WAIT FOR THE RMAP REPLY PACKET |
|
268 | // WAIT FOR THE RMAP REPLY PACKET | |
265 | errorCode = receiveSPWPacket(1); |
|
269 | errorCode = receiveSPWPacket(1); | |
266 | if (errorCode<=0) |
|
270 | if (errorCode<=0) | |
267 | { |
|
271 | { | |
268 | emit appendToLog("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); |
|
272 | emit appendToLog("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); | |
269 | return 0; |
|
273 | return 0; | |
270 | } |
|
274 | } | |
271 | if(rmapPacketSize != 8) |
|
275 | if(rmapPacketSize != 8) | |
272 | { |
|
276 | { | |
273 | console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n"); |
|
277 | console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n"); | |
274 | emit appendToLog(console_message); |
|
278 | emit appendToLog(console_message); | |
275 | return 0; |
|
279 | return 0; | |
276 | } |
|
280 | } | |
277 | switch (rmapPacket[3]) // byte 4 is the status byte in the reply |
|
281 | switch (rmapPacket[3]) // byte 4 is the status byte in the reply | |
278 | { |
|
282 | { | |
279 | case 0: |
|
283 | case 0: | |
280 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 0 Successfull"); |
|
284 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 0 Successfull"); | |
281 | break; |
|
285 | break; | |
282 | case 1: |
|
286 | case 1: | |
283 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** General error code"); |
|
287 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** General error code"); | |
284 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 1 General error code"); |
|
288 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 1 General error code"); | |
285 | break; |
|
289 | break; | |
286 | case 2: |
|
290 | case 2: | |
287 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code"); |
|
291 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code"); | |
288 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code"); |
|
292 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code"); | |
289 | break; |
|
293 | break; | |
290 | case 3: |
|
294 | case 3: | |
291 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key"); |
|
295 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key"); | |
292 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 3 Invalid key"); |
|
296 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 3 Invalid key"); | |
293 | break; |
|
297 | break; | |
294 | case 4: |
|
298 | case 4: | |
295 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC"); |
|
299 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC"); | |
296 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 4 Invalid data CRC"); |
|
300 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 4 Invalid data CRC"); | |
297 | break; |
|
301 | break; | |
298 | case 5: |
|
302 | case 5: | |
299 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP"); |
|
303 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP"); | |
300 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 5 Early EOP"); |
|
304 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 5 Early EOP"); | |
301 | break; |
|
305 | break; | |
302 | case 6: |
|
306 | case 6: | |
303 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data"); |
|
307 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data"); | |
304 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 6 Too much data"); |
|
308 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 6 Too much data"); | |
305 | break; |
|
309 | break; | |
306 | case 7: |
|
310 | case 7: | |
307 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** EEP"); |
|
311 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** EEP"); | |
308 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 7 EEP"); |
|
312 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 7 EEP"); | |
309 | break; |
|
313 | break; | |
310 | case 8: |
|
314 | case 8: | |
311 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved"); |
|
315 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved"); | |
312 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 8 Reserved"); |
|
316 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 8 Reserved"); | |
313 | break; |
|
317 | break; | |
314 | case 9: |
|
318 | case 9: | |
315 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun"); |
|
319 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun"); | |
316 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun"); |
|
320 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun"); | |
317 | break; |
|
321 | break; | |
318 | case 10: |
|
322 | case 10: | |
319 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised"); |
|
323 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised"); | |
320 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised"); |
|
324 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised"); | |
321 | break; |
|
325 | break; | |
322 | case 11: |
|
326 | case 11: | |
323 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error"); |
|
327 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error"); | |
324 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error"); |
|
328 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error"); | |
325 | break; |
|
329 | break; | |
326 | case 12: |
|
330 | case 12: | |
327 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address"); |
|
331 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address"); | |
328 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 12 Invalid target logical address"); |
|
332 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 12 Invalid target logical address"); | |
329 | break; |
|
333 | break; | |
330 | } |
|
334 | } | |
331 | acquireRMAPSemaphore(); |
|
335 | acquireRMAPSemaphore(); | |
332 | } |
|
336 | } | |
333 | return nbBytes; |
|
337 | return nbBytes; | |
334 | } |
|
338 | } | |
335 |
|
339 | |||
336 | unsigned int gresb::ReadBLOCK(unsigned int nbBytes, unsigned int address) |
|
340 | unsigned int gresb::ReadBLOCK(unsigned int nbBytes, unsigned int address) | |
337 | { |
|
341 | { | |
338 | int errorCode; |
|
342 | int errorCode; | |
339 | RMAP *RMAPCommand; |
|
343 | RMAP *RMAPCommand; | |
340 | QTime RMAPTimeout; |
|
344 | QTime RMAPTimeout; | |
341 | unsigned int dataLength; |
|
345 | unsigned int dataLength; | |
342 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) |
|
346 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
343 | { |
|
347 | { | |
344 | this->Close(); |
|
348 | this->Close(); | |
345 | return 1; |
|
349 | return 1; | |
346 | } |
|
350 | } | |
347 |
|
351 | |||
348 | if (nbBytes > 4) |
|
352 | if (nbBytes > 4) | |
349 | { |
|
353 | { | |
350 | RMAPCommand = new RMAP(read_Inc, |
|
354 | RMAPCommand = new RMAP(read_Inc, | |
351 | rmapTargetLogicalAddress, |
|
355 | rmapTargetLogicalAddress, | |
352 | rmapSourceLogicalAddress, |
|
356 | rmapSourceLogicalAddress, | |
353 | address, |
|
357 | address, | |
354 | nbBytes, |
|
358 | nbBytes, | |
355 | NULL); |
|
359 | NULL); | |
356 | } |
|
360 | } | |
357 | else |
|
361 | else | |
358 | { |
|
362 | { | |
359 | RMAPCommand = new RMAP(read_Single, |
|
363 | RMAPCommand = new RMAP(read_Single, | |
360 | rmapTargetLogicalAddress, |
|
364 | rmapTargetLogicalAddress, | |
361 | rmapSourceLogicalAddress, |
|
365 | rmapSourceLogicalAddress, | |
362 | address, |
|
366 | address, | |
363 | nbBytes, |
|
367 | nbBytes, | |
364 | NULL); |
|
368 | NULL); | |
365 | } |
|
369 | } | |
366 |
|
370 | |||
367 | // SEND THE GRESB HEADER FOR THE RMAP READ COMMAND |
|
371 | // SEND THE GRESB HEADER FOR THE RMAP READ COMMAND | |
368 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); |
|
372 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); | |
369 | // SEND THE SPACEWIRE PACKET FOR THE RMAP READ COMMAND |
|
373 | // SEND THE SPACEWIRE PACKET FOR THE RMAP READ COMMAND | |
370 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); |
|
374 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); | |
371 | RMAPSend_SOCKET->waitForBytesWritten(100); |
|
375 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
372 | RMAPTimeout.start(); |
|
376 | RMAPTimeout.start(); | |
373 | // write timeout |
|
377 | // write timeout | |
374 | while(RMAPSend_SOCKET->bytesToWrite() > 0) |
|
378 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
375 | { |
|
379 | { | |
376 | RMAPSend_SOCKET->waitForBytesWritten(100); |
|
380 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
377 | if(RMAPTimeout.elapsed()>1000) |
|
381 | if(RMAPTimeout.elapsed()>1000) | |
378 | { |
|
382 | { | |
379 | emit appendToLog("WARNING === in function READ of rmapplugin *** sending Read RMAP Command timeout\n"); |
|
383 | emit appendToLog("WARNING === in function READ of rmapplugin *** sending Read RMAP Command timeout\n"); | |
380 | return 0; |
|
384 | return 0; | |
381 | } |
|
385 | } | |
382 | } |
|
386 | } | |
383 |
|
387 | |||
384 | // RECEIVE THE INCOMING RMAP PACKET |
|
388 | // RECEIVE THE INCOMING RMAP PACKET | |
385 | errorCode = receiveSPWPacket(1); // request ID 1 is for RMAP packet |
|
389 | errorCode = receiveSPWPacket(1); // request ID 1 is for RMAP packet | |
386 | if (errorCode<=0) |
|
390 | if (errorCode<=0) | |
387 | { |
|
391 | { | |
388 | emit appendToLog("WARNING === in function ReadBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); |
|
392 | emit appendToLog("WARNING === in function ReadBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); | |
389 | return 0; |
|
393 | return 0; | |
390 | } |
|
394 | } | |
391 | dataLength = rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH; |
|
395 | dataLength = rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH; | |
392 | if(dataLength != nbBytes) |
|
396 | if(dataLength != nbBytes) | |
393 | { |
|
397 | { | |
394 | emit appendToLog("WARNING === in function READ of rmapplugin *** number of data received (" |
|
398 | emit appendToLog("WARNING === in function READ of rmapplugin *** number of data received (" | |
395 | +QString::number(dataLength) |
|
399 | +QString::number(dataLength) | |
396 | +") not equal to number of data requested (" |
|
400 | +") not equal to number of data requested (" | |
397 | +QString::number(nbBytes) |
|
401 | +QString::number(nbBytes) | |
398 | +")"); |
|
402 | +")"); | |
399 | return 0; |
|
403 | return 0; | |
400 | } |
|
404 | } | |
401 | return dataLength; |
|
405 | return dataLength; | |
402 | } |
|
406 | } | |
403 |
|
407 | |||
404 | unsigned int gresb::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) |
|
408 | unsigned int gresb::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) | |
405 | { |
|
409 | { | |
406 | char protocoleIdentifier = 0x02; |
|
410 | char protocoleIdentifier = 0x02; | |
407 | char reserved = 0x00; |
|
411 | char reserved = 0x00; | |
408 | char gresbProtocole = 0x00; |
|
412 | char gresbProtocole = 0x00; | |
409 | unsigned char size[3]; |
|
413 | unsigned char size[3]; | |
410 | unsigned int spwPacketSize = count + 4; |
|
414 | unsigned int spwPacketSize = count + 4; | |
411 | QTime SPWTimeout; |
|
415 | QTime SPWTimeout; | |
412 |
|
416 | |||
413 | if (count>248) |
|
417 | if (count>248) | |
414 | { |
|
418 | { | |
415 | appendToLog("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n"); |
|
419 | appendToLog("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n"); | |
416 | return 1; |
|
420 | return 1; | |
417 | } |
|
421 | } | |
418 |
|
422 | |||
419 | appendToLog(QString("*** START *** Send CCSDS packet of ")+ QString::number(count) + QString(" byte(s)")); |
|
423 | appendToLog(QString("*** START *** Send CCSDS packet of ")+ QString::number(count) + QString(" byte(s)")); | |
420 |
|
424 | |||
421 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) |
|
425 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
422 | { |
|
426 | { | |
423 | this->Close(); |
|
427 | this->Close(); | |
424 | appendToLog("WARNING === in function WRITE of rmapplugin *** SPW link not running\n"); |
|
428 | appendToLog("WARNING === in function WRITE of rmapplugin *** SPW link not running\n"); | |
425 | return 1; |
|
429 | return 1; | |
426 | } |
|
430 | } | |
427 |
|
431 | |||
428 | // SEND GRESB HEADER |
|
432 | // SEND GRESB HEADER | |
429 | size[0] = (unsigned char) ((unsigned int) spwPacketSize>>16); |
|
433 | size[0] = (unsigned char) ((unsigned int) spwPacketSize>>16); | |
430 | size[1] = (unsigned char) ((unsigned int) spwPacketSize>>8); |
|
434 | size[1] = (unsigned char) ((unsigned int) spwPacketSize>>8); | |
431 | size[2] = (unsigned char) ((unsigned int) spwPacketSize); |
|
435 | size[2] = (unsigned char) ((unsigned int) spwPacketSize); | |
432 | RMAPSend_SOCKET->write(&gresbProtocole, 1); |
|
436 | RMAPSend_SOCKET->write(&gresbProtocole, 1); | |
433 | RMAPSend_SOCKET->write((char*) size, 3); |
|
437 | RMAPSend_SOCKET->write((char*) size, 3); | |
434 | // SEND SPW HEADER |
|
438 | // SEND SPW HEADER | |
435 | RMAPSend_SOCKET->write(&targetLogicalAddress, 1); |
|
439 | RMAPSend_SOCKET->write(&targetLogicalAddress, 1); | |
436 | RMAPSend_SOCKET->write(&protocoleIdentifier, 1); |
|
440 | RMAPSend_SOCKET->write(&protocoleIdentifier, 1); | |
437 | RMAPSend_SOCKET->write(&reserved, 1); |
|
441 | RMAPSend_SOCKET->write(&reserved, 1); | |
438 | RMAPSend_SOCKET->write(&userApplication, 1); |
|
442 | RMAPSend_SOCKET->write(&userApplication, 1); | |
439 | // SEND CCSDS PACKET |
|
443 | // SEND CCSDS PACKET | |
440 | RMAPSend_SOCKET->write(Value, count); |
|
444 | RMAPSend_SOCKET->write(Value, count); | |
441 | SPWTimeout.start(); |
|
445 | SPWTimeout.start(); | |
442 | while(RMAPSend_SOCKET->bytesToWrite() > 0) |
|
446 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
443 | { |
|
447 | { | |
444 | RMAPSend_SOCKET->waitForBytesWritten(100); |
|
448 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
445 | if(SPWTimeout.elapsed()>1000) |
|
449 | if(SPWTimeout.elapsed()>1000) | |
446 | { |
|
450 | { | |
447 | appendToLog("WARNING === in function WRITE of rmapplugin *** sending CCSDS packet timeout\n"); |
|
451 | appendToLog("WARNING === in function WRITE of rmapplugin *** sending CCSDS packet timeout\n"); | |
448 | return 1; |
|
452 | return 1; | |
449 | } |
|
453 | } | |
450 | } |
|
454 | } | |
451 |
|
455 | |||
452 | appendToLog(QString("*** CCSDS packet sent")); |
|
456 | appendToLog(QString("*** CCSDS packet sent")); | |
453 |
|
457 | |||
454 | return count; |
|
458 | return count; | |
455 | } |
|
459 | } | |
456 |
|
460 | |||
457 | int gresb::receiveSPWPacketLoop(unsigned char requestID) |
|
461 | int gresb::receiveSPWPacketLoop(unsigned char requestID) | |
458 | { |
|
462 | { | |
459 | int result = 0; |
|
463 | int result = 0; | |
460 | while (RMAPReceive_SOCKET->bytesAvailable()) |
|
464 | while (RMAPReceive_SOCKET->bytesAvailable()) | |
461 | { |
|
465 | { | |
462 | result = receiveSPWPacket(requestID); |
|
466 | result = receiveSPWPacket(requestID); | |
463 | } |
|
467 | } | |
464 |
|
468 | |||
465 | return result; |
|
469 | return result; | |
466 | } |
|
470 | } | |
467 |
|
471 | |||
468 | int gresb::receiveSPWPacket(unsigned char requestID) // SLOT |
|
472 | int gresb::receiveSPWPacket(unsigned char requestID) // SLOT | |
469 | { |
|
473 | { | |
470 | QTime spwPacketReceiverTimeout; |
|
474 | QTime spwPacketReceiverTimeout; | |
471 | // GRESB HEADER |
|
475 | // GRESB HEADER | |
472 | char RES_TR_EP; // 6 bits REserved + 1 bit TRuncated + 1 bit EP error end of packet |
|
476 | char RES_TR_EP; // 6 bits REserved + 1 bit TRuncated + 1 bit EP error end of packet | |
473 | unsigned char packetLength2; |
|
477 | unsigned char packetLength2; | |
474 | unsigned char packetLength1; |
|
478 | unsigned char packetLength1; | |
475 | unsigned char packetLength0; |
|
479 | unsigned char packetLength0; | |
476 | unsigned int packetLength; |
|
480 | unsigned int packetLength; | |
477 |
|
481 | |||
478 | if (requestID==1) |
|
482 | if (requestID==1) | |
479 | { |
|
483 | { | |
480 | if (rmapPacketSEMAPHORE->available()) return rmapPacketSize; |
|
484 | if (rmapPacketSEMAPHORE->available()) return rmapPacketSize; | |
481 | } |
|
485 | } | |
482 |
|
486 | |||
483 | RMAPReceive_SOCKET->blockSignals(1); // block the signals of the socket during packet reception |
|
487 | RMAPReceive_SOCKET->blockSignals(1); // block the signals of the socket during packet reception | |
484 | // READ THE GRESB HEADER OF THE INCOMING PACKET |
|
488 | // READ THE GRESB HEADER OF THE INCOMING PACKET | |
485 | spwPacketReceiverTimeout.start(); |
|
489 | spwPacketReceiverTimeout.start(); | |
486 | while(RMAPReceive_SOCKET->bytesAvailable() < 4) |
|
490 | while(RMAPReceive_SOCKET->bytesAvailable() < 4) | |
487 | { |
|
491 | { | |
488 | RMAPReceive_SOCKET->waitForReadyRead(100); |
|
492 | RMAPReceive_SOCKET->waitForReadyRead(100); | |
489 | if(spwPacketReceiverTimeout.elapsed()>1000) return -1; // ERROR === read GRSEB header TIMEOUT |
|
493 | if(spwPacketReceiverTimeout.elapsed()>1000) return -1; // ERROR === read GRSEB header TIMEOUT | |
490 | } |
|
494 | } | |
491 | RMAPReceive_SOCKET->read(&RES_TR_EP, 1); |
|
495 | RMAPReceive_SOCKET->read(&RES_TR_EP, 1); | |
492 | RMAPReceive_SOCKET->read( (char*) &packetLength2, 1); |
|
496 | RMAPReceive_SOCKET->read( (char*) &packetLength2, 1); | |
493 | RMAPReceive_SOCKET->read( (char*) &packetLength1, 1); |
|
497 | RMAPReceive_SOCKET->read( (char*) &packetLength1, 1); | |
494 | RMAPReceive_SOCKET->read( (char*) &packetLength0, 1); |
|
498 | RMAPReceive_SOCKET->read( (char*) &packetLength0, 1); | |
495 | packetLength = (packetLength2<<16) + (packetLength1<<8) + (packetLength0); |
|
499 | packetLength = (packetLength2<<16) + (packetLength1<<8) + (packetLength0); | |
496 |
|
500 | |||
497 | // READ THE SPW PACKET |
|
501 | // READ THE SPW PACKET | |
498 | while(RMAPReceive_SOCKET->bytesAvailable() < packetLength) |
|
502 | while(RMAPReceive_SOCKET->bytesAvailable() < packetLength) | |
499 | { |
|
503 | { | |
500 | RMAPReceive_SOCKET->waitForReadyRead(100); |
|
504 | RMAPReceive_SOCKET->waitForReadyRead(100); | |
501 | if(spwPacketReceiverTimeout.elapsed()>1000) return -2; // ERROR === read SPW packet TIMEOUT |
|
505 | if(spwPacketReceiverTimeout.elapsed()>1000) return -2; // ERROR === read SPW packet TIMEOUT | |
502 | } |
|
506 | } | |
503 | RMAPReceive_SOCKET->read( spwPacket, packetLength ); |
|
507 | RMAPReceive_SOCKET->read( spwPacket, packetLength ); | |
504 | RMAPReceive_SOCKET->blockSignals(0); |
|
508 | RMAPReceive_SOCKET->blockSignals(0); | |
505 | //emit sendMessage("Packet of size " + QString::number(packetLength) + " received"); |
|
509 | //emit sendMessage("Packet of size " + QString::number(packetLength) + " received"); | |
506 |
|
510 | |||
507 | switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet |
|
511 | switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet | |
508 | { |
|
512 | { | |
509 | case 1: // 0x01 is the protocole identifier for RMAP packets |
|
513 | case 1: // 0x01 is the protocole identifier for RMAP packets | |
510 | if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet |
|
514 | if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet | |
511 | for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i]; |
|
515 | for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i]; | |
512 | rmapPacketSize = packetLength; |
|
516 | rmapPacketSize = packetLength; | |
513 | rmapPacketSEMAPHORE->release(); |
|
517 | rmapPacketSEMAPHORE->release(); | |
514 | emit sendMessage("RMAP packet of size " + QString::number(packetLength) + " received"); |
|
518 | emit sendMessage("RMAP packet of size " + QString::number(packetLength) + " received"); | |
515 | return packetLength; |
|
519 | return packetLength; | |
516 |
|
520 | |||
517 | case 2: // 0x02 is the protocole identifier for CCSDS packets |
|
521 | case 2: // 0x02 is the protocole identifier for CCSDS packets | |
518 | /*if (ccsdsPacketSEMAPHORE->available()!=0) |
|
522 | /*if (ccsdsPacketSEMAPHORE->available()!=0) | |
519 | { |
|
523 | { | |
520 | emit sendMessage("in function [receiveSPWPacket] === ERROR === previous CCSDS packet not processed yet"); |
|
524 | emit sendMessage("in function [receiveSPWPacket] === ERROR === previous CCSDS packet not processed yet"); | |
521 | return -4; // ERROR === previous CCSDS packet not processed yet |
|
525 | return -4; // ERROR === previous CCSDS packet not processed yet | |
522 | }*/ |
|
526 | }*/ | |
523 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; |
|
527 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; | |
524 | ccsdsPacketSize = packetLength; |
|
528 | ccsdsPacketSize = packetLength; | |
525 | storeCCSDSPacket(ccsdsPacket, packetLength); |
|
529 | storeCCSDSPacket(ccsdsPacket, packetLength); | |
526 | return packetLength; |
|
530 | return packetLength; | |
527 | } |
|
531 | } | |
528 | return 0; |
|
532 | return 0; | |
529 | } |
|
533 | } | |
530 |
|
534 | |||
531 | unsigned int gresb::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) |
|
535 | unsigned int gresb::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) | |
532 | { |
|
536 | { | |
533 | TMPacketToRead *generalPacket; |
|
537 | TMPacketToRead *generalPacket; | |
534 |
|
538 | |||
535 | generalPacket = new TMPacketToRead(ccsdsPacket, size); |
|
539 | generalPacket = new TMPacketToRead(ccsdsPacket, size); | |
536 | emit sendPacket(generalPacket); |
|
540 | emit sendPacket(generalPacket); | |
537 |
|
541 | |||
538 | return 1; |
|
542 | return 1; | |
539 | } |
|
543 | } | |
540 |
|
544 | |||
541 | void gresb::Open() // SLOT |
|
545 | void gresb::Open() // SLOT | |
542 | { |
|
546 | { | |
543 | bool spwRunning = true; |
|
547 | bool spwRunning = true; | |
544 | RMAPSend_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), |
|
548 | RMAPSend_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), | |
545 | 3000 + gresbVirtualLinkSpinBox->value()*2, |
|
549 | 3000 + gresbVirtualLinkSpinBox->value()*2, | |
546 | QIODevice::WriteOnly); |
|
550 | QIODevice::WriteOnly); | |
547 | RMAPReceive_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), |
|
551 | RMAPReceive_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), | |
548 | 3000 + gresbVirtualLinkSpinBox->value()*2+1, |
|
552 | 3000 + gresbVirtualLinkSpinBox->value()*2+1, | |
549 | QIODevice::ReadOnly); |
|
553 | QIODevice::ReadOnly); | |
550 | GRESBStatusQuery_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), |
|
554 | GRESBStatusQuery_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), | |
551 | 3010, |
|
555 | 3010, | |
552 | QIODevice::ReadWrite); |
|
556 | QIODevice::ReadWrite); | |
553 | GRESBStatusQuery_SOCKET->waitForConnected(10000); |
|
557 | GRESBStatusQuery_SOCKET->waitForConnected(10000); | |
554 | // initialize SPW packet semaphores |
|
558 | // initialize SPW packet semaphores | |
555 | while (rmapPacketSEMAPHORE->available()!=0) rmapPacketSEMAPHORE->acquire(); |
|
559 | while (rmapPacketSEMAPHORE->available()!=0) rmapPacketSEMAPHORE->acquire(); | |
556 | while (ccsdsPacketSEMAPHORE->available()!=0) ccsdsPacketSEMAPHORE->acquire(); |
|
560 | while (ccsdsPacketSEMAPHORE->available()!=0) ccsdsPacketSEMAPHORE->acquire(); | |
557 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) != 0) |
|
561 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) != 0) | |
558 | { |
|
562 | { | |
559 | spwRunning = gresbStatusQueryDialog->exec(); |
|
563 | spwRunning = gresbStatusQueryDialog->exec(); | |
560 | } |
|
564 | } | |
561 | if (spwRunning == false) this->Close(); |
|
565 | if (spwRunning == false) this->Close(); | |
562 | else |
|
566 | else | |
563 | { |
|
567 | { | |
564 | emit appendToLog(QString("SpaceWire running on link ")+ QString::number(spwLinkSpinBox->value())); |
|
568 | emit appendToLog(QString("SpaceWire running on link ")+ QString::number(spwLinkSpinBox->value())); | |
565 | RMAPReceive_SOCKET->readAll(); // read all remaining data from the reception socket |
|
569 | RMAPReceive_SOCKET->readAll(); // read all remaining data from the reception socket | |
566 | emit isOpen(true); |
|
570 | emit isOpen(true); | |
567 | } |
|
571 | } | |
568 | } |
|
572 | } | |
569 |
|
573 | |||
570 | void gresb::Close() // SLOT |
|
574 | void gresb::Close() // SLOT | |
571 | { |
|
575 | { | |
572 | RMAPSend_SOCKET->disconnectFromHost(); |
|
576 | RMAPSend_SOCKET->disconnectFromHost(); | |
573 | RMAPReceive_SOCKET->disconnectFromHost(); |
|
577 | RMAPReceive_SOCKET->disconnectFromHost(); | |
574 | GRESBStatusQuery_SOCKET->disconnectFromHost(); |
|
578 | GRESBStatusQuery_SOCKET->disconnectFromHost(); | |
575 | emit isOpen(false); |
|
579 | emit isOpen(false); | |
576 | } |
|
580 | } | |
577 |
|
581 | |||
578 | int gresb::GRESBStatusQuery() // SLOT |
|
582 | int gresb::GRESBStatusQuery() // SLOT | |
579 | { |
|
583 | { | |
580 | GRESBStatusQueryRequest(LinkStatus, 0); |
|
584 | GRESBStatusQueryRequest(LinkStatus, 0); | |
581 | GRESBStatusQueryRequest(LinkStatus, 1); |
|
585 | GRESBStatusQueryRequest(LinkStatus, 1); | |
582 | GRESBStatusQueryRequest(LinkStatus, 2); |
|
586 | GRESBStatusQueryRequest(LinkStatus, 2); | |
583 | GRESBStatusQueryRequest(LinkStatistics, 0); |
|
587 | GRESBStatusQueryRequest(LinkStatistics, 0); | |
584 | GRESBStatusQueryRequest(LinkStatistics, 1); |
|
588 | GRESBStatusQueryRequest(LinkStatistics, 1); | |
585 | GRESBStatusQueryRequest(LinkStatistics, 2); |
|
589 | GRESBStatusQueryRequest(LinkStatistics, 2); | |
586 | return 0; |
|
590 | return 0; | |
587 | } |
|
591 | } | |
588 |
|
592 | |||
589 | int gresb::GRESBStatusQueryRequest(GresbStatusQueryOption option, char link) |
|
593 | int gresb::GRESBStatusQueryRequest(GresbStatusQueryOption option, char link) | |
590 | { |
|
594 | { | |
591 | gresb_status_query_t statusQueryCommand; |
|
595 | gresb_status_query_t statusQueryCommand; | |
592 | gresb_link_status_reply_t linkStatusReply; |
|
596 | gresb_link_status_reply_t linkStatusReply; | |
593 | gresb_link_statistics_reply_t linkStatisticsReply; |
|
597 | gresb_link_statistics_reply_t linkStatisticsReply; | |
594 | QTime statusQueryTimeout; |
|
598 | QTime statusQueryTimeout; | |
595 | QString console_message; |
|
599 | QString console_message; | |
596 |
|
600 | |||
597 | statusQueryCommand.protocolIdentifier = (char) 0x02; |
|
601 | statusQueryCommand.protocolIdentifier = (char) 0x02; | |
598 | statusQueryCommand.reserved1 = (char) 0x00; |
|
602 | statusQueryCommand.reserved1 = (char) 0x00; | |
599 | statusQueryCommand.reserved0 = (char) 0x00; |
|
603 | statusQueryCommand.reserved0 = (char) 0x00; | |
600 | statusQueryCommand.option = (char) option; |
|
604 | statusQueryCommand.option = (char) option; | |
601 | statusQueryCommand.value3 = (char) 0x00; |
|
605 | statusQueryCommand.value3 = (char) 0x00; | |
602 | statusQueryCommand.value2 = (char) 0x00; |
|
606 | statusQueryCommand.value2 = (char) 0x00; | |
603 | statusQueryCommand.value1 = (char) 0x00; |
|
607 | statusQueryCommand.value1 = (char) 0x00; | |
604 | statusQueryCommand.value0 = (char) link; |
|
608 | statusQueryCommand.value0 = (char) link; | |
605 |
|
609 | |||
606 | GRESBStatusQuery_SOCKET->write((char*) ((void*) &statusQueryCommand), sizeof(statusQueryCommand)); |
|
610 | GRESBStatusQuery_SOCKET->write((char*) ((void*) &statusQueryCommand), sizeof(statusQueryCommand)); | |
607 | GRESBStatusQuery_SOCKET->flush(); |
|
611 | GRESBStatusQuery_SOCKET->flush(); | |
608 | GRESBStatusQuery_SOCKET->waitForBytesWritten(1000); |
|
612 | GRESBStatusQuery_SOCKET->waitForBytesWritten(1000); | |
609 |
|
613 | |||
610 | statusQueryTimeout.start(); |
|
614 | statusQueryTimeout.start(); | |
611 | while(GRESBStatusQuery_SOCKET->bytesToWrite() > 0) |
|
615 | while(GRESBStatusQuery_SOCKET->bytesToWrite() > 0) | |
612 | { |
|
616 | { | |
613 | GRESBStatusQuery_SOCKET->waitForBytesWritten(100); |
|
617 | GRESBStatusQuery_SOCKET->waitForBytesWritten(100); | |
614 | if(statusQueryTimeout.elapsed()>1000) |
|
618 | if(statusQueryTimeout.elapsed()>1000) | |
615 | { |
|
619 | { | |
616 | emit appendToLog("WARNING === in function GRESBStatusQueryRequest of rmapplugin *** sending StatusQueryCommand timeout"); |
|
620 | emit appendToLog("WARNING === in function GRESBStatusQueryRequest of rmapplugin *** sending StatusQueryCommand timeout"); | |
617 | return 1; |
|
621 | return 1; | |
618 | } |
|
622 | } | |
619 | } |
|
623 | } | |
620 |
|
624 | |||
621 | switch (option) |
|
625 | switch (option) | |
622 | { |
|
626 | { | |
623 | case LinkStatus: |
|
627 | case LinkStatus: | |
624 | { |
|
628 | { | |
625 | statusQueryTimeout.start(); |
|
629 | statusQueryTimeout.start(); | |
626 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatusReply)) |
|
630 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatusReply)) | |
627 | { |
|
631 | { | |
628 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); |
|
632 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); | |
629 | if(statusQueryTimeout.elapsed()>1000) |
|
633 | if(statusQueryTimeout.elapsed()>1000) | |
630 | { |
|
634 | { | |
631 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatus => error timeout bytesAvailable()\n"); |
|
635 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatus => error timeout bytesAvailable()\n"); | |
632 | emit appendToLog(console_message); |
|
636 | emit appendToLog(console_message); | |
633 | return 1; |
|
637 | return 1; | |
634 | } |
|
638 | } | |
635 | } |
|
639 | } | |
636 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatusReply), (int) sizeof(linkStatusReply)); |
|
640 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatusReply), (int) sizeof(linkStatusReply)); | |
637 | console_message.sprintf("%x", linkStatusReply.byte0); |
|
641 | console_message.sprintf("%x", linkStatusReply.byte0); | |
638 | spwLinkStatusEnquiry->statusQueryTable->item(0, link)->setText(console_message); |
|
642 | spwLinkStatusEnquiry->statusQueryTable->item(0, link)->setText(console_message); | |
639 | console_message.sprintf("%d", linkStatusReply.byte1); |
|
643 | console_message.sprintf("%d", linkStatusReply.byte1); | |
640 | spwLinkStatusEnquiry->statusQueryTable->item(1, link)->setText(console_message); |
|
644 | spwLinkStatusEnquiry->statusQueryTable->item(1, link)->setText(console_message); | |
641 | if (linkStatusReply.byte0 == 0) return 1; |
|
645 | if (linkStatusReply.byte0 == 0) return 1; | |
642 | break; |
|
646 | break; | |
643 | } |
|
647 | } | |
644 | case LinkStatistics: |
|
648 | case LinkStatistics: | |
645 | { |
|
649 | { | |
646 | statusQueryTimeout.start(); |
|
650 | statusQueryTimeout.start(); | |
647 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatisticsReply)) |
|
651 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatisticsReply)) | |
648 | { |
|
652 | { | |
649 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); |
|
653 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); | |
650 | if(statusQueryTimeout.elapsed()>1000) |
|
654 | if(statusQueryTimeout.elapsed()>1000) | |
651 | { |
|
655 | { | |
652 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatistics => error timeout bytesAvailable()\n"); |
|
656 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatistics => error timeout bytesAvailable()\n"); | |
653 | emit appendToLog(console_message); |
|
657 | emit appendToLog(console_message); | |
654 | return 1; |
|
658 | return 1; | |
655 | } |
|
659 | } | |
656 | } |
|
660 | } | |
657 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatisticsReply), sizeof(linkStatisticsReply)); |
|
661 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatisticsReply), sizeof(linkStatisticsReply)); | |
658 | /*console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataTransmitted)); |
|
662 | /*console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataTransmitted)); | |
659 | UI->spwLinkStatusEnquiry->statusQueryTable->item(9, link)->setText(console_message); |
|
663 | UI->spwLinkStatusEnquiry->statusQueryTable->item(9, link)->setText(console_message); | |
660 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsTransmitted)); |
|
664 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsTransmitted)); | |
661 | UI->spwLinkStatusEnquiry->statusQueryTable->item(8, link)->setText(console_message); |
|
665 | UI->spwLinkStatusEnquiry->statusQueryTable->item(8, link)->setText(console_message); | |
662 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfTruncatedPacketsReceived)); |
|
666 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfTruncatedPacketsReceived)); | |
663 | UI->spwLinkStatusEnquiry->statusQueryTable->item(6, link)->setText(console_message); |
|
667 | UI->spwLinkStatusEnquiry->statusQueryTable->item(6, link)->setText(console_message); | |
664 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsWithEEPReceived)); |
|
668 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsWithEEPReceived)); | |
665 | UI->spwLinkStatusEnquiry->statusQueryTable->item(5, link)->setText(console_message); |
|
669 | UI->spwLinkStatusEnquiry->statusQueryTable->item(5, link)->setText(console_message); | |
666 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataReceived)); |
|
670 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataReceived)); | |
667 | UI->spwLinkStatusEnquiry->statusQueryTable->item(4, link)->setText(console_message); |
|
671 | UI->spwLinkStatusEnquiry->statusQueryTable->item(4, link)->setText(console_message); | |
668 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsReceived)); |
|
672 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsReceived)); | |
669 | UI->spwLinkStatusEnquiry->statusQueryTable->item(3, link)->setText(console_message);*/ |
|
673 | UI->spwLinkStatusEnquiry->statusQueryTable->item(3, link)->setText(console_message);*/ | |
670 | break; |
|
674 | break; | |
671 | } |
|
675 | } | |
672 | case NodeAddressStatistics: |
|
676 | case NodeAddressStatistics: | |
673 | { |
|
677 | { | |
674 | break; |
|
678 | break; | |
675 | } |
|
679 | } | |
676 | case GetRoute: |
|
680 | case GetRoute: | |
677 | { |
|
681 | { | |
678 | break; |
|
682 | break; | |
679 | } |
|
683 | } | |
680 | } |
|
684 | } | |
681 | return 0; |
|
685 | return 0; | |
682 | } |
|
686 | } | |
683 |
|
687 | |||
684 | void gresb::reTestSPWLink() // SLOT |
|
688 | void gresb::reTestSPWLink() // SLOT | |
685 | { |
|
689 | { | |
686 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 0) |
|
690 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 0) | |
687 | { |
|
691 | { | |
688 | gresbStatusQueryDialog->accept(); |
|
692 | gresbStatusQueryDialog->accept(); | |
689 | } |
|
693 | } | |
690 | } |
|
694 | } | |
691 |
|
695 | |||
692 | void gresb::RMAPSendConnectionState(QAbstractSocket::SocketState socketState) // SLOT |
|
696 | void gresb::RMAPSendConnectionState(QAbstractSocket::SocketState socketState) // SLOT | |
693 | { |
|
697 | { | |
694 | rmapSendStateLabel->setText(""); |
|
698 | rmapSendStateLabel->setText(""); | |
695 | QString socketMessage = "RMAP Send Socket State: "; |
|
699 | QString socketMessage = "RMAP Send Socket State: "; | |
696 | switch(socketState) |
|
700 | switch(socketState) | |
697 | { |
|
701 | { | |
698 | case QAbstractSocket::UnconnectedState : |
|
702 | case QAbstractSocket::UnconnectedState : | |
699 | socketMessage.append("0 => Unconnected"); |
|
703 | socketMessage.append("0 => Unconnected"); | |
700 | break; |
|
704 | break; | |
701 | case 1: |
|
705 | case 1: | |
702 | socketMessage.append("1 => HostLookup"); |
|
706 | socketMessage.append("1 => HostLookup"); | |
703 | break; |
|
707 | break; | |
704 | case 2: |
|
708 | case 2: | |
705 | socketMessage.append("2 => Connecting"); |
|
709 | socketMessage.append("2 => Connecting"); | |
706 | break; |
|
710 | break; | |
707 | case 3: |
|
711 | case 3: | |
708 | socketMessage.append("3 => Connected"); |
|
712 | socketMessage.append("3 => Connected"); | |
709 | break; |
|
713 | break; | |
710 | case 4: |
|
714 | case 4: | |
711 | socketMessage.append("4 => Bound"); |
|
715 | socketMessage.append("4 => Bound"); | |
712 | break; |
|
716 | break; | |
713 | case 5: |
|
717 | case 5: | |
714 | socketMessage.append("5 => Closing"); |
|
718 | socketMessage.append("5 => Closing"); | |
715 | break; |
|
719 | break; | |
716 | case 6: |
|
720 | case 6: | |
717 | socketMessage.append("6 => Listening"); |
|
721 | socketMessage.append("6 => Listening"); | |
718 | break; |
|
722 | break; | |
719 | } |
|
723 | } | |
720 | rmapSendStateLabel->setText(socketMessage); |
|
724 | rmapSendStateLabel->setText(socketMessage); | |
721 | emit appendToLog(socketMessage); |
|
725 | emit appendToLog(socketMessage); | |
722 | } |
|
726 | } | |
723 |
|
727 | |||
724 | void gresb::RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState) // SLOT |
|
728 | void gresb::RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState) // SLOT | |
725 | { |
|
729 | { | |
726 | rmapReceiveStateLabel->setText(""); |
|
730 | rmapReceiveStateLabel->setText(""); | |
727 | QString socketMessage = "RMAP Receive Socket State: "; |
|
731 | QString socketMessage = "RMAP Receive Socket State: "; | |
728 | switch(socketState) |
|
732 | switch(socketState) | |
729 | { |
|
733 | { | |
730 | case QAbstractSocket::UnconnectedState : |
|
734 | case QAbstractSocket::UnconnectedState : | |
731 | socketMessage.append("0 => Unconnected"); |
|
735 | socketMessage.append("0 => Unconnected"); | |
732 | break; |
|
736 | break; | |
733 | case 1: |
|
737 | case 1: | |
734 | socketMessage.append("1 => HostLookup"); |
|
738 | socketMessage.append("1 => HostLookup"); | |
735 | break; |
|
739 | break; | |
736 | case 2: |
|
740 | case 2: | |
737 | socketMessage.append("2 => Connecting"); |
|
741 | socketMessage.append("2 => Connecting"); | |
738 | break; |
|
742 | break; | |
739 | case 3: |
|
743 | case 3: | |
740 | socketMessage.append("3 => Connected"); |
|
744 | socketMessage.append("3 => Connected"); | |
741 | break; |
|
745 | break; | |
742 | case 4: |
|
746 | case 4: | |
743 | socketMessage.append("4 => Bound"); |
|
747 | socketMessage.append("4 => Bound"); | |
744 | break; |
|
748 | break; | |
745 | case 5: |
|
749 | case 5: | |
746 | socketMessage.append("5 => Closing"); |
|
750 | socketMessage.append("5 => Closing"); | |
747 | break; |
|
751 | break; | |
748 | case 6: |
|
752 | case 6: | |
749 | socketMessage.append("6 => Listening"); |
|
753 | socketMessage.append("6 => Listening"); | |
750 | break; |
|
754 | break; | |
751 | } |
|
755 | } | |
752 | rmapReceiveStateLabel->setText(socketMessage); |
|
756 | rmapReceiveStateLabel->setText(socketMessage); | |
753 | emit appendToLog(socketMessage); |
|
757 | emit appendToLog(socketMessage); | |
754 | } |
|
758 | } | |
755 |
|
759 | |||
756 | void gresb::GRESBConnectionState(QAbstractSocket::SocketState socketState) // SLOT |
|
760 | void gresb::GRESBConnectionState(QAbstractSocket::SocketState socketState) // SLOT | |
757 | { |
|
761 | { | |
758 | gresbStatusQueryLabel->setText(""); |
|
762 | gresbStatusQueryLabel->setText(""); | |
759 | QString socketMessage = "GRESB status query socket (port 3010): "; |
|
763 | QString socketMessage = "GRESB status query socket (port 3010): "; | |
760 | switch(socketState) |
|
764 | switch(socketState) | |
761 | { |
|
765 | { | |
762 | case QAbstractSocket::UnconnectedState : |
|
766 | case QAbstractSocket::UnconnectedState : | |
763 | socketMessage.append("0 => Unconnected"); |
|
767 | socketMessage.append("0 => Unconnected"); | |
764 | break; |
|
768 | break; | |
765 | case 1: |
|
769 | case 1: | |
766 | socketMessage.append("1 => HostLookup"); |
|
770 | socketMessage.append("1 => HostLookup"); | |
767 | break; |
|
771 | break; | |
768 | case 2: |
|
772 | case 2: | |
769 | socketMessage.append("2 => Connecting"); |
|
773 | socketMessage.append("2 => Connecting"); | |
770 | break; |
|
774 | break; | |
771 | case 3: |
|
775 | case 3: | |
772 | socketMessage.append("3 => Connected"); |
|
776 | socketMessage.append("3 => Connected"); | |
773 | break; |
|
777 | break; | |
774 | case 4: |
|
778 | case 4: | |
775 | socketMessage.append("4 => Bound"); |
|
779 | socketMessage.append("4 => Bound"); | |
776 | break; |
|
780 | break; | |
777 | case 5: |
|
781 | case 5: | |
778 | socketMessage.append("5 => Closing"); |
|
782 | socketMessage.append("5 => Closing"); | |
779 | break; |
|
783 | break; | |
780 | case 6: |
|
784 | case 6: | |
781 | socketMessage.append("6 => Listening"); |
|
785 | socketMessage.append("6 => Listening"); | |
782 | break; |
|
786 | break; | |
783 | } |
|
787 | } | |
784 | gresbStatusQueryLabel->setText(socketMessage); |
|
788 | gresbStatusQueryLabel->setText(socketMessage); | |
785 | } |
|
789 | } | |
786 |
|
790 | |||
|
791 | void gresb::readSettings() | |||
|
792 | { | |||
|
793 | QSettings settings("lpp", "rmapplugin"); | |||
|
794 | gresbBridgeIP0 = (unsigned char) settings.value("gresbBridgeIP0", 129).toInt(); | |||
|
795 | gresbBridgeIP1 = (unsigned char) settings.value("gresbBridgeIP1", 104).toInt(); | |||
|
796 | gresbBridgeIP2 = (unsigned char) settings.value("gresbBridgeIP2", 27).toInt(); | |||
|
797 | gresbBridgeIP3 = (unsigned char) settings.value("gresbBridgeIP3", 244).toInt(); | |||
|
798 | this->gresbBridgeIPDialogBox->setIP(gresbBridgeIP0, gresbBridgeIP1, gresbBridgeIP2, gresbBridgeIP3); | |||
|
799 | } | |||
|
800 | ||||
|
801 | void gresb::writeSettings() | |||
|
802 | { | |||
|
803 | QSettings settings("lpp", "rmapplugin"); | |||
|
804 | settings.setValue("gresbBridgeIP0", this->gresbBridgeIPDialogBox->get_addressPart1()); | |||
|
805 | settings.setValue("gresbBridgeIP1", this->gresbBridgeIPDialogBox->get_addressPart2()); | |||
|
806 | settings.setValue("gresbBridgeIP2", this->gresbBridgeIPDialogBox->get_addressPart3()); | |||
|
807 | settings.setValue("gresbBridgeIP3", this->gresbBridgeIPDialogBox->get_addressPart4()); | |||
|
808 | } | |||
|
809 |
@@ -1,108 +1,115 | |||||
1 | #ifndef GRESB_H |
|
1 | #ifndef GRESB_H | |
2 | #define GRESB_H |
|
2 | #define GRESB_H | |
3 |
|
3 | |||
4 | #include <QWidget> |
|
4 | #include <QWidget> | |
5 | #include <QLabel> |
|
5 | #include <QLabel> | |
6 | #include <QPushButton> |
|
6 | #include <QPushButton> | |
7 | #include <QSpinBox> |
|
7 | #include <QSpinBox> | |
8 | #include <QGridLayout> |
|
8 | #include <QGridLayout> | |
9 | #include <QTcpSocket> |
|
9 | #include <QTcpSocket> | |
10 | #include <QDialog> |
|
10 | #include <QDialog> | |
11 | #include <QSemaphore> |
|
11 | #include <QSemaphore> | |
|
12 | #include <QSettings> | |||
12 |
|
13 | |||
13 | #include "gresbstatusenquiry.h" |
|
14 | #include "gresbstatusenquiry.h" | |
14 | #include "rmapoperations.h" |
|
15 | #include "rmapoperations.h" | |
15 | #include "qipdialogbox.h" |
|
16 | #include "qipdialogbox.h" | |
16 | #include "ccsds.h" |
|
17 | #include "ccsds.h" | |
17 | #include "tmpackettoread.h" |
|
18 | #include "tmpackettoread.h" | |
18 |
|
19 | |||
19 | class gresb : public QWidget |
|
20 | class gresb : public QWidget | |
20 | { |
|
21 | { | |
21 | Q_OBJECT |
|
22 | Q_OBJECT | |
22 | public: |
|
23 | public: | |
23 | explicit gresb(QWidget *parent = 0); |
|
24 | explicit gresb(QWidget *parent = 0); | |
24 | ~gresb(); |
|
25 | ~gresb(); | |
25 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
26 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); | |
26 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
27 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); | |
27 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
28 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
|
29 | void readSettings(); | |||
|
30 | void writeSettings(); | |||
28 |
|
31 | |||
29 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
32 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
30 |
|
33 | |||
31 | gresbStatusEnquiry* spwLinkStatusEnquiry; |
|
34 | gresbStatusEnquiry* spwLinkStatusEnquiry; | |
32 |
|
35 | |||
33 | signals: |
|
36 | signals: | |
34 | void sendMessage(QString message); |
|
37 | void sendMessage(QString message); | |
35 | void sendPacket(TMPacketToRead*); |
|
38 | void sendPacket(TMPacketToRead*); | |
36 | void isOpen(bool); |
|
39 | void isOpen(bool); | |
37 | void RMAP_write_reply_setText(QString); |
|
40 | void RMAP_write_reply_setText(QString); | |
38 | void appendToLog(QString); |
|
41 | void appendToLog(QString); | |
39 |
|
42 | |||
40 | public slots: |
|
43 | public slots: | |
41 | void Open(); |
|
44 | void Open(); | |
42 | void Close(); |
|
45 | void Close(); | |
43 | int receiveSPWPacketLoop(unsigned char requestID=0); |
|
46 | int receiveSPWPacketLoop(unsigned char requestID=0); | |
44 | int receiveSPWPacket(unsigned char requestID=0); |
|
47 | int receiveSPWPacket(unsigned char requestID=0); | |
45 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} |
|
48 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} | |
46 | void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} |
|
49 | void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} | |
47 | void sourceHasChanged(int source) {rmapSourceLogicalAddress = (unsigned char) source;} |
|
50 | void sourceHasChanged(int source) {rmapSourceLogicalAddress = (unsigned char) source;} | |
48 | void ccsdsPacketIsProcessed() {ccsdsPacketSEMAPHORE->tryAcquire();} |
|
51 | void ccsdsPacketIsProcessed() {ccsdsPacketSEMAPHORE->tryAcquire();} | |
49 | void reTestSPWLink(); |
|
52 | void reTestSPWLink(); | |
50 | // |
|
53 | // | |
51 | void RMAPSendConnectionState(QAbstractSocket::SocketState socketState); |
|
54 | void RMAPSendConnectionState(QAbstractSocket::SocketState socketState); | |
52 | void RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState); |
|
55 | void RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState); | |
53 | void GRESBConnectionState(QAbstractSocket::SocketState socketState); |
|
56 | void GRESBConnectionState(QAbstractSocket::SocketState socketState); | |
54 | // |
|
57 | // | |
55 | void setIP(unsigned char address1, unsigned char address2, unsigned char address3, unsigned char address4) |
|
58 | void setIP(unsigned char address1, unsigned char address2, unsigned char address3, unsigned char address4) | |
56 | {this->gresbBridgeIPDialogBox->setIP(address1, address2, address3, address4);} |
|
59 | {this->gresbBridgeIPDialogBox->setIP(address1, address2, address3, address4);} | |
57 |
|
60 | |||
58 | private slots: |
|
61 | private slots: | |
59 | int GRESBStatusQuery(); |
|
62 | int GRESBStatusQuery(); | |
60 |
|
63 | |||
61 | private: |
|
64 | private: | |
62 | unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0); |
|
65 | unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0); | |
63 | unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0); |
|
66 | unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0); | |
64 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->tryAcquire();} |
|
67 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->tryAcquire();} | |
65 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->tryAcquire();} |
|
68 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->tryAcquire();} | |
66 | int GRESBStatusQueryRequest(GresbStatusQueryOption option, char link); |
|
69 | int GRESBStatusQueryRequest(GresbStatusQueryOption option, char link); | |
67 |
|
70 | |||
68 | unsigned char rmapTargetLogicalAddress ; |
|
71 | unsigned char rmapTargetLogicalAddress ; | |
69 | unsigned char rmapSourceLogicalAddress ; |
|
72 | unsigned char rmapSourceLogicalAddress ; | |
70 |
|
73 | |||
71 | RMAP_command_codes commandCode; |
|
74 | RMAP_command_codes commandCode; | |
72 |
|
75 | |||
73 | QPushButton *gresbStatusQueryRetryButton; |
|
76 | QPushButton *gresbStatusQueryRetryButton; | |
74 | QPushButton *gresbStatusQueryAbortButton; |
|
77 | QPushButton *gresbStatusQueryAbortButton; | |
75 |
|
78 | |||
76 | QLabel *gresbBridgeIPLabel; |
|
79 | QLabel *gresbBridgeIPLabel; | |
77 | QLabel *gresbVirtualLinkLabel; |
|
80 | QLabel *gresbVirtualLinkLabel; | |
78 | QLabel *spwLinkLabel; |
|
81 | QLabel *spwLinkLabel; | |
79 | QLabel *rmapSendStateLabel; |
|
82 | QLabel *rmapSendStateLabel; | |
80 | QLabel *rmapReceiveStateLabel; |
|
83 | QLabel *rmapReceiveStateLabel; | |
81 | QLabel *gresbStatusQueryLabel; |
|
84 | QLabel *gresbStatusQueryLabel; | |
82 | QLabel *gresbStatusQueryDialogLabel; |
|
85 | QLabel *gresbStatusQueryDialogLabel; | |
83 |
|
86 | |||
84 | QDialog *gresbStatusQueryDialog; |
|
87 | QDialog *gresbStatusQueryDialog; | |
85 |
|
88 | |||
86 | QIPDialogBox* gresbBridgeIPDialogBox; |
|
89 | QIPDialogBox* gresbBridgeIPDialogBox; | |
|
90 | unsigned char gresbBridgeIP0; | |||
|
91 | unsigned char gresbBridgeIP1; | |||
|
92 | unsigned char gresbBridgeIP2; | |||
|
93 | unsigned char gresbBridgeIP3; | |||
87 |
|
94 | |||
88 | QSpinBox *gresbVirtualLinkSpinBox; |
|
95 | QSpinBox *gresbVirtualLinkSpinBox; | |
89 | QSpinBox *spwLinkSpinBox; |
|
96 | QSpinBox *spwLinkSpinBox; | |
90 |
|
97 | |||
91 | QGridLayout *connectionLayout; |
|
98 | QGridLayout *connectionLayout; | |
92 | QGridLayout *gresbStatusQueryDialogLayout; |
|
99 | QGridLayout *gresbStatusQueryDialogLayout; | |
93 |
|
100 | |||
94 | QTcpSocket *RMAPSend_SOCKET; |
|
101 | QTcpSocket *RMAPSend_SOCKET; | |
95 | QTcpSocket *RMAPReceive_SOCKET; |
|
102 | QTcpSocket *RMAPReceive_SOCKET; | |
96 | QTcpSocket *GRESBStatusQuery_SOCKET; |
|
103 | QTcpSocket *GRESBStatusQuery_SOCKET; | |
97 |
|
104 | |||
98 | // Packet receiver |
|
105 | // Packet receiver | |
99 | QSemaphore *rmapPacketSEMAPHORE; |
|
106 | QSemaphore *rmapPacketSEMAPHORE; | |
100 | QSemaphore *ccsdsPacketSEMAPHORE; |
|
107 | QSemaphore *ccsdsPacketSEMAPHORE; | |
101 | char* rmapPacket; // The buffer to receive RMAP READ packets |
|
108 | char* rmapPacket; // The buffer to receive RMAP READ packets | |
102 | unsigned char *ccsdsPacket; |
|
109 | unsigned char *ccsdsPacket; | |
103 | char *spwPacket; |
|
110 | char *spwPacket; | |
104 | unsigned int rmapPacketSize; |
|
111 | unsigned int rmapPacketSize; | |
105 | unsigned int ccsdsPacketSize; |
|
112 | unsigned int ccsdsPacketSize; | |
106 | }; |
|
113 | }; | |
107 |
|
114 | |||
108 | #endif // GRESB_H |
|
115 | #endif // GRESB_H |
@@ -1,395 +1,411 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPPMON Software |
|
2 | -- This file is a part of the LPPMON Software | |
3 | -- Copyright (C) 2012, Laboratory of Plasma Physics - CNRS |
|
3 | -- Copyright (C) 2012, Laboratory of Plasma Physics - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Paul LEROY |
|
19 | /*-- Author : Paul LEROY | |
20 | -- Mail : paul.leroy@lpp.polytechnique.fr |
|
20 | -- Mail : paul.leroy@lpp.polytechnique.fr | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #include "rmapplugin.h" |
|
22 | #include "rmapplugin.h" | |
23 | #include <QHostAddress> |
|
23 | #include <QHostAddress> | |
24 | #include <QIODevice> |
|
24 | #include <QIODevice> | |
25 | #include <QApplication> |
|
25 | #include <QApplication> | |
26 | #include <rmappluginpythonwrapper.h> |
|
26 | #include <rmappluginpythonwrapper.h> | |
27 | #include <PythonQt.h> |
|
27 | #include <PythonQt.h> | |
28 | #include <QTimer> |
|
28 | #include <QTimer> | |
29 |
|
29 | |||
30 | rmapplugin::rmapplugin(QWidget *parent) |
|
30 | rmapplugin::rmapplugin(QWidget *parent) | |
31 | :lppmonplugin(parent,false) |
|
31 | :lppmonplugin(parent,false) | |
32 | { |
|
32 | { | |
33 | this->UI = new rmapPluginUI(); |
|
33 | this->UI = new rmapPluginUI(); | |
34 | this->setWindowTitle(tr("RMAP and SPW Communication")); |
|
34 | this->setWindowTitle(tr("RMAP and SPW Communication")); | |
35 | this->setWidget((QWidget*)this->UI); |
|
35 | this->setWidget((QWidget*)this->UI); | |
36 |
|
36 | |||
37 | timeCode = 0; |
|
37 | timeCode = 0; | |
38 | time_COARSE = 0; |
|
38 | time_COARSE = 0; | |
39 | time_FINE = 0; |
|
39 | time_FINE = 0; | |
40 | currentBridge = selectedBridgeIsUnknown; |
|
40 | currentBridge = selectedBridgeIsUnknown; | |
41 |
|
41 | |||
42 | //************** |
|
42 | //************** | |
43 | //Python wrapper |
|
43 | //Python wrapper | |
44 | this->pyObject = new rmappluginPythonWrapper(); |
|
44 | this->pyObject = new rmappluginPythonWrapper(); | |
45 | connect(this->pyObject,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); |
|
45 | connect(this->pyObject,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); | |
46 | connect(this->pyObject,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); |
|
46 | connect(this->pyObject,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); | |
47 | //** |
|
47 | //** | |
48 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( WriteSPWSig(char*,uint,char,char) ), |
|
48 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( WriteSPWSig(char*,uint,char,char) ), | |
49 | this, SLOT( WriteSPW(char*,uint,char,char)), Qt::DirectConnection ); |
|
49 | this, SLOT( WriteSPW(char*,uint,char,char)), Qt::DirectConnection ); | |
50 | //** |
|
50 | //** | |
51 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateTargetAddress(unsigned char) ), |
|
51 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateTargetAddress(unsigned char) ), | |
52 | this, SLOT( setValueTargetAddress(unsigned char)) ); |
|
52 | this, SLOT( setValueTargetAddress(unsigned char)) ); | |
53 | //** |
|
53 | //** | |
54 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateSourceAddress(unsigned char) ), |
|
54 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateSourceAddress(unsigned char) ), | |
55 | this, SLOT( setValueSourceAddress(unsigned char)) ); |
|
55 | this, SLOT( setValueSourceAddress(unsigned char)) ); | |
56 | //** |
|
56 | //** | |
57 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sendMessage(QString)), |
|
57 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sendMessage(QString)), | |
58 | this, SLOT(displayOnConsole(QString)) ); |
|
58 | this, SLOT(displayOnConsole(QString)) ); | |
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 | //*** |
|
62 | //*** | |
63 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(nbPacketHasChanged(int)), |
|
63 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(nbPacketHasChanged(int)), | |
64 | this, SLOT(nbPacketHasChanged(int))); |
|
64 | this, SLOT(nbPacketHasChanged(int))); | |
65 | //************** |
|
65 | //************** | |
66 |
|
66 | |||
67 | //************** |
|
67 | //************** | |
68 | // get a smart pointer to the __main__ module of the Python interpreter |
|
68 | // get a smart pointer to the __main__ module of the Python interpreter | |
69 | PythonQtObjectPtr context = PythonQt::self()->getMainModule(); |
|
69 | PythonQtObjectPtr context = PythonQt::self()->getMainModule(); | |
70 | // add a QObject as variable of name "BUTTON_rmapOpenCommunication" to the namespace of the __main__ module |
|
70 | // add a QObject as variable of name "BUTTON_rmapOpenCommunication" to the namespace of the __main__ module | |
71 | context.addObject("BUTTON_rmapOpenCommunication", UI->rmapOpenCommunicationButton); |
|
71 | context.addObject("BUTTON_rmapOpenCommunication", UI->rmapOpenCommunicationButton); | |
72 | context.addObject("BUTTON_rmapCloseCommunication", UI->rmapCloseCommunicationButton); |
|
72 | context.addObject("BUTTON_rmapCloseCommunication", UI->rmapCloseCommunicationButton); | |
73 | context.addObject("BUTTON_selectStarDundee", UI->selectStarDundee_BUTTON); |
|
73 | context.addObject("BUTTON_selectStarDundee", UI->selectStarDundee_BUTTON); | |
74 | context.addObject("BUTTON_selectGRESB", UI->selectGRESB_BUTTON); |
|
74 | context.addObject("BUTTON_selectGRESB", UI->selectGRESB_BUTTON); | |
75 | context.addObject("GRESB_Bridge", UI->gresbBridge); |
|
75 | context.addObject("GRESB_Bridge", UI->gresbBridge); | |
76 | //************** |
|
76 | //************** | |
77 |
|
77 | |||
78 | connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(openBridge())); |
|
78 | connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(openBridge())); | |
79 | connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(closeBridge())); |
|
79 | connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(closeBridge())); | |
80 | connect(this, SIGNAL( |
|
80 | connect(this, SIGNAL( | |
81 | updateStatistics(unsigned char,unsigned char,unsigned char,unsigned char,uint,uint,uint,uint) |
|
81 | updateStatistics(unsigned char,unsigned char,unsigned char,unsigned char,uint,uint,uint,uint) | |
82 | ), |
|
82 | ), | |
83 | this->UI->tmStatistics, SLOT( |
|
83 | this->UI->tmStatistics, SLOT( | |
84 | updateStatistics(unsigned char,unsigned char,unsigned char,unsigned char,uint,uint,uint,uint) |
|
84 | updateStatistics(unsigned char,unsigned char,unsigned char,unsigned char,uint,uint,uint,uint) | |
85 | )); |
|
85 | )); | |
86 |
|
86 | |||
87 | //****** |
|
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, SIGNAL(ccsdsPacketIsProcessed()), this->UI->gresbBridge, SLOT(ccsdsPacketIsProcessed())); |
|
93 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->gresbBridge, SLOT(ccsdsPacketIsProcessed())); | |
94 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
94 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
95 | this->UI->gresbBridge, SLOT(targetHasChanged(int))); |
|
95 | this->UI->gresbBridge, SLOT(targetHasChanged(int))); | |
96 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
96 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
97 | this->UI->gresbBridge, SLOT(sourceHasChanged(int))); |
|
97 | this->UI->gresbBridge, SLOT(sourceHasChanged(int))); | |
98 | connect(this->UI->gresbBridge, SIGNAL(sendPacket(TMPacketToRead*)), |
|
98 | connect(this->UI->gresbBridge, SIGNAL(sendPacket(TMPacketToRead*)), | |
99 | this, SLOT(receivePacketFromBridge(TMPacketToRead*)), Qt::DirectConnection); |
|
99 | this, SLOT(receivePacketFromBridge(TMPacketToRead*)), Qt::DirectConnection); | |
100 |
|
100 | |||
101 | //************ |
|
101 | //************ | |
102 | // Star Dundee |
|
102 | // Star Dundee | |
103 | connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
103 | connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); | |
104 | connect(this->UI->starDundee, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); |
|
104 | connect(this->UI->starDundee, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); | |
105 | 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))); | |
106 | connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); |
|
106 | connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); | |
107 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->starDundee, SLOT(ccsdsPacketIsProcessed())); |
|
107 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->starDundee, SLOT(ccsdsPacketIsProcessed())); | |
108 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
108 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
109 | this->UI->starDundee, SLOT(targetHasChanged(int))); |
|
109 | this->UI->starDundee, SLOT(targetHasChanged(int))); | |
110 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
110 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
111 | this->UI->starDundee, SLOT(sourceHasChanged(int))); |
|
111 | this->UI->starDundee, SLOT(sourceHasChanged(int))); | |
112 | connect(this->UI->starDundee, SIGNAL(sendPacket(TMPacketToRead*)), |
|
112 | connect(this->UI->starDundee, SIGNAL(sendPacket(TMPacketToRead*)), | |
113 | this, SLOT(receivePacketFromBridge(TMPacketToRead*)), Qt::DirectConnection); |
|
113 | this, SLOT(receivePacketFromBridge(TMPacketToRead*)), Qt::DirectConnection); | |
114 |
|
114 | |||
115 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); |
|
115 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); | |
116 |
|
116 | |||
117 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->generalCCSDSPacketStore); |
|
117 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->generalCCSDSPacketStore); | |
|
118 | ||||
|
119 | //************ | |||
|
120 | // LFR ACtions | |||
|
121 | connect(this->UI->lfrActions, SIGNAL(WriteSPWSig(char*,uint,char,char)), | |||
|
122 | this, SLOT(WriteSPW(char*,uint,char,char))); | |||
|
123 | ||||
118 | } |
|
124 | } | |
119 |
|
125 | |||
120 | rmapplugin::~rmapplugin() |
|
126 | rmapplugin::~rmapplugin() | |
121 | { |
|
127 | { | |
122 | switch(currentBridge) |
|
128 | switch(currentBridge) | |
123 | { |
|
129 | { | |
124 | case selectedBridgeIsGRESB : |
|
130 | case selectedBridgeIsGRESB : | |
125 | if (RMAPSend_SOCKET->isOpen()) RMAPSend_SOCKET->disconnectFromHost(); |
|
131 | this->UI->gresbBridge->writeSettings(); | |
126 | if (RMAPReceive_SOCKET->isOpen()) RMAPReceive_SOCKET->disconnectFromHost(); |
|
|||
127 | if (GRESBStatusQuery_SOCKET->isOpen()) GRESBStatusQuery_SOCKET->disconnectFromHost(); |
|
|||
128 | break; |
|
132 | break; | |
129 | case selectedBridgeIsStarDundee : |
|
133 | case selectedBridgeIsStarDundee : | |
130 | break; |
|
134 | break; | |
131 | default: |
|
135 | default: | |
132 | break; |
|
136 | break; | |
133 | } |
|
137 | } | |
134 | } |
|
138 | } | |
135 |
|
139 | |||
136 | unsigned int rmapplugin::Write(unsigned int *Value, unsigned int count, unsigned int address) |
|
140 | unsigned int rmapplugin::Write(unsigned int *Value, unsigned int count, unsigned int address) | |
137 | { |
|
141 | { | |
138 | unsigned int result; |
|
142 | unsigned int result; | |
139 | switch(currentBridge) |
|
143 | switch(currentBridge) | |
140 | { |
|
144 | { | |
141 | case selectedBridgeIsGRESB : |
|
145 | case selectedBridgeIsGRESB : | |
142 | result = UI->gresbBridge->Write(Value, count, address); |
|
146 | result = UI->gresbBridge->Write(Value, count, address); | |
143 | break; |
|
147 | break; | |
144 | case selectedBridgeIsStarDundee : |
|
148 | case selectedBridgeIsStarDundee : | |
145 | result = UI->starDundee->Write(Value, count, address); |
|
149 | result = UI->starDundee->Write(Value, count, address); | |
146 | break; |
|
150 | break; | |
147 | default: |
|
151 | default: | |
148 | result = 1; |
|
152 | result = 1; | |
149 | break; |
|
153 | break; | |
150 | } |
|
154 | } | |
151 | return result; |
|
155 | return result; | |
152 | } |
|
156 | } | |
153 |
|
157 | |||
154 | unsigned int rmapplugin::Read(unsigned int *Value, unsigned int count, unsigned int address) |
|
158 | unsigned int rmapplugin::Read(unsigned int *Value, unsigned int count, unsigned int address) | |
155 | { |
|
159 | { | |
156 | unsigned int result; |
|
160 | unsigned int result; | |
157 | switch(currentBridge) |
|
161 | switch(currentBridge) | |
158 | { |
|
162 | { | |
159 | case selectedBridgeIsGRESB : |
|
163 | case selectedBridgeIsGRESB : | |
160 | result = UI->gresbBridge->Read(Value, count, address); |
|
164 | result = UI->gresbBridge->Read(Value, count, address); | |
161 | break; |
|
165 | break; | |
162 | case selectedBridgeIsStarDundee : |
|
166 | case selectedBridgeIsStarDundee : | |
163 | result = UI->starDundee->Read(Value, count, address); |
|
167 | result = UI->starDundee->Read(Value, count, address); | |
164 | break; |
|
168 | break; | |
165 | default: |
|
169 | default: | |
166 | result = 1; |
|
170 | result = 1; | |
167 | break; |
|
171 | break; | |
168 | } |
|
172 | } | |
169 | return result; |
|
173 | return result; | |
170 | } |
|
174 | } | |
171 |
|
175 | |||
172 | //////// |
|
176 | //////// | |
173 | // SLOTS |
|
177 | // SLOTS | |
174 |
|
178 | |||
175 | unsigned int rmapplugin::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) // SLOT |
|
179 | unsigned int rmapplugin::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) // SLOT | |
176 | { |
|
180 | { | |
177 | unsigned int result; |
|
181 | unsigned int result; | |
178 | switch(currentBridge) |
|
182 | switch(currentBridge) | |
179 | { |
|
183 | { | |
180 | case selectedBridgeIsGRESB : |
|
184 | case selectedBridgeIsGRESB : | |
181 | result = UI->gresbBridge->WriteSPW(Value, count, targetLogicalAddress, userApplication); |
|
185 | result = UI->gresbBridge->WriteSPW(Value, count, targetLogicalAddress, userApplication); | |
182 | break; |
|
186 | break; | |
183 | case selectedBridgeIsStarDundee : |
|
187 | case selectedBridgeIsStarDundee : | |
184 | result = UI->starDundee->WriteSPW(Value, count, targetLogicalAddress, userApplication); |
|
188 | result = UI->starDundee->WriteSPW(Value, count, targetLogicalAddress, userApplication); | |
185 | break; |
|
189 | break; | |
186 | default: |
|
190 | default: | |
187 | result = 1; |
|
191 | result = 1; | |
188 | break; |
|
192 | break; | |
189 | } |
|
193 | } | |
190 | return result; |
|
194 | return result; | |
191 | } |
|
195 | } | |
192 |
|
196 | |||
193 | void rmapplugin::openBridge() |
|
197 | void rmapplugin::openBridge() | |
194 | { |
|
198 | { | |
195 | switch(currentBridge) |
|
199 | switch(currentBridge) | |
196 | { |
|
200 | { | |
197 | case selectedBridgeIsGRESB : |
|
201 | case selectedBridgeIsGRESB : | |
198 | this->UI->gresbBridge->Open(); |
|
202 | this->UI->gresbBridge->Open(); | |
199 | break; |
|
203 | break; | |
200 | case selectedBridgeIsStarDundee : |
|
204 | case selectedBridgeIsStarDundee : | |
201 | this->UI->starDundee->Open(); |
|
205 | this->UI->starDundee->Open(); | |
202 | break; |
|
206 | break; | |
203 | default: |
|
207 | default: | |
204 | break; |
|
208 | break; | |
205 | } |
|
209 | } | |
206 | } |
|
210 | } | |
207 |
|
211 | |||
208 | void rmapplugin::closeBridge() |
|
212 | void rmapplugin::closeBridge() | |
209 | { |
|
213 | { | |
210 | switch(currentBridge) |
|
214 | switch(currentBridge) | |
211 | { |
|
215 | { | |
212 | case selectedBridgeIsGRESB : |
|
216 | case selectedBridgeIsGRESB : | |
213 | this->UI->gresbBridge->Close(); |
|
217 | this->UI->gresbBridge->Close(); | |
214 | break; |
|
218 | break; | |
215 | case selectedBridgeIsStarDundee : |
|
219 | case selectedBridgeIsStarDundee : | |
216 | this->UI->starDundee->Close(); |
|
220 | this->UI->starDundee->Close(); | |
217 | break; |
|
221 | break; | |
218 | default: |
|
222 | default: | |
219 | break; |
|
223 | break; | |
220 | } |
|
224 | } | |
221 | } |
|
225 | } | |
222 |
|
226 | |||
223 | void rmapplugin::RMAP_write_reply_setText(QString text) |
|
227 | void rmapplugin::RMAP_write_reply_setText(QString text) | |
224 | { |
|
228 | { | |
225 | this->UI->RMAP_write_reply->setText(text); |
|
229 | this->UI->RMAP_write_reply->setText(text); | |
226 | } |
|
230 | } | |
227 |
|
231 | |||
228 | void rmapplugin::appendToLog(QString text) |
|
232 | void rmapplugin::appendToLog(QString text) | |
229 | { |
|
233 | { | |
230 | APPENDTOLOG(text); |
|
234 | APPENDTOLOG(text); | |
231 | } |
|
235 | } | |
232 |
|
236 | |||
233 | void rmapplugin::setValueTargetAddress(unsigned char newAddress) |
|
237 | void rmapplugin::setValueTargetAddress(unsigned char newAddress) | |
234 | { |
|
238 | { | |
235 | this->UI->rmapTargetLogicalAddressSpinBox->setValue(newAddress); |
|
239 | this->UI->rmapTargetLogicalAddressSpinBox->setValue(newAddress); | |
236 | } |
|
240 | } | |
237 |
|
241 | |||
238 | void rmapplugin::setValueSourceAddress(unsigned char newAddress) |
|
242 | void rmapplugin::setValueSourceAddress(unsigned char newAddress) | |
239 | { |
|
243 | { | |
240 | this->UI->rmapSourceLogicalAddressSpinBox->setValue(newAddress); |
|
244 | this->UI->rmapSourceLogicalAddressSpinBox->setValue(newAddress); | |
241 | } |
|
245 | } | |
242 |
|
246 | |||
243 | void rmapplugin::receivePacketFromBridge(TMPacketToRead *packet) |
|
247 | void rmapplugin::receivePacketFromBridge(TMPacketToRead *packet) | |
244 | { |
|
248 | { | |
245 | preProcessPacket(packet); |
|
249 | preProcessPacket(packet); | |
246 |
|
250 | |||
247 | // Send the packet to the TM echo bridge for processing |
|
251 | // Send the packet to the TM echo bridge for processing | |
248 | this->UI->tmEchoBridge->sendTMPacketLESIA(packet); |
|
252 | this->UI->tmEchoBridge->sendTMPacketLESIA(packet); | |
249 |
|
253 | |||
250 | this->generalCCSDSPacketStore.append(packet); |
|
254 | this->generalCCSDSPacketStore.append(packet); | |
|
255 | if (this->generalCCSDSPacketStore.size() > 1000) | |||
|
256 | { | |||
|
257 | this->generalCCSDSPacketStore.erase(generalCCSDSPacketStore.begin(), | |||
|
258 | generalCCSDSPacketStore.begin() + 500); | |||
|
259 | } | |||
251 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(generalCCSDSPacketStore.size())); |
|
260 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(generalCCSDSPacketStore.size())); | |
252 | processPacketStore(); |
|
261 | processPacketStore(); | |
253 | } |
|
262 | } | |
254 |
|
263 | |||
255 | void rmapplugin::preProcessPacket(TMPacketToRead *packet) |
|
264 | void rmapplugin::preProcessPacket(TMPacketToRead *packet) | |
256 | { |
|
265 | { | |
257 | unsigned char pid = 0; |
|
266 | unsigned char pid = 0; | |
258 | unsigned char cat = 0; |
|
267 | unsigned char cat = 0; | |
259 | unsigned char typ = 0; |
|
268 | unsigned char typ = 0; | |
260 | unsigned char sub = 0; |
|
269 | unsigned char sub = 0; | |
261 | unsigned int sid = 0; |
|
270 | unsigned int sid = 0; | |
262 | unsigned int length = 0; |
|
271 | unsigned int length = 0; | |
263 | unsigned int coarse_t = 0; |
|
272 | unsigned int coarse_t = 0; | |
264 | unsigned int fine_t = 0; |
|
273 | unsigned int fine_t = 0; | |
265 |
|
274 | |||
266 | //********************************* |
|
275 | //********************************* | |
267 | // get the parameters of the packet |
|
276 | // get the parameters of the packet | |
268 | pid = this->UI->tmStatistics->getPID( packet ); |
|
277 | pid = this->UI->tmStatistics->getPID( packet ); | |
269 | cat = this->UI->tmStatistics->getCAT( packet ); |
|
278 | cat = this->UI->tmStatistics->getCAT( packet ); | |
270 | typ = this->UI->tmStatistics->getTYPE( packet ); |
|
279 | typ = this->UI->tmStatistics->getTYPE( packet ); | |
271 | sub = this->UI->tmStatistics->getSUBTYPE( packet ); |
|
280 | sub = this->UI->tmStatistics->getSUBTYPE( packet ); | |
272 | length = this->UI->tmStatistics->getLENGTH( packet ); |
|
281 | length = this->UI->tmStatistics->getLENGTH( packet ); | |
273 | coarse_t = this->UI->tmStatistics->getCoarseTime( packet ); |
|
282 | coarse_t = this->UI->tmStatistics->getCoarseTime( packet ); | |
274 | fine_t = this->UI->tmStatistics->getFineTime( packet ); |
|
283 | fine_t = this->UI->tmStatistics->getFineTime( packet ); | |
275 | sid = this->UI->tmStatistics->getSID( packet, pid, cat, typ, sub ); |
|
284 | sid = this->UI->tmStatistics->getSID( packet, pid, cat, typ, sub ); | |
276 |
|
285 | |||
277 | emit updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t); |
|
286 | emit updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t); | |
278 |
|
287 | |||
|
288 | //********************************************** | |||
|
289 | // if the packet is a parameter dump, display it | |||
|
290 | if ( (typ == TM_TYPE_PARAMETER_DUMP) & (sub == TM_SUBTYPE_PARAMETER_DUMP) & (sid == SID_PARAMETER_DUMP) ) | |||
|
291 | { | |||
|
292 | this->UI->lfrActions->parameterDump->updateParameterDump(packet); | |||
|
293 | } | |||
279 |
|
294 | |||
280 | //**************************************** |
|
295 | //**************************************** | |
281 | // if the packet is a waveform, display it |
|
296 | // if the packet is a waveform, display it | |
282 | /*if ( (typ == 21) & (sub == 3) ) |
|
297 | /*if ( (typ == 21) & (sub == 3) ) | |
283 | { |
|
298 | { | |
284 | sid = packet->Value[20]; // SID |
|
299 | sid = packet->Value[20]; // SID | |
285 | switch (sid){ |
|
300 | switch (sid){ | |
286 | case SID_NORMAL_SWF_F0: |
|
301 | case SID_NORMAL_SWF_F0: | |
287 | buildWFAndDisplay(packet, &wfPacketNormal[0], 0); |
|
302 | buildWFAndDisplay(packet, &wfPacketNormal[0], 0); | |
288 | break; |
|
303 | break; | |
289 | case SID_NORMAL_SWF_F1: |
|
304 | case SID_NORMAL_SWF_F1: | |
290 | buildWFAndDisplay(packet, &wfPacketNormal[1], 1); |
|
305 | buildWFAndDisplay(packet, &wfPacketNormal[1], 1); | |
291 | break; |
|
306 | break; | |
292 | case SID_NORMAL_SWF_F2: |
|
307 | case SID_NORMAL_SWF_F2: | |
293 | buildWFAndDisplay(packet, &wfPacketNormal[2], 2); |
|
308 | buildWFAndDisplay(packet, &wfPacketNormal[2], 2); | |
294 | break; |
|
309 | break; | |
295 | case SID_NORMAL_CWF_F3: |
|
310 | case SID_NORMAL_CWF_F3: | |
296 | buildWFAndDisplay(packet, &wfPacketNormal[3], 3); |
|
311 | buildWFAndDisplay(packet, &wfPacketNormal[3], 3); | |
297 | break; |
|
312 | break; | |
298 | } |
|
313 | } | |
299 | }*/ |
|
314 | }*/ | |
300 | } |
|
315 | } | |
301 |
|
316 | |||
302 | void rmapplugin::nbPacketHasChanged(int nb) |
|
317 | void rmapplugin::nbPacketHasChanged(int nb) | |
303 | { |
|
318 | { | |
304 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(nb)); |
|
319 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(nb)); | |
305 | } |
|
320 | } | |
306 |
|
321 | |||
307 | void rmapplugin::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) |
|
322 | void rmapplugin::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) | |
308 | { |
|
323 | { | |
309 | unsigned int i = 0; |
|
324 | unsigned int i = 0; | |
310 | unsigned int j = 0; |
|
325 | unsigned int j = 0; | |
311 | unsigned char *data; |
|
326 | unsigned char *data; | |
312 | unsigned char pkt_nr = 0; |
|
327 | unsigned char pkt_nr = 0; | |
313 | unsigned int blk_nr = 0; |
|
328 | unsigned int blk_nr = 0; | |
314 |
|
329 | |||
315 | pkt_nr = packet->Value[23]; // PKT_NR |
|
330 | pkt_nr = packet->Value[23]; // PKT_NR | |
316 | blk_nr = packet->Value[24] * 256 + packet->Value[25]; |
|
331 | blk_nr = packet->Value[24] * 256 + packet->Value[25]; | |
317 | data = &packet->Value[26]; // start of the first data block; |
|
332 | data = &packet->Value[26]; // start of the first data block; | |
318 | j = (pkt_nr-1) * 340; |
|
333 | j = (pkt_nr-1) * 340; | |
319 | for ( i=0; i<blk_nr; i++ ){ |
|
334 | for ( i=0; i<blk_nr; i++ ){ | |
320 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); |
|
335 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |
321 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); |
|
336 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |
322 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); |
|
337 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |
323 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); |
|
338 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |
324 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); |
|
339 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |
325 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); |
|
340 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |
326 | } |
|
341 | } | |
327 | if (pkt_nr == 7) |
|
342 | if (pkt_nr == 7) | |
328 | { |
|
343 | { | |
329 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); |
|
344 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); | |
330 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); |
|
345 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); | |
331 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); |
|
346 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); | |
332 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); |
|
347 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); | |
333 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); |
|
348 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); | |
334 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5); |
|
349 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5); | |
335 | } |
|
350 | } | |
336 | } |
|
351 | } | |
337 |
|
352 | |||
338 | ///////////////////// |
|
353 | ///////////////////// | |
339 | // INTERNAL FUNCTIONS |
|
354 | // INTERNAL FUNCTIONS | |
340 |
|
355 | |||
341 | void rmapplugin::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) // SLOT |
|
356 | void rmapplugin::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) // SLOT | |
342 | { |
|
357 | { | |
343 | QString message; |
|
358 | QString message; | |
344 | unsigned int fine_time_value = 0; |
|
359 | unsigned int fine_time_value = 0; | |
345 | fine_time_value = ((unsigned int) ccsdsPacket[7]<<24) |
|
360 | fine_time_value = ((unsigned int) ccsdsPacket[7]<<24) | |
346 | + ((unsigned int) ccsdsPacket[6]<<16) |
|
361 | + ((unsigned int) ccsdsPacket[6]<<16) | |
347 | + ((unsigned int) ccsdsPacket[5]<<8) |
|
362 | + ((unsigned int) ccsdsPacket[5]<<8) | |
348 | + ((unsigned int) ccsdsPacket[4]); |
|
363 | + ((unsigned int) ccsdsPacket[4]); | |
349 | message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": "); |
|
364 | message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": "); | |
350 | message.append("size " |
|
365 | message.append("size " | |
351 | + QString::number(size) |
|
366 | + QString::number(size) | |
352 | +" *** header " |
|
367 | +" *** header " | |
353 | + QString::number(ccsdsPacket[0], 16) |
|
368 | + QString::number(ccsdsPacket[0], 16) | |
354 | + " " |
|
369 | + " " | |
355 | + QString::number(ccsdsPacket[1], 16) |
|
370 | + QString::number(ccsdsPacket[1], 16) | |
356 | + " " |
|
371 | + " " | |
357 | + QString::number(ccsdsPacket[2], 16) |
|
372 | + QString::number(ccsdsPacket[2], 16) | |
358 | + " " |
|
373 | + " " | |
359 | + QString::number(ccsdsPacket[3], 16) |
|
374 | + QString::number(ccsdsPacket[3], 16) | |
360 | + " *** coarse time " |
|
375 | + " *** coarse time " | |
361 | + QString::number(fine_time_value)); |
|
376 | + QString::number(fine_time_value)); | |
362 | //+ QString::number(ccsdsPacket[4], 16) |
|
377 | //+ QString::number(ccsdsPacket[4], 16) | |
363 | //+" " |
|
378 | //+" " | |
364 | //+ QString::number(ccsdsPacket[5], 16) |
|
379 | //+ QString::number(ccsdsPacket[5], 16) | |
365 | //+" " |
|
380 | //+" " | |
366 | //+ QString::number(ccsdsPacket[6], 16) |
|
381 | //+ QString::number(ccsdsPacket[6], 16) | |
367 | //+" " |
|
382 | //+" " | |
368 | //+ QString::number(ccsdsPacket[7], 16)); |
|
383 | //+ QString::number(ccsdsPacket[7], 16)); | |
369 | displayOnConsole(message); |
|
384 | displayOnConsole(message); | |
370 | //((rmappluginPythonWrapper*)this->pyObject)->storeCCSDSPacket(ccsdsPacket, size); |
|
385 | //((rmappluginPythonWrapper*)this->pyObject)->storeCCSDSPacket(ccsdsPacket, size); | |
371 | emit ccsdsPacketIsProcessed(); |
|
386 | emit ccsdsPacketIsProcessed(); | |
372 | } |
|
387 | } | |
373 |
|
388 | |||
374 | void rmapplugin::processPacketStore() |
|
389 | void rmapplugin::processPacketStore() | |
375 | { |
|
390 | { | |
376 | ((rmappluginPythonWrapper*)this->pyObject)->processPacketStore(); |
|
391 | ((rmappluginPythonWrapper*)this->pyObject)->processPacketStore(); | |
377 | } |
|
392 | } | |
378 |
|
393 | |||
379 | int rmapplugin::fetchPacket() |
|
394 | int rmapplugin::fetchPacket() | |
380 | { |
|
395 | { | |
381 | int ret = 0; |
|
396 | int ret = 0; | |
382 |
|
397 | |||
383 | switch(currentBridge) |
|
398 | switch(currentBridge) | |
384 | { |
|
399 | { | |
385 | case selectedBridgeIsGRESB : |
|
400 | case selectedBridgeIsGRESB : | |
386 | break; |
|
401 | break; | |
387 | case selectedBridgeIsStarDundee : |
|
402 | case selectedBridgeIsStarDundee : | |
388 | ret = this->UI->starDundee->receiveSPWPacketLoop(); |
|
403 | ret = this->UI->starDundee->receiveSPWPacketLoop(); | |
389 | break; |
|
404 | break; | |
390 | default: |
|
405 | default: | |
391 | break; |
|
406 | break; | |
392 | } |
|
407 | } | |
393 |
|
408 | |||
394 | return ret; |
|
409 | return ret; | |
395 | } |
|
410 | } | |
|
411 |
@@ -1,103 +1,100 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPPMON Software |
|
2 | -- This file is a part of the LPPMON Software | |
3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS |
|
3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #ifndef DRIVER1_H |
|
22 | #ifndef DRIVER1_H | |
23 | #define DRIVER1_H |
|
23 | #define DRIVER1_H | |
24 | #include <rmappluginui.h> |
|
24 | #include <rmappluginui.h> | |
25 | #include <rmapoperations.h> |
|
25 | #include <rmapoperations.h> | |
26 | #include <QMenuBar> |
|
26 | #include <QMenuBar> | |
27 | #include <QMenu> |
|
27 | #include <QMenu> | |
28 | #include <QAction> |
|
28 | #include <QAction> | |
29 | #include <QMainWindow> |
|
29 | #include <QMainWindow> | |
30 | #include <QTcpSocket> |
|
30 | #include <QTcpSocket> | |
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 | #include <wfpacket.h> | |
35 |
|
35 | |||
36 | #include <lppmonplugin.h> |
|
36 | #include <lppmonplugin.h> | |
37 |
|
37 | |||
38 | #include "tmpackettoread.h" |
|
38 | #include "tmpackettoread.h" | |
39 |
|
39 | |||
40 | #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) | |
41 |
|
41 | |||
42 | #define READ_WRITE_MAX_COUNTS 4096 // in words |
|
42 | #define READ_WRITE_MAX_COUNTS 4096 // in words | |
43 | #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 |
|
43 | #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 | |
44 | #define RMAP_READ_REPLY_HEADER_LENGTH 12 // in bytes => ECSS |
|
44 | #define RMAP_READ_REPLY_HEADER_LENGTH 12 // in bytes => ECSS | |
45 | #define RMAP_READ_COMMAND_HEADER_LENGTH 16 // in bytes => ECSS |
|
45 | #define RMAP_READ_COMMAND_HEADER_LENGTH 16 // in bytes => ECSS | |
46 | #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS |
|
46 | #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS | |
47 | #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification |
|
47 | #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification | |
48 |
|
48 | |||
49 | class rmapplugin : public lppmonplugin |
|
49 | class rmapplugin : public lppmonplugin | |
50 | { |
|
50 | { | |
51 | Q_OBJECT |
|
51 | Q_OBJECT | |
52 | public: |
|
52 | public: | |
53 | explicit rmapplugin(QWidget *parent = 0); |
|
53 | explicit rmapplugin(QWidget *parent = 0); | |
54 | ~rmapplugin(); |
|
54 | ~rmapplugin(); | |
55 | QList<TMPacketToRead*> generalCCSDSPacketStore; |
|
55 | QList<TMPacketToRead*> generalCCSDSPacketStore; | |
56 | void preProcessPacket(TMPacketToRead *packet); |
|
56 | void preProcessPacket(TMPacketToRead *packet); | |
57 | WFPacket wfPacketNormal[4]; |
|
57 | WFPacket wfPacketNormal[4]; | |
58 | void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); |
|
58 | void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); | |
59 |
|
59 | |||
60 | public slots: |
|
60 | public slots: | |
61 | 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); | |
62 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
62 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); | |
63 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
63 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
64 | void setValueTargetAddress(unsigned char newAddress); |
|
64 | void setValueTargetAddress(unsigned char newAddress); | |
65 | void setValueSourceAddress(unsigned char newAddress); |
|
65 | void setValueSourceAddress(unsigned char newAddress); | |
66 | void openBridge(); |
|
66 | void openBridge(); | |
67 | void closeBridge(); |
|
67 | void closeBridge(); | |
68 | void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
68 | void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
69 | void processPacketStore(); |
|
69 | void processPacketStore(); | |
70 | void updatePacketStore(selectedBridge bridge); |
|
70 | void updatePacketStore(selectedBridge bridge); | |
71 | void nbPacketHasChanged(int nb); |
|
71 | void nbPacketHasChanged(int nb); | |
72 | int fetchPacket(); |
|
72 | int fetchPacket(); | |
73 | void receivePacketFromBridge(TMPacketToRead* packet); |
|
73 | void receivePacketFromBridge(TMPacketToRead* packet); | |
74 | // |
|
74 | // | |
75 | void displayOnConsole(QString message) {this->UI->console->append(message);} |
|
75 | void displayOnConsole(QString message) {this->UI->console->append(message);} | |
76 | // |
|
76 | // | |
77 | void RMAP_write_reply_setText(QString text); |
|
77 | void RMAP_write_reply_setText(QString text); | |
78 | void appendToLog(QString text); |
|
78 | void appendToLog(QString text); | |
79 | // |
|
79 | // | |
80 | void activatePlugin(bool flag) {emit activateSig(flag);} |
|
80 | void activatePlugin(bool flag) {emit activateSig(flag);} | |
81 | void bridgeHasChanged(selectedBridge bridge) {currentBridge = bridge;} |
|
81 | void bridgeHasChanged(selectedBridge bridge) {currentBridge = bridge;} | |
82 |
|
82 | |||
83 | signals: |
|
83 | signals: | |
84 | void ccsdsPacketIsProcessed(); |
|
84 | void ccsdsPacketIsProcessed(); | |
85 | void updateStatistics(unsigned char pid, unsigned char cat, |
|
85 | void updateStatistics(unsigned char pid, unsigned char cat, | |
86 | unsigned char typ, unsigned char sub, |
|
86 | unsigned char typ, unsigned char sub, | |
87 | unsigned int sid, unsigned int length, |
|
87 | unsigned int sid, unsigned int length, | |
88 | unsigned int coarse_t, unsigned int fine_t); |
|
88 | unsigned int coarse_t, unsigned int fine_t); | |
89 |
|
89 | |||
90 | private: |
|
90 | private: | |
91 | selectedBridge currentBridge; |
|
91 | selectedBridge currentBridge; | |
92 | rmapPluginUI* UI; |
|
92 | rmapPluginUI* UI; | |
93 | QTcpSocket* GRESBStatusQuery_SOCKET; |
|
|||
94 | QTcpSocket* RMAPSend_SOCKET; |
|
|||
95 | QTcpSocket* RMAPReceive_SOCKET; |
|
|||
96 | ccsds* ccsds_command; |
|
93 | ccsds* ccsds_command; | |
97 | unsigned int rmapPacketSize; |
|
94 | unsigned int rmapPacketSize; | |
98 | unsigned int time_COARSE; |
|
95 | unsigned int time_COARSE; | |
99 | unsigned int time_FINE; |
|
96 | unsigned int time_FINE; | |
100 | char timeCode; |
|
97 | char timeCode; | |
101 | }; |
|
98 | }; | |
102 |
|
99 | |||
103 | #endif // DRIVER1_H |
|
100 | #endif // DRIVER1_H |
@@ -1,84 +1,89 | |||||
1 | # |
|
1 | # | |
2 | # Project created by QtCreator 2011-09-20T08:15:30 |
|
2 | # Project created by QtCreator 2011-09-20T08:15:30 | |
3 | # |
|
3 | # | |
4 | #------------------------------------------------- |
|
4 | #------------------------------------------------- | |
5 |
|
5 | |||
6 | #include(/etc/lppmon/lppmonplugin.prf) |
|
6 | #include(/etc/lppmon/lppmonplugin.prf) | |
7 | CONFIG += lppmonplugin |
|
7 | CONFIG += lppmonplugin | |
8 | TARGET = rmapplugin |
|
8 | TARGET = rmapplugin | |
9 |
|
9 | |||
10 | DEFINES += PLUGIN=rmapplugin |
|
10 | DEFINES += PLUGIN=rmapplugin | |
11 | DEFINES += PLUGINHEADER="\"\\\"rmapplugin.h"\\\"\" |
|
11 | DEFINES += PLUGINHEADER="\"\\\"rmapplugin.h"\\\"\" | |
12 | DEFINES += driver_Name="\"\\\"RMAPPlugin"\\\"\" |
|
12 | DEFINES += driver_Name="\"\\\"RMAPPlugin"\\\"\" | |
13 | DEFINES += driver_Author="\"\\\"Paul Leroy paul.leroy@lpp.polytechnique.fr"\\\"\" |
|
13 | DEFINES += driver_Author="\"\\\"Paul Leroy paul.leroy@lpp.polytechnique.fr"\\\"\" | |
14 | DEFINES += driver_Version="\"\\\"1.1.2"\\\"\" |
|
14 | DEFINES += driver_Version="\"\\\"1.1.2"\\\"\" | |
15 | DEFINES += driver_Description="\"\\\"AHB bus controler, works with Gaisler's AHB plugn' play bus."\\\"\" |
|
15 | DEFINES += driver_Description="\"\\\"AHB bus controler, works with Gaisler's AHB plugn' play bus."\\\"\" | |
16 | DEFINES += driver_can_be_root=1 |
|
16 | DEFINES += driver_can_be_root=1 | |
17 | DEFINES += driver_can_be_child=0 |
|
17 | DEFINES += driver_can_be_child=0 | |
18 | DEFINES += driver_VID=0 |
|
18 | DEFINES += driver_VID=0 | |
19 | DEFINES += driver_PID=0 |
|
19 | DEFINES += driver_PID=0 | |
20 |
|
20 | |||
21 | QT += network |
|
21 | QT += network | |
22 |
|
22 | |||
23 | LIBS += ../spw_usb_driver_v2.63/lib/x86_64/libSpaceWireUSBAPI.so \ |
|
23 | LIBS += ../spw_usb_driver_v2.63/lib/x86_64/libSpaceWireUSBAPI.so \ | |
24 | ../spw_usb_driver_v2.63/lib/x86_64/libConfigLibraryUSB.so |
|
24 | ../spw_usb_driver_v2.63/lib/x86_64/libConfigLibraryUSB.so | |
25 |
|
25 | |||
26 |
|
26 | |||
27 | INCLUDEPATH += \ |
|
27 | INCLUDEPATH += \ | |
28 | $${PWD} \ |
|
28 | $${PWD} \ | |
29 | ../common_PLE \ |
|
29 | ../common_PLE \ | |
30 | ../../DEV_PLE/header \ |
|
30 | ../../DEV_PLE/header \ | |
31 | ../spw_usb_driver_v2.63/inc \ |
|
31 | ../spw_usb_driver_v2.63/inc \ | |
32 | $${QT_INSTALL_HEADER} \ |
|
32 | $${QT_INSTALL_HEADER} \ | |
33 | $$[QT_INSTALL_HEADERS]/lppmon/common \ |
|
33 | $$[QT_INSTALL_HEADERS]/lppmon/common \ | |
34 | $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay |
|
34 | $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay \ | |
|
35 | $$[QT_INSTALL_HEADERS]/lppmon/parameterdump | |||
35 |
|
36 | |||
36 | LIBS += -llppmoncommon -lwfdisplay -lqwt5-qt4 |
|
37 | LIBS += -llppmoncommon -lwfdisplay -lqwt5-qt4 -lparameterdump | |
37 |
|
38 | |||
38 |
|
39 | |||
39 | HEADERS += \ |
|
40 | HEADERS += \ | |
40 | ../../DEV_PLE/header/ccsds_types.h \ |
|
41 | ../../DEV_PLE/header/ccsds_types.h \ | |
41 | rmappluginui.h \ |
|
42 | rmappluginui.h \ | |
42 | rmapplugin.h \ |
|
43 | rmapplugin.h \ | |
43 | rmapoperations.h \ |
|
44 | rmapoperations.h \ | |
44 | ccsds.h \ |
|
45 | ccsds.h \ | |
45 | ../common_PLE/qipdialogbox.h \ |
|
46 | ../common_PLE/qipdialogbox.h \ | |
46 | ../common_PLE/gresbstatusenquiry.h \ |
|
47 | ../common_PLE/gresbstatusenquiry.h \ | |
47 | rmappluginpythonwrapper.h \ |
|
48 | rmappluginpythonwrapper.h \ | |
48 | stardundee.h \ |
|
49 | stardundee.h \ | |
49 | ../spw_usb_driver_v2.61/inc/spw_usb_api.h \ |
|
50 | ../spw_usb_driver_v2.61/inc/spw_usb_api.h \ | |
50 | ../spw_usb_driver_v2.61/inc/spw_config_library.h \ |
|
51 | ../spw_usb_driver_v2.61/inc/spw_config_library.h \ | |
51 | gresb.h \ |
|
52 | gresb.h \ | |
52 | tcpackettosend.h \ |
|
53 | tcpackettosend.h \ | |
53 | tmpackettoread.h \ |
|
54 | tmpackettoread.h \ | |
54 | tmstatistics.h \ |
|
55 | tmstatistics.h \ | |
55 | wfpacket.h \ |
|
56 | wfpacket.h \ | |
56 | params.h \ |
|
57 | params.h \ | |
57 | tmechobridge.h |
|
58 | tmechobridge.h \ | |
|
59 | entermode.h \ | |||
|
60 | lfractions.h | |||
58 |
|
61 | |||
59 |
|
62 | |||
60 | SOURCES += \ |
|
63 | SOURCES += \ | |
61 | rmapplugin.cpp \ |
|
64 | rmapplugin.cpp \ | |
62 | rmappluginui.cpp \ |
|
65 | rmappluginui.cpp \ | |
63 | rmapoperations.cpp \ |
|
66 | rmapoperations.cpp \ | |
64 | ccsds.cpp \ |
|
67 | ccsds.cpp \ | |
65 | ../common_PLE/qipdialogbox.cpp \ |
|
68 | ../common_PLE/qipdialogbox.cpp \ | |
66 | ../common_PLE/gresbstatusenquiry.cpp \ |
|
69 | ../common_PLE/gresbstatusenquiry.cpp \ | |
67 | rmappluginpythonwrapper.cpp \ |
|
70 | rmappluginpythonwrapper.cpp \ | |
68 | stardundee.cpp \ |
|
71 | stardundee.cpp \ | |
69 | gresb.cpp \ |
|
72 | gresb.cpp \ | |
70 | tcpackettosend.cpp \ |
|
73 | tcpackettosend.cpp \ | |
71 | tmpackettoread.cpp \ |
|
74 | tmpackettoread.cpp \ | |
72 | tmstatistics.cpp \ |
|
75 | tmstatistics.cpp \ | |
73 | wfpacket.cpp \ |
|
76 | wfpacket.cpp \ | |
74 | tmechobridge.cpp |
|
77 | tmechobridge.cpp \ | |
|
78 | entermode.cpp \ | |||
|
79 | lfractions.cpp | |||
75 |
|
80 | |||
76 |
|
81 | |||
77 |
|
82 | |||
78 |
|
83 | |||
79 |
|
84 | |||
80 |
|
85 | |||
81 |
|
86 | |||
82 |
|
87 | |||
83 |
|
88 | |||
84 |
|
89 |
@@ -1,58 +1,59 | |||||
1 | #ifndef RMAPPLUGINPYTHONWRAPPER_H |
|
1 | #ifndef RMAPPLUGINPYTHONWRAPPER_H | |
2 | #define RMAPPLUGINPYTHONWRAPPER_H |
|
2 | #define RMAPPLUGINPYTHONWRAPPER_H | |
3 |
|
3 | |||
4 | #include <QObject> |
|
4 | #include <QObject> | |
5 | #include <genericPySysdriver.h> |
|
5 | #include <genericPySysdriver.h> | |
6 | #include <QList> |
|
6 | #include <QList> | |
7 | #include <QVariant> |
|
7 | #include <QVariant> | |
|
8 | #include <QTimer> | |||
|
9 | ||||
8 | #include "rmapoperations.h" |
|
10 | #include "rmapoperations.h" | |
9 | #include "ccsds.h" |
|
11 | #include "ccsds.h" | |
10 |
#include |
|
12 | #include "tcpackettosend.h" | |
11 |
#include |
|
13 | #include "tmpackettoread.h" | |
12 | #include <QTimer> |
|
|||
13 |
|
14 | |||
14 | class rmappluginPythonWrapper : public genericPySysdriver |
|
15 | class rmappluginPythonWrapper : public genericPySysdriver | |
15 | { |
|
16 | { | |
16 | Q_OBJECT |
|
17 | Q_OBJECT | |
17 | public: |
|
18 | public: | |
18 | explicit rmappluginPythonWrapper(QObject *parent = 0); |
|
19 | explicit rmappluginPythonWrapper(QObject *parent = 0); | |
19 |
|
20 | |||
20 | QList<TMPacketToRead*> *ccsdsPacketStore; |
|
21 | QList<TMPacketToRead*> *ccsdsPacketStore; | |
21 | void processPacketStore(); |
|
22 | void processPacketStore(); | |
22 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
23 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
23 |
|
24 | |||
24 | QList<TCPacketToSend*> TCPacketStore; |
|
25 | QList<TCPacketToSend*> TCPacketStore; | |
25 | QTimer *timer; |
|
26 | QTimer *timer; | |
26 |
|
27 | |||
27 | signals: |
|
28 | signals: | |
28 | void ccsdsPacketIsAvailable(unsigned int size); |
|
29 | void ccsdsPacketIsAvailable(unsigned int size); | |
29 | void wakeUpCallingThread(); |
|
30 | void wakeUpCallingThread(); | |
30 | unsigned int WriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
31 | unsigned int WriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
31 | void updateTargetAddress(unsigned char newAddress); |
|
32 | void updateTargetAddress(unsigned char newAddress); | |
32 | void updateSourceAddress(unsigned char newAddress); |
|
33 | void updateSourceAddress(unsigned char newAddress); | |
33 | void activateTCLoopSig(); |
|
34 | void activateTCLoopSig(); | |
34 | void processPacketStoreNowSig(); |
|
35 | void processPacketStoreNowSig(); | |
35 | void sendMessage(QString message); |
|
36 | void sendMessage(QString message); | |
36 | int fetchPacketSig(); |
|
37 | int fetchPacketSig(); | |
37 | void nbPacketHasChanged(int nb); |
|
38 | void nbPacketHasChanged(int nb); | |
38 |
|
39 | |||
39 | public slots: |
|
40 | public slots: | |
40 | QList<QVariant> ReadSPW(unsigned int size=0); |
|
41 | QList<QVariant> ReadSPW(unsigned int size=0); | |
41 | int fetchPacket() {return emit fetchPacketSig();} |
|
42 | int fetchPacket() {return emit fetchPacketSig();} | |
42 | void WriteSPW(QList<int> dataList); |
|
43 | void WriteSPW(QList<int> dataList); | |
43 | void WriteSPWDelay(QList<int> dataList, unsigned int delay=0); |
|
44 | void WriteSPWDelay(QList<int> dataList, unsigned int delay=0); | |
44 | void processPacketStoreLater(unsigned int delay); |
|
45 | void processPacketStoreLater(unsigned int delay); | |
45 | void sendProcessPacketStoreNowSig(){emit processPacketStoreNowSig();} |
|
46 | void sendProcessPacketStoreNowSig(){emit processPacketStoreNowSig();} | |
46 | void sendTCLoop(); |
|
47 | void sendTCLoop(); | |
47 | void sendTC(); |
|
48 | void sendTC(); | |
48 | void reEmitWriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) |
|
49 | void reEmitWriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) | |
49 | {emit WriteSPWSig(Value, count, targetLogicalAddress, userApplication);} |
|
50 | {emit WriteSPWSig(Value, count, targetLogicalAddress, userApplication);} | |
50 |
|
51 | |||
51 | void setTargetAddressValue(unsigned int address); |
|
52 | void setTargetAddressValue(unsigned int address); | |
52 | void setSourceAddressValue(unsigned int address); |
|
53 | void setSourceAddressValue(unsigned int address); | |
53 | void ProcessPendingEvents(); |
|
54 | void ProcessPendingEvents(); | |
54 | void BlockAllSignals(); |
|
55 | void BlockAllSignals(); | |
55 |
|
56 | |||
56 | }; |
|
57 | }; | |
57 |
|
58 | |||
58 | #endif // RMAPPLUGINPYTHONWRAPPER_H |
|
59 | #endif // RMAPPLUGINPYTHONWRAPPER_H |
@@ -1,296 +1,298 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPPMON Software |
|
2 | -- This file is a part of the LPPMON Software | |
3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS |
|
3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #include "rmapplugin.h" |
|
22 | #include "rmapplugin.h" | |
23 |
|
23 | |||
24 | rmapPluginUI::rmapPluginUI(QWidget *parent) : |
|
24 | rmapPluginUI::rmapPluginUI(QWidget *parent) : | |
25 | QWidget(parent) |
|
25 | QWidget(parent) | |
26 | { |
|
26 | { | |
27 | spwTabWidget = new QTabWidget; |
|
27 | spwTabWidget = new QTabWidget; | |
28 | // |
|
28 | // | |
29 | QWidget* spwTabWidgetPage0 = new QWidget; |
|
29 | QWidget* spwTabWidgetPage0 = new QWidget; | |
30 | QWidget* spwTabWidgetPage2 = new QWidget; |
|
30 | QWidget* spwTabWidgetPage2 = new QWidget; | |
31 | QWidget* spwTabWidgetPage3 = new QWidget; |
|
31 | QWidget* spwTabWidgetPage3 = new QWidget; | |
32 | QWidget* spwTabWidgetPage4 = new QWidget; |
|
32 | QWidget* spwTabWidgetPage4 = new QWidget; | |
33 | QWidget* spwTabWidgetPage5 = new QWidget; |
|
33 | QWidget* spwTabWidgetPage5 = new QWidget; | |
34 | QWidget* spwTabWidgetPage6 = new QWidget; |
|
34 | QWidget* spwTabWidgetPage6 = new QWidget; | |
35 | // |
|
35 | // | |
36 | bridgeWidget = new QWidget; |
|
36 | bridgeWidget = new QWidget; | |
37 | mainLayout = new QVBoxLayout; |
|
37 | mainLayout = new QVBoxLayout; | |
38 | ccsdsLayout = new QVBoxLayout; |
|
38 | ccsdsLayout = new QVBoxLayout; | |
39 | consoleLayout = new QVBoxLayout; |
|
39 | consoleLayout = new QVBoxLayout; | |
40 | selectionLayout = new QVBoxLayout; |
|
40 | selectionLayout = new QVBoxLayout; | |
41 | connectionLayout = new QGridLayout; |
|
41 | connectionLayout = new QGridLayout; | |
42 | bridgeSelection_LAYOUT = new QGridLayout; |
|
42 | bridgeSelection_LAYOUT = new QGridLayout; | |
43 | generalParameters_LAYOUT = new QGridLayout; |
|
43 | generalParameters_LAYOUT = new QGridLayout; | |
44 |
|
44 | |||
45 | gresb_GROUPBOX = new QGroupBox(tr("GRESB bridge parameters")); |
|
45 | gresb_GROUPBOX = new QGroupBox(tr("GRESB bridge parameters")); | |
46 | stardundee_GROUPBOX = new QGroupBox(tr("Star Dundee brick parameters")); |
|
46 | stardundee_GROUPBOX = new QGroupBox(tr("Star Dundee brick parameters")); | |
47 | selection_GROUPBOX = new QGroupBox(tr("Bridge selection")); |
|
47 | selection_GROUPBOX = new QGroupBox(tr("Bridge selection")); | |
48 | generalParameters_GROUPBOX = new QGroupBox(tr("General parameters")); |
|
48 | generalParameters_GROUPBOX = new QGroupBox(tr("General parameters")); | |
49 |
|
49 | |||
50 | //*** QLABEL ***// |
|
50 | //*** QLABEL ***// | |
51 | gresbBridgeIPLabel = new QLabel(tr("Bridge IP: ")); |
|
51 | gresbBridgeIPLabel = new QLabel(tr("Bridge IP: ")); | |
52 | gresbVirtualLinkLabel = new QLabel(tr("Virtual Link: ")); |
|
52 | gresbVirtualLinkLabel = new QLabel(tr("Virtual Link: ")); | |
53 | spwLinkLabel = new QLabel(tr("SPW Link: ")); |
|
53 | spwLinkLabel = new QLabel(tr("SPW Link: ")); | |
54 | rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: ")); |
|
54 | rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: ")); | |
55 | rmapTargetLogicalAddressLabel = new QLabel(tr("RMAP Target Logical Address: ")); |
|
55 | rmapTargetLogicalAddressLabel = new QLabel(tr("RMAP Target Logical Address: ")); | |
56 | logFileName = new QLabel; |
|
56 | logFileName = new QLabel; | |
57 | 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")); | |
58 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); |
|
58 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); | |
59 | nbPacketInStore = new QLabel(tr("nb packets in store: -")); |
|
59 | nbPacketInStore = new QLabel(tr("nb packets in store: -")); | |
60 |
|
60 | |||
61 | //*** QPUSHBUTTON ***// |
|
61 | //*** QPUSHBUTTON ***// | |
62 | rmapOpenCommunicationButton = new QPushButton(tr("Open selected bridge")); |
|
62 | rmapOpenCommunicationButton = new QPushButton(tr("Open selected bridge")); | |
63 | rmapCloseCommunicationButton = new QPushButton(tr("Close selected bridge")); |
|
63 | rmapCloseCommunicationButton = new QPushButton(tr("Close selected bridge")); | |
64 | rmapOpenCommunicationButton->setEnabled(false); |
|
64 | rmapOpenCommunicationButton->setEnabled(false); | |
65 | rmapCloseCommunicationButton->setEnabled(false); |
|
65 | rmapCloseCommunicationButton->setEnabled(false); | |
66 | logFileChooseButton = new QPushButton(tr("Choose file")); |
|
66 | logFileChooseButton = new QPushButton(tr("Choose file")); | |
67 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
67 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); | |
68 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
68 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); | |
69 | clearConsoleButton = new QPushButton(tr("Clear")); |
|
69 | clearConsoleButton = new QPushButton(tr("Clear")); | |
70 |
|
70 | |||
71 | selectGRESB_BUTTON = new QRadioButton(tr("GRESB")); |
|
71 | selectGRESB_BUTTON = new QRadioButton(tr("GRESB")); | |
72 | selectStarDundee_BUTTON = new QRadioButton(tr("Star Dundee")); |
|
72 | selectStarDundee_BUTTON = new QRadioButton(tr("Star Dundee")); | |
73 |
|
73 | |||
74 | //*** SPINBOX ***// |
|
74 | //*** SPINBOX ***// | |
75 | gresbVirtualLinkSpinBox = new QSpinBox; |
|
75 | gresbVirtualLinkSpinBox = new QSpinBox; | |
76 | rmapSourceLogicalAddressSpinBox = new QSpinBox; |
|
76 | rmapSourceLogicalAddressSpinBox = new QSpinBox; | |
77 | rmapTargetLogicalAddressSpinBox = new QSpinBox; |
|
77 | rmapTargetLogicalAddressSpinBox = new QSpinBox; | |
78 | spwLinkSpinBox = new QSpinBox;; |
|
78 | spwLinkSpinBox = new QSpinBox;; | |
79 | CCSDSTargetLogicalAddressSpinBox = new QSpinBox; |
|
79 | CCSDSTargetLogicalAddressSpinBox = new QSpinBox; | |
80 | gresbVirtualLinkSpinBox->setRange(0, 4); |
|
80 | gresbVirtualLinkSpinBox->setRange(0, 4); | |
81 | gresbVirtualLinkSpinBox->setValue(1); |
|
81 | gresbVirtualLinkSpinBox->setValue(1); | |
82 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); |
|
82 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); | |
83 | rmapTargetLogicalAddressSpinBox->setRange(0, 255); |
|
83 | rmapTargetLogicalAddressSpinBox->setRange(0, 255); | |
84 | spwLinkSpinBox->setRange(0, 2); |
|
84 | spwLinkSpinBox->setRange(0, 2); | |
85 | spwLinkSpinBox->setValue(0); |
|
85 | spwLinkSpinBox->setValue(0); | |
86 |
|
86 | |||
87 | //*** MISC **// |
|
87 | //*** MISC **// | |
88 | starDundee = new StarDundee; |
|
88 | starDundee = new StarDundee; | |
89 | gresbBridge = new gresb; |
|
89 | gresbBridge = new gresb; | |
90 | tmEchoBridge = new TMEchoBridge(); |
|
90 | tmEchoBridge = new TMEchoBridge(); | |
91 | console = new QTextEdit; |
|
91 | console = new QTextEdit; | |
92 | gresbStatusQueryDialog = new QDialog; |
|
92 | gresbStatusQueryDialog = new QDialog; | |
93 | logEnableCheckBox = new QCheckBox(tr("Enable Logs")); |
|
93 | logEnableCheckBox = new QCheckBox(tr("Enable Logs")); | |
94 | 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")); | |
95 | 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")); | |
96 | logFile = new QFile(); |
|
96 | logFile = new QFile(); | |
97 | wfDisplay = new WFDisplay(); |
|
97 | wfDisplay = new WFDisplay(); | |
98 | tmStatistics = new TMStatistics(); |
|
98 | tmStatistics = new TMStatistics(); | |
|
99 | lfrActions = new LFRActions(); | |||
99 |
|
100 | |||
100 | logFileEn = false; |
|
101 | logFileEn = false; | |
101 |
|
102 | |||
102 | connectionLayout->setRowStretch(7, 1); |
|
103 | connectionLayout->setRowStretch(7, 1); | |
103 | connectionLayout->setColumnStretch(2, 1); |
|
104 | connectionLayout->setColumnStretch(2, 1); | |
104 |
|
105 | |||
105 | bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1); |
|
106 | bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1); | |
106 | bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1); |
|
107 | bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1); | |
107 |
|
108 | |||
108 | bridgeSelection_LAYOUT->setRowStretch(1, 1); |
|
109 | bridgeSelection_LAYOUT->setRowStretch(1, 1); | |
109 | bridgeSelection_LAYOUT->setColumnStretch(2, 1); |
|
110 | bridgeSelection_LAYOUT->setColumnStretch(2, 1); | |
110 |
|
111 | |||
111 | generalParameters_LAYOUT->addWidget(logEnableCheckBox, 0, 0, 1, 1); |
|
112 | generalParameters_LAYOUT->addWidget(logEnableCheckBox, 0, 0, 1, 1); | |
112 | generalParameters_LAYOUT->addWidget(logFileChooseButton, 0, 1, 1, 1); |
|
113 | generalParameters_LAYOUT->addWidget(logFileChooseButton, 0, 1, 1, 1); | |
113 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressLabel, 1, 0, 0); |
|
114 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressLabel, 1, 0, 0); | |
114 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressSpinBox, 1, 1, 0); |
|
115 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressSpinBox, 1, 1, 0); | |
115 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressLabel, 2, 0, 0); |
|
116 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressLabel, 2, 0, 0); | |
116 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressSpinBox, 2, 1, 0); |
|
117 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressSpinBox, 2, 1, 0); | |
117 | generalParameters_LAYOUT->addWidget(rmapOpenCommunicationButton, 3, 0, 1, 1); |
|
118 | generalParameters_LAYOUT->addWidget(rmapOpenCommunicationButton, 3, 0, 1, 1); | |
118 | generalParameters_LAYOUT->addWidget(rmapCloseCommunicationButton, 3, 1, 1, 1); |
|
119 | generalParameters_LAYOUT->addWidget(rmapCloseCommunicationButton, 3, 1, 1, 1); | |
119 | generalParameters_LAYOUT->addWidget(RMAP_write_verify, 4, 0, 1, 2); |
|
120 | generalParameters_LAYOUT->addWidget(RMAP_write_verify, 4, 0, 1, 2); | |
120 | generalParameters_LAYOUT->addWidget(RMAP_write_reply, 5, 0, 1, 2); |
|
121 | generalParameters_LAYOUT->addWidget(RMAP_write_reply, 5, 0, 1, 2); | |
121 |
|
122 | |||
122 | generalParameters_LAYOUT->setRowStretch(6, 1); |
|
123 | generalParameters_LAYOUT->setRowStretch(6, 1); | |
123 | generalParameters_LAYOUT->setColumnStretch(2, 1); |
|
124 | generalParameters_LAYOUT->setColumnStretch(2, 1); | |
124 |
|
125 | |||
125 | gresb_GROUPBOX->setLayout(gresbBridge->layout()); |
|
126 | gresb_GROUPBOX->setLayout(gresbBridge->layout()); | |
126 | gresb_GROUPBOX->setVisible(false); |
|
127 | gresb_GROUPBOX->setVisible(false); | |
127 | stardundee_GROUPBOX->setLayout(starDundee->layout()); |
|
128 | stardundee_GROUPBOX->setLayout(starDundee->layout()); | |
128 | stardundee_GROUPBOX->setVisible(false); |
|
129 | stardundee_GROUPBOX->setVisible(false); | |
129 | selection_GROUPBOX->setLayout(bridgeSelection_LAYOUT); |
|
130 | selection_GROUPBOX->setLayout(bridgeSelection_LAYOUT); | |
130 | generalParameters_GROUPBOX->setLayout(generalParameters_LAYOUT); |
|
131 | generalParameters_GROUPBOX->setLayout(generalParameters_LAYOUT); | |
131 | selectionLayout->addWidget(selection_GROUPBOX); |
|
132 | selectionLayout->addWidget(selection_GROUPBOX); | |
132 | selectionLayout->addWidget(generalParameters_GROUPBOX); |
|
133 | selectionLayout->addWidget(generalParameters_GROUPBOX); | |
133 | selectionLayout->addWidget(gresb_GROUPBOX); |
|
134 | selectionLayout->addWidget(gresb_GROUPBOX); | |
134 | selectionLayout->addWidget(stardundee_GROUPBOX); |
|
135 | selectionLayout->addWidget(stardundee_GROUPBOX); | |
135 |
|
136 | |||
136 | //******** |
|
137 | //******** | |
137 | // CONSOLE |
|
138 | // CONSOLE | |
138 | consoleLayout->addWidget(console); |
|
139 | consoleLayout->addWidget(console); | |
139 | consoleLayout->addWidget(clearConsoleButton); |
|
140 | consoleLayout->addWidget(clearConsoleButton); | |
140 | consoleLayout->addWidget(nbPacketInStore); |
|
141 | consoleLayout->addWidget(nbPacketInStore); | |
141 |
|
142 | |||
142 | connect(this->logFileChooseButton, SIGNAL(clicked()), this, SLOT(chooseLogFile())); |
|
143 | connect(this->logFileChooseButton, SIGNAL(clicked()), this, SLOT(chooseLogFile())); | |
143 | connect(this, SIGNAL(setLogFileName(QString)), this->logFileName, SLOT(setText(QString))); |
|
144 | connect(this, SIGNAL(setLogFileName(QString)), this->logFileName, SLOT(setText(QString))); | |
144 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); |
|
145 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); | |
145 |
|
146 | |||
146 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); |
|
147 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); | |
147 | spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); |
|
148 | //spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); | |
148 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); |
|
149 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); | |
149 | spwTabWidget->addTab(spwTabWidgetPage4, tr("TM statistics")); |
|
150 | spwTabWidget->addTab(spwTabWidgetPage4, tr("TM statistics")); | |
|
151 | spwTabWidget->addTab(lfrActions, tr("dashboard")); | |||
150 | //spwTabWidget->addTab(spwTabWidgetPage5, tr("waveforms")); |
|
152 | //spwTabWidget->addTab(spwTabWidgetPage5, tr("waveforms")); | |
151 | spwTabWidget->addTab(spwTabWidgetPage6, tr("TM Echo Bridge")); |
|
153 | spwTabWidget->addTab(spwTabWidgetPage6, tr("TM Echo Bridge")); | |
152 |
|
154 | |||
153 | spwTabWidgetPage0->setLayout(selectionLayout); |
|
155 | spwTabWidgetPage0->setLayout(selectionLayout); | |
154 | spwTabWidgetPage2->setLayout(this->gresbBridge->spwLinkStatusEnquiry->mainLayout); |
|
156 | spwTabWidgetPage2->setLayout(this->gresbBridge->spwLinkStatusEnquiry->mainLayout); | |
155 | spwTabWidgetPage3->setLayout(consoleLayout); |
|
157 | spwTabWidgetPage3->setLayout(consoleLayout); | |
156 | spwTabWidgetPage4->setLayout(tmStatistics->layout()); |
|
158 | spwTabWidgetPage4->setLayout(tmStatistics->layout()); | |
157 | spwTabWidgetPage5->setLayout(wfDisplay->layout()); |
|
159 | spwTabWidgetPage5->setLayout(wfDisplay->layout()); | |
158 | spwTabWidgetPage6->setLayout(tmEchoBridge->layout()); |
|
160 | spwTabWidgetPage6->setLayout(tmEchoBridge->layout()); | |
159 |
|
161 | |||
160 | mainLayout->addWidget(spwTabWidget); |
|
162 | mainLayout->addWidget(spwTabWidget); | |
161 | setLayout(mainLayout); |
|
163 | setLayout(mainLayout); | |
162 |
|
164 | |||
163 | connect(this->clearConsoleButton, SIGNAL(clicked()), this->console, SLOT(clear())); |
|
165 | connect(this->clearConsoleButton, SIGNAL(clicked()), this->console, SLOT(clear())); | |
164 |
|
166 | |||
165 | // briges |
|
167 | // briges | |
166 | connect(this->selectGRESB_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); |
|
168 | connect(this->selectGRESB_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); | |
167 | connect(this->selectStarDundee_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); |
|
169 | connect(this->selectStarDundee_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); | |
168 | connect(this->starDundee, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); |
|
170 | connect(this->starDundee, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); | |
169 | connect(this->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); |
|
171 | connect(this->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); | |
170 |
|
172 | |||
171 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(sourceHasChanged(int))); |
|
173 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(sourceHasChanged(int))); | |
172 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(targetHasChanged(int))); |
|
174 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(targetHasChanged(int))); | |
173 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(sourceHasChanged(int))); |
|
175 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(sourceHasChanged(int))); | |
174 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(targetHasChanged(int))); |
|
176 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(targetHasChanged(int))); | |
175 |
|
177 | |||
176 | // command code |
|
178 | // command code | |
177 | connect(this->RMAP_write_reply, SIGNAL(clicked()), this, SLOT(getCommandCode())); |
|
179 | connect(this->RMAP_write_reply, SIGNAL(clicked()), this, SLOT(getCommandCode())); | |
178 | connect(this->RMAP_write_verify, SIGNAL(clicked()), this, SLOT(getCommandCode())); |
|
180 | connect(this->RMAP_write_verify, SIGNAL(clicked()), this, SLOT(getCommandCode())); | |
179 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), |
|
181 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), | |
180 | this->starDundee, SLOT(commandCodeHasChanged(RMAP_command_codes))); |
|
182 | this->starDundee, SLOT(commandCodeHasChanged(RMAP_command_codes))); | |
181 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), |
|
183 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), | |
182 | this->gresbBridge, SLOT(commandCodeHasChanged(RMAP_command_codes))); |
|
184 | this->gresbBridge, SLOT(commandCodeHasChanged(RMAP_command_codes))); | |
183 |
|
185 | |||
184 | getCommandCode(); // init the command code value |
|
186 | getCommandCode(); // init the command code value | |
185 | rmapSourceLogicalAddressSpinBox->setValue(DEFAULT_SOURCE); |
|
187 | rmapSourceLogicalAddressSpinBox->setValue(DEFAULT_SOURCE); | |
186 | rmapTargetLogicalAddressSpinBox->setValue(DEFAULT_TARGET); |
|
188 | rmapTargetLogicalAddressSpinBox->setValue(DEFAULT_TARGET); | |
187 | } |
|
189 | } | |
188 |
|
190 | |||
189 | rmapPluginUI::~rmapPluginUI() |
|
191 | rmapPluginUI::~rmapPluginUI() | |
190 | { |
|
192 | { | |
191 | //delete ui; |
|
193 | //delete ui; | |
192 | } |
|
194 | } | |
193 |
|
195 | |||
194 | void rmapPluginUI::chooseLogFile() |
|
196 | void rmapPluginUI::chooseLogFile() | |
195 | { |
|
197 | { | |
196 | if(this->logFile->isOpen()) |
|
198 | if(this->logFile->isOpen()) | |
197 | this->logFile->close(); |
|
199 | this->logFile->close(); | |
198 | this->logFile->setFileName(QFileDialog::getSaveFileName(this,tr("Open Log file"), |
|
200 | this->logFile->setFileName(QFileDialog::getSaveFileName(this,tr("Open Log file"), | |
199 | QDir::homePath() |
|
201 | QDir::homePath() | |
200 | + "/" |
|
202 | + "/" | |
201 | + QDate::currentDate().toString() |
|
203 | + QDate::currentDate().toString() | |
202 | + "_" |
|
204 | + "_" | |
203 | + QTime::currentTime().toString() |
|
205 | + QTime::currentTime().toString() | |
204 | + "_rmapPluginUI.log", |
|
206 | + "_rmapPluginUI.log", | |
205 | tr("Log Files (*.txt *.log)"))); |
|
207 | tr("Log Files (*.txt *.log)"))); | |
206 | if(this->logFile->open(QIODevice::WriteOnly)) |
|
208 | if(this->logFile->open(QIODevice::WriteOnly)) | |
207 | { |
|
209 | { | |
208 | this->logFileStrm = new QTextStream(this->logFile); |
|
210 | this->logFileStrm = new QTextStream(this->logFile); | |
209 | emit this->setLogFileName(this->logFile->fileName()); |
|
211 | emit this->setLogFileName(this->logFile->fileName()); | |
210 | } |
|
212 | } | |
211 | } |
|
213 | } | |
212 |
|
214 | |||
213 | void rmapPluginUI::logFileEnDisable(int state) |
|
215 | void rmapPluginUI::logFileEnDisable(int state) | |
214 | { |
|
216 | { | |
215 | if(state==Qt::Checked) |
|
217 | if(state==Qt::Checked) | |
216 | { |
|
218 | { | |
217 | this->logFileEn = true; |
|
219 | this->logFileEn = true; | |
218 | } |
|
220 | } | |
219 | else if(state==Qt::Unchecked) |
|
221 | else if(state==Qt::Unchecked) | |
220 | { |
|
222 | { | |
221 | this->logFileEn = false; |
|
223 | this->logFileEn = false; | |
222 | } |
|
224 | } | |
223 | } |
|
225 | } | |
224 |
|
226 | |||
225 | bool rmapPluginUI::islogfileenable() |
|
227 | bool rmapPluginUI::islogfileenable() | |
226 | { |
|
228 | { | |
227 | return this->logFileEn; |
|
229 | return this->logFileEn; | |
228 | } |
|
230 | } | |
229 |
|
231 | |||
230 | void rmapPluginUI::appendToLogFile(const QString & text) |
|
232 | void rmapPluginUI::appendToLogFile(const QString & text) | |
231 | { |
|
233 | { | |
232 | if(this->logFileEn && this->logFile->isOpen()) |
|
234 | if(this->logFileEn && this->logFile->isOpen()) | |
233 | { |
|
235 | { | |
234 | *(this->logFileStrm) << text << endl; |
|
236 | *(this->logFileStrm) << text << endl; | |
235 | } |
|
237 | } | |
236 | } |
|
238 | } | |
237 |
|
239 | |||
238 | void rmapPluginUI::closeEvent(QCloseEvent *event) |
|
240 | void rmapPluginUI::closeEvent(QCloseEvent *event) | |
239 | { |
|
241 | { | |
240 | if(this->logFile->isOpen()) |
|
242 | if(this->logFile->isOpen()) | |
241 | { |
|
243 | { | |
242 | this->logFileStrm->flush(); |
|
244 | this->logFileStrm->flush(); | |
243 | this->logFile->waitForBytesWritten(3000); |
|
245 | this->logFile->waitForBytesWritten(3000); | |
244 | this->logFile->close(); |
|
246 | this->logFile->close(); | |
245 | } |
|
247 | } | |
246 | event->accept(); |
|
248 | event->accept(); | |
247 | } |
|
249 | } | |
248 |
|
250 | |||
249 | RMAP_command_codes rmapPluginUI::getCommandCode() |
|
251 | RMAP_command_codes rmapPluginUI::getCommandCode() | |
250 | { |
|
252 | { | |
251 | RMAP_command_codes commandCode = invalid0; |
|
253 | RMAP_command_codes commandCode = invalid0; | |
252 | if (RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_rep; |
|
254 | if (RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_rep; | |
253 | if (RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_noRep; |
|
255 | if (RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_noRep; | |
254 | if (!RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_Rep; |
|
256 | if (!RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_Rep; | |
255 | if (!RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_noRep; |
|
257 | if (!RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_noRep; | |
256 | emit commandCodeHasChanged(commandCode); |
|
258 | emit commandCodeHasChanged(commandCode); | |
257 | return commandCode; |
|
259 | return commandCode; | |
258 | } |
|
260 | } | |
259 |
|
261 | |||
260 | // SLOT |
|
262 | // SLOT | |
261 |
|
263 | |||
262 | void rmapPluginUI::selectionBetweenGresbAndStarDundee() //SLOT |
|
264 | void rmapPluginUI::selectionBetweenGresbAndStarDundee() //SLOT | |
263 | { |
|
265 | { | |
264 | if (selectGRESB_BUTTON->isChecked()) |
|
266 | if (selectGRESB_BUTTON->isChecked()) | |
265 | { |
|
267 | { | |
266 | gresb_GROUPBOX->setVisible(true); |
|
268 | gresb_GROUPBOX->setVisible(true); | |
267 | stardundee_GROUPBOX->setVisible(false); |
|
269 | stardundee_GROUPBOX->setVisible(false); | |
268 | rmapOpenCommunicationButton->setEnabled(true); |
|
270 | rmapOpenCommunicationButton->setEnabled(true); | |
269 | emit bridgeHasChanged(selectedBridgeIsGRESB); |
|
271 | emit bridgeHasChanged(selectedBridgeIsGRESB); | |
270 | } |
|
272 | } | |
271 | if (selectStarDundee_BUTTON->isChecked()) |
|
273 | if (selectStarDundee_BUTTON->isChecked()) | |
272 | { |
|
274 | { | |
273 | stardundee_GROUPBOX->setVisible(true); |
|
275 | stardundee_GROUPBOX->setVisible(true); | |
274 | gresb_GROUPBOX->setVisible(false); |
|
276 | gresb_GROUPBOX->setVisible(false); | |
275 | rmapOpenCommunicationButton->setEnabled(true); |
|
277 | rmapOpenCommunicationButton->setEnabled(true); | |
276 | emit bridgeHasChanged(selectedBridgeIsStarDundee); |
|
278 | emit bridgeHasChanged(selectedBridgeIsStarDundee); | |
277 | } |
|
279 | } | |
278 | } |
|
280 | } | |
279 |
|
281 | |||
280 | void rmapPluginUI::isOpen(bool flag) |
|
282 | void rmapPluginUI::isOpen(bool flag) | |
281 | { |
|
283 | { | |
282 | if (flag == true) |
|
284 | if (flag == true) | |
283 | { |
|
285 | { | |
284 | selection_GROUPBOX->setEnabled(false); |
|
286 | selection_GROUPBOX->setEnabled(false); | |
285 | this->rmapOpenCommunicationButton->setEnabled(false); |
|
287 | this->rmapOpenCommunicationButton->setEnabled(false); | |
286 | this->rmapCloseCommunicationButton->setEnabled(true); |
|
288 | this->rmapCloseCommunicationButton->setEnabled(true); | |
287 | } |
|
289 | } | |
288 | if (flag == false) |
|
290 | if (flag == false) | |
289 | { |
|
291 | { | |
290 | selection_GROUPBOX->setEnabled(true); |
|
292 | selection_GROUPBOX->setEnabled(true); | |
291 | this->rmapOpenCommunicationButton->setEnabled(true); |
|
293 | this->rmapOpenCommunicationButton->setEnabled(true); | |
292 | this->rmapCloseCommunicationButton->setEnabled(false); |
|
294 | this->rmapCloseCommunicationButton->setEnabled(false); | |
293 | } |
|
295 | } | |
294 | } |
|
296 | } | |
295 |
|
297 | |||
296 |
|
298 |
@@ -1,166 +1,169 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPPMON Software |
|
2 | -- This file is a part of the LPPMON Software | |
3 | -- Copyright (C) 20011, Laboratory of Plasma Physics - CNRS |
|
3 | -- Copyright (C) 20011, Laboratory of Plasma Physics - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Paul Leroy |
|
19 | /*-- Author : Paul Leroy | |
20 | -- Mail : paul.leroy@lpp.polytechnique.fr |
|
20 | -- Mail : paul.leroy@lpp.polytechnique.fr | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #ifndef RMAPPLUGINUI_H |
|
22 | #ifndef RMAPPLUGINUI_H | |
23 | #define RMAPPLUGINUI_H |
|
23 | #define RMAPPLUGINUI_H | |
24 |
|
24 | |||
25 | #include <QWidget> |
|
25 | #include <QWidget> | |
26 | #include <QPushButton> |
|
26 | #include <QPushButton> | |
27 | #include <QLabel> |
|
27 | #include <QLabel> | |
28 | #include <QSlider> |
|
28 | #include <QSlider> | |
29 | #include <QSpinBox> |
|
29 | #include <QSpinBox> | |
30 | #include <QGridLayout> |
|
30 | #include <QGridLayout> | |
31 | #include <QCheckBox> |
|
31 | #include <QCheckBox> | |
32 | #include <QFile> |
|
32 | #include <QFile> | |
33 | #include <QTextStream> |
|
33 | #include <QTextStream> | |
34 | #include <QFileDialog> |
|
34 | #include <QFileDialog> | |
35 | #include <QDir> |
|
35 | #include <QDir> | |
36 | #include <QDialog> |
|
36 | #include <QDialog> | |
37 | #include <QCloseEvent> |
|
37 | #include <QCloseEvent> | |
38 | #include <QTabWidget> |
|
38 | #include <QTabWidget> | |
39 | #include <QTextEdit> |
|
39 | #include <QTextEdit> | |
40 | #include <QRadioButton> |
|
40 | #include <QRadioButton> | |
41 | #include <QGroupBox> |
|
41 | #include <QGroupBox> | |
42 |
|
42 | |||
43 | #include <rmapoperations.h> |
|
43 | #include <rmapoperations.h> | |
44 | #include <gresbstatusenquiry.h> |
|
44 | #include <gresbstatusenquiry.h> | |
45 | #include <stardundee.h> |
|
45 | #include <stardundee.h> | |
46 | #include <gresb.h> |
|
46 | #include <gresb.h> | |
47 | #include <wfdisplay.h> |
|
47 | #include <wfdisplay.h> | |
|
48 | #include <parameterdump.h> | |||
48 |
|
49 | |||
49 | #include "qipdialogbox.h" |
|
50 | #include "qipdialogbox.h" | |
50 | #include "tmstatistics.h" |
|
51 | #include "tmstatistics.h" | |
51 | #include "tmechobridge.h" |
|
52 | #include "tmechobridge.h" | |
|
53 | #include "entermode.h" | |||
|
54 | #include "lfractions.h" | |||
52 |
|
55 | |||
53 | enum selectedBridge{ |
|
56 | enum selectedBridge{ | |
54 | selectedBridgeIsUnknown, |
|
57 | selectedBridgeIsUnknown, | |
55 | selectedBridgeIsGRESB, |
|
58 | selectedBridgeIsGRESB, | |
56 | selectedBridgeIsStarDundee |
|
59 | selectedBridgeIsStarDundee | |
57 | }; |
|
60 | }; | |
58 |
|
61 | |||
59 | class rmapPluginUI : public QWidget |
|
62 | class rmapPluginUI : public QWidget | |
60 | { |
|
63 | { | |
61 | Q_OBJECT |
|
64 | Q_OBJECT | |
62 |
|
65 | |||
63 | public: |
|
66 | public: | |
64 | explicit rmapPluginUI(QWidget *parent = 0); |
|
67 | explicit rmapPluginUI(QWidget *parent = 0); | |
65 | ~rmapPluginUI(); |
|
68 | ~rmapPluginUI(); | |
66 |
|
69 | |||
67 | QPushButton* rmapOpenCommunicationButton; |
|
70 | QPushButton* rmapOpenCommunicationButton; | |
68 | QPushButton* rmapCloseCommunicationButton; |
|
71 | QPushButton* rmapCloseCommunicationButton; | |
69 | QPushButton* logFileChooseButton; |
|
72 | QPushButton* logFileChooseButton; | |
70 | QPushButton* gresbStatusQueryRetryButton; |
|
73 | QPushButton* gresbStatusQueryRetryButton; | |
71 | QPushButton* gresbStatusQueryAbortButton; |
|
74 | QPushButton* gresbStatusQueryAbortButton; | |
72 | QPushButton* sendCCSDSCommandButton; |
|
75 | QPushButton* sendCCSDSCommandButton; | |
73 | QPushButton* send_TC_LFR_UPDATE_TIME_Button; |
|
76 | QPushButton* send_TC_LFR_UPDATE_TIME_Button; | |
74 | QPushButton* reset_TC_LFR_UPDATE_TIME_Button; |
|
77 | QPushButton* reset_TC_LFR_UPDATE_TIME_Button; | |
75 | QPushButton* clearConsoleButton; |
|
78 | QPushButton* clearConsoleButton; | |
76 |
|
79 | |||
77 | QRadioButton* selectGRESB_BUTTON; |
|
80 | QRadioButton* selectGRESB_BUTTON; | |
78 | QRadioButton* selectStarDundee_BUTTON; |
|
81 | QRadioButton* selectStarDundee_BUTTON; | |
79 |
|
82 | |||
80 | QGroupBox *selection_GROUPBOX; |
|
83 | QGroupBox *selection_GROUPBOX; | |
81 |
|
84 | |||
82 | QSpinBox* gresbVirtualLinkSpinBox; |
|
85 | QSpinBox* gresbVirtualLinkSpinBox; | |
83 | QSpinBox* spwLinkSpinBox; |
|
86 | QSpinBox* spwLinkSpinBox; | |
84 | QSpinBox* rmapSourceLogicalAddressSpinBox; |
|
87 | QSpinBox* rmapSourceLogicalAddressSpinBox; | |
85 | QSpinBox* rmapTargetLogicalAddressSpinBox; |
|
88 | QSpinBox* rmapTargetLogicalAddressSpinBox; | |
86 | QSpinBox* CCSDSTargetLogicalAddressSpinBox; |
|
89 | QSpinBox* CCSDSTargetLogicalAddressSpinBox; | |
87 |
|
90 | |||
88 | QCheckBox *logEnableCheckBox; |
|
91 | QCheckBox *logEnableCheckBox; | |
89 | QCheckBox *RMAP_write_verify; |
|
92 | QCheckBox *RMAP_write_verify; | |
90 | QCheckBox *RMAP_write_reply; |
|
93 | QCheckBox *RMAP_write_reply; | |
91 |
|
94 | |||
92 | QLabel* rmapSendStateLabel; |
|
95 | QLabel* rmapSendStateLabel; | |
93 | QLabel* rmapReceiveStateLabel; |
|
96 | QLabel* rmapReceiveStateLabel; | |
94 | QLabel* gresbStatusQueryLabel; |
|
97 | QLabel* gresbStatusQueryLabel; | |
95 | QLabel* gresbStatusQueryDialogLabel; |
|
98 | QLabel* gresbStatusQueryDialogLabel; | |
96 | QLabel* sendCCSDSCommandLabel; |
|
99 | QLabel* sendCCSDSCommandLabel; | |
97 | QLabel* nbPacketInStore; |
|
100 | QLabel* nbPacketInStore; | |
98 |
|
101 | |||
99 | QDialog* gresbStatusQueryDialog; |
|
102 | QDialog* gresbStatusQueryDialog; | |
100 |
|
103 | |||
101 | QTextEdit* console; |
|
104 | QTextEdit* console; | |
102 |
|
105 | |||
103 | WFDisplay* wfDisplay; |
|
106 | WFDisplay* wfDisplay; | |
104 |
|
||||
105 | TMStatistics* tmStatistics; |
|
107 | TMStatistics* tmStatistics; | |
|
108 | LFRActions* lfrActions; | |||
106 |
|
109 | |||
107 | // SPACEWIRE BRIDGES |
|
110 | // SPACEWIRE BRIDGES | |
108 | StarDundee *starDundee; |
|
111 | StarDundee *starDundee; | |
109 | gresb *gresbBridge; |
|
112 | gresb *gresbBridge; | |
110 |
|
113 | |||
111 | // TM Echo Bridge |
|
114 | // TM Echo Bridge | |
112 | TMEchoBridge * tmEchoBridge; |
|
115 | TMEchoBridge * tmEchoBridge; | |
113 |
|
116 | |||
114 | bool islogfileenable(); |
|
117 | bool islogfileenable(); | |
115 | void appendToLogFile(const QString & text); |
|
118 | void appendToLogFile(const QString & text); | |
116 | void closeEvent(QCloseEvent *event); |
|
119 | void closeEvent(QCloseEvent *event); | |
117 |
|
120 | |||
118 | public slots: |
|
121 | public slots: | |
119 | void chooseLogFile(); |
|
122 | void chooseLogFile(); | |
120 | void logFileEnDisable(int state); |
|
123 | void logFileEnDisable(int state); | |
121 | RMAP_command_codes getCommandCode(); |
|
124 | RMAP_command_codes getCommandCode(); | |
122 |
|
125 | |||
123 | private slots: |
|
126 | private slots: | |
124 | void selectionBetweenGresbAndStarDundee(); |
|
127 | void selectionBetweenGresbAndStarDundee(); | |
125 | void isOpen(bool flag); |
|
128 | void isOpen(bool flag); | |
126 |
|
129 | |||
127 | signals: |
|
130 | signals: | |
128 | void connectPortsig(QString PortName,int baudrate); |
|
131 | void connectPortsig(QString PortName,int baudrate); | |
129 | void setLogFileName(QString FileName); |
|
132 | void setLogFileName(QString FileName); | |
130 | void commandCodeHasChanged(RMAP_command_codes commandCode); |
|
133 | void commandCodeHasChanged(RMAP_command_codes commandCode); | |
131 | void bridgeHasChanged(selectedBridge bridge); |
|
134 | void bridgeHasChanged(selectedBridge bridge); | |
132 | void targetHasChanged(unsigned char target); |
|
135 | void targetHasChanged(unsigned char target); | |
133 | void sourceHasChanged(unsigned char source); |
|
136 | void sourceHasChanged(unsigned char source); | |
134 |
|
137 | |||
135 | private: |
|
138 | private: | |
136 | QLabel *gresbBridgeIPLabel; |
|
139 | QLabel *gresbBridgeIPLabel; | |
137 | QLabel *gresbVirtualLinkLabel; |
|
140 | QLabel *gresbVirtualLinkLabel; | |
138 | QLabel *spwLinkLabel; |
|
141 | QLabel *spwLinkLabel; | |
139 | QLabel *rmapSourceLogicalAddressLabel; |
|
142 | QLabel *rmapSourceLogicalAddressLabel; | |
140 | QLabel *rmapTargetLogicalAddressLabel; |
|
143 | QLabel *rmapTargetLogicalAddressLabel; | |
141 | QLabel *logFileName; |
|
144 | QLabel *logFileName; | |
142 |
|
145 | |||
143 | QGridLayout *bridgeSelection_LAYOUT; |
|
146 | QGridLayout *bridgeSelection_LAYOUT; | |
144 | QGridLayout *connectionLayout; |
|
147 | QGridLayout *connectionLayout; | |
145 | QGridLayout *gresbStatusQueryDialogLayout; |
|
148 | QGridLayout *gresbStatusQueryDialogLayout; | |
146 | QGridLayout *generalParameters_LAYOUT; |
|
149 | QGridLayout *generalParameters_LAYOUT; | |
147 | QVBoxLayout *selectionLayout; |
|
150 | QVBoxLayout *selectionLayout; | |
148 | QVBoxLayout *mainLayout; |
|
151 | QVBoxLayout *mainLayout; | |
149 | QVBoxLayout *ccsdsLayout; |
|
152 | QVBoxLayout *ccsdsLayout; | |
150 | QVBoxLayout *consoleLayout; |
|
153 | QVBoxLayout *consoleLayout; | |
151 |
|
154 | |||
152 | QTabWidget *spwTabWidget; |
|
155 | QTabWidget *spwTabWidget; | |
153 |
|
156 | |||
154 | QWidget* bridgeWidget; |
|
157 | QWidget* bridgeWidget; | |
155 |
|
158 | |||
156 | QGroupBox *gresb_GROUPBOX; |
|
159 | QGroupBox *gresb_GROUPBOX; | |
157 | QGroupBox *stardundee_GROUPBOX; |
|
160 | QGroupBox *stardundee_GROUPBOX; | |
158 | QGroupBox *generalParameters_GROUPBOX; |
|
161 | QGroupBox *generalParameters_GROUPBOX; | |
159 |
|
162 | |||
160 | QFile *logFile; |
|
163 | QFile *logFile; | |
161 | QTextStream *logFileStrm; |
|
164 | QTextStream *logFileStrm; | |
162 | bool logFileEn; |
|
165 | bool logFileEn; | |
163 |
|
166 | |||
164 | }; |
|
167 | }; | |
165 |
|
168 | |||
166 | #endif // RMAPPLUGINUI_H |
|
169 | #endif // RMAPPLUGINUI_H |
@@ -1,659 +1,749 | |||||
1 | #include "tmstatistics.h" |
|
1 | #include "tmstatistics.h" | |
2 | #include <QtGui> |
|
2 | #include <QtGui> | |
3 | #include <QFontInfo> |
|
3 | #include <QFontInfo> | |
|
4 | #include <stdio.h> | |||
4 |
|
5 | |||
5 | TMStatistics::TMStatistics(QWidget *parent) : |
|
6 | TMStatistics::TMStatistics(QWidget *parent) : | |
6 | QWidget(parent) |
|
7 | QWidget(parent) | |
7 | { |
|
8 | { | |
8 | // Create Fonts |
|
9 | // Create Fonts | |
9 | QFont font; |
|
10 | QFont font; | |
10 | font = QFont(this->fontInfo().family(), STATISTICS_FONT_SIZE, QFont::Light); |
|
11 | font = QFont(this->fontInfo().family(), STATISTICS_FONT_SIZE, QFont::Light); | |
11 |
|
12 | |||
12 | label_UNKNOWN = new QLabel("UNKNOWN"); |
|
13 | label_UNKNOWN = new QLabel("UNKNOWN"); | |
13 | label_UNKNOWN_nb = new QLabel("-"); |
|
14 | label_UNKNOWN_nb = new QLabel("-"); | |
14 |
|
15 | |||
15 | mainLayout = new QGridLayout(); |
|
16 | mainLayout = new QGridLayout(); | |
16 | layout_stat = new QGridLayout(); // TM stastictics |
|
17 | layout_stat = new QGridLayout(); // TM stastictics | |
17 | layout_NORM = new QGridLayout(); // TM_LFR_SCIENCE_NORMAL_ |
|
18 | layout_NORM = new QGridLayout(); // TM_LFR_SCIENCE_NORMAL_ | |
18 | layout_BURST = new QGridLayout(); // TM_LFR_SCIENCE_BURST_ |
|
19 | layout_BURST = new QGridLayout(); // TM_LFR_SCIENCE_BURST_ | |
19 | layout_SBM1 = new QGridLayout(); // TM_LFR_SCIENCE_SBM1_ |
|
20 | layout_SBM1 = new QGridLayout(); // TM_LFR_SCIENCE_SBM1_ | |
20 | layout_SBM2 = new QGridLayout(); // TM_LFR_SCIENCE_SBM2_ |
|
21 | layout_SBM2 = new QGridLayout(); // TM_LFR_SCIENCE_SBM2_ | |
21 | layout_last = new QGridLayout(); // last TM description |
|
22 | layout_last = new QGridLayout(); // last TM description | |
|
23 | layout_record = new QVBoxLayout(); | |||
22 |
|
24 | |||
23 | //*************** |
|
25 | //*************** | |
24 | // TM_LFR_TC_EXE_ |
|
26 | // TM_LFR_TC_EXE_ | |
25 | label_SUCC = new QLabel("SUCCESS"); |
|
27 | label_SUCC = new QLabel("SUCCESS"); | |
26 | label_INCO = new QLabel("INCONSISTENT"); |
|
28 | label_INCO = new QLabel("INCONSISTENT"); | |
27 | label_NOTE = new QLabel("NOT_EXECUTABLE"); |
|
29 | label_NOTE = new QLabel("NOT_EXECUTABLE"); | |
28 | label_NOTI = new QLabel("NOT_IMPLEMENTED"); |
|
30 | label_NOTI = new QLabel("NOT_IMPLEMENTED"); | |
29 | label_ERRO = new QLabel("ERROR"); |
|
31 | label_ERRO = new QLabel("ERROR"); | |
30 | label_CORR = new QLabel("CORRUPTED"); |
|
32 | label_CORR = new QLabel("CORRUPTED"); | |
31 | label_HK = new QLabel("TM_LFR_HK"); |
|
33 | label_HK = new QLabel("TM_LFR_HK"); | |
32 | label_DUMP = new QLabel("TM_LFR_PARAMETER_DUMP"); |
|
34 | label_DUMP = new QLabel("TM_LFR_PARAMETER_DUMP"); | |
33 | // |
|
35 | // | |
34 | label_SUCC_nb = new QLabel("-"); |
|
36 | label_SUCC_nb = new QLabel("-"); | |
35 | label_INCO_nb = new QLabel("-"); |
|
37 | label_INCO_nb = new QLabel("-"); | |
36 | label_NOTE_nb = new QLabel("-"); |
|
38 | label_NOTE_nb = new QLabel("-"); | |
37 | label_NOTI_nb = new QLabel("-"); |
|
39 | label_NOTI_nb = new QLabel("-"); | |
38 | label_ERRO_nb = new QLabel("-"); |
|
40 | label_ERRO_nb = new QLabel("-"); | |
39 | label_CORR_nb = new QLabel("-"); |
|
41 | label_CORR_nb = new QLabel("-"); | |
40 | label_HK_nb = new QLabel("-"); |
|
42 | label_HK_nb = new QLabel("-"); | |
41 | label_DUMP_nb = new QLabel("-"); |
|
43 | label_DUMP_nb = new QLabel("-"); | |
42 |
|
44 | |||
43 | //*********************** |
|
45 | //*********************** | |
44 | // TM_LFR_SCIENCE_NORMAL_ |
|
46 | // TM_LFR_SCIENCE_NORMAL_ | |
45 | label_NORM_SWF_F0 = new QLabel("SWF_F0"); |
|
47 | label_NORM_SWF_F0 = new QLabel("SWF_F0"); | |
46 | label_NORM_SWF_F1 = new QLabel("SWF_F1"); |
|
48 | label_NORM_SWF_F1 = new QLabel("SWF_F1"); | |
47 | label_NORM_SWF_F2 = new QLabel("SWF_F2"); |
|
49 | label_NORM_SWF_F2 = new QLabel("SWF_F2"); | |
48 | label_NORM_CWF_F3 = new QLabel("CWF_F3"); |
|
50 | label_NORM_CWF_F3 = new QLabel("CWF_F3"); | |
49 | label_NORM_ASM_F0 = new QLabel("ASM_F0"); |
|
51 | label_NORM_ASM_F0 = new QLabel("ASM_F0"); | |
50 | label_NORM_ASM_F1 = new QLabel("ASM_F1"); |
|
52 | label_NORM_ASM_F1 = new QLabel("ASM_F1"); | |
51 | label_NORM_ASM_F2 = new QLabel("ASM_F2"); |
|
53 | label_NORM_ASM_F2 = new QLabel("ASM_F2"); | |
52 | label_NORM_BP1_F0 = new QLabel("BP1_F0"); |
|
54 | label_NORM_BP1_F0 = new QLabel("BP1_F0"); | |
53 | label_NORM_BP1_F1 = new QLabel("BP1_F1"); |
|
55 | label_NORM_BP1_F1 = new QLabel("BP1_F1"); | |
54 | label_NORM_BP1_F2 = new QLabel("BP1_F2"); |
|
56 | label_NORM_BP1_F2 = new QLabel("BP1_F2"); | |
55 | label_NORM_BP2_F0 = new QLabel("BP2_F0"); |
|
57 | label_NORM_BP2_F0 = new QLabel("BP2_F0"); | |
56 | label_NORM_BP2_F1 = new QLabel("BP2_F1"); |
|
58 | label_NORM_BP2_F1 = new QLabel("BP2_F1"); | |
57 | label_NORM_BP2_F2 = new QLabel("BP2_F2"); |
|
59 | label_NORM_BP2_F2 = new QLabel("BP2_F2"); | |
58 | // |
|
60 | // | |
59 | label_NORM_SWF_F0_nb = new QLabel("-"); |
|
61 | label_NORM_SWF_F0_nb = new QLabel("-"); | |
60 | label_NORM_SWF_F1_nb = new QLabel("-"); |
|
62 | label_NORM_SWF_F1_nb = new QLabel("-"); | |
61 | label_NORM_SWF_F2_nb = new QLabel("-"); |
|
63 | label_NORM_SWF_F2_nb = new QLabel("-"); | |
62 | label_NORM_CWF_F3_nb = new QLabel("-"); |
|
64 | label_NORM_CWF_F3_nb = new QLabel("-"); | |
63 | label_NORM_ASM_F0_nb = new QLabel("-"); |
|
65 | label_NORM_ASM_F0_nb = new QLabel("-"); | |
64 | label_NORM_ASM_F1_nb = new QLabel("-"); |
|
66 | label_NORM_ASM_F1_nb = new QLabel("-"); | |
65 | label_NORM_ASM_F2_nb = new QLabel("-"); |
|
67 | label_NORM_ASM_F2_nb = new QLabel("-"); | |
66 | label_NORM_BP1_F0_nb = new QLabel("-"); |
|
68 | label_NORM_BP1_F0_nb = new QLabel("-"); | |
67 | label_NORM_BP1_F1_nb = new QLabel("-"); |
|
69 | label_NORM_BP1_F1_nb = new QLabel("-"); | |
68 | label_NORM_BP1_F2_nb = new QLabel("-"); |
|
70 | label_NORM_BP1_F2_nb = new QLabel("-"); | |
69 | label_NORM_BP2_F0_nb = new QLabel("-"); |
|
71 | label_NORM_BP2_F0_nb = new QLabel("-"); | |
70 | label_NORM_BP2_F1_nb = new QLabel("-"); |
|
72 | label_NORM_BP2_F1_nb = new QLabel("-"); | |
71 | label_NORM_BP2_F2_nb = new QLabel("-"); |
|
73 | label_NORM_BP2_F2_nb = new QLabel("-"); | |
72 |
|
74 | |||
73 | //********************** |
|
75 | //********************** | |
74 | // TM_LFR_SCIENCE_BURST_ |
|
76 | // TM_LFR_SCIENCE_BURST_ | |
75 | label_BURST_CWF_F2 = new QLabel("CWF_F2"); |
|
77 | label_BURST_CWF_F2 = new QLabel("CWF_F2"); | |
76 | label_BURST_BP1_F0 = new QLabel("BP1_F0"); |
|
78 | label_BURST_BP1_F0 = new QLabel("BP1_F0"); | |
77 | label_BURST_BP2_F0 = new QLabel("BP2_F0"); |
|
79 | label_BURST_BP2_F0 = new QLabel("BP2_F0"); | |
78 | label_BURST_BP1_F1 = new QLabel("BP1_F1"); |
|
80 | label_BURST_BP1_F1 = new QLabel("BP1_F1"); | |
79 | label_BURST_BP2_F1 = new QLabel("BP2_F1"); |
|
81 | label_BURST_BP2_F1 = new QLabel("BP2_F1"); | |
80 | // |
|
82 | // | |
81 | label_BURST_CWF_F2_nb = new QLabel("-"); |
|
83 | label_BURST_CWF_F2_nb = new QLabel("-"); | |
82 | label_BURST_BP1_F0_nb = new QLabel("-"); |
|
84 | label_BURST_BP1_F0_nb = new QLabel("-"); | |
83 | label_BURST_BP2_F0_nb = new QLabel("-"); |
|
85 | label_BURST_BP2_F0_nb = new QLabel("-"); | |
84 | label_BURST_BP1_F1_nb = new QLabel("-"); |
|
86 | label_BURST_BP1_F1_nb = new QLabel("-"); | |
85 | label_BURST_BP2_F1_nb = new QLabel("-"); |
|
87 | label_BURST_BP2_F1_nb = new QLabel("-"); | |
86 |
|
88 | |||
87 | //********************* |
|
89 | //********************* | |
88 | // TM_LFR_SCIENCE_SBM1_ |
|
90 | // TM_LFR_SCIENCE_SBM1_ | |
89 | label_SBM1_CWF_F1 = new QLabel("CWF_F1"); |
|
91 | label_SBM1_CWF_F1 = new QLabel("CWF_F1"); | |
90 | label_SBM1_BP1_F0 = new QLabel("BP1_F0"); |
|
92 | label_SBM1_BP1_F0 = new QLabel("BP1_F0"); | |
91 | label_SBM1_BP2_F0 = new QLabel("BP2_F0"); |
|
93 | label_SBM1_BP2_F0 = new QLabel("BP2_F0"); | |
92 | // |
|
94 | // | |
93 | label_SBM1_CWF_F1_nb = new QLabel("-"); |
|
95 | label_SBM1_CWF_F1_nb = new QLabel("-"); | |
94 | label_SBM1_BP1_F0_nb = new QLabel("-"); |
|
96 | label_SBM1_BP1_F0_nb = new QLabel("-"); | |
95 | label_SBM1_BP2_F0_nb = new QLabel("-"); |
|
97 | label_SBM1_BP2_F0_nb = new QLabel("-"); | |
96 |
|
98 | |||
97 | //********************* |
|
99 | //********************* | |
98 | // TM_LFR_SCIENCE_SBM2_ |
|
100 | // TM_LFR_SCIENCE_SBM2_ | |
99 | label_SBM2_CWF_F2 = new QLabel("CWF_F2"); |
|
101 | label_SBM2_CWF_F2 = new QLabel("CWF_F2"); | |
100 | label_SBM2_BP1_F0 = new QLabel("BP1_F0"); |
|
102 | label_SBM2_BP1_F0 = new QLabel("BP1_F0"); | |
101 | label_SBM2_BP2_F0 = new QLabel("BP2_F0"); |
|
103 | label_SBM2_BP2_F0 = new QLabel("BP2_F0"); | |
102 | label_SBM2_BP1_F1 = new QLabel("BP1_F1"); |
|
104 | label_SBM2_BP1_F1 = new QLabel("BP1_F1"); | |
103 | label_SBM2_BP2_F1 = new QLabel("BP2_F1"); |
|
105 | label_SBM2_BP2_F1 = new QLabel("BP2_F1"); | |
104 | // |
|
106 | // | |
105 | label_SBM2_CWF_F2_nb = new QLabel("-"); |
|
107 | label_SBM2_CWF_F2_nb = new QLabel("-"); | |
106 | label_SBM2_BP1_F0_nb = new QLabel("-"); |
|
108 | label_SBM2_BP1_F0_nb = new QLabel("-"); | |
107 | label_SBM2_BP2_F0_nb = new QLabel("-"); |
|
109 | label_SBM2_BP2_F0_nb = new QLabel("-"); | |
108 | label_SBM2_BP1_F1_nb = new QLabel("-"); |
|
110 | label_SBM2_BP1_F1_nb = new QLabel("-"); | |
109 | label_SBM2_BP2_F1_nb = new QLabel("-"); |
|
111 | label_SBM2_BP2_F1_nb = new QLabel("-"); | |
110 |
|
112 | |||
111 | //******** |
|
113 | //******** | |
112 | // LAST TM |
|
114 | // LAST TM | |
113 | label_PID = new QLabel("PID"); |
|
115 | label_PID = new QLabel("PID"); | |
114 | label_CAT = new QLabel("CAT"); |
|
116 | label_CAT = new QLabel("CAT"); | |
115 | label_TYP = new QLabel("Type"); |
|
117 | label_TYP = new QLabel("Type"); | |
116 | label_SUB = new QLabel("Subtype"); |
|
118 | label_SUB = new QLabel("Subtype"); | |
117 | label_SID = new QLabel("SID"); |
|
119 | label_SID = new QLabel("SID"); | |
118 | label_SIZ = new QLabel("Length"); |
|
120 | label_SIZ = new QLabel("Length"); | |
119 | label_coarse_time = new QLabel("Coarse time: "); |
|
121 | label_coarse_time = new QLabel("Coarse time: "); | |
120 | label_fine_time = new QLabel("Fine time: "); |
|
122 | label_fine_time = new QLabel("Fine time: "); | |
121 | // |
|
123 | // | |
122 | label_PID_is = new QLabel("-"); |
|
124 | label_PID_is = new QLabel("-"); | |
123 | label_CAT_is = new QLabel("-"); |
|
125 | label_CAT_is = new QLabel("-"); | |
124 | label_TYP_is = new QLabel("-"); |
|
126 | label_TYP_is = new QLabel("-"); | |
125 | label_SUB_is = new QLabel("-"); |
|
127 | label_SUB_is = new QLabel("-"); | |
126 | label_SID_is = new QLabel("-"); |
|
128 | label_SID_is = new QLabel("-"); | |
127 | label_SIZ_is = new QLabel("-"); |
|
129 | label_SIZ_is = new QLabel("-"); | |
128 | label_coarse_time_val = new QLabel("-"); |
|
130 | label_coarse_time_val = new QLabel("-"); | |
129 | label_fine_time_val = new QLabel("-"); |
|
131 | label_fine_time_val = new QLabel("-"); | |
130 |
|
132 | |||
131 | // QPushButton |
|
133 | // QPushButton | |
132 | button_reset_stat = new QPushButton("reset stat"); |
|
134 | button_reset_stat = new QPushButton("reset stat"); | |
|
135 | button_record = new QPushButton("REC"); | |||
|
136 | button_chooseDir = new QPushButton("choose dir"); | |||
133 |
|
137 | |||
134 | //********** |
|
138 | //********** | |
135 | // QGroupBox |
|
139 | // QGroupBox | |
136 | this->setStyleSheet("QGroupBox {border: 1px solid black; }"); |
|
140 | this->setStyleSheet("QGroupBox {border: 1px solid black; }"); | |
137 |
|
141 | |||
138 | groupbox_stat = new QGroupBox("TM_LFR_TC_EXE_"); |
|
142 | groupbox_stat = new QGroupBox("TM_LFR_TC_EXE_"); | |
139 | groupbox_NORM = new QGroupBox("TM_LFR_SCIENCE_NORMAL_"); |
|
143 | groupbox_NORM = new QGroupBox("TM_LFR_SCIENCE_NORMAL_"); | |
140 | groupbox_BURST = new QGroupBox("TM_LFR_SCIENCE_BURST_"); |
|
144 | groupbox_BURST = new QGroupBox("TM_LFR_SCIENCE_BURST_"); | |
141 | groupbox_SBM1 = new QGroupBox("TM_LFR_SCIENCE_SBM1_"); |
|
145 | groupbox_SBM1 = new QGroupBox("TM_LFR_SCIENCE_SBM1_"); | |
142 | groupbox_SBM2 = new QGroupBox("TM_LFR_SCIENCE_SBM2_"); |
|
146 | groupbox_SBM2 = new QGroupBox("TM_LFR_SCIENCE_SBM2_"); | |
143 | groupbox_last = new QGroupBox("Last TM received"); |
|
147 | groupbox_last = new QGroupBox("Last TM received"); | |
|
148 | groupbox_record = new QGroupBox("Packet recording"); | |||
144 |
|
149 | |||
145 | groupbox_stat->setFont(font); |
|
150 | groupbox_stat->setFont(font); | |
146 | groupbox_NORM->setFont(font); |
|
151 | groupbox_NORM->setFont(font); | |
147 | groupbox_BURST->setFont(font); |
|
152 | groupbox_BURST->setFont(font); | |
148 | groupbox_SBM1->setFont(font); |
|
153 | groupbox_SBM1->setFont(font); | |
149 | groupbox_SBM2->setFont(font); |
|
154 | groupbox_SBM2->setFont(font); | |
150 | groupbox_last->setFont(font); |
|
155 | groupbox_last->setFont(font); | |
|
156 | groupbox_record->setFont(font); | |||
|
157 | ||||
|
158 | readSettings(); | |||
|
159 | logFile = new QFile(); | |||
|
160 | logFileEn = false; | |||
151 |
|
161 | |||
152 | initConstants(); |
|
162 | initConstants(); | |
153 |
|
163 | |||
154 | buildMonitor_NORM(); |
|
164 | buildMonitor_NORM(); | |
155 | buildMonitor_BURST(); |
|
165 | buildMonitor_BURST(); | |
156 | buildMonitor_SBM1(); |
|
166 | buildMonitor_SBM1(); | |
157 | buildMonitor_SBM2(); |
|
167 | buildMonitor_SBM2(); | |
158 | buildMonitor(); |
|
168 | buildMonitor(); | |
159 |
|
169 | |||
160 | connect(this->button_reset_stat, SIGNAL(clicked()), this, SLOT(resetStatistics())); |
|
170 | connect(this->button_reset_stat, SIGNAL(clicked()), this, SLOT(resetStatistics())); | |
161 |
|
171 | connect(this->button_record, SIGNAL(clicked()), this, SLOT(storePackets())); | ||
|
172 | connect(this->button_chooseDir, SIGNAL(clicked()), this, SLOT(chooseDir())); | |||
162 | } |
|
173 | } | |
163 |
|
174 | |||
164 | void TMStatistics::initConstants() |
|
175 | void TMStatistics::initConstants() | |
165 | { |
|
176 | { | |
166 | UNKNOWN_nb = 0; |
|
177 | UNKNOWN_nb = 0; | |
167 |
|
178 | |||
168 | // TM_LFR_TC_EXE_ |
|
179 | // TM_LFR_TC_EXE_ | |
169 | SUCC_nb = 0; |
|
180 | SUCC_nb = 0; | |
170 | INCO_nb = 0; |
|
181 | INCO_nb = 0; | |
171 | NOTE_nb = 0; |
|
182 | NOTE_nb = 0; | |
172 | NOTI_nb = 0; |
|
183 | NOTI_nb = 0; | |
173 | ERRO_nb = 0; |
|
184 | ERRO_nb = 0; | |
174 | CORR_nb = 0; |
|
185 | CORR_nb = 0; | |
175 | HK_nb = 0; |
|
186 | HK_nb = 0; | |
176 | DUMP_nb = 0; |
|
187 | DUMP_nb = 0; | |
177 |
|
188 | |||
178 | // TM_LFR_SCIENCE_NORMAL_ |
|
189 | // TM_LFR_SCIENCE_NORMAL_ | |
179 | NORM_SWF_F0_nb = 0; |
|
190 | NORM_SWF_F0_nb = 0; | |
180 | NORM_SWF_F1_nb = 0; |
|
191 | NORM_SWF_F1_nb = 0; | |
181 | NORM_SWF_F2_nb = 0; |
|
192 | NORM_SWF_F2_nb = 0; | |
182 | NORM_CWF_F3_nb = 0; |
|
193 | NORM_CWF_F3_nb = 0; | |
183 | NORM_ASM_F0_nb = 0; |
|
194 | NORM_ASM_F0_nb = 0; | |
184 | NORM_ASM_F1_nb = 0; |
|
195 | NORM_ASM_F1_nb = 0; | |
185 | NORM_ASM_F2_nb = 0; |
|
196 | NORM_ASM_F2_nb = 0; | |
186 | NORM_BP1_F0_nb = 0; |
|
197 | NORM_BP1_F0_nb = 0; | |
187 | NORM_BP1_F1_nb = 0; |
|
198 | NORM_BP1_F1_nb = 0; | |
188 | NORM_BP1_F2_nb = 0; |
|
199 | NORM_BP1_F2_nb = 0; | |
189 | NORM_BP2_F0_nb = 0; |
|
200 | NORM_BP2_F0_nb = 0; | |
190 | NORM_BP2_F1_nb = 0; |
|
201 | NORM_BP2_F1_nb = 0; | |
191 | NORM_BP2_F2_nb = 0; |
|
202 | NORM_BP2_F2_nb = 0; | |
192 |
|
203 | |||
193 | BURST_CWF_F2_nb = 0; |
|
204 | BURST_CWF_F2_nb = 0; | |
194 | BURST_BP1_F0_nb = 0; |
|
205 | BURST_BP1_F0_nb = 0; | |
195 | BURST_BP2_F0_nb = 0; |
|
206 | BURST_BP2_F0_nb = 0; | |
196 | BURST_BP1_F1_nb = 0; |
|
207 | BURST_BP1_F1_nb = 0; | |
197 | BURST_BP2_F1_nb = 0; |
|
208 | BURST_BP2_F1_nb = 0; | |
198 | SBM1_CWF_F1_nb = 0; |
|
209 | SBM1_CWF_F1_nb = 0; | |
199 | SBM1_BP1_F0_nb = 0; |
|
210 | SBM1_BP1_F0_nb = 0; | |
200 | SBM1_BP2_F0_nb = 0; |
|
211 | SBM1_BP2_F0_nb = 0; | |
201 | SBM2_CWF_F2_nb = 0; |
|
212 | SBM2_CWF_F2_nb = 0; | |
202 | SBM2_BP1_F0_nb = 0; |
|
213 | SBM2_BP1_F0_nb = 0; | |
203 | SBM2_BP2_F0_nb = 0; |
|
214 | SBM2_BP2_F0_nb = 0; | |
204 | SBM2_BP1_F1_nb = 0; |
|
215 | SBM2_BP1_F1_nb = 0; | |
205 | SBM2_BP2_F1_nb = 0; |
|
216 | SBM2_BP2_F1_nb = 0; | |
206 | } |
|
217 | } | |
207 |
|
218 | |||
208 | void TMStatistics::buildMonitor_NORM() |
|
219 | void TMStatistics::buildMonitor_NORM() | |
209 | { |
|
220 | { | |
210 | layout_NORM->addWidget(label_NORM_SWF_F0, 0, 0, 1, 1); |
|
221 | layout_NORM->addWidget(label_NORM_SWF_F0, 0, 0, 1, 1); | |
211 | layout_NORM->addWidget(label_NORM_SWF_F1, 1, 0, 1, 1); |
|
222 | layout_NORM->addWidget(label_NORM_SWF_F1, 1, 0, 1, 1); | |
212 | layout_NORM->addWidget(label_NORM_SWF_F2, 2, 0, 1, 1); |
|
223 | layout_NORM->addWidget(label_NORM_SWF_F2, 2, 0, 1, 1); | |
213 | layout_NORM->addWidget(label_NORM_CWF_F3, 3, 0, 1, 1); |
|
224 | layout_NORM->addWidget(label_NORM_CWF_F3, 3, 0, 1, 1); | |
214 | // |
|
225 | // | |
215 | layout_NORM->addWidget(label_NORM_SWF_F0_nb, 0, 1, 1, 1); |
|
226 | layout_NORM->addWidget(label_NORM_SWF_F0_nb, 0, 1, 1, 1); | |
216 | layout_NORM->addWidget(label_NORM_SWF_F1_nb, 1, 1, 1, 1); |
|
227 | layout_NORM->addWidget(label_NORM_SWF_F1_nb, 1, 1, 1, 1); | |
217 | layout_NORM->addWidget(label_NORM_SWF_F2_nb, 2, 1, 1, 1); |
|
228 | layout_NORM->addWidget(label_NORM_SWF_F2_nb, 2, 1, 1, 1); | |
218 | layout_NORM->addWidget(label_NORM_CWF_F3_nb, 3, 1, 1, 1); |
|
229 | layout_NORM->addWidget(label_NORM_CWF_F3_nb, 3, 1, 1, 1); | |
219 | // |
|
230 | // | |
220 | layout_NORM->addWidget(label_NORM_ASM_F0, 4, 0, 1, 1); |
|
231 | layout_NORM->addWidget(label_NORM_ASM_F0, 4, 0, 1, 1); | |
221 | layout_NORM->addWidget(label_NORM_ASM_F1, 5, 0, 1, 1); |
|
232 | layout_NORM->addWidget(label_NORM_ASM_F1, 5, 0, 1, 1); | |
222 | layout_NORM->addWidget(label_NORM_ASM_F2, 6, 0, 1, 1); |
|
233 | layout_NORM->addWidget(label_NORM_ASM_F2, 6, 0, 1, 1); | |
223 | // |
|
234 | // | |
224 | layout_NORM->addWidget(label_NORM_ASM_F0_nb, 4, 1, 1, 1); |
|
235 | layout_NORM->addWidget(label_NORM_ASM_F0_nb, 4, 1, 1, 1); | |
225 | layout_NORM->addWidget(label_NORM_ASM_F1_nb, 5, 1, 1, 1); |
|
236 | layout_NORM->addWidget(label_NORM_ASM_F1_nb, 5, 1, 1, 1); | |
226 | layout_NORM->addWidget(label_NORM_ASM_F2_nb, 6, 1, 1, 1); |
|
237 | layout_NORM->addWidget(label_NORM_ASM_F2_nb, 6, 1, 1, 1); | |
227 | // |
|
238 | // | |
228 | layout_NORM->addWidget(label_NORM_BP1_F0, 0, 2, 1, 1); |
|
239 | layout_NORM->addWidget(label_NORM_BP1_F0, 0, 2, 1, 1); | |
229 | layout_NORM->addWidget(label_NORM_BP1_F1, 1, 2, 1, 1); |
|
240 | layout_NORM->addWidget(label_NORM_BP1_F1, 1, 2, 1, 1); | |
230 | layout_NORM->addWidget(label_NORM_BP1_F2, 2, 2, 1, 1); |
|
241 | layout_NORM->addWidget(label_NORM_BP1_F2, 2, 2, 1, 1); | |
231 | layout_NORM->addWidget(label_NORM_BP2_F0, 3, 2, 1, 1); |
|
242 | layout_NORM->addWidget(label_NORM_BP2_F0, 3, 2, 1, 1); | |
232 | layout_NORM->addWidget(label_NORM_BP2_F1, 4, 2, 1, 1); |
|
243 | layout_NORM->addWidget(label_NORM_BP2_F1, 4, 2, 1, 1); | |
233 | layout_NORM->addWidget(label_NORM_BP2_F2, 5, 2, 1, 1); |
|
244 | layout_NORM->addWidget(label_NORM_BP2_F2, 5, 2, 1, 1); | |
234 | // |
|
245 | // | |
235 | layout_NORM->addWidget(label_NORM_BP1_F0_nb, 0, 3, 1, 1); |
|
246 | layout_NORM->addWidget(label_NORM_BP1_F0_nb, 0, 3, 1, 1); | |
236 | layout_NORM->addWidget(label_NORM_BP1_F1_nb, 1, 3, 1, 1); |
|
247 | layout_NORM->addWidget(label_NORM_BP1_F1_nb, 1, 3, 1, 1); | |
237 | layout_NORM->addWidget(label_NORM_BP1_F2_nb, 2, 3, 1, 1); |
|
248 | layout_NORM->addWidget(label_NORM_BP1_F2_nb, 2, 3, 1, 1); | |
238 | layout_NORM->addWidget(label_NORM_BP2_F0_nb, 3, 3, 1, 1); |
|
249 | layout_NORM->addWidget(label_NORM_BP2_F0_nb, 3, 3, 1, 1); | |
239 | layout_NORM->addWidget(label_NORM_BP2_F1_nb, 4, 3, 1, 1); |
|
250 | layout_NORM->addWidget(label_NORM_BP2_F1_nb, 4, 3, 1, 1); | |
240 | layout_NORM->addWidget(label_NORM_BP2_F2_nb, 5, 3, 1, 1); |
|
251 | layout_NORM->addWidget(label_NORM_BP2_F2_nb, 5, 3, 1, 1); | |
241 | } |
|
252 | } | |
242 |
|
253 | |||
243 | void TMStatistics::buildMonitor_BURST() |
|
254 | void TMStatistics::buildMonitor_BURST() | |
244 | { |
|
255 | { | |
245 | layout_BURST->addWidget(label_BURST_CWF_F2, 0, 0, 1, 1); |
|
256 | layout_BURST->addWidget(label_BURST_CWF_F2, 0, 0, 1, 1); | |
246 | layout_BURST->addWidget(label_BURST_BP1_F0, 1, 0, 1, 1); |
|
257 | layout_BURST->addWidget(label_BURST_BP1_F0, 1, 0, 1, 1); | |
247 | layout_BURST->addWidget(label_BURST_BP2_F0, 2, 0, 1, 1); |
|
258 | layout_BURST->addWidget(label_BURST_BP2_F0, 2, 0, 1, 1); | |
248 | layout_BURST->addWidget(label_BURST_BP1_F1, 3, 0, 1, 1); |
|
259 | layout_BURST->addWidget(label_BURST_BP1_F1, 3, 0, 1, 1); | |
249 | layout_BURST->addWidget(label_BURST_BP2_F1, 4, 0, 1, 1); |
|
260 | layout_BURST->addWidget(label_BURST_BP2_F1, 4, 0, 1, 1); | |
250 | // |
|
261 | // | |
251 | layout_BURST->addWidget(label_BURST_CWF_F2_nb, 0, 1, 1, 1); |
|
262 | layout_BURST->addWidget(label_BURST_CWF_F2_nb, 0, 1, 1, 1); | |
252 | layout_BURST->addWidget(label_BURST_BP1_F0_nb, 1, 1, 1, 1); |
|
263 | layout_BURST->addWidget(label_BURST_BP1_F0_nb, 1, 1, 1, 1); | |
253 | layout_BURST->addWidget(label_BURST_BP2_F0_nb, 2, 1, 1, 1); |
|
264 | layout_BURST->addWidget(label_BURST_BP2_F0_nb, 2, 1, 1, 1); | |
254 | layout_BURST->addWidget(label_BURST_BP1_F1_nb, 3, 1, 1, 1); |
|
265 | layout_BURST->addWidget(label_BURST_BP1_F1_nb, 3, 1, 1, 1); | |
255 | layout_BURST->addWidget(label_BURST_BP2_F1_nb, 4, 1, 1, 1); |
|
266 | layout_BURST->addWidget(label_BURST_BP2_F1_nb, 4, 1, 1, 1); | |
256 | // |
|
267 | // | |
257 | layout_BURST->setRowStretch(5, 1); |
|
268 | layout_BURST->setRowStretch(5, 1); | |
258 | layout_BURST->setColumnStretch(2,1); |
|
269 | layout_BURST->setColumnStretch(2,1); | |
259 | } |
|
270 | } | |
260 |
|
271 | |||
261 | void TMStatistics::buildMonitor_SBM1() |
|
272 | void TMStatistics::buildMonitor_SBM1() | |
262 | { |
|
273 | { | |
263 | layout_SBM1->addWidget(label_SBM1_CWF_F1, 0, 0, 1, 1); |
|
274 | layout_SBM1->addWidget(label_SBM1_CWF_F1, 0, 0, 1, 1); | |
264 | layout_SBM1->addWidget(label_SBM1_BP1_F0, 1, 0, 1, 1); |
|
275 | layout_SBM1->addWidget(label_SBM1_BP1_F0, 1, 0, 1, 1); | |
265 | layout_SBM1->addWidget(label_SBM1_BP2_F0, 2, 0, 1, 1); |
|
276 | layout_SBM1->addWidget(label_SBM1_BP2_F0, 2, 0, 1, 1); | |
266 | // |
|
277 | // | |
267 | layout_SBM1->addWidget(label_SBM1_CWF_F1_nb, 0, 1, 1, 1); |
|
278 | layout_SBM1->addWidget(label_SBM1_CWF_F1_nb, 0, 1, 1, 1); | |
268 | layout_SBM1->addWidget(label_SBM1_BP1_F0_nb, 1, 1, 1, 1); |
|
279 | layout_SBM1->addWidget(label_SBM1_BP1_F0_nb, 1, 1, 1, 1); | |
269 | layout_SBM1->addWidget(label_SBM1_BP2_F0_nb, 2, 1, 1, 1); |
|
280 | layout_SBM1->addWidget(label_SBM1_BP2_F0_nb, 2, 1, 1, 1); | |
270 | // |
|
281 | // | |
271 | layout_SBM1->setRowStretch(3, 1); |
|
282 | layout_SBM1->setRowStretch(3, 1); | |
272 | layout_SBM1->setColumnStretch(2,1); |
|
283 | layout_SBM1->setColumnStretch(2,1); | |
273 | } |
|
284 | } | |
274 |
|
285 | |||
275 | void TMStatistics::buildMonitor_SBM2() |
|
286 | void TMStatistics::buildMonitor_SBM2() | |
276 | { |
|
287 | { | |
277 | layout_SBM2->addWidget(label_SBM2_CWF_F2, 0, 0, 1, 1); |
|
288 | layout_SBM2->addWidget(label_SBM2_CWF_F2, 0, 0, 1, 1); | |
278 | layout_SBM2->addWidget(label_SBM2_BP1_F0, 1, 0, 1, 1); |
|
289 | layout_SBM2->addWidget(label_SBM2_BP1_F0, 1, 0, 1, 1); | |
279 | layout_SBM2->addWidget(label_SBM2_BP2_F0, 2, 0, 1, 1); |
|
290 | layout_SBM2->addWidget(label_SBM2_BP2_F0, 2, 0, 1, 1); | |
280 | layout_SBM2->addWidget(label_SBM2_BP1_F1, 3, 0, 1, 1); |
|
291 | layout_SBM2->addWidget(label_SBM2_BP1_F1, 3, 0, 1, 1); | |
281 | layout_SBM2->addWidget(label_SBM2_BP2_F1, 4, 0, 1, 1); |
|
292 | layout_SBM2->addWidget(label_SBM2_BP2_F1, 4, 0, 1, 1); | |
282 | // |
|
293 | // | |
283 | layout_SBM2->addWidget(label_SBM2_CWF_F2_nb, 0, 1, 1, 1); |
|
294 | layout_SBM2->addWidget(label_SBM2_CWF_F2_nb, 0, 1, 1, 1); | |
284 | layout_SBM2->addWidget(label_SBM2_BP1_F0_nb, 1, 1, 1, 1); |
|
295 | layout_SBM2->addWidget(label_SBM2_BP1_F0_nb, 1, 1, 1, 1); | |
285 | layout_SBM2->addWidget(label_SBM2_BP2_F0_nb, 2, 1, 1, 1); |
|
296 | layout_SBM2->addWidget(label_SBM2_BP2_F0_nb, 2, 1, 1, 1); | |
286 | layout_SBM2->addWidget(label_SBM2_BP1_F1_nb, 3, 1, 1, 1); |
|
297 | layout_SBM2->addWidget(label_SBM2_BP1_F1_nb, 3, 1, 1, 1); | |
287 | layout_SBM2->addWidget(label_SBM2_BP2_F1_nb, 4, 1, 1, 1); |
|
298 | layout_SBM2->addWidget(label_SBM2_BP2_F1_nb, 4, 1, 1, 1); | |
288 | // |
|
299 | // | |
289 | layout_SBM2->setRowStretch(5, 1); |
|
300 | layout_SBM2->setRowStretch(5, 1); | |
290 | layout_SBM2->setColumnStretch(2,1); |
|
301 | layout_SBM2->setColumnStretch(2,1); | |
291 | } |
|
302 | } | |
292 |
|
303 | |||
293 | void TMStatistics::buildMonitor() |
|
304 | void TMStatistics::buildMonitor() | |
294 | { |
|
305 | { | |
295 | //*************** |
|
306 | //*************** | |
296 | // TM_LFR_TC_EXE_ |
|
307 | // TM_LFR_TC_EXE_ | |
297 | layout_stat->addWidget(label_SUCC, 0, 0, 1, 1); |
|
308 | layout_stat->addWidget(label_SUCC, 0, 0, 1, 1); | |
298 | layout_stat->addWidget(label_INCO, 1, 0, 1, 1); |
|
309 | layout_stat->addWidget(label_INCO, 1, 0, 1, 1); | |
299 | layout_stat->addWidget(label_NOTE, 2, 0, 1, 1); |
|
310 | layout_stat->addWidget(label_NOTE, 2, 0, 1, 1); | |
300 | layout_stat->addWidget(label_NOTI, 3, 0, 1, 1); |
|
311 | layout_stat->addWidget(label_NOTI, 3, 0, 1, 1); | |
301 | layout_stat->addWidget(label_ERRO, 4, 0, 1, 1); |
|
312 | layout_stat->addWidget(label_ERRO, 4, 0, 1, 1); | |
302 | layout_stat->addWidget(label_CORR, 5, 0, 1, 1); |
|
313 | layout_stat->addWidget(label_CORR, 5, 0, 1, 1); | |
303 | layout_stat->addWidget(label_HK, 6, 0, 1, 1); |
|
314 | layout_stat->addWidget(label_HK, 6, 0, 1, 1); | |
304 | layout_stat->addWidget(label_DUMP, 7, 0, 1, 1); |
|
315 | layout_stat->addWidget(label_DUMP, 7, 0, 1, 1); | |
305 | // |
|
316 | // | |
306 | layout_stat->addWidget(label_SUCC_nb, 0, 1, 1, 1); |
|
317 | layout_stat->addWidget(label_SUCC_nb, 0, 1, 1, 1); | |
307 | layout_stat->addWidget(label_INCO_nb, 1, 1, 1, 1); |
|
318 | layout_stat->addWidget(label_INCO_nb, 1, 1, 1, 1); | |
308 | layout_stat->addWidget(label_NOTE_nb, 2, 1, 1, 1); |
|
319 | layout_stat->addWidget(label_NOTE_nb, 2, 1, 1, 1); | |
309 | layout_stat->addWidget(label_NOTI_nb, 3, 1, 1, 1); |
|
320 | layout_stat->addWidget(label_NOTI_nb, 3, 1, 1, 1); | |
310 | layout_stat->addWidget(label_ERRO_nb, 4, 1, 1, 1); |
|
321 | layout_stat->addWidget(label_ERRO_nb, 4, 1, 1, 1); | |
311 | layout_stat->addWidget(label_CORR_nb, 5, 1, 1, 1); |
|
322 | layout_stat->addWidget(label_CORR_nb, 5, 1, 1, 1); | |
312 | layout_stat->addWidget(label_HK_nb, 6, 1, 1, 1); |
|
323 | layout_stat->addWidget(label_HK_nb, 6, 1, 1, 1); | |
313 | layout_stat->addWidget(label_DUMP_nb, 7, 1, 1, 1); |
|
324 | layout_stat->addWidget(label_DUMP_nb, 7, 1, 1, 1); | |
314 |
|
325 | |||
315 | //******** |
|
326 | //******** | |
316 | // LAST TM |
|
327 | // LAST TM | |
317 | layout_last->addWidget(label_PID, 0, 0, 1, 1); |
|
328 | layout_last->addWidget(label_PID, 0, 0, 1, 1); | |
318 | layout_last->addWidget(label_CAT, 0, 1, 1, 1); |
|
329 | layout_last->addWidget(label_CAT, 0, 1, 1, 1); | |
319 | layout_last->addWidget(label_TYP, 0, 2, 1, 1); |
|
330 | layout_last->addWidget(label_TYP, 0, 2, 1, 1); | |
320 | layout_last->addWidget(label_SUB, 0, 3, 1, 1); |
|
331 | layout_last->addWidget(label_SUB, 0, 3, 1, 1); | |
321 | layout_last->addWidget(label_SID, 0, 4, 1, 1); |
|
332 | layout_last->addWidget(label_SID, 0, 4, 1, 1); | |
322 | layout_last->addWidget(label_SIZ, 0, 5, 1, 1); |
|
333 | layout_last->addWidget(label_SIZ, 0, 5, 1, 1); | |
323 | // |
|
334 | // | |
324 | layout_last->addWidget(label_PID_is, 1, 0, 1, 1); |
|
335 | layout_last->addWidget(label_PID_is, 1, 0, 1, 1); | |
325 | layout_last->addWidget(label_CAT_is, 1, 1, 1, 1); |
|
336 | layout_last->addWidget(label_CAT_is, 1, 1, 1, 1); | |
326 | layout_last->addWidget(label_TYP_is, 1, 2, 1, 1); |
|
337 | layout_last->addWidget(label_TYP_is, 1, 2, 1, 1); | |
327 | layout_last->addWidget(label_SUB_is, 1, 3, 1, 1); |
|
338 | layout_last->addWidget(label_SUB_is, 1, 3, 1, 1); | |
328 | layout_last->addWidget(label_SID_is, 1, 4, 1, 1); |
|
339 | layout_last->addWidget(label_SID_is, 1, 4, 1, 1); | |
329 | layout_last->addWidget(label_SIZ_is, 1, 5, 1, 1); |
|
340 | layout_last->addWidget(label_SIZ_is, 1, 5, 1, 1); | |
330 | // |
|
341 | // | |
331 | layout_last->addWidget(label_coarse_time, 2, 0, 1, 1); |
|
342 | layout_last->addWidget(label_coarse_time, 2, 0, 1, 1); | |
332 | layout_last->addWidget(label_coarse_time_val, 2, 1, 1, 1); |
|
343 | layout_last->addWidget(label_coarse_time_val, 2, 1, 1, 1); | |
333 | layout_last->addWidget(label_fine_time, 2, 2, 1, 1); |
|
344 | layout_last->addWidget(label_fine_time, 2, 2, 1, 1); | |
334 | layout_last->addWidget(label_fine_time_val, 2, 3, 1, 1); |
|
345 | layout_last->addWidget(label_fine_time_val, 2, 3, 1, 1); | |
335 | // |
|
346 | // | |
336 | layout_last->addWidget(label_UNKNOWN, 3, 0, 1, 1); |
|
347 | layout_last->addWidget(label_UNKNOWN, 3, 0, 1, 1); | |
337 | layout_last->addWidget(label_UNKNOWN_nb, 3, 1, 1, 1); |
|
348 | layout_last->addWidget(label_UNKNOWN_nb, 3, 1, 1, 1); | |
338 |
|
349 | |||
|
350 | layout_record->addWidget(button_record); | |||
|
351 | layout_record->addWidget(button_chooseDir); | |||
|
352 | layout_record->insertStretch(2, 1); | |||
|
353 | ||||
339 | //*********** |
|
354 | //*********** | |
340 | // groupboxes |
|
355 | // groupboxes | |
341 | groupbox_stat->setLayout(layout_stat); |
|
356 | groupbox_stat->setLayout(layout_stat); | |
342 | groupbox_NORM->setLayout(layout_NORM); |
|
357 | groupbox_NORM->setLayout(layout_NORM); | |
343 | groupbox_BURST->setLayout(layout_BURST); |
|
358 | groupbox_BURST->setLayout(layout_BURST); | |
344 | groupbox_SBM1->setLayout(layout_SBM1); |
|
359 | groupbox_SBM1->setLayout(layout_SBM1); | |
345 | groupbox_SBM2->setLayout(layout_SBM2); |
|
360 | groupbox_SBM2->setLayout(layout_SBM2); | |
346 | groupbox_last->setLayout(layout_last); |
|
361 | groupbox_last->setLayout(layout_last); | |
|
362 | groupbox_record->setLayout(layout_record); | |||
347 | // |
|
363 | // | |
348 | mainLayout->addWidget(groupbox_stat, 0, 0, 1, 1); |
|
364 | mainLayout->addWidget(groupbox_stat, 0, 0, 1, 1); | |
349 | mainLayout->addWidget(groupbox_NORM, 1, 0, 1, 1); |
|
365 | mainLayout->addWidget(groupbox_NORM, 1, 0, 1, 1); | |
350 | mainLayout->addWidget(groupbox_last, 2, 0, 1, 2); |
|
366 | mainLayout->addWidget(groupbox_last, 2, 0, 1, 2); | |
351 | mainLayout->addWidget(groupbox_SBM1, 0, 1, 1, 1); |
|
367 | mainLayout->addWidget(groupbox_SBM1, 0, 1, 1, 1); | |
352 | mainLayout->addWidget(groupbox_SBM2, 0, 2, 1, 1); |
|
368 | mainLayout->addWidget(groupbox_SBM2, 0, 2, 1, 1); | |
353 | mainLayout->addWidget(groupbox_BURST, 1, 1, 1, 1); |
|
369 | mainLayout->addWidget(groupbox_BURST, 1, 1, 1, 1); | |
354 |
mainLayout->addWidget( |
|
370 | mainLayout->addWidget(groupbox_record, 1, 2, 1, 1); | |
|
371 | mainLayout->addWidget(button_reset_stat, 3, 0, 1, 3); | |||
355 | mainLayout->setColumnStretch(3, 1); |
|
372 | mainLayout->setColumnStretch(3, 1); | |
356 | mainLayout->setRowStretch(4, 1); |
|
373 | mainLayout->setRowStretch(4, 1); | |
357 | // |
|
374 | // | |
358 | this->setLayout(mainLayout); |
|
375 | this->setLayout(mainLayout); | |
359 | } |
|
376 | } | |
360 |
|
377 | |||
361 | void TMStatistics::resetStatistics() |
|
378 | void TMStatistics::resetStatistics() | |
362 | { |
|
379 | { | |
363 | initConstants(); |
|
380 | initConstants(); | |
364 | // |
|
381 | // | |
365 | label_UNKNOWN_nb->setText("-"); |
|
382 | label_UNKNOWN_nb->setText("-"); | |
366 | label_SUCC_nb->setText("-"); |
|
383 | label_SUCC_nb->setText("-"); | |
367 | label_INCO_nb->setText("-"); |
|
384 | label_INCO_nb->setText("-"); | |
368 | label_NOTE_nb->setText("-"); |
|
385 | label_NOTE_nb->setText("-"); | |
369 | label_NOTI_nb->setText("-"); |
|
386 | label_NOTI_nb->setText("-"); | |
370 | label_ERRO_nb->setText("-"); |
|
387 | label_ERRO_nb->setText("-"); | |
371 | label_CORR_nb->setText("-"); |
|
388 | label_CORR_nb->setText("-"); | |
372 | label_HK_nb->setText("-"); |
|
389 | label_HK_nb->setText("-"); | |
373 | label_DUMP_nb->setText("-"); |
|
390 | label_DUMP_nb->setText("-"); | |
374 | // |
|
391 | // | |
375 | label_NORM_SWF_F0_nb->setText("-"); |
|
392 | label_NORM_SWF_F0_nb->setText("-"); | |
376 | label_NORM_SWF_F1_nb->setText("-"); |
|
393 | label_NORM_SWF_F1_nb->setText("-"); | |
377 | label_NORM_SWF_F2_nb->setText("-"); |
|
394 | label_NORM_SWF_F2_nb->setText("-"); | |
378 | label_NORM_CWF_F3_nb->setText("-"); |
|
395 | label_NORM_CWF_F3_nb->setText("-"); | |
379 | label_NORM_ASM_F0_nb->setText("-"); |
|
396 | label_NORM_ASM_F0_nb->setText("-"); | |
380 | // |
|
397 | // | |
381 | label_BURST_CWF_F2_nb->setText("-"); |
|
398 | label_BURST_CWF_F2_nb->setText("-"); | |
382 | // |
|
399 | // | |
383 | label_SBM1_CWF_F1_nb->setText("-"); |
|
400 | label_SBM1_CWF_F1_nb->setText("-"); | |
384 | // |
|
401 | // | |
385 | label_SBM2_CWF_F2_nb->setText("-"); |
|
402 | label_SBM2_CWF_F2_nb->setText("-"); | |
386 | // |
|
403 | // | |
387 | label_PID_is->setText("-"); |
|
404 | label_PID_is->setText("-"); | |
388 | label_CAT_is->setText("-"); |
|
405 | label_CAT_is->setText("-"); | |
389 | label_TYP_is->setText("-"); |
|
406 | label_TYP_is->setText("-"); | |
390 | label_SUB_is->setText("-"); |
|
407 | label_SUB_is->setText("-"); | |
391 | label_SID_is->setText("-"); |
|
408 | label_SID_is->setText("-"); | |
392 | label_SIZ_is->setText("-"); |
|
409 | label_SIZ_is->setText("-"); | |
393 | // |
|
410 | // | |
394 | label_coarse_time_val->setText("-"); |
|
411 | label_coarse_time_val->setText("-"); | |
395 | label_fine_time_val->setText("-"); |
|
412 | label_fine_time_val->setText("-"); | |
396 | } |
|
413 | } | |
397 |
|
414 | |||
398 | void TMStatistics::updateStatistics(unsigned char pid, unsigned char cat, |
|
415 | void TMStatistics::updateStatistics(unsigned char pid, unsigned char cat, | |
399 | unsigned char typ, unsigned char sub, |
|
416 | unsigned char typ, unsigned char sub, | |
400 | unsigned int sid, unsigned int length, |
|
417 | unsigned int sid, unsigned int length, | |
401 | unsigned int coarse_t, unsigned int fine_t) |
|
418 | unsigned int coarse_t, unsigned int fine_t) | |
402 | { |
|
419 | { | |
403 | if (cat == 1) |
|
420 | if (cat == 1) | |
404 | { |
|
421 | { | |
405 | if (typ == TM_TYPE_TC_EXE) |
|
422 | if (typ == TM_TYPE_TC_EXE) | |
406 | { |
|
423 | { | |
407 | if (sub == TM_SUBTYPE_EXE_OK) |
|
424 | if (sub == TM_SUBTYPE_EXE_OK) | |
408 | { |
|
425 | { | |
409 | SUCC_nb = SUCC_nb + 1; |
|
426 | SUCC_nb = SUCC_nb + 1; | |
410 | label_SUCC_nb->setText(QString::number(SUCC_nb)); |
|
427 | label_SUCC_nb->setText(QString::number(SUCC_nb)); | |
411 | } |
|
428 | } | |
412 | else if (sub == TM_SUBTYPE_EXE_NOK) |
|
429 | else if (sub == TM_SUBTYPE_EXE_NOK) | |
413 | { |
|
430 | { | |
414 | if (sid == SID_EXE_INC) |
|
431 | if (sid == SID_EXE_INC) | |
415 | { |
|
432 | { | |
416 | INCO_nb = INCO_nb + 1; |
|
433 | INCO_nb = INCO_nb + 1; | |
417 | label_INCO_nb->setText(QString::number(INCO_nb)); |
|
434 | label_INCO_nb->setText(QString::number(INCO_nb)); | |
418 | } |
|
435 | } | |
419 | else if (sid == SID_NOT_EXE) |
|
436 | else if (sid == SID_NOT_EXE) | |
420 | { |
|
437 | { | |
421 | NOTE_nb = NOTE_nb + 1; |
|
438 | NOTE_nb = NOTE_nb + 1; | |
422 | label_NOTE_nb->setText(QString::number(NOTE_nb)); |
|
439 | label_NOTE_nb->setText(QString::number(NOTE_nb)); | |
423 | } |
|
440 | } | |
424 | else if (sid == SID_NOT_IMP) |
|
441 | else if (sid == SID_NOT_IMP) | |
425 | { |
|
442 | { | |
426 | NOTI_nb = NOTI_nb + 1; |
|
443 | NOTI_nb = NOTI_nb + 1; | |
427 | label_NOTI_nb->setText(QString::number(NOTI_nb)); |
|
444 | label_NOTI_nb->setText(QString::number(NOTI_nb)); | |
428 | } |
|
445 | } | |
429 | else if (sid == SID_EXE_ERR) |
|
446 | else if (sid == SID_EXE_ERR) | |
430 | { |
|
447 | { | |
431 | ERRO_nb = ERRO_nb + 1; |
|
448 | ERRO_nb = ERRO_nb + 1; | |
432 | label_ERRO_nb->setText(QString::number(ERRO_nb)); |
|
449 | label_ERRO_nb->setText(QString::number(ERRO_nb)); | |
433 | } |
|
450 | } | |
434 | else if (sid == SID_EXE_CORR) |
|
451 | else if (sid == SID_EXE_CORR) | |
435 | { |
|
452 | { | |
436 | CORR_nb = CORR_nb + 1; |
|
453 | CORR_nb = CORR_nb + 1; | |
437 | label_CORR_nb->setText(QString::number(CORR_nb)); |
|
454 | label_CORR_nb->setText(QString::number(CORR_nb)); | |
438 | } |
|
455 | } | |
439 | else incrementUnknown(); |
|
456 | else incrementUnknown(); | |
440 | } |
|
457 | } | |
441 | else incrementUnknown(); |
|
458 | else incrementUnknown(); | |
442 | } |
|
459 | } | |
443 | else |
|
460 | else | |
444 | incrementUnknown(); |
|
461 | incrementUnknown(); | |
445 | } |
|
462 | } | |
446 | else if (cat == 4) |
|
463 | else if (cat == 4) | |
447 | { |
|
464 | { | |
448 | if (typ == TM_TYPE_HK) |
|
465 | if (typ == TM_TYPE_HK) | |
449 | { |
|
466 | { | |
450 | if (sub == TM_SUBTYPE_HK) |
|
467 | if (sub == TM_SUBTYPE_HK) | |
451 | if (sid == SID_HK) |
|
468 | if (sid == SID_HK) | |
452 | { |
|
469 | { | |
453 | HK_nb = HK_nb + 1; |
|
470 | HK_nb = HK_nb + 1; | |
454 | label_HK_nb->setText(QString::number(HK_nb)); |
|
471 | label_HK_nb->setText(QString::number(HK_nb)); | |
455 | } |
|
472 | } | |
456 | else |
|
473 | else | |
457 | { |
|
474 | { | |
458 | incrementUnknown(); |
|
475 | incrementUnknown(); | |
459 | } |
|
476 | } | |
460 | else |
|
477 | else | |
461 | { |
|
478 | { | |
462 | incrementUnknown(); |
|
479 | incrementUnknown(); | |
463 | } |
|
480 | } | |
464 | } |
|
481 | } | |
465 | else |
|
482 | else | |
466 | { |
|
483 | { | |
467 | incrementUnknown(); |
|
484 | incrementUnknown(); | |
468 | } |
|
485 | } | |
469 | } |
|
486 | } | |
470 | else if (cat == 9) |
|
487 | else if (cat == 9) | |
471 | { |
|
488 | { | |
472 | if (typ == TM_TYPE_PARAMETER_DUMP) |
|
489 | if (typ == TM_TYPE_PARAMETER_DUMP) | |
473 | { |
|
490 | { | |
474 | if (sub == TM_SUBTYPE_PARAMETER_DUMP) |
|
491 | if (sub == TM_SUBTYPE_PARAMETER_DUMP) | |
475 | if (sid == SID_PARAMETER_DUMP) |
|
492 | if (sid == SID_PARAMETER_DUMP) | |
476 | { |
|
493 | { | |
477 | DUMP_nb = DUMP_nb + 1; |
|
494 | DUMP_nb = DUMP_nb + 1; | |
478 | label_DUMP_nb->setText(QString::number(DUMP_nb)); |
|
495 | label_DUMP_nb->setText(QString::number(DUMP_nb)); | |
479 | } |
|
496 | } | |
480 | else |
|
497 | else | |
481 | { |
|
498 | { | |
482 | incrementUnknown(); |
|
499 | incrementUnknown(); | |
483 | } |
|
500 | } | |
484 | else |
|
501 | else | |
485 | { |
|
502 | { | |
486 | incrementUnknown(); |
|
503 | incrementUnknown(); | |
487 | } |
|
504 | } | |
488 | } |
|
505 | } | |
489 | else |
|
506 | else | |
490 | { |
|
507 | { | |
491 | incrementUnknown(); |
|
508 | incrementUnknown(); | |
492 | } |
|
509 | } | |
493 | } |
|
510 | } | |
494 | else if (cat == 12) |
|
511 | else if (cat == 12) | |
495 | { |
|
512 | { | |
496 | if (typ == 21) |
|
513 | if (typ == 21) | |
497 | { |
|
514 | { | |
498 | if (sub == 3) |
|
515 | if (sub == 3) | |
499 | { |
|
516 | { | |
500 | if (sid == SID_NORM_CWF_F3) |
|
517 | if (sid == SID_NORM_CWF_F3) | |
501 | { |
|
518 | { | |
502 | NORM_CWF_F3_nb = NORM_CWF_F3_nb + 1; |
|
519 | NORM_CWF_F3_nb = NORM_CWF_F3_nb + 1; | |
503 | label_NORM_CWF_F3_nb->setText(QString::number(NORM_CWF_F3_nb)); |
|
520 | label_NORM_CWF_F3_nb->setText(QString::number(NORM_CWF_F3_nb)); | |
504 | } |
|
521 | } | |
505 | else if (sid == SID_BURST_CWF_F2) |
|
522 | else if (sid == SID_BURST_CWF_F2) | |
506 | { |
|
523 | { | |
507 | BURST_CWF_F2_nb = BURST_CWF_F2_nb + 1; |
|
524 | BURST_CWF_F2_nb = BURST_CWF_F2_nb + 1; | |
508 | label_BURST_CWF_F2_nb->setText(QString::number(BURST_CWF_F2_nb)); |
|
525 | label_BURST_CWF_F2_nb->setText(QString::number(BURST_CWF_F2_nb)); | |
509 | } |
|
526 | } | |
510 | else if (sid == SID_NORM_SWF_F0) |
|
527 | else if (sid == SID_NORM_SWF_F0) | |
511 | { |
|
528 | { | |
512 | NORM_SWF_F0_nb = NORM_SWF_F0_nb + 1; |
|
529 | NORM_SWF_F0_nb = NORM_SWF_F0_nb + 1; | |
513 | label_NORM_SWF_F0_nb->setText(QString::number(NORM_SWF_F0_nb)); |
|
530 | label_NORM_SWF_F0_nb->setText(QString::number(NORM_SWF_F0_nb)); | |
514 | } |
|
531 | } | |
515 | else if (sid == SID_NORM_SWF_F1) |
|
532 | else if (sid == SID_NORM_SWF_F1) | |
516 | { |
|
533 | { | |
517 | NORM_SWF_F1_nb = NORM_SWF_F1_nb + 1; |
|
534 | NORM_SWF_F1_nb = NORM_SWF_F1_nb + 1; | |
518 | label_NORM_SWF_F1_nb->setText(QString::number(NORM_SWF_F1_nb)); |
|
535 | label_NORM_SWF_F1_nb->setText(QString::number(NORM_SWF_F1_nb)); | |
519 | } |
|
536 | } | |
520 | else if (sid == SID_NORM_SWF_F2) |
|
537 | else if (sid == SID_NORM_SWF_F2) | |
521 | { |
|
538 | { | |
522 | NORM_SWF_F2_nb = NORM_SWF_F2_nb + 1; |
|
539 | NORM_SWF_F2_nb = NORM_SWF_F2_nb + 1; | |
523 | label_NORM_SWF_F2_nb->setText(QString::number(NORM_SWF_F2_nb)); |
|
540 | label_NORM_SWF_F2_nb->setText(QString::number(NORM_SWF_F2_nb)); | |
524 | } |
|
541 | } | |
525 | else if (sid == SID_NORM_ASM_F0) |
|
542 | else if (sid == SID_NORM_ASM_F0) | |
526 | { |
|
543 | { | |
527 | NORM_ASM_F0_nb = NORM_ASM_F0_nb + 1; |
|
544 | NORM_ASM_F0_nb = NORM_ASM_F0_nb + 1; | |
528 | label_NORM_ASM_F0_nb->setText(QString::number(NORM_ASM_F0_nb)); |
|
545 | label_NORM_ASM_F0_nb->setText(QString::number(NORM_ASM_F0_nb)); | |
529 | } |
|
546 | } | |
530 | else if (sid == SID_SBM1_CWF_F1) |
|
547 | else if (sid == SID_SBM1_CWF_F1) | |
531 | { |
|
548 | { | |
532 | SBM1_CWF_F1_nb = SBM1_CWF_F1_nb + 1; |
|
549 | SBM1_CWF_F1_nb = SBM1_CWF_F1_nb + 1; | |
533 | label_SBM1_CWF_F1_nb->setText(QString::number(SBM1_CWF_F1_nb)); |
|
550 | label_SBM1_CWF_F1_nb->setText(QString::number(SBM1_CWF_F1_nb)); | |
534 | } |
|
551 | } | |
535 | else if (sid == SID_SBM2_CWF_F2) |
|
552 | else if (sid == SID_SBM2_CWF_F2) | |
536 | { |
|
553 | { | |
537 | SBM2_CWF_F2_nb = SBM2_CWF_F2_nb + 1; |
|
554 | SBM2_CWF_F2_nb = SBM2_CWF_F2_nb + 1; | |
538 | label_SBM2_CWF_F2_nb->setText(QString::number(SBM2_CWF_F2_nb)); |
|
555 | label_SBM2_CWF_F2_nb->setText(QString::number(SBM2_CWF_F2_nb)); | |
539 | } |
|
556 | } | |
540 | else |
|
557 | else | |
541 | { |
|
558 | { | |
542 | incrementUnknown(); |
|
559 | incrementUnknown(); | |
543 | } |
|
560 | } | |
544 | } |
|
561 | } | |
545 | } |
|
562 | } | |
546 | else |
|
563 | else | |
547 | { |
|
564 | { | |
548 | incrementUnknown(); |
|
565 | incrementUnknown(); | |
549 | } |
|
566 | } | |
550 | } |
|
567 | } | |
551 | else |
|
568 | else | |
552 | { |
|
569 | { | |
553 | incrementUnknown(); |
|
570 | incrementUnknown(); | |
554 | } |
|
571 | } | |
555 |
|
572 | |||
556 | label_PID_is->setText(QString::number(pid)); |
|
573 | label_PID_is->setText(QString::number(pid)); | |
557 | label_CAT_is->setText(QString::number(cat)); |
|
574 | label_CAT_is->setText(QString::number(cat)); | |
558 | label_TYP_is->setText(QString::number(typ)); |
|
575 | label_TYP_is->setText(QString::number(typ)); | |
559 | label_SUB_is->setText(QString::number(sub)); |
|
576 | label_SUB_is->setText(QString::number(sub)); | |
560 | label_SID_is->setText(QString::number(sid)); |
|
577 | label_SID_is->setText(QString::number(sid)); | |
561 | label_SIZ_is->setText(QString::number(length)); |
|
578 | label_SIZ_is->setText(QString::number(length)); | |
562 | label_coarse_time_val->setText(QString::number(coarse_t, 16)); |
|
579 | label_coarse_time_val->setText(QString::number(coarse_t, 16)); | |
563 | label_fine_time_val->setText(QString::number(fine_t, 16)); |
|
580 | label_fine_time_val->setText(QString::number(fine_t, 16)); | |
564 | } |
|
581 | } | |
565 |
|
582 | |||
566 | void TMStatistics::incrementUnknown() |
|
583 | void TMStatistics::incrementUnknown() | |
567 | { |
|
584 | { | |
568 | UNKNOWN_nb = UNKNOWN_nb + 1; |
|
585 | UNKNOWN_nb = UNKNOWN_nb + 1; | |
569 | label_UNKNOWN_nb->setText(QString::number(UNKNOWN_nb)); |
|
586 | label_UNKNOWN_nb->setText(QString::number(UNKNOWN_nb)); | |
570 | } |
|
587 | } | |
571 |
|
588 | |||
572 | unsigned char TMStatistics::getPID(TMPacketToRead *packet) |
|
589 | unsigned char TMStatistics::getPID(TMPacketToRead *packet) | |
573 | { |
|
590 | { | |
574 | unsigned char pid = 0; |
|
591 | unsigned char pid = 0; | |
575 |
|
592 | |||
576 | pid = ((packet->Value[4] & 0x07) << 4) + ((packet->Value[5] & 0xf0) >> 4); |
|
593 | pid = ((packet->Value[4] & 0x07) << 4) + ((packet->Value[5] & 0xf0) >> 4); | |
577 |
|
594 | |||
578 | return pid; |
|
595 | return pid; | |
579 | } |
|
596 | } | |
580 |
|
597 | |||
581 | unsigned char TMStatistics::getCAT(TMPacketToRead *packet) |
|
598 | unsigned char TMStatistics::getCAT(TMPacketToRead *packet) | |
582 | { |
|
599 | { | |
583 | unsigned char cat = 0; |
|
600 | unsigned char cat = 0; | |
584 |
|
601 | |||
585 | cat = packet->Value[5] & 0x0f; |
|
602 | cat = packet->Value[5] & 0x0f; | |
586 |
|
603 | |||
587 | return cat; |
|
604 | return cat; | |
588 | } |
|
605 | } | |
589 |
|
606 | |||
590 | unsigned char TMStatistics::getTYPE(TMPacketToRead *packet) |
|
607 | unsigned char TMStatistics::getTYPE(TMPacketToRead *packet) | |
591 | { |
|
608 | { | |
592 | unsigned char typ = 0; |
|
609 | unsigned char typ = 0; | |
593 |
|
610 | |||
594 | typ = packet->Value[11]; // TYPE |
|
611 | typ = packet->Value[11]; // TYPE | |
595 |
|
612 | |||
596 | return typ; |
|
613 | return typ; | |
597 | } |
|
614 | } | |
598 |
|
615 | |||
599 | unsigned char TMStatistics::getSUBTYPE(TMPacketToRead *packet) |
|
616 | unsigned char TMStatistics::getSUBTYPE(TMPacketToRead *packet) | |
600 | { |
|
617 | { | |
601 | unsigned char sub = 0; |
|
618 | unsigned char sub = 0; | |
602 |
|
619 | |||
603 | sub = packet->Value[12]; // SUBTYPE |
|
620 | sub = packet->Value[12]; // SUBTYPE | |
604 |
|
621 | |||
605 | return sub; |
|
622 | return sub; | |
606 | } |
|
623 | } | |
607 |
|
624 | |||
608 | unsigned int TMStatistics::getLENGTH(TMPacketToRead *packet) |
|
625 | unsigned int TMStatistics::getLENGTH(TMPacketToRead *packet) | |
609 | { |
|
626 | { | |
610 | unsigned int length = 0; |
|
627 | unsigned int length = 0; | |
611 |
|
628 | |||
612 | length = packet->Value[8] * 256 + packet->Value[9]; |
|
629 | length = packet->Value[8] * 256 + packet->Value[9]; | |
613 |
|
630 | |||
614 | return length; |
|
631 | return length; | |
615 | } |
|
632 | } | |
616 |
|
633 | |||
617 | unsigned int TMStatistics::getCoarseTime(TMPacketToRead *packet) |
|
634 | unsigned int TMStatistics::getCoarseTime(TMPacketToRead *packet) | |
618 | { |
|
635 | { | |
619 | unsigned int coarse = 0; |
|
636 | unsigned int coarse = 0; | |
620 |
|
637 | |||
621 | coarse = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16) |
|
638 | coarse = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16) | |
622 | + packet->Value[16] * pow(2, 8) + packet->Value[17]; |
|
639 | + packet->Value[16] * pow(2, 8) + packet->Value[17]; | |
623 |
|
640 | |||
624 | return coarse; |
|
641 | return coarse; | |
625 | } |
|
642 | } | |
626 |
|
643 | |||
627 | unsigned int TMStatistics::getFineTime(TMPacketToRead *packet) |
|
644 | unsigned int TMStatistics::getFineTime(TMPacketToRead *packet) | |
628 | { |
|
645 | { | |
629 | unsigned int fine = 0; |
|
646 | unsigned int fine = 0; | |
630 |
|
647 | |||
631 | fine = packet->Value[18] * pow(2, 8) + packet->Value[19]; |
|
648 | fine = packet->Value[18] * pow(2, 8) + packet->Value[19]; | |
632 |
|
649 | |||
633 | return fine; |
|
650 | return fine; | |
634 | } |
|
651 | } | |
635 |
|
652 | |||
636 | unsigned int TMStatistics::getSID(TMPacketToRead *packet, |
|
653 | unsigned int TMStatistics::getSID(TMPacketToRead *packet, | |
637 | unsigned char pid, unsigned char cat, |
|
654 | unsigned char pid, unsigned char cat, | |
638 | unsigned char typ, unsigned char sub) |
|
655 | unsigned char typ, unsigned char sub) | |
639 | { |
|
656 | { | |
640 | unsigned int sid = 0; |
|
657 | unsigned int sid = 0; | |
|
658 | QByteArray packetAsAnArray; | |||
641 |
|
659 | |||
642 | if ((pid == 76) & (cat == 1) & (typ == TM_TYPE_TC_EXE) & (sub == TM_SUBTYPE_EXE_NOK)) |
|
660 | if ((pid == 76) & (cat == 1) & (typ == TM_TYPE_TC_EXE) & (sub == TM_SUBTYPE_EXE_NOK)) | |
643 | sid = packet->Value[20] * 256 + packet->Value[21]; |
|
661 | sid = packet->Value[20] * 256 + packet->Value[21]; | |
644 | else if ((pid == 76) & (cat == 4) & (typ == TM_TYPE_HK) & (sub == TM_SUBTYPE_HK)) |
|
662 | else if ((pid == 76) & (cat == 4) & (typ == TM_TYPE_HK) & (sub == TM_SUBTYPE_HK)) | |
645 | sid = SID_HK; |
|
663 | sid = SID_HK; | |
646 | else if ((pid == 76) & (cat == 9) & (typ == TM_TYPE_PARAMETER_DUMP) & (sub == TM_SUBTYPE_PARAMETER_DUMP)) |
|
664 | else if ((pid == 76) & (cat == 9) & (typ == TM_TYPE_PARAMETER_DUMP) & (sub == TM_SUBTYPE_PARAMETER_DUMP)) | |
647 | sid = SID_PARAMETER_DUMP; |
|
665 | sid = SID_PARAMETER_DUMP; | |
648 | else if ((pid == 76) & (cat == 12) & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE)) |
|
666 | else if ((pid == 76) & (cat == 12) & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE)) | |
649 | sid = packet->Value[20]; |
|
667 | sid = packet->Value[20]; | |
650 | else if ((pid == 79) & (cat == 12) & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE)) |
|
668 | else if ((pid == 79) & (cat == 12) & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE)) | |
651 | sid = packet->Value[20]; |
|
669 | sid = packet->Value[20]; | |
652 |
|
670 | |||
|
671 | if (logFileEn == true) | |||
|
672 | { | |||
|
673 | packetAsAnArray = QByteArray::fromRawData((char *) &packet->Value[4], (packet->size-4)).toHex(); | |||
|
674 | *(this->logFileStrm) | |||
|
675 | << QDate::currentDate().toString() + " " | |||
|
676 | << QTime::currentTime().toString() << endl | |||
|
677 | << packetAsAnArray | |||
|
678 | << endl | |||
|
679 | << endl; | |||
|
680 | } | |||
|
681 | ||||
653 | return sid; |
|
682 | return sid; | |
654 | } |
|
683 | } | |
655 |
|
684 | |||
|
685 | void TMStatistics::buildFileName() | |||
|
686 | { | |||
|
687 | QString date; | |||
|
688 | QString time; | |||
|
689 | QString prefix; | |||
|
690 | ||||
|
691 | date = QDate::currentDate().toString(); | |||
|
692 | time = QTime::currentTime().toString(); | |||
|
693 | ||||
|
694 | prefix = defaultStorageDirectory + "/" + date + "_" + time + "_" ; | |||
656 |
|
695 | |||
657 |
|
696 | |||
|
697 | if(this->logFile->isOpen()) this->logFile->close(); | |||
|
698 | this->logFile->setFileName( prefix + "packet_record.data"); | |||
|
699 | if(this->logFile->open(QIODevice::WriteOnly)) this->logFileStrm = new QTextStream(this->logFile); | |||
|
700 | } | |||
658 |
|
701 | |||
|
702 | void TMStatistics::storePackets() | |||
|
703 | { | |||
|
704 | if (logFileEn == false) | |||
|
705 | { | |||
|
706 | buildFileName(); | |||
|
707 | button_record->setText(tr("STOP")); | |||
|
708 | logFileEn = true; | |||
|
709 | } | |||
|
710 | else | |||
|
711 | { | |||
|
712 | if(this->logFile->isOpen()) this->logFile->close(); | |||
|
713 | button_record->setText(tr("REC")); | |||
|
714 | logFileEn = false; | |||
|
715 | } | |||
|
716 | } | |||
659 |
|
717 | |||
|
718 | void TMStatistics::readSettings() | |||
|
719 | { | |||
|
720 | QSettings settings("lpp", "lfrsgse"); | |||
|
721 | defaultStorageDirectory = settings.value("defaultStorageDirectory", QDir::homePath()).toString(); | |||
|
722 | } | |||
|
723 | ||||
|
724 | void TMStatistics::writeSettings() | |||
|
725 | { | |||
|
726 | QSettings settings("lpp", "lfrsgse"); | |||
|
727 | settings.setValue("defaultStorageDirectory", defaultStorageDirectory); | |||
|
728 | } | |||
|
729 | ||||
|
730 | void TMStatistics::chooseDir() | |||
|
731 | { | |||
|
732 | defaultStorageDirectory = QFileDialog::getExistingDirectory(this, | |||
|
733 | "choose the directory", | |||
|
734 | QDir::homePath(), | |||
|
735 | QFileDialog::ShowDirsOnly); | |||
|
736 | } | |||
|
737 | ||||
|
738 | void TMStatistics::closeEvent(QCloseEvent *event) | |||
|
739 | { | |||
|
740 | if(this->logFile->isOpen()) | |||
|
741 | { | |||
|
742 | this->logFileStrm->flush(); | |||
|
743 | this->logFile->waitForBytesWritten(3000); | |||
|
744 | this->logFile->close(); | |||
|
745 | } | |||
|
746 | writeSettings(); | |||
|
747 | event->accept(); | |||
|
748 | } | |||
|
749 |
@@ -1,220 +1,237 | |||||
1 | #ifndef TMSTATISTICS_H |
|
1 | #ifndef TMSTATISTICS_H | |
2 | #define TMSTATISTICS_H |
|
2 | #define TMSTATISTICS_H | |
3 |
|
3 | |||
4 | #include <QWidget> |
|
4 | #include <QWidget> | |
5 | #include <QLabel> |
|
5 | #include <QLabel> | |
6 | #include <QPushButton> |
|
6 | #include <QPushButton> | |
7 | #include <QGridLayout> |
|
7 | #include <QGridLayout> | |
8 | #include <QVBoxLayout> |
|
8 | #include <QVBoxLayout> | |
9 | #include <QGroupBox> |
|
9 | #include <QGroupBox> | |
|
10 | #include <QFile> | |||
|
11 | #include <QTextStream> | |||
10 | #include <tmpackettoread.h> |
|
12 | #include <tmpackettoread.h> | |
11 | #include <ccsds_types.h> |
|
13 | #include <ccsds_types.h> | |
12 |
|
14 | |||
13 | #define STATISTICS_FONT_SIZE 9 |
|
15 | #define STATISTICS_FONT_SIZE 9 | |
14 |
|
16 | |||
15 | class TMStatistics : public QWidget |
|
17 | class TMStatistics : public QWidget | |
16 | { |
|
18 | { | |
17 | Q_OBJECT |
|
19 | Q_OBJECT | |
18 | public: |
|
20 | public: | |
19 |
|
21 | |||
20 | explicit TMStatistics(QWidget *parent = 0); |
|
22 | explicit TMStatistics(QWidget *parent = 0); | |
21 | void initConstants(); |
|
23 | void initConstants(); | |
22 | void buildMonitor_BURST(); |
|
24 | void buildMonitor_BURST(); | |
23 | void buildMonitor_SBM1(); |
|
25 | void buildMonitor_SBM1(); | |
24 | void buildMonitor_SBM2(); |
|
26 | void buildMonitor_SBM2(); | |
25 | void buildMonitor_NORM(); |
|
27 | void buildMonitor_NORM(); | |
26 | void buildMonitor(); |
|
28 | void buildMonitor(); | |
27 | void incrementUnknown(); |
|
29 | void incrementUnknown(); | |
28 | // |
|
30 | // | |
29 | void preProcessPacket(TMPacketToRead *packet); |
|
31 | void preProcessPacket(TMPacketToRead *packet); | |
30 | unsigned char getPID(TMPacketToRead *packet); |
|
32 | unsigned char getPID(TMPacketToRead *packet); | |
31 | unsigned char getCAT(TMPacketToRead *packet); |
|
33 | unsigned char getCAT(TMPacketToRead *packet); | |
32 | unsigned char getTYPE(TMPacketToRead *packet); |
|
34 | unsigned char getTYPE(TMPacketToRead *packet); | |
33 | unsigned char getSUBTYPE(TMPacketToRead *packet); |
|
35 | unsigned char getSUBTYPE(TMPacketToRead *packet); | |
34 | unsigned int getLENGTH(TMPacketToRead *packet); |
|
36 | unsigned int getLENGTH(TMPacketToRead *packet); | |
35 | unsigned int getCoarseTime(TMPacketToRead *packet); |
|
37 | unsigned int getCoarseTime(TMPacketToRead *packet); | |
36 | unsigned int getFineTime(TMPacketToRead *packet); |
|
38 | unsigned int getFineTime(TMPacketToRead *packet); | |
37 | unsigned int getSID(TMPacketToRead *packet, unsigned char pid, unsigned char cat, unsigned char typ, unsigned char sub); |
|
39 | unsigned int getSID(TMPacketToRead *packet, unsigned char pid, unsigned char cat, unsigned char typ, unsigned char sub); | |
|
40 | void closeEvent(QCloseEvent *event); | |||
38 |
|
41 | |||
39 | unsigned int UNKNOWN_nb; |
|
42 | unsigned int UNKNOWN_nb; | |
40 | unsigned int SUCC_nb; |
|
43 | unsigned int SUCC_nb; | |
41 | unsigned int INCO_nb; |
|
44 | unsigned int INCO_nb; | |
42 | unsigned int NOTE_nb; |
|
45 | unsigned int NOTE_nb; | |
43 | unsigned int NOTI_nb; |
|
46 | unsigned int NOTI_nb; | |
44 | unsigned int ERRO_nb; |
|
47 | unsigned int ERRO_nb; | |
45 | unsigned int CORR_nb; |
|
48 | unsigned int CORR_nb; | |
46 | unsigned int HK_nb; |
|
49 | unsigned int HK_nb; | |
47 | unsigned int DUMP_nb; |
|
50 | unsigned int DUMP_nb; | |
48 | unsigned int NORM_SWF_F0_nb; |
|
51 | unsigned int NORM_SWF_F0_nb; | |
49 | unsigned int NORM_SWF_F1_nb; |
|
52 | unsigned int NORM_SWF_F1_nb; | |
50 | unsigned int NORM_SWF_F2_nb; |
|
53 | unsigned int NORM_SWF_F2_nb; | |
51 | unsigned int NORM_CWF_F3_nb; |
|
54 | unsigned int NORM_CWF_F3_nb; | |
52 | unsigned int NORM_ASM_F0_nb; |
|
55 | unsigned int NORM_ASM_F0_nb; | |
53 | unsigned int NORM_ASM_F1_nb; |
|
56 | unsigned int NORM_ASM_F1_nb; | |
54 | unsigned int NORM_ASM_F2_nb; |
|
57 | unsigned int NORM_ASM_F2_nb; | |
55 | unsigned int NORM_BP1_F0_nb; |
|
58 | unsigned int NORM_BP1_F0_nb; | |
56 | unsigned int NORM_BP1_F1_nb; |
|
59 | unsigned int NORM_BP1_F1_nb; | |
57 | unsigned int NORM_BP1_F2_nb; |
|
60 | unsigned int NORM_BP1_F2_nb; | |
58 | unsigned int NORM_BP2_F0_nb; |
|
61 | unsigned int NORM_BP2_F0_nb; | |
59 | unsigned int NORM_BP2_F1_nb; |
|
62 | unsigned int NORM_BP2_F1_nb; | |
60 | unsigned int NORM_BP2_F2_nb; |
|
63 | unsigned int NORM_BP2_F2_nb; | |
61 | // |
|
64 | // | |
62 | unsigned int BURST_CWF_F2_nb; |
|
65 | unsigned int BURST_CWF_F2_nb; | |
63 | unsigned int BURST_BP1_F0_nb; |
|
66 | unsigned int BURST_BP1_F0_nb; | |
64 | unsigned int BURST_BP2_F0_nb; |
|
67 | unsigned int BURST_BP2_F0_nb; | |
65 | unsigned int BURST_BP1_F1_nb; |
|
68 | unsigned int BURST_BP1_F1_nb; | |
66 | unsigned int BURST_BP2_F1_nb; |
|
69 | unsigned int BURST_BP2_F1_nb; | |
67 | unsigned int SBM1_CWF_F1_nb; |
|
70 | unsigned int SBM1_CWF_F1_nb; | |
68 | unsigned int SBM1_BP1_F0_nb; |
|
71 | unsigned int SBM1_BP1_F0_nb; | |
69 | unsigned int SBM1_BP2_F0_nb; |
|
72 | unsigned int SBM1_BP2_F0_nb; | |
70 | unsigned int SBM2_CWF_F2_nb; |
|
73 | unsigned int SBM2_CWF_F2_nb; | |
71 | unsigned int SBM2_BP1_F0_nb; |
|
74 | unsigned int SBM2_BP1_F0_nb; | |
72 | unsigned int SBM2_BP2_F0_nb; |
|
75 | unsigned int SBM2_BP2_F0_nb; | |
73 | unsigned int SBM2_BP1_F1_nb; |
|
76 | unsigned int SBM2_BP1_F1_nb; | |
74 | unsigned int SBM2_BP2_F1_nb; |
|
77 | unsigned int SBM2_BP2_F1_nb; | |
75 |
|
78 | |||
76 | //******* |
|
79 | //******* | |
77 | // QLabel |
|
80 | // QLabel | |
78 | QLabel *label_UNKNOWN; |
|
81 | QLabel *label_UNKNOWN; | |
79 | QLabel *label_UNKNOWN_nb; |
|
82 | QLabel *label_UNKNOWN_nb; | |
80 |
|
83 | |||
81 | //*************** |
|
84 | //*************** | |
82 | // TM_LFR_TC_EXE_ |
|
85 | // TM_LFR_TC_EXE_ | |
83 | QLabel *label_SUCC; |
|
86 | QLabel *label_SUCC; | |
84 | QLabel *label_INCO; |
|
87 | QLabel *label_INCO; | |
85 | QLabel *label_NOTE; |
|
88 | QLabel *label_NOTE; | |
86 | QLabel *label_NOTI; |
|
89 | QLabel *label_NOTI; | |
87 | QLabel *label_ERRO; |
|
90 | QLabel *label_ERRO; | |
88 | QLabel *label_CORR; |
|
91 | QLabel *label_CORR; | |
89 | QLabel *label_HK; |
|
92 | QLabel *label_HK; | |
90 | QLabel *label_DUMP; |
|
93 | QLabel *label_DUMP; | |
91 | // |
|
94 | // | |
92 | QLabel *label_SUCC_nb; |
|
95 | QLabel *label_SUCC_nb; | |
93 | QLabel *label_INCO_nb; |
|
96 | QLabel *label_INCO_nb; | |
94 | QLabel *label_NOTE_nb; |
|
97 | QLabel *label_NOTE_nb; | |
95 | QLabel *label_NOTI_nb; |
|
98 | QLabel *label_NOTI_nb; | |
96 | QLabel *label_ERRO_nb; |
|
99 | QLabel *label_ERRO_nb; | |
97 | QLabel *label_CORR_nb; |
|
100 | QLabel *label_CORR_nb; | |
98 | QLabel *label_HK_nb; |
|
101 | QLabel *label_HK_nb; | |
99 | QLabel *label_DUMP_nb; |
|
102 | QLabel *label_DUMP_nb; | |
100 |
|
103 | |||
101 | //*********************** |
|
104 | //*********************** | |
102 | // TM_LFR_SCIENCE_NORMAL_ |
|
105 | // TM_LFR_SCIENCE_NORMAL_ | |
103 | QLabel *label_NORM_SWF_F0; |
|
106 | QLabel *label_NORM_SWF_F0; | |
104 | QLabel *label_NORM_SWF_F1; |
|
107 | QLabel *label_NORM_SWF_F1; | |
105 | QLabel *label_NORM_SWF_F2; |
|
108 | QLabel *label_NORM_SWF_F2; | |
106 | QLabel *label_NORM_CWF_F3; |
|
109 | QLabel *label_NORM_CWF_F3; | |
107 | QLabel *label_NORM_ASM_F0; |
|
110 | QLabel *label_NORM_ASM_F0; | |
108 | QLabel *label_NORM_ASM_F1; |
|
111 | QLabel *label_NORM_ASM_F1; | |
109 | QLabel *label_NORM_ASM_F2; |
|
112 | QLabel *label_NORM_ASM_F2; | |
110 | QLabel *label_NORM_BP1_F0; |
|
113 | QLabel *label_NORM_BP1_F0; | |
111 | QLabel *label_NORM_BP1_F1; |
|
114 | QLabel *label_NORM_BP1_F1; | |
112 | QLabel *label_NORM_BP1_F2; |
|
115 | QLabel *label_NORM_BP1_F2; | |
113 | QLabel *label_NORM_BP2_F0; |
|
116 | QLabel *label_NORM_BP2_F0; | |
114 | QLabel *label_NORM_BP2_F1; |
|
117 | QLabel *label_NORM_BP2_F1; | |
115 | QLabel *label_NORM_BP2_F2; |
|
118 | QLabel *label_NORM_BP2_F2; | |
116 | // |
|
119 | // | |
117 | QLabel *label_NORM_SWF_F0_nb; |
|
120 | QLabel *label_NORM_SWF_F0_nb; | |
118 | QLabel *label_NORM_SWF_F1_nb; |
|
121 | QLabel *label_NORM_SWF_F1_nb; | |
119 | QLabel *label_NORM_SWF_F2_nb; |
|
122 | QLabel *label_NORM_SWF_F2_nb; | |
120 | QLabel *label_NORM_CWF_F3_nb; |
|
123 | QLabel *label_NORM_CWF_F3_nb; | |
121 | QLabel *label_NORM_ASM_F0_nb; |
|
124 | QLabel *label_NORM_ASM_F0_nb; | |
122 | QLabel *label_NORM_ASM_F1_nb; |
|
125 | QLabel *label_NORM_ASM_F1_nb; | |
123 | QLabel *label_NORM_ASM_F2_nb; |
|
126 | QLabel *label_NORM_ASM_F2_nb; | |
124 | QLabel *label_NORM_BP1_F0_nb; |
|
127 | QLabel *label_NORM_BP1_F0_nb; | |
125 | QLabel *label_NORM_BP1_F1_nb; |
|
128 | QLabel *label_NORM_BP1_F1_nb; | |
126 | QLabel *label_NORM_BP1_F2_nb; |
|
129 | QLabel *label_NORM_BP1_F2_nb; | |
127 | QLabel *label_NORM_BP2_F0_nb; |
|
130 | QLabel *label_NORM_BP2_F0_nb; | |
128 | QLabel *label_NORM_BP2_F1_nb; |
|
131 | QLabel *label_NORM_BP2_F1_nb; | |
129 | QLabel *label_NORM_BP2_F2_nb; |
|
132 | QLabel *label_NORM_BP2_F2_nb; | |
130 |
|
133 | |||
131 | //********************** |
|
134 | //********************** | |
132 | // TM_LFR_SCIENCE_BURST_ |
|
135 | // TM_LFR_SCIENCE_BURST_ | |
133 | QLabel *label_BURST_CWF_F2; |
|
136 | QLabel *label_BURST_CWF_F2; | |
134 | QLabel *label_BURST_BP1_F0; |
|
137 | QLabel *label_BURST_BP1_F0; | |
135 | QLabel *label_BURST_BP2_F0; |
|
138 | QLabel *label_BURST_BP2_F0; | |
136 | QLabel *label_BURST_BP1_F1; |
|
139 | QLabel *label_BURST_BP1_F1; | |
137 | QLabel *label_BURST_BP2_F1; |
|
140 | QLabel *label_BURST_BP2_F1; | |
138 | // |
|
141 | // | |
139 | QLabel *label_BURST_CWF_F2_nb; |
|
142 | QLabel *label_BURST_CWF_F2_nb; | |
140 | QLabel *label_BURST_BP1_F0_nb; |
|
143 | QLabel *label_BURST_BP1_F0_nb; | |
141 | QLabel *label_BURST_BP2_F0_nb; |
|
144 | QLabel *label_BURST_BP2_F0_nb; | |
142 | QLabel *label_BURST_BP1_F1_nb; |
|
145 | QLabel *label_BURST_BP1_F1_nb; | |
143 | QLabel *label_BURST_BP2_F1_nb; |
|
146 | QLabel *label_BURST_BP2_F1_nb; | |
144 |
|
147 | |||
145 | //********************* |
|
148 | //********************* | |
146 | // TM_LFR_SCIENCE_SBM1_ |
|
149 | // TM_LFR_SCIENCE_SBM1_ | |
147 | QLabel *label_SBM1_CWF_F1; |
|
150 | QLabel *label_SBM1_CWF_F1; | |
148 | QLabel *label_SBM1_BP1_F0; |
|
151 | QLabel *label_SBM1_BP1_F0; | |
149 | QLabel *label_SBM1_BP2_F0; |
|
152 | QLabel *label_SBM1_BP2_F0; | |
150 | // |
|
153 | // | |
151 | QLabel *label_SBM1_CWF_F1_nb; |
|
154 | QLabel *label_SBM1_CWF_F1_nb; | |
152 | QLabel *label_SBM1_BP1_F0_nb; |
|
155 | QLabel *label_SBM1_BP1_F0_nb; | |
153 | QLabel *label_SBM1_BP2_F0_nb; |
|
156 | QLabel *label_SBM1_BP2_F0_nb; | |
154 |
|
157 | |||
155 | //********************* |
|
158 | //********************* | |
156 | // TM_LFR_SCIENCE_SBM2_ |
|
159 | // TM_LFR_SCIENCE_SBM2_ | |
157 | QLabel *label_SBM2_CWF_F2; |
|
160 | QLabel *label_SBM2_CWF_F2; | |
158 | QLabel *label_SBM2_BP1_F0; |
|
161 | QLabel *label_SBM2_BP1_F0; | |
159 | QLabel *label_SBM2_BP2_F0; |
|
162 | QLabel *label_SBM2_BP2_F0; | |
160 | QLabel *label_SBM2_BP1_F1; |
|
163 | QLabel *label_SBM2_BP1_F1; | |
161 | QLabel *label_SBM2_BP2_F1; |
|
164 | QLabel *label_SBM2_BP2_F1; | |
162 | // |
|
165 | // | |
163 | QLabel *label_SBM2_CWF_F2_nb; |
|
166 | QLabel *label_SBM2_CWF_F2_nb; | |
164 | QLabel *label_SBM2_BP1_F0_nb; |
|
167 | QLabel *label_SBM2_BP1_F0_nb; | |
165 | QLabel *label_SBM2_BP2_F0_nb; |
|
168 | QLabel *label_SBM2_BP2_F0_nb; | |
166 | QLabel *label_SBM2_BP1_F1_nb; |
|
169 | QLabel *label_SBM2_BP1_F1_nb; | |
167 | QLabel *label_SBM2_BP2_F1_nb; |
|
170 | QLabel *label_SBM2_BP2_F1_nb; | |
168 |
|
171 | |||
169 | //******** |
|
172 | //******** | |
170 | // LAST TM |
|
173 | // LAST TM | |
171 | QLabel *label_PID; |
|
174 | QLabel *label_PID; | |
172 | QLabel *label_CAT; |
|
175 | QLabel *label_CAT; | |
173 | QLabel *label_TYP; |
|
176 | QLabel *label_TYP; | |
174 | QLabel *label_SUB; |
|
177 | QLabel *label_SUB; | |
175 | QLabel *label_SID; |
|
178 | QLabel *label_SID; | |
176 | QLabel *label_SIZ; |
|
179 | QLabel *label_SIZ; | |
177 | QLabel *label_coarse_time; |
|
180 | QLabel *label_coarse_time; | |
178 | QLabel *label_fine_time; |
|
181 | QLabel *label_fine_time; | |
179 | // |
|
182 | // | |
180 | QLabel *label_PID_is; |
|
183 | QLabel *label_PID_is; | |
181 | QLabel *label_CAT_is; |
|
184 | QLabel *label_CAT_is; | |
182 | QLabel *label_TYP_is; |
|
185 | QLabel *label_TYP_is; | |
183 | QLabel *label_SUB_is; |
|
186 | QLabel *label_SUB_is; | |
184 | QLabel *label_SID_is; |
|
187 | QLabel *label_SID_is; | |
185 | QLabel *label_SIZ_is; |
|
188 | QLabel *label_SIZ_is; | |
186 | QLabel *label_coarse_time_val; |
|
189 | QLabel *label_coarse_time_val; | |
187 | QLabel *label_fine_time_val; |
|
190 | QLabel *label_fine_time_val; | |
188 |
|
191 | |||
189 | // Layouts |
|
192 | // Layouts | |
190 | QGridLayout *mainLayout; |
|
193 | QGridLayout *mainLayout; | |
191 | QGridLayout *layout_stat; // TM stastictics |
|
194 | QGridLayout *layout_stat; // TM stastictics | |
192 | QGridLayout *layout_NORM; // TM_LFR_SCIENCE_NORMAL_ |
|
195 | QGridLayout *layout_NORM; // TM_LFR_SCIENCE_NORMAL_ | |
193 | QGridLayout *layout_BURST; // TM_LFR_SCIENCE_BURST_ |
|
196 | QGridLayout *layout_BURST; // TM_LFR_SCIENCE_BURST_ | |
194 | QGridLayout *layout_SBM1; // TM_LFR_SCIENCE_SBM1_ |
|
197 | QGridLayout *layout_SBM1; // TM_LFR_SCIENCE_SBM1_ | |
195 | QGridLayout *layout_SBM2; // TM_LFR_SCIENCE_SBM2_ |
|
198 | QGridLayout *layout_SBM2; // TM_LFR_SCIENCE_SBM2_ | |
196 | QGridLayout *layout_last; // last TM description |
|
199 | QGridLayout *layout_last; // last TM description | |
|
200 | QVBoxLayout *layout_record; | |||
197 |
|
201 | |||
198 | // QPushButton |
|
202 | // QPushButton | |
199 | QPushButton *button_reset_stat; |
|
203 | QPushButton *button_reset_stat; | |
|
204 | QPushButton *button_record; | |||
|
205 | QPushButton *button_chooseDir; | |||
|
206 | ||||
|
207 | QFile *logFile; | |||
|
208 | QTextStream *logFileStrm; | |||
|
209 | bool logFileEn; | |||
|
210 | QString defaultStorageDirectory; | |||
200 |
|
211 | |||
201 | // QGroupBox |
|
212 | // QGroupBox | |
202 | QGroupBox *groupbox_stat; |
|
213 | QGroupBox *groupbox_stat; | |
203 | QGroupBox *groupbox_NORM; |
|
214 | QGroupBox *groupbox_NORM; | |
204 | QGroupBox *groupbox_BURST; |
|
215 | QGroupBox *groupbox_BURST; | |
205 | QGroupBox *groupbox_SBM1; |
|
216 | QGroupBox *groupbox_SBM1; | |
206 | QGroupBox *groupbox_SBM2; |
|
217 | QGroupBox *groupbox_SBM2; | |
207 | QGroupBox *groupbox_last; |
|
218 | QGroupBox *groupbox_last; | |
|
219 | QGroupBox *groupbox_record; | |||
208 |
|
220 | |||
209 | signals: |
|
221 | signals: | |
210 |
|
222 | |||
211 | public slots: |
|
223 | public slots: | |
212 | void resetStatistics(); |
|
224 | void resetStatistics(); | |
213 | void updateStatistics(unsigned char pid, unsigned char cat, |
|
225 | void updateStatistics(unsigned char pid, unsigned char cat, | |
214 | unsigned char typ, unsigned char sub, |
|
226 | unsigned char typ, unsigned char sub, | |
215 | unsigned int sid, unsigned int length, |
|
227 | unsigned int sid, unsigned int length, | |
216 | unsigned int coarse_t, unsigned int fine_t); |
|
228 | unsigned int coarse_t, unsigned int fine_t); | |
|
229 | void storePackets(); | |||
|
230 | void buildFileName(); | |||
|
231 | void readSettings(); | |||
|
232 | void writeSettings(); | |||
|
233 | void chooseDir(); | |||
217 |
|
234 | |||
218 | }; |
|
235 | }; | |
219 |
|
236 | |||
220 | #endif // TMSTATISTICS_H |
|
237 | #endif // TMSTATISTICS_H |
@@ -1,580 +1,580 | |||||
1 | #include "pagespectra.h" |
|
1 | #include "pagespectra.h" | |
2 | #include <stdio.h> |
|
2 | #include <stdio.h> | |
3 |
|
3 | |||
4 | PageSpectra::PageSpectra(QWidget *parent) : |
|
4 | PageSpectra::PageSpectra(QWidget *parent) : | |
5 | QMainWindow(parent) |
|
5 | QMainWindow(parent) | |
6 | { |
|
6 | { | |
7 | unsigned int i = 0; |
|
7 | unsigned int i = 0; | |
8 |
|
8 | |||
9 | for (i = 0; i<6; i++) |
|
9 | for (i = 0; i<6; i++) | |
10 | { |
|
10 | { | |
11 | localIndex[i] = 0; |
|
11 | localIndex[i] = 0; | |
12 | } |
|
12 | } | |
13 |
|
13 | |||
14 | pageTitle = "default"; |
|
14 | pageTitle = "default"; | |
15 | wfPlot_v = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
15 | wfPlot_v = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
16 | wfPlot_e1 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
16 | wfPlot_e1 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
17 | wfPlot_e2 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
17 | wfPlot_e2 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
18 | wfPlot_b1 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
18 | wfPlot_b1 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
19 | wfPlot_b2 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
19 | wfPlot_b2 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
20 | // |
|
20 | // | |
21 | wfPlot_v->customPlot->setTitle("s11"); |
|
21 | wfPlot_v->customPlot->setTitle("s11"); | |
22 | wfPlot_e1->customPlot->setTitle("s22"); |
|
22 | wfPlot_e1->customPlot->setTitle("s22"); | |
23 | wfPlot_e2->customPlot->setTitle("s33"); |
|
23 | wfPlot_e2->customPlot->setTitle("s33"); | |
24 | wfPlot_b1->customPlot->setTitle("s44"); |
|
24 | wfPlot_b1->customPlot->setTitle("s44"); | |
25 | wfPlot_b2->customPlot->setTitle("s55"); |
|
25 | wfPlot_b2->customPlot->setTitle("s55"); | |
26 | // |
|
26 | // | |
27 | /*mainLayout = new QGridLayout; |
|
27 | /*mainLayout = new QGridLayout; | |
28 | mainLayout->addWidget(wfPlot_v, 0, 0, 1, 1); |
|
28 | mainLayout->addWidget(wfPlot_v, 0, 0, 1, 1); | |
29 | mainLayout->addWidget(wfPlot_e1, 0, 1, 1, 1); |
|
29 | mainLayout->addWidget(wfPlot_e1, 0, 1, 1, 1); | |
30 | mainLayout->addWidget(wfPlot_e2, 0, 2, 1, 1); |
|
30 | mainLayout->addWidget(wfPlot_e2, 0, 2, 1, 1); | |
31 | mainLayout->addWidget(wfPlot_b1, 1, 0, 1, 1); |
|
31 | mainLayout->addWidget(wfPlot_b1, 1, 0, 1, 1); | |
32 | mainLayout->addWidget(wfPlot_b2, 1, 1, 1, 1); |
|
32 | mainLayout->addWidget(wfPlot_b2, 1, 1, 1, 1); | |
33 | mainLayout->addWidget(wfPlot_b3, 1, 2, 1, 1);*/ |
|
33 | mainLayout->addWidget(wfPlot_b3, 1, 2, 1, 1);*/ | |
34 | // |
|
34 | // | |
35 | dockV = NULL; |
|
35 | dockV = NULL; | |
36 | dockE1 = NULL; |
|
36 | dockE1 = NULL; | |
37 | dockE2 = NULL; |
|
37 | dockE2 = NULL; | |
38 | dockB1 = NULL; |
|
38 | dockB1 = NULL; | |
39 | dockB2 = NULL; |
|
39 | dockB2 = NULL; | |
40 |
|
40 | |||
41 | titleWidgetV = new QWidget(); |
|
41 | titleWidgetV = new QWidget(); | |
42 | titleWidgetE1 = new QWidget(); |
|
42 | titleWidgetE1 = new QWidget(); | |
43 | titleWidgetE2 = new QWidget(); |
|
43 | titleWidgetE2 = new QWidget(); | |
44 | titleWidgetB1 = new QWidget(); |
|
44 | titleWidgetB1 = new QWidget(); | |
45 | titleWidgetB2 = new QWidget(); |
|
45 | titleWidgetB2 = new QWidget(); | |
46 |
|
46 | |||
47 | logFileName = new QLabel(); |
|
47 | logFileName = new QLabel(); | |
48 | logFile = new QFile(); |
|
48 | logFile = new QFile(); | |
49 | logFileV = new QFile(); |
|
49 | logFileV = new QFile(); | |
50 | logFileE1 = new QFile(); |
|
50 | logFileE1 = new QFile(); | |
51 | logFileE2 = new QFile(); |
|
51 | logFileE2 = new QFile(); | |
52 | logFileB1 = new QFile(); |
|
52 | logFileB1 = new QFile(); | |
53 | logFileB2 = new QFile(); |
|
53 | logFileB2 = new QFile(); | |
54 |
|
54 | |||
55 | logFileEn = false; |
|
55 | logFileEn = false; | |
56 | storageEnabledV = false; |
|
56 | storageEnabledV = false; | |
57 | storageEnabledE1 = false; |
|
57 | storageEnabledE1 = false; | |
58 | storageEnabledE2 = false; |
|
58 | storageEnabledE2 = false; | |
59 | storageEnabledB1 = false; |
|
59 | storageEnabledB1 = false; | |
60 | storageEnabledB2 = false; |
|
60 | storageEnabledB2 = false; | |
61 |
|
61 | |||
62 | createToolBar(); |
|
62 | createToolBar(); | |
63 | readSettings(); |
|
63 | readSettings(); | |
64 | } |
|
64 | } | |
65 |
|
65 | |||
66 | void PageSpectra::displayOnPlot(short *data, unsigned char num) |
|
66 | void PageSpectra::displayOnPlot(short *data, unsigned char num) | |
67 | { |
|
67 | { | |
68 | QByteArray dataByteArray; |
|
68 | QByteArray dataByteArray; | |
69 | unsigned int i; |
|
69 | unsigned int i; | |
70 |
|
70 | |||
71 | switch(num){ |
|
71 | switch(num){ | |
72 | case 0: |
|
72 | case 0: | |
73 | wfPlot_v->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
73 | wfPlot_v->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
74 | if ( (storageEnabledV == true) && (logFileV->isOpen()) ) |
|
74 | if ( (storageEnabledV == true) && (logFileV->isOpen()) ) | |
75 | { |
|
75 | { | |
76 | for (i=0; i<DEFAULT_SIZE; i++) |
|
76 | for (i=0; i<DEFAULT_SIZE; i++) | |
77 | { |
|
77 | { | |
78 | dataByteArray.clear(); |
|
78 | dataByteArray.clear(); | |
79 | dataByteArray.append(QByteArray::number(localIndex[0])); |
|
79 | dataByteArray.append(QByteArray::number(localIndex[0])); | |
80 | dataByteArray.append(' '); |
|
80 | dataByteArray.append(' '); | |
81 | dataByteArray.append(QByteArray::number(data[i])); |
|
81 | dataByteArray.append(QByteArray::number(data[i])); | |
82 | *(this->logFileStrmV) << dataByteArray << endl; |
|
82 | *(this->logFileStrmV) << dataByteArray << endl; | |
83 | localIndex[0]++; |
|
83 | localIndex[0]++; | |
84 | } |
|
84 | } | |
85 | } |
|
85 | } | |
86 | break; |
|
86 | break; | |
87 | case 1: |
|
87 | case 1: | |
88 | wfPlot_e1->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
88 | wfPlot_e1->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
89 | break; |
|
89 | break; | |
90 | case 2: |
|
90 | case 2: | |
91 | wfPlot_e2->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
91 | wfPlot_e2->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
92 | break; |
|
92 | break; | |
93 | case 3: |
|
93 | case 3: | |
94 | wfPlot_b1->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
94 | wfPlot_b1->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
95 | break; |
|
95 | break; | |
96 | case 4: |
|
96 | case 4: | |
97 | wfPlot_b2->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
97 | wfPlot_b2->displayOnPlot(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
98 | break; |
|
98 | break; | |
99 | default: |
|
99 | default: | |
100 | break; |
|
100 | break; | |
101 | } |
|
101 | } | |
102 | } |
|
102 | } | |
103 |
|
103 | |||
104 | void PageSpectra::displayOnPlotFloat(float *data, unsigned char num) |
|
104 | void PageSpectra::displayOnPlotFloat(float *data, unsigned char num) | |
105 | { |
|
105 | { | |
106 | QByteArray dataByteArray; |
|
106 | QByteArray dataByteArray; | |
107 | unsigned int i; |
|
107 | unsigned int i; | |
108 |
|
108 | |||
109 | switch(num){ |
|
109 | switch(num){ | |
110 | case 0: |
|
110 | case 0: | |
111 | wfPlot_v->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
111 | wfPlot_v->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
112 | if ( (storageEnabledV == true) && (logFileV->isOpen()) ) |
|
112 | if ( (storageEnabledV == true) && (logFileV->isOpen()) ) | |
113 | { |
|
113 | { | |
114 | for (i=0; i<DEFAULT_SIZE; i++) |
|
114 | for (i=0; i<DEFAULT_SIZE; i++) | |
115 | { |
|
115 | { | |
116 | dataByteArray.clear(); |
|
116 | dataByteArray.clear(); | |
117 | dataByteArray.append(QByteArray::number(localIndex[0])); |
|
117 | dataByteArray.append(QByteArray::number(localIndex[0])); | |
118 | dataByteArray.append(' '); |
|
118 | dataByteArray.append(' '); | |
119 | dataByteArray.append(QByteArray::number(data[i])); |
|
119 | dataByteArray.append(QByteArray::number(data[i])); | |
120 | *(this->logFileStrmV) << dataByteArray << endl; |
|
120 | *(this->logFileStrmV) << dataByteArray << endl; | |
121 | localIndex[0]++; |
|
121 | localIndex[0]++; | |
122 | } |
|
122 | } | |
123 | } |
|
123 | } | |
124 | break; |
|
124 | break; | |
125 | case 1: |
|
125 | case 1: | |
126 | wfPlot_e1->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
126 | wfPlot_e1->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
127 | break; |
|
127 | break; | |
128 | case 2: |
|
128 | case 2: | |
129 | wfPlot_e2->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
129 | wfPlot_e2->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
130 | break; |
|
130 | break; | |
131 | case 3: |
|
131 | case 3: | |
132 | wfPlot_b1->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
132 | wfPlot_b1->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
133 | break; |
|
133 | break; | |
134 | case 4: |
|
134 | case 4: | |
135 | wfPlot_b2->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); |
|
135 | wfPlot_b2->displayOnPlotFloat(data, WFDISPLAY_DEFAULT_SPECTRA_SIZE); | |
136 | break; |
|
136 | break; | |
137 | default: |
|
137 | default: | |
138 | break; |
|
138 | break; | |
139 | } |
|
139 | } | |
140 | } |
|
140 | } | |
141 |
|
141 | |||
142 | void PageSpectra::createToolBar() |
|
142 | void PageSpectra::createToolBar() | |
143 | { |
|
143 | { | |
144 | radio_v = new QRadioButton(tr("s11")); |
|
144 | radio_v = new QRadioButton(tr("s11")); | |
145 | radio_e1 = new QRadioButton(tr("s22")); |
|
145 | radio_e1 = new QRadioButton(tr("s22")); | |
146 | radio_e2 = new QRadioButton(tr("s33")); |
|
146 | radio_e2 = new QRadioButton(tr("s33")); | |
147 | radio_b1 = new QRadioButton(tr("s44")); |
|
147 | radio_b1 = new QRadioButton(tr("s44")); | |
148 |
radio_b2 = new QRadioButton(tr("s |
|
148 | radio_b2 = new QRadioButton(tr("s55")); | |
149 | radio_tabify = new QRadioButton(tr("tabify")); |
|
149 | radio_tabify = new QRadioButton(tr("tabify")); | |
150 |
|
150 | |||
151 | radio_v->setAutoExclusive(false); |
|
151 | radio_v->setAutoExclusive(false); | |
152 | radio_e1->setAutoExclusive(false); |
|
152 | radio_e1->setAutoExclusive(false); | |
153 | radio_e2->setAutoExclusive(false); |
|
153 | radio_e2->setAutoExclusive(false); | |
154 | radio_b1->setAutoExclusive(false); |
|
154 | radio_b1->setAutoExclusive(false); | |
155 | radio_b2->setAutoExclusive(false); |
|
155 | radio_b2->setAutoExclusive(false); | |
156 | radio_tabify->setAutoExclusive(false); |
|
156 | radio_tabify->setAutoExclusive(false); | |
157 |
|
157 | |||
158 | button_selectAll = new QPushButton(tr("select all")); |
|
158 | button_selectAll = new QPushButton(tr("select all")); | |
159 | button_storeWfrm = new QPushButton(tr("REC")); |
|
159 | button_storeWfrm = new QPushButton(tr("REC")); | |
160 | button_chooseDir = new QPushButton(tr("choose dir")); |
|
160 | button_chooseDir = new QPushButton(tr("choose dir")); | |
161 |
|
161 | |||
162 | myToolBar = new QToolBar("select"); |
|
162 | myToolBar = new QToolBar("select"); | |
163 |
|
163 | |||
164 | myToolBar->addWidget(radio_v); |
|
164 | myToolBar->addWidget(radio_v); | |
165 | myToolBar->addWidget(radio_e1); |
|
165 | myToolBar->addWidget(radio_e1); | |
166 | myToolBar->addWidget(radio_e2); |
|
166 | myToolBar->addWidget(radio_e2); | |
167 | myToolBar->addWidget(radio_b1); |
|
167 | myToolBar->addWidget(radio_b1); | |
168 | myToolBar->addWidget(radio_b2); |
|
168 | myToolBar->addWidget(radio_b2); | |
169 | myToolBar->addSeparator(); |
|
169 | myToolBar->addSeparator(); | |
170 | myToolBar->addWidget(button_selectAll); |
|
170 | myToolBar->addWidget(button_selectAll); | |
171 | myToolBar->addWidget(radio_tabify); |
|
171 | myToolBar->addWidget(radio_tabify); | |
172 | myToolBar->addSeparator(); |
|
172 | myToolBar->addSeparator(); | |
173 | myToolBar->addWidget(button_storeWfrm); |
|
173 | myToolBar->addWidget(button_storeWfrm); | |
174 | myToolBar->addWidget(button_chooseDir); |
|
174 | myToolBar->addWidget(button_chooseDir); | |
175 |
|
175 | |||
176 | addToolBar(Qt::LeftToolBarArea, myToolBar); |
|
176 | addToolBar(Qt::LeftToolBarArea, myToolBar); | |
177 |
|
177 | |||
178 | radio_tabify->setChecked(true); |
|
178 | radio_tabify->setChecked(true); | |
179 |
|
179 | |||
180 | connect(this->radio_v, SIGNAL(clicked(bool)), this, SLOT(actionRadioV(bool))); |
|
180 | connect(this->radio_v, SIGNAL(clicked(bool)), this, SLOT(actionRadioV(bool))); | |
181 | connect(this->radio_e1, SIGNAL(clicked(bool)), this, SLOT(actionRadioE1(bool))); |
|
181 | connect(this->radio_e1, SIGNAL(clicked(bool)), this, SLOT(actionRadioE1(bool))); | |
182 | connect(this->radio_e2, SIGNAL(clicked(bool)), this, SLOT(actionRadioE2(bool))); |
|
182 | connect(this->radio_e2, SIGNAL(clicked(bool)), this, SLOT(actionRadioE2(bool))); | |
183 | connect(this->radio_b1, SIGNAL(clicked(bool)), this, SLOT(actionRadioB1(bool))); |
|
183 | connect(this->radio_b1, SIGNAL(clicked(bool)), this, SLOT(actionRadioB1(bool))); | |
184 | connect(this->radio_b2, SIGNAL(clicked(bool)), this, SLOT(actionRadioB2(bool))); |
|
184 | connect(this->radio_b2, SIGNAL(clicked(bool)), this, SLOT(actionRadioB2(bool))); | |
185 | connect(this->button_selectAll, SIGNAL(clicked()), this, SLOT(selectAll())); |
|
185 | connect(this->button_selectAll, SIGNAL(clicked()), this, SLOT(selectAll())); | |
186 | connect(this->radio_tabify, SIGNAL(clicked(bool)), this, SLOT(organizeDocks())); |
|
186 | connect(this->radio_tabify, SIGNAL(clicked(bool)), this, SLOT(organizeDocks())); | |
187 | connect(this->button_storeWfrm, SIGNAL(clicked()), this, SLOT(storeWfrm())); |
|
187 | connect(this->button_storeWfrm, SIGNAL(clicked()), this, SLOT(storeWfrm())); | |
188 | connect(this->button_chooseDir, SIGNAL(clicked()), this, SLOT(chooseDir())); |
|
188 | connect(this->button_chooseDir, SIGNAL(clicked()), this, SLOT(chooseDir())); | |
189 | } |
|
189 | } | |
190 |
|
190 | |||
191 | void PageSpectra::actionRadioV(bool state) |
|
191 | void PageSpectra::actionRadioV(bool state) | |
192 | { |
|
192 | { | |
193 | if (state == true) |
|
193 | if (state == true) | |
194 | { |
|
194 | { | |
195 | if (dockV == NULL) |
|
195 | if (dockV == NULL) | |
196 | { |
|
196 | { | |
197 | dockV = new QDockWidget("V", this); |
|
197 | dockV = new QDockWidget("V", this); | |
198 | dockV->setWidget(wfPlot_v); |
|
198 | dockV->setWidget(wfPlot_v); | |
199 | dockV->setTitleBarWidget(titleWidgetV); |
|
199 | dockV->setTitleBarWidget(titleWidgetV); | |
200 | } |
|
200 | } | |
201 | } |
|
201 | } | |
202 | else |
|
202 | else | |
203 | { |
|
203 | { | |
204 | this->removeDockWidget(dockV); |
|
204 | this->removeDockWidget(dockV); | |
205 | } |
|
205 | } | |
206 | organizeDocks(); |
|
206 | organizeDocks(); | |
207 | } |
|
207 | } | |
208 |
|
208 | |||
209 | void PageSpectra::actionRadioE1(bool state) |
|
209 | void PageSpectra::actionRadioE1(bool state) | |
210 | { |
|
210 | { | |
211 | if (state == true) |
|
211 | if (state == true) | |
212 | { |
|
212 | { | |
213 | if (dockE1 == NULL) |
|
213 | if (dockE1 == NULL) | |
214 | { |
|
214 | { | |
215 | dockE1 = new QDockWidget("E1", this); |
|
215 | dockE1 = new QDockWidget("E1", this); | |
216 | dockE1->setWidget(wfPlot_e1); |
|
216 | dockE1->setWidget(wfPlot_e1); | |
217 | dockE1->setTitleBarWidget(titleWidgetE1); |
|
217 | dockE1->setTitleBarWidget(titleWidgetE1); | |
218 | } |
|
218 | } | |
219 | } |
|
219 | } | |
220 | else |
|
220 | else | |
221 | { |
|
221 | { | |
222 | this->removeDockWidget(dockE1); |
|
222 | this->removeDockWidget(dockE1); | |
223 | } |
|
223 | } | |
224 | organizeDocks(); |
|
224 | organizeDocks(); | |
225 | } |
|
225 | } | |
226 |
|
226 | |||
227 | void PageSpectra::actionRadioE2(bool state) |
|
227 | void PageSpectra::actionRadioE2(bool state) | |
228 | { |
|
228 | { | |
229 | if (state == true) |
|
229 | if (state == true) | |
230 | { |
|
230 | { | |
231 | if (dockE2 == NULL) |
|
231 | if (dockE2 == NULL) | |
232 | { |
|
232 | { | |
233 | dockE2 = new QDockWidget("E2", this); |
|
233 | dockE2 = new QDockWidget("E2", this); | |
234 | dockE2->setWidget(wfPlot_e2); |
|
234 | dockE2->setWidget(wfPlot_e2); | |
235 | dockE2->setTitleBarWidget(titleWidgetE2); |
|
235 | dockE2->setTitleBarWidget(titleWidgetE2); | |
236 | } |
|
236 | } | |
237 | } |
|
237 | } | |
238 | else |
|
238 | else | |
239 | { |
|
239 | { | |
240 | this->removeDockWidget(dockE2); |
|
240 | this->removeDockWidget(dockE2); | |
241 | } |
|
241 | } | |
242 | organizeDocks(); |
|
242 | organizeDocks(); | |
243 | } |
|
243 | } | |
244 |
|
244 | |||
245 | void PageSpectra::actionRadioB1(bool state) |
|
245 | void PageSpectra::actionRadioB1(bool state) | |
246 | { |
|
246 | { | |
247 | if (state == true) |
|
247 | if (state == true) | |
248 | { |
|
248 | { | |
249 | if (dockB1 == NULL) |
|
249 | if (dockB1 == NULL) | |
250 | { |
|
250 | { | |
251 | dockB1 = new QDockWidget("B1", this); |
|
251 | dockB1 = new QDockWidget("B1", this); | |
252 | dockB1->setWidget(wfPlot_b1); |
|
252 | dockB1->setWidget(wfPlot_b1); | |
253 | dockB1->setTitleBarWidget(titleWidgetB1); |
|
253 | dockB1->setTitleBarWidget(titleWidgetB1); | |
254 | } |
|
254 | } | |
255 | } |
|
255 | } | |
256 | else |
|
256 | else | |
257 | { |
|
257 | { | |
258 | this->removeDockWidget(dockB1); |
|
258 | this->removeDockWidget(dockB1); | |
259 | } |
|
259 | } | |
260 | organizeDocks(); |
|
260 | organizeDocks(); | |
261 | } |
|
261 | } | |
262 |
|
262 | |||
263 | void PageSpectra::actionRadioB2(bool state) |
|
263 | void PageSpectra::actionRadioB2(bool state) | |
264 | { |
|
264 | { | |
265 | if (state == true) |
|
265 | if (state == true) | |
266 | { |
|
266 | { | |
267 | if (dockB2 == NULL) |
|
267 | if (dockB2 == NULL) | |
268 | { |
|
268 | { | |
269 | dockB2 = new QDockWidget("B2", this); |
|
269 | dockB2 = new QDockWidget("B2", this); | |
270 | dockB2->setWidget(wfPlot_b2); |
|
270 | dockB2->setWidget(wfPlot_b2); | |
271 | dockB2->setTitleBarWidget(titleWidgetB2); |
|
271 | dockB2->setTitleBarWidget(titleWidgetB2); | |
272 | } |
|
272 | } | |
273 | } |
|
273 | } | |
274 | else |
|
274 | else | |
275 | { |
|
275 | { | |
276 | this->removeDockWidget(dockB2); |
|
276 | this->removeDockWidget(dockB2); | |
277 | } |
|
277 | } | |
278 | organizeDocks(); |
|
278 | organizeDocks(); | |
279 | } |
|
279 | } | |
280 |
|
280 | |||
281 | void PageSpectra::buildDockList() |
|
281 | void PageSpectra::buildDockList() | |
282 | { |
|
282 | { | |
283 | dockList.clear(); |
|
283 | dockList.clear(); | |
284 |
|
284 | |||
285 | if (radio_v->isChecked()) |
|
285 | if (radio_v->isChecked()) | |
286 | { |
|
286 | { | |
287 | dockList.append(dockV); |
|
287 | dockList.append(dockV); | |
288 | removeDockWidget(dockV); |
|
288 | removeDockWidget(dockV); | |
289 | } |
|
289 | } | |
290 | if (radio_e1->isChecked()) |
|
290 | if (radio_e1->isChecked()) | |
291 | { |
|
291 | { | |
292 | dockList.append(dockE1); |
|
292 | dockList.append(dockE1); | |
293 | removeDockWidget(dockE1); |
|
293 | removeDockWidget(dockE1); | |
294 | } |
|
294 | } | |
295 | if (radio_e2->isChecked()) |
|
295 | if (radio_e2->isChecked()) | |
296 | { |
|
296 | { | |
297 | dockList.append(dockE2); |
|
297 | dockList.append(dockE2); | |
298 | removeDockWidget(dockE2); |
|
298 | removeDockWidget(dockE2); | |
299 | } |
|
299 | } | |
300 | if (radio_b1->isChecked()) |
|
300 | if (radio_b1->isChecked()) | |
301 | { |
|
301 | { | |
302 | dockList.append(dockB1); |
|
302 | dockList.append(dockB1); | |
303 | removeDockWidget(dockB1); |
|
303 | removeDockWidget(dockB1); | |
304 | } |
|
304 | } | |
305 | if (radio_b2->isChecked()) |
|
305 | if (radio_b2->isChecked()) | |
306 | { |
|
306 | { | |
307 | dockList.append(dockB2); |
|
307 | dockList.append(dockB2); | |
308 | removeDockWidget(dockB2); |
|
308 | removeDockWidget(dockB2); | |
309 | } |
|
309 | } | |
310 | } |
|
310 | } | |
311 |
|
311 | |||
312 | void PageSpectra::organizeDocks() |
|
312 | void PageSpectra::organizeDocks() | |
313 | { |
|
313 | { | |
314 | if (radio_tabify->isChecked()) |
|
314 | if (radio_tabify->isChecked()) | |
315 | { |
|
315 | { | |
316 | tabify(); |
|
316 | tabify(); | |
317 | } |
|
317 | } | |
318 | else |
|
318 | else | |
319 | { |
|
319 | { | |
320 | unTabify(); |
|
320 | unTabify(); | |
321 | } |
|
321 | } | |
322 | wfPlot_v->resize(wfPlot_v->minimumSizeHint()); |
|
322 | wfPlot_v->resize(wfPlot_v->minimumSizeHint()); | |
323 | wfPlot_e1->resize(wfPlot_e1->minimumSizeHint()); |
|
323 | wfPlot_e1->resize(wfPlot_e1->minimumSizeHint()); | |
324 | wfPlot_e2->resize(wfPlot_e2->minimumSizeHint()); |
|
324 | wfPlot_e2->resize(wfPlot_e2->minimumSizeHint()); | |
325 | wfPlot_b1->resize(wfPlot_b1->minimumSizeHint()); |
|
325 | wfPlot_b1->resize(wfPlot_b1->minimumSizeHint()); | |
326 | wfPlot_b2->resize(wfPlot_b2->minimumSizeHint()); |
|
326 | wfPlot_b2->resize(wfPlot_b2->minimumSizeHint()); | |
327 | this->resize(this->minimumSizeHint()); |
|
327 | this->resize(this->minimumSizeHint()); | |
328 | } |
|
328 | } | |
329 |
|
329 | |||
330 | void PageSpectra::unTabify() |
|
330 | void PageSpectra::unTabify() | |
331 | { |
|
331 | { | |
332 | buildDockList(); |
|
332 | buildDockList(); | |
333 |
|
333 | |||
334 | switch(dockList.size()) |
|
334 | switch(dockList.size()) | |
335 | { |
|
335 | { | |
336 | case 0: |
|
336 | case 0: | |
337 | break; |
|
337 | break; | |
338 | case 1: |
|
338 | case 1: | |
339 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
339 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
340 | dockList.at(0)->show(); |
|
340 | dockList.at(0)->show(); | |
341 | break; |
|
341 | break; | |
342 | case 2: |
|
342 | case 2: | |
343 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
343 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
344 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
344 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
345 | dockList.at(0)->show(); |
|
345 | dockList.at(0)->show(); | |
346 | dockList.at(1)->show(); |
|
346 | dockList.at(1)->show(); | |
347 | break; |
|
347 | break; | |
348 | case 3: |
|
348 | case 3: | |
349 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
349 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
350 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
350 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
351 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(2)); |
|
351 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(2)); | |
352 | dockList.at(0)->show(); |
|
352 | dockList.at(0)->show(); | |
353 | dockList.at(1)->show(); |
|
353 | dockList.at(1)->show(); | |
354 | dockList.at(2)->show(); |
|
354 | dockList.at(2)->show(); | |
355 | break; |
|
355 | break; | |
356 | case 4: |
|
356 | case 4: | |
357 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
357 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
358 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
358 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
359 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(2)); |
|
359 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(2)); | |
360 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); |
|
360 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); | |
361 | dockList.at(0)->show(); |
|
361 | dockList.at(0)->show(); | |
362 | dockList.at(1)->show(); |
|
362 | dockList.at(1)->show(); | |
363 | dockList.at(2)->show(); |
|
363 | dockList.at(2)->show(); | |
364 | dockList.at(3)->show(); |
|
364 | dockList.at(3)->show(); | |
365 | break; |
|
365 | break; | |
366 | case 5: |
|
366 | case 5: | |
367 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
367 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
368 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
368 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
369 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(2)); |
|
369 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(2)); | |
370 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); |
|
370 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); | |
371 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(4)); |
|
371 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(4)); | |
372 | dockList.at(0)->show(); |
|
372 | dockList.at(0)->show(); | |
373 | dockList.at(1)->show(); |
|
373 | dockList.at(1)->show(); | |
374 | dockList.at(2)->show(); |
|
374 | dockList.at(2)->show(); | |
375 | dockList.at(3)->show(); |
|
375 | dockList.at(3)->show(); | |
376 | dockList.at(4)->show(); |
|
376 | dockList.at(4)->show(); | |
377 | break; |
|
377 | break; | |
378 | default: |
|
378 | default: | |
379 | break; |
|
379 | break; | |
380 | } |
|
380 | } | |
381 | } |
|
381 | } | |
382 |
|
382 | |||
383 | void PageSpectra::tabify() |
|
383 | void PageSpectra::tabify() | |
384 | { |
|
384 | { | |
385 | buildDockList(); |
|
385 | buildDockList(); | |
386 |
|
386 | |||
387 | switch(dockList.size()) |
|
387 | switch(dockList.size()) | |
388 | { |
|
388 | { | |
389 | case 0: |
|
389 | case 0: | |
390 | break; |
|
390 | break; | |
391 | case 1: |
|
391 | case 1: | |
392 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
392 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
393 | dockList.at(0)->show(); |
|
393 | dockList.at(0)->show(); | |
394 | break; |
|
394 | break; | |
395 | case 2: |
|
395 | case 2: | |
396 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
396 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
397 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
397 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
398 | dockList.at(0)->show(); |
|
398 | dockList.at(0)->show(); | |
399 | dockList.at(1)->show(); |
|
399 | dockList.at(1)->show(); | |
400 | break; |
|
400 | break; | |
401 | case 3: |
|
401 | case 3: | |
402 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); |
|
402 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); | |
403 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
403 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
404 | tabifyDockWidget(dockList.at(1), dockList.at(2)); |
|
404 | tabifyDockWidget(dockList.at(1), dockList.at(2)); | |
405 | dockList.at(0)->show(); |
|
405 | dockList.at(0)->show(); | |
406 | dockList.at(1)->show(); |
|
406 | dockList.at(1)->show(); | |
407 | dockList.at(2)->show(); |
|
407 | dockList.at(2)->show(); | |
408 | break; |
|
408 | break; | |
409 | case 4: |
|
409 | case 4: | |
410 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); |
|
410 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); | |
411 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
411 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
412 | tabifyDockWidget(dockList.at(1), dockList.at(2)); |
|
412 | tabifyDockWidget(dockList.at(1), dockList.at(2)); | |
413 | tabifyDockWidget(dockList.at(2), dockList.at(3)); |
|
413 | tabifyDockWidget(dockList.at(2), dockList.at(3)); | |
414 | dockList.at(0)->show(); |
|
414 | dockList.at(0)->show(); | |
415 | dockList.at(1)->show(); |
|
415 | dockList.at(1)->show(); | |
416 | dockList.at(2)->show(); |
|
416 | dockList.at(2)->show(); | |
417 | dockList.at(3)->show(); |
|
417 | dockList.at(3)->show(); | |
418 | break; |
|
418 | break; | |
419 | case 5: |
|
419 | case 5: | |
420 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); |
|
420 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); | |
421 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
421 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
422 | tabifyDockWidget(dockList.at(1), dockList.at(2)); |
|
422 | tabifyDockWidget(dockList.at(1), dockList.at(2)); | |
423 | tabifyDockWidget(dockList.at(2), dockList.at(3)); |
|
423 | tabifyDockWidget(dockList.at(2), dockList.at(3)); | |
424 | tabifyDockWidget(dockList.at(3), dockList.at(4)); |
|
424 | tabifyDockWidget(dockList.at(3), dockList.at(4)); | |
425 | dockList.at(0)->show(); |
|
425 | dockList.at(0)->show(); | |
426 | dockList.at(1)->show(); |
|
426 | dockList.at(1)->show(); | |
427 | dockList.at(2)->show(); |
|
427 | dockList.at(2)->show(); | |
428 | dockList.at(3)->show(); |
|
428 | dockList.at(3)->show(); | |
429 | dockList.at(4)->show(); |
|
429 | dockList.at(4)->show(); | |
430 | break; |
|
430 | break; | |
431 | case 6: |
|
431 | case 6: | |
432 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); |
|
432 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); | |
433 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
433 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
434 | tabifyDockWidget(dockList.at(1), dockList.at(2)); |
|
434 | tabifyDockWidget(dockList.at(1), dockList.at(2)); | |
435 | tabifyDockWidget(dockList.at(2), dockList.at(3)); |
|
435 | tabifyDockWidget(dockList.at(2), dockList.at(3)); | |
436 | tabifyDockWidget(dockList.at(3), dockList.at(4)); |
|
436 | tabifyDockWidget(dockList.at(3), dockList.at(4)); | |
437 | tabifyDockWidget(dockList.at(4), dockList.at(5)); |
|
437 | tabifyDockWidget(dockList.at(4), dockList.at(5)); | |
438 | dockList.at(0)->show(); |
|
438 | dockList.at(0)->show(); | |
439 | dockList.at(1)->show(); |
|
439 | dockList.at(1)->show(); | |
440 | dockList.at(2)->show(); |
|
440 | dockList.at(2)->show(); | |
441 | dockList.at(3)->show(); |
|
441 | dockList.at(3)->show(); | |
442 | dockList.at(4)->show(); |
|
442 | dockList.at(4)->show(); | |
443 | dockList.at(5)->show(); |
|
443 | dockList.at(5)->show(); | |
444 | break; |
|
444 | break; | |
445 | default: |
|
445 | default: | |
446 | break; |
|
446 | break; | |
447 | } |
|
447 | } | |
448 | } |
|
448 | } | |
449 |
|
449 | |||
450 | void PageSpectra::selectAll() |
|
450 | void PageSpectra::selectAll() | |
451 | { |
|
451 | { | |
452 | radio_v->click(); |
|
452 | radio_v->click(); | |
453 | radio_e1->click(); |
|
453 | radio_e1->click(); | |
454 | radio_e2->click(); |
|
454 | radio_e2->click(); | |
455 | radio_b1->click(); |
|
455 | radio_b1->click(); | |
456 | radio_b2->click(); |
|
456 | radio_b2->click(); | |
457 | } |
|
457 | } | |
458 |
|
458 | |||
459 | void PageSpectra::storeWfrm() |
|
459 | void PageSpectra::storeWfrm() | |
460 | { |
|
460 | { | |
461 | if (logFileEn == false) |
|
461 | if (logFileEn == false) | |
462 | { |
|
462 | { | |
463 | buildFileNames(); |
|
463 | buildFileNames(); | |
464 | button_storeWfrm->setText(tr("STOP")); |
|
464 | button_storeWfrm->setText(tr("STOP")); | |
465 | logFileEn = true; |
|
465 | logFileEn = true; | |
466 | } |
|
466 | } | |
467 | else |
|
467 | else | |
468 | { |
|
468 | { | |
469 | if(this->logFileV->isOpen()) this->logFileV->close(); |
|
469 | if(this->logFileV->isOpen()) this->logFileV->close(); | |
470 | if(this->logFileE1->isOpen()) this->logFileE1->close(); |
|
470 | if(this->logFileE1->isOpen()) this->logFileE1->close(); | |
471 | if(this->logFileE2->isOpen()) this->logFileE2->close(); |
|
471 | if(this->logFileE2->isOpen()) this->logFileE2->close(); | |
472 | // disable all storage |
|
472 | // disable all storage | |
473 | storageEnabledV = false; |
|
473 | storageEnabledV = false; | |
474 | storageEnabledE1 = false; |
|
474 | storageEnabledE1 = false; | |
475 | storageEnabledE2 = false; |
|
475 | storageEnabledE2 = false; | |
476 | storageEnabledB1 = false; |
|
476 | storageEnabledB1 = false; | |
477 | storageEnabledB2 = false; |
|
477 | storageEnabledB2 = false; | |
478 | button_storeWfrm->setText(tr("REC")); |
|
478 | button_storeWfrm->setText(tr("REC")); | |
479 | logFileEn = false; |
|
479 | logFileEn = false; | |
480 | } |
|
480 | } | |
481 | } |
|
481 | } | |
482 |
|
482 | |||
483 | void PageSpectra::buildFileNames() |
|
483 | void PageSpectra::buildFileNames() | |
484 | { |
|
484 | { | |
485 | QString date; |
|
485 | QString date; | |
486 | QString time; |
|
486 | QString time; | |
487 | QString prefix; |
|
487 | QString prefix; | |
488 |
|
488 | |||
489 | date = QDate::currentDate().toString(); |
|
489 | date = QDate::currentDate().toString(); | |
490 | time = QTime::currentTime().toString(); |
|
490 | time = QTime::currentTime().toString(); | |
491 |
|
491 | |||
492 | prefix = defaultStorageDirectory + "/" + date + "_" + time + "_" + pageTitle ; |
|
492 | prefix = defaultStorageDirectory + "/" + date + "_" + time + "_" + pageTitle ; | |
493 |
|
493 | |||
494 | if (radio_v->isChecked()) |
|
494 | if (radio_v->isChecked()) | |
495 | { |
|
495 | { | |
496 | if(this->logFileV->isOpen()) this->logFileV->close(); |
|
496 | if(this->logFileV->isOpen()) this->logFileV->close(); | |
497 | this->logFileV->setFileName( prefix + "_V.data"); |
|
497 | this->logFileV->setFileName( prefix + "_V.data"); | |
498 | if(this->logFileV->open(QIODevice::WriteOnly)) this->logFileStrmV = new QTextStream(this->logFileV); |
|
498 | if(this->logFileV->open(QIODevice::WriteOnly)) this->logFileStrmV = new QTextStream(this->logFileV); | |
499 | storageEnabledV = true; |
|
499 | storageEnabledV = true; | |
500 | } |
|
500 | } | |
501 | if (radio_e1->isChecked()) |
|
501 | if (radio_e1->isChecked()) | |
502 | { |
|
502 | { | |
503 | if(this->logFileE1->isOpen()) this->logFileE1->close(); |
|
503 | if(this->logFileE1->isOpen()) this->logFileE1->close(); | |
504 | this->logFileE1->setFileName( prefix + "_E1.data"); |
|
504 | this->logFileE1->setFileName( prefix + "_E1.data"); | |
505 | if(this->logFileE1->open(QIODevice::WriteOnly)) this->logFileStrmE1 = new QTextStream(this->logFileE1); |
|
505 | if(this->logFileE1->open(QIODevice::WriteOnly)) this->logFileStrmE1 = new QTextStream(this->logFileE1); | |
506 | storageEnabledE1 = true; |
|
506 | storageEnabledE1 = true; | |
507 | } |
|
507 | } | |
508 | if (radio_e2->isChecked()) |
|
508 | if (radio_e2->isChecked()) | |
509 | { |
|
509 | { | |
510 | if(this->logFileE2->isOpen()) this->logFileE2->close(); |
|
510 | if(this->logFileE2->isOpen()) this->logFileE2->close(); | |
511 | this->logFileE2->setFileName( prefix + "_E2.data"); |
|
511 | this->logFileE2->setFileName( prefix + "_E2.data"); | |
512 | if(this->logFileE2->open(QIODevice::WriteOnly)) this->logFileStrmE2 = new QTextStream(this->logFileE2); |
|
512 | if(this->logFileE2->open(QIODevice::WriteOnly)) this->logFileStrmE2 = new QTextStream(this->logFileE2); | |
513 | storageEnabledE2 = true; |
|
513 | storageEnabledE2 = true; | |
514 | } |
|
514 | } | |
515 | if (radio_b1->isChecked()) |
|
515 | if (radio_b1->isChecked()) | |
516 | { |
|
516 | { | |
517 |
|
517 | |||
518 | } |
|
518 | } | |
519 | if (radio_b2->isChecked()) |
|
519 | if (radio_b2->isChecked()) | |
520 | { |
|
520 | { | |
521 |
|
521 | |||
522 | } |
|
522 | } | |
523 | } |
|
523 | } | |
524 |
|
524 | |||
525 | void PageSpectra::logFileEnDisable(bool state) |
|
525 | void PageSpectra::logFileEnDisable(bool state) | |
526 | { |
|
526 | { | |
527 | if(state==true) |
|
527 | if(state==true) | |
528 | { |
|
528 | { | |
529 | this->logFileEn = true; |
|
529 | this->logFileEn = true; | |
530 | } |
|
530 | } | |
531 | else if(state==false) |
|
531 | else if(state==false) | |
532 | { |
|
532 | { | |
533 | this->logFileEn = false; |
|
533 | this->logFileEn = false; | |
534 | } |
|
534 | } | |
535 | } |
|
535 | } | |
536 |
|
536 | |||
537 | bool PageSpectra::islogfileenable() |
|
537 | bool PageSpectra::islogfileenable() | |
538 | { |
|
538 | { | |
539 | return this->logFileEn; |
|
539 | return this->logFileEn; | |
540 | } |
|
540 | } | |
541 |
|
541 | |||
542 | void PageSpectra::appendToLogFile(const QString & text) |
|
542 | void PageSpectra::appendToLogFile(const QString & text) | |
543 | { |
|
543 | { | |
544 | if(this->logFileEn && this->logFile->isOpen()) |
|
544 | if(this->logFileEn && this->logFile->isOpen()) | |
545 | { |
|
545 | { | |
546 | *(this->logFileStrm) << text << endl; |
|
546 | *(this->logFileStrm) << text << endl; | |
547 | } |
|
547 | } | |
548 | } |
|
548 | } | |
549 |
|
549 | |||
550 | void PageSpectra::closeEvent(QCloseEvent *event) |
|
550 | void PageSpectra::closeEvent(QCloseEvent *event) | |
551 | { |
|
551 | { | |
552 | if(this->logFile->isOpen()) |
|
552 | if(this->logFile->isOpen()) | |
553 | { |
|
553 | { | |
554 | this->logFileStrm->flush(); |
|
554 | this->logFileStrm->flush(); | |
555 | this->logFile->waitForBytesWritten(3000); |
|
555 | this->logFile->waitForBytesWritten(3000); | |
556 | this->logFile->close(); |
|
556 | this->logFile->close(); | |
557 | } |
|
557 | } | |
558 | writeSettings(); |
|
558 | writeSettings(); | |
559 | event->accept(); |
|
559 | event->accept(); | |
560 | } |
|
560 | } | |
561 |
|
561 | |||
562 | void PageSpectra::readSettings() |
|
562 | void PageSpectra::readSettings() | |
563 | { |
|
563 | { | |
564 | QSettings settings("lpp", "lfrsgse"); |
|
564 | QSettings settings("lpp", "lfrsgse"); | |
565 | defaultStorageDirectory = settings.value("defaultStorageDirectory", QDir::homePath()).toString(); |
|
565 | defaultStorageDirectory = settings.value("defaultStorageDirectory", QDir::homePath()).toString(); | |
566 | } |
|
566 | } | |
567 |
|
567 | |||
568 | void PageSpectra::writeSettings() |
|
568 | void PageSpectra::writeSettings() | |
569 | { |
|
569 | { | |
570 | QSettings settings("lpp", "lfrsgse"); |
|
570 | QSettings settings("lpp", "lfrsgse"); | |
571 | settings.setValue("defaultStorageDirectory", defaultStorageDirectory); |
|
571 | settings.setValue("defaultStorageDirectory", defaultStorageDirectory); | |
572 | } |
|
572 | } | |
573 |
|
573 | |||
574 | void PageSpectra::chooseDir() |
|
574 | void PageSpectra::chooseDir() | |
575 | { |
|
575 | { | |
576 | defaultStorageDirectory = QFileDialog::getExistingDirectory(this, |
|
576 | defaultStorageDirectory = QFileDialog::getExistingDirectory(this, | |
577 | "choose the directory", |
|
577 | "choose the directory", | |
578 | QDir::homePath(), |
|
578 | QDir::homePath(), | |
579 | QFileDialog::ShowDirsOnly); |
|
579 | QFileDialog::ShowDirsOnly); | |
580 | } |
|
580 | } |
@@ -1,195 +1,197 | |||||
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 QtCreator 2. |
|
3 | <!-- Written by QtCreator 2.8.0, 2013-08-01T09:15:42. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">0</value> |
|
7 | <value type="int">0</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | |
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
16 |
<value type="Q |
|
16 | <value type="QString" key="language">Cpp</value> | |
17 | <valuemap type="QVariantMap" key="value"> |
|
17 | <valuemap type="QVariantMap" key="value"> | |
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | </valuemap> |
|
20 | </valuemap> | |
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
22 |
<value type="Q |
|
22 | <value type="QString" key="language">QmlJS</value> | |
23 | <valuemap type="QVariantMap" key="value"> |
|
23 | <valuemap type="QVariantMap" key="value"> | |
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | </valuemap> |
|
26 | </valuemap> | |
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
|
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | |
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
45 | </valuemap> |
|
45 | </valuemap> | |
46 | </data> |
|
46 | </data> | |
47 | <data> |
|
47 | <data> | |
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
49 | <valuemap type="QVariantMap"/> |
|
49 | <valuemap type="QVariantMap"/> | |
50 | </data> |
|
50 | </data> | |
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
56 |
<value type="Q |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
66 |
<value type="Q |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
71 | </valuemap> |
|
71 | </valuemap> | |
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
76 |
<value type="Q |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
78 | <value type="QString">-w</value> |
|
78 | <value type="QString">-w</value> | |
79 | <value type="QString">-r</value> |
|
79 | <value type="QString">-r</value> | |
80 | </valuelist> |
|
80 | </valuelist> | |
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> |
|
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
84 | </valuemap> |
|
84 | </valuemap> | |
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
88 |
<value type="Q |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
89 | </valuemap> |
|
89 | </valuemap> | |
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
95 |
<value type="Q |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
97 | <value type="QString">-w</value> |
|
97 | <value type="QString">-w</value> | |
98 | <value type="QString">-r</value> |
|
98 | <value type="QString">-r</value> | |
99 | </valuelist> |
|
99 | </valuelist> | |
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> |
|
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
103 | </valuemap> |
|
103 | </valuemap> | |
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
107 |
<value type="Q |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
108 | </valuemap> |
|
108 | </valuemap> | |
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
114 |
<value type="Q |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay</value> |
|
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
125 |
<value type="Q |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
126 | </valuemap> |
|
126 | </valuemap> | |
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
130 |
<value type="Q |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
131 | </valuemap> |
|
131 | </valuemap> | |
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |||
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
134 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
135 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
136 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
141 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
143 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
144 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
144 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
145 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
146 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
147 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
147 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
148 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
148 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
149 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
149 | <value type="int">0</value> |
|
150 | <value type="int">0</value> | |
150 | <value type="int">1</value> |
|
151 | <value type="int">1</value> | |
151 | <value type="int">2</value> |
|
152 | <value type="int">2</value> | |
152 | <value type="int">3</value> |
|
153 | <value type="int">3</value> | |
153 | <value type="int">4</value> |
|
154 | <value type="int">4</value> | |
154 | <value type="int">5</value> |
|
155 | <value type="int">5</value> | |
155 | <value type="int">6</value> |
|
156 | <value type="int">6</value> | |
156 | <value type="int">7</value> |
|
157 | <value type="int">7</value> | |
157 | <value type="int">8</value> |
|
158 | <value type="int">8</value> | |
158 | <value type="int">9</value> |
|
159 | <value type="int">9</value> | |
159 | <value type="int">10</value> |
|
160 | <value type="int">10</value> | |
160 | <value type="int">11</value> |
|
161 | <value type="int">11</value> | |
161 | <value type="int">12</value> |
|
162 | <value type="int">12</value> | |
162 | <value type="int">13</value> |
|
163 | <value type="int">13</value> | |
163 | <value type="int">14</value> |
|
164 | <value type="int">14</value> | |
164 | </valuelist> |
|
165 | </valuelist> | |
|
166 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |||
|
167 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |||
165 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
168 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> | |
166 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> |
|
|||
167 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value> |
|
169 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value> | |
168 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> |
|
170 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> | |
169 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> |
|
|||
170 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> |
|
171 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value> |
|
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value> | |
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
173 |
<value type="Q |
|
174 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> | |
174 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
175 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
175 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
176 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
|
177 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |||
176 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
178 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
177 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
179 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
178 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
180 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
179 | </valuemap> |
|
181 | </valuemap> | |
180 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
182 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
181 | </valuemap> |
|
183 | </valuemap> | |
182 | </data> |
|
184 | </data> | |
183 | <data> |
|
185 | <data> | |
184 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
186 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
185 | <value type="int">1</value> |
|
187 | <value type="int">1</value> | |
186 | </data> |
|
188 | </data> | |
187 | <data> |
|
189 | <data> | |
188 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
190 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
189 |
<value type="Q |
|
191 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
190 | </data> |
|
192 | </data> | |
191 | <data> |
|
193 | <data> | |
192 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
194 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
193 |
<value type="int">1 |
|
195 | <value type="int">14</value> | |
194 | </data> |
|
196 | </data> | |
195 | </qtcreator> |
|
197 | </qtcreator> |
@@ -1,597 +1,594 | |||||
1 | #include "wfpage.h" |
|
1 | #include "wfpage.h" | |
2 | #include <stdio.h> |
|
2 | #include <stdio.h> | |
3 |
|
3 | |||
4 | WFPage::WFPage(QWidget *parent) : |
|
4 | WFPage::WFPage(QWidget *parent) : | |
5 | QMainWindow(parent) |
|
5 | QMainWindow(parent) | |
6 | { |
|
6 | { | |
7 | unsigned int i = 0; |
|
|||
8 |
|
||||
9 | for (i = 0; i<6; i++) |
|
|||
10 | { |
|
|||
11 | localIndex[i] = 0; |
|
|||
12 | } |
|
|||
13 |
|
7 | |||
14 | pageTitle = "default"; |
|
8 | pageTitle = "default"; | |
15 | wfPlot_v = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
9 | wfPlot_v = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
16 | wfPlot_e1 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
10 | wfPlot_e1 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
17 | wfPlot_e2 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
11 | wfPlot_e2 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
18 | wfPlot_b1 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
12 | wfPlot_b1 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
19 | wfPlot_b2 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
13 | wfPlot_b2 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
20 | wfPlot_b3 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
|
14 | wfPlot_b3 = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); | |
21 | // |
|
15 | // | |
22 | wfPlot_v->customPlot->setTitle("v"); |
|
16 | wfPlot_v->customPlot->setTitle("v"); | |
23 | wfPlot_e1->customPlot->setTitle("e1"); |
|
17 | wfPlot_e1->customPlot->setTitle("e1"); | |
24 | wfPlot_e2->customPlot->setTitle("e2"); |
|
18 | wfPlot_e2->customPlot->setTitle("e2"); | |
25 | wfPlot_b1->customPlot->setTitle("b1"); |
|
19 | wfPlot_b1->customPlot->setTitle("b1"); | |
26 | wfPlot_b2->customPlot->setTitle("b2"); |
|
20 | wfPlot_b2->customPlot->setTitle("b2"); | |
27 | wfPlot_b3->customPlot->setTitle("b3"); |
|
21 | wfPlot_b3->customPlot->setTitle("b3"); | |
28 | // |
|
22 | // | |
29 | /*mainLayout = new QGridLayout; |
|
23 | /*mainLayout = new QGridLayout; | |
30 | mainLayout->addWidget(wfPlot_v, 0, 0, 1, 1); |
|
24 | mainLayout->addWidget(wfPlot_v, 0, 0, 1, 1); | |
31 | mainLayout->addWidget(wfPlot_e1, 0, 1, 1, 1); |
|
25 | mainLayout->addWidget(wfPlot_e1, 0, 1, 1, 1); | |
32 | mainLayout->addWidget(wfPlot_e2, 0, 2, 1, 1); |
|
26 | mainLayout->addWidget(wfPlot_e2, 0, 2, 1, 1); | |
33 | mainLayout->addWidget(wfPlot_b1, 1, 0, 1, 1); |
|
27 | mainLayout->addWidget(wfPlot_b1, 1, 0, 1, 1); | |
34 | mainLayout->addWidget(wfPlot_b2, 1, 1, 1, 1); |
|
28 | mainLayout->addWidget(wfPlot_b2, 1, 1, 1, 1); | |
35 | mainLayout->addWidget(wfPlot_b3, 1, 2, 1, 1);*/ |
|
29 | mainLayout->addWidget(wfPlot_b3, 1, 2, 1, 1);*/ | |
36 | // |
|
30 | // | |
37 | dockV = NULL; |
|
31 | dockV = NULL; | |
38 | dockE1 = NULL; |
|
32 | dockE1 = NULL; | |
39 | dockE2 = NULL; |
|
33 | dockE2 = NULL; | |
40 | dockB1 = NULL; |
|
34 | dockB1 = NULL; | |
41 | dockB2 = NULL; |
|
35 | dockB2 = NULL; | |
42 | dockB3 = NULL; |
|
36 | dockB3 = NULL; | |
43 |
|
37 | |||
44 | titleWidgetV = new QWidget(); |
|
38 | titleWidgetV = new QWidget(); | |
45 | titleWidgetE1 = new QWidget(); |
|
39 | titleWidgetE1 = new QWidget(); | |
46 | titleWidgetE2 = new QWidget(); |
|
40 | titleWidgetE2 = new QWidget(); | |
47 | titleWidgetB1 = new QWidget(); |
|
41 | titleWidgetB1 = new QWidget(); | |
48 | titleWidgetB2 = new QWidget(); |
|
42 | titleWidgetB2 = new QWidget(); | |
49 | titleWidgetB3 = new QWidget(); |
|
43 | titleWidgetB3 = new QWidget(); | |
50 |
|
44 | |||
51 | logFileName = new QLabel(); |
|
45 | logFileName = new QLabel(); | |
52 | logFile = new QFile(); |
|
46 | logFile = new QFile(); | |
53 | logFileV = new QFile(); |
|
|||
54 | logFileE1 = new QFile(); |
|
|||
55 | logFileE2 = new QFile(); |
|
|||
56 | logFileB1 = new QFile(); |
|
|||
57 | logFileB2 = new QFile(); |
|
|||
58 | logFileB3 = new QFile(); |
|
|||
59 |
|
47 | |||
60 | logFileEn = false; |
|
48 | logFileEn = false; | |
61 |
storageEnabled |
|
49 | storageEnabled = false; | |
62 |
|
|
50 | allowDataStorage = false; | |
63 | storageEnabledE2 = false; |
|
51 | ||
64 | storageEnabledB1 = false; |
|
52 | indexOffset = 0; | |
65 | storageEnabledB2 = false; |
|
|||
66 | storageEnabledB3 = false; |
|
|||
67 |
|
53 | |||
68 | createToolBar(); |
|
54 | createToolBar(); | |
69 | readSettings(); |
|
55 | readSettings(); | |
70 | } |
|
56 | } | |
71 |
|
57 | |||
72 | void WFPage::displayOnPlot(short *data, unsigned char num) |
|
58 | void WFPage::displayOnPlot(short *data, unsigned char num) | |
73 | { |
|
59 | { | |
74 | QByteArray dataByteArray; |
|
60 | fillDataBuffer( data, num ); | |
75 | unsigned int i; |
|
|||
76 |
|
61 | |||
77 | switch(num){ |
|
62 | switch(num){ | |
78 | case 0: |
|
63 | case 0: | |
79 |
|
|
64 | wfPlot_v->displayOnPlot(data, DEFAULT_SIZE); | |
80 | if ( (storageEnabledV == true) && (logFileV->isOpen()) ) |
|
65 | break; | |
|
66 | ||||
|
67 | case 1: | |||
|
68 | wfPlot_e1->displayOnPlot(data, DEFAULT_SIZE); | |||
|
69 | break; | |||
|
70 | ||||
|
71 | case 2: | |||
|
72 | wfPlot_e2->displayOnPlot(data, DEFAULT_SIZE); | |||
|
73 | break; | |||
|
74 | ||||
|
75 | case 3: | |||
|
76 | wfPlot_b1->displayOnPlot(data, DEFAULT_SIZE); | |||
|
77 | break; | |||
|
78 | ||||
|
79 | case 4: | |||
|
80 | wfPlot_b2->displayOnPlot(data, DEFAULT_SIZE); | |||
|
81 | break; | |||
|
82 | ||||
|
83 | case 5: | |||
|
84 | wfPlot_b3->displayOnPlot(data, DEFAULT_SIZE); | |||
|
85 | break; | |||
|
86 | } | |||
|
87 | } | |||
|
88 | ||||
|
89 | void WFPage::initDataBuffer() | |||
|
90 | { | |||
|
91 | for (unsigned int i = 0; i < DEFAULT_SIZE; i++) | |||
|
92 | { | |||
|
93 | dataBuffer[i].clear(); | |||
|
94 | } | |||
|
95 | } | |||
|
96 | ||||
|
97 | void WFPage::fillDataBuffer(short *data, unsigned char num) | |||
|
98 | { | |||
|
99 | if ( (storageEnabled == true) | (allowDataStorage==true) ) // store data in buffers | |||
|
100 | { | |||
|
101 | switch(num) { | |||
|
102 | ||||
|
103 | case 0 : | |||
|
104 | initDataBuffer(); | |||
|
105 | for (unsigned int i=0; i<DEFAULT_SIZE; i++) | |||
81 | { |
|
106 | { | |
82 | for (i=0; i<DEFAULT_SIZE; i++) |
|
107 | dataBuffer[i].append(QByteArray::number(data[i])); | |
|
108 | dataBuffer[i].append(' '); | |||
|
109 | } | |||
|
110 | allowDataStorage = true; | |||
|
111 | break; | |||
|
112 | ||||
|
113 | case 1 : | |||
|
114 | case 2 : | |||
|
115 | case 3 : | |||
|
116 | case 4 : | |||
|
117 | if (allowDataStorage==true) { | |||
|
118 | for (unsigned int i=0; i<DEFAULT_SIZE; i++) | |||
83 | { |
|
119 | { | |
84 |
dataB |
|
120 | dataBuffer[i].append(QByteArray::number(data[i])); | |
85 |
dataB |
|
121 | dataBuffer[i].append(' '); | |
86 | dataByteArray.append(' '); |
|
|||
87 | dataByteArray.append(QByteArray::number(data[i])); |
|
|||
88 | *(this->logFileStrmV) << dataByteArray << endl; |
|
|||
89 | localIndex[0]++; |
|
|||
90 | } |
|
122 | } | |
91 | } |
|
123 | } | |
92 | break; |
|
124 | break; | |
93 | case 1: |
|
125 | ||
94 | wfPlot_e1->displayOnPlot(data, DEFAULT_SIZE); |
|
126 | case 5 : | |
|
127 | if (allowDataStorage==true) { | |||
|
128 | for (unsigned int i=0; i<DEFAULT_SIZE; i++) | |||
|
129 | { | |||
|
130 | dataBuffer[i].append(QByteArray::number(data[i])); | |||
|
131 | dataBuffer[i].append(' '); | |||
|
132 | } | |||
|
133 | storeDataBuffer(); | |||
|
134 | allowDataStorage = false; | |||
|
135 | } | |||
95 | break; |
|
136 | break; | |
96 | case 2: |
|
137 | ||
97 | wfPlot_e2->displayOnPlot(data, DEFAULT_SIZE); |
|
138 | default: | |
98 | break; |
|
139 | break; | |
99 | case 3: |
|
140 | ||
100 | wfPlot_b1->displayOnPlot(data, DEFAULT_SIZE); |
|
141 | } | |
101 | break; |
|
142 | } | |
102 | case 4: |
|
143 | } | |
103 | wfPlot_b2->displayOnPlot(data, DEFAULT_SIZE); |
|
144 | ||
104 | break; |
|
145 | void WFPage::storeDataBuffer() | |
105 | case 5: |
|
146 | { | |
106 | wfPlot_b3->displayOnPlot(data, DEFAULT_SIZE); |
|
147 | for (int i = 0; i < DEFAULT_SIZE; i++ ) | |
107 | break; |
|
148 | { | |
|
149 | *(this->logFileStrm) << (i + indexOffset) << " " << dataBuffer[i] << endl; | |||
|
150 | } | |||
|
151 | indexOffset = indexOffset + DEFAULT_SIZE; | |||
|
152 | if (storageEnabled == false){ | |||
|
153 | this->logFileStrm->flush(); | |||
|
154 | this->logFile->waitForBytesWritten(3000); | |||
|
155 | this->logFile->close(); | |||
108 | } |
|
156 | } | |
109 | } |
|
157 | } | |
110 |
|
158 | |||
111 | void WFPage::createToolBar() |
|
159 | void WFPage::createToolBar() | |
112 | { |
|
160 | { | |
113 | radio_v = new QRadioButton(tr("v")); |
|
161 | radio_v = new QRadioButton(tr("v")); | |
114 | radio_e1 = new QRadioButton(tr("e1")); |
|
162 | radio_e1 = new QRadioButton(tr("e1")); | |
115 | radio_e2 = new QRadioButton(tr("e2")); |
|
163 | radio_e2 = new QRadioButton(tr("e2")); | |
116 | radio_b1 = new QRadioButton(tr("b1")); |
|
164 | radio_b1 = new QRadioButton(tr("b1")); | |
117 | radio_b2 = new QRadioButton(tr("b2")); |
|
165 | radio_b2 = new QRadioButton(tr("b2")); | |
118 | radio_b3 = new QRadioButton(tr("b3")); |
|
166 | radio_b3 = new QRadioButton(tr("b3")); | |
119 | radio_tabify = new QRadioButton(tr("tabify")); |
|
167 | radio_tabify = new QRadioButton(tr("tabify")); | |
120 |
|
168 | |||
121 | radio_v->setAutoExclusive(false); |
|
169 | radio_v->setAutoExclusive(false); | |
122 | radio_e1->setAutoExclusive(false); |
|
170 | radio_e1->setAutoExclusive(false); | |
123 | radio_e2->setAutoExclusive(false); |
|
171 | radio_e2->setAutoExclusive(false); | |
124 | radio_b1->setAutoExclusive(false); |
|
172 | radio_b1->setAutoExclusive(false); | |
125 | radio_b2->setAutoExclusive(false); |
|
173 | radio_b2->setAutoExclusive(false); | |
126 | radio_b3->setAutoExclusive(false); |
|
174 | radio_b3->setAutoExclusive(false); | |
127 | radio_tabify->setAutoExclusive(false); |
|
175 | radio_tabify->setAutoExclusive(false); | |
128 |
|
176 | |||
129 | button_selectAll = new QPushButton(tr("select all")); |
|
177 | button_selectAll = new QPushButton(tr("select all")); | |
130 | button_storeWfrm = new QPushButton(tr("REC")); |
|
178 | button_storeWfrm = new QPushButton(tr("REC")); | |
131 | button_chooseDir = new QPushButton(tr("choose dir")); |
|
179 | button_chooseDir = new QPushButton(tr("choose dir")); | |
132 |
|
180 | |||
133 | myToolBar = new QToolBar("select"); |
|
181 | myToolBar = new QToolBar("select"); | |
134 |
|
182 | |||
135 | myToolBar->addWidget(radio_v); |
|
183 | myToolBar->addWidget(radio_v); | |
136 | myToolBar->addWidget(radio_e1); |
|
184 | myToolBar->addWidget(radio_e1); | |
137 | myToolBar->addWidget(radio_e2); |
|
185 | myToolBar->addWidget(radio_e2); | |
138 | myToolBar->addWidget(radio_b1); |
|
186 | myToolBar->addWidget(radio_b1); | |
139 | myToolBar->addWidget(radio_b2); |
|
187 | myToolBar->addWidget(radio_b2); | |
140 | myToolBar->addWidget(radio_b3); |
|
188 | myToolBar->addWidget(radio_b3); | |
141 | myToolBar->addSeparator(); |
|
189 | myToolBar->addSeparator(); | |
142 | myToolBar->addWidget(button_selectAll); |
|
190 | myToolBar->addWidget(button_selectAll); | |
143 | myToolBar->addWidget(radio_tabify); |
|
191 | myToolBar->addWidget(radio_tabify); | |
144 | myToolBar->addSeparator(); |
|
192 | myToolBar->addSeparator(); | |
145 | myToolBar->addWidget(button_storeWfrm); |
|
193 | myToolBar->addWidget(button_storeWfrm); | |
146 | myToolBar->addWidget(button_chooseDir); |
|
194 | myToolBar->addWidget(button_chooseDir); | |
147 |
|
195 | |||
148 | addToolBar(Qt::LeftToolBarArea, myToolBar); |
|
196 | addToolBar(Qt::LeftToolBarArea, myToolBar); | |
149 |
|
197 | |||
150 | radio_tabify->setChecked(true); |
|
198 | radio_tabify->setChecked(true); | |
151 |
|
199 | |||
152 | connect(this->radio_v, SIGNAL(clicked(bool)), this, SLOT(actionRadioV(bool))); |
|
200 | connect(this->radio_v, SIGNAL(clicked(bool)), this, SLOT(actionRadioV(bool))); | |
153 | connect(this->radio_e1, SIGNAL(clicked(bool)), this, SLOT(actionRadioE1(bool))); |
|
201 | connect(this->radio_e1, SIGNAL(clicked(bool)), this, SLOT(actionRadioE1(bool))); | |
154 | connect(this->radio_e2, SIGNAL(clicked(bool)), this, SLOT(actionRadioE2(bool))); |
|
202 | connect(this->radio_e2, SIGNAL(clicked(bool)), this, SLOT(actionRadioE2(bool))); | |
155 | connect(this->radio_b1, SIGNAL(clicked(bool)), this, SLOT(actionRadioB1(bool))); |
|
203 | connect(this->radio_b1, SIGNAL(clicked(bool)), this, SLOT(actionRadioB1(bool))); | |
156 | connect(this->radio_b2, SIGNAL(clicked(bool)), this, SLOT(actionRadioB2(bool))); |
|
204 | connect(this->radio_b2, SIGNAL(clicked(bool)), this, SLOT(actionRadioB2(bool))); | |
157 | connect(this->radio_b3, SIGNAL(clicked(bool)), this, SLOT(actionRadioB3(bool))); |
|
205 | connect(this->radio_b3, SIGNAL(clicked(bool)), this, SLOT(actionRadioB3(bool))); | |
158 | connect(this->button_selectAll, SIGNAL(clicked()), this, SLOT(selectAll())); |
|
206 | connect(this->button_selectAll, SIGNAL(clicked()), this, SLOT(selectAll())); | |
159 | connect(this->radio_tabify, SIGNAL(clicked(bool)), this, SLOT(organizeDocks())); |
|
207 | connect(this->radio_tabify, SIGNAL(clicked(bool)), this, SLOT(organizeDocks())); | |
160 | connect(this->button_storeWfrm, SIGNAL(clicked()), this, SLOT(storeWfrm())); |
|
208 | connect(this->button_storeWfrm, SIGNAL(clicked()), this, SLOT(storeWfrm())); | |
161 | connect(this->button_chooseDir, SIGNAL(clicked()), this, SLOT(chooseDir())); |
|
209 | connect(this->button_chooseDir, SIGNAL(clicked()), this, SLOT(chooseDir())); | |
162 | } |
|
210 | } | |
163 |
|
211 | |||
164 | void WFPage::actionRadioV(bool state) |
|
212 | void WFPage::actionRadioV(bool state) | |
165 | { |
|
213 | { | |
166 | if (state == true) |
|
214 | if (state == true) | |
167 | { |
|
215 | { | |
168 | if (dockV == NULL) |
|
216 | if (dockV == NULL) | |
169 | { |
|
217 | { | |
170 | dockV = new QDockWidget("V", this); |
|
218 | dockV = new QDockWidget("V", this); | |
171 | dockV->setWidget(wfPlot_v); |
|
219 | dockV->setWidget(wfPlot_v); | |
172 | dockV->setTitleBarWidget(titleWidgetV); |
|
220 | dockV->setTitleBarWidget(titleWidgetV); | |
173 | } |
|
221 | } | |
174 | } |
|
222 | } | |
175 | else |
|
223 | else | |
176 | { |
|
224 | { | |
177 | this->removeDockWidget(dockV); |
|
225 | this->removeDockWidget(dockV); | |
178 | } |
|
226 | } | |
179 | organizeDocks(); |
|
227 | organizeDocks(); | |
180 | } |
|
228 | } | |
181 |
|
229 | |||
182 | void WFPage::actionRadioE1(bool state) |
|
230 | void WFPage::actionRadioE1(bool state) | |
183 | { |
|
231 | { | |
184 | if (state == true) |
|
232 | if (state == true) | |
185 | { |
|
233 | { | |
186 | if (dockE1 == NULL) |
|
234 | if (dockE1 == NULL) | |
187 | { |
|
235 | { | |
188 | dockE1 = new QDockWidget("E1", this); |
|
236 | dockE1 = new QDockWidget("E1", this); | |
189 | dockE1->setWidget(wfPlot_e1); |
|
237 | dockE1->setWidget(wfPlot_e1); | |
190 | dockE1->setTitleBarWidget(titleWidgetE1); |
|
238 | dockE1->setTitleBarWidget(titleWidgetE1); | |
191 | } |
|
239 | } | |
192 | } |
|
240 | } | |
193 | else |
|
241 | else | |
194 | { |
|
242 | { | |
195 | this->removeDockWidget(dockE1); |
|
243 | this->removeDockWidget(dockE1); | |
196 | } |
|
244 | } | |
197 | organizeDocks(); |
|
245 | organizeDocks(); | |
198 | } |
|
246 | } | |
199 |
|
247 | |||
200 | void WFPage::actionRadioE2(bool state) |
|
248 | void WFPage::actionRadioE2(bool state) | |
201 | { |
|
249 | { | |
202 | if (state == true) |
|
250 | if (state == true) | |
203 | { |
|
251 | { | |
204 | if (dockE2 == NULL) |
|
252 | if (dockE2 == NULL) | |
205 | { |
|
253 | { | |
206 | dockE2 = new QDockWidget("E2", this); |
|
254 | dockE2 = new QDockWidget("E2", this); | |
207 | dockE2->setWidget(wfPlot_e2); |
|
255 | dockE2->setWidget(wfPlot_e2); | |
208 | dockE2->setTitleBarWidget(titleWidgetE2); |
|
256 | dockE2->setTitleBarWidget(titleWidgetE2); | |
209 | } |
|
257 | } | |
210 | } |
|
258 | } | |
211 | else |
|
259 | else | |
212 | { |
|
260 | { | |
213 | this->removeDockWidget(dockE2); |
|
261 | this->removeDockWidget(dockE2); | |
214 | } |
|
262 | } | |
215 | organizeDocks(); |
|
263 | organizeDocks(); | |
216 | } |
|
264 | } | |
217 |
|
265 | |||
218 | void WFPage::actionRadioB1(bool state) |
|
266 | void WFPage::actionRadioB1(bool state) | |
219 | { |
|
267 | { | |
220 | if (state == true) |
|
268 | if (state == true) | |
221 | { |
|
269 | { | |
222 | if (dockB1 == NULL) |
|
270 | if (dockB1 == NULL) | |
223 | { |
|
271 | { | |
224 | dockB1 = new QDockWidget("B1", this); |
|
272 | dockB1 = new QDockWidget("B1", this); | |
225 | dockB1->setWidget(wfPlot_b1); |
|
273 | dockB1->setWidget(wfPlot_b1); | |
226 | dockB1->setTitleBarWidget(titleWidgetB1); |
|
274 | dockB1->setTitleBarWidget(titleWidgetB1); | |
227 | } |
|
275 | } | |
228 | } |
|
276 | } | |
229 | else |
|
277 | else | |
230 | { |
|
278 | { | |
231 | this->removeDockWidget(dockB1); |
|
279 | this->removeDockWidget(dockB1); | |
232 | } |
|
280 | } | |
233 | organizeDocks(); |
|
281 | organizeDocks(); | |
234 | } |
|
282 | } | |
235 |
|
283 | |||
236 | void WFPage::actionRadioB2(bool state) |
|
284 | void WFPage::actionRadioB2(bool state) | |
237 | { |
|
285 | { | |
238 | if (state == true) |
|
286 | if (state == true) | |
239 | { |
|
287 | { | |
240 | if (dockB2 == NULL) |
|
288 | if (dockB2 == NULL) | |
241 | { |
|
289 | { | |
242 | dockB2 = new QDockWidget("B2", this); |
|
290 | dockB2 = new QDockWidget("B2", this); | |
243 | dockB2->setWidget(wfPlot_b2); |
|
291 | dockB2->setWidget(wfPlot_b2); | |
244 | dockB2->setTitleBarWidget(titleWidgetB2); |
|
292 | dockB2->setTitleBarWidget(titleWidgetB2); | |
245 | } |
|
293 | } | |
246 | } |
|
294 | } | |
247 | else |
|
295 | else | |
248 | { |
|
296 | { | |
249 | this->removeDockWidget(dockB2); |
|
297 | this->removeDockWidget(dockB2); | |
250 | } |
|
298 | } | |
251 | organizeDocks(); |
|
299 | organizeDocks(); | |
252 | } |
|
300 | } | |
253 |
|
301 | |||
254 | void WFPage::actionRadioB3(bool state) |
|
302 | void WFPage::actionRadioB3(bool state) | |
255 | { |
|
303 | { | |
256 | if (state == true) |
|
304 | if (state == true) | |
257 | { |
|
305 | { | |
258 | if (dockB3 == NULL) |
|
306 | if (dockB3 == NULL) | |
259 | { |
|
307 | { | |
260 | dockB3 = new QDockWidget("B3", this); |
|
308 | dockB3 = new QDockWidget("B3", this); | |
261 | dockB3->setWidget(wfPlot_b3); |
|
309 | dockB3->setWidget(wfPlot_b3); | |
262 | dockB3->setTitleBarWidget(titleWidgetB3); |
|
310 | dockB3->setTitleBarWidget(titleWidgetB3); | |
263 | } |
|
311 | } | |
264 | } |
|
312 | } | |
265 | else |
|
313 | else | |
266 | { |
|
314 | { | |
267 | this->removeDockWidget(dockB3); |
|
315 | this->removeDockWidget(dockB3); | |
268 | } |
|
316 | } | |
269 | organizeDocks(); |
|
317 | organizeDocks(); | |
270 | } |
|
318 | } | |
271 |
|
319 | |||
272 | void WFPage::buildDockList() |
|
320 | void WFPage::buildDockList() | |
273 | { |
|
321 | { | |
274 | dockList.clear(); |
|
322 | dockList.clear(); | |
275 |
|
323 | |||
276 | if (radio_v->isChecked()) |
|
324 | if (radio_v->isChecked()) | |
277 | { |
|
325 | { | |
278 | dockList.append(dockV); |
|
326 | dockList.append(dockV); | |
279 | removeDockWidget(dockV); |
|
327 | removeDockWidget(dockV); | |
280 | } |
|
328 | } | |
281 | if (radio_e1->isChecked()) |
|
329 | if (radio_e1->isChecked()) | |
282 | { |
|
330 | { | |
283 | dockList.append(dockE1); |
|
331 | dockList.append(dockE1); | |
284 | removeDockWidget(dockE1); |
|
332 | removeDockWidget(dockE1); | |
285 | } |
|
333 | } | |
286 | if (radio_e2->isChecked()) |
|
334 | if (radio_e2->isChecked()) | |
287 | { |
|
335 | { | |
288 | dockList.append(dockE2); |
|
336 | dockList.append(dockE2); | |
289 | removeDockWidget(dockE2); |
|
337 | removeDockWidget(dockE2); | |
290 | } |
|
338 | } | |
291 | if (radio_b1->isChecked()) |
|
339 | if (radio_b1->isChecked()) | |
292 | { |
|
340 | { | |
293 | dockList.append(dockB1); |
|
341 | dockList.append(dockB1); | |
294 | removeDockWidget(dockB1); |
|
342 | removeDockWidget(dockB1); | |
295 | } |
|
343 | } | |
296 | if (radio_b2->isChecked()) |
|
344 | if (radio_b2->isChecked()) | |
297 | { |
|
345 | { | |
298 | dockList.append(dockB2); |
|
346 | dockList.append(dockB2); | |
299 | removeDockWidget(dockB2); |
|
347 | removeDockWidget(dockB2); | |
300 | } |
|
348 | } | |
301 | if (radio_b3->isChecked()) |
|
349 | if (radio_b3->isChecked()) | |
302 | { |
|
350 | { | |
303 | dockList.append(dockB3); |
|
351 | dockList.append(dockB3); | |
304 | removeDockWidget(dockB3); |
|
352 | removeDockWidget(dockB3); | |
305 | } |
|
353 | } | |
306 | } |
|
354 | } | |
307 |
|
355 | |||
308 | void WFPage::organizeDocks() |
|
356 | void WFPage::organizeDocks() | |
309 | { |
|
357 | { | |
310 | if (radio_tabify->isChecked()) |
|
358 | if (radio_tabify->isChecked()) | |
311 | { |
|
359 | { | |
312 | tabify(); |
|
360 | tabify(); | |
313 | } |
|
361 | } | |
314 | else |
|
362 | else | |
315 | { |
|
363 | { | |
316 | unTabify(); |
|
364 | unTabify(); | |
317 | } |
|
365 | } | |
318 | wfPlot_v->resize(wfPlot_v->minimumSizeHint()); |
|
366 | wfPlot_v->resize(wfPlot_v->minimumSizeHint()); | |
319 | wfPlot_e1->resize(wfPlot_e1->minimumSizeHint()); |
|
367 | wfPlot_e1->resize(wfPlot_e1->minimumSizeHint()); | |
320 | wfPlot_e2->resize(wfPlot_e2->minimumSizeHint()); |
|
368 | wfPlot_e2->resize(wfPlot_e2->minimumSizeHint()); | |
321 | wfPlot_b1->resize(wfPlot_b1->minimumSizeHint()); |
|
369 | wfPlot_b1->resize(wfPlot_b1->minimumSizeHint()); | |
322 | wfPlot_b2->resize(wfPlot_b2->minimumSizeHint()); |
|
370 | wfPlot_b2->resize(wfPlot_b2->minimumSizeHint()); | |
323 | wfPlot_b3->resize(wfPlot_b3->minimumSizeHint()); |
|
371 | wfPlot_b3->resize(wfPlot_b3->minimumSizeHint()); | |
324 | this->resize(this->minimumSizeHint()); |
|
372 | this->resize(this->minimumSizeHint()); | |
325 | } |
|
373 | } | |
326 |
|
374 | |||
327 | void WFPage::unTabify() |
|
375 | void WFPage::unTabify() | |
328 | { |
|
376 | { | |
329 | buildDockList(); |
|
377 | buildDockList(); | |
330 |
|
378 | |||
331 | switch(dockList.size()) |
|
379 | switch(dockList.size()) | |
332 | { |
|
380 | { | |
333 | case 0: |
|
381 | case 0: | |
334 | break; |
|
382 | break; | |
335 | case 1: |
|
383 | case 1: | |
336 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
384 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
337 | dockList.at(0)->show(); |
|
385 | dockList.at(0)->show(); | |
338 | break; |
|
386 | break; | |
339 | case 2: |
|
387 | case 2: | |
340 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
388 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
341 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
389 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
342 | dockList.at(0)->show(); |
|
390 | dockList.at(0)->show(); | |
343 | dockList.at(1)->show(); |
|
391 | dockList.at(1)->show(); | |
344 | break; |
|
392 | break; | |
345 | case 3: |
|
393 | case 3: | |
346 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
394 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
347 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
395 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
348 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(2)); |
|
396 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(2)); | |
349 | dockList.at(0)->show(); |
|
397 | dockList.at(0)->show(); | |
350 | dockList.at(1)->show(); |
|
398 | dockList.at(1)->show(); | |
351 | dockList.at(2)->show(); |
|
399 | dockList.at(2)->show(); | |
352 | break; |
|
400 | break; | |
353 | case 4: |
|
401 | case 4: | |
354 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
402 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
355 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
403 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
356 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(2)); |
|
404 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(2)); | |
357 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); |
|
405 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); | |
358 | dockList.at(0)->show(); |
|
406 | dockList.at(0)->show(); | |
359 | dockList.at(1)->show(); |
|
407 | dockList.at(1)->show(); | |
360 | dockList.at(2)->show(); |
|
408 | dockList.at(2)->show(); | |
361 | dockList.at(3)->show(); |
|
409 | dockList.at(3)->show(); | |
362 | break; |
|
410 | break; | |
363 | case 5: |
|
411 | case 5: | |
364 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
412 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
365 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
413 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
366 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(2)); |
|
414 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(2)); | |
367 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); |
|
415 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); | |
368 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(4)); |
|
416 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(4)); | |
369 | dockList.at(0)->show(); |
|
417 | dockList.at(0)->show(); | |
370 | dockList.at(1)->show(); |
|
418 | dockList.at(1)->show(); | |
371 | dockList.at(2)->show(); |
|
419 | dockList.at(2)->show(); | |
372 | dockList.at(3)->show(); |
|
420 | dockList.at(3)->show(); | |
373 | dockList.at(4)->show(); |
|
421 | dockList.at(4)->show(); | |
374 | break; |
|
422 | break; | |
375 | case 6: |
|
423 | case 6: | |
376 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
424 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
377 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); |
|
425 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(1)); | |
378 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(2)); |
|
426 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(2)); | |
379 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); |
|
427 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(3)); | |
380 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(4)); |
|
428 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(4)); | |
381 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(5)); |
|
429 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(5)); | |
382 | dockList.at(0)->show(); |
|
430 | dockList.at(0)->show(); | |
383 | dockList.at(1)->show(); |
|
431 | dockList.at(1)->show(); | |
384 | dockList.at(2)->show(); |
|
432 | dockList.at(2)->show(); | |
385 | dockList.at(3)->show(); |
|
433 | dockList.at(3)->show(); | |
386 | dockList.at(4)->show(); |
|
434 | dockList.at(4)->show(); | |
387 | dockList.at(5)->show(); |
|
435 | dockList.at(5)->show(); | |
388 | break; |
|
436 | break; | |
389 | default: |
|
437 | default: | |
390 | break; |
|
438 | break; | |
391 | } |
|
439 | } | |
392 | } |
|
440 | } | |
393 |
|
441 | |||
394 | void WFPage::tabify() |
|
442 | void WFPage::tabify() | |
395 | { |
|
443 | { | |
396 | buildDockList(); |
|
444 | buildDockList(); | |
397 |
|
445 | |||
398 | switch(dockList.size()) |
|
446 | switch(dockList.size()) | |
399 | { |
|
447 | { | |
400 | case 0: |
|
448 | case 0: | |
401 | break; |
|
449 | break; | |
402 | case 1: |
|
450 | case 1: | |
403 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
451 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
404 | dockList.at(0)->show(); |
|
452 | dockList.at(0)->show(); | |
405 | break; |
|
453 | break; | |
406 | case 2: |
|
454 | case 2: | |
407 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); |
|
455 | addDockWidget(Qt::TopDockWidgetArea, dockList.at(0)); | |
408 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
456 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
409 | dockList.at(0)->show(); |
|
457 | dockList.at(0)->show(); | |
410 | dockList.at(1)->show(); |
|
458 | dockList.at(1)->show(); | |
411 | break; |
|
459 | break; | |
412 | case 3: |
|
460 | case 3: | |
413 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); |
|
461 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); | |
414 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
462 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
415 | tabifyDockWidget(dockList.at(1), dockList.at(2)); |
|
463 | tabifyDockWidget(dockList.at(1), dockList.at(2)); | |
416 | dockList.at(0)->show(); |
|
464 | dockList.at(0)->show(); | |
417 | dockList.at(1)->show(); |
|
465 | dockList.at(1)->show(); | |
418 | dockList.at(2)->show(); |
|
466 | dockList.at(2)->show(); | |
419 | break; |
|
467 | break; | |
420 | case 4: |
|
468 | case 4: | |
421 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); |
|
469 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); | |
422 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
470 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
423 | tabifyDockWidget(dockList.at(1), dockList.at(2)); |
|
471 | tabifyDockWidget(dockList.at(1), dockList.at(2)); | |
424 | tabifyDockWidget(dockList.at(2), dockList.at(3)); |
|
472 | tabifyDockWidget(dockList.at(2), dockList.at(3)); | |
425 | dockList.at(0)->show(); |
|
473 | dockList.at(0)->show(); | |
426 | dockList.at(1)->show(); |
|
474 | dockList.at(1)->show(); | |
427 | dockList.at(2)->show(); |
|
475 | dockList.at(2)->show(); | |
428 | dockList.at(3)->show(); |
|
476 | dockList.at(3)->show(); | |
429 | break; |
|
477 | break; | |
430 | case 5: |
|
478 | case 5: | |
431 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); |
|
479 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); | |
432 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
480 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
433 | tabifyDockWidget(dockList.at(1), dockList.at(2)); |
|
481 | tabifyDockWidget(dockList.at(1), dockList.at(2)); | |
434 | tabifyDockWidget(dockList.at(2), dockList.at(3)); |
|
482 | tabifyDockWidget(dockList.at(2), dockList.at(3)); | |
435 | tabifyDockWidget(dockList.at(3), dockList.at(4)); |
|
483 | tabifyDockWidget(dockList.at(3), dockList.at(4)); | |
436 | dockList.at(0)->show(); |
|
484 | dockList.at(0)->show(); | |
437 | dockList.at(1)->show(); |
|
485 | dockList.at(1)->show(); | |
438 | dockList.at(2)->show(); |
|
486 | dockList.at(2)->show(); | |
439 | dockList.at(3)->show(); |
|
487 | dockList.at(3)->show(); | |
440 | dockList.at(4)->show(); |
|
488 | dockList.at(4)->show(); | |
441 | break; |
|
489 | break; | |
442 | case 6: |
|
490 | case 6: | |
443 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); |
|
491 | addDockWidget(Qt::BottomDockWidgetArea, dockList.at(0)); | |
444 | tabifyDockWidget(dockList.at(0), dockList.at(1)); |
|
492 | tabifyDockWidget(dockList.at(0), dockList.at(1)); | |
445 | tabifyDockWidget(dockList.at(1), dockList.at(2)); |
|
493 | tabifyDockWidget(dockList.at(1), dockList.at(2)); | |
446 | tabifyDockWidget(dockList.at(2), dockList.at(3)); |
|
494 | tabifyDockWidget(dockList.at(2), dockList.at(3)); | |
447 | tabifyDockWidget(dockList.at(3), dockList.at(4)); |
|
495 | tabifyDockWidget(dockList.at(3), dockList.at(4)); | |
448 | tabifyDockWidget(dockList.at(4), dockList.at(5)); |
|
496 | tabifyDockWidget(dockList.at(4), dockList.at(5)); | |
449 | dockList.at(0)->show(); |
|
497 | dockList.at(0)->show(); | |
450 | dockList.at(1)->show(); |
|
498 | dockList.at(1)->show(); | |
451 | dockList.at(2)->show(); |
|
499 | dockList.at(2)->show(); | |
452 | dockList.at(3)->show(); |
|
500 | dockList.at(3)->show(); | |
453 | dockList.at(4)->show(); |
|
501 | dockList.at(4)->show(); | |
454 | dockList.at(5)->show(); |
|
502 | dockList.at(5)->show(); | |
455 | break; |
|
503 | break; | |
456 | default: |
|
504 | default: | |
457 | break; |
|
505 | break; | |
458 | } |
|
506 | } | |
459 | } |
|
507 | } | |
460 |
|
508 | |||
461 | void WFPage::selectAll() |
|
509 | void WFPage::selectAll() | |
462 | { |
|
510 | { | |
463 | radio_v->click(); |
|
511 | radio_v->click(); | |
464 | radio_e1->click(); |
|
512 | radio_e1->click(); | |
465 | radio_e2->click(); |
|
513 | radio_e2->click(); | |
466 | radio_b1->click(); |
|
514 | radio_b1->click(); | |
467 | radio_b2->click(); |
|
515 | radio_b2->click(); | |
468 | radio_b3->click(); |
|
516 | radio_b3->click(); | |
469 | } |
|
517 | } | |
470 |
|
518 | |||
471 | void WFPage::storeWfrm() |
|
519 | void WFPage::storeWfrm() | |
472 | { |
|
520 | { | |
473 | if (logFileEn == false) |
|
521 | if (logFileEn == false) | |
474 | { |
|
522 | { | |
475 |
buildFileName |
|
523 | buildFileName(); | |
|
524 | indexOffset = 0; | |||
476 | button_storeWfrm->setText(tr("STOP")); |
|
525 | button_storeWfrm->setText(tr("STOP")); | |
477 | logFileEn = true; |
|
526 | logFileEn = true; | |
478 | } |
|
527 | } | |
479 | else |
|
528 | else | |
480 | { |
|
529 | { | |
481 | if(this->logFileV->isOpen()) this->logFileV->close(); |
|
530 | // disable storage | |
482 | if(this->logFileE1->isOpen()) this->logFileE1->close(); |
|
531 | storageEnabled = false; | |
483 | if(this->logFileE2->isOpen()) this->logFileE2->close(); |
|
|||
484 | // disable all storage |
|
|||
485 | storageEnabledV = false; |
|
|||
486 | storageEnabledE1 = false; |
|
|||
487 | storageEnabledE2 = false; |
|
|||
488 | storageEnabledB1 = false; |
|
|||
489 | storageEnabledB2 = false; |
|
|||
490 | storageEnabledB3 = false; |
|
|||
491 | button_storeWfrm->setText(tr("REC")); |
|
532 | button_storeWfrm->setText(tr("REC")); | |
492 | logFileEn = false; |
|
533 | logFileEn = false; | |
493 | } |
|
534 | } | |
494 | } |
|
535 | } | |
495 |
|
536 | |||
496 |
void WFPage::buildFileName |
|
537 | void WFPage::buildFileName() | |
497 | { |
|
538 | { | |
498 | QString date; |
|
539 | QString date; | |
499 | QString time; |
|
540 | QString time; | |
500 | QString prefix; |
|
541 | QString prefix; | |
501 |
|
542 | |||
502 | date = QDate::currentDate().toString(); |
|
543 | date = QDate::currentDate().toString(); | |
503 | time = QTime::currentTime().toString(); |
|
544 | time = QTime::currentTime().toString(); | |
504 |
|
545 | |||
505 | prefix = defaultStorageDirectory + "/" + date + "_" + time + "_" + pageTitle ; |
|
546 | prefix = defaultStorageDirectory + "/" + date + "_" + time + "_" + pageTitle ; | |
506 |
|
547 | |||
507 | if (radio_v->isChecked()) |
|
548 | if(this->logFile->isOpen()) this->logFile->close(); | |
508 | { |
|
549 | this->logFile->setFileName( prefix + ".data"); | |
509 |
|
|
550 | if(this->logFile->open(QIODevice::WriteOnly)) this->logFileStrm = new QTextStream(this->logFile); | |
510 | this->logFileV->setFileName( prefix + "_V.data"); |
|
|||
511 | if(this->logFileV->open(QIODevice::WriteOnly)) this->logFileStrmV = new QTextStream(this->logFileV); |
|
|||
512 | storageEnabledV = true; |
|
|||
513 | } |
|
|||
514 | if (radio_e1->isChecked()) |
|
|||
515 | { |
|
|||
516 | if(this->logFileE1->isOpen()) this->logFileE1->close(); |
|
|||
517 | this->logFileE1->setFileName( prefix + "_E1.data"); |
|
|||
518 | if(this->logFileE1->open(QIODevice::WriteOnly)) this->logFileStrmE1 = new QTextStream(this->logFileE1); |
|
|||
519 | storageEnabledE1 = true; |
|
|||
520 | } |
|
|||
521 | if (radio_e2->isChecked()) |
|
|||
522 | { |
|
|||
523 | if(this->logFileE2->isOpen()) this->logFileE2->close(); |
|
|||
524 | this->logFileE2->setFileName( prefix + "_E2.data"); |
|
|||
525 | if(this->logFileE2->open(QIODevice::WriteOnly)) this->logFileStrmE2 = new QTextStream(this->logFileE2); |
|
|||
526 | storageEnabledE2 = true; |
|
|||
527 | } |
|
|||
528 | if (radio_b1->isChecked()) |
|
|||
529 | { |
|
|||
530 |
|
551 | |||
531 | } |
|
552 | *(this->logFileStrm) << "time V E1 E2 B1 B2 B3 " << endl; | |
532 | if (radio_b2->isChecked()) |
|
|||
533 | { |
|
|||
534 |
|
553 | |||
535 | } |
|
554 | storageEnabled = true; | |
536 | if (radio_b3->isChecked()) |
|
|||
537 | { |
|
|||
538 |
|
555 | |||
539 | } |
|
|||
540 | } |
|
556 | } | |
541 |
|
557 | |||
542 | void WFPage::logFileEnDisable(bool state) |
|
558 | void WFPage::logFileEnDisable(bool state) | |
543 | { |
|
559 | { | |
544 | if(state==true) |
|
560 | if(state==true) | |
545 | { |
|
561 | { | |
546 | this->logFileEn = true; |
|
562 | this->logFileEn = true; | |
547 | } |
|
563 | } | |
548 | else if(state==false) |
|
564 | else if(state==false) | |
549 | { |
|
565 | { | |
550 | this->logFileEn = false; |
|
566 | this->logFileEn = false; | |
551 | } |
|
567 | } | |
552 | } |
|
568 | } | |
553 |
|
569 | |||
554 | bool WFPage::islogfileenable() |
|
|||
555 | { |
|
|||
556 | return this->logFileEn; |
|
|||
557 | } |
|
|||
558 |
|
||||
559 | void WFPage::appendToLogFile(const QString & text) |
|
|||
560 | { |
|
|||
561 | if(this->logFileEn && this->logFile->isOpen()) |
|
|||
562 | { |
|
|||
563 | *(this->logFileStrm) << text << endl; |
|
|||
564 | } |
|
|||
565 | } |
|
|||
566 |
|
||||
567 | void WFPage::closeEvent(QCloseEvent *event) |
|
570 | void WFPage::closeEvent(QCloseEvent *event) | |
568 | { |
|
571 | { | |
569 | if(this->logFile->isOpen()) |
|
|||
570 | { |
|
|||
571 | this->logFileStrm->flush(); |
|
|||
572 | this->logFile->waitForBytesWritten(3000); |
|
|||
573 | this->logFile->close(); |
|
|||
574 | } |
|
|||
575 | writeSettings(); |
|
572 | writeSettings(); | |
576 | event->accept(); |
|
573 | event->accept(); | |
577 | } |
|
574 | } | |
578 |
|
575 | |||
579 | void WFPage::readSettings() |
|
576 | void WFPage::readSettings() | |
580 | { |
|
577 | { | |
581 | QSettings settings("lpp", "lfrsgse"); |
|
578 | QSettings settings("lpp", "lfrsgse"); | |
582 | defaultStorageDirectory = settings.value("defaultStorageDirectory", QDir::homePath()).toString(); |
|
579 | defaultStorageDirectory = settings.value("defaultStorageDirectory", QDir::homePath()).toString(); | |
583 | } |
|
580 | } | |
584 |
|
581 | |||
585 | void WFPage::writeSettings() |
|
582 | void WFPage::writeSettings() | |
586 | { |
|
583 | { | |
587 | QSettings settings("lpp", "lfrsgse"); |
|
584 | QSettings settings("lpp", "lfrsgse"); | |
588 | settings.setValue("defaultStorageDirectory", defaultStorageDirectory); |
|
585 | settings.setValue("defaultStorageDirectory", defaultStorageDirectory); | |
589 | } |
|
586 | } | |
590 |
|
587 | |||
591 | void WFPage::chooseDir() |
|
588 | void WFPage::chooseDir() | |
592 | { |
|
589 | { | |
593 | defaultStorageDirectory = QFileDialog::getExistingDirectory(this, |
|
590 | defaultStorageDirectory = QFileDialog::getExistingDirectory(this, | |
594 | "choose the directory", |
|
591 | "choose the directory", | |
595 | QDir::homePath(), |
|
592 | QDir::homePath(), | |
596 | QFileDialog::ShowDirsOnly); |
|
593 | QFileDialog::ShowDirsOnly); | |
597 | } |
|
594 | } |
@@ -1,134 +1,115 | |||||
1 | #ifndef WFPAGE_H |
|
1 | #ifndef WFPAGE_H | |
2 | #define WFPAGE_H |
|
2 | #define WFPAGE_H | |
3 |
|
3 | |||
4 | #include "wfdisplay_global.h" |
|
4 | #include "wfdisplay_global.h" | |
5 |
|
5 | |||
6 | #include <QtGui/QMainWindow> |
|
6 | #include <QtGui/QMainWindow> | |
7 | #include <QRadioButton> |
|
7 | #include <QRadioButton> | |
8 | #include <QPushButton> |
|
8 | #include <QPushButton> | |
9 | #include <QDockWidget> |
|
9 | #include <QDockWidget> | |
10 | #include <QToolBar> |
|
10 | #include <QToolBar> | |
11 | #include <QLabel> |
|
11 | #include <QLabel> | |
12 | #include <QFile> |
|
12 | #include <QFile> | |
13 | #include <QTextStream> |
|
13 | #include <QTextStream> | |
14 | #include <QFileDialog> |
|
14 | #include <QFileDialog> | |
15 | #include <QSettings> |
|
15 | #include <QSettings> | |
16 |
|
16 | |||
17 | #include <wfplot.h> |
|
17 | #include <wfplot.h> | |
18 | #include <wfdisplay_params.h> |
|
18 | #include <wfdisplay_params.h> | |
19 |
|
19 | |||
20 | class WFDISPLAYSHARED_EXPORT WFPage : public QMainWindow |
|
20 | class WFDISPLAYSHARED_EXPORT WFPage : public QMainWindow | |
21 | { |
|
21 | { | |
22 | Q_OBJECT |
|
22 | Q_OBJECT | |
23 | public: |
|
23 | public: | |
24 | explicit WFPage(QWidget *parent = 0); |
|
24 | explicit WFPage(QWidget *parent = 0); | |
25 |
|
25 | |||
26 | void createToolBar(); |
|
26 | void createToolBar(); | |
27 | void buildDockList(); |
|
27 | void buildDockList(); | |
28 | void unTabify(); |
|
28 | void unTabify(); | |
29 | void tabify(); |
|
29 | void tabify(); | |
30 | // STORE |
|
30 | // STORE | |
31 |
void buildFileName |
|
31 | void buildFileName(); | |
32 | bool islogfileenable(); |
|
|||
33 | void appendToLogFile(const QString & text); |
|
|||
34 | void closeEvent(QCloseEvent *event); |
|
32 | void closeEvent(QCloseEvent *event); | |
35 | void readSettings(); |
|
33 | void readSettings(); | |
36 | void writeSettings(); |
|
34 | void writeSettings(); | |
37 |
|
35 | |||
38 | bool logFileEn; |
|
36 | bool logFileEn; | |
39 |
bool storageEnabled |
|
37 | bool storageEnabled; | |
40 | bool storageEnabledE1; |
|
|||
41 | bool storageEnabledE2; |
|
|||
42 | bool storageEnabledB1; |
|
|||
43 | bool storageEnabledB2; |
|
|||
44 | bool storageEnabledB3; |
|
|||
45 |
|
38 | |||
46 | QLabel *logFileName; |
|
39 | QLabel *logFileName; | |
47 | QLabel *logFileNameV; |
|
|||
48 | QLabel *logFileNameE1; |
|
|||
49 | QLabel *logFileNameE2; |
|
|||
50 | QLabel *logFileNameB1; |
|
|||
51 | QLabel *logFileNameB2; |
|
|||
52 | QLabel *logFileNameB3; |
|
|||
53 |
|
40 | |||
54 | QWidget *titleWidgetV; |
|
41 | QWidget *titleWidgetV; | |
55 | QWidget *titleWidgetE1; |
|
42 | QWidget *titleWidgetE1; | |
56 | QWidget *titleWidgetE2; |
|
43 | QWidget *titleWidgetE2; | |
57 | QWidget *titleWidgetB1; |
|
44 | QWidget *titleWidgetB1; | |
58 | QWidget *titleWidgetB2; |
|
45 | QWidget *titleWidgetB2; | |
59 | QWidget *titleWidgetB3; |
|
46 | QWidget *titleWidgetB3; | |
60 |
|
47 | |||
|
48 | QByteArray dataBuffer[DEFAULT_SIZE]; | |||
|
49 | ||||
61 | QList<QDockWidget*> dockList; |
|
50 | QList<QDockWidget*> dockList; | |
62 |
|
51 | |||
63 | QDockWidget *dockV; |
|
52 | QDockWidget *dockV; | |
64 | QDockWidget *dockE1; |
|
53 | QDockWidget *dockE1; | |
65 | QDockWidget *dockE2; |
|
54 | QDockWidget *dockE2; | |
66 | QDockWidget *dockB1; |
|
55 | QDockWidget *dockB1; | |
67 | QDockWidget *dockB2; |
|
56 | QDockWidget *dockB2; | |
68 | QDockWidget *dockB3; |
|
57 | QDockWidget *dockB3; | |
69 |
|
58 | |||
70 | QRadioButton *radio_v; |
|
59 | QRadioButton *radio_v; | |
71 | QRadioButton *radio_e1; |
|
60 | QRadioButton *radio_e1; | |
72 | QRadioButton *radio_e2; |
|
61 | QRadioButton *radio_e2; | |
73 | QRadioButton *radio_b1; |
|
62 | QRadioButton *radio_b1; | |
74 | QRadioButton *radio_b2; |
|
63 | QRadioButton *radio_b2; | |
75 | QRadioButton *radio_b3; |
|
64 | QRadioButton *radio_b3; | |
76 | QRadioButton *radio_tabify; |
|
65 | QRadioButton *radio_tabify; | |
77 |
|
66 | |||
78 | QPushButton *button_selectAll; |
|
67 | QPushButton *button_selectAll; | |
79 | QPushButton *button_storeWfrm; |
|
68 | QPushButton *button_storeWfrm; | |
80 | QPushButton *button_chooseDir; |
|
69 | QPushButton *button_chooseDir; | |
81 |
|
70 | |||
82 | QToolBar *myToolBar; |
|
71 | QToolBar *myToolBar; | |
83 |
|
72 | |||
84 | WFPlot *wfPlot_v; |
|
73 | WFPlot *wfPlot_v; | |
85 | WFPlot *wfPlot_e1; |
|
74 | WFPlot *wfPlot_e1; | |
86 | WFPlot *wfPlot_e2; |
|
75 | WFPlot *wfPlot_e2; | |
87 | WFPlot *wfPlot_b1; |
|
76 | WFPlot *wfPlot_b1; | |
88 | WFPlot *wfPlot_b2; |
|
77 | WFPlot *wfPlot_b2; | |
89 | WFPlot *wfPlot_b3; |
|
78 | WFPlot *wfPlot_b3; | |
90 |
|
79 | |||
91 | QFile *logFile; |
|
80 | QFile *logFile; | |
92 | QFile *logFileV; |
|
|||
93 | QFile *logFileE1; |
|
|||
94 | QFile *logFileE2; |
|
|||
95 | QFile *logFileB1; |
|
|||
96 | QFile *logFileB2; |
|
|||
97 | QFile *logFileB3; |
|
|||
98 |
|
81 | |||
99 | QTextStream *logFileStrm; |
|
82 | QTextStream *logFileStrm; | |
100 | QTextStream *logFileStrmV; |
|
83 | ||
101 | QTextStream *logFileStrmE1; |
|
84 | unsigned int indexOffset; | |
102 | QTextStream *logFileStrmE2; |
|
|||
103 | QTextStream *logFileStrmB1; |
|
|||
104 | QTextStream *logFileStrmB2; |
|
|||
105 | QTextStream *logFileStrmB3; |
|
|||
106 |
|
85 | |||
107 | QString pageTitle; |
|
86 | QString pageTitle; | |
108 | QString defaultStorageDirectory; |
|
87 | QString defaultStorageDirectory; | |
109 |
|
88 | |||
110 | unsigned int localIndex[5]; |
|
|||
111 |
|
||||
112 | //QGridLayout *mainLayout; |
|
89 | //QGridLayout *mainLayout; | |
113 |
|
90 | |||
114 | void displayOnPlot(short *data, unsigned char num); |
|
91 | void displayOnPlot(short *data, unsigned char num); | |
|
92 | void initDataBuffer(); | |||
|
93 | void fillDataBuffer(short *data, unsigned char num); | |||
|
94 | void storeDataBuffer(); | |||
|
95 | ||||
|
96 | bool allowDataStorage; | |||
115 |
|
97 | |||
116 | signals: |
|
98 | signals: | |
117 | void setLogFileName(QString FileName); |
|
|||
118 |
|
99 | |||
119 | public slots: |
|
100 | public slots: | |
120 | void actionRadioV(bool state); |
|
101 | void actionRadioV(bool state); | |
121 | void actionRadioE1(bool state); |
|
102 | void actionRadioE1(bool state); | |
122 | void actionRadioE2(bool state); |
|
103 | void actionRadioE2(bool state); | |
123 | void actionRadioB1(bool state); |
|
104 | void actionRadioB1(bool state); | |
124 | void actionRadioB2(bool state); |
|
105 | void actionRadioB2(bool state); | |
125 | void actionRadioB3(bool state); |
|
106 | void actionRadioB3(bool state); | |
126 | void organizeDocks(); |
|
107 | void organizeDocks(); | |
127 | void selectAll(); |
|
108 | void selectAll(); | |
128 | void storeWfrm(); |
|
109 | void storeWfrm(); | |
129 | void logFileEnDisable(bool state); |
|
110 | void logFileEnDisable(bool state); | |
130 | void chooseDir(); |
|
111 | void chooseDir(); | |
131 |
|
112 | |||
132 | }; |
|
113 | }; | |
133 |
|
114 | |||
134 | #endif // WFPAGE_H |
|
115 | #endif // WFPAGE_H |
General Comments 0
You need to be logged in to leave comments.
Login now