##// END OF EJS Templates
gselesia changed to process CWF_F3 light waveforms...
leroy -
r52:061b27b067a0 default
parent child
Show More
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.0, 2013-10-03T07:18:57. -->
3 <!-- Written by QtCreator 2.8.0, 2013-10-11T09:55:13. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -1,6 +1,6
1 1 #############################################################################
2 2 # Makefile for building: lfrsgse
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Aug 1 07:46:21 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Oct 10 08:44:30 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
@@ -16,7 +16,7 CXXFLAGS = -pipe -O2 -g -pipe -Wall
16 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 -lparameterdump -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread
19 LIBS = $(SUBLIBS) -L/usr/lib64 -llppmoncommon -lwfdisplay -lparameterdump -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread
20 20 AR = ar cqs
21 21 RANLIB =
22 22 QMAKE = /usr/bin/qmake-qt4
@@ -54,8 +54,7 SOURCES = main.cpp \
54 54 ../rmapplugin/spectrapacket.cpp \
55 55 ../common_PLE/qipdialogbox.cpp \
56 56 ../common_PLE/hkdisplay.cpp \
57 lfrxmlparser.cpp \
58 lfrspectrogram.cpp moc_mainwindow.cpp \
57 lfrxmlparser.cpp moc_mainwindow.cpp \
59 58 moc_mainwindowui.cpp \
60 59 moc_lfrxmlhandler.cpp \
61 60 moc_lfrxmlwriter.cpp \
@@ -65,8 +64,7 SOURCES = main.cpp \
65 64 moc_spectrapacket.cpp \
66 65 moc_qipdialogbox.cpp \
67 66 moc_hkdisplay.cpp \
68 moc_lfrxmlparser.cpp \
69 moc_lfrspectrogram.cpp
67 moc_lfrxmlparser.cpp
70 68 OBJECTS = main.o \
71 69 mainwindow.o \
72 70 mainwindowui.o \
@@ -79,7 +77,6 OBJECTS = main.o \
79 77 qipdialogbox.o \
80 78 hkdisplay.o \
81 79 lfrxmlparser.o \
82 lfrspectrogram.o \
83 80 moc_mainwindow.o \
84 81 moc_mainwindowui.o \
85 82 moc_lfrxmlhandler.o \
@@ -90,8 +87,7 OBJECTS = main.o \
90 87 moc_spectrapacket.o \
91 88 moc_qipdialogbox.o \
92 89 moc_hkdisplay.o \
93 moc_lfrxmlparser.o \
94 moc_lfrspectrogram.o
90 moc_lfrxmlparser.o
95 91 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
96 92 /usr/lib64/qt4/mkspecs/common/linux.conf \
97 93 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
@@ -106,6 +102,7 DIST = /usr/lib64/qt4/mkspecs/c
106 102 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
107 103 /usr/lib64/qt4/mkspecs/features/release.prf \
108 104 /usr/lib64/qt4/mkspecs/features/default_post.prf \
105 /usr/lib64/qt4/mkspecs/features/shared.prf \
109 106 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
110 107 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
111 108 /usr/lib64/qt4/mkspecs/features/qt.prf \
@@ -162,6 +159,7 Makefile: gselesia.pro /usr/lib64/qt4/m
162 159 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
163 160 /usr/lib64/qt4/mkspecs/features/release.prf \
164 161 /usr/lib64/qt4/mkspecs/features/default_post.prf \
162 /usr/lib64/qt4/mkspecs/features/shared.prf \
165 163 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
166 164 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
167 165 /usr/lib64/qt4/mkspecs/features/qt.prf \
@@ -191,6 +189,7 Makefile: gselesia.pro /usr/lib64/qt4/m
191 189 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
192 190 /usr/lib64/qt4/mkspecs/features/release.prf:
193 191 /usr/lib64/qt4/mkspecs/features/default_post.prf:
192 /usr/lib64/qt4/mkspecs/features/shared.prf:
194 193 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
195 194 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
196 195 /usr/lib64/qt4/mkspecs/features/qt.prf:
@@ -210,7 +209,7 qmake: FORCE
210 209
211 210 dist:
212 211 @$(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
212 $(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 .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 .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
214 213
215 214
216 215 clean:compiler_clean
@@ -231,9 +230,9 mocclean: compiler_moc_header_clean comp
231 230
232 231 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
233 232
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
233 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
235 234 compiler_moc_header_clean:
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
235 -$(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
237 236 moc_mainwindow.cpp: lfrxmlhandler.h \
238 237 lfrxmlwriter.h \
239 238 mainwindowui.h \
@@ -273,9 +272,6 moc_hkdisplay.cpp: ../common_PLE/hkdispl
273 272 moc_lfrxmlparser.cpp: lfrxmlparser.h
274 273 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlparser.h -o moc_lfrxmlparser.cpp
275 274
276 moc_lfrspectrogram.cpp: lfrspectrogram.h
277 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrspectrogram.h -o moc_lfrspectrogram.cpp
278
279 275 compiler_rcc_make_all:
280 276 compiler_rcc_clean:
281 277 compiler_image_collection_make_all: qmake_image_collection.cpp
@@ -342,9 +338,6 hkdisplay.o: ../common_PLE/hkdisplay.cpp
342 338 lfrxmlparser.o: lfrxmlparser.cpp lfrxmlparser.h
343 339 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlparser.o lfrxmlparser.cpp
344 340
345 lfrspectrogram.o: lfrspectrogram.cpp lfrspectrogram.h
346 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrspectrogram.o lfrspectrogram.cpp
347
348 341 moc_mainwindow.o: moc_mainwindow.cpp
349 342 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
350 343
@@ -378,9 +371,6 moc_hkdisplay.o: moc_hkdisplay.cpp
378 371 moc_lfrxmlparser.o: moc_lfrxmlparser.cpp
379 372 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlparser.o moc_lfrxmlparser.cpp
380 373
381 moc_lfrspectrogram.o: moc_lfrspectrogram.cpp
382 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrspectrogram.o moc_lfrspectrogram.cpp
383
384 374 ####### Install
385 375
386 376 install: FORCE
@@ -20,7 +20,7 INCLUDEPATH += \
20 20 $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay \
21 21 $$[QT_INSTALL_HEADERS]/lppmon/parameterdump
22 22
23 LIBS += -llppmoncommon -lwfdisplay -lqwt5-qt4 -lparameterdump
23 LIBS += -llppmoncommon -lwfdisplay -lparameterdump
24 24
25 25 SOURCES += main.cpp\
26 26 mainwindow.cpp \
@@ -33,8 +33,7 SOURCES += main.cpp\
33 33 ../rmapplugin/spectrapacket.cpp \
34 34 ../common_PLE/qipdialogbox.cpp \
35 35 ../common_PLE/hkdisplay.cpp \
36 lfrxmlparser.cpp \
37 lfrspectrogram.cpp
36 lfrxmlparser.cpp
38 37
39 38 HEADERS += mainwindow.h \
40 39 mainwindowui.h \
@@ -49,8 +48,7 HEADERS += mainwindow.h \
49 48 ../rmapplugin/params.h \
50 49 ../../DEV_PLE/header/TC_types.h \
51 50 ../../DEV_PLE/header/ccsds_types.h \
52 lfrxmlparser.h \
53 lfrspectrogram.h
51 lfrxmlparser.h
54 52
55 53
56 54
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.0, 2013-09-23T12:59:08. -->
3 <!-- Written by QtCreator 2.8.0, 2013-10-11T14:18:06. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
1 NO CONTENT: modified file, binary diff hidden
@@ -286,8 +286,8 void MainWindow::buildWFAndDisplay_CWF_F
286 286 data = &packet->Value[30]; // start of the first data block;
287 287 j = (pkt_nr-1) * 340;
288 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]) );
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 291 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
292 292 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
293 293 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
@@ -296,12 +296,44 void MainWindow::buildWFAndDisplay_CWF_F
296 296 pkt_nr = pkt_nr + 1;
297 297 if (blk_nr == 8)
298 298 {
299 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0);
299 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0);
300 300 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1);
301 301 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2);
302 302 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3);
303 303 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4);
304 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3,num_page, 5);
304 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5);
305 pkt_nr = 1;
306 }
307 }
308
309 void MainWindow::buildWFAndDisplay_CWF_F3_light(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page)
310 {
311 unsigned int i = 0;
312 unsigned int j = 0;
313 unsigned char *data;
314 static unsigned char pkt_nr = 1;
315 unsigned int blk_nr = 0;
316
317 blk_nr = packet->Value[28] * 256 + packet->Value[29];
318 data = &packet->Value[30]; // start of the first data block;
319 j = (pkt_nr-1) * 340;
320 for ( i=0; i<blk_nr; i++ ){
321 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE_CWF3_LIGHT) ] << 8) + (data[ (i*BLK_SIZE_CWF3_LIGHT) + 1]) );
322 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE_CWF3_LIGHT) + 2] << 8) + (data[ (i*BLK_SIZE_CWF3_LIGHT) + 3]) );
323 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE_CWF3_LIGHT) + 4] << 8) + (data[ (i*BLK_SIZE_CWF3_LIGHT) + 5]) );
324 wfPacket->wf_b1[j + i] = 0;
325 wfPacket->wf_b2[j + i] = 0;
326 wfPacket->wf_b3[j + i] = 0;
327 }
328 pkt_nr = pkt_nr + 1;
329 if (blk_nr == 8)
330 {
331 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0);
332 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1);
333 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2);
334 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3);
335 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4);
336 this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5);
305 337 pkt_nr = 1;
306 338 }
307 339 }
@@ -318,17 +350,17 void MainWindow::buildWFAndDisplayBurst(
318 350 data = &packet->Value[30]; // start of the first data block;
319 351 j = (pkt_nr-1) * 340;
320 352 for ( i=0; i<blk_nr; i++ ){
321 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
322 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
323 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
324 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
325 wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
326 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) );
353 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
354 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
355 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
356 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
357 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
358 wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) );
327 359 }
328 360 pkt_nr = pkt_nr + 1;
329 361 if (blk_nr == 8)
330 362 {
331 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_v, 0);
363 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_v, 0);
332 364 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_e1, 1);
333 365 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_e2, 2);
334 366 this->UI->wfPageBurst->displayOnPlot(wfPacket->wf_b1, 3);
@@ -343,6 +375,7 void MainWindow::buildWFAndDisplaySBM1(T
343 375 unsigned int i = 0;
344 376 unsigned int j = 0;
345 377 unsigned char *data;
378 unsigned char *pData;
346 379 static unsigned char pkt_nr = 1;
347 380 unsigned int blk_nr = 0;
348 381
@@ -350,17 +383,62 void MainWindow::buildWFAndDisplaySBM1(T
350 383 data = &packet->Value[30]; // start of the first data block;
351 384 j = (pkt_nr-1) * 340;
352 385 for ( i=0; i<blk_nr; i++ ){
353 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
354 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
386 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
387 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
388 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
389 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
390 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
391 // wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) );
392 pData = (unsigned char*) &wfPacket->wf_b3[j + i];
393 pData[0] = data[ (i*BLK_SIZE) + 11];
394 pData[1] = data[ (i*BLK_SIZE) + 10];
395 }
396 pkt_nr = pkt_nr + 1;
397 if (blk_nr == 8)
398 {
399 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_v, 0);
400 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e1, 1);
401 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e2, 2);
402 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b1, 3);
403 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b2, 4);
404 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b3, 5);
405 pkt_nr = 1;
406 }
407 }
408
409 void MainWindow::buildWFAndDisplaySBM1_alt(TMPacketToRead *packet, WFPacket *wfPacket)
410 {
411 unsigned int i = 0;
412 unsigned int j = 0;
413 unsigned char segmentationGroupingFlag;
414 unsigned char *data;
415 static unsigned char pkt_nr = 1;
416 unsigned int blk_nr = 0;
417
418 segmentationGroupingFlag = this->UI->tmStatistics->getSegmentationGroupingFlag( packet );
419 blk_nr = packet->Value[28] * 256 + packet->Value[29];
420 data = &packet->Value[30]; // start of the first data block;
421
422 if (segmentationGroupingFlag == 1) // first packet of the sequence
423 {
424 pkt_nr = 1;
425 }
426 else // continuation packet or last packet
427 {
428 pkt_nr = pkt_nr + 1;
429 }
430 j = (pkt_nr-1) * 340;
431 for ( i=0; i<blk_nr; i++ ){
432 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
433 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
355 434 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
356 435 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
357 436 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
358 437 wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) );
359 438 }
360 pkt_nr = pkt_nr + 1;
361 if (blk_nr == 8)
439 if (segmentationGroupingFlag == 2) // last packet of the sequence
362 440 {
363 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_v, 0);
441 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_v, 0);
364 442 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e1, 1);
365 443 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_e2, 2);
366 444 this->UI->wfPageSBM1->displayOnPlot(wfPacket->wf_b1, 3);
@@ -382,8 +460,8 void MainWindow::buildWFAndDisplaySBM2(T
382 460 data = &packet->Value[30]; // start of the first data block;
383 461 j = (pkt_nr-1) * 340;
384 462 for ( i=0; i<blk_nr; i++ ){
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]) );
463 wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) );
464 wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) );
387 465 wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) );
388 466 wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) );
389 467 wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) );
@@ -392,7 +470,7 void MainWindow::buildWFAndDisplaySBM2(T
392 470 pkt_nr = pkt_nr + 1;
393 471 if (blk_nr == 8)
394 472 {
395 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_v, 0);
473 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_v, 0);
396 474 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_e1, 1);
397 475 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_e2, 2);
398 476 this->UI->wfPageSBM2->displayOnPlot(wfPacket->wf_b1, 3);
@@ -507,14 +585,16 void MainWindow::preProcessPacket(TMPack
507 585
508 586 //***************************************************
509 587 // if the packet is an HK packet, display its content
510 if ( (pid == 76) & (cat == 4) & (typ == TM_TYPE_HK) & (sub == TM_SUBTYPE_HK) )
588 if ( (pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_HK)
589 & (typ == TM_TYPE_HK) & (sub == TM_SUBTYPE_HK) )
511 590 {
512 591 this->UI->hkDisplay->displayPacket(packet);
513 592 }
514 593
515 594 //**************************************************************
516 595 // 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) )
596 if ( (pid == TM_PACKET_PID_DEFAULT) & (cat == TM_PACKET_CAT_PARAMETER_DUMP)
597 & (typ == TM_TYPE_PARAMETER_DUMP) & (sub == TM_SUBTYPE_PARAMETER_DUMP) )
518 598 {
519 599 this->UI->parameterDump->updateParameterDump(packet);
520 600 }
@@ -523,7 +603,7 void MainWindow::preProcessPacket(TMPack
523 603 // if the packet is a waveform, display it
524 604 if ( (typ == TM_TYPE_LFR_SCIENCE) & (sub == TM_SUBTYPE_LFR_SCIENCE) )
525 605 {
526 sid = packet->Value[20]; // SID
606 //sid = packet->Value[20]; // SID
527 607 switch (sid){
528 608 case SID_NORMAL_SWF_F0:
529 609 buildWFAndDisplay(packet, &wfPacketNormal[0], 0);
@@ -535,13 +615,14 void MainWindow::preProcessPacket(TMPack
535 615 buildWFAndDisplay(packet, &wfPacketNormal[2], 2);
536 616 break;
537 617 case SID_NORMAL_CWF_F3:
538 buildWFAndDisplay_CWF_F3(packet, &wfPacketNormal[3], 3);
618 //buildWFAndDisplay_CWF_F3(packet, &wfPacketNormal[3], 3);
619 buildWFAndDisplay_CWF_F3_light(packet, &wfPacketNormal[3], 3);
539 620 break;
540 621 case SID_BURST_CWF_F2:
541 622 buildWFAndDisplayBurst(packet, &wfPacketBurst);
542 623 break;
543 624 case SID_SBM1_CWF_F1:
544 buildWFAndDisplaySBM1(packet, &wfPacketSBM1);
625 buildWFAndDisplaySBM1_alt(packet, &wfPacketSBM1);
545 626 break;
546 627 case SID_SBM2_CWF_F2:
547 628 buildWFAndDisplaySBM2(packet, &wfPacketSBM2);
@@ -38,8 +38,10 public:
38 38 //
39 39 void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page);
40 40 void buildWFAndDisplay_CWF_F3(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page);
41 void buildWFAndDisplay_CWF_F3_light(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page);
41 42 void buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket);
42 43 void buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket);
44 void buildWFAndDisplaySBM1_alt(TMPacketToRead *packet, WFPacket *wfPacket);
43 45 void buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket);
44 46 void buildSpectrumAndDisplayNORM_F0(TMPacketToRead *packet, SpectraPacket *spectraPacket);
45 47
@@ -36,7 +36,6 MainWindowUI::MainWindowUI(QWidget *pare
36 36 wfPageSBM2->pageTitle = "SBM2_CWF_F2";
37 37 pageSpectraNORM->pageTitle = "ASM f0";
38 38 hkDisplay = new HKDisplay();
39 lfrSpectrogam = new LFRSpectrogram();
40 39
41 40 spinbox_TMServerPort = new QSpinBox();
42 41 spinbox_TCServerPort = new QSpinBox();
@@ -18,7 +18,6
18 18
19 19 #include "tmstatistics.h"
20 20 #include "hkdisplay.h"
21 #include "lfrspectrogram.h"
22 21
23 22 class MainWindowUI : public QWidget
24 23 {
@@ -50,7 +49,6 public:
50 49 WFPage* wfPageSBM2;
51 50 PageSpectra* pageSpectraNORM;
52 51 HKDisplay* hkDisplay;
53 LFRSpectrogram* lfrSpectrogam;
54 52
55 53 QWidget* widget_spectrogram;
56 54
@@ -24,14 +24,11 void ParameterDump::buildTabParameterDum
24 24 layout_parameterDump->addWidget(groupbox_COMM, 0, 0, 1, 1);
25 25 layout_parameterDump->addWidget(groupbox_NORM, 0, 1, 1, 1);
26 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);
27 layout_parameterDump->addWidget(groupbox_SBM1, 1 , 1, 1, 1);
28 layout_parameterDump->addWidget(groupbox_SBM2, 2, 0, 1, 1);
29 layout_parameterDump->addWidget(button_parameterDump, 2, 1, 1, 1);
30 30
31 layout_parameterDump->setRowStretch(3, 1);
32 layout_parameterDump->setColumnStretch(2, 1);
33
34 layout_parameterDump->setRowStretch(3, 1);
31 layout_parameterDump->setRowStretch(2, 1);
35 32 layout_parameterDump->setColumnStretch(2, 1);
36 33 }
37 34
@@ -52,6 +49,10 void ParameterDump::buildCOMM()
52 49 spinbox_sy_lfr_r0 = new QSpinBox();
53 50 spinbox_sy_lfr_r1 = new QSpinBox();
54 51
52 button_loadCommon = new QPushButton(tr("LOAD_COMM"));
53
54 button_loadCommon->setEnabled(false);
55
55 56 spinbox_sy_lfr_bw->setRange(0, 1);
56 57 spinbox_sy_lfr_sp0->setRange(0, 1);
57 58 spinbox_sy_lfr_sp1->setRange(0, 1);
@@ -64,22 +65,25 void ParameterDump::buildCOMM()
64 65 spinbox_sy_lfr_r0->setValue(0);
65 66 spinbox_sy_lfr_r1->setValue(0);
66 67
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);
68 layout_COMM->addWidget(button_loadCommon, 0, 0, 1, 2);
69 layout_COMM->addWidget(sy_lfr_bw, 1, 0, 1, 1);
70 layout_COMM->addWidget(sy_lfr_sp0, 2, 0, 1, 1);
71 layout_COMM->addWidget(sy_lfr_sp1, 3, 0, 1, 1);
72 layout_COMM->addWidget(sy_lfr_r0, 4, 0, 1, 1);
73 layout_COMM->addWidget(sy_lfr_r1, 5, 0, 1, 1);
72 74
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);
75 layout_COMM->addWidget(spinbox_sy_lfr_bw, 1, 1, 1, 1);
76 layout_COMM->addWidget(spinbox_sy_lfr_sp0, 2, 1, 1, 1);
77 layout_COMM->addWidget(spinbox_sy_lfr_sp1, 3, 1, 1, 1);
78 layout_COMM->addWidget(spinbox_sy_lfr_r0, 4, 1, 1, 1);
79 layout_COMM->addWidget(spinbox_sy_lfr_r1, 5, 1, 1, 1);
78 80
79 81 layout_COMM->setColumnStretch(2, 1);
80 layout_COMM->setRowStretch(5, 1);
82 layout_COMM->setRowStretch(6, 1);
81 83
82 84 groupbox_COMM->setLayout(layout_COMM);
85
86 connect(this->button_loadCommon, SIGNAL(clicked()), this, SLOT(sendLoadCommon()));
83 87 }
84 88
85 89 void ParameterDump::buildNORM()
@@ -99,6 +103,10 void ParameterDump::buildNORM()
99 103 spinbox_sy_lfr_n_bp_p0 = new QSpinBox();
100 104 spinbox_sy_lfr_n_bp_p1 = new QSpinBox();
101 105
106 button_loadNormal = new QPushButton(tr("LOAD_NORM"));
107
108 button_loadNormal->setEnabled(false);
109
102 110 spinbox_sy_lfr_n_swf_l->setRange(256, 65535);
103 111 spinbox_sy_lfr_n_swf_p->setRange(16, 65535);
104 112 spinbox_sy_lfr_n_asm_p->setRange(2, 65535);
@@ -111,22 +119,25 void ParameterDump::buildNORM()
111 119 spinbox_sy_lfr_n_bp_p0->setValue(4);
112 120 spinbox_sy_lfr_n_bp_p1->setValue(20);
113 121
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);
122 layout_NORM->addWidget(button_loadNormal, 0, 0, 1, 2);
123 layout_NORM->addWidget(sy_lfr_n_swf_l, 1, 0, 1, 1);
124 layout_NORM->addWidget(sy_lfr_n_swf_p, 2, 0, 1, 1);
125 layout_NORM->addWidget(sy_lfr_n_asm_p, 3, 0, 1, 1);
126 layout_NORM->addWidget(sy_lfr_n_bp_p0, 4, 0, 1, 1);
127 layout_NORM->addWidget(sy_lfr_n_bp_p1, 5, 0, 1, 1);
119 128
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);
129 layout_NORM->addWidget(spinbox_sy_lfr_n_swf_l, 1, 1, 1, 1);
130 layout_NORM->addWidget(spinbox_sy_lfr_n_swf_p, 2, 1, 1, 1);
131 layout_NORM->addWidget(spinbox_sy_lfr_n_asm_p, 3, 1, 1, 1);
132 layout_NORM->addWidget(spinbox_sy_lfr_n_bp_p0, 4, 1, 1, 1);
133 layout_NORM->addWidget(spinbox_sy_lfr_n_bp_p1, 5, 1, 1, 1);
125 134
126 135 layout_NORM->setColumnStretch(2, 1);
127 layout_NORM->setRowStretch(5, 1);
136 layout_NORM->setRowStretch(6, 1);
128 137
129 138 groupbox_NORM->setLayout(layout_NORM);
139
140 connect(this->button_loadNormal, SIGNAL(clicked()), this, SLOT(sendLoadNormal()));
130 141 }
131 142
132 143 void ParameterDump::buildBURST()
@@ -140,18 +151,26 void ParameterDump::buildBURST()
140 151 spinbox_sy_lfr_b_bp_p0 = new QSpinBox();
141 152 spinbox_sy_lfr_b_bp_p1 = new QSpinBox();
142 153
154 button_loadBurst = new QPushButton(tr("LOAD_BURST"));
155
156 button_loadBurst->setEnabled(false);
157
143 158 spinbox_sy_lfr_b_bp_p0->setRange(1, 255);
144 159 spinbox_sy_lfr_b_bp_p1->setRange(5, 255);
145 160
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);
161 layout_BURST->addWidget(button_loadBurst, 0, 0, 1, 2);
162 layout_BURST->addWidget(sy_lfr_b_bp_p0, 1, 0, 1, 1);
163 layout_BURST->addWidget(sy_lfr_b_bp_p1, 2, 0, 1, 1);
164
165 layout_BURST->addWidget(spinbox_sy_lfr_b_bp_p0, 1, 1, 1, 1);
166 layout_BURST->addWidget(spinbox_sy_lfr_b_bp_p1, 2, 1, 1, 1);
150 167
151 168 layout_BURST->setColumnStretch(2, 1);
152 169 layout_BURST->setRowStretch(3, 1);
153 170
154 171 groupbox_BURST->setLayout(layout_BURST);
172
173 connect(this->button_loadBurst, SIGNAL(clicked()), this, SLOT(sendLoadBurst()));
155 174 }
156 175
157 176 void ParameterDump::buildSBM1()
@@ -165,20 +184,28 void ParameterDump::buildSBM1()
165 184 spinbox_sy_lfr_s1_bp_p0 = new QDoubleSpinBox();
166 185 spinbox_sy_lfr_s1_bp_p1 = new QSpinBox();
167 186
187 button_loadSBM1 = new QPushButton(tr("LOAD_SBM1"));
188
189 button_loadSBM1->setEnabled(false);
190
168 191 spinbox_sy_lfr_s1_bp_p0->setRange(0.25, 0.25*256);
169 192 spinbox_sy_lfr_b_bp_p0->setValue(0.25);
170 193 spinbox_sy_lfr_s1_bp_p1->setRange(1, 255);
171 194 spinbox_sy_lfr_b_bp_p1->setValue(1);
172 195
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);
196 layout_SBM1->addWidget(button_loadSBM1, 0, 0, 1, 2);
197 layout_SBM1->addWidget(sy_lfr_s1_bp_p0, 1, 0, 1, 1);
198 layout_SBM1->addWidget(sy_lfr_s1_bp_p1, 2, 0, 1, 1);
199
200 layout_SBM1->addWidget(spinbox_sy_lfr_s1_bp_p0, 1, 1, 1, 1);
201 layout_SBM1->addWidget(spinbox_sy_lfr_s1_bp_p1, 2, 1, 1, 1);
177 202
178 203 layout_SBM1->setColumnStretch(2, 1);
179 204 layout_SBM1->setRowStretch(3, 1);
180 205
181 206 groupbox_SBM1->setLayout(layout_SBM1);
207
208 connect(this->button_loadSBM1, SIGNAL(clicked()), this, SLOT(sendLoadSBM1()));
182 209 }
183 210
184 211 void ParameterDump::buildSBM2()
@@ -192,54 +219,36 void ParameterDump::buildSBM2()
192 219 spinbox_sy_lfr_s2_bp_p0 = new QSpinBox();
193 220 spinbox_sy_lfr_s2_bp_p1 = new QSpinBox();
194 221
222 button_loadSBM2 = new QPushButton(tr("LOAD_SBM2"));
223
224 button_loadSBM2->setEnabled(false);
225
195 226 spinbox_sy_lfr_s2_bp_p0->setRange(1, 255);
196 227 spinbox_sy_lfr_s2_bp_p1->setRange(5, 255);
197 228
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);
229 layout_SBM2->addWidget(button_loadSBM2, 0, 0, 1, 2);
230
231 layout_SBM2->addWidget(sy_lfr_s2_bp_p0, 1, 0, 1, 1);
232 layout_SBM2->addWidget(sy_lfr_s2_bp_p1, 2, 0, 1, 1);
233
234 layout_SBM2->addWidget(spinbox_sy_lfr_s2_bp_p0, 1, 1, 1, 1);
235 layout_SBM2->addWidget(spinbox_sy_lfr_s2_bp_p1, 2, 1, 1, 1);
202 236
203 237 layout_SBM2->setColumnStretch(2, 1);
204 238 layout_SBM2->setRowStretch(3, 1);
205 239
206 240 groupbox_SBM2->setLayout(layout_SBM2);
241
242 connect(this->button_loadSBM2, SIGNAL(clicked()), this, SLOT(sendLoadSBM2()));
207 243 }
208 244
209 245 void ParameterDump::buildActions()
210 246 {
211 groupbox_ACTIONS = new QGroupBox(tr("LOAD / DUMP"));
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 247 button_parameterDump = new QPushButton(tr("DUMP_PAR"));
220 248
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 249 button_parameterDump->setEnabled(false);
227 250
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 251 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 252 }
244 253
245 254 void ParameterDump::updateParameterDump(TMPacketToRead *tmPacketToRead)
@@ -38,7 +38,6 public:
38 38 QGroupBox* groupbox_BURST;
39 39 QGroupBox* groupbox_SBM1;
40 40 QGroupBox* groupbox_SBM2;
41 QGroupBox* groupbox_ACTIONS;
42 41
43 42 QGridLayout* layout_parameterDump;
44 43 QGridLayout* layout_COMM;
@@ -46,7 +45,6 public:
46 45 QGridLayout* layout_BURST;
47 46 QGridLayout* layout_SBM1;
48 47 QGridLayout* layout_SBM2;
49 QGridLayout* layout_ACTIONS;
50 48
51 49 QPushButton* button_loadCommon;
52 50 QPushButton* button_loadNormal;
@@ -6,6 +6,7
6 6 #define FONT_SIZE_WAVEFORM_TITLE 10
7 7 #define DEFAULT_SIZE 2048
8 8 #define BLK_SIZE 12
9 #define BLK_SIZE_CWF3_LIGHT 6
9 10
10 11 //****************
11 12 // TM packets SIDs
@@ -614,6 +614,15 unsigned char TMStatistics::getCAT(TMPac
614 614 return cat;
615 615 }
616 616
617 unsigned char TMStatistics::getSegmentationGroupingFlag(TMPacketToRead *packet)
618 {
619 unsigned char segmentationGroupingFlag;
620
621 segmentationGroupingFlag = (unsigned char) (packet->Value[6] >> 6);
622
623 return segmentationGroupingFlag;
624 }
625
617 626 unsigned char TMStatistics::getTYPE(TMPacketToRead *packet)
618 627 {
619 628 unsigned char typ = 0;
@@ -688,13 +697,10 unsigned int TMStatistics::getSID(TMPack
688 697
689 698 if (logFileEn == true)
690 699 {
691 packetAsAnArray = QByteArray::fromRawData((char *) &packet->Value[4], (packet->size-4)).toHex();
692 *(this->logFileStrm)
693 << QDate::currentDate().toString() + " "
694 << QTime::currentTime().toString() << endl
695 << packetAsAnArray
696 << endl
697 << endl;
700 // packetAsAnArray = QByteArray::fromRawData((char *) &packet->Value[4], (packet->size-4));
701 logFile->write((char *) &packet->Value[4], (packet->size-4));
702 // *(this->logFileStrm)
703 // << packetAsAnArray;
698 704 }
699 705
700 706 if (packetLogFileEn == true)
@@ -722,14 +728,22 unsigned int TMStatistics::getSID(TMPack
722 728
723 729 void TMStatistics::buildFileName()
724 730 {
725 QString date;
726 QString time;
731 QTime time;
732 QDate date;
733 QString dateTime;
727 734 QString prefix;
728 735
729 date = QDate::currentDate().toString();
730 time = QTime::currentTime().toString();
736 date = QDate::currentDate();
737 time = QTime::currentTime();
731 738
732 prefix = defaultStorageDirectory + "/" + date + "_" + time + "_" ;
739 dateTime = QString::number( date.year() ) + "_"
740 + QString::number( date.month() ) + "_"
741 + QString::number( date.day() ) + "-"
742 + QString::number( time.hour() ) + "_"
743 + QString::number( time.minute() ) + "_"
744 + QString::number( time.second() );
745
746 prefix = defaultStorageDirectory + "/" + dateTime + "_" ;
733 747
734 748 if(this->logFile->isOpen()) this->logFile->close();
735 749 this->logFile->setFileName( prefix + "packet_record.data");
@@ -738,14 +752,22 void TMStatistics::buildFileName()
738 752
739 753 void TMStatistics::buildPacketLogFileName()
740 754 {
741 QString date;
742 QString time;
755 QTime time;
756 QDate date;
757 QString dateTime;
743 758 QString prefix;
744 759
745 date = QDate::currentDate().toString();
746 time = QTime::currentTime().toString();
760 date = QDate::currentDate();
761 time = QTime::currentTime();
747 762
748 prefix = defaultStorageDirectory + "/" + date + "_" + time + "_" ;
763 dateTime = QString::number( date.year() ) + "_"
764 + QString::number( date.month() ) + "_"
765 + QString::number( date.day() ) + "-"
766 + QString::number( time.hour() ) + "_"
767 + QString::number( time.minute() ) + "_"
768 + QString::number( time.second() );
769
770 prefix = defaultStorageDirectory + "/" + dateTime + "_" ;
749 771
750 772 if(this->packetLogFile->isOpen()) this->packetLogFile->close();
751 773 this->packetLogFile->setFileName( prefix + "packet_log.data");
@@ -33,6 +33,7 public:
33 33 void preProcessPacket(TMPacketToRead *packet);
34 34 unsigned char getPID(TMPacketToRead *packet);
35 35 unsigned char getCAT(TMPacketToRead *packet);
36 unsigned char getSegmentationGroupingFlag(TMPacketToRead *Packet_TM_LFR_HK_str);
36 37 unsigned char getTYPE(TMPacketToRead *packet);
37 38 unsigned char getSUBTYPE(TMPacketToRead *packet);
38 39 unsigned int getLENGTH(TMPacketToRead *packet);
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.0, 2013-08-01T09:15:42. -->
3 <!-- Written by QtCreator 2.8.0, 2013-10-08T12:38:17. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
General Comments 0
You need to be logged in to leave comments. Login now