@@ -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,6 +1,6 | |||
|
1 | 1 | ############################################################################# |
|
2 | 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 | 4 | # Project: PAULs_LPPMON_PLUGINS.pro |
|
5 | 5 | # Template: subdirs |
|
6 | 6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by QtCreator 2. |
|
|
3 | <!-- Written by QtCreator 2.8.0, 2013-08-01T14:58:01. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -13,13 +13,13 | |||
|
13 | 13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
14 | 14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
15 | 15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
16 |
<value type="Q |
|
|
16 | <value type="QString" key="language">Cpp</value> | |
|
17 | 17 | <valuemap type="QVariantMap" key="value"> |
|
18 | 18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
19 | 19 | </valuemap> |
|
20 | 20 | </valuemap> |
|
21 | 21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
22 |
<value type="Q |
|
|
22 | <value type="QString" key="language">QmlJS</value> | |
|
23 | 23 | <valuemap type="QVariantMap" key="value"> |
|
24 | 24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
25 | 25 | </valuemap> |
@@ -53,7 +53,7 | |||
|
53 | 53 | <valuemap type="QVariantMap"> |
|
54 | 54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | 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 | 57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
58 | 58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
59 | 59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
@@ -63,7 +63,7 | |||
|
63 | 63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
64 | 64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
65 | 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 | 67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
68 | 68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
69 | 69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
@@ -73,7 +73,7 | |||
|
73 | 73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
74 | 74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
75 | 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 | 77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
78 | 78 | <value type="QString">-w</value> |
|
79 | 79 | <value type="QString">-r</value> |
@@ -85,14 +85,14 | |||
|
85 | 85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
86 | 86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
87 | 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 | 89 | </valuemap> |
|
90 | 90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
91 | 91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
92 | 92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
93 | 93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
94 | 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 | 96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
97 | 97 | <value type="QString">-w</value> |
|
98 | 98 | <value type="QString">-r</value> |
@@ -104,14 +104,14 | |||
|
104 | 104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
105 | 105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
106 | 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 | 108 | </valuemap> |
|
109 | 109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
110 | 110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
111 | 111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
112 | 112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
113 | 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 | 115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
116 | 116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> |
|
117 | 117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
@@ -122,14 +122,15 | |||
|
122 | 122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
123 | 123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
124 | 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 | 126 | </valuemap> |
|
127 | 127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
128 | 128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
129 | 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 | 131 | </valuemap> |
|
132 | 132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
|
133 | 134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | 135 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
135 | 136 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
@@ -162,17 +163,18 | |||
|
162 | 163 | <value type="int">13</value> |
|
163 | 164 | <value type="int">14</value> |
|
164 | 165 | </valuelist> |
|
166 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
|
167 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
|
165 | 168 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
166 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> | |
|
167 | 169 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">lppmon</value> |
|
168 | 170 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> |
|
169 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> | |
|
170 | 171 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> |
|
171 | 172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run lppmon</value> |
|
172 | 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 | 175 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
175 | 176 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
177 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
|
176 | 178 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
177 | 179 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
178 | 180 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
@@ -186,10 +188,10 | |||
|
186 | 188 | </data> |
|
187 | 189 | <data> |
|
188 | 190 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
189 |
<value type="Q |
|
|
191 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
|
190 | 192 | </data> |
|
191 | 193 | <data> |
|
192 | 194 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
193 |
<value type="int">1 |
|
|
195 | <value type="int">14</value> | |
|
194 | 196 | </data> |
|
195 | 197 | </qtcreator> |
@@ -1,6 +1,6 | |||
|
1 | 1 | ############################################################################# |
|
2 |
# Makefile for building: lfrsgse |
|
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.4) on: |
|
|
2 | # Makefile for building: lfrsgse | |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Aug 1 07:46:21 2013 | |
|
4 | 4 | # Project: gselesia.pro |
|
5 | 5 | # Template: app |
|
6 | 6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro |
@@ -13,10 +13,10 CXX = g++ | |||
|
13 | 13 | DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED |
|
14 | 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 | 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 | 17 | LINK = g++ |
|
18 | 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 | 20 | AR = ar cqs |
|
21 | 21 | RANLIB = |
|
22 | 22 | QMAKE = /usr/bin/qmake-qt4 |
@@ -46,56 +46,52 OBJECTS_DIR = ./ | |||
|
46 | 46 | SOURCES = main.cpp \ |
|
47 | 47 | mainwindow.cpp \ |
|
48 | 48 | mainwindowui.cpp \ |
|
49 | ../common_PLE/qipdialogbox.cpp \ | |
|
50 | 49 | lfrxmlhandler.cpp \ |
|
51 | 50 | lfrxmlwriter.cpp \ |
|
52 | 51 | ../rmapplugin/tmstatistics.cpp \ |
|
53 | 52 | ../rmapplugin/tmpackettoread.cpp \ |
|
54 | 53 | ../rmapplugin/wfpacket.cpp \ |
|
55 | 54 | ../rmapplugin/spectrapacket.cpp \ |
|
55 | ../common_PLE/qipdialogbox.cpp \ | |
|
56 | 56 | ../common_PLE/hkdisplay.cpp \ |
|
57 | 57 | lfrxmlparser.cpp \ |
|
58 | lfrspectrogram.cpp \ | |
|
59 | parameterdump.cpp moc_mainwindow.cpp \ | |
|
58 | lfrspectrogram.cpp moc_mainwindow.cpp \ | |
|
60 | 59 | moc_mainwindowui.cpp \ |
|
61 | moc_qipdialogbox.cpp \ | |
|
62 | 60 | moc_lfrxmlhandler.cpp \ |
|
63 | 61 | moc_lfrxmlwriter.cpp \ |
|
64 | 62 | moc_tmstatistics.cpp \ |
|
65 | 63 | moc_tmpackettoread.cpp \ |
|
66 | 64 | moc_wfpacket.cpp \ |
|
67 | 65 | moc_spectrapacket.cpp \ |
|
66 | moc_qipdialogbox.cpp \ | |
|
68 | 67 | moc_hkdisplay.cpp \ |
|
69 | 68 | moc_lfrxmlparser.cpp \ |
|
70 |
moc_lfrspectrogram.cpp |
|
|
71 | moc_parameterdump.cpp | |
|
69 | moc_lfrspectrogram.cpp | |
|
72 | 70 | OBJECTS = main.o \ |
|
73 | 71 | mainwindow.o \ |
|
74 | 72 | mainwindowui.o \ |
|
75 | qipdialogbox.o \ | |
|
76 | 73 | lfrxmlhandler.o \ |
|
77 | 74 | lfrxmlwriter.o \ |
|
78 | 75 | tmstatistics.o \ |
|
79 | 76 | tmpackettoread.o \ |
|
80 | 77 | wfpacket.o \ |
|
81 | 78 | spectrapacket.o \ |
|
79 | qipdialogbox.o \ | |
|
82 | 80 | hkdisplay.o \ |
|
83 | 81 | lfrxmlparser.o \ |
|
84 | 82 | lfrspectrogram.o \ |
|
85 | parameterdump.o \ | |
|
86 | 83 | moc_mainwindow.o \ |
|
87 | 84 | moc_mainwindowui.o \ |
|
88 | moc_qipdialogbox.o \ | |
|
89 | 85 | moc_lfrxmlhandler.o \ |
|
90 | 86 | moc_lfrxmlwriter.o \ |
|
91 | 87 | moc_tmstatistics.o \ |
|
92 | 88 | moc_tmpackettoread.o \ |
|
93 | 89 | moc_wfpacket.o \ |
|
94 | 90 | moc_spectrapacket.o \ |
|
91 | moc_qipdialogbox.o \ | |
|
95 | 92 | moc_hkdisplay.o \ |
|
96 | 93 | moc_lfrxmlparser.o \ |
|
97 |
moc_lfrspectrogram.o |
|
|
98 | moc_parameterdump.o | |
|
94 | moc_lfrspectrogram.o | |
|
99 | 95 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
100 | 96 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
101 | 97 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
@@ -121,9 +117,9 DIST = /usr/lib64/qt4/mkspecs/c | |||
|
121 | 117 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
122 | 118 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
123 | 119 | gselesia.pro |
|
124 |
QMAKE_TARGET = lfrsgse |
|
|
120 | QMAKE_TARGET = lfrsgse | |
|
125 | 121 | DESTDIR = |
|
126 |
TARGET = lfrsgse |
|
|
122 | TARGET = lfrsgse | |
|
127 | 123 | |
|
128 | 124 | first: all |
|
129 | 125 | ####### Implicit rules |
@@ -213,8 +209,8 qmake: FORCE | |||
|
213 | 209 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro |
|
214 | 210 | |
|
215 | 211 | dist: |
|
216 |
@$(CHK_DIR_EXISTS) .tmp/lfrsgse |
|
|
217 |
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/lfrsgse |
|
|
212 | @$(CHK_DIR_EXISTS) .tmp/lfrsgse1.0.0 || $(MKDIR) .tmp/lfrsgse1.0.0 | |
|
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 | 216 | clean:compiler_clean |
@@ -235,26 +231,21 mocclean: compiler_moc_header_clean comp | |||
|
235 | 231 | |
|
236 | 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 | 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 | 237 | moc_mainwindow.cpp: lfrxmlhandler.h \ |
|
242 | 238 | lfrxmlwriter.h \ |
|
243 | 239 | mainwindowui.h \ |
|
244 | 240 | lfrspectrogram.h \ |
|
245 | parameterdump.h \ | |
|
246 | 241 | lfrxmlparser.h \ |
|
247 | 242 | mainwindow.h |
|
248 | 243 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp |
|
249 | 244 | |
|
250 | 245 | moc_mainwindowui.cpp: lfrspectrogram.h \ |
|
251 | parameterdump.h \ | |
|
252 | 246 | mainwindowui.h |
|
253 | 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 | 249 | moc_lfrxmlhandler.cpp: lfrxmlhandler.h |
|
259 | 250 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlhandler.h -o moc_lfrxmlhandler.cpp |
|
260 | 251 | |
@@ -273,6 +264,9 moc_wfpacket.cpp: ../rmapplugin/wfpacket | |||
|
273 | 264 | moc_spectrapacket.cpp: ../rmapplugin/spectrapacket.h |
|
274 | 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 | 270 | moc_hkdisplay.cpp: ../common_PLE/hkdisplay.h |
|
277 | 271 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/hkdisplay.h -o moc_hkdisplay.cpp |
|
278 | 272 | |
@@ -282,9 +276,6 moc_lfrxmlparser.cpp: lfrxmlparser.h | |||
|
282 | 276 | moc_lfrspectrogram.cpp: lfrspectrogram.h |
|
283 | 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 | 279 | compiler_rcc_make_all: |
|
289 | 280 | compiler_rcc_clean: |
|
290 | 281 | compiler_image_collection_make_all: qmake_image_collection.cpp |
@@ -309,7 +300,6 main.o: main.cpp mainwindow.h \ | |||
|
309 | 300 | lfrxmlwriter.h \ |
|
310 | 301 | mainwindowui.h \ |
|
311 | 302 | lfrspectrogram.h \ |
|
312 | parameterdump.h \ | |
|
313 | 303 | lfrxmlparser.h |
|
314 | 304 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp |
|
315 | 305 | |
@@ -318,18 +308,13 mainwindow.o: mainwindow.cpp mainwindow. | |||
|
318 | 308 | lfrxmlwriter.h \ |
|
319 | 309 | mainwindowui.h \ |
|
320 | 310 | lfrspectrogram.h \ |
|
321 | parameterdump.h \ | |
|
322 | 311 | lfrxmlparser.h |
|
323 | 312 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp |
|
324 | 313 | |
|
325 | 314 | mainwindowui.o: mainwindowui.cpp mainwindowui.h \ |
|
326 |
lfrspectrogram.h |
|
|
327 | parameterdump.h | |
|
315 | lfrspectrogram.h | |
|
328 | 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 | 318 | lfrxmlhandler.o: lfrxmlhandler.cpp lfrxmlhandler.h |
|
334 | 319 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlhandler.o lfrxmlhandler.cpp |
|
335 | 320 | |
@@ -348,6 +333,9 wfpacket.o: ../rmapplugin/wfpacket.cpp . | |||
|
348 | 333 | spectrapacket.o: ../rmapplugin/spectrapacket.cpp ../rmapplugin/spectrapacket.h |
|
349 | 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 | 339 | hkdisplay.o: ../common_PLE/hkdisplay.cpp ../common_PLE/hkdisplay.h |
|
352 | 340 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hkdisplay.o ../common_PLE/hkdisplay.cpp |
|
353 | 341 | |
@@ -357,18 +345,12 lfrxmlparser.o: lfrxmlparser.cpp lfrxmlp | |||
|
357 | 345 | lfrspectrogram.o: lfrspectrogram.cpp lfrspectrogram.h |
|
358 | 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 | 348 | moc_mainwindow.o: moc_mainwindow.cpp |
|
364 | 349 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp |
|
365 | 350 | |
|
366 | 351 | moc_mainwindowui.o: moc_mainwindowui.cpp |
|
367 | 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 | 354 | moc_lfrxmlhandler.o: moc_lfrxmlhandler.cpp |
|
373 | 355 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlhandler.o moc_lfrxmlhandler.cpp |
|
374 | 356 | |
@@ -387,6 +369,9 moc_wfpacket.o: moc_wfpacket.cpp | |||
|
387 | 369 | moc_spectrapacket.o: moc_spectrapacket.cpp |
|
388 | 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 | 375 | moc_hkdisplay.o: moc_hkdisplay.cpp |
|
391 | 376 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_hkdisplay.o moc_hkdisplay.cpp |
|
392 | 377 | |
@@ -396,9 +381,6 moc_lfrxmlparser.o: moc_lfrxmlparser.cpp | |||
|
396 | 381 | moc_lfrspectrogram.o: moc_lfrspectrogram.cpp |
|
397 | 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 | 384 | ####### Install |
|
403 | 385 | |
|
404 | 386 | install: FORCE |
@@ -8,7 +8,7 QT += core gui | |||
|
8 | 8 | QT += network |
|
9 | 9 | QT += xml |
|
10 | 10 | |
|
11 |
TARGET = lfrsgse |
|
|
11 | TARGET = lfrsgse | |
|
12 | 12 | TEMPLATE = app |
|
13 | 13 | |
|
14 | 14 | INCLUDEPATH += \ |
@@ -17,40 +17,40 INCLUDEPATH += \ | |||
|
17 | 17 | ../rmapplugin \ |
|
18 | 18 | ../../DEV_PLE/header \ |
|
19 | 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 | 25 | SOURCES += main.cpp\ |
|
25 | 26 | mainwindow.cpp \ |
|
26 | 27 | mainwindowui.cpp \ |
|
27 | ../common_PLE/qipdialogbox.cpp \ | |
|
28 | 28 | lfrxmlhandler.cpp \ |
|
29 | 29 | lfrxmlwriter.cpp \ |
|
30 | 30 | ../rmapplugin/tmstatistics.cpp \ |
|
31 | 31 | ../rmapplugin/tmpackettoread.cpp \ |
|
32 | 32 | ../rmapplugin/wfpacket.cpp \ |
|
33 | 33 | ../rmapplugin/spectrapacket.cpp \ |
|
34 | ../common_PLE/qipdialogbox.cpp \ | |
|
34 | 35 | ../common_PLE/hkdisplay.cpp \ |
|
35 | 36 | lfrxmlparser.cpp \ |
|
36 |
lfrspectrogram.cpp |
|
|
37 | parameterdump.cpp | |
|
37 | lfrspectrogram.cpp | |
|
38 | 38 | |
|
39 | 39 | HEADERS += mainwindow.h \ |
|
40 | 40 | mainwindowui.h \ |
|
41 | ../common_PLE/qipdialogbox.h \ | |
|
42 | 41 | lfrxmlhandler.h \ |
|
43 | 42 | lfrxmlwriter.h \ |
|
44 | 43 | ../rmapplugin/tmstatistics.h \ |
|
45 | 44 | ../rmapplugin/tmpackettoread.h \ |
|
46 | 45 | ../rmapplugin/wfpacket.h \ |
|
47 | 46 | ../rmapplugin/spectrapacket.h \ |
|
47 | ../common_PLE/qipdialogbox.h \ | |
|
48 | 48 | ../common_PLE/hkdisplay.h \ |
|
49 | 49 | ../rmapplugin/params.h \ |
|
50 | ../../DEV_PLE/header/TC_types.h \ | |
|
50 | 51 | ../../DEV_PLE/header/ccsds_types.h \ |
|
51 | 52 | lfrxmlparser.h \ |
|
52 |
lfrspectrogram.h |
|
|
53 | parameterdump.h | |
|
53 | lfrspectrogram.h | |
|
54 | 54 | |
|
55 | 55 | |
|
56 | 56 |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by QtCreator 2. |
|
|
3 | <!-- Written by QtCreator 2.8.0, 2013-08-01T09:16:13. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -13,13 +13,13 | |||
|
13 | 13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
14 | 14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
15 | 15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
16 |
<value type="Q |
|
|
16 | <value type="QString" key="language">Cpp</value> | |
|
17 | 17 | <valuemap type="QVariantMap" key="value"> |
|
18 | 18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
19 | 19 | </valuemap> |
|
20 | 20 | </valuemap> |
|
21 | 21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
22 |
<value type="Q |
|
|
22 | <value type="QString" key="language">QmlJS</value> | |
|
23 | 23 | <valuemap type="QVariantMap" key="value"> |
|
24 | 24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
25 | 25 | </valuemap> |
@@ -53,7 +53,7 | |||
|
53 | 53 | <valuemap type="QVariantMap"> |
|
54 | 54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | 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 | 57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
58 | 58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
59 | 59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
@@ -63,7 +63,7 | |||
|
63 | 63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
64 | 64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
65 | 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 | 67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
68 | 68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
69 | 69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
@@ -73,7 +73,7 | |||
|
73 | 73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
74 | 74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
75 | 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 | 77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
78 | 78 | <value type="QString">-w</value> |
|
79 | 79 | <value type="QString">-r</value> |
@@ -85,14 +85,14 | |||
|
85 | 85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
86 | 86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
87 | 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 | 89 | </valuemap> |
|
90 | 90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
91 | 91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
92 | 92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
93 | 93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
94 | 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 | 96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
97 | 97 | <value type="QString">-w</value> |
|
98 | 98 | <value type="QString">-r</value> |
@@ -104,14 +104,14 | |||
|
104 | 104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
105 | 105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
106 | 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 | 108 | </valuemap> |
|
109 | 109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
110 | 110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
111 | 111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
112 | 112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
113 | 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 | 115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
116 | 116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/gse_lesia</value> |
|
117 | 117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
@@ -122,14 +122,15 | |||
|
122 | 122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
123 | 123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
124 | 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 | 126 | </valuemap> |
|
127 | 127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
128 | 128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
129 | 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 | 131 | </valuemap> |
|
132 | 132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
|
133 | 134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | 135 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
135 | 136 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
@@ -162,18 +163,19 | |||
|
162 | 163 | <value type="int">13</value> |
|
163 | 164 | <value type="int">14</value> |
|
164 | 165 | </valuelist> |
|
166 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
|
167 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
|
165 | 168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">gselesia</value> |
|
166 | 169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
167 |
<value type="Q |
|
|
168 | <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value> | |
|
170 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/LPPMON_PLUGINS_PAUL/gse_lesia/gselesia.pro</value> | |
|
169 | 171 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
170 | 172 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">gselesia.pro</value> |
|
171 | 173 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
172 | 174 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> |
|
173 | <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/> | |
|
174 | 175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
175 | 176 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
176 | 177 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
178 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
|
177 | 179 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
178 | 180 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
179 | 181 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
@@ -187,10 +189,10 | |||
|
187 | 189 | </data> |
|
188 | 190 | <data> |
|
189 | 191 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
190 |
<value type="Q |
|
|
192 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
|
191 | 193 | </data> |
|
192 | 194 | <data> |
|
193 | 195 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
194 |
<value type="int">1 |
|
|
196 | <value type="int">14</value> | |
|
195 | 197 | </data> |
|
196 | 198 | </qtcreator> |
|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -243,85 +243,6 void MainWindow::socket_TMEcho_ServerHas | |||
|
243 | 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 | 246 | void MainWindow::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) |
|
326 | 247 | { |
|
327 | 248 | unsigned int i = 0; |
@@ -335,12 +256,12 void MainWindow::buildWFAndDisplay(TMPac | |||
|
335 | 256 | data = &packet->Value[32]; // start of the first data block; |
|
336 | 257 | j = (pkt_nr-1) * 340; |
|
337 | 258 | for ( i=0; i<blk_nr; i++ ){ |
|
338 |
wfPacket->wf_ |
|
|
339 |
wfPacket->wf_ |
|
|
340 |
wfPacket->wf_ |
|
|
341 |
wfPacket->wf_ |
|
|
342 |
wfPacket->wf_b |
|
|
343 |
wfPacket->wf_b |
|
|
259 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |
|
260 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |
|
261 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |
|
262 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |
|
263 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |
|
264 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |
|
344 | 265 | } |
|
345 | 266 | if (pkt_nr == 7) |
|
346 | 267 | { |
@@ -353,6 +274,38 void MainWindow::buildWFAndDisplay(TMPac | |||
|
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 | 309 | void MainWindow::buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket) |
|
357 | 310 | { |
|
358 | 311 | unsigned int i = 0; |
@@ -429,12 +382,12 void MainWindow::buildWFAndDisplaySBM2(T | |||
|
429 | 382 | data = &packet->Value[30]; // start of the first data block; |
|
430 | 383 | j = (pkt_nr-1) * 340; |
|
431 | 384 | for ( i=0; i<blk_nr; i++ ){ |
|
432 |
wfPacket->wf_ |
|
|
433 |
wfPacket->wf_ |
|
|
434 |
wfPacket->wf_ |
|
|
435 |
wfPacket->wf_ |
|
|
436 |
wfPacket->wf_b |
|
|
437 |
wfPacket->wf_b |
|
|
385 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); | |
|
386 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); | |
|
387 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); | |
|
388 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); | |
|
389 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); | |
|
390 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); | |
|
438 | 391 | } |
|
439 | 392 | pkt_nr = pkt_nr + 1; |
|
440 | 393 | if (blk_nr == 8) |
@@ -490,15 +443,6 void MainWindow::buildSpectrumAndDisplay | |||
|
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 | 446 | void MainWindow::resetStatistics() |
|
503 | 447 | { |
|
504 | 448 | totalOfBytes = 0; |
@@ -507,6 +451,9 void MainWindow::resetStatistics() | |||
|
507 | 451 | this->UI->totalOfPacketsHasChanged(totalOfPackets); |
|
508 | 452 | } |
|
509 | 453 | |
|
454 | //****************** | |
|
455 | // packet processing | |
|
456 | ||
|
510 | 457 | void MainWindow::processPacketStore() |
|
511 | 458 | { |
|
512 | 459 | TMPacketToRead *packet; |
@@ -518,6 +465,97 void MainWindow::processPacketStore() | |||
|
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 | 559 | void MainWindow::readSettings() |
|
522 | 560 | { |
|
523 | 561 | QSettings settings("lpp", "lfrsgse"); |
@@ -37,6 +37,7 public: | |||
|
37 | 37 | unsigned int getSID(TMPacketToRead *packet, unsigned char pid, unsigned char cat, unsigned char typ, unsigned char sub); |
|
38 | 38 | // |
|
39 | 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 | 41 | void buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket); |
|
41 | 42 | void buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket); |
|
42 | 43 | void buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket); |
@@ -14,11 +14,11 | |||
|
14 | 14 | |
|
15 | 15 | #include <wfdisplay.h> |
|
16 | 16 | #include <pagespectra.h> |
|
17 | #include <parameterdump.h> | |
|
17 | 18 | |
|
18 | 19 | #include "tmstatistics.h" |
|
19 | 20 | #include "hkdisplay.h" |
|
20 | 21 | #include "lfrspectrogram.h" |
|
21 | #include "parameterdump.h" | |
|
22 | 22 | |
|
23 | 23 | class MainWindowUI : public QWidget |
|
24 | 24 | { |
@@ -1,6 +1,6 | |||
|
1 | 1 | ############################################################################# |
|
2 | 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 | 4 | # Project: rmapplugin.pro |
|
5 | 5 | # Template: lib |
|
6 | 6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
@@ -13,10 +13,10 CXX = g++ | |||
|
13 | 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 | 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 | 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 | 17 | LINK = g++ |
|
18 | 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 | 20 | AR = ar cqs |
|
21 | 21 | RANLIB = |
|
22 | 22 | QMAKE = /usr/bin/qmake-qt4 |
@@ -57,6 +57,8 SOURCES = rmapplugin.cpp \ | |||
|
57 | 57 | tmstatistics.cpp \ |
|
58 | 58 | wfpacket.cpp \ |
|
59 | 59 | tmechobridge.cpp \ |
|
60 | entermode.cpp \ | |
|
61 | lfractions.cpp \ | |
|
60 | 62 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \ |
|
61 | 63 | moc/moc_rmapplugin.cpp \ |
|
62 | 64 | moc/moc_qipdialogbox.cpp \ |
@@ -69,6 +71,8 SOURCES = rmapplugin.cpp \ | |||
|
69 | 71 | moc/moc_tmstatistics.cpp \ |
|
70 | 72 | moc/moc_wfpacket.cpp \ |
|
71 | 73 | moc/moc_tmechobridge.cpp \ |
|
74 | moc/moc_entermode.cpp \ | |
|
75 | moc/moc_lfractions.cpp \ | |
|
72 | 76 | moc/moc_genericPySysdriver.cpp \ |
|
73 | 77 | moc/moc_lppmonplugin.cpp |
|
74 | 78 | OBJECTS = obj/rmapplugin.o \ |
@@ -85,6 +89,8 OBJECTS = obj/rmapplugin.o \ | |||
|
85 | 89 | obj/tmstatistics.o \ |
|
86 | 90 | obj/wfpacket.o \ |
|
87 | 91 | obj/tmechobridge.o \ |
|
92 | obj/entermode.o \ | |
|
93 | obj/lfractions.o \ | |
|
88 | 94 | obj/lppmonplugininterface.o \ |
|
89 | 95 | obj/moc_rmappluginui.o \ |
|
90 | 96 | obj/moc_rmapplugin.o \ |
@@ -98,6 +104,8 OBJECTS = obj/rmapplugin.o \ | |||
|
98 | 104 | obj/moc_tmstatistics.o \ |
|
99 | 105 | obj/moc_wfpacket.o \ |
|
100 | 106 | obj/moc_tmechobridge.o \ |
|
107 | obj/moc_entermode.o \ | |
|
108 | obj/moc_lfractions.o \ | |
|
101 | 109 | obj/moc_genericPySysdriver.o \ |
|
102 | 110 | obj/moc_lppmonplugin.o |
|
103 | 111 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
@@ -247,7 +255,7 qmake: FORCE | |||
|
247 | 255 | |
|
248 | 256 | dist: |
|
249 | 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 | 261 | clean:compiler_clean |
@@ -269,9 +277,9 mocclean: compiler_moc_header_clean comp | |||
|
269 | 277 | |
|
270 | 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 | 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 | 283 | moc/moc_rmappluginui.cpp: rmapoperations.h \ |
|
276 | 284 | params.h \ |
|
277 | 285 | stardundee.h \ |
@@ -280,6 +288,8 moc/moc_rmappluginui.cpp: rmapoperations | |||
|
280 | 288 | gresb.h \ |
|
281 | 289 | tmstatistics.h \ |
|
282 | 290 | tmechobridge.h \ |
|
291 | entermode.h \ | |
|
292 | lfractions.h \ | |
|
283 | 293 | rmappluginui.h |
|
284 | 294 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp |
|
285 | 295 | |
@@ -292,6 +302,8 moc/moc_rmapplugin.cpp: rmappluginui.h \ | |||
|
292 | 302 | gresb.h \ |
|
293 | 303 | tmstatistics.h \ |
|
294 | 304 | tmechobridge.h \ |
|
305 | entermode.h \ | |
|
306 | lfractions.h \ | |
|
295 | 307 | wfpacket.h \ |
|
296 | 308 | rmapplugin.h |
|
297 | 309 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp |
@@ -342,6 +354,13 moc/moc_tmechobridge.cpp: tmpackettoread | |||
|
342 | 354 | tmechobridge.h |
|
343 | 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 | 364 | moc/moc_genericPySysdriver.cpp: /usr/include/lppmon/genericPySysdriver.h |
|
346 | 365 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp |
|
347 | 366 | |
@@ -377,6 +396,8 obj/rmapplugin.o: rmapplugin.cpp rmapplu | |||
|
377 | 396 | gresb.h \ |
|
378 | 397 | tmstatistics.h \ |
|
379 | 398 | tmechobridge.h \ |
|
399 | entermode.h \ | |
|
400 | lfractions.h \ | |
|
380 | 401 | wfpacket.h \ |
|
381 | 402 | rmappluginpythonwrapper.h \ |
|
382 | 403 | tcpackettosend.h |
@@ -392,6 +413,8 obj/rmappluginui.o: rmappluginui.cpp rma | |||
|
392 | 413 | gresb.h \ |
|
393 | 414 | tmstatistics.h \ |
|
394 | 415 | tmechobridge.h \ |
|
416 | entermode.h \ | |
|
417 | lfractions.h \ | |
|
395 | 418 | wfpacket.h |
|
396 | 419 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp |
|
397 | 420 | |
@@ -448,6 +471,13 obj/tmechobridge.o: tmechobridge.cpp tme | |||
|
448 | 471 | tmpackettoread.h |
|
449 | 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 | 481 | obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \ |
|
452 | 482 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h |
|
453 | 483 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp |
@@ -488,6 +518,12 obj/moc_wfpacket.o: moc/moc_wfpacket.cpp | |||
|
488 | 518 | obj/moc_tmechobridge.o: moc/moc_tmechobridge.cpp |
|
489 | 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 | 527 | obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp |
|
492 | 528 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp |
|
493 | 529 |
@@ -48,6 +48,8 gresb::gresb(QWidget *parent) : | |||
|
48 | 48 | gresbBridgeIPDialogBox = new QIPDialogBox; |
|
49 | 49 | spwLinkStatusEnquiry = new gresbStatusEnquiry; |
|
50 | 50 | |
|
51 | readSettings(); // get the stored settings for the IP address | |
|
52 | ||
|
51 | 53 | connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0); |
|
52 | 54 | connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0); |
|
53 | 55 | connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0); |
@@ -84,6 +86,8 gresb::~gresb() | |||
|
84 | 86 | free(rmapPacket); |
|
85 | 87 | free(ccsdsPacket); |
|
86 | 88 | free(spwPacket); |
|
89 | ||
|
90 | writeSettings(); | |
|
87 | 91 | } |
|
88 | 92 | |
|
89 | 93 | unsigned int gresb::Write(unsigned int *Value, unsigned int count, unsigned int address) |
@@ -784,3 +788,22 void gresb::GRESBConnectionState(QAbstra | |||
|
784 | 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 |
@@ -9,6 +9,7 | |||
|
9 | 9 | #include <QTcpSocket> |
|
10 | 10 | #include <QDialog> |
|
11 | 11 | #include <QSemaphore> |
|
12 | #include <QSettings> | |
|
12 | 13 | |
|
13 | 14 | #include "gresbstatusenquiry.h" |
|
14 | 15 | #include "rmapoperations.h" |
@@ -25,6 +26,8 public: | |||
|
25 | 26 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
26 | 27 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
27 | 28 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
29 | void readSettings(); | |
|
30 | void writeSettings(); | |
|
28 | 31 | |
|
29 | 32 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
30 | 33 | |
@@ -84,6 +87,10 private: | |||
|
84 | 87 | QDialog *gresbStatusQueryDialog; |
|
85 | 88 | |
|
86 | 89 | QIPDialogBox* gresbBridgeIPDialogBox; |
|
90 | unsigned char gresbBridgeIP0; | |
|
91 | unsigned char gresbBridgeIP1; | |
|
92 | unsigned char gresbBridgeIP2; | |
|
93 | unsigned char gresbBridgeIP3; | |
|
87 | 94 | |
|
88 | 95 | QSpinBox *gresbVirtualLinkSpinBox; |
|
89 | 96 | QSpinBox *spwLinkSpinBox; |
@@ -115,6 +115,12 rmapplugin::rmapplugin(QWidget *parent) | |||
|
115 | 115 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); |
|
116 | 116 | |
|
117 | 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 | 126 | rmapplugin::~rmapplugin() |
@@ -122,9 +128,7 rmapplugin::~rmapplugin() | |||
|
122 | 128 | switch(currentBridge) |
|
123 | 129 | { |
|
124 | 130 | case selectedBridgeIsGRESB : |
|
125 | if (RMAPSend_SOCKET->isOpen()) RMAPSend_SOCKET->disconnectFromHost(); | |
|
126 | if (RMAPReceive_SOCKET->isOpen()) RMAPReceive_SOCKET->disconnectFromHost(); | |
|
127 | if (GRESBStatusQuery_SOCKET->isOpen()) GRESBStatusQuery_SOCKET->disconnectFromHost(); | |
|
131 | this->UI->gresbBridge->writeSettings(); | |
|
128 | 132 | break; |
|
129 | 133 | case selectedBridgeIsStarDundee : |
|
130 | 134 | break; |
@@ -248,6 +252,11 void rmapplugin::receivePacketFromBridge | |||
|
248 | 252 | this->UI->tmEchoBridge->sendTMPacketLESIA(packet); |
|
249 | 253 | |
|
250 | 254 | this->generalCCSDSPacketStore.append(packet); |
|
255 | if (this->generalCCSDSPacketStore.size() > 1000) | |
|
256 | { | |
|
257 | this->generalCCSDSPacketStore.erase(generalCCSDSPacketStore.begin(), | |
|
258 | generalCCSDSPacketStore.begin() + 500); | |
|
259 | } | |
|
251 | 260 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(generalCCSDSPacketStore.size())); |
|
252 | 261 | processPacketStore(); |
|
253 | 262 | } |
@@ -276,6 +285,12 void rmapplugin::preProcessPacket(TMPack | |||
|
276 | 285 | |
|
277 | 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 | 296 | // if the packet is a waveform, display it |
@@ -393,3 +408,4 int rmapplugin::fetchPacket() | |||
|
393 | 408 | |
|
394 | 409 | return ret; |
|
395 | 410 | } |
|
411 |
@@ -90,9 +90,6 signals: | |||
|
90 | 90 | private: |
|
91 | 91 | selectedBridge currentBridge; |
|
92 | 92 | rmapPluginUI* UI; |
|
93 | QTcpSocket* GRESBStatusQuery_SOCKET; | |
|
94 | QTcpSocket* RMAPSend_SOCKET; | |
|
95 | QTcpSocket* RMAPReceive_SOCKET; | |
|
96 | 93 | ccsds* ccsds_command; |
|
97 | 94 | unsigned int rmapPacketSize; |
|
98 | 95 | unsigned int time_COARSE; |
@@ -31,9 +31,10 INCLUDEPATH += \ | |||
|
31 | 31 | ../spw_usb_driver_v2.63/inc \ |
|
32 | 32 | $${QT_INSTALL_HEADER} \ |
|
33 | 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 | 40 | HEADERS += \ |
@@ -54,7 +55,9 HEADERS += \ | |||
|
54 | 55 | tmstatistics.h \ |
|
55 | 56 | wfpacket.h \ |
|
56 | 57 | params.h \ |
|
57 | tmechobridge.h | |
|
58 | tmechobridge.h \ | |
|
59 | entermode.h \ | |
|
60 | lfractions.h | |
|
58 | 61 | |
|
59 | 62 | |
|
60 | 63 | SOURCES += \ |
@@ -71,7 +74,9 SOURCES += \ | |||
|
71 | 74 | tmpackettoread.cpp \ |
|
72 | 75 | tmstatistics.cpp \ |
|
73 | 76 | wfpacket.cpp \ |
|
74 | tmechobridge.cpp | |
|
77 | tmechobridge.cpp \ | |
|
78 | entermode.cpp \ | |
|
79 | lfractions.cpp | |
|
75 | 80 | |
|
76 | 81 | |
|
77 | 82 |
@@ -5,11 +5,12 | |||
|
5 | 5 | #include <genericPySysdriver.h> |
|
6 | 6 | #include <QList> |
|
7 | 7 | #include <QVariant> |
|
8 | #include <QTimer> | |
|
9 | ||
|
8 | 10 | #include "rmapoperations.h" |
|
9 | 11 | #include "ccsds.h" |
|
10 |
#include |
|
|
11 |
#include |
|
|
12 | #include <QTimer> | |
|
12 | #include "tcpackettosend.h" | |
|
13 | #include "tmpackettoread.h" | |
|
13 | 14 | |
|
14 | 15 | class rmappluginPythonWrapper : public genericPySysdriver |
|
15 | 16 | { |
@@ -96,6 +96,7 rmapPluginUI::rmapPluginUI(QWidget *pare | |||
|
96 | 96 | logFile = new QFile(); |
|
97 | 97 | wfDisplay = new WFDisplay(); |
|
98 | 98 | tmStatistics = new TMStatistics(); |
|
99 | lfrActions = new LFRActions(); | |
|
99 | 100 | |
|
100 | 101 | logFileEn = false; |
|
101 | 102 | |
@@ -144,9 +145,10 rmapPluginUI::rmapPluginUI(QWidget *pare | |||
|
144 | 145 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); |
|
145 | 146 | |
|
146 | 147 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); |
|
147 | spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); | |
|
148 | //spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); | |
|
148 | 149 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); |
|
149 | 150 | spwTabWidget->addTab(spwTabWidgetPage4, tr("TM statistics")); |
|
151 | spwTabWidget->addTab(lfrActions, tr("dashboard")); | |
|
150 | 152 | //spwTabWidget->addTab(spwTabWidgetPage5, tr("waveforms")); |
|
151 | 153 | spwTabWidget->addTab(spwTabWidgetPage6, tr("TM Echo Bridge")); |
|
152 | 154 |
@@ -45,10 +45,13 | |||
|
45 | 45 | #include <stardundee.h> |
|
46 | 46 | #include <gresb.h> |
|
47 | 47 | #include <wfdisplay.h> |
|
48 | #include <parameterdump.h> | |
|
48 | 49 | |
|
49 | 50 | #include "qipdialogbox.h" |
|
50 | 51 | #include "tmstatistics.h" |
|
51 | 52 | #include "tmechobridge.h" |
|
53 | #include "entermode.h" | |
|
54 | #include "lfractions.h" | |
|
52 | 55 | |
|
53 | 56 | enum selectedBridge{ |
|
54 | 57 | selectedBridgeIsUnknown, |
@@ -101,8 +104,8 public: | |||
|
101 | 104 | QTextEdit* console; |
|
102 | 105 | |
|
103 | 106 | WFDisplay* wfDisplay; |
|
104 | ||
|
105 | 107 | TMStatistics* tmStatistics; |
|
108 | LFRActions* lfrActions; | |
|
106 | 109 | |
|
107 | 110 | // SPACEWIRE BRIDGES |
|
108 | 111 | StarDundee *starDundee; |
@@ -1,6 +1,7 | |||
|
1 | 1 | #include "tmstatistics.h" |
|
2 | 2 | #include <QtGui> |
|
3 | 3 | #include <QFontInfo> |
|
4 | #include <stdio.h> | |
|
4 | 5 | |
|
5 | 6 | TMStatistics::TMStatistics(QWidget *parent) : |
|
6 | 7 | QWidget(parent) |
@@ -19,6 +20,7 TMStatistics::TMStatistics(QWidget *pare | |||
|
19 | 20 | layout_SBM1 = new QGridLayout(); // TM_LFR_SCIENCE_SBM1_ |
|
20 | 21 | layout_SBM2 = new QGridLayout(); // TM_LFR_SCIENCE_SBM2_ |
|
21 | 22 | layout_last = new QGridLayout(); // last TM description |
|
23 | layout_record = new QVBoxLayout(); | |
|
22 | 24 | |
|
23 | 25 | //*************** |
|
24 | 26 | // TM_LFR_TC_EXE_ |
@@ -130,6 +132,8 TMStatistics::TMStatistics(QWidget *pare | |||
|
130 | 132 | |
|
131 | 133 | // QPushButton |
|
132 | 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 | 139 | // QGroupBox |
@@ -141,6 +145,7 TMStatistics::TMStatistics(QWidget *pare | |||
|
141 | 145 | groupbox_SBM1 = new QGroupBox("TM_LFR_SCIENCE_SBM1_"); |
|
142 | 146 | groupbox_SBM2 = new QGroupBox("TM_LFR_SCIENCE_SBM2_"); |
|
143 | 147 | groupbox_last = new QGroupBox("Last TM received"); |
|
148 | groupbox_record = new QGroupBox("Packet recording"); | |
|
144 | 149 | |
|
145 | 150 | groupbox_stat->setFont(font); |
|
146 | 151 | groupbox_NORM->setFont(font); |
@@ -148,6 +153,11 TMStatistics::TMStatistics(QWidget *pare | |||
|
148 | 153 | groupbox_SBM1->setFont(font); |
|
149 | 154 | groupbox_SBM2->setFont(font); |
|
150 | 155 | groupbox_last->setFont(font); |
|
156 | groupbox_record->setFont(font); | |
|
157 | ||
|
158 | readSettings(); | |
|
159 | logFile = new QFile(); | |
|
160 | logFileEn = false; | |
|
151 | 161 | |
|
152 | 162 | initConstants(); |
|
153 | 163 | |
@@ -158,7 +168,8 TMStatistics::TMStatistics(QWidget *pare | |||
|
158 | 168 | buildMonitor(); |
|
159 | 169 | |
|
160 | 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 | 175 | void TMStatistics::initConstants() |
@@ -336,6 +347,10 void TMStatistics::buildMonitor() | |||
|
336 | 347 | layout_last->addWidget(label_UNKNOWN, 3, 0, 1, 1); |
|
337 | 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 | 355 | // groupboxes |
|
341 | 356 | groupbox_stat->setLayout(layout_stat); |
@@ -344,6 +359,7 void TMStatistics::buildMonitor() | |||
|
344 | 359 | groupbox_SBM1->setLayout(layout_SBM1); |
|
345 | 360 | groupbox_SBM2->setLayout(layout_SBM2); |
|
346 | 361 | groupbox_last->setLayout(layout_last); |
|
362 | groupbox_record->setLayout(layout_record); | |
|
347 | 363 | // |
|
348 | 364 | mainLayout->addWidget(groupbox_stat, 0, 0, 1, 1); |
|
349 | 365 | mainLayout->addWidget(groupbox_NORM, 1, 0, 1, 1); |
@@ -351,7 +367,8 void TMStatistics::buildMonitor() | |||
|
351 | 367 | mainLayout->addWidget(groupbox_SBM1, 0, 1, 1, 1); |
|
352 | 368 | mainLayout->addWidget(groupbox_SBM2, 0, 2, 1, 1); |
|
353 | 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 | 372 | mainLayout->setColumnStretch(3, 1); |
|
356 | 373 | mainLayout->setRowStretch(4, 1); |
|
357 | 374 | // |
@@ -638,6 +655,7 unsigned int TMStatistics::getSID(TMPack | |||
|
638 | 655 | unsigned char typ, unsigned char sub) |
|
639 | 656 | { |
|
640 | 657 | unsigned int sid = 0; |
|
658 | QByteArray packetAsAnArray; | |
|
641 | 659 | |
|
642 | 660 | if ((pid == 76) & (cat == 1) & (typ == TM_TYPE_TC_EXE) & (sub == TM_SUBTYPE_EXE_NOK)) |
|
643 | 661 | sid = packet->Value[20] * 256 + packet->Value[21]; |
@@ -650,10 +668,82 unsigned int TMStatistics::getSID(TMPack | |||
|
650 | 668 | else if ((pid == 79) & (cat == 12) & (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE)) |
|
651 | 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 | 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 |
@@ -7,6 +7,8 | |||
|
7 | 7 | #include <QGridLayout> |
|
8 | 8 | #include <QVBoxLayout> |
|
9 | 9 | #include <QGroupBox> |
|
10 | #include <QFile> | |
|
11 | #include <QTextStream> | |
|
10 | 12 | #include <tmpackettoread.h> |
|
11 | 13 | #include <ccsds_types.h> |
|
12 | 14 | |
@@ -35,6 +37,7 public: | |||
|
35 | 37 | unsigned int getCoarseTime(TMPacketToRead *packet); |
|
36 | 38 | unsigned int getFineTime(TMPacketToRead *packet); |
|
37 | 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 | 42 | unsigned int UNKNOWN_nb; |
|
40 | 43 | unsigned int SUCC_nb; |
@@ -194,9 +197,17 public: | |||
|
194 | 197 | QGridLayout *layout_SBM1; // TM_LFR_SCIENCE_SBM1_ |
|
195 | 198 | QGridLayout *layout_SBM2; // TM_LFR_SCIENCE_SBM2_ |
|
196 | 199 | QGridLayout *layout_last; // last TM description |
|
200 | QVBoxLayout *layout_record; | |
|
197 | 201 | |
|
198 | 202 | // QPushButton |
|
199 | 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 | 212 | // QGroupBox |
|
202 | 213 | QGroupBox *groupbox_stat; |
@@ -205,6 +216,7 public: | |||
|
205 | 216 | QGroupBox *groupbox_SBM1; |
|
206 | 217 | QGroupBox *groupbox_SBM2; |
|
207 | 218 | QGroupBox *groupbox_last; |
|
219 | QGroupBox *groupbox_record; | |
|
208 | 220 | |
|
209 | 221 | signals: |
|
210 | 222 | |
@@ -214,6 +226,11 public slots: | |||
|
214 | 226 | unsigned char typ, unsigned char sub, |
|
215 | 227 | unsigned int sid, unsigned int length, |
|
216 | 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 |
@@ -145,7 +145,7 void PageSpectra::createToolBar() | |||
|
145 | 145 | radio_e1 = new QRadioButton(tr("s22")); |
|
146 | 146 | radio_e2 = new QRadioButton(tr("s33")); |
|
147 | 147 | radio_b1 = new QRadioButton(tr("s44")); |
|
148 |
radio_b2 = new QRadioButton(tr("s |
|
|
148 | radio_b2 = new QRadioButton(tr("s55")); | |
|
149 | 149 | radio_tabify = new QRadioButton(tr("tabify")); |
|
150 | 150 | |
|
151 | 151 | radio_v->setAutoExclusive(false); |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by QtCreator 2. |
|
|
3 | <!-- Written by QtCreator 2.8.0, 2013-08-01T09:15:42. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -13,13 +13,13 | |||
|
13 | 13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
14 | 14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
15 | 15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
16 |
<value type="Q |
|
|
16 | <value type="QString" key="language">Cpp</value> | |
|
17 | 17 | <valuemap type="QVariantMap" key="value"> |
|
18 | 18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
19 | 19 | </valuemap> |
|
20 | 20 | </valuemap> |
|
21 | 21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
22 |
<value type="Q |
|
|
22 | <value type="QString" key="language">QmlJS</value> | |
|
23 | 23 | <valuemap type="QVariantMap" key="value"> |
|
24 | 24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
25 | 25 | </valuemap> |
@@ -53,7 +53,7 | |||
|
53 | 53 | <valuemap type="QVariantMap"> |
|
54 | 54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | 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 | 57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
58 | 58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
59 | 59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
@@ -63,7 +63,7 | |||
|
63 | 63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
64 | 64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
65 | 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 | 67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
68 | 68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
69 | 69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
@@ -73,7 +73,7 | |||
|
73 | 73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
74 | 74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
75 | 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 | 77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
78 | 78 | <value type="QString">-w</value> |
|
79 | 79 | <value type="QString">-r</value> |
@@ -85,14 +85,14 | |||
|
85 | 85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
86 | 86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
87 | 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 | 89 | </valuemap> |
|
90 | 90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
91 | 91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
92 | 92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
93 | 93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
94 | 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 | 96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
97 | 97 | <value type="QString">-w</value> |
|
98 | 98 | <value type="QString">-r</value> |
@@ -104,14 +104,14 | |||
|
104 | 104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
105 | 105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
106 | 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 | 108 | </valuemap> |
|
109 | 109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
110 | 110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
111 | 111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
112 | 112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
113 | 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 | 115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
116 | 116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay</value> |
|
117 | 117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
@@ -122,14 +122,15 | |||
|
122 | 122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
123 | 123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
124 | 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 | 126 | </valuemap> |
|
127 | 127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
128 | 128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
129 | 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 | 131 | </valuemap> |
|
132 | 132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
|
133 | 134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | 135 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
135 | 136 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
@@ -162,17 +163,18 | |||
|
162 | 163 | <value type="int">13</value> |
|
163 | 164 | <value type="int">14</value> |
|
164 | 165 | </valuelist> |
|
166 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
|
167 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
|
165 | 168 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
166 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> | |
|
167 | 169 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value> |
|
168 | 170 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> |
|
169 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> | |
|
170 | 171 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> |
|
171 | 172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value> |
|
172 | 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 | 175 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
175 | 176 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
177 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
|
176 | 178 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
177 | 179 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
178 | 180 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
@@ -186,10 +188,10 | |||
|
186 | 188 | </data> |
|
187 | 189 | <data> |
|
188 | 190 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
189 |
<value type="Q |
|
|
191 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
|
190 | 192 | </data> |
|
191 | 193 | <data> |
|
192 | 194 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
193 |
<value type="int">1 |
|
|
195 | <value type="int">14</value> | |
|
194 | 196 | </data> |
|
195 | 197 | </qtcreator> |
@@ -4,12 +4,6 | |||
|
4 | 4 | WFPage::WFPage(QWidget *parent) : |
|
5 | 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 | 8 | pageTitle = "default"; |
|
15 | 9 | wfPlot_v = new WFPlot(this, WFDISPLAY_XMAX, WFDISPLAY_YMAX); |
@@ -50,20 +44,12 WFPage::WFPage(QWidget *parent) : | |||
|
50 | 44 | |
|
51 | 45 | logFileName = new QLabel(); |
|
52 | 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 | 48 | logFileEn = false; |
|
61 |
storageEnabled |
|
|
62 |
|
|
|
63 | storageEnabledE2 = false; | |
|
64 | storageEnabledB1 = false; | |
|
65 | storageEnabledB2 = false; | |
|
66 | storageEnabledB3 = false; | |
|
49 | storageEnabled = false; | |
|
50 | allowDataStorage = false; | |
|
51 | ||
|
52 | indexOffset = 0; | |
|
67 | 53 | |
|
68 | 54 | createToolBar(); |
|
69 | 55 | readSettings(); |
@@ -71,40 +57,102 WFPage::WFPage(QWidget *parent) : | |||
|
71 | 57 | |
|
72 | 58 | void WFPage::displayOnPlot(short *data, unsigned char num) |
|
73 | 59 | { |
|
74 | QByteArray dataByteArray; | |
|
75 | unsigned int i; | |
|
60 | fillDataBuffer( data, num ); | |
|
76 | 61 | |
|
77 | 62 | switch(num){ |
|
78 | 63 | case 0: |
|
79 |
|
|
|
80 | if ( (storageEnabledV == true) && (logFileV->isOpen()) ) | |
|
64 | wfPlot_v->displayOnPlot(data, DEFAULT_SIZE); | |
|
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 |
|
|
85 |
dataB |
|
|
86 | dataByteArray.append(' '); | |
|
87 | dataByteArray.append(QByteArray::number(data[i])); | |
|
88 | *(this->logFileStrmV) << dataByteArray << endl; | |
|
89 | localIndex[0]++; | |
|
120 | dataBuffer[i].append(QByteArray::number(data[i])); | |
|
121 | dataBuffer[i].append(' '); | |
|
90 | 122 | } |
|
91 | 123 | } |
|
92 | 124 | break; |
|
93 | case 1: | |
|
94 | wfPlot_e1->displayOnPlot(data, DEFAULT_SIZE); | |
|
125 | ||
|
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 | 136 | break; |
|
96 | case 2: | |
|
97 | wfPlot_e2->displayOnPlot(data, DEFAULT_SIZE); | |
|
137 | ||
|
138 | default: | |
|
98 | 139 | break; |
|
99 | case 3: | |
|
100 | wfPlot_b1->displayOnPlot(data, DEFAULT_SIZE); | |
|
101 | break; | |
|
102 | case 4: | |
|
103 | wfPlot_b2->displayOnPlot(data, DEFAULT_SIZE); | |
|
104 | break; | |
|
105 | case 5: | |
|
106 | wfPlot_b3->displayOnPlot(data, DEFAULT_SIZE); | |
|
107 | break; | |
|
140 | ||
|
141 | } | |
|
142 | } | |
|
143 | } | |
|
144 | ||
|
145 | void WFPage::storeDataBuffer() | |
|
146 | { | |
|
147 | for (int i = 0; i < DEFAULT_SIZE; i++ ) | |
|
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 | |
@@ -472,28 +520,21 void WFPage::storeWfrm() | |||
|
472 | 520 | { |
|
473 | 521 | if (logFileEn == false) |
|
474 | 522 | { |
|
475 |
buildFileName |
|
|
523 | buildFileName(); | |
|
524 | indexOffset = 0; | |
|
476 | 525 | button_storeWfrm->setText(tr("STOP")); |
|
477 | 526 | logFileEn = true; |
|
478 | 527 | } |
|
479 | 528 | else |
|
480 | 529 | { |
|
481 | if(this->logFileV->isOpen()) this->logFileV->close(); | |
|
482 | if(this->logFileE1->isOpen()) this->logFileE1->close(); | |
|
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; | |
|
530 | // disable storage | |
|
531 | storageEnabled = false; | |
|
491 | 532 | button_storeWfrm->setText(tr("REC")); |
|
492 | 533 | logFileEn = false; |
|
493 | 534 | } |
|
494 | 535 | } |
|
495 | 536 | |
|
496 |
void WFPage::buildFileName |
|
|
537 | void WFPage::buildFileName() | |
|
497 | 538 | { |
|
498 | 539 | QString date; |
|
499 | 540 | QString time; |
@@ -504,39 +545,14 void WFPage::buildFileNames() | |||
|
504 | 545 | |
|
505 | 546 | prefix = defaultStorageDirectory + "/" + date + "_" + time + "_" + pageTitle ; |
|
506 | 547 | |
|
507 | if (radio_v->isChecked()) | |
|
508 | { | |
|
509 |
|
|
|
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 | { | |
|
548 | if(this->logFile->isOpen()) this->logFile->close(); | |
|
549 | this->logFile->setFileName( prefix + ".data"); | |
|
550 | if(this->logFile->open(QIODevice::WriteOnly)) this->logFileStrm = new QTextStream(this->logFile); | |
|
530 | 551 | |
|
531 | } | |
|
532 | if (radio_b2->isChecked()) | |
|
533 | { | |
|
552 | *(this->logFileStrm) << "time V E1 E2 B1 B2 B3 " << endl; | |
|
534 | 553 | |
|
535 | } | |
|
536 | if (radio_b3->isChecked()) | |
|
537 | { | |
|
554 | storageEnabled = true; | |
|
538 | 555 | |
|
539 | } | |
|
540 | 556 | } |
|
541 | 557 | |
|
542 | 558 | void WFPage::logFileEnDisable(bool state) |
@@ -551,27 +567,8 void WFPage::logFileEnDisable(bool state | |||
|
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 | 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 | 572 | writeSettings(); |
|
576 | 573 | event->accept(); |
|
577 | 574 | } |
@@ -28,28 +28,15 public: | |||
|
28 | 28 | void unTabify(); |
|
29 | 29 | void tabify(); |
|
30 | 30 | // STORE |
|
31 |
void buildFileName |
|
|
32 | bool islogfileenable(); | |
|
33 | void appendToLogFile(const QString & text); | |
|
31 | void buildFileName(); | |
|
34 | 32 | void closeEvent(QCloseEvent *event); |
|
35 | 33 | void readSettings(); |
|
36 | 34 | void writeSettings(); |
|
37 | 35 | |
|
38 | 36 | bool logFileEn; |
|
39 |
bool storageEnabled |
|
|
40 | bool storageEnabledE1; | |
|
41 | bool storageEnabledE2; | |
|
42 | bool storageEnabledB1; | |
|
43 | bool storageEnabledB2; | |
|
44 | bool storageEnabledB3; | |
|
37 | bool storageEnabled; | |
|
45 | 38 | |
|
46 | 39 | QLabel *logFileName; |
|
47 | QLabel *logFileNameV; | |
|
48 | QLabel *logFileNameE1; | |
|
49 | QLabel *logFileNameE2; | |
|
50 | QLabel *logFileNameB1; | |
|
51 | QLabel *logFileNameB2; | |
|
52 | QLabel *logFileNameB3; | |
|
53 | 40 | |
|
54 | 41 | QWidget *titleWidgetV; |
|
55 | 42 | QWidget *titleWidgetE1; |
@@ -58,6 +45,8 public: | |||
|
58 | 45 | QWidget *titleWidgetB2; |
|
59 | 46 | QWidget *titleWidgetB3; |
|
60 | 47 | |
|
48 | QByteArray dataBuffer[DEFAULT_SIZE]; | |
|
49 | ||
|
61 | 50 | QList<QDockWidget*> dockList; |
|
62 | 51 | |
|
63 | 52 | QDockWidget *dockV; |
@@ -89,32 +78,24 public: | |||
|
89 | 78 | WFPlot *wfPlot_b3; |
|
90 | 79 | |
|
91 | 80 | QFile *logFile; |
|
92 | QFile *logFileV; | |
|
93 | QFile *logFileE1; | |
|
94 | QFile *logFileE2; | |
|
95 | QFile *logFileB1; | |
|
96 | QFile *logFileB2; | |
|
97 | QFile *logFileB3; | |
|
98 | 81 | |
|
99 | 82 | QTextStream *logFileStrm; |
|
100 | QTextStream *logFileStrmV; | |
|
101 | QTextStream *logFileStrmE1; | |
|
102 | QTextStream *logFileStrmE2; | |
|
103 | QTextStream *logFileStrmB1; | |
|
104 | QTextStream *logFileStrmB2; | |
|
105 | QTextStream *logFileStrmB3; | |
|
83 | ||
|
84 | unsigned int indexOffset; | |
|
106 | 85 | |
|
107 | 86 | QString pageTitle; |
|
108 | 87 | QString defaultStorageDirectory; |
|
109 | 88 | |
|
110 | unsigned int localIndex[5]; | |
|
111 | ||
|
112 | 89 | //QGridLayout *mainLayout; |
|
113 | 90 | |
|
114 | 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 | 98 | signals: |
|
117 | void setLogFileName(QString FileName); | |
|
118 | 99 | |
|
119 | 100 | public slots: |
|
120 | 101 | void actionRadioV(bool state); |
General Comments 0
You need to be logged in to leave comments.
Login now