@@ -0,0 +1,6 | |||
|
1 | #include "hkdisplay.h" | |
|
2 | ||
|
3 | HKDisplay::HKDisplay(QWidget *parent) : | |
|
4 | QWidget(parent) | |
|
5 | { | |
|
6 | } |
@@ -0,0 +1,116 | |||
|
1 | #ifndef HKDISPLAY_H | |
|
2 | #define HKDISPLAY_H | |
|
3 | ||
|
4 | #include <QWidget> | |
|
5 | #include <QLabel> | |
|
6 | ||
|
7 | class HKDisplay : public QWidget | |
|
8 | { | |
|
9 | Q_OBJECT | |
|
10 | public: | |
|
11 | explicit HKDisplay(QWidget *parent = 0); | |
|
12 | ||
|
13 | signals: | |
|
14 | ||
|
15 | public slots: | |
|
16 | ||
|
17 | private: | |
|
18 | QLabel *hk_lfr_mode; | |
|
19 | QLabel *hk_lfr_dpu_spw_enabled; | |
|
20 | QLabel *hk_lfr_dpu__link_state; | |
|
21 | QLabel *sy_lfr_watchdog_enabled; | |
|
22 | QLabel *hk_lfr_calib_enabled; | |
|
23 | QLabel *hk_lfr_reset_cause; | |
|
24 | // sy_lfr_sw_version_ | |
|
25 | QLabel *sy_lfr_sw_version_n1; | |
|
26 | QLabel *sy_lfr_sw_version_n2; | |
|
27 | QLabel *sy_lfr_sw_version_n3; | |
|
28 | QLabel *sy_lfr_sw_version_n4; | |
|
29 | QLabel *hk_lfr_update_info_tc_cnt; | |
|
30 | QLabel *hk_lfr_update_time_tc_cnt; | |
|
31 | QLabel *hk_dpu_exe_tc_lfr_cnt; | |
|
32 | QLabel *hk_dpu_rej_tc_lfr_cnt; | |
|
33 | // hk_lfr_last_exe_tc_ | |
|
34 | QLabel *hk_lfr_last_exe_tc_id; | |
|
35 | QLabel *hk_lfr_last_exe_tc_type; | |
|
36 | QLabel *hk_lfr_last_exe_tc_subtype; | |
|
37 | QLabel *hk_lfr_last_exe_tc_time; | |
|
38 | // hk_lfr_last_rej_tc_ | |
|
39 | QLabel *hk_lfr_last_rej_tc_id; | |
|
40 | QLabel *hk_lfr_last_rej_tc_type; | |
|
41 | QLabel *hk_lfr_last_rej_tc_subtype; | |
|
42 | QLabel *hk_lfr_last_rej_tc_time; | |
|
43 | ||
|
44 | QLabel *hk_lfr_le_cnt; | |
|
45 | QLabel *hk_lfr_me_cnt; | |
|
46 | QLabel *hk_lfr_he_cnt; | |
|
47 | // hk_lfr_last_er | |
|
48 | QLabel *hk_lfr_last_er_rid; | |
|
49 | QLabel *hk_lfr_last_er_code; | |
|
50 | QLabel *hk_lfr_last_er_time; | |
|
51 | //hk_lfr_vhdl_ | |
|
52 | QLabel *hk_lfr_vhdl_aa; | |
|
53 | QLabel *hk_lfr_vhdl_sm; | |
|
54 | QLabel *hk_lfr_vhdl_fft; | |
|
55 | QLabel *hk_lfr_vhdl_sr; | |
|
56 | QLabel *hk_lfr_vhdl_cic; | |
|
57 | QLabel *hk_lfr_vhdl_hk; | |
|
58 | QLabel *hk_lfr_vhdl_iir; | |
|
59 | QLabel *hk_lfr_vhdl_cal; | |
|
60 | // hk_lfr_dpu_spw_ | |
|
61 | QLabel *hk_lfr_dpu_spw_pkt_rcv_cnt; | |
|
62 | QLabel *hk_lfr_dpu_spw_pkt_sent_cnt; | |
|
63 | QLabel *hk_lfr_dpu_spw_tick_out_cnt; | |
|
64 | QLabel *hk_lfr_dpu_spw_last_timc; | |
|
65 | // hk_lfr_last_fail_addr | |
|
66 | QLabel *hk_lfr_last_fail_addr; | |
|
67 | // hk_lfr_temp_ | |
|
68 | QLabel *hk_lfr_temp_scm; | |
|
69 | QLabel *hk_lfr_temp_pcb; | |
|
70 | QLabel *hk_lfr_temp_fpga; | |
|
71 | // hk_lfr_dpu_spw_ | |
|
72 | QLabel *hk_lfr_dpu_spw_parity; | |
|
73 | QLabel *hk_lfr_dpu_spw_disconnect; | |
|
74 | QLabel *hk_lfr_dpu_spw_escape; | |
|
75 | QLabel *hk_lfr_dpu_spw_credit; | |
|
76 | QLabel *hk_lfr_dpu_spw_write_sync; | |
|
77 | QLabel *hk_lfr_dpu_spw_rx_ahb; | |
|
78 | QLabel *hk_lfr_dpu_spw_tx_ahb; | |
|
79 | QLabel *hk_lfr_dpu_spw_header_crc; | |
|
80 | QLabel *hk_lfr_dpu_spw_data_crc; | |
|
81 | QLabel *hk_lfr_dpu_spw_early_eop; | |
|
82 | QLabel *hk_lfr_dpu_spw_invalid_addr; | |
|
83 | QLabel *hk_lfr_dpu_spw_eep; | |
|
84 | QLabel *hk_lfr_dpu_spw_rx_too_big; | |
|
85 | // hk_lfr_timecode_ | |
|
86 | QLabel *hk_lfr_timecode_erroneous; | |
|
87 | QLabel *hk_lfr_timecode_missing; | |
|
88 | QLabel *hk_lfr_timecode_invalid; | |
|
89 | // hk_lfr_time_ | |
|
90 | QLabel *hk_lfr_time_timecode_it; | |
|
91 | QLabel *hk_lfr_time_not_synchro; | |
|
92 | QLabel *hk_lfr_time_timecode_ctr; | |
|
93 | // hk_lfr_buffer_dpu_ | |
|
94 | QLabel *hk_lfr_buffer_dpu_tc_fifo; | |
|
95 | QLabel *hk_lfr_buffer_dpu_tm_fifo; | |
|
96 | // hk_lfr_ahb_ | |
|
97 | QLabel *hk_lfr_ahb_correctable; | |
|
98 | QLabel *hk_lfr_ahb_uncorrectable; | |
|
99 | QLabel *hk_lfr_ahb_fails_trans; | |
|
100 | // hk_lfr_adc_ | |
|
101 | QLabel *hk_lfr_adc_failure; | |
|
102 | QLabel *hk_lfr_adc_timeout; | |
|
103 | QLabel *hk_lfr_toomany_err; | |
|
104 | // hk_lfr_cpu_ | |
|
105 | QLabel *hk_lfr_cpu_write_err; | |
|
106 | QLabel *hk_lfr_cpu_ins_access_err; | |
|
107 | QLabel *hk_lfr_cpu_illegal_ins; | |
|
108 | QLabel *hk_lfr_cpu_privilegied_ins; | |
|
109 | QLabel *hk_lfr_cpu_register_hw; | |
|
110 | QLabel *hk_lfr_cpu_not_aligned; | |
|
111 | QLabel *hk_lfr_cpu_data_exception; | |
|
112 | QLabel *hk_lfr_cpu_div_exception; | |
|
113 | QLabel *hk_lfr_cpu_arith_overflow; | |
|
114 | }; | |
|
115 | ||
|
116 | #endif // HKDISPLAY_H |
@@ -0,0 +1,331 | |||
|
1 | ############################################################################# | |
|
2 | # Makefile for building: gselesia | |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Tue Jun 4 14:34:14 2013 | |
|
4 | # Project: gselesia.pro | |
|
5 | # Template: app | |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |
|
7 | ############################################################################# | |
|
8 | ||
|
9 | ####### Compiler, tools and options | |
|
10 | ||
|
11 | CC = gcc | |
|
12 | CXX = g++ | |
|
13 | DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED | |
|
14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT $(DEFINES) | |
|
15 | CXXFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT $(DEFINES) | |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include -I. -I../common_PLE -I../rmapplugin -I/usr/include/lppmon/common -I/usr/include/lppmon/wfdisplay -I. | |
|
17 | LINK = g++ | |
|
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro | |
|
19 | LIBS = $(SUBLIBS) -L/usr/lib64 -llppmoncommon -lwfdisplay -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread | |
|
20 | AR = ar cqs | |
|
21 | RANLIB = | |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
|
23 | TAR = tar -cf | |
|
24 | COMPRESS = gzip -9f | |
|
25 | COPY = cp -f | |
|
26 | SED = sed | |
|
27 | COPY_FILE = $(COPY) | |
|
28 | COPY_DIR = $(COPY) -r | |
|
29 | STRIP = | |
|
30 | INSTALL_FILE = install -m 644 -p | |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
|
33 | DEL_FILE = rm -f | |
|
34 | SYMLINK = ln -f -s | |
|
35 | DEL_DIR = rmdir | |
|
36 | MOVE = mv -f | |
|
37 | CHK_DIR_EXISTS= test -d | |
|
38 | MKDIR = mkdir -p | |
|
39 | ||
|
40 | ####### Output directory | |
|
41 | ||
|
42 | OBJECTS_DIR = ./ | |
|
43 | ||
|
44 | ####### Files | |
|
45 | ||
|
46 | SOURCES = main.cpp \ | |
|
47 | mainwindow.cpp \ | |
|
48 | mainwindowui.cpp \ | |
|
49 | ../common_PLE/qipdialogbox.cpp \ | |
|
50 | lfrxmlhandler.cpp \ | |
|
51 | lfrxmlwriter.cpp \ | |
|
52 | ../rmapplugin/tmstatistics.cpp \ | |
|
53 | ../rmapplugin/tmpackettoread.cpp \ | |
|
54 | ../rmapplugin/wfpacket.cpp moc_mainwindow.cpp \ | |
|
55 | moc_mainwindowui.cpp \ | |
|
56 | moc_qipdialogbox.cpp \ | |
|
57 | moc_lfrxmlhandler.cpp \ | |
|
58 | moc_lfrxmlwriter.cpp \ | |
|
59 | moc_tmstatistics.cpp \ | |
|
60 | moc_tmpackettoread.cpp \ | |
|
61 | moc_wfpacket.cpp | |
|
62 | OBJECTS = main.o \ | |
|
63 | mainwindow.o \ | |
|
64 | mainwindowui.o \ | |
|
65 | qipdialogbox.o \ | |
|
66 | lfrxmlhandler.o \ | |
|
67 | lfrxmlwriter.o \ | |
|
68 | tmstatistics.o \ | |
|
69 | tmpackettoread.o \ | |
|
70 | wfpacket.o \ | |
|
71 | moc_mainwindow.o \ | |
|
72 | moc_mainwindowui.o \ | |
|
73 | moc_qipdialogbox.o \ | |
|
74 | moc_lfrxmlhandler.o \ | |
|
75 | moc_lfrxmlwriter.o \ | |
|
76 | moc_tmstatistics.o \ | |
|
77 | moc_tmpackettoread.o \ | |
|
78 | moc_wfpacket.o | |
|
79 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
|
80 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
|
81 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
|
82 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
|
83 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
|
84 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
|
85 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
|
86 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ | |
|
87 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
|
88 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
|
89 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
|
90 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
|
91 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
|
92 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
|
93 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
|
94 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
|
95 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
|
96 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
|
97 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
|
98 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
|
99 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
|
100 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
|
101 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
|
102 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
|
103 | gselesia.pro | |
|
104 | QMAKE_TARGET = gselesia | |
|
105 | DESTDIR = | |
|
106 | TARGET = gselesia | |
|
107 | ||
|
108 | first: all | |
|
109 | ####### Implicit rules | |
|
110 | ||
|
111 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
|
112 | ||
|
113 | .cpp.o: | |
|
114 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
|
115 | ||
|
116 | .cc.o: | |
|
117 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
|
118 | ||
|
119 | .cxx.o: | |
|
120 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
|
121 | ||
|
122 | .C.o: | |
|
123 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
|
124 | ||
|
125 | .c.o: | |
|
126 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
|
127 | ||
|
128 | ####### Build rules | |
|
129 | ||
|
130 | all: Makefile $(TARGET) | |
|
131 | ||
|
132 | $(TARGET): $(OBJECTS) | |
|
133 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
|
134 | ||
|
135 | Makefile: gselesia.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
|
136 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
|
137 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
|
138 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
|
139 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
|
140 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
|
141 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
|
142 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ | |
|
143 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
|
144 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
|
145 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
|
146 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
|
147 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
|
148 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
|
149 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
|
150 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
|
151 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
|
152 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
|
153 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
|
154 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
|
155 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
|
156 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
|
157 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
|
158 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
|
159 | /usr/lib64/libQtXml.prl \ | |
|
160 | /usr/lib64/libQtCore.prl \ | |
|
161 | /usr/lib64/libQtGui.prl \ | |
|
162 | /usr/lib64/libQtNetwork.prl | |
|
163 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |
|
164 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
|
165 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
|
166 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
|
167 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
|
168 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
|
169 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
|
170 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
|
171 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: | |
|
172 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
|
173 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
|
174 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
|
175 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
|
176 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
|
177 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
|
178 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
|
179 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
|
180 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |
|
181 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |
|
182 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |
|
183 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
|
184 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
|
185 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
|
186 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
|
187 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
|
188 | /usr/lib64/libQtXml.prl: | |
|
189 | /usr/lib64/libQtCore.prl: | |
|
190 | /usr/lib64/libQtGui.prl: | |
|
191 | /usr/lib64/libQtNetwork.prl: | |
|
192 | qmake: FORCE | |
|
193 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile gselesia.pro | |
|
194 | ||
|
195 | dist: | |
|
196 | @$(CHK_DIR_EXISTS) .tmp/gselesia1.0.0 || $(MKDIR) .tmp/gselesia1.0.0 | |
|
197 | $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/gselesia1.0.0/ && $(COPY_FILE) --parents mainwindow.h mainwindowui.h ../common_PLE/qipdialogbox.h lfrxmlhandler.h lfrxmlwriter.h ../rmapplugin/tmstatistics.h ../rmapplugin/tmpackettoread.h ../rmapplugin/wfpacket.h .tmp/gselesia1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp mainwindowui.cpp ../common_PLE/qipdialogbox.cpp lfrxmlhandler.cpp lfrxmlwriter.cpp ../rmapplugin/tmstatistics.cpp ../rmapplugin/tmpackettoread.cpp ../rmapplugin/wfpacket.cpp .tmp/gselesia1.0.0/ && (cd `dirname .tmp/gselesia1.0.0` && $(TAR) gselesia1.0.0.tar gselesia1.0.0 && $(COMPRESS) gselesia1.0.0.tar) && $(MOVE) `dirname .tmp/gselesia1.0.0`/gselesia1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/gselesia1.0.0 | |
|
198 | ||
|
199 | ||
|
200 | clean:compiler_clean | |
|
201 | -$(DEL_FILE) $(OBJECTS) | |
|
202 | -$(DEL_FILE) *~ core *.core | |
|
203 | ||
|
204 | ||
|
205 | ####### Sub-libraries | |
|
206 | ||
|
207 | distclean: clean | |
|
208 | -$(DEL_FILE) $(TARGET) | |
|
209 | -$(DEL_FILE) Makefile | |
|
210 | ||
|
211 | ||
|
212 | check: first | |
|
213 | ||
|
214 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |
|
215 | ||
|
216 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |
|
217 | ||
|
218 | 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 | |
|
219 | compiler_moc_header_clean: | |
|
220 | -$(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 | |
|
221 | moc_mainwindow.cpp: lfrxmlhandler.h \ | |
|
222 | lfrxmlwriter.h \ | |
|
223 | mainwindowui.h \ | |
|
224 | mainwindow.h | |
|
225 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp | |
|
226 | ||
|
227 | moc_mainwindowui.cpp: mainwindowui.h | |
|
228 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) mainwindowui.h -o moc_mainwindowui.cpp | |
|
229 | ||
|
230 | moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h | |
|
231 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc_qipdialogbox.cpp | |
|
232 | ||
|
233 | moc_lfrxmlhandler.cpp: lfrxmlhandler.h | |
|
234 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlhandler.h -o moc_lfrxmlhandler.cpp | |
|
235 | ||
|
236 | moc_lfrxmlwriter.cpp: lfrxmlwriter.h | |
|
237 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) lfrxmlwriter.h -o moc_lfrxmlwriter.cpp | |
|
238 | ||
|
239 | moc_tmstatistics.cpp: ../rmapplugin/tmstatistics.h | |
|
240 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/tmstatistics.h -o moc_tmstatistics.cpp | |
|
241 | ||
|
242 | moc_tmpackettoread.cpp: ../rmapplugin/tmpackettoread.h | |
|
243 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/tmpackettoread.h -o moc_tmpackettoread.cpp | |
|
244 | ||
|
245 | moc_wfpacket.cpp: ../rmapplugin/wfpacket.h | |
|
246 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../rmapplugin/wfpacket.h -o moc_wfpacket.cpp | |
|
247 | ||
|
248 | compiler_rcc_make_all: | |
|
249 | compiler_rcc_clean: | |
|
250 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
|
251 | compiler_image_collection_clean: | |
|
252 | -$(DEL_FILE) qmake_image_collection.cpp | |
|
253 | compiler_moc_source_make_all: | |
|
254 | compiler_moc_source_clean: | |
|
255 | compiler_uic_make_all: | |
|
256 | compiler_uic_clean: | |
|
257 | compiler_yacc_decl_make_all: | |
|
258 | compiler_yacc_decl_clean: | |
|
259 | compiler_yacc_impl_make_all: | |
|
260 | compiler_yacc_impl_clean: | |
|
261 | compiler_lex_make_all: | |
|
262 | compiler_lex_clean: | |
|
263 | compiler_clean: compiler_moc_header_clean | |
|
264 | ||
|
265 | ####### Compile | |
|
266 | ||
|
267 | main.o: main.cpp mainwindow.h \ | |
|
268 | lfrxmlhandler.h \ | |
|
269 | lfrxmlwriter.h \ | |
|
270 | mainwindowui.h | |
|
271 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp | |
|
272 | ||
|
273 | mainwindow.o: mainwindow.cpp mainwindow.h \ | |
|
274 | lfrxmlhandler.h \ | |
|
275 | lfrxmlwriter.h \ | |
|
276 | mainwindowui.h | |
|
277 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp | |
|
278 | ||
|
279 | mainwindowui.o: mainwindowui.cpp mainwindowui.h | |
|
280 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindowui.o mainwindowui.cpp | |
|
281 | ||
|
282 | qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h | |
|
283 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qipdialogbox.o ../common_PLE/qipdialogbox.cpp | |
|
284 | ||
|
285 | lfrxmlhandler.o: lfrxmlhandler.cpp lfrxmlhandler.h | |
|
286 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlhandler.o lfrxmlhandler.cpp | |
|
287 | ||
|
288 | lfrxmlwriter.o: lfrxmlwriter.cpp lfrxmlwriter.h | |
|
289 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o lfrxmlwriter.o lfrxmlwriter.cpp | |
|
290 | ||
|
291 | tmstatistics.o: ../rmapplugin/tmstatistics.cpp ../rmapplugin/tmstatistics.h | |
|
292 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmstatistics.o ../rmapplugin/tmstatistics.cpp | |
|
293 | ||
|
294 | tmpackettoread.o: ../rmapplugin/tmpackettoread.cpp ../rmapplugin/tmpackettoread.h | |
|
295 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmpackettoread.o ../rmapplugin/tmpackettoread.cpp | |
|
296 | ||
|
297 | wfpacket.o: ../rmapplugin/wfpacket.cpp ../rmapplugin/wfpacket.h | |
|
298 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfpacket.o ../rmapplugin/wfpacket.cpp | |
|
299 | ||
|
300 | moc_mainwindow.o: moc_mainwindow.cpp | |
|
301 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp | |
|
302 | ||
|
303 | moc_mainwindowui.o: moc_mainwindowui.cpp | |
|
304 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindowui.o moc_mainwindowui.cpp | |
|
305 | ||
|
306 | moc_qipdialogbox.o: moc_qipdialogbox.cpp | |
|
307 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qipdialogbox.o moc_qipdialogbox.cpp | |
|
308 | ||
|
309 | moc_lfrxmlhandler.o: moc_lfrxmlhandler.cpp | |
|
310 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlhandler.o moc_lfrxmlhandler.cpp | |
|
311 | ||
|
312 | moc_lfrxmlwriter.o: moc_lfrxmlwriter.cpp | |
|
313 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_lfrxmlwriter.o moc_lfrxmlwriter.cpp | |
|
314 | ||
|
315 | moc_tmstatistics.o: moc_tmstatistics.cpp | |
|
316 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tmstatistics.o moc_tmstatistics.cpp | |
|
317 | ||
|
318 | moc_tmpackettoread.o: moc_tmpackettoread.cpp | |
|
319 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tmpackettoread.o moc_tmpackettoread.cpp | |
|
320 | ||
|
321 | moc_wfpacket.o: moc_wfpacket.cpp | |
|
322 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfpacket.o moc_wfpacket.cpp | |
|
323 | ||
|
324 | ####### Install | |
|
325 | ||
|
326 | install: FORCE | |
|
327 | ||
|
328 | uninstall: FORCE | |
|
329 | ||
|
330 | FORCE: | |
|
331 |
@@ -0,0 +1,1 | |||
|
1 | <?xml version="1.0" encoding="UTF-8"?><persons><person firstname="yza" surname="bcd" number="756776">kamlesh</person><person firstname="stu" surname="vwx" number="87654">kamlesh</person><person firstname="mno" surname="pqr" number="12356">kamlesh</person><person firstname="ghi" surname="jkl" number="67890">kamlesh</person><person firstname="abc" surname="def" number="12345">kamlesh</person></persons> |
|
1 | NO CONTENT: new file 100755, binary diff hidden |
@@ -0,0 +1,43 | |||
|
1 | #------------------------------------------------- | |
|
2 | # | |
|
3 | # Project created by QtCreator 2013-05-03T14:05:02 | |
|
4 | # | |
|
5 | #------------------------------------------------- | |
|
6 | ||
|
7 | QT += core gui | |
|
8 | QT += network | |
|
9 | QT += xml | |
|
10 | ||
|
11 | TARGET = gselesia | |
|
12 | TEMPLATE = app | |
|
13 | ||
|
14 | INCLUDEPATH += \ | |
|
15 | $${PWD} \ | |
|
16 | ../common_PLE \ | |
|
17 | ../rmapplugin \ | |
|
18 | $$[QT_INSTALL_HEADERS]/lppmon/common \ | |
|
19 | $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay | |
|
20 | ||
|
21 | LIBS += -llppmoncommon -lwfdisplay | |
|
22 | ||
|
23 | SOURCES += main.cpp\ | |
|
24 | mainwindow.cpp \ | |
|
25 | mainwindowui.cpp \ | |
|
26 | ../common_PLE/qipdialogbox.cpp \ | |
|
27 | lfrxmlhandler.cpp \ | |
|
28 | lfrxmlwriter.cpp \ | |
|
29 | ../rmapplugin/tmstatistics.cpp \ | |
|
30 | ../rmapplugin/tmpackettoread.cpp \ | |
|
31 | ../rmapplugin/wfpacket.cpp | |
|
32 | ||
|
33 | HEADERS += mainwindow.h \ | |
|
34 | mainwindowui.h \ | |
|
35 | ../common_PLE/qipdialogbox.h \ | |
|
36 | lfrxmlhandler.h \ | |
|
37 | lfrxmlwriter.h \ | |
|
38 | ../rmapplugin/tmstatistics.h \ | |
|
39 | ../rmapplugin/tmpackettoread.h \ | |
|
40 | ../rmapplugin/wfpacket.h | |
|
41 | ||
|
42 | ||
|
43 |
@@ -0,0 +1,265 | |||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
|
2 | <!DOCTYPE QtCreatorProject> | |
|
3 | <!-- Written by Qt Creator 2.4.1, 2013-06-04T16:00:06. --> | |
|
4 | <qtcreator> | |
|
5 | <data> | |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
|
7 | <value type="int">0</value> | |
|
8 | </data> | |
|
9 | <data> | |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
|
11 | <valuemap type="QVariantMap"> | |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
|
14 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
|
15 | <value type="QString" key="language">Cpp</value> | |
|
16 | <valuemap type="QVariantMap" key="value"> | |
|
17 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |
|
18 | </valuemap> | |
|
19 | </valuemap> | |
|
20 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
|
21 | <value type="QString" key="language">QmlJS</value> | |
|
22 | <valuemap type="QVariantMap" key="value"> | |
|
23 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |
|
24 | </valuemap> | |
|
25 | </valuemap> | |
|
26 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
|
27 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
|
28 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
|
29 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
|
30 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
|
31 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
|
32 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
|
33 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
|
34 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
|
35 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
|
36 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
|
37 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
|
38 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
|
39 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
|
40 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
|
41 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
|
42 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
|
43 | </valuemap> | |
|
44 | </data> | |
|
45 | <data> | |
|
46 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
|
47 | <valuemap type="QVariantMap"/> | |
|
48 | </data> | |
|
49 | <data> | |
|
50 | <variable>ProjectExplorer.Project.Target.0</variable> | |
|
51 | <valuemap type="QVariantMap"> | |
|
52 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | |
|
53 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value> | |
|
55 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
|
56 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
|
58 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
|
59 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> | |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
|
62 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
|
63 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
|
65 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
|
66 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
|
67 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
|
69 | </valuemap> | |
|
70 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
|
71 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
|
72 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
|
74 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
|
75 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
|
76 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
|
77 | </valuemap> | |
|
78 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
|
79 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
|
80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
|
82 | </valuemap> | |
|
83 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
|
84 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
|
85 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
|
88 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
|
89 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
|
90 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
|
91 | </valuemap> | |
|
92 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
|
96 | </valuemap> | |
|
97 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
|
98 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
|
99 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
|
100 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |
|
101 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
102 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
|
103 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
|
104 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/GSE_LESIA/gselesia</value> | |
|
105 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |
|
106 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
|
107 | </valuemap> | |
|
108 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> | |
|
109 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> | |
|
110 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
|
111 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
|
115 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
|
116 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
|
117 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
|
118 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
|
119 | </valuemap> | |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
|
121 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
|
122 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
|
124 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
|
125 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
|
126 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
|
127 | </valuemap> | |
|
128 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
131 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
|
132 | </valuemap> | |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
|
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
|
136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
|
138 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
|
139 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
|
140 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
|
141 | </valuemap> | |
|
142 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
|
143 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
|
144 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
|
146 | </valuemap> | |
|
147 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
|
148 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
|
149 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
|
150 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> | |
|
151 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
|
153 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | |
|
154 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/GSE_LESIA/gselesia</value> | |
|
155 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |
|
156 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
|
157 | </valuemap> | |
|
158 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> | |
|
159 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
|
160 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
|
161 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
|
162 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
|
163 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
|
165 | </valuemap> | |
|
166 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
|
167 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
|
168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
|
170 | </valuemap> | |
|
171 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
|
172 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
|
173 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
|
174 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
|
175 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
|
176 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
|
177 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
|
178 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
|
179 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
|
180 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
|
181 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
|
182 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
|
183 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
|
184 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
|
185 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
|
186 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
|
187 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
|
188 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
|
189 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
|
190 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
|
191 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
|
192 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
|
193 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
|
194 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
|
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
|
196 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
|
197 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
|
198 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
|
199 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
|
200 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
|
201 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
|
202 | <value type="int">0</value> | |
|
203 | <value type="int">1</value> | |
|
204 | <value type="int">2</value> | |
|
205 | <value type="int">3</value> | |
|
206 | <value type="int">4</value> | |
|
207 | <value type="int">5</value> | |
|
208 | <value type="int">6</value> | |
|
209 | <value type="int">7</value> | |
|
210 | <value type="int">8</value> | |
|
211 | <value type="int">9</value> | |
|
212 | <value type="int">10</value> | |
|
213 | <value type="int">11</value> | |
|
214 | <value type="int">12</value> | |
|
215 | <value type="int">13</value> | |
|
216 | <value type="int">14</value> | |
|
217 | </valuelist> | |
|
218 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
|
219 | <value type="int">0</value> | |
|
220 | <value type="int">1</value> | |
|
221 | <value type="int">2</value> | |
|
222 | <value type="int">3</value> | |
|
223 | <value type="int">4</value> | |
|
224 | <value type="int">5</value> | |
|
225 | <value type="int">6</value> | |
|
226 | <value type="int">7</value> | |
|
227 | <value type="int">8</value> | |
|
228 | <value type="int">9</value> | |
|
229 | <value type="int">10</value> | |
|
230 | <value type="int">11</value> | |
|
231 | <value type="int">12</value> | |
|
232 | <value type="int">13</value> | |
|
233 | <value type="int">14</value> | |
|
234 | </valuelist> | |
|
235 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">gselesia</value> | |
|
236 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
237 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value> | |
|
238 | <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value> | |
|
239 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
|
240 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">gselesia.pro</value> | |
|
241 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
|
242 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> | |
|
243 | <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/> | |
|
244 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
|
245 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
|
246 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
|
247 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
|
248 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
|
249 | </valuemap> | |
|
250 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
|
251 | </valuemap> | |
|
252 | </data> | |
|
253 | <data> | |
|
254 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
|
255 | <value type="int">1</value> | |
|
256 | </data> | |
|
257 | <data> | |
|
258 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
|
259 | <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
|
260 | </data> | |
|
261 | <data> | |
|
262 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
|
263 | <value type="int">10</value> | |
|
264 | </data> | |
|
265 | </qtcreator> |
@@ -0,0 +1,106 | |||
|
1 | #include "lfrxmlhandler.h" | |
|
2 | #include <QDebug> | |
|
3 | ||
|
4 | LFRXmlHandler::LFRXmlHandler(QObject *parent) : | |
|
5 | QObject(parent) | |
|
6 | { | |
|
7 | } | |
|
8 | ||
|
9 | /*! | |
|
10 | Reset the state of the handler to ensure that new documents are | |
|
11 | read correctly. | |
|
12 | ||
|
13 | We return true to indicate that parsing should continue. | |
|
14 | */ | |
|
15 | ||
|
16 | bool LFRXmlHandler::startDocument() | |
|
17 | { | |
|
18 | elementName.clear(); | |
|
19 | elementIndentation.clear(); | |
|
20 | indentationLevel = 0; | |
|
21 | ||
|
22 | return true; | |
|
23 | } | |
|
24 | ||
|
25 | /*! | |
|
26 | Process each starting element in the XML document. | |
|
27 | ||
|
28 | Append the element name to the list of elements found; add its | |
|
29 | corresponding indentation level to the list of indentation levels. | |
|
30 | ||
|
31 | Increase the level of indentation by one column. | |
|
32 | ||
|
33 | We return true to indicate that parsing should continue. | |
|
34 | */ | |
|
35 | ||
|
36 | bool LFRXmlHandler::startElement(const QString &, const QString &, | |
|
37 | const QString & qName, const QXmlAttributes &) | |
|
38 | { | |
|
39 | elementName.append(qName); | |
|
40 | elementIndentation.append(indentationLevel); | |
|
41 | indentationLevel += 1; | |
|
42 | ||
|
43 | if (qName == "EventBinary") | |
|
44 | { | |
|
45 | emit displayMessage("EventBinary detected"); | |
|
46 | } | |
|
47 | ||
|
48 | return true; | |
|
49 | } | |
|
50 | ||
|
51 | /*! | |
|
52 | Process each ending element in the XML document. | |
|
53 | ||
|
54 | Decrease the level of indentation by one column. | |
|
55 | ||
|
56 | We return true to indicate that parsing should continue. | |
|
57 | */ | |
|
58 | ||
|
59 | bool LFRXmlHandler::endElement(const QString &, const QString &, | |
|
60 | const QString & qName) | |
|
61 | { | |
|
62 | if (qName == "EventTime") | |
|
63 | { | |
|
64 | emit displayMessage("/EventTime detected"); | |
|
65 | } | |
|
66 | indentationLevel -= 1; | |
|
67 | ||
|
68 | return true; | |
|
69 | } | |
|
70 | ||
|
71 | /*! | |
|
72 | Report a fatal parsing error, and return false to indicate to the reader | |
|
73 | that parsing should stop. | |
|
74 | */ | |
|
75 | ||
|
76 | bool LFRXmlHandler::fatalError (const QXmlParseException & exception) | |
|
77 | { | |
|
78 | qWarning() << QString("Fatal error on line %1, column %2: %3").arg( | |
|
79 | exception.lineNumber()).arg(exception.columnNumber()).arg( | |
|
80 | exception.message()); | |
|
81 | ||
|
82 | return true; | |
|
83 | } | |
|
84 | ||
|
85 | /*! | |
|
86 | Return the list of element names found. | |
|
87 | */ | |
|
88 | ||
|
89 | QStringList& LFRXmlHandler::names () | |
|
90 | { | |
|
91 | return elementName; | |
|
92 | } | |
|
93 | ||
|
94 | /*! | |
|
95 | Return the list of indentations used for each element found. | |
|
96 | */ | |
|
97 | ||
|
98 | QList<int>& LFRXmlHandler::indentations () | |
|
99 | { | |
|
100 | return elementIndentation; | |
|
101 | } | |
|
102 | ||
|
103 | void LFRXmlHandler::packetStoreHasChanged(QList<TMPacketToRead *> *ccsdsPacketStore) | |
|
104 | { | |
|
105 | this->ccsdsPacketStore = ccsdsPacketStore; | |
|
106 | } |
@@ -0,0 +1,39 | |||
|
1 | #ifndef LFRXMLHANDLER_H | |
|
2 | #define LFRXMLHANDLER_H | |
|
3 | ||
|
4 | #include <QObject> | |
|
5 | #include <QXmlDefaultHandler> | |
|
6 | #include "tmpackettoread.h" | |
|
7 | ||
|
8 | class LFRXmlHandler : public QObject, public QXmlDefaultHandler | |
|
9 | { | |
|
10 | Q_OBJECT | |
|
11 | ||
|
12 | public: | |
|
13 | explicit LFRXmlHandler(QObject *parent = 0); | |
|
14 | ||
|
15 | bool startDocument(); | |
|
16 | bool startElement(const QString &, const QString &, const QString &qName, | |
|
17 | const QXmlAttributes &); | |
|
18 | bool endElement(const QString &, const QString &, const QString & qName); | |
|
19 | ||
|
20 | bool fatalError(const QXmlParseException &exception); | |
|
21 | ||
|
22 | QStringList& names(); | |
|
23 | QList<int>& indentations(); | |
|
24 | ||
|
25 | void packetStoreHasChanged(QList<TMPacketToRead*> *ccsdsPacketStore); | |
|
26 | ||
|
27 | private: | |
|
28 | QList<TMPacketToRead*> *ccsdsPacketStore; | |
|
29 | ||
|
30 | int indentationLevel; | |
|
31 | QStringList elementName; | |
|
32 | QList<int> elementIndentation; | |
|
33 | ||
|
34 | signals: | |
|
35 | void displayMessage(QString); | |
|
36 | ||
|
37 | }; | |
|
38 | ||
|
39 | #endif // LFRXMLHANDLER_H |
@@ -0,0 +1,50 | |||
|
1 | #include "lfrxmlwriter.h" | |
|
2 | #include <QFile> | |
|
3 | #include <QMessageBox> | |
|
4 | ||
|
5 | LFRXmlWriter::LFRXmlWriter(QWidget *parent) : | |
|
6 | QObject(parent) | |
|
7 | { | |
|
8 | socketTM = NULL; | |
|
9 | xmlWriter = new QXmlStreamWriter(); | |
|
10 | } | |
|
11 | ||
|
12 | LFRXmlWriter::~LFRXmlWriter() | |
|
13 | { | |
|
14 | ||
|
15 | } | |
|
16 | ||
|
17 | void LFRXmlWriter::setSocketTM(QTcpSocket *socket) | |
|
18 | { | |
|
19 | this->socketTM = socket; | |
|
20 | xmlWriter->setDevice(this->socketTM); | |
|
21 | } | |
|
22 | ||
|
23 | void LFRXmlWriter::sendXML_TC_Acknowledgment() | |
|
24 | { | |
|
25 | xmlWriter->writeStartElement("TCAck"); | |
|
26 | xmlWriter->writeAttribute("ID", "0"); | |
|
27 | xmlWriter->writeEndElement(); | |
|
28 | } | |
|
29 | ||
|
30 | void LFRXmlWriter::sendXML_TC_rejection() | |
|
31 | { | |
|
32 | xmlWriter->writeStartElement("TCNAck"); | |
|
33 | xmlWriter->writeAttribute("ID", "0"); | |
|
34 | xmlWriter->writeStartElement("Reason"); | |
|
35 | xmlWriter->writeEndElement(); | |
|
36 | xmlWriter->writeEndElement(); | |
|
37 | } | |
|
38 | ||
|
39 | ||
|
40 | void LFRXmlWriter::sendXML_GSE_HK() | |
|
41 | { | |
|
42 | xmlWriter->writeStartElement("TM"); | |
|
43 | xmlWriter->writeStartElement("Name"); | |
|
44 | xmlWriter->writeEndElement(); | |
|
45 | xmlWriter->writeStartElement("Content"); | |
|
46 | xmlWriter->writeCharacters("FFFFCC0099"); | |
|
47 | xmlWriter->writeEndElement(); | |
|
48 | xmlWriter->writeEndElement(); | |
|
49 | xmlWriter->writeEndElement(); | |
|
50 | } |
@@ -0,0 +1,29 | |||
|
1 | #ifndef LFRXMLWRITER_H | |
|
2 | #define LFRXMLWRITER_H | |
|
3 | ||
|
4 | #include <QObject> | |
|
5 | #include <QXmlStreamWriter> | |
|
6 | #include <QMap> | |
|
7 | #include <QTcpSocket> | |
|
8 | ||
|
9 | class LFRXmlWriter : public QObject | |
|
10 | { | |
|
11 | Q_OBJECT | |
|
12 | ||
|
13 | public: | |
|
14 | LFRXmlWriter(QWidget *parent = 0); | |
|
15 | ~LFRXmlWriter(); | |
|
16 | ||
|
17 | private: | |
|
18 | QTcpSocket *socketTM; | |
|
19 | QXmlStreamWriter* xmlWriter; | |
|
20 | ||
|
21 | public slots: | |
|
22 | void setSocketTM(QTcpSocket *socket); | |
|
23 | void sendXML_TC_Acknowledgment(); | |
|
24 | void sendXML_TC_rejection(); | |
|
25 | void sendXML_GSE_HK(); | |
|
26 | ||
|
27 | }; | |
|
28 | ||
|
29 | #endif // LFRXMLWRITER_H |
@@ -0,0 +1,12 | |||
|
1 | #include <QtGui/QApplication> | |
|
2 | #include "mainwindow.h" | |
|
3 | #include <lfrxmlwriter.h> | |
|
4 | ||
|
5 | int main(int argc, char *argv[]) | |
|
6 | { | |
|
7 | QApplication a(argc, argv); | |
|
8 | MainWindow w; | |
|
9 | w.show(); | |
|
10 | ||
|
11 | return a.exec(); | |
|
12 | } |
@@ -0,0 +1,351 | |||
|
1 | #include "mainwindow.h" | |
|
2 | #include <iostream> | |
|
3 | #include <QNetworkInterface> | |
|
4 | ||
|
5 | MainWindow::MainWindow(QWidget *parent) | |
|
6 | : QWidget(parent) | |
|
7 | { | |
|
8 | totalOfBytes = 0; | |
|
9 | ||
|
10 | analyserSGSEServerTC = new QTcpServer(); | |
|
11 | analyserSGSEServerTM = new QTcpServer(); | |
|
12 | ||
|
13 | socketTC = NULL; | |
|
14 | socketTM = NULL; | |
|
15 | socketEchoServer = new QTcpSocket(); | |
|
16 | ||
|
17 | sourceTC = new QXmlInputSource(); | |
|
18 | sourceTMechoBridge = new QXmlInputSource(); | |
|
19 | xmlHandler = new LFRXmlHandler(); | |
|
20 | ||
|
21 | lfrXmlWriter = new LFRXmlWriter(); | |
|
22 | ||
|
23 | UI = new MainWindowUI(); | |
|
24 | ||
|
25 | initSocketStatesList(); | |
|
26 | ||
|
27 | this->setLayout(UI->layout()); | |
|
28 | ||
|
29 | connect(this->UI->button_openServerTCTM, SIGNAL(clicked()), this, SLOT(listenOnTCTMPorts())); | |
|
30 | connect(this->UI->button_testServerTCTM, SIGNAL(clicked()), this, SLOT(testTCTMPorts())); | |
|
31 | connect(this->UI->button_openSocketEchoServer, SIGNAL(clicked()), this, SLOT(openEchoServer())); | |
|
32 | // | |
|
33 | connect(this->analyserSGSEServerTC, SIGNAL(newConnection()), this, SLOT(newConnectionOnTCServer())); | |
|
34 | connect(this->analyserSGSEServerTM, SIGNAL(newConnection()), this, SLOT(newConnectionOnTMServer())); | |
|
35 | // | |
|
36 | connect(this, SIGNAL(socketTMHasChanged(QTcpSocket*)), this->lfrXmlWriter, SLOT(setSocketTM(QTcpSocket*))); | |
|
37 | connect(this->UI->button_TCAcknowledgement, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_TC_Acknowledgment())); | |
|
38 | connect(this->UI->button_TCRejection, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_TC_rejection())); | |
|
39 | connect(this->UI->button_GSEHK, SIGNAL(clicked()), this->lfrXmlWriter, SLOT(sendXML_GSE_HK())); | |
|
40 | connect(this->socketEchoServer, SIGNAL(stateChanged(QAbstractSocket::SocketState)), | |
|
41 | this, SLOT(socket_TMEcho_ServerHasChanged())); | |
|
42 | connect(this->socketEchoServer, SIGNAL(readyRead()), | |
|
43 | this, SLOT(readDataOnSocketEchoServer())); | |
|
44 | // | |
|
45 | connect(this->xmlHandler, SIGNAL(displayMessage(QString)), this, SLOT(displayOnConsole(QString))); | |
|
46 | ||
|
47 | displayNetworkInterfaces(); | |
|
48 | ||
|
49 | this->xmlHandler->packetStoreHasChanged(&generalCCSDSPacketStore); | |
|
50 | } | |
|
51 | ||
|
52 | MainWindow::~MainWindow() | |
|
53 | { | |
|
54 | ||
|
55 | } | |
|
56 | ||
|
57 | void MainWindow::displayNetworkInterfaces() | |
|
58 | { | |
|
59 | QList<QHostAddress> list = QNetworkInterface::allAddresses(); | |
|
60 | this->displayOnConsole("Network interfaces:"); | |
|
61 | for(int nIter=0; nIter<list.count(); nIter++) | |
|
62 | { | |
|
63 | this->UI->displayOnConsole(list[nIter].toString()); | |
|
64 | } | |
|
65 | } | |
|
66 | ||
|
67 | void MainWindow::listenOnTCTMPorts() | |
|
68 | { | |
|
69 | QString str; | |
|
70 | ||
|
71 | //*** | |
|
72 | // TC | |
|
73 | analyserSGSEServerTC->listen(QHostAddress::Any, this->UI->getTCPort()); | |
|
74 | str = analyserSGSEServerTC->errorString(); | |
|
75 | if (!str.isEmpty()) | |
|
76 | { | |
|
77 | this->displayOnConsole(str); | |
|
78 | } | |
|
79 | this->displayOnConsole("Listening TC on port " | |
|
80 | + QString::number(this->UI->getTCPort()) | |
|
81 | ); | |
|
82 | ||
|
83 | //*** | |
|
84 | // TM | |
|
85 | analyserSGSEServerTM->listen(QHostAddress::Any, this->UI->getTMPort()); | |
|
86 | str = analyserSGSEServerTM->errorString(); | |
|
87 | if (!str.isEmpty()) | |
|
88 | { | |
|
89 | this->displayOnConsole(str); | |
|
90 | } | |
|
91 | this->displayOnConsole("Listening TM on port " | |
|
92 | + QString::number(this->UI->getTMPort()) | |
|
93 | ); | |
|
94 | } | |
|
95 | ||
|
96 | void MainWindow::testTCTMPorts() | |
|
97 | { | |
|
98 | if (socketTC != NULL) | |
|
99 | { | |
|
100 | this->displayOnConsole("TC socket *** " + socketStates.at(socketTC->state()) ); | |
|
101 | } | |
|
102 | else | |
|
103 | { | |
|
104 | this->displayOnConsole("TC socket *** not tested, (socketTC) is NULL" ); | |
|
105 | } | |
|
106 | if (socketTM != NULL) | |
|
107 | { | |
|
108 | this->displayOnConsole("TM socket *** " + socketStates.at(socketTM->state()) ); | |
|
109 | } | |
|
110 | else | |
|
111 | { | |
|
112 | this->displayOnConsole("TM socket *** not tested, (socketTM) is NULL" ); | |
|
113 | } | |
|
114 | } | |
|
115 | ||
|
116 | void MainWindow::newConnectionOnTCServer() | |
|
117 | { | |
|
118 | this->displayOnConsole("got new connection on TC port"); | |
|
119 | socketTC = analyserSGSEServerTC->nextPendingConnection(); | |
|
120 | this->displayOnConsole("TC socket *** " + socketStates.at(socketTC->state()) ); | |
|
121 | connect(this->socketTC, SIGNAL(readyRead()), this, SLOT(readDataOnTCPort())); | |
|
122 | } | |
|
123 | ||
|
124 | void MainWindow::newConnectionOnTMServer() | |
|
125 | { | |
|
126 | this->displayOnConsole("got new connection on TM port"); | |
|
127 | socketTM = analyserSGSEServerTM->nextPendingConnection(); | |
|
128 | this->displayOnConsole("TM socket *** " + socketStates.at(socketTM->state()) ); | |
|
129 | connect(this->socketTM, SIGNAL(readyRead()), this, SLOT(readDataOnTMPort())); | |
|
130 | ||
|
131 | emit socketTMHasChanged(this->socketTM); | |
|
132 | } | |
|
133 | ||
|
134 | void MainWindow::readDataOnTCPort() | |
|
135 | { | |
|
136 | bool ok; | |
|
137 | int nbBytesAvailable = 0; | |
|
138 | ||
|
139 | nbBytesAvailable = socketTC->bytesAvailable(); | |
|
140 | buffer = (char *) malloc(nbBytesAvailable); | |
|
141 | socketTC->read(buffer, nbBytesAvailable); | |
|
142 | ||
|
143 | this->displayOnConsole("readDataOnTCPort *** " | |
|
144 | + QString::number(nbBytesAvailable) | |
|
145 | + " read"); | |
|
146 | ||
|
147 | QByteArray xmlData( buffer, nbBytesAvailable); | |
|
148 | ||
|
149 | free(buffer); | |
|
150 | ||
|
151 | sourceTC->setData( xmlData ); | |
|
152 | ||
|
153 | xmlReader.setContentHandler(xmlHandler); | |
|
154 | xmlReader.setErrorHandler(xmlHandler); | |
|
155 | ||
|
156 | ok = xmlReader.parse(sourceTC); | |
|
157 | if (!ok) { | |
|
158 | std::cout << "Parsing failed." << std::endl; | |
|
159 | } | |
|
160 | else { | |
|
161 | QStringList names = xmlHandler->names(); | |
|
162 | QList<int> indentations = xmlHandler->indentations(); | |
|
163 | ||
|
164 | int items = names.count(); | |
|
165 | ||
|
166 | for (int i = 0; i < items; ++i) { | |
|
167 | displayOnConsole( | |
|
168 | names[i] | |
|
169 | + " --- identations: " | |
|
170 | + QString::number(indentations[i])); | |
|
171 | } | |
|
172 | } | |
|
173 | } | |
|
174 | ||
|
175 | void MainWindow::readDataOnTMPort() | |
|
176 | { | |
|
177 | this->displayOnConsole("TM data received, begin parsing"); | |
|
178 | } | |
|
179 | ||
|
180 | void MainWindow::readDataOnSocketEchoServer() | |
|
181 | { | |
|
182 | int nbBytesAvailable = 0; | |
|
183 | ||
|
184 | nbBytesAvailable = socketEchoServer->bytesAvailable(); | |
|
185 | buffer = (char *) malloc(nbBytesAvailable); | |
|
186 | socketEchoServer->read(buffer, nbBytesAvailable); | |
|
187 | ||
|
188 | totalOfBytes = totalOfBytes + nbBytesAvailable; | |
|
189 | this->UI->totalOfBytesHasChanged(totalOfBytes); | |
|
190 | ||
|
191 | processIncomingData(buffer, nbBytesAvailable); | |
|
192 | ||
|
193 | free(buffer); | |
|
194 | } | |
|
195 | ||
|
196 | void MainWindow::processIncomingData(char *data, unsigned int size) | |
|
197 | { | |
|
198 | QByteArray newdat; | |
|
199 | int index; | |
|
200 | char *values; | |
|
201 | unsigned char *ccsdsData; | |
|
202 | unsigned int ccsdsSize = 0; | |
|
203 | unsigned char sizeByte1 = 0; | |
|
204 | unsigned char sizeByte0 = 0; | |
|
205 | ||
|
206 | TMPacketToRead *incomingPacket; | |
|
207 | ||
|
208 | newdat = QByteArray::fromRawData( data, size); | |
|
209 | index = newdat.indexOf("<EventBinary>") + 13; | |
|
210 | ||
|
211 | values = (char*) (newdat.data() + index); | |
|
212 | sizeByte0 = fromAsciiToChar(values[ 8*2 ])*16 + fromAsciiToChar(values[ 8*2+1 ]); | |
|
213 | sizeByte1 = fromAsciiToChar(values[ 9*2 ])*16 + fromAsciiToChar(values[ 9*2+1 ]); | |
|
214 | ccsdsSize = sizeByte0*256 + sizeByte1; | |
|
215 | ccsdsData = (unsigned char*) malloc(ccsdsSize + 1 + 10); | |
|
216 | for (unsigned int i=0; i<ccsdsSize; i++) | |
|
217 | { | |
|
218 | ccsdsData[i] = fromAsciiToChar(values[ i*2 ])*16 + fromAsciiToChar(values[ i*2+1 ]); | |
|
219 | } | |
|
220 | incomingPacket = new TMPacketToRead(ccsdsData, ccsdsSize); | |
|
221 | generalCCSDSPacketStore.append(incomingPacket); | |
|
222 | preProcessPacket(incomingPacket); | |
|
223 | free(ccsdsData); | |
|
224 | } | |
|
225 | ||
|
226 | void MainWindow::displayOnConsole(QString message) | |
|
227 | { | |
|
228 | this->UI->displayOnConsole( message ); | |
|
229 | } | |
|
230 | ||
|
231 | void MainWindow::initSocketStatesList() | |
|
232 | { | |
|
233 | socketStates.append("The socket is not connected"); | |
|
234 | socketStates.append("The socket is performing a host name lookup"); | |
|
235 | socketStates.append("The socket has started establishing a connection"); | |
|
236 | socketStates.append("A connection is established"); | |
|
237 | socketStates.append("The socket is bound to an address and port (for servers)"); | |
|
238 | socketStates.append("The socket is about to close (data may still be waiting to be written)"); | |
|
239 | socketStates.append("For internal use only"); | |
|
240 | } | |
|
241 | ||
|
242 | void MainWindow::openEchoServer() | |
|
243 | { | |
|
244 | socketEchoServer->connectToHost(this->UI->serverTMEchoDialogBox->getIP(), | |
|
245 | this->UI->spinbox_serverTMEchoPort->value()); | |
|
246 | //socketEchoServer->open(); | |
|
247 | } | |
|
248 | ||
|
249 | void MainWindow::socket_TMEcho_ServerHasChanged() | |
|
250 | { | |
|
251 | this->displayOnConsole("TM Echo Socket socket *** " + socketStates.at(socketEchoServer->state()) ); | |
|
252 | } | |
|
253 | ||
|
254 | void MainWindow::preProcessPacket(TMPacketToRead *packet) | |
|
255 | { | |
|
256 | unsigned char pid = 0; | |
|
257 | unsigned char cat = 0; | |
|
258 | unsigned char typ = 0; | |
|
259 | unsigned char sub = 0; | |
|
260 | unsigned int sid = 0; | |
|
261 | unsigned int length = 0; | |
|
262 | unsigned int coarse_t = 0; | |
|
263 | unsigned int fine_t = 0; | |
|
264 | ||
|
265 | //********************************* | |
|
266 | // get the parameters of the packet | |
|
267 | pid = ((packet->Value[4] & 0x07) << 4) + ((packet->Value[5] & 0xf0) >> 4); | |
|
268 | cat = packet->Value[5] & 0x0f; | |
|
269 | typ = packet->Value[11]; // TYPE | |
|
270 | sub = packet->Value[12]; // SUBTYPE | |
|
271 | sid = 0; | |
|
272 | length = packet->Value[8] * 256 + packet->Value[9]; | |
|
273 | coarse_t = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16) | |
|
274 | + packet->Value[16] * pow(2, 8) + packet->Value[17]; | |
|
275 | fine_t = packet->Value[18] * pow(2, 8) + packet->Value[19]; | |
|
276 | ||
|
277 | if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8)) | |
|
278 | sid = packet->Value[20] * 256 + packet->Value[21]; | |
|
279 | else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3)) | |
|
280 | sid = packet->Value[20]; | |
|
281 | else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25)) | |
|
282 | sid = 1; | |
|
283 | ||
|
284 | this->UI->tmStatistics->updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t); | |
|
285 | ||
|
286 | //**************************************** | |
|
287 | // if the packet is a waveform, display it | |
|
288 | if ( (typ == 21) & (sub == 3) ) | |
|
289 | { | |
|
290 | sid = packet->Value[20]; // SID | |
|
291 | switch (sid){ | |
|
292 | case SID_NORMAL_SWF_F0: | |
|
293 | buildWFAndDisplay(packet, &wfPacketNormal[0], 0); | |
|
294 | break; | |
|
295 | case SID_NORMAL_SWF_F1: | |
|
296 | buildWFAndDisplay(packet, &wfPacketNormal[1], 1); | |
|
297 | break; | |
|
298 | case SID_NORMAL_SWF_F2: | |
|
299 | buildWFAndDisplay(packet, &wfPacketNormal[2], 2); | |
|
300 | break; | |
|
301 | case SID_NORMAL_CWF_F3: | |
|
302 | buildWFAndDisplay(packet, &wfPacketNormal[3], 3); | |
|
303 | break; | |
|
304 | } | |
|
305 | } | |
|
306 | } | |
|
307 | ||
|
308 | void MainWindow::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) | |
|
309 | { | |
|
310 | unsigned int i = 0; | |
|
311 | unsigned int j = 0; | |
|
312 | unsigned char *data; | |
|
313 | unsigned char pkt_nr = 0; | |
|
314 | unsigned int blk_nr = 0; | |
|
315 | ||
|
316 | pkt_nr = packet->Value[23]; // PKT_NR | |
|
317 | blk_nr = packet->Value[24] * 256 + packet->Value[25]; | |
|
318 | data = &packet->Value[26]; // start of the first data block; | |
|
319 | j = (pkt_nr-1) * 340; | |
|
320 | 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]) ); | |
|
327 | } | |
|
328 | if (pkt_nr == 7) | |
|
329 | { | |
|
330 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); | |
|
331 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); | |
|
332 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); | |
|
333 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); | |
|
334 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); | |
|
335 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5); | |
|
336 | } | |
|
337 | } | |
|
338 | ||
|
339 | char MainWindow::fromAsciiToChar(char value) | |
|
340 | { | |
|
341 | char ret = -1; | |
|
342 | if (value > 'a') | |
|
343 | { | |
|
344 | ret = value - 'a' + 10; | |
|
345 | } | |
|
346 | else | |
|
347 | { | |
|
348 | ret = value - '0'; | |
|
349 | } | |
|
350 | return ret; | |
|
351 | } |
@@ -0,0 +1,71 | |||
|
1 | #ifndef MAINWINDOW_H | |
|
2 | #define MAINWINDOW_H | |
|
3 | ||
|
4 | #include <QtGui/QMainWindow> | |
|
5 | #include <QTcpServer> | |
|
6 | #include <QTcpSocket> | |
|
7 | #include <QXmlSimpleReader> | |
|
8 | #include <lfrxmlhandler.h> | |
|
9 | #include <lfrxmlwriter.h> | |
|
10 | #include <mainwindowui.h> | |
|
11 | #include "tmpackettoread.h" | |
|
12 | #include "wfpacket.h" | |
|
13 | ||
|
14 | class MainWindow : public QWidget | |
|
15 | { | |
|
16 | Q_OBJECT | |
|
17 | ||
|
18 | public: | |
|
19 | MainWindow(QWidget *parent = 0); | |
|
20 | ~MainWindow(); | |
|
21 | ||
|
22 | void displayNetworkInterfaces(); | |
|
23 | void processIncomingData(char *data, unsigned int size); | |
|
24 | void initSocketStatesList(); | |
|
25 | void preProcessPacket(TMPacketToRead *packet); | |
|
26 | void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); | |
|
27 | char fromAsciiToChar(char value); | |
|
28 | ||
|
29 | private: | |
|
30 | QList<TMPacketToRead*> generalCCSDSPacketStore; | |
|
31 | ||
|
32 | QTcpServer *analyserSGSEServerTC; | |
|
33 | QTcpServer *analyserSGSEServerTM; | |
|
34 | QTcpSocket *socketTC; | |
|
35 | QTcpSocket *socketTM; | |
|
36 | QTcpSocket *socketEchoServer; | |
|
37 | ||
|
38 | unsigned int totalOfBytes; | |
|
39 | ||
|
40 | QXmlSimpleReader xmlReader; | |
|
41 | QXmlInputSource *sourceTC; | |
|
42 | QXmlInputSource *sourceTMechoBridge; | |
|
43 | LFRXmlHandler *xmlHandler; | |
|
44 | ||
|
45 | QList<QString> socketStates; | |
|
46 | ||
|
47 | char *buffer; | |
|
48 | ||
|
49 | MainWindowUI *UI; | |
|
50 | ||
|
51 | LFRXmlWriter *lfrXmlWriter; | |
|
52 | ||
|
53 | WFPacket wfPacketNormal[4]; | |
|
54 | ||
|
55 | signals: | |
|
56 | void socketTMHasChanged(QTcpSocket *socket); | |
|
57 | ||
|
58 | public slots: | |
|
59 | void displayOnConsole(QString message); | |
|
60 | void listenOnTCTMPorts(); | |
|
61 | void testTCTMPorts(); | |
|
62 | void newConnectionOnTCServer(); | |
|
63 | void newConnectionOnTMServer(); | |
|
64 | void readDataOnTCPort(); | |
|
65 | void readDataOnTMPort(); | |
|
66 | void readDataOnSocketEchoServer(); | |
|
67 | void openEchoServer(); | |
|
68 | void socket_TMEcho_ServerHasChanged(); | |
|
69 | }; | |
|
70 | ||
|
71 | #endif // MAINWINDOW_H |
@@ -0,0 +1,133 | |||
|
1 | #include "mainwindowui.h" | |
|
2 | ||
|
3 | MainWindowUI::MainWindowUI(QWidget *parent) : | |
|
4 | QWidget(parent) | |
|
5 | { | |
|
6 | label_serverTMEcho = new QLabel(tr("TM Echo Server address")); | |
|
7 | label_serverTMEchoPort = new QLabel(tr("TM Echo Server Port")); | |
|
8 | label_TMServerPort = new QLabel(tr("TM Server Port:")); | |
|
9 | label_TCServerPort = new QLabel(tr("TC Server Port:")); | |
|
10 | label_currentTCTMServer = new QLabel(tr("Current IP address:")); | |
|
11 | label_currentTCTMServerIP = new QLabel(tr("-")); | |
|
12 | label_totalOfBytes = new QLabel(tr("Received Bytes: -")); | |
|
13 | ||
|
14 | console = new QTextEdit(); | |
|
15 | ||
|
16 | spwTabWidget = new QTabWidget; | |
|
17 | spwTabWidgetPage0 = new QWidget; | |
|
18 | spwTabWidgetPage1 = new QWidget; | |
|
19 | spwTabWidgetPage2 = new QWidget; | |
|
20 | spwTabWidgetPage3 = new QWidget; | |
|
21 | spwTabWidgetPage4 = new QWidget; | |
|
22 | spwTabWidgetPage5 = new QWidget; | |
|
23 | ||
|
24 | tmStatistics = new TMStatistics; | |
|
25 | ||
|
26 | wfDisplay = new WFDisplay; | |
|
27 | ||
|
28 | spinbox_TMServerPort = new QSpinBox(); | |
|
29 | spinbox_TCServerPort = new QSpinBox(); | |
|
30 | spinbox_serverTMEchoPort = new QSpinBox(); | |
|
31 | spinbox_TMServerPort->setRange(59000, 65535); | |
|
32 | spinbox_TCServerPort->setRange(59001, 65535); | |
|
33 | spinbox_serverTMEchoPort->setRange(59002, 65535); | |
|
34 | ||
|
35 | button_openServerTCTM = new QPushButton(tr("Open TC / TM Ports")); | |
|
36 | button_testServerTCTM = new QPushButton(tr("Test TC / TM Ports")); | |
|
37 | button_openSocketEchoServer = new QPushButton(tr("Open Echo Server")); | |
|
38 | button_TCAcknowledgement = new QPushButton(tr("send TC Acknowledgement")); | |
|
39 | button_TCRejection = new QPushButton(tr("send TC rejection")); | |
|
40 | button_GSEHK = new QPushButton(tr("send GSE HK")); | |
|
41 | button_clearConsole = new QPushButton(tr("Clear console")); | |
|
42 | ||
|
43 | serverTMEchoDialogBox = new QIPDialogBox(); | |
|
44 | serverTMEchoDialogBox->setIP(127, 0, 0, 1); | |
|
45 | ||
|
46 | groupbox_TMEcho = new QGroupBox(tr("TM Echo Server")); | |
|
47 | groupbox_ports = new QGroupBox(tr("Ports for the TM and TC Servers")); | |
|
48 | groupbox_TMToForeignGSETester = new QGroupBox(tr("Send TM to the foreign GSE tester")); | |
|
49 | ||
|
50 | layout_TMEcho = new QVBoxLayout(); | |
|
51 | layout_overallLayout = new QVBoxLayout(); | |
|
52 | layout_ports = new QGridLayout(); | |
|
53 | layout_TMToForeignGSETester = new QVBoxLayout(); | |
|
54 | mainLayout = new QGridLayout(); | |
|
55 | ||
|
56 | layout_TMEcho->addWidget(label_serverTMEcho); | |
|
57 | layout_TMEcho->addWidget(serverTMEchoDialogBox); | |
|
58 | layout_TMEcho->addWidget(label_serverTMEchoPort); | |
|
59 | layout_TMEcho->addWidget(spinbox_serverTMEchoPort); | |
|
60 | layout_TMEcho->addWidget(button_openSocketEchoServer); | |
|
61 | layout_TMEcho->addWidget(label_totalOfBytes); | |
|
62 | groupbox_TMEcho->setLayout(layout_TMEcho); | |
|
63 | ||
|
64 | layout_ports->addWidget(label_TMServerPort, 0, 0, 1, 1); | |
|
65 | layout_ports->addWidget(spinbox_TMServerPort, 0, 1, 1, 1); | |
|
66 | layout_ports->addWidget(label_TCServerPort, 1, 0, 1, 1); | |
|
67 | layout_ports->addWidget(spinbox_TCServerPort, 1, 1, 1, 1); | |
|
68 | layout_ports->addWidget(button_openServerTCTM, 2, 0, 1, 2); | |
|
69 | layout_ports->addWidget(button_testServerTCTM, 3, 0, 1, 2); | |
|
70 | groupbox_ports->setLayout(layout_ports); | |
|
71 | ||
|
72 | layout_TMToForeignGSETester->addWidget(button_TCAcknowledgement); | |
|
73 | layout_TMToForeignGSETester->addWidget(button_TCRejection); | |
|
74 | layout_TMToForeignGSETester->addWidget(button_GSEHK); | |
|
75 | groupbox_TMToForeignGSETester->setLayout(layout_TMToForeignGSETester); | |
|
76 | ||
|
77 | mainLayout->addWidget(groupbox_TMEcho, 0, 0, 1, 1); | |
|
78 | mainLayout->addWidget(groupbox_ports, 1, 0, 1, 1); | |
|
79 | mainLayout->addWidget(groupbox_TMToForeignGSETester, 2, 0, 1, 1); | |
|
80 | mainLayout->addWidget(console, 0, 1, 2, 2); | |
|
81 | mainLayout->addWidget(button_clearConsole, 3, 1, 1, 2); | |
|
82 | ||
|
83 | spwTabWidget->addTab(spwTabWidgetPage0, tr("Connection")); | |
|
84 | spwTabWidget->addTab(spwTabWidgetPage1, tr("TM Statistics")); | |
|
85 | spwTabWidget->addTab(spwTabWidgetPage2, tr("Waveforms")); | |
|
86 | ||
|
87 | spwTabWidgetPage0->setLayout(mainLayout); | |
|
88 | spwTabWidgetPage1->setLayout(tmStatistics->layout()); | |
|
89 | spwTabWidgetPage2->setLayout(wfDisplay->layout()); | |
|
90 | ||
|
91 | layout_overallLayout->addWidget(spwTabWidget); | |
|
92 | ||
|
93 | this->setLayout(layout_overallLayout); | |
|
94 | ||
|
95 | connect(this->button_clearConsole, SIGNAL(clicked()), this, SLOT(clearConsole())); | |
|
96 | } | |
|
97 | ||
|
98 | QString MainWindowUI::getTMEchoServerAddress() | |
|
99 | { | |
|
100 | return(serverTMEchoDialogBox->getIP()); | |
|
101 | } | |
|
102 | ||
|
103 | void MainWindowUI::setTCTMServerAddressIP(QString address) | |
|
104 | { | |
|
105 | label_currentTCTMServerIP->setText(address); | |
|
106 | } | |
|
107 | ||
|
108 | int MainWindowUI::getTMPort() | |
|
109 | { | |
|
110 | return spinbox_TMServerPort->value(); | |
|
111 | } | |
|
112 | ||
|
113 | int MainWindowUI::getTCPort() | |
|
114 | { | |
|
115 | return spinbox_TCServerPort->value(); | |
|
116 | } | |
|
117 | ||
|
118 | void MainWindowUI::displayOnConsole(QString message) | |
|
119 | { | |
|
120 | console->append(message); | |
|
121 | } | |
|
122 | ||
|
123 | void MainWindowUI::clearConsole() | |
|
124 | { | |
|
125 | console->clear(); | |
|
126 | } | |
|
127 | ||
|
128 | void MainWindowUI::totalOfBytesHasChanged(unsigned int nbBytes) | |
|
129 | { | |
|
130 | label_totalOfBytes->setText( | |
|
131 | "Received Bytes: " | |
|
132 | + QString::number(nbBytes)); | |
|
133 | } |
@@ -0,0 +1,86 | |||
|
1 | #ifndef MAINWINDOWUI_H | |
|
2 | #define MAINWINDOWUI_H | |
|
3 | ||
|
4 | #include <QWidget> | |
|
5 | #include <qipdialogbox.h> | |
|
6 | #include <QLabel> | |
|
7 | #include <QPushButton> | |
|
8 | #include <QGridLayout> | |
|
9 | #include <QVBoxLayout> | |
|
10 | #include <QGroupBox> | |
|
11 | #include <QSpinBox> | |
|
12 | #include <QTextEdit> | |
|
13 | #include <QTabWidget> | |
|
14 | #include "tmstatistics.h" | |
|
15 | #include "wfdisplay.h" | |
|
16 | ||
|
17 | class MainWindowUI : public QWidget | |
|
18 | { | |
|
19 | Q_OBJECT | |
|
20 | public: | |
|
21 | explicit MainWindowUI(QWidget *parent = 0); | |
|
22 | ||
|
23 | void setTCTMServerAddressIP(QString address); | |
|
24 | QString getTMEchoServerAddress(); | |
|
25 | int getTMPort(); | |
|
26 | int getTCPort(); | |
|
27 | void displayOnConsole(QString message); | |
|
28 | ||
|
29 | QTabWidget *spwTabWidget; | |
|
30 | QWidget* spwTabWidgetPage0; | |
|
31 | QWidget* spwTabWidgetPage1; | |
|
32 | QWidget* spwTabWidgetPage2; | |
|
33 | QWidget* spwTabWidgetPage3; | |
|
34 | QWidget* spwTabWidgetPage4; | |
|
35 | QWidget* spwTabWidgetPage5; | |
|
36 | ||
|
37 | TMStatistics* tmStatistics; | |
|
38 | ||
|
39 | WFDisplay* wfDisplay; | |
|
40 | ||
|
41 | QPushButton *button_openServerTCTM; | |
|
42 | QPushButton *button_testServerTCTM; | |
|
43 | QPushButton *button_openSocketEchoServer; | |
|
44 | QPushButton *button_TCAcknowledgement; | |
|
45 | QPushButton *button_TCRejection; | |
|
46 | QPushButton *button_GSEHK; | |
|
47 | QPushButton *button_clearConsole; | |
|
48 | ||
|
49 | QIPDialogBox *serverTMEchoDialogBox; | |
|
50 | ||
|
51 | QSpinBox *spinbox_serverTMEchoPort; | |
|
52 | ||
|
53 | signals: | |
|
54 | ||
|
55 | public slots: | |
|
56 | void clearConsole(); | |
|
57 | void totalOfBytesHasChanged(unsigned int nbBytes); | |
|
58 | ||
|
59 | private: | |
|
60 | QLabel *label_serverTMEcho; | |
|
61 | QLabel *label_serverTMEchoPort; | |
|
62 | QLabel *label_TMServerPort; | |
|
63 | QLabel *label_TCServerPort; | |
|
64 | QLabel *label_currentTCTMServer; | |
|
65 | QLabel *label_currentTCTMServerIP; | |
|
66 | QLabel *label_totalOfBytes; | |
|
67 | ||
|
68 | QTextEdit *console; | |
|
69 | ||
|
70 | QSpinBox *spinbox_TMServerPort; | |
|
71 | QSpinBox *spinbox_TCServerPort; | |
|
72 | ||
|
73 | QGroupBox *groupbox_TMEcho; | |
|
74 | QGroupBox *groupbox_ports; | |
|
75 | QGroupBox *groupbox_TMToForeignGSETester; | |
|
76 | ||
|
77 | QVBoxLayout *layout_TMEcho; | |
|
78 | QVBoxLayout *layout_TMToForeignGSETester; | |
|
79 | QVBoxLayout *layout_overallLayout; | |
|
80 | ||
|
81 | QGridLayout *mainLayout; | |
|
82 | QGridLayout *layout_ports; | |
|
83 | ||
|
84 | }; | |
|
85 | ||
|
86 | #endif // MAINWINDOWUI_H |
@@ -0,0 +1,183 | |||
|
1 | #include "tmechobridge.h" | |
|
2 | ||
|
3 | TMEchoBridge::TMEchoBridge(QWidget *parent) : | |
|
4 | QWidget(parent) | |
|
5 | { | |
|
6 | totalOfBytes = 0; | |
|
7 | ||
|
8 | tmEchoBridgeServer = new QTcpServer(); | |
|
9 | tmEchoBridgeSocket = new QTcpSocket(); | |
|
10 | xmlWriter = new QXmlStreamWriter(); | |
|
11 | ||
|
12 | console = new QTextEdit(); | |
|
13 | ||
|
14 | label_TMServerPort = new QLabel(tr("TM Server Port:")); | |
|
15 | label_totalOfBytes = new QLabel(tr("Number of TM bytes sent: -")); | |
|
16 | ||
|
17 | spinbox_TMServerPort = new QSpinBox(); | |
|
18 | spinbox_TMServerPort->setRange(59002, 65535); | |
|
19 | ||
|
20 | button_openServerTCTM = new QPushButton(tr("Open Port")); | |
|
21 | button_testServerTCTM = new QPushButton(tr("Test Port")); | |
|
22 | button_sendTestPacket = new QPushButton(tr("Send a test packet")); | |
|
23 | button_clearConsole = new QPushButton(tr("Clear console")); | |
|
24 | ||
|
25 | groupbox_ports = new QGroupBox(tr("Port of the TM Echo Bridge")); | |
|
26 | ||
|
27 | layout_ports = new QGridLayout(); | |
|
28 | mainLayout = new QGridLayout(); | |
|
29 | ||
|
30 | initSocketStatesList(); | |
|
31 | ||
|
32 | layout_ports->addWidget(label_TMServerPort, 0, 0, 1, 1); | |
|
33 | layout_ports->addWidget(spinbox_TMServerPort, 0, 1, 1, 1); | |
|
34 | layout_ports->addWidget(button_openServerTCTM, 2, 0, 1, 2); | |
|
35 | layout_ports->addWidget(button_testServerTCTM, 3, 0, 1, 2); | |
|
36 | layout_ports->addWidget(button_sendTestPacket, 4, 0, 1, 2); | |
|
37 | layout_ports->addWidget(label_totalOfBytes, 5, 0, 1, 2); | |
|
38 | layout_ports->setRowStretch(6, 1); | |
|
39 | layout_ports->setColumnStretch(2, 1); | |
|
40 | ||
|
41 | groupbox_ports->setLayout(layout_ports); | |
|
42 | ||
|
43 | mainLayout->addWidget(groupbox_ports, 0, 0, 1, 1); | |
|
44 | mainLayout->addWidget(console, 0, 1, 1, 1); | |
|
45 | mainLayout->addWidget(button_clearConsole, 1, 1, 1, 1); | |
|
46 | ||
|
47 | this->setLayout(mainLayout); | |
|
48 | ||
|
49 | connect(this->tmEchoBridgeServer, SIGNAL(newConnection()), this, SLOT(newConnectionOnTMEchoBridgeServer())); | |
|
50 | connect(this->button_openServerTCTM, SIGNAL(clicked()), this, SLOT(listenOnTMEchoBridgePort())); | |
|
51 | connect(this->button_testServerTCTM, SIGNAL(clicked()), this, SLOT(testTMEchoBridgePort())); | |
|
52 | connect(this->button_sendTestPacket, SIGNAL(clicked()), this, SLOT(sendXML_GSE_HK())); | |
|
53 | connect(this->button_clearConsole, SIGNAL(clicked()), this, SLOT(clearConsole())); | |
|
54 | } | |
|
55 | ||
|
56 | void TMEchoBridge::listenOnTMEchoBridgePort() | |
|
57 | { | |
|
58 | QString str; | |
|
59 | ||
|
60 | tmEchoBridgeServer->listen(QHostAddress::Any, this->getTMPort()); | |
|
61 | str = tmEchoBridgeServer->errorString(); | |
|
62 | if (!str.isEmpty()) | |
|
63 | { | |
|
64 | this->displayOnConsole(str); | |
|
65 | } | |
|
66 | this->displayOnConsole("Listening TM on port " | |
|
67 | + QString::number(this->getTMPort()) | |
|
68 | ); | |
|
69 | } | |
|
70 | ||
|
71 | void TMEchoBridge::testTMEchoBridgePort() | |
|
72 | { | |
|
73 | if (tmEchoBridgeSocket != NULL) | |
|
74 | { | |
|
75 | this->displayOnConsole("TM socket *** " + socketStates.at(tmEchoBridgeSocket->state()) ); | |
|
76 | } | |
|
77 | else | |
|
78 | { | |
|
79 | this->displayOnConsole("TC socket *** not tested, (socketTC) is NULL" ); | |
|
80 | } | |
|
81 | } | |
|
82 | ||
|
83 | void TMEchoBridge::newConnectionOnTMEchoBridgeServer() | |
|
84 | { | |
|
85 | this->displayOnConsole("got new connection on TM port"); | |
|
86 | tmEchoBridgeSocket = tmEchoBridgeServer->nextPendingConnection(); | |
|
87 | this->displayOnConsole("TM socket *** " + socketStates.at(tmEchoBridgeSocket->state()) ); | |
|
88 | xmlWriter->setDevice(this->tmEchoBridgeSocket); | |
|
89 | } | |
|
90 | ||
|
91 | int TMEchoBridge::getTMPort() | |
|
92 | { | |
|
93 | return spinbox_TMServerPort->value(); | |
|
94 | } | |
|
95 | ||
|
96 | void TMEchoBridge::displayOnConsole(QString message) | |
|
97 | { | |
|
98 | console->append(message); | |
|
99 | } | |
|
100 | ||
|
101 | void TMEchoBridge::initSocketStatesList() | |
|
102 | { | |
|
103 | socketStates.append("The socket is not connected"); | |
|
104 | socketStates.append("The socket is performing a host name lookup"); | |
|
105 | socketStates.append("The socket has started establishing a connection"); | |
|
106 | socketStates.append("A connection is established"); | |
|
107 | socketStates.append("The socket is bound to an address and port (for servers)"); | |
|
108 | socketStates.append("The socket is about to close (data may still be waiting to be written)"); | |
|
109 | socketStates.append("For internal use only"); | |
|
110 | } | |
|
111 | ||
|
112 | void TMEchoBridge::sendXML_GSE_HK() | |
|
113 | { | |
|
114 | char data[10]; | |
|
115 | for (int i = 0; i <10; i++) | |
|
116 | { | |
|
117 | data[i] = i; | |
|
118 | } | |
|
119 | if (tmEchoBridgeSocket->state() == QAbstractSocket::ConnectedState) | |
|
120 | { | |
|
121 | xmlWriter->writeStartElement("Event"); | |
|
122 | ||
|
123 | // EventDate | |
|
124 | xmlWriter->writeStartElement("EventDate"); | |
|
125 | xmlWriter->writeEndElement(); | |
|
126 | ||
|
127 | // Event Time | |
|
128 | xmlWriter->writeStartElement("EventTime"); | |
|
129 | xmlWriter->writeEndElement(); | |
|
130 | ||
|
131 | // EventBinary | |
|
132 | xmlWriter->writeStartElement("EventBinary"); | |
|
133 | xmlWriter->writeCharacters("FFFFCC0099"); | |
|
134 | xmlWriter->writeCharacters(QString::fromLocal8Bit(data, 10)); | |
|
135 | xmlWriter->writeEndElement(); | |
|
136 | ||
|
137 | xmlWriter->writeEndElement(); | |
|
138 | } | |
|
139 | else | |
|
140 | { | |
|
141 | this->displayOnConsole("TM socket *** " + socketStates.at(tmEchoBridgeSocket->state()) ); | |
|
142 | } | |
|
143 | } | |
|
144 | ||
|
145 | void TMEchoBridge::sendTMPacket(TMPacketToRead *tmPacketToRead) | |
|
146 | { | |
|
147 | if (tmEchoBridgeSocket->state() == QAbstractSocket::ConnectedState) | |
|
148 | { | |
|
149 | // <Event> | |
|
150 | xmlWriter->writeStartElement("Event"); | |
|
151 | ||
|
152 | // EventDate | |
|
153 | xmlWriter->writeStartElement("EventDate"); | |
|
154 | xmlWriter->writeEndElement(); | |
|
155 | ||
|
156 | // Event Time | |
|
157 | xmlWriter->writeStartElement("EventTime"); | |
|
158 | xmlWriter->writeEndElement(); | |
|
159 | ||
|
160 | // EventBinary | |
|
161 | xmlWriter->writeStartElement("EventBinary"); | |
|
162 | xmlWriter->writeCharacters( | |
|
163 | QByteArray::fromRawData( (char*) tmPacketToRead->Value, tmPacketToRead->size).toHex() | |
|
164 | ); | |
|
165 | //tmEchoBridgeSocket->write(QByteArray::fromRawData( (char*) tmPacketToRead->Value, tmPacketToRead->size)); | |
|
166 | xmlWriter->writeEndElement(); | |
|
167 | ||
|
168 | // </event> | |
|
169 | xmlWriter->writeEndElement(); | |
|
170 | ||
|
171 | totalOfBytes = totalOfBytes + tmPacketToRead->size; | |
|
172 | label_totalOfBytes->setText("Number of TM bytes sent: " + QString::number(totalOfBytes)); | |
|
173 | } | |
|
174 | else | |
|
175 | { | |
|
176 | this->displayOnConsole("TM socket *** " + socketStates.at(tmEchoBridgeSocket->state()) ); | |
|
177 | } | |
|
178 | } | |
|
179 | ||
|
180 | void TMEchoBridge::clearConsole() | |
|
181 | { | |
|
182 | this->console->clear(); | |
|
183 | } |
@@ -0,0 +1,65 | |||
|
1 | #ifndef TMECHOBRIDGE_H | |
|
2 | #define TMECHOBRIDGE_H | |
|
3 | ||
|
4 | #include <QWidget> | |
|
5 | #include <QTcpServer> | |
|
6 | #include <QTcpSocket> | |
|
7 | #include <QLabel> | |
|
8 | #include <QSpinBox> | |
|
9 | #include <QPushButton> | |
|
10 | #include <QGroupBox> | |
|
11 | #include <QGridLayout> | |
|
12 | #include <QTextEdit> | |
|
13 | #include <QXmlStreamWriter> | |
|
14 | #include "tmpackettoread.h" | |
|
15 | ||
|
16 | class TMEchoBridge : public QWidget | |
|
17 | { | |
|
18 | Q_OBJECT | |
|
19 | public: | |
|
20 | explicit TMEchoBridge(QWidget *parent = 0); | |
|
21 | ||
|
22 | signals: | |
|
23 | ||
|
24 | public slots: | |
|
25 | void listenOnTMEchoBridgePort(); | |
|
26 | void testTMEchoBridgePort(); | |
|
27 | void newConnectionOnTMEchoBridgeServer(); | |
|
28 | int getTMPort(); | |
|
29 | void displayOnConsole(QString message); | |
|
30 | void initSocketStatesList(); | |
|
31 | void newConnectionOnTCServer(); | |
|
32 | void sendXML_GSE_HK(); | |
|
33 | void sendTMPacket(TMPacketToRead *tmPacketToRead); | |
|
34 | void clearConsole(); | |
|
35 | ||
|
36 | private: | |
|
37 | QList<QString> socketStates; | |
|
38 | ||
|
39 | unsigned int totalOfBytes; | |
|
40 | ||
|
41 | QTcpServer *tmEchoBridgeServer; | |
|
42 | QTcpSocket *tmEchoBridgeSocket; | |
|
43 | ||
|
44 | QXmlStreamWriter *xmlWriter; | |
|
45 | ||
|
46 | QTextEdit *console; | |
|
47 | ||
|
48 | QLabel *label_TMServerPort; | |
|
49 | QLabel *label_totalOfBytes; | |
|
50 | ||
|
51 | QSpinBox *spinbox_TMServerPort; | |
|
52 | ||
|
53 | QPushButton *button_openServerTCTM; | |
|
54 | QPushButton *button_testServerTCTM; | |
|
55 | QPushButton *button_sendTestPacket; | |
|
56 | QPushButton *button_clearConsole; | |
|
57 | ||
|
58 | QGroupBox *groupbox_ports; | |
|
59 | ||
|
60 | QGridLayout *layout_ports; | |
|
61 | QGridLayout *mainLayout; | |
|
62 | ||
|
63 | }; | |
|
64 | ||
|
65 | #endif // TMECHOBRIDGE_H |
@@ -0,0 +1,308 | |||
|
1 | ############################################################################# | |
|
2 | # Makefile for building: libwfdisplay.so.1.0.0 | |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri May 31 14:14:01 2013 | |
|
4 | # Project: wfdisplay.pro | |
|
5 | # Template: lib | |
|
6 | # Command: /usr/bin/qmake-qt4 -o Makefile wfdisplay.pro | |
|
7 | ############################################################################# | |
|
8 | ||
|
9 | ####### Compiler, tools and options | |
|
10 | ||
|
11 | CC = gcc | |
|
12 | CXX = g++ | |
|
13 | DEFINES = -DWFDISPLAY_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED | |
|
14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) | |
|
15 | CXXFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) | |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I/usr/include/lppmon/common -I. | |
|
17 | LINK = g++ | |
|
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro -shared -Wl,-soname,libwfdisplay.so.1 | |
|
19 | LIBS = $(SUBLIBS) -L/usr/lib64 -llppmoncommon -lQtGui -lQtCore -lpthread | |
|
20 | AR = ar cqs | |
|
21 | RANLIB = | |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
|
23 | TAR = tar -cf | |
|
24 | COMPRESS = gzip -9f | |
|
25 | COPY = cp -f | |
|
26 | SED = sed | |
|
27 | COPY_FILE = $(COPY) | |
|
28 | COPY_DIR = $(COPY) -r | |
|
29 | STRIP = | |
|
30 | INSTALL_FILE = install -m 644 -p | |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
|
33 | DEL_FILE = rm -f | |
|
34 | SYMLINK = ln -f -s | |
|
35 | DEL_DIR = rmdir | |
|
36 | MOVE = mv -f | |
|
37 | CHK_DIR_EXISTS= test -d | |
|
38 | MKDIR = mkdir -p | |
|
39 | ||
|
40 | ####### Output directory | |
|
41 | ||
|
42 | OBJECTS_DIR = ./ | |
|
43 | ||
|
44 | ####### Files | |
|
45 | ||
|
46 | SOURCES = wfdisplay.cpp \ | |
|
47 | wfplot.cpp \ | |
|
48 | wfpage.cpp moc_wfdisplay.cpp \ | |
|
49 | moc_wfplot.cpp \ | |
|
50 | moc_wfpage.cpp | |
|
51 | OBJECTS = wfdisplay.o \ | |
|
52 | wfplot.o \ | |
|
53 | wfpage.o \ | |
|
54 | moc_wfdisplay.o \ | |
|
55 | moc_wfplot.o \ | |
|
56 | moc_wfpage.o | |
|
57 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
|
58 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
|
59 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
|
60 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
|
61 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
|
62 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
|
63 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
|
64 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ | |
|
65 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
|
66 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
|
67 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
|
68 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
|
69 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
|
70 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
|
71 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
|
72 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
|
73 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
|
74 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
|
75 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
|
76 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
|
77 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
|
78 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
|
79 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
|
80 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
|
81 | wfdisplay.pro | |
|
82 | QMAKE_TARGET = wfdisplay | |
|
83 | DESTDIR = | |
|
84 | TARGET = libwfdisplay.so.1.0.0 | |
|
85 | TARGETA = libwfdisplay.a | |
|
86 | TARGETD = libwfdisplay.so.1.0.0 | |
|
87 | TARGET0 = libwfdisplay.so | |
|
88 | TARGET1 = libwfdisplay.so.1 | |
|
89 | TARGET2 = libwfdisplay.so.1.0 | |
|
90 | ||
|
91 | first: all | |
|
92 | ####### Implicit rules | |
|
93 | ||
|
94 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
|
95 | ||
|
96 | .cpp.o: | |
|
97 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
|
98 | ||
|
99 | .cc.o: | |
|
100 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
|
101 | ||
|
102 | .cxx.o: | |
|
103 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
|
104 | ||
|
105 | .C.o: | |
|
106 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
|
107 | ||
|
108 | .c.o: | |
|
109 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
|
110 | ||
|
111 | ####### Build rules | |
|
112 | ||
|
113 | all: Makefile $(TARGET) | |
|
114 | ||
|
115 | $(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) | |
|
116 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) | |
|
117 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) | |
|
118 | -ln -s $(TARGET) $(TARGET0) | |
|
119 | -ln -s $(TARGET) $(TARGET1) | |
|
120 | -ln -s $(TARGET) $(TARGET2) | |
|
121 | ||
|
122 | ||
|
123 | ||
|
124 | staticlib: $(TARGETA) | |
|
125 | ||
|
126 | $(TARGETA): $(OBJECTS) $(OBJCOMP) | |
|
127 | -$(DEL_FILE) $(TARGETA) | |
|
128 | $(AR) $(TARGETA) $(OBJECTS) | |
|
129 | ||
|
130 | Makefile: wfdisplay.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
|
131 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
|
132 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
|
133 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
|
134 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
|
135 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
|
136 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
|
137 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ | |
|
138 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
|
139 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
|
140 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
|
141 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
|
142 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
|
143 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
|
144 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
|
145 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
|
146 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
|
147 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
|
148 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
|
149 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
|
150 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
|
151 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
|
152 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
|
153 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
|
154 | /usr/lib64/libQtGui.prl \ | |
|
155 | /usr/lib64/libQtCore.prl | |
|
156 | $(QMAKE) -o Makefile wfdisplay.pro | |
|
157 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
|
158 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
|
159 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
|
160 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
|
161 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
|
162 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
|
163 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
|
164 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: | |
|
165 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
|
166 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
|
167 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
|
168 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
|
169 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
|
170 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
|
171 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
|
172 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
|
173 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |
|
174 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |
|
175 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |
|
176 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
|
177 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
|
178 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
|
179 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
|
180 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
|
181 | /usr/lib64/libQtGui.prl: | |
|
182 | /usr/lib64/libQtCore.prl: | |
|
183 | qmake: FORCE | |
|
184 | @$(QMAKE) -o Makefile wfdisplay.pro | |
|
185 | ||
|
186 | dist: | |
|
187 | @$(CHK_DIR_EXISTS) .tmp/wfdisplay1.0.0 || $(MKDIR) .tmp/wfdisplay1.0.0 | |
|
188 | $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/wfdisplay1.0.0/ && $(COPY_FILE) --parents wfdisplay.h wfdisplay_global.h wfplot.h wfpage.h params.h .tmp/wfdisplay1.0.0/ && $(COPY_FILE) --parents wfdisplay.cpp wfplot.cpp wfpage.cpp .tmp/wfdisplay1.0.0/ && (cd `dirname .tmp/wfdisplay1.0.0` && $(TAR) wfdisplay1.0.0.tar wfdisplay1.0.0 && $(COMPRESS) wfdisplay1.0.0.tar) && $(MOVE) `dirname .tmp/wfdisplay1.0.0`/wfdisplay1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/wfdisplay1.0.0 | |
|
189 | ||
|
190 | ||
|
191 | clean:compiler_clean | |
|
192 | -$(DEL_FILE) $(OBJECTS) | |
|
193 | -$(DEL_FILE) *~ core *.core | |
|
194 | ||
|
195 | ||
|
196 | ####### Sub-libraries | |
|
197 | ||
|
198 | distclean: clean | |
|
199 | -$(DEL_FILE) $(TARGET) | |
|
200 | -$(DEL_FILE) $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETA) | |
|
201 | -$(DEL_FILE) Makefile | |
|
202 | ||
|
203 | ||
|
204 | check: first | |
|
205 | ||
|
206 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |
|
207 | ||
|
208 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |
|
209 | ||
|
210 | compiler_moc_header_make_all: moc_wfdisplay.cpp moc_wfplot.cpp moc_wfpage.cpp | |
|
211 | compiler_moc_header_clean: | |
|
212 | -$(DEL_FILE) moc_wfdisplay.cpp moc_wfplot.cpp moc_wfpage.cpp | |
|
213 | moc_wfdisplay.cpp: wfdisplay_global.h \ | |
|
214 | wfpage.h \ | |
|
215 | wfplot.h \ | |
|
216 | params.h \ | |
|
217 | wfdisplay.h | |
|
218 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfdisplay.h -o moc_wfdisplay.cpp | |
|
219 | ||
|
220 | moc_wfplot.cpp: wfplot.h | |
|
221 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfplot.h -o moc_wfplot.cpp | |
|
222 | ||
|
223 | moc_wfpage.cpp: wfplot.h \ | |
|
224 | params.h \ | |
|
225 | wfpage.h | |
|
226 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfpage.h -o moc_wfpage.cpp | |
|
227 | ||
|
228 | compiler_rcc_make_all: | |
|
229 | compiler_rcc_clean: | |
|
230 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
|
231 | compiler_image_collection_clean: | |
|
232 | -$(DEL_FILE) qmake_image_collection.cpp | |
|
233 | compiler_moc_source_make_all: | |
|
234 | compiler_moc_source_clean: | |
|
235 | compiler_uic_make_all: | |
|
236 | compiler_uic_clean: | |
|
237 | compiler_yacc_decl_make_all: | |
|
238 | compiler_yacc_decl_clean: | |
|
239 | compiler_yacc_impl_make_all: | |
|
240 | compiler_yacc_impl_clean: | |
|
241 | compiler_lex_make_all: | |
|
242 | compiler_lex_clean: | |
|
243 | compiler_clean: compiler_moc_header_clean | |
|
244 | ||
|
245 | ####### Compile | |
|
246 | ||
|
247 | wfdisplay.o: wfdisplay.cpp wfdisplay.h \ | |
|
248 | wfdisplay_global.h \ | |
|
249 | wfpage.h \ | |
|
250 | wfplot.h \ | |
|
251 | params.h | |
|
252 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfdisplay.o wfdisplay.cpp | |
|
253 | ||
|
254 | wfplot.o: wfplot.cpp wfplot.h \ | |
|
255 | params.h | |
|
256 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfplot.o wfplot.cpp | |
|
257 | ||
|
258 | wfpage.o: wfpage.cpp wfpage.h \ | |
|
259 | wfplot.h \ | |
|
260 | params.h | |
|
261 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wfpage.o wfpage.cpp | |
|
262 | ||
|
263 | moc_wfdisplay.o: moc_wfdisplay.cpp | |
|
264 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfdisplay.o moc_wfdisplay.cpp | |
|
265 | ||
|
266 | moc_wfplot.o: moc_wfplot.cpp | |
|
267 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfplot.o moc_wfplot.cpp | |
|
268 | ||
|
269 | moc_wfpage.o: moc_wfpage.cpp | |
|
270 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_wfpage.o moc_wfpage.cpp | |
|
271 | ||
|
272 | ####### Install | |
|
273 | ||
|
274 | install_header: first FORCE | |
|
275 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ || $(MKDIR) $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |
|
276 | -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfdisplay.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |
|
277 | -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfdisplay_global.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |
|
278 | -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfpage.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |
|
279 | ||
|
280 | ||
|
281 | uninstall_header: FORCE | |
|
282 | -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/wfdisplay.h | |
|
283 | -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/wfdisplay_global.h | |
|
284 | -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/wfpage.h | |
|
285 | -$(DEL_DIR) $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ | |
|
286 | ||
|
287 | ||
|
288 | install_target: first FORCE | |
|
289 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib64/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib64/ | |
|
290 | -$(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/usr/lib64/$(TARGET)" | |
|
291 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/lib64/$(TARGET0)" | |
|
292 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/lib64/$(TARGET1)" | |
|
293 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/lib64/$(TARGET2)" | |
|
294 | ||
|
295 | uninstall_target: FORCE | |
|
296 | -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib64/$(TARGET)" | |
|
297 | -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib64/$(TARGET0)" | |
|
298 | -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib64/$(TARGET1)" | |
|
299 | -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib64/$(TARGET2)" | |
|
300 | -$(DEL_DIR) $(INSTALL_ROOT)/usr/lib64/ | |
|
301 | ||
|
302 | ||
|
303 | install: install_header install_target FORCE | |
|
304 | ||
|
305 | uninstall: uninstall_header uninstall_target FORCE | |
|
306 | ||
|
307 | FORCE: | |
|
308 |
@@ -0,0 +1,9 | |||
|
1 | #ifndef PARAMS_H | |
|
2 | #define PARAMS_H | |
|
3 | ||
|
4 | #define FONT_SIZE_WAVEFORM_TITLE 10 | |
|
5 | #define XMAX 2048 | |
|
6 | #define YMAX 15000 | |
|
7 | #define DEFAULT_SIZE 2048 | |
|
8 | ||
|
9 | #endif // PARAMS_H |
@@ -0,0 +1,51 | |||
|
1 | #include "wfdisplay.h" | |
|
2 | ||
|
3 | ||
|
4 | WFDisplay::WFDisplay(QWidget *parent) : | |
|
5 | QWidget(parent) | |
|
6 | { | |
|
7 | waveforms_LAYOUT = new QVBoxLayout; | |
|
8 | ||
|
9 | spwTabWidget = new QTabWidget; | |
|
10 | ||
|
11 | page_f0 = new WFPage; | |
|
12 | page_f1 = new WFPage; | |
|
13 | page_f2 = new WFPage; | |
|
14 | page_f3 = new WFPage; | |
|
15 | ||
|
16 | spwTabWidget->addTab(page_f0, tr("f0")); | |
|
17 | spwTabWidget->addTab(page_f1, tr("f1")); | |
|
18 | spwTabWidget->addTab(page_f2, tr("f2")); | |
|
19 | spwTabWidget->addTab(page_f3, tr("f3")); | |
|
20 | ||
|
21 | waveforms_LAYOUT->addWidget(spwTabWidget); | |
|
22 | ||
|
23 | this->setLayout(waveforms_LAYOUT); | |
|
24 | ||
|
25 | } | |
|
26 | ||
|
27 | void WFDisplay::displayOnPlot(short *data, unsigned char num_page, unsigned char num) | |
|
28 | { | |
|
29 | QVector<double> x(XMAX), y(XMAX); | |
|
30 | ||
|
31 | for (int i=0; i<XMAX; ++i) | |
|
32 | { | |
|
33 | x[i] = i; | |
|
34 | y[i] = (double) data[i]; | |
|
35 | } | |
|
36 | switch(num_page){ | |
|
37 | case 0: | |
|
38 | page_f0->displayOnPlot(data, num); | |
|
39 | break; | |
|
40 | case 1: | |
|
41 | page_f1->displayOnPlot(data, num); | |
|
42 | break; | |
|
43 | case 2: | |
|
44 | page_f2->displayOnPlot(data, num); | |
|
45 | break; | |
|
46 | case 3: | |
|
47 | page_f3->displayOnPlot(data, num); | |
|
48 | break; | |
|
49 | } | |
|
50 | ||
|
51 | } |
@@ -0,0 +1,39 | |||
|
1 | #ifndef WFDISPLAY_H | |
|
2 | #define WFDISPLAY_H | |
|
3 | ||
|
4 | #include "wfdisplay_global.h" | |
|
5 | ||
|
6 | #include <QWidget> | |
|
7 | #include <QGridLayout> | |
|
8 | #include <QVBoxLayout> | |
|
9 | #include <wfpage.h> | |
|
10 | #include <QTabWidget> | |
|
11 | ||
|
12 | #define XMAX 2048 | |
|
13 | ||
|
14 | class WFDISPLAYSHARED_EXPORT WFDisplay : public QWidget | |
|
15 | { | |
|
16 | Q_OBJECT | |
|
17 | public: | |
|
18 | explicit WFDisplay(QWidget *parent = 0); | |
|
19 | ||
|
20 | WFPage * page_f0; | |
|
21 | WFPage * page_f1; | |
|
22 | WFPage * page_f2; | |
|
23 | WFPage * page_f3; | |
|
24 | ||
|
25 | QTabWidget *spwTabWidget; | |
|
26 | ||
|
27 | QVBoxLayout *waveforms_LAYOUT; | |
|
28 | ||
|
29 | void displayOnPlot(short *data, unsigned char num_page, unsigned char num); | |
|
30 | ||
|
31 | ||
|
32 | signals: | |
|
33 | ||
|
34 | public slots: | |
|
35 | ||
|
36 | }; | |
|
37 | ||
|
38 | ||
|
39 | #endif // WFDISPLAY_H |
@@ -0,0 +1,41 | |||
|
1 | #------------------------------------------------- | |
|
2 | # | |
|
3 | # Project created by QtCreator 2013-05-31T12:59:38 | |
|
4 | # | |
|
5 | #------------------------------------------------- | |
|
6 | ||
|
7 | TARGET = wfdisplay | |
|
8 | TEMPLATE = lib | |
|
9 | ||
|
10 | INCLUDEPATH += \ | |
|
11 | $${PWD} \ | |
|
12 | $$[QT_INSTALL_HEADERS]/lppmon/common | |
|
13 | ||
|
14 | LIBS += -llppmoncommon | |
|
15 | ||
|
16 | DEFINES += WFDISPLAY_LIBRARY | |
|
17 | ||
|
18 | SOURCES += wfdisplay.cpp \ | |
|
19 | wfplot.cpp \ | |
|
20 | wfpage.cpp | |
|
21 | ||
|
22 | ||
|
23 | HEADERS += wfdisplay.h\ | |
|
24 | wfdisplay_global.h \ | |
|
25 | wfplot.h \ | |
|
26 | wfpage.h \ | |
|
27 | params.h | |
|
28 | ||
|
29 | ||
|
30 | header.path = $$[QT_INSTALL_HEADERS]/lppmon/wfdisplay | |
|
31 | header.files = \ | |
|
32 | wfdisplay.h \ | |
|
33 | wfdisplay_global.h \ | |
|
34 | wfpage.h | |
|
35 | ||
|
36 | target.path = $$[QT_INSTALL_LIBS] | |
|
37 | isEmpty(target.path) { | |
|
38 | target.path = $(QTDIR)/lib | |
|
39 | } | |
|
40 | ||
|
41 | INSTALLS += header target |
@@ -0,0 +1,264 | |||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
|
2 | <!DOCTYPE QtCreatorProject> | |
|
3 | <!-- Written by Qt Creator 2.4.1, 2013-05-31T15:27:20. --> | |
|
4 | <qtcreator> | |
|
5 | <data> | |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
|
7 | <value type="int">0</value> | |
|
8 | </data> | |
|
9 | <data> | |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
|
11 | <valuemap type="QVariantMap"> | |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
|
14 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
|
15 | <value type="QString" key="language">Cpp</value> | |
|
16 | <valuemap type="QVariantMap" key="value"> | |
|
17 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |
|
18 | </valuemap> | |
|
19 | </valuemap> | |
|
20 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
|
21 | <value type="QString" key="language">QmlJS</value> | |
|
22 | <valuemap type="QVariantMap" key="value"> | |
|
23 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |
|
24 | </valuemap> | |
|
25 | </valuemap> | |
|
26 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
|
27 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
|
28 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
|
29 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
|
30 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
|
31 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
|
32 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
|
33 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
|
34 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
|
35 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
|
36 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
|
37 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
|
38 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
|
39 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
|
40 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
|
41 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
|
42 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
|
43 | </valuemap> | |
|
44 | </data> | |
|
45 | <data> | |
|
46 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
|
47 | <valuemap type="QVariantMap"/> | |
|
48 | </data> | |
|
49 | <data> | |
|
50 | <variable>ProjectExplorer.Project.Target.0</variable> | |
|
51 | <valuemap type="QVariantMap"> | |
|
52 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | |
|
53 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value> | |
|
55 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
|
56 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
|
58 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
|
59 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> | |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
|
62 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
|
63 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
|
65 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
|
66 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
|
67 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
|
69 | </valuemap> | |
|
70 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
|
71 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
|
72 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
|
74 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
|
75 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
|
76 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
|
77 | </valuemap> | |
|
78 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
|
79 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
|
80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
|
82 | </valuemap> | |
|
83 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
|
84 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
|
85 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
|
88 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
|
89 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
|
90 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
|
91 | </valuemap> | |
|
92 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
|
96 | </valuemap> | |
|
97 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
|
98 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
|
99 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
|
100 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |
|
101 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
102 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
|
103 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
|
104 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay</value> | |
|
105 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |
|
106 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
|
107 | </valuemap> | |
|
108 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> | |
|
109 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> | |
|
110 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
|
111 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
|
115 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
|
116 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
|
117 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
|
118 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
|
119 | </valuemap> | |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
|
121 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
|
122 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
|
124 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
|
125 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
|
126 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
|
127 | </valuemap> | |
|
128 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
131 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
|
132 | </valuemap> | |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
|
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
|
136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
|
138 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
|
139 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
|
140 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
|
141 | </valuemap> | |
|
142 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
|
143 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
|
144 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
|
146 | </valuemap> | |
|
147 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
|
148 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
|
149 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
|
150 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> | |
|
151 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
|
153 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | |
|
154 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay</value> | |
|
155 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |
|
156 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
|
157 | </valuemap> | |
|
158 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> | |
|
159 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
|
160 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
|
161 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
|
162 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
|
163 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
|
165 | </valuemap> | |
|
166 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
|
167 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
|
168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
|
170 | </valuemap> | |
|
171 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
|
172 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
|
173 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
|
174 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
|
175 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
|
176 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
|
177 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
|
178 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
|
179 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
|
180 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
|
181 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
|
182 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
|
183 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
|
184 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
|
185 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
|
186 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
|
187 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
|
188 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
|
189 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
|
190 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
|
191 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
|
192 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
|
193 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
|
194 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
|
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
|
196 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
|
197 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
|
198 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
|
199 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
|
200 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
|
201 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
|
202 | <value type="int">0</value> | |
|
203 | <value type="int">1</value> | |
|
204 | <value type="int">2</value> | |
|
205 | <value type="int">3</value> | |
|
206 | <value type="int">4</value> | |
|
207 | <value type="int">5</value> | |
|
208 | <value type="int">6</value> | |
|
209 | <value type="int">7</value> | |
|
210 | <value type="int">8</value> | |
|
211 | <value type="int">9</value> | |
|
212 | <value type="int">10</value> | |
|
213 | <value type="int">11</value> | |
|
214 | <value type="int">12</value> | |
|
215 | <value type="int">13</value> | |
|
216 | <value type="int">14</value> | |
|
217 | </valuelist> | |
|
218 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
|
219 | <value type="int">0</value> | |
|
220 | <value type="int">1</value> | |
|
221 | <value type="int">2</value> | |
|
222 | <value type="int">3</value> | |
|
223 | <value type="int">4</value> | |
|
224 | <value type="int">5</value> | |
|
225 | <value type="int">6</value> | |
|
226 | <value type="int">7</value> | |
|
227 | <value type="int">8</value> | |
|
228 | <value type="int">9</value> | |
|
229 | <value type="int">10</value> | |
|
230 | <value type="int">11</value> | |
|
231 | <value type="int">12</value> | |
|
232 | <value type="int">13</value> | |
|
233 | <value type="int">14</value> | |
|
234 | </valuelist> | |
|
235 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> | |
|
236 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> | |
|
237 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value> | |
|
238 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> | |
|
239 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> | |
|
240 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> | |
|
241 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value> | |
|
242 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
|
243 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> | |
|
244 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
|
245 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
|
246 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
|
247 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
|
248 | </valuemap> | |
|
249 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
|
250 | </valuemap> | |
|
251 | </data> | |
|
252 | <data> | |
|
253 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
|
254 | <value type="int">1</value> | |
|
255 | </data> | |
|
256 | <data> | |
|
257 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
|
258 | <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
|
259 | </data> | |
|
260 | <data> | |
|
261 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
|
262 | <value type="int">10</value> | |
|
263 | </data> | |
|
264 | </qtcreator> |
@@ -0,0 +1,52 | |||
|
1 | #include "wfdisplay.h" | |
|
2 | #include <QApplication> | |
|
3 | ||
|
4 | WFDisplay::WFDisplay(QWidget *parent) : | |
|
5 | QWidget(parent) | |
|
6 | { | |
|
7 | waveforms_LAYOUT = new QVBoxLayout; | |
|
8 | ||
|
9 | spwTabWidget = new QTabWidget; | |
|
10 | ||
|
11 | page_f0 = new WFPage; | |
|
12 | page_f1 = new WFPage; | |
|
13 | page_f2 = new WFPage; | |
|
14 | page_f3 = new WFPage; | |
|
15 | ||
|
16 | spwTabWidget->addTab(page_f0, tr("f0")); | |
|
17 | spwTabWidget->addTab(page_f1, tr("f1")); | |
|
18 | spwTabWidget->addTab(page_f2, tr("f2")); | |
|
19 | spwTabWidget->addTab(page_f3, tr("f3")); | |
|
20 | ||
|
21 | waveforms_LAYOUT->addWidget(spwTabWidget); | |
|
22 | ||
|
23 | this->setLayout(waveforms_LAYOUT); | |
|
24 | ||
|
25 | } | |
|
26 | ||
|
27 | void WFDisplay::displayOnPlot(short *data, unsigned char num_page, unsigned char num) | |
|
28 | { | |
|
29 | QVector<double> x(XMAX), y(XMAX); | |
|
30 | ||
|
31 | for (int i=0; i<XMAX; ++i) | |
|
32 | { | |
|
33 | x[i] = i; | |
|
34 | y[i] = (double) data[i]; | |
|
35 | } | |
|
36 | switch(num_page){ | |
|
37 | case 0: | |
|
38 | page_f0->displayOnPlot(data, num); | |
|
39 | break; | |
|
40 | case 1: | |
|
41 | page_f1->displayOnPlot(data, num); | |
|
42 | break; | |
|
43 | case 2: | |
|
44 | page_f2->displayOnPlot(data, num); | |
|
45 | break; | |
|
46 | case 3: | |
|
47 | page_f3->displayOnPlot(data, num); | |
|
48 | break; | |
|
49 | } | |
|
50 | ||
|
51 | } | |
|
52 |
@@ -0,0 +1,37 | |||
|
1 | #ifndef WFDISPLAY_H | |
|
2 | #define WFDISPLAY_H | |
|
3 | ||
|
4 | #include <QWidget> | |
|
5 | #include <lppmonplot.h> | |
|
6 | #include <QGridLayout> | |
|
7 | #include <QVBoxLayout> | |
|
8 | #include <wfplot.h> | |
|
9 | #include <wfpage.h> | |
|
10 | #include <QTabWidget> | |
|
11 | #include <params.h> | |
|
12 | ||
|
13 | class WFDisplay : public QWidget | |
|
14 | { | |
|
15 | Q_OBJECT | |
|
16 | public: | |
|
17 | explicit WFDisplay(QWidget *parent = 0); | |
|
18 | ||
|
19 | WFPage * page_f0; | |
|
20 | WFPage * page_f1; | |
|
21 | WFPage * page_f2; | |
|
22 | WFPage * page_f3; | |
|
23 | ||
|
24 | QTabWidget *spwTabWidget; | |
|
25 | ||
|
26 | QVBoxLayout *waveforms_LAYOUT; | |
|
27 | ||
|
28 | void displayOnPlot(short *data, unsigned char num_page, unsigned char num); | |
|
29 | ||
|
30 | ||
|
31 | signals: | |
|
32 | ||
|
33 | public slots: | |
|
34 | ||
|
35 | }; | |
|
36 | ||
|
37 | #endif // WFDISPLAY_H |
@@ -0,0 +1,12 | |||
|
1 | #ifndef WFDISPLAY_GLOBAL_H | |
|
2 | #define WFDISPLAY_GLOBAL_H | |
|
3 | ||
|
4 | #include <QtCore/qglobal.h> | |
|
5 | ||
|
6 | #if defined(WFDISPLAY_LIBRARY) | |
|
7 | # define WFDISPLAYSHARED_EXPORT Q_DECL_EXPORT | |
|
8 | #else | |
|
9 | # define WFDISPLAYSHARED_EXPORT Q_DECL_IMPORT | |
|
10 | #endif | |
|
11 | ||
|
12 | #endif // WFDISPLAY_GLOBAL_H |
@@ -0,0 +1,55 | |||
|
1 | #include "wfpage.h" | |
|
2 | ||
|
3 | WFPage::WFPage(QWidget *parent) : | |
|
4 | QWidget(parent) | |
|
5 | { | |
|
6 | wfPlot_v = new WFPlot(); | |
|
7 | wfPlot_e1 = new WFPlot(); | |
|
8 | wfPlot_e2 = new WFPlot(); | |
|
9 | wfPlot_b1 = new WFPlot(); | |
|
10 | wfPlot_b2 = new WFPlot(); | |
|
11 | wfPlot_b3 = new WFPlot(); | |
|
12 | // | |
|
13 | //wfPlot_v->customPlot->setTitle("v"); | |
|
14 | wfPlot_v->customPlot->setGraphName(0, "v"); | |
|
15 | //wfPlot_e1->customPlot->setTitle("e1"); | |
|
16 | wfPlot_e1->customPlot->setGraphName(0, "e1"); | |
|
17 | wfPlot_e2->customPlot->setTitle("e2"); | |
|
18 | wfPlot_b1->customPlot->setTitle("b1"); | |
|
19 | wfPlot_b2->customPlot->setTitle("b2"); | |
|
20 | wfPlot_b3->customPlot->setTitle("b3"); | |
|
21 | // | |
|
22 | mainLayout = new QGridLayout; | |
|
23 | mainLayout->addWidget(wfPlot_v, 0, 0, 1, 1); | |
|
24 | mainLayout->addWidget(wfPlot_e1, 0, 1, 1, 1); | |
|
25 | mainLayout->addWidget(wfPlot_e2, 0, 2, 1, 1); | |
|
26 | mainLayout->addWidget(wfPlot_b1, 1, 0, 1, 1); | |
|
27 | mainLayout->addWidget(wfPlot_b2, 1, 1, 1, 1); | |
|
28 | mainLayout->addWidget(wfPlot_b3, 1, 2, 1, 1); | |
|
29 | // | |
|
30 | this->setLayout(mainLayout); | |
|
31 | } | |
|
32 | ||
|
33 | void WFPage::displayOnPlot(short *data, unsigned char num) | |
|
34 | { | |
|
35 | switch(num){ | |
|
36 | case 0: | |
|
37 | wfPlot_v->displayOnPlot(data, DEFAULT_SIZE); | |
|
38 | break; | |
|
39 | case 1: | |
|
40 | wfPlot_e1->displayOnPlot(data, DEFAULT_SIZE); | |
|
41 | break; | |
|
42 | case 2: | |
|
43 | wfPlot_e2->displayOnPlot(data, DEFAULT_SIZE); | |
|
44 | break; | |
|
45 | case 3: | |
|
46 | wfPlot_b1->displayOnPlot(data, DEFAULT_SIZE); | |
|
47 | break; | |
|
48 | case 4: | |
|
49 | wfPlot_b2->displayOnPlot(data, DEFAULT_SIZE); | |
|
50 | break; | |
|
51 | case 5: | |
|
52 | wfPlot_b3->displayOnPlot(data, DEFAULT_SIZE); | |
|
53 | break; | |
|
54 | } | |
|
55 | } |
@@ -0,0 +1,31 | |||
|
1 | #ifndef WFPAGE_H | |
|
2 | #define WFPAGE_H | |
|
3 | ||
|
4 | #include <QWidget> | |
|
5 | #include <wfplot.h> | |
|
6 | #include <params.h> | |
|
7 | ||
|
8 | class WFPage : public QWidget | |
|
9 | { | |
|
10 | Q_OBJECT | |
|
11 | public: | |
|
12 | explicit WFPage(QWidget *parent = 0); | |
|
13 | ||
|
14 | WFPlot *wfPlot_v; | |
|
15 | WFPlot *wfPlot_e1; | |
|
16 | WFPlot *wfPlot_e2; | |
|
17 | WFPlot *wfPlot_b1; | |
|
18 | WFPlot *wfPlot_b2; | |
|
19 | WFPlot *wfPlot_b3; | |
|
20 | ||
|
21 | QGridLayout *mainLayout; | |
|
22 | ||
|
23 | void displayOnPlot(short *data, unsigned char num); | |
|
24 | ||
|
25 | signals: | |
|
26 | ||
|
27 | public slots: | |
|
28 | ||
|
29 | }; | |
|
30 | ||
|
31 | #endif // WFPAGE_H |
@@ -0,0 +1,49 | |||
|
1 | #include "wfplot.h" | |
|
2 | #include <QFontInfo> | |
|
3 | #include <params.h> | |
|
4 | ||
|
5 | WFPlot::WFPlot(QWidget *parent) : | |
|
6 | QWidget(parent) | |
|
7 | { | |
|
8 | // Create Fonts | |
|
9 | QFont font; | |
|
10 | font = QFont(this->fontInfo().family(), FONT_SIZE_WAVEFORM_TITLE, QFont::Light); | |
|
11 | customPlot = new LppMonPlot(); | |
|
12 | mainLayout = new QVBoxLayout(); | |
|
13 | ||
|
14 | customPlot->setXaxisRange(0, XMAX); | |
|
15 | customPlot->setYaxisRange(-YMAX, YMAX); | |
|
16 | //customPlot->setTitleFont(font); | |
|
17 | ||
|
18 | customPlot->addGraph(); | |
|
19 | ||
|
20 | mainLayout->addWidget(customPlot); | |
|
21 | ||
|
22 | this->setLayout(mainLayout); | |
|
23 | } | |
|
24 | ||
|
25 | ||
|
26 | ||
|
27 | void WFPlot::displayOnPlot(short *data, unsigned int size) | |
|
28 | { | |
|
29 | QList<QVariant> qListX; | |
|
30 | QList<QVariant> qListY; | |
|
31 | qListX.clear(); | |
|
32 | qListY.clear(); | |
|
33 | ||
|
34 | for (unsigned int i=0; i<size; ++i) | |
|
35 | { | |
|
36 | qListX.append(i); | |
|
37 | qListY.append( (double) data[i] ); | |
|
38 | } | |
|
39 | ||
|
40 | customPlot->setGraphData(0, qListX, qListY); | |
|
41 | customPlot->rescaleAxis(); | |
|
42 | customPlot->setGraphName(0, "v"); | |
|
43 | } | |
|
44 | ||
|
45 | ||
|
46 | ||
|
47 | ||
|
48 | ||
|
49 |
@@ -0,0 +1,25 | |||
|
1 | #ifndef WFPLOT_H | |
|
2 | #define WFPLOT_H | |
|
3 | ||
|
4 | #include <QWidget> | |
|
5 | #include <QVBoxLayout> | |
|
6 | #include <lppmonplot.h> | |
|
7 | ||
|
8 | class WFPlot : public QWidget | |
|
9 | { | |
|
10 | Q_OBJECT | |
|
11 | public: | |
|
12 | explicit WFPlot(QWidget *parent = 0); | |
|
13 | ||
|
14 | void displayOnPlot(short *data, unsigned int size); | |
|
15 | ||
|
16 | LppMonPlot *customPlot; | |
|
17 | QVBoxLayout *mainLayout; | |
|
18 | ||
|
19 | signals: | |
|
20 | ||
|
21 | public slots: | |
|
22 | ||
|
23 | }; | |
|
24 | ||
|
25 | #endif // WFPLOT_H |
@@ -1,342 +1,342 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by Qt Creator 2.4.1, 2013-0 |
|
|
3 | <!-- Written by Qt Creator 2.4.1, 2013-06-04T16:00:09. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
7 | 7 | <value type="int">0</value> |
|
8 | 8 | </data> |
|
9 | 9 | <data> |
|
10 | 10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
11 | 11 | <valuemap type="QVariantMap"> |
|
12 | 12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
13 | 13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
14 | 14 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | 15 | <value type="QString" key="language">Cpp</value> |
|
16 | 16 | <valuemap type="QVariantMap" key="value"> |
|
17 | 17 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
18 | 18 | </valuemap> |
|
19 | 19 | </valuemap> |
|
20 | 20 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | 21 | <value type="QString" key="language">QmlJS</value> |
|
22 | 22 | <valuemap type="QVariantMap" key="value"> |
|
23 | 23 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | 24 | </valuemap> |
|
25 | 25 | </valuemap> |
|
26 | 26 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | 27 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> |
|
28 | 28 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | 29 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | 30 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
31 | 31 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
32 | 32 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
33 | 33 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
34 | 34 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
35 | 35 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
36 | 36 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
37 | 37 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
38 | 38 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
39 | 39 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
40 | 40 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
41 | 41 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
42 | 42 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
43 | 43 | </valuemap> |
|
44 | 44 | </data> |
|
45 | 45 | <data> |
|
46 | 46 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
47 | 47 | <valuemap type="QVariantMap"/> |
|
48 | 48 | </data> |
|
49 | 49 | <data> |
|
50 | 50 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
51 | 51 | <valuemap type="QVariantMap"> |
|
52 | 52 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> |
|
53 | 53 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> |
|
54 | 54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value> |
|
55 | 55 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
56 | 56 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
57 | 57 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
58 | 58 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
59 | 59 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> |
|
60 | 60 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
61 | 61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
62 | 62 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
63 | 63 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
64 | 64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
65 | 65 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
66 | 66 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
67 | 67 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
68 | 68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
69 | 69 | </valuemap> |
|
70 | 70 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
71 | 71 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
72 | 72 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
73 | 73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
74 | 74 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
75 | 75 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
76 | 76 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
77 | 77 | </valuemap> |
|
78 | 78 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
79 | 79 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
80 | 80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
81 | 81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
82 | 82 | </valuemap> |
|
83 | 83 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
84 | 84 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
85 | 85 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
86 | 86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
87 | 87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
88 | 88 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
89 | 89 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
90 | 90 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
91 | 91 | </valuemap> |
|
92 | 92 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
93 | 93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
94 | 94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
95 | 95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
96 | 96 | </valuemap> |
|
97 | 97 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
98 | 98 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
99 | 99 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
100 | 100 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
101 | 101 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
102 | 102 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
103 | 103 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
104 | 104 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> |
|
105 | 105 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> |
|
106 | 106 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
107 | 107 | </valuemap> |
|
108 | 108 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> |
|
109 | 109 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> |
|
110 | 110 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
111 | 111 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
112 | 112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
113 | 113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
114 | 114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
115 | 115 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
116 | 116 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
117 | 117 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
118 | 118 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
119 | 119 | </valuemap> |
|
120 | 120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
121 | 121 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
122 | 122 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
123 | 123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
124 | 124 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
125 | 125 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
126 | 126 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
127 | 127 | </valuemap> |
|
128 | 128 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
129 | 129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
130 | 130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
131 | 131 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
132 | 132 | </valuemap> |
|
133 | 133 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
134 | 134 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
135 | 135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
136 | 136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
137 | 137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
138 | 138 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
139 | 139 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
140 | 140 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
141 | 141 | </valuemap> |
|
142 | 142 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
143 | 143 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
144 | 144 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
145 | 145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
146 | 146 | </valuemap> |
|
147 | 147 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
148 | 148 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
149 | 149 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
150 | 150 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> |
|
151 | 151 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
152 | 152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
153 | 153 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> |
|
154 | 154 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> |
|
155 | 155 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> |
|
156 | 156 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
157 | 157 | </valuemap> |
|
158 | 158 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> |
|
159 | 159 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
160 | 160 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
161 | 161 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
162 | 162 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
163 | 163 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
164 | 164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
165 | 165 | </valuemap> |
|
166 | 166 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
167 | 167 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
168 | 168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
169 | 169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
170 | 170 | </valuemap> |
|
171 | 171 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
172 | 172 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
173 | 173 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
174 | 174 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
175 | 175 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
176 | 176 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
177 | 177 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
178 | 178 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
179 | 179 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
180 | 180 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
181 | 181 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
182 | 182 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
183 | 183 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
184 | 184 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
185 | 185 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
186 | 186 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
187 | 187 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
188 | 188 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
189 | 189 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
190 | 190 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
191 | 191 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
192 | 192 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
193 | 193 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
194 | 194 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
195 | 195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
196 | 196 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
197 | 197 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
198 | 198 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
199 | 199 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
200 | 200 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
201 | 201 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
202 | 202 | <value type="int">0</value> |
|
203 | 203 | <value type="int">1</value> |
|
204 | 204 | <value type="int">2</value> |
|
205 | 205 | <value type="int">3</value> |
|
206 | 206 | <value type="int">4</value> |
|
207 | 207 | <value type="int">5</value> |
|
208 | 208 | <value type="int">6</value> |
|
209 | 209 | <value type="int">7</value> |
|
210 | 210 | <value type="int">8</value> |
|
211 | 211 | <value type="int">9</value> |
|
212 | 212 | <value type="int">10</value> |
|
213 | 213 | <value type="int">11</value> |
|
214 | 214 | <value type="int">12</value> |
|
215 | 215 | <value type="int">13</value> |
|
216 | 216 | <value type="int">14</value> |
|
217 | 217 | </valuelist> |
|
218 | 218 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
219 | 219 | <value type="int">0</value> |
|
220 | 220 | <value type="int">1</value> |
|
221 | 221 | <value type="int">2</value> |
|
222 | 222 | <value type="int">3</value> |
|
223 | 223 | <value type="int">4</value> |
|
224 | 224 | <value type="int">5</value> |
|
225 | 225 | <value type="int">6</value> |
|
226 | 226 | <value type="int">7</value> |
|
227 | 227 | <value type="int">8</value> |
|
228 | 228 | <value type="int">9</value> |
|
229 | 229 | <value type="int">10</value> |
|
230 | 230 | <value type="int">11</value> |
|
231 | 231 | <value type="int">12</value> |
|
232 | 232 | <value type="int">13</value> |
|
233 | 233 | <value type="int">14</value> |
|
234 | 234 | </valuelist> |
|
235 | 235 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
236 | 236 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> |
|
237 | 237 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">lppmon</value> |
|
238 | 238 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> |
|
239 | 239 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> |
|
240 | 240 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> |
|
241 | 241 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run lppmon</value> |
|
242 | 242 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
243 | 243 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> |
|
244 | 244 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
245 | 245 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
246 | 246 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
247 | 247 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
248 | 248 | </valuemap> |
|
249 | 249 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> |
|
250 | 250 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
251 | 251 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
252 | 252 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
253 | 253 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
254 | 254 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
255 | 255 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
256 | 256 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
257 | 257 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
258 | 258 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
259 | 259 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
260 | 260 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
261 | 261 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
262 | 262 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
263 | 263 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
264 | 264 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
265 | 265 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
266 | 266 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
267 | 267 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
268 | 268 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
269 | 269 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
270 | 270 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
271 | 271 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
272 | 272 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
273 | 273 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
274 | 274 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
275 | 275 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
276 | 276 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
277 | 277 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
278 | 278 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
279 | 279 | <value type="int">0</value> |
|
280 | 280 | <value type="int">1</value> |
|
281 | 281 | <value type="int">2</value> |
|
282 | 282 | <value type="int">3</value> |
|
283 | 283 | <value type="int">4</value> |
|
284 | 284 | <value type="int">5</value> |
|
285 | 285 | <value type="int">6</value> |
|
286 | 286 | <value type="int">7</value> |
|
287 | 287 | <value type="int">8</value> |
|
288 | 288 | <value type="int">9</value> |
|
289 | 289 | <value type="int">10</value> |
|
290 | 290 | <value type="int">11</value> |
|
291 | 291 | <value type="int">12</value> |
|
292 | 292 | <value type="int">13</value> |
|
293 | 293 | <value type="int">14</value> |
|
294 | 294 | </valuelist> |
|
295 | 295 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
296 | 296 | <value type="int">0</value> |
|
297 | 297 | <value type="int">1</value> |
|
298 | 298 | <value type="int">2</value> |
|
299 | 299 | <value type="int">3</value> |
|
300 | 300 | <value type="int">4</value> |
|
301 | 301 | <value type="int">5</value> |
|
302 | 302 | <value type="int">6</value> |
|
303 | 303 | <value type="int">7</value> |
|
304 | 304 | <value type="int">8</value> |
|
305 | 305 | <value type="int">9</value> |
|
306 | 306 | <value type="int">10</value> |
|
307 | 307 | <value type="int">11</value> |
|
308 | 308 | <value type="int">12</value> |
|
309 | 309 | <value type="int">13</value> |
|
310 | 310 | <value type="int">14</value> |
|
311 | 311 | </valuelist> |
|
312 | 312 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">spwtimegenerator</value> |
|
313 | 313 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
314 | 314 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value> |
|
315 | 315 | <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value> |
|
316 | 316 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
317 | 317 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">spwtimegenerator/spwtimegenerator/spwtimegenerator.pro</value> |
|
318 | 318 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
319 | 319 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> |
|
320 | 320 | <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/> |
|
321 | 321 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
322 | 322 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
323 | 323 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
324 | 324 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
325 | 325 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
326 | 326 | </valuemap> |
|
327 | 327 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value> |
|
328 | 328 | </valuemap> |
|
329 | 329 | </data> |
|
330 | 330 | <data> |
|
331 | 331 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
332 | 332 | <value type="int">1</value> |
|
333 | 333 | </data> |
|
334 | 334 | <data> |
|
335 | 335 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
336 | 336 | <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
337 | 337 | </data> |
|
338 | 338 | <data> |
|
339 | 339 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
340 | 340 | <value type="int">10</value> |
|
341 | 341 | </data> |
|
342 | 342 | </qtcreator> |
@@ -1,554 +1,574 | |||
|
1 | 1 | ############################################################################# |
|
2 | 2 | # Makefile for building: librmapplugin.so.1.0.0 |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.4) on: |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Thu May 30 11:18:09 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 |
|
7 | 7 | ############################################################################# |
|
8 | 8 | |
|
9 | 9 | ####### Compiler, tools and options |
|
10 | 10 | |
|
11 | 11 | CC = gcc |
|
12 | 12 | 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 -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 -m64 -mtune=generic -O2 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -W -D_REENTRANT -fPIC $(DEFINES) |
|
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../spw_usb_driver_v2.63/inc -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 | 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 -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 |
|
23 | 23 | TAR = tar -cf |
|
24 | 24 | COMPRESS = gzip -9f |
|
25 | 25 | COPY = cp -f |
|
26 | 26 | SED = sed |
|
27 | 27 | COPY_FILE = $(COPY) |
|
28 | 28 | COPY_DIR = $(COPY) -r |
|
29 | 29 | STRIP = |
|
30 | 30 | INSTALL_FILE = install -m 644 -p |
|
31 | 31 | INSTALL_DIR = $(COPY_DIR) |
|
32 | 32 | INSTALL_PROGRAM = install -m 755 -p |
|
33 | 33 | DEL_FILE = rm -f |
|
34 | 34 | SYMLINK = ln -f -s |
|
35 | 35 | DEL_DIR = rmdir |
|
36 | 36 | MOVE = mv -f |
|
37 | 37 | CHK_DIR_EXISTS= test -d |
|
38 | 38 | MKDIR = mkdir -p |
|
39 | 39 | |
|
40 | 40 | ####### Output directory |
|
41 | 41 | |
|
42 | 42 | OBJECTS_DIR = obj/ |
|
43 | 43 | |
|
44 | 44 | ####### Files |
|
45 | 45 | |
|
46 | 46 | SOURCES = rmapplugin.cpp \ |
|
47 | 47 | rmappluginui.cpp \ |
|
48 | 48 | rmapoperations.cpp \ |
|
49 | 49 | ccsds.cpp \ |
|
50 | 50 | ../common_PLE/qipdialogbox.cpp \ |
|
51 | 51 | ../common_PLE/gresbstatusenquiry.cpp \ |
|
52 | 52 | rmappluginpythonwrapper.cpp \ |
|
53 | 53 | stardundee.cpp \ |
|
54 | 54 | gresb.cpp \ |
|
55 | 55 | tcpackettosend.cpp \ |
|
56 | 56 | tmpackettoread.cpp \ |
|
57 | 57 | wfdisplay.cpp \ |
|
58 | 58 | tmstatistics.cpp \ |
|
59 | 59 | wfplot.cpp \ |
|
60 | 60 | wfpage.cpp \ |
|
61 | 61 | wfpacket.cpp \ |
|
62 | tmechobridge.cpp \ | |
|
62 | 63 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \ |
|
63 | 64 | moc/moc_rmapplugin.cpp \ |
|
64 | 65 | moc/moc_qipdialogbox.cpp \ |
|
65 | 66 | moc/moc_gresbstatusenquiry.cpp \ |
|
66 | 67 | moc/moc_rmappluginpythonwrapper.cpp \ |
|
67 | 68 | moc/moc_stardundee.cpp \ |
|
68 | 69 | moc/moc_gresb.cpp \ |
|
69 | 70 | moc/moc_tcpackettosend.cpp \ |
|
70 | 71 | moc/moc_tmpackettoread.cpp \ |
|
71 | 72 | moc/moc_wfdisplay.cpp \ |
|
72 | 73 | moc/moc_tmstatistics.cpp \ |
|
73 | 74 | moc/moc_wfplot.cpp \ |
|
74 | 75 | moc/moc_wfpage.cpp \ |
|
75 | 76 | moc/moc_wfpacket.cpp \ |
|
77 | moc/moc_tmechobridge.cpp \ | |
|
76 | 78 | moc/moc_genericPySysdriver.cpp \ |
|
77 | 79 | moc/moc_lppmonplugin.cpp |
|
78 | 80 | OBJECTS = obj/rmapplugin.o \ |
|
79 | 81 | obj/rmappluginui.o \ |
|
80 | 82 | obj/rmapoperations.o \ |
|
81 | 83 | obj/ccsds.o \ |
|
82 | 84 | obj/qipdialogbox.o \ |
|
83 | 85 | obj/gresbstatusenquiry.o \ |
|
84 | 86 | obj/rmappluginpythonwrapper.o \ |
|
85 | 87 | obj/stardundee.o \ |
|
86 | 88 | obj/gresb.o \ |
|
87 | 89 | obj/tcpackettosend.o \ |
|
88 | 90 | obj/tmpackettoread.o \ |
|
89 | 91 | obj/wfdisplay.o \ |
|
90 | 92 | obj/tmstatistics.o \ |
|
91 | 93 | obj/wfplot.o \ |
|
92 | 94 | obj/wfpage.o \ |
|
93 | 95 | obj/wfpacket.o \ |
|
96 | obj/tmechobridge.o \ | |
|
94 | 97 | obj/lppmonplugininterface.o \ |
|
95 | 98 | obj/moc_rmappluginui.o \ |
|
96 | 99 | obj/moc_rmapplugin.o \ |
|
97 | 100 | obj/moc_qipdialogbox.o \ |
|
98 | 101 | obj/moc_gresbstatusenquiry.o \ |
|
99 | 102 | obj/moc_rmappluginpythonwrapper.o \ |
|
100 | 103 | obj/moc_stardundee.o \ |
|
101 | 104 | obj/moc_gresb.o \ |
|
102 | 105 | obj/moc_tcpackettosend.o \ |
|
103 | 106 | obj/moc_tmpackettoread.o \ |
|
104 | 107 | obj/moc_wfdisplay.o \ |
|
105 | 108 | obj/moc_tmstatistics.o \ |
|
106 | 109 | obj/moc_wfplot.o \ |
|
107 | 110 | obj/moc_wfpage.o \ |
|
108 | 111 | obj/moc_wfpacket.o \ |
|
112 | obj/moc_tmechobridge.o \ | |
|
109 | 113 | obj/moc_genericPySysdriver.o \ |
|
110 | 114 | obj/moc_lppmonplugin.o |
|
111 | 115 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
112 | 116 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
113 | 117 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
114 | 118 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
115 | 119 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
116 | 120 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
117 | 121 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
118 | 122 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ |
|
119 | 123 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
120 | 124 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
121 | 125 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
122 | 126 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
123 | 127 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
124 | 128 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
125 | 129 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ |
|
126 | 130 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ |
|
127 | 131 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
128 | 132 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
129 | 133 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
130 | 134 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
131 | 135 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
132 | 136 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
133 | 137 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
134 | 138 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
135 | 139 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
136 | 140 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
137 | 141 | rmapplugin.pro |
|
138 | 142 | QMAKE_TARGET = rmapplugin |
|
139 | 143 | DESTDIR = bin/ |
|
140 | 144 | TARGET = librmapplugin.so.1.0.0 |
|
141 | 145 | TARGETA = bin/librmapplugin.a |
|
142 | 146 | TARGETD = librmapplugin.so.1.0.0 |
|
143 | 147 | TARGET0 = librmapplugin.so |
|
144 | 148 | TARGET1 = librmapplugin.so.1 |
|
145 | 149 | TARGET2 = librmapplugin.so.1.0 |
|
146 | 150 | |
|
147 | 151 | first: all |
|
148 | 152 | ####### Implicit rules |
|
149 | 153 | |
|
150 | 154 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
151 | 155 | |
|
152 | 156 | .cpp.o: |
|
153 | 157 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
154 | 158 | |
|
155 | 159 | .cc.o: |
|
156 | 160 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
157 | 161 | |
|
158 | 162 | .cxx.o: |
|
159 | 163 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
160 | 164 | |
|
161 | 165 | .C.o: |
|
162 | 166 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
163 | 167 | |
|
164 | 168 | .c.o: |
|
165 | 169 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
166 | 170 | |
|
167 | 171 | ####### Build rules |
|
168 | 172 | |
|
169 | 173 | all: Makefile bin/$(TARGET) |
|
170 | 174 | |
|
171 | 175 | bin/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) |
|
172 | 176 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
173 | 177 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) |
|
174 | 178 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) |
|
175 | 179 | -ln -s $(TARGET) $(TARGET0) |
|
176 | 180 | -ln -s $(TARGET) $(TARGET1) |
|
177 | 181 | -ln -s $(TARGET) $(TARGET2) |
|
178 | 182 | -$(DEL_FILE) bin/$(TARGET) |
|
179 | 183 | -$(DEL_FILE) bin/$(TARGET0) |
|
180 | 184 | -$(DEL_FILE) bin/$(TARGET1) |
|
181 | 185 | -$(DEL_FILE) bin/$(TARGET2) |
|
182 | 186 | -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) bin/ |
|
183 | 187 | |
|
184 | 188 | |
|
185 | 189 | |
|
186 | 190 | staticlib: $(TARGETA) |
|
187 | 191 | |
|
188 | 192 | $(TARGETA): $(OBJECTS) $(OBJCOMP) |
|
189 | 193 | -$(DEL_FILE) $(TARGETA) |
|
190 | 194 | $(AR) $(TARGETA) $(OBJECTS) |
|
191 | 195 | |
|
192 | 196 | Makefile: rmapplugin.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
193 | 197 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
194 | 198 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
195 | 199 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
196 | 200 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
197 | 201 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
198 | 202 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
199 | 203 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ |
|
200 | 204 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
201 | 205 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
202 | 206 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
203 | 207 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
204 | 208 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
205 | 209 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
206 | 210 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ |
|
207 | 211 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ |
|
208 | 212 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
209 | 213 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
210 | 214 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
211 | 215 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
212 | 216 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
213 | 217 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
214 | 218 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
215 | 219 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
216 | 220 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
217 | 221 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
218 | 222 | /usr/lib64/libQtXml.prl \ |
|
219 | 223 | /usr/lib64/libQtCore.prl \ |
|
220 | 224 | /usr/lib64/libQtGui.prl \ |
|
221 | 225 | /usr/lib64/libQtNetwork.prl |
|
222 | 226 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
223 | 227 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
224 | 228 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
225 | 229 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
226 | 230 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
227 | 231 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
228 | 232 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
229 | 233 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
230 | 234 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: |
|
231 | 235 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
232 | 236 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
233 | 237 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
234 | 238 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
235 | 239 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
236 | 240 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
237 | 241 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf: |
|
238 | 242 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf: |
|
239 | 243 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
240 | 244 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
241 | 245 | /usr/lib64/qt4/mkspecs/features/qt.prf: |
|
242 | 246 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: |
|
243 | 247 | /usr/lib64/qt4/mkspecs/features/moc.prf: |
|
244 | 248 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
245 | 249 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
246 | 250 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
247 | 251 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
248 | 252 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
249 | 253 | /usr/lib64/libQtXml.prl: |
|
250 | 254 | /usr/lib64/libQtCore.prl: |
|
251 | 255 | /usr/lib64/libQtGui.prl: |
|
252 | 256 | /usr/lib64/libQtNetwork.prl: |
|
253 | 257 | qmake: FORCE |
|
254 | 258 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
255 | 259 | |
|
256 | 260 | dist: |
|
257 | 261 | @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0 |
|
258 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents 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 wfdisplay.h tmstatistics.h wfplot.h wfpage.h wfpacket.h params.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 wfdisplay.cpp tmstatistics.cpp wfplot.cpp wfpage.cpp wfpacket.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 | |
|
262 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents 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 wfdisplay.h tmstatistics.h wfplot.h wfpage.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 wfdisplay.cpp tmstatistics.cpp wfplot.cpp wfpage.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 | |
|
259 | 263 | |
|
260 | 264 | |
|
261 | 265 | clean:compiler_clean |
|
262 | 266 | -$(DEL_FILE) $(OBJECTS) |
|
263 | 267 | -$(DEL_FILE) *~ core *.core |
|
264 | 268 | |
|
265 | 269 | |
|
266 | 270 | ####### Sub-libraries |
|
267 | 271 | |
|
268 | 272 | distclean: clean |
|
269 | 273 | -$(DEL_FILE) bin/$(TARGET) |
|
270 | 274 | -$(DEL_FILE) bin/$(TARGET0) bin/$(TARGET1) bin/$(TARGET2) $(TARGETA) |
|
271 | 275 | -$(DEL_FILE) Makefile |
|
272 | 276 | |
|
273 | 277 | |
|
274 | 278 | check: first |
|
275 | 279 | |
|
276 | 280 | mocclean: compiler_moc_header_clean compiler_moc_source_clean |
|
277 | 281 | |
|
278 | 282 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all |
|
279 | 283 | |
|
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_wfdisplay.cpp moc/moc_tmstatistics.cpp moc/moc_wfplot.cpp moc/moc_wfpage.cpp moc/moc_wfpacket.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp | |
|
284 | 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_wfdisplay.cpp moc/moc_tmstatistics.cpp moc/moc_wfplot.cpp moc/moc_wfpage.cpp moc/moc_wfpacket.cpp moc/moc_tmechobridge.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp | |
|
281 | 285 | compiler_moc_header_clean: |
|
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_wfdisplay.cpp moc/moc_tmstatistics.cpp moc/moc_wfplot.cpp moc/moc_wfpage.cpp moc/moc_wfpacket.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp | |
|
286 | -$(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_wfdisplay.cpp moc/moc_tmstatistics.cpp moc/moc_wfplot.cpp moc/moc_wfpage.cpp moc/moc_wfpacket.cpp moc/moc_tmechobridge.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp | |
|
283 | 287 | moc/moc_rmappluginui.cpp: rmapoperations.h \ |
|
288 | params.h \ | |
|
284 | 289 | stardundee.h \ |
|
285 | 290 | ccsds.h \ |
|
286 | 291 | tmpackettoread.h \ |
|
287 | 292 | gresb.h \ |
|
288 | 293 | wfdisplay.h \ |
|
289 | 294 | wfplot.h \ |
|
290 | params.h \ | |
|
291 | 295 | wfpage.h \ |
|
292 | 296 | tmstatistics.h \ |
|
293 | 297 | rmappluginui.h |
|
294 | 298 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp |
|
295 | 299 | |
|
296 | 300 | moc/moc_rmapplugin.cpp: rmappluginui.h \ |
|
297 | 301 | rmapoperations.h \ |
|
302 | params.h \ | |
|
298 | 303 | stardundee.h \ |
|
299 | 304 | ccsds.h \ |
|
300 | 305 | tmpackettoread.h \ |
|
301 | 306 | gresb.h \ |
|
302 | 307 | wfdisplay.h \ |
|
303 | 308 | wfplot.h \ |
|
304 | params.h \ | |
|
305 | 309 | wfpage.h \ |
|
306 | 310 | tmstatistics.h \ |
|
307 | 311 | wfpacket.h \ |
|
308 | 312 | rmapplugin.h |
|
309 | 313 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp |
|
310 | 314 | |
|
311 | 315 | moc/moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h |
|
312 | 316 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc/moc_qipdialogbox.cpp |
|
313 | 317 | |
|
314 | 318 | moc/moc_gresbstatusenquiry.cpp: ../common_PLE/gresbstatusenquiry.h |
|
315 | 319 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/gresbstatusenquiry.h -o moc/moc_gresbstatusenquiry.cpp |
|
316 | 320 | |
|
317 | 321 | moc/moc_rmappluginpythonwrapper.cpp: rmapoperations.h \ |
|
322 | params.h \ | |
|
318 | 323 | ccsds.h \ |
|
319 | 324 | tcpackettosend.h \ |
|
320 | 325 | tmpackettoread.h \ |
|
321 | 326 | rmappluginpythonwrapper.h |
|
322 | 327 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginpythonwrapper.h -o moc/moc_rmappluginpythonwrapper.cpp |
|
323 | 328 | |
|
324 | 329 | moc/moc_stardundee.cpp: rmapoperations.h \ |
|
330 | params.h \ | |
|
325 | 331 | ccsds.h \ |
|
326 | 332 | tmpackettoread.h \ |
|
327 | 333 | stardundee.h |
|
328 | 334 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) stardundee.h -o moc/moc_stardundee.cpp |
|
329 | 335 | |
|
330 | 336 | moc/moc_gresb.cpp: rmapoperations.h \ |
|
337 | params.h \ | |
|
331 | 338 | ccsds.h \ |
|
332 | 339 | tmpackettoread.h \ |
|
333 | 340 | gresb.h |
|
334 | 341 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) gresb.h -o moc/moc_gresb.cpp |
|
335 | 342 | |
|
336 | 343 | moc/moc_tcpackettosend.cpp: tcpackettosend.h |
|
337 | 344 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tcpackettosend.h -o moc/moc_tcpackettosend.cpp |
|
338 | 345 | |
|
339 | 346 | moc/moc_tmpackettoread.cpp: tmpackettoread.h |
|
340 | 347 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmpackettoread.h -o moc/moc_tmpackettoread.cpp |
|
341 | 348 | |
|
342 | 349 | moc/moc_wfdisplay.cpp: wfplot.h \ |
|
343 | 350 | params.h \ |
|
344 | 351 | wfpage.h \ |
|
345 | 352 | wfdisplay.h |
|
346 | 353 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfdisplay.h -o moc/moc_wfdisplay.cpp |
|
347 | 354 | |
|
348 | 355 | moc/moc_tmstatistics.cpp: tmstatistics.h |
|
349 | 356 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmstatistics.h -o moc/moc_tmstatistics.cpp |
|
350 | 357 | |
|
351 | 358 | moc/moc_wfplot.cpp: params.h \ |
|
352 | 359 | wfplot.h |
|
353 | 360 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfplot.h -o moc/moc_wfplot.cpp |
|
354 | 361 | |
|
355 | 362 | moc/moc_wfpage.cpp: wfplot.h \ |
|
356 | 363 | params.h \ |
|
357 | 364 | wfpage.h |
|
358 | 365 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfpage.h -o moc/moc_wfpage.cpp |
|
359 | 366 | |
|
360 | 367 | moc/moc_wfpacket.cpp: params.h \ |
|
361 | 368 | wfpacket.h |
|
362 | 369 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfpacket.h -o moc/moc_wfpacket.cpp |
|
363 | 370 | |
|
371 | moc/moc_tmechobridge.cpp: tmechobridge.h | |
|
372 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmechobridge.h -o moc/moc_tmechobridge.cpp | |
|
373 | ||
|
364 | 374 | moc/moc_genericPySysdriver.cpp: /usr/include/lppmon/genericPySysdriver.h |
|
365 | 375 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp |
|
366 | 376 | |
|
367 | 377 | moc/moc_lppmonplugin.cpp: /usr/include/lppmon/lppmonplugin.h |
|
368 | 378 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/lppmonplugin.h -o moc/moc_lppmonplugin.cpp |
|
369 | 379 | |
|
370 | 380 | compiler_rcc_make_all: |
|
371 | 381 | compiler_rcc_clean: |
|
372 | 382 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
373 | 383 | compiler_image_collection_clean: |
|
374 | 384 | -$(DEL_FILE) qmake_image_collection.cpp |
|
375 | 385 | compiler_moc_source_make_all: |
|
376 | 386 | compiler_moc_source_clean: |
|
377 | 387 | compiler_uic_make_all: |
|
378 | 388 | compiler_uic_clean: |
|
379 | 389 | compiler_yacc_decl_make_all: |
|
380 | 390 | compiler_yacc_decl_clean: |
|
381 | 391 | compiler_yacc_impl_make_all: |
|
382 | 392 | compiler_yacc_impl_clean: |
|
383 | 393 | compiler_lex_make_all: |
|
384 | 394 | compiler_lex_clean: |
|
385 | 395 | compiler_clean: compiler_moc_header_clean |
|
386 | 396 | |
|
387 | 397 | ####### Compile |
|
388 | 398 | |
|
389 | 399 | obj/rmapplugin.o: rmapplugin.cpp rmapplugin.h \ |
|
390 | 400 | rmappluginui.h \ |
|
391 | 401 | rmapoperations.h \ |
|
402 | params.h \ | |
|
392 | 403 | stardundee.h \ |
|
393 | 404 | ccsds.h \ |
|
394 | 405 | tmpackettoread.h \ |
|
395 | 406 | gresb.h \ |
|
396 | 407 | wfdisplay.h \ |
|
397 | 408 | wfplot.h \ |
|
398 | params.h \ | |
|
399 | 409 | wfpage.h \ |
|
400 | 410 | tmstatistics.h \ |
|
401 | 411 | wfpacket.h \ |
|
402 | 412 | rmappluginpythonwrapper.h \ |
|
403 | 413 | tcpackettosend.h |
|
404 | 414 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp |
|
405 | 415 | |
|
406 | 416 | obj/rmappluginui.o: rmappluginui.cpp rmapplugin.h \ |
|
407 | 417 | rmappluginui.h \ |
|
408 | 418 | rmapoperations.h \ |
|
419 | params.h \ | |
|
409 | 420 | stardundee.h \ |
|
410 | 421 | ccsds.h \ |
|
411 | 422 | tmpackettoread.h \ |
|
412 | 423 | gresb.h \ |
|
413 | 424 | wfdisplay.h \ |
|
414 | 425 | wfplot.h \ |
|
415 | params.h \ | |
|
416 | 426 | wfpage.h \ |
|
417 | 427 | tmstatistics.h \ |
|
418 | 428 | wfpacket.h |
|
419 | 429 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp |
|
420 | 430 | |
|
421 | obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h | |
|
431 | obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h \ | |
|
432 | params.h | |
|
422 | 433 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapoperations.o rmapoperations.cpp |
|
423 | 434 | |
|
424 | 435 | obj/ccsds.o: ccsds.cpp ccsds.h |
|
425 | 436 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ccsds.o ccsds.cpp |
|
426 | 437 | |
|
427 | 438 | obj/qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h |
|
428 | 439 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qipdialogbox.o ../common_PLE/qipdialogbox.cpp |
|
429 | 440 | |
|
430 | 441 | obj/gresbstatusenquiry.o: ../common_PLE/gresbstatusenquiry.cpp ../common_PLE/gresbstatusenquiry.h |
|
431 | 442 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresbstatusenquiry.o ../common_PLE/gresbstatusenquiry.cpp |
|
432 | 443 | |
|
433 | 444 | obj/rmappluginpythonwrapper.o: rmappluginpythonwrapper.cpp rmappluginpythonwrapper.h \ |
|
434 | 445 | rmapoperations.h \ |
|
446 | params.h \ | |
|
435 | 447 | ccsds.h \ |
|
436 | 448 | tcpackettosend.h \ |
|
437 | 449 | tmpackettoread.h |
|
438 | 450 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginpythonwrapper.o rmappluginpythonwrapper.cpp |
|
439 | 451 | |
|
440 | 452 | obj/stardundee.o: stardundee.cpp stardundee.h \ |
|
441 | 453 | rmapoperations.h \ |
|
454 | params.h \ | |
|
442 | 455 | ccsds.h \ |
|
443 | 456 | tmpackettoread.h |
|
444 | 457 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/stardundee.o stardundee.cpp |
|
445 | 458 | |
|
446 | 459 | obj/gresb.o: gresb.cpp gresb.h \ |
|
447 | 460 | rmapoperations.h \ |
|
461 | params.h \ | |
|
448 | 462 | ccsds.h \ |
|
449 | 463 | tmpackettoread.h |
|
450 | 464 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresb.o gresb.cpp |
|
451 | 465 | |
|
452 | 466 | obj/tcpackettosend.o: tcpackettosend.cpp tcpackettosend.h |
|
453 | 467 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tcpackettosend.o tcpackettosend.cpp |
|
454 | 468 | |
|
455 | 469 | obj/tmpackettoread.o: tmpackettoread.cpp tmpackettoread.h |
|
456 | 470 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmpackettoread.o tmpackettoread.cpp |
|
457 | 471 | |
|
458 | 472 | obj/wfdisplay.o: wfdisplay.cpp wfdisplay.h \ |
|
459 | 473 | wfplot.h \ |
|
460 | 474 | params.h \ |
|
461 | 475 | wfpage.h |
|
462 | 476 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/wfdisplay.o wfdisplay.cpp |
|
463 | 477 | |
|
464 | 478 | obj/tmstatistics.o: tmstatistics.cpp tmstatistics.h |
|
465 | 479 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmstatistics.o tmstatistics.cpp |
|
466 | 480 | |
|
467 | 481 | obj/wfplot.o: wfplot.cpp wfplot.h \ |
|
468 | 482 | params.h |
|
469 | 483 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/wfplot.o wfplot.cpp |
|
470 | 484 | |
|
471 | 485 | obj/wfpage.o: wfpage.cpp wfpage.h \ |
|
472 | 486 | wfplot.h \ |
|
473 | 487 | params.h |
|
474 | 488 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/wfpage.o wfpage.cpp |
|
475 | 489 | |
|
476 | 490 | obj/wfpacket.o: wfpacket.cpp wfpacket.h \ |
|
477 | 491 | params.h |
|
478 | 492 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/wfpacket.o wfpacket.cpp |
|
479 | 493 | |
|
494 | obj/tmechobridge.o: tmechobridge.cpp tmechobridge.h | |
|
495 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmechobridge.o tmechobridge.cpp | |
|
496 | ||
|
480 | 497 | obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \ |
|
481 | 498 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h |
|
482 | 499 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp |
|
483 | 500 | |
|
484 | 501 | obj/moc_rmappluginui.o: moc/moc_rmappluginui.cpp |
|
485 | 502 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginui.o moc/moc_rmappluginui.cpp |
|
486 | 503 | |
|
487 | 504 | obj/moc_rmapplugin.o: moc/moc_rmapplugin.cpp |
|
488 | 505 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmapplugin.o moc/moc_rmapplugin.cpp |
|
489 | 506 | |
|
490 | 507 | obj/moc_qipdialogbox.o: moc/moc_qipdialogbox.cpp |
|
491 | 508 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_qipdialogbox.o moc/moc_qipdialogbox.cpp |
|
492 | 509 | |
|
493 | 510 | obj/moc_gresbstatusenquiry.o: moc/moc_gresbstatusenquiry.cpp |
|
494 | 511 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresbstatusenquiry.o moc/moc_gresbstatusenquiry.cpp |
|
495 | 512 | |
|
496 | 513 | obj/moc_rmappluginpythonwrapper.o: moc/moc_rmappluginpythonwrapper.cpp |
|
497 | 514 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginpythonwrapper.o moc/moc_rmappluginpythonwrapper.cpp |
|
498 | 515 | |
|
499 | 516 | obj/moc_stardundee.o: moc/moc_stardundee.cpp |
|
500 | 517 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_stardundee.o moc/moc_stardundee.cpp |
|
501 | 518 | |
|
502 | 519 | obj/moc_gresb.o: moc/moc_gresb.cpp |
|
503 | 520 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresb.o moc/moc_gresb.cpp |
|
504 | 521 | |
|
505 | 522 | obj/moc_tcpackettosend.o: moc/moc_tcpackettosend.cpp |
|
506 | 523 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tcpackettosend.o moc/moc_tcpackettosend.cpp |
|
507 | 524 | |
|
508 | 525 | obj/moc_tmpackettoread.o: moc/moc_tmpackettoread.cpp |
|
509 | 526 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmpackettoread.o moc/moc_tmpackettoread.cpp |
|
510 | 527 | |
|
511 | 528 | obj/moc_wfdisplay.o: moc/moc_wfdisplay.cpp |
|
512 | 529 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_wfdisplay.o moc/moc_wfdisplay.cpp |
|
513 | 530 | |
|
514 | 531 | obj/moc_tmstatistics.o: moc/moc_tmstatistics.cpp |
|
515 | 532 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmstatistics.o moc/moc_tmstatistics.cpp |
|
516 | 533 | |
|
517 | 534 | obj/moc_wfplot.o: moc/moc_wfplot.cpp |
|
518 | 535 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_wfplot.o moc/moc_wfplot.cpp |
|
519 | 536 | |
|
520 | 537 | obj/moc_wfpage.o: moc/moc_wfpage.cpp |
|
521 | 538 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_wfpage.o moc/moc_wfpage.cpp |
|
522 | 539 | |
|
523 | 540 | obj/moc_wfpacket.o: moc/moc_wfpacket.cpp |
|
524 | 541 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_wfpacket.o moc/moc_wfpacket.cpp |
|
525 | 542 | |
|
543 | obj/moc_tmechobridge.o: moc/moc_tmechobridge.cpp | |
|
544 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmechobridge.o moc/moc_tmechobridge.cpp | |
|
545 | ||
|
526 | 546 | obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp |
|
527 | 547 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp |
|
528 | 548 | |
|
529 | 549 | obj/moc_lppmonplugin.o: moc/moc_lppmonplugin.cpp |
|
530 | 550 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lppmonplugin.o moc/moc_lppmonplugin.cpp |
|
531 | 551 | |
|
532 | 552 | ####### Install |
|
533 | 553 | |
|
534 | 554 | install_target: first FORCE |
|
535 | 555 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ || $(MKDIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ |
|
536 | 556 | -$(INSTALL_PROGRAM) "bin/$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" |
|
537 | 557 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" |
|
538 | 558 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" |
|
539 | 559 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" |
|
540 | 560 | |
|
541 | 561 | uninstall_target: FORCE |
|
542 | 562 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" |
|
543 | 563 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" |
|
544 | 564 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" |
|
545 | 565 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" |
|
546 | 566 | -$(DEL_DIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ |
|
547 | 567 | |
|
548 | 568 | |
|
549 | 569 | install: install_target FORCE |
|
550 | 570 | |
|
551 | 571 | uninstall: uninstall_target FORCE |
|
552 | 572 | |
|
553 | 573 | FORCE: |
|
554 | 574 |
@@ -1,399 +1,403 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPPMON Software |
|
3 | 3 | -- Copyright (C) 2012, Laboratory of Plasma Physics - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Paul LEROY |
|
20 | 20 | -- Mail : paul.leroy@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "rmapplugin.h" |
|
23 | 23 | #include <QHostAddress> |
|
24 | 24 | #include <QIODevice> |
|
25 | 25 | #include <QApplication> |
|
26 | 26 | #include <rmappluginpythonwrapper.h> |
|
27 | 27 | #include <PythonQt.h> |
|
28 | 28 | #include <QTimer> |
|
29 | 29 | |
|
30 | 30 | rmapplugin::rmapplugin(QWidget *parent) |
|
31 | 31 | :lppmonplugin(parent,false) |
|
32 | 32 | { |
|
33 | 33 | this->UI = new rmapPluginUI(); |
|
34 | 34 | this->setWindowTitle(tr("RMAP and SPW Communication")); |
|
35 | 35 | this->setWidget((QWidget*)this->UI); |
|
36 | 36 | |
|
37 | 37 | timeCode = 0; |
|
38 | 38 | time_COARSE = 0; |
|
39 | 39 | time_FINE = 0; |
|
40 | 40 | currentBridge = selectedBridgeIsUnknown; |
|
41 | 41 | |
|
42 | 42 | //************** |
|
43 | 43 | //Python wrapper |
|
44 | 44 | this->pyObject = new rmappluginPythonWrapper(); |
|
45 | 45 | connect(this->pyObject,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); |
|
46 | 46 | connect(this->pyObject,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); |
|
47 | 47 | //** |
|
48 | 48 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( WriteSPWSig(char*,uint,char,char) ), |
|
49 | 49 | this, SLOT( WriteSPW(char*,uint,char,char)), Qt::DirectConnection ); |
|
50 | 50 | //** |
|
51 | 51 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateTargetAddress(unsigned char) ), |
|
52 | 52 | this, SLOT( setValueTargetAddress(unsigned char)) ); |
|
53 | 53 | //** |
|
54 | 54 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateSourceAddress(unsigned char) ), |
|
55 | 55 | this, SLOT( setValueSourceAddress(unsigned char)) ); |
|
56 | 56 | //** |
|
57 | 57 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sendMessage(QString)), |
|
58 | 58 | this, SLOT(displayOnConsole(QString)) ); |
|
59 | 59 | //** |
|
60 | 60 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(fetchPacketSig()), |
|
61 | 61 | this, SLOT(fetchPacket()), Qt::DirectConnection ); |
|
62 | 62 | //*** |
|
63 | 63 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(nbPacketHasChanged(int)), |
|
64 | 64 | this, SLOT(nbPacketHasChanged(int))); |
|
65 | 65 | //************** |
|
66 | 66 | |
|
67 | 67 | //************** |
|
68 | 68 | // get a smart pointer to the __main__ module of the Python interpreter |
|
69 | 69 | PythonQtObjectPtr context = PythonQt::self()->getMainModule(); |
|
70 | 70 | // add a QObject as variable of name "BUTTON_rmapOpenCommunication" to the namespace of the __main__ module |
|
71 | 71 | context.addObject("BUTTON_rmapOpenCommunication", UI->rmapOpenCommunicationButton); |
|
72 | 72 | context.addObject("BUTTON_rmapCloseCommunication", UI->rmapCloseCommunicationButton); |
|
73 | 73 | context.addObject("BUTTON_selectStarDundee", UI->selectStarDundee_BUTTON); |
|
74 | 74 | context.addObject("BUTTON_selectGRESB", UI->selectGRESB_BUTTON); |
|
75 | 75 | context.addObject("GRESB_Bridge", UI->gresbBridge); |
|
76 | 76 | //************** |
|
77 | 77 | |
|
78 | 78 | connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(openBridge())); |
|
79 | 79 | connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(closeBridge())); |
|
80 | 80 | connect(this, SIGNAL( |
|
81 | 81 | updateStatistics(unsigned char,unsigned char,unsigned char,unsigned char,uint,uint,uint,uint) |
|
82 | 82 | ), |
|
83 | 83 | this->UI->tmStatistics, SLOT( |
|
84 | 84 | updateStatistics(unsigned char,unsigned char,unsigned char,unsigned char,uint,uint,uint,uint) |
|
85 | 85 | )); |
|
86 | 86 | |
|
87 | 87 | //****** |
|
88 | 88 | // GRESB |
|
89 | 89 | connect(this->UI->gresbBridge, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
90 | 90 | connect(this->UI->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); |
|
91 | 91 | connect(this->UI->gresbBridge, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); |
|
92 | 92 | connect(this->UI->gresbBridge, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); |
|
93 | 93 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->gresbBridge, SLOT(ccsdsPacketIsProcessed())); |
|
94 | 94 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
95 | 95 | this->UI->gresbBridge, SLOT(targetHasChanged(int))); |
|
96 | 96 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
97 | 97 | this->UI->gresbBridge, SLOT(sourceHasChanged(int))); |
|
98 | 98 | connect(this->UI->gresbBridge, SIGNAL(sendPacket(TMPacketToRead*)), |
|
99 | 99 | this, SLOT(receivePacketFromBridge(TMPacketToRead*)), Qt::DirectConnection); |
|
100 | 100 | |
|
101 | 101 | //************ |
|
102 | 102 | // Star Dundee |
|
103 | 103 | connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
104 | 104 | connect(this->UI->starDundee, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); |
|
105 | 105 | connect(this->UI->starDundee, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); |
|
106 | 106 | connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); |
|
107 | 107 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->starDundee, SLOT(ccsdsPacketIsProcessed())); |
|
108 | 108 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
109 | 109 | this->UI->starDundee, SLOT(targetHasChanged(int))); |
|
110 | 110 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
111 | 111 | this->UI->starDundee, SLOT(sourceHasChanged(int))); |
|
112 | 112 | connect(this->UI->starDundee, SIGNAL(sendPacket(TMPacketToRead*)), |
|
113 | 113 | this, SLOT(receivePacketFromBridge(TMPacketToRead*)), Qt::DirectConnection); |
|
114 | 114 | |
|
115 | 115 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); |
|
116 | 116 | |
|
117 | 117 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->generalCCSDSPacketStore); |
|
118 | 118 | } |
|
119 | 119 | |
|
120 | 120 | rmapplugin::~rmapplugin() |
|
121 | 121 | { |
|
122 | 122 | switch(currentBridge) |
|
123 | 123 | { |
|
124 | 124 | case selectedBridgeIsGRESB : |
|
125 | 125 | if (RMAPSend_SOCKET->isOpen()) RMAPSend_SOCKET->disconnectFromHost(); |
|
126 | 126 | if (RMAPReceive_SOCKET->isOpen()) RMAPReceive_SOCKET->disconnectFromHost(); |
|
127 | 127 | if (GRESBStatusQuery_SOCKET->isOpen()) GRESBStatusQuery_SOCKET->disconnectFromHost(); |
|
128 | 128 | break; |
|
129 | 129 | case selectedBridgeIsStarDundee : |
|
130 | 130 | break; |
|
131 | 131 | default: |
|
132 | 132 | break; |
|
133 | 133 | } |
|
134 | 134 | } |
|
135 | 135 | |
|
136 | 136 | unsigned int rmapplugin::Write(unsigned int *Value, unsigned int count, unsigned int address) |
|
137 | 137 | { |
|
138 | 138 | unsigned int result; |
|
139 | 139 | switch(currentBridge) |
|
140 | 140 | { |
|
141 | 141 | case selectedBridgeIsGRESB : |
|
142 | 142 | result = UI->gresbBridge->Write(Value, count, address); |
|
143 | 143 | break; |
|
144 | 144 | case selectedBridgeIsStarDundee : |
|
145 | 145 | result = UI->starDundee->Write(Value, count, address); |
|
146 | 146 | break; |
|
147 | 147 | default: |
|
148 | 148 | result = 1; |
|
149 | 149 | break; |
|
150 | 150 | } |
|
151 | 151 | return result; |
|
152 | 152 | } |
|
153 | 153 | |
|
154 | 154 | unsigned int rmapplugin::Read(unsigned int *Value, unsigned int count, unsigned int address) |
|
155 | 155 | { |
|
156 | 156 | unsigned int result; |
|
157 | 157 | switch(currentBridge) |
|
158 | 158 | { |
|
159 | 159 | case selectedBridgeIsGRESB : |
|
160 | 160 | result = UI->gresbBridge->Read(Value, count, address); |
|
161 | 161 | break; |
|
162 | 162 | case selectedBridgeIsStarDundee : |
|
163 | 163 | result = UI->starDundee->Read(Value, count, address); |
|
164 | 164 | break; |
|
165 | 165 | default: |
|
166 | 166 | result = 1; |
|
167 | 167 | break; |
|
168 | 168 | } |
|
169 | 169 | return result; |
|
170 | 170 | } |
|
171 | 171 | |
|
172 | 172 | //////// |
|
173 | 173 | // SLOTS |
|
174 | 174 | |
|
175 | 175 | unsigned int rmapplugin::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) // SLOT |
|
176 | 176 | { |
|
177 | 177 | unsigned int result; |
|
178 | 178 | switch(currentBridge) |
|
179 | 179 | { |
|
180 | 180 | case selectedBridgeIsGRESB : |
|
181 | 181 | result = UI->gresbBridge->WriteSPW(Value, count, targetLogicalAddress, userApplication); |
|
182 | 182 | break; |
|
183 | 183 | case selectedBridgeIsStarDundee : |
|
184 | 184 | result = UI->starDundee->WriteSPW(Value, count, targetLogicalAddress, userApplication); |
|
185 | 185 | break; |
|
186 | 186 | default: |
|
187 | 187 | result = 1; |
|
188 | 188 | break; |
|
189 | 189 | } |
|
190 | 190 | return result; |
|
191 | 191 | } |
|
192 | 192 | |
|
193 | 193 | void rmapplugin::openBridge() |
|
194 | 194 | { |
|
195 | 195 | switch(currentBridge) |
|
196 | 196 | { |
|
197 | 197 | case selectedBridgeIsGRESB : |
|
198 | 198 | this->UI->gresbBridge->Open(); |
|
199 | 199 | break; |
|
200 | 200 | case selectedBridgeIsStarDundee : |
|
201 | 201 | this->UI->starDundee->Open(); |
|
202 | 202 | break; |
|
203 | 203 | default: |
|
204 | 204 | break; |
|
205 | 205 | } |
|
206 | 206 | } |
|
207 | 207 | |
|
208 | 208 | void rmapplugin::closeBridge() |
|
209 | 209 | { |
|
210 | 210 | switch(currentBridge) |
|
211 | 211 | { |
|
212 | 212 | case selectedBridgeIsGRESB : |
|
213 | 213 | this->UI->gresbBridge->Close(); |
|
214 | 214 | break; |
|
215 | 215 | case selectedBridgeIsStarDundee : |
|
216 | 216 | this->UI->starDundee->Close(); |
|
217 | 217 | break; |
|
218 | 218 | default: |
|
219 | 219 | break; |
|
220 | 220 | } |
|
221 | 221 | } |
|
222 | 222 | |
|
223 | 223 | void rmapplugin::RMAP_write_reply_setText(QString text) |
|
224 | 224 | { |
|
225 | 225 | this->UI->RMAP_write_reply->setText(text); |
|
226 | 226 | } |
|
227 | 227 | |
|
228 | 228 | void rmapplugin::appendToLog(QString text) |
|
229 | 229 | { |
|
230 | 230 | APPENDTOLOG(text); |
|
231 | 231 | } |
|
232 | 232 | |
|
233 | 233 | void rmapplugin::setValueTargetAddress(unsigned char newAddress) |
|
234 | 234 | { |
|
235 | 235 | this->UI->rmapTargetLogicalAddressSpinBox->setValue(newAddress); |
|
236 | 236 | } |
|
237 | 237 | |
|
238 | 238 | void rmapplugin::setValueSourceAddress(unsigned char newAddress) |
|
239 | 239 | { |
|
240 | 240 | this->UI->rmapSourceLogicalAddressSpinBox->setValue(newAddress); |
|
241 | 241 | } |
|
242 | 242 | |
|
243 | 243 | void rmapplugin::receivePacketFromBridge(TMPacketToRead *packet) |
|
244 | 244 | { |
|
245 | 245 | preProcessPacket(packet); |
|
246 | ||
|
247 | // Send the packet to the TM echo bridge for processing | |
|
248 | this->UI->tmEchoBridge->sendTMPacket(packet); | |
|
249 | ||
|
246 | 250 | this->generalCCSDSPacketStore.append(packet); |
|
247 | 251 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(generalCCSDSPacketStore.size())); |
|
248 | 252 | processPacketStore(); |
|
249 | 253 | } |
|
250 | 254 | |
|
251 | 255 | void rmapplugin::preProcessPacket(TMPacketToRead *packet) |
|
252 | 256 | { |
|
253 | 257 | unsigned char pid = 0; |
|
254 | 258 | unsigned char cat = 0; |
|
255 | 259 | unsigned char typ = 0; |
|
256 | 260 | unsigned char sub = 0; |
|
257 | 261 | unsigned int sid = 0; |
|
258 | 262 | unsigned int length = 0; |
|
259 | 263 | unsigned int coarse_t = 0; |
|
260 | 264 | unsigned int fine_t = 0; |
|
261 | 265 | |
|
262 | 266 | //********************************* |
|
263 | 267 | // get the parameters of the packet |
|
264 | 268 | pid = ((packet->Value[4] & 0x07) << 4) + ((packet->Value[5] & 0xf0) >> 4); |
|
265 | 269 | cat = packet->Value[5] & 0x0f; |
|
266 | 270 | typ = packet->Value[11]; // TYPE |
|
267 | 271 | sub = packet->Value[12]; // SUBTYPE |
|
268 | 272 | sid = 0; |
|
269 | 273 | length = packet->Value[8] * 256 + packet->Value[9]; |
|
270 | 274 | coarse_t = packet->Value[14] * pow(2, 24) + packet->Value[15] * pow(2, 16) |
|
271 | 275 | + packet->Value[16] * pow(2, 8) + packet->Value[17]; |
|
272 | 276 | fine_t = packet->Value[18] * pow(2, 8) + packet->Value[19]; |
|
273 | 277 | |
|
274 | 278 | if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8)) |
|
275 | 279 | sid = packet->Value[20] * 256 + packet->Value[21]; |
|
276 | 280 | else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3)) |
|
277 | 281 | sid = packet->Value[20]; |
|
278 | 282 | else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25)) |
|
279 | 283 | sid = 1; |
|
280 | 284 | |
|
281 | 285 | emit updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t); |
|
282 | 286 | |
|
283 | 287 | |
|
284 | 288 | //**************************************** |
|
285 | 289 | // if the packet is a waveform, display it |
|
286 | 290 | if ( (typ == 21) & (sub == 3) ) |
|
287 | 291 | { |
|
288 | 292 | sid = packet->Value[20]; // SID |
|
289 | 293 | switch (sid){ |
|
290 | 294 | case SID_NORMAL_SWF_F0: |
|
291 | 295 | buildWFAndDisplay(packet, &wfPacketNormal[0], 0); |
|
292 | 296 | break; |
|
293 | 297 | case SID_NORMAL_SWF_F1: |
|
294 | 298 | buildWFAndDisplay(packet, &wfPacketNormal[1], 1); |
|
295 | 299 | break; |
|
296 | 300 | case SID_NORMAL_SWF_F2: |
|
297 | 301 | buildWFAndDisplay(packet, &wfPacketNormal[2], 2); |
|
298 | 302 | break; |
|
299 | 303 | case SID_NORMAL_CWF_F3: |
|
300 | 304 | buildWFAndDisplay(packet, &wfPacketNormal[3], 3); |
|
301 | 305 | break; |
|
302 | 306 | } |
|
303 | 307 | } |
|
304 | 308 | } |
|
305 | 309 | |
|
306 | 310 | void rmapplugin::nbPacketHasChanged(int nb) |
|
307 | 311 | { |
|
308 | 312 | this->UI->nbPacketInStore->setText("nb packets in store: " + QString::number(nb)); |
|
309 | 313 | } |
|
310 | 314 | |
|
311 | 315 | void rmapplugin::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page) |
|
312 | 316 | { |
|
313 | 317 | unsigned int i = 0; |
|
314 | 318 | unsigned int j = 0; |
|
315 | 319 | unsigned char *data; |
|
316 | 320 | unsigned char pkt_nr = 0; |
|
317 | 321 | unsigned int blk_nr = 0; |
|
318 | 322 | |
|
319 | 323 | pkt_nr = packet->Value[23]; // PKT_NR |
|
320 | 324 | blk_nr = packet->Value[24] * 256 + packet->Value[25]; |
|
321 | 325 | data = &packet->Value[26]; // start of the first data block; |
|
322 | 326 | j = (pkt_nr-1) * 340; |
|
323 | 327 | for ( i=0; i<blk_nr; i++ ){ |
|
324 | 328 | wfPacket->wf_e1[j + i] = (short) ( (data[ (i * BLK_SIZE) ] << 8) + (data[ (i*BLK_SIZE) + 1]) ); |
|
325 | 329 | wfPacket->wf_v[j + i] = (short) ( (data[ (i * BLK_SIZE) + 2] << 8) + (data[ (i*BLK_SIZE) + 3]) ); |
|
326 | 330 | wfPacket->wf_b1[j + i] = (short) ( (data[ (i * BLK_SIZE) + 4] << 8) + (data[ (i*BLK_SIZE) + 5]) ); |
|
327 | 331 | wfPacket->wf_e2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 6] << 8) + (data[ (i*BLK_SIZE) + 7]) ); |
|
328 | 332 | wfPacket->wf_b3[j + i] = (short) ( (data[ (i * BLK_SIZE) + 8] << 8) + (data[ (i*BLK_SIZE) + 9]) ); |
|
329 | 333 | wfPacket->wf_b2[j + i] = (short) ( (data[ (i * BLK_SIZE) + 10] << 8) + (data[ (i*BLK_SIZE) + 11]) ); |
|
330 | 334 | } |
|
331 | 335 | if (pkt_nr == 7) |
|
332 | 336 | { |
|
333 | 337 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_v, num_page, 0); |
|
334 | 338 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e1, num_page, 1); |
|
335 | 339 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_e2, num_page, 2); |
|
336 | 340 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b1, num_page, 3); |
|
337 | 341 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b2, num_page, 4); |
|
338 | 342 | this->UI->wfDisplay->displayOnPlot(wfPacket->wf_b3, num_page, 5); |
|
339 | 343 | } |
|
340 | 344 | } |
|
341 | 345 | |
|
342 | 346 | ///////////////////// |
|
343 | 347 | // INTERNAL FUNCTIONS |
|
344 | 348 | |
|
345 | 349 | void rmapplugin::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) // SLOT |
|
346 | 350 | { |
|
347 | 351 | QString message; |
|
348 | 352 | unsigned int fine_time_value = 0; |
|
349 | 353 | fine_time_value = ((unsigned int) ccsdsPacket[7]<<24) |
|
350 | 354 | + ((unsigned int) ccsdsPacket[6]<<16) |
|
351 | 355 | + ((unsigned int) ccsdsPacket[5]<<8) |
|
352 | 356 | + ((unsigned int) ccsdsPacket[4]); |
|
353 | 357 | message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": "); |
|
354 | 358 | message.append("size " |
|
355 | 359 | + QString::number(size) |
|
356 | 360 | +" *** header " |
|
357 | 361 | + QString::number(ccsdsPacket[0], 16) |
|
358 | 362 | + " " |
|
359 | 363 | + QString::number(ccsdsPacket[1], 16) |
|
360 | 364 | + " " |
|
361 | 365 | + QString::number(ccsdsPacket[2], 16) |
|
362 | 366 | + " " |
|
363 | 367 | + QString::number(ccsdsPacket[3], 16) |
|
364 | 368 | + " *** coarse time " |
|
365 | 369 | + QString::number(fine_time_value)); |
|
366 | 370 | //+ QString::number(ccsdsPacket[4], 16) |
|
367 | 371 | //+" " |
|
368 | 372 | //+ QString::number(ccsdsPacket[5], 16) |
|
369 | 373 | //+" " |
|
370 | 374 | //+ QString::number(ccsdsPacket[6], 16) |
|
371 | 375 | //+" " |
|
372 | 376 | //+ QString::number(ccsdsPacket[7], 16)); |
|
373 | 377 | displayOnConsole(message); |
|
374 | 378 | //((rmappluginPythonWrapper*)this->pyObject)->storeCCSDSPacket(ccsdsPacket, size); |
|
375 | 379 | emit ccsdsPacketIsProcessed(); |
|
376 | 380 | } |
|
377 | 381 | |
|
378 | 382 | void rmapplugin::processPacketStore() |
|
379 | 383 | { |
|
380 | 384 | ((rmappluginPythonWrapper*)this->pyObject)->processPacketStore(); |
|
381 | 385 | } |
|
382 | 386 | |
|
383 | 387 | int rmapplugin::fetchPacket() |
|
384 | 388 | { |
|
385 | 389 | int ret = 0; |
|
386 | 390 | |
|
387 | 391 | switch(currentBridge) |
|
388 | 392 | { |
|
389 | 393 | case selectedBridgeIsGRESB : |
|
390 | 394 | break; |
|
391 | 395 | case selectedBridgeIsStarDundee : |
|
392 | 396 | ret = this->UI->starDundee->receiveSPWPacketLoop(); |
|
393 | 397 | break; |
|
394 | 398 | default: |
|
395 | 399 | break; |
|
396 | 400 | } |
|
397 | 401 | |
|
398 | 402 | return ret; |
|
399 | 403 | } |
@@ -1,81 +1,83 | |||
|
1 | 1 | # |
|
2 | 2 | # Project created by QtCreator 2011-09-20T08:15:30 |
|
3 | 3 | # |
|
4 | 4 | #------------------------------------------------- |
|
5 | 5 | |
|
6 | 6 | #include(/etc/lppmon/lppmonplugin.prf) |
|
7 | 7 | CONFIG += lppmonplugin |
|
8 | 8 | TARGET = rmapplugin |
|
9 | 9 | |
|
10 | 10 | DEFINES += PLUGIN=rmapplugin |
|
11 | 11 | DEFINES += PLUGINHEADER="\"\\\"rmapplugin.h"\\\"\" |
|
12 | 12 | DEFINES += driver_Name="\"\\\"RMAPPlugin"\\\"\" |
|
13 | 13 | DEFINES += driver_Author="\"\\\"Paul Leroy paul.leroy@lpp.polytechnique.fr"\\\"\" |
|
14 | 14 | DEFINES += driver_Version="\"\\\"1.1.2"\\\"\" |
|
15 | 15 | DEFINES += driver_Description="\"\\\"AHB bus controler, works with Gaisler's AHB plugn' play bus."\\\"\" |
|
16 | 16 | DEFINES += driver_can_be_root=1 |
|
17 | 17 | DEFINES += driver_can_be_child=0 |
|
18 | 18 | DEFINES += driver_VID=0 |
|
19 | 19 | DEFINES += driver_PID=0 |
|
20 | 20 | |
|
21 | 21 | QT += network |
|
22 | 22 | |
|
23 | 23 | LIBS += ../spw_usb_driver_v2.63/lib/x86_64/libSpaceWireUSBAPI.so \ |
|
24 | 24 | ../spw_usb_driver_v2.63/lib/x86_64/libConfigLibraryUSB.so |
|
25 | 25 | |
|
26 | 26 | |
|
27 | 27 | INCLUDEPATH += \ |
|
28 | 28 | $${PWD} \ |
|
29 | 29 | ../common_PLE \ |
|
30 | 30 | ../spw_usb_driver_v2.63/inc |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | HEADERS += \ |
|
34 | 34 | rmappluginui.h \ |
|
35 | 35 | rmapplugin.h \ |
|
36 | 36 | rmapoperations.h \ |
|
37 | 37 | ccsds.h \ |
|
38 | 38 | ../common_PLE/qipdialogbox.h \ |
|
39 | 39 | ../common_PLE/gresbstatusenquiry.h \ |
|
40 | 40 | rmappluginpythonwrapper.h \ |
|
41 | 41 | stardundee.h \ |
|
42 | 42 | ../spw_usb_driver_v2.61/inc/spw_usb_api.h \ |
|
43 | 43 | ../spw_usb_driver_v2.61/inc/spw_config_library.h \ |
|
44 | 44 | gresb.h \ |
|
45 | 45 | tcpackettosend.h \ |
|
46 | 46 | tmpackettoread.h \ |
|
47 | 47 | wfdisplay.h \ |
|
48 | 48 | tmstatistics.h \ |
|
49 | 49 | wfplot.h \ |
|
50 | 50 | wfpage.h \ |
|
51 | 51 | wfpacket.h \ |
|
52 | params.h | |
|
52 | params.h \ | |
|
53 | tmechobridge.h | |
|
53 | 54 | |
|
54 | 55 | |
|
55 | 56 | SOURCES += \ |
|
56 | 57 | rmapplugin.cpp \ |
|
57 | 58 | rmappluginui.cpp \ |
|
58 | 59 | rmapoperations.cpp \ |
|
59 | 60 | ccsds.cpp \ |
|
60 | 61 | ../common_PLE/qipdialogbox.cpp \ |
|
61 | 62 | ../common_PLE/gresbstatusenquiry.cpp \ |
|
62 | 63 | rmappluginpythonwrapper.cpp \ |
|
63 | 64 | stardundee.cpp \ |
|
64 | 65 | gresb.cpp \ |
|
65 | 66 | tcpackettosend.cpp \ |
|
66 | 67 | tmpackettoread.cpp \ |
|
67 | 68 | wfdisplay.cpp \ |
|
68 | 69 | tmstatistics.cpp \ |
|
69 | 70 | wfplot.cpp \ |
|
70 | 71 | wfpage.cpp \ |
|
71 | wfpacket.cpp | |
|
72 | wfpacket.cpp \ | |
|
73 | tmechobridge.cpp | |
|
72 | 74 | |
|
73 | 75 | |
|
74 | 76 | |
|
75 | 77 | |
|
76 | 78 | |
|
77 | 79 | |
|
78 | 80 | |
|
79 | 81 | |
|
80 | 82 | |
|
81 | 83 |
@@ -1,292 +1,296 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPPMON Software |
|
3 | 3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "rmapplugin.h" |
|
23 | 23 | |
|
24 | 24 | rmapPluginUI::rmapPluginUI(QWidget *parent) : |
|
25 | 25 | QWidget(parent) |
|
26 | 26 | { |
|
27 | 27 | spwTabWidget = new QTabWidget; |
|
28 | 28 | // |
|
29 | 29 | QWidget* spwTabWidgetPage0 = new QWidget; |
|
30 | 30 | QWidget* spwTabWidgetPage2 = new QWidget; |
|
31 | 31 | QWidget* spwTabWidgetPage3 = new QWidget; |
|
32 | 32 | QWidget* spwTabWidgetPage4 = new QWidget; |
|
33 | 33 | QWidget* spwTabWidgetPage5 = new QWidget; |
|
34 | QWidget* spwTabWidgetPage6 = new QWidget; | |
|
34 | 35 | // |
|
35 | 36 | bridgeWidget = new QWidget; |
|
36 | 37 | mainLayout = new QVBoxLayout; |
|
37 | 38 | ccsdsLayout = new QVBoxLayout; |
|
38 | 39 | consoleLayout = new QVBoxLayout; |
|
39 | 40 | selectionLayout = new QVBoxLayout; |
|
40 | 41 | connectionLayout = new QGridLayout; |
|
41 | 42 | bridgeSelection_LAYOUT = new QGridLayout; |
|
42 | 43 | generalParameters_LAYOUT = new QGridLayout; |
|
43 | 44 | |
|
44 | 45 | gresb_GROUPBOX = new QGroupBox(tr("GRESB bridge parameters")); |
|
45 | 46 | stardundee_GROUPBOX = new QGroupBox(tr("Star Dundee brick parameters")); |
|
46 | 47 | selection_GROUPBOX = new QGroupBox(tr("Bridge selection")); |
|
47 | 48 | generalParameters_GROUPBOX = new QGroupBox(tr("General parameters")); |
|
48 | 49 | |
|
49 | 50 | //*** QLABEL ***// |
|
50 | 51 | gresbBridgeIPLabel = new QLabel(tr("Bridge IP: ")); |
|
51 | 52 | gresbVirtualLinkLabel = new QLabel(tr("Virtual Link: ")); |
|
52 | 53 | spwLinkLabel = new QLabel(tr("SPW Link: ")); |
|
53 | 54 | rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: ")); |
|
54 | 55 | rmapTargetLogicalAddressLabel = new QLabel(tr("RMAP Target Logical Address: ")); |
|
55 | 56 | logFileName = new QLabel; |
|
56 | 57 | gresbStatusQueryLabel = new QLabel(tr("Status query socket (port 3010): waiting for connection")); |
|
57 | 58 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); |
|
58 | 59 | nbPacketInStore = new QLabel(tr("nb packets in store: -")); |
|
59 | 60 | |
|
60 | 61 | //*** QPUSHBUTTON ***// |
|
61 | 62 | rmapOpenCommunicationButton = new QPushButton(tr("Open selected bridge")); |
|
62 | 63 | rmapCloseCommunicationButton = new QPushButton(tr("Close selected bridge")); |
|
63 | 64 | rmapOpenCommunicationButton->setEnabled(false); |
|
64 | 65 | rmapCloseCommunicationButton->setEnabled(false); |
|
65 | 66 | logFileChooseButton = new QPushButton(tr("Choose file")); |
|
66 | 67 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
67 | 68 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
68 | 69 | clearConsoleButton = new QPushButton(tr("Clear")); |
|
69 | 70 | |
|
70 | 71 | selectGRESB_BUTTON = new QRadioButton(tr("GRESB")); |
|
71 | 72 | selectStarDundee_BUTTON = new QRadioButton(tr("Star Dundee")); |
|
72 | 73 | |
|
73 | 74 | //*** SPINBOX ***// |
|
74 | 75 | gresbVirtualLinkSpinBox = new QSpinBox; |
|
75 | 76 | rmapSourceLogicalAddressSpinBox = new QSpinBox; |
|
76 | 77 | rmapTargetLogicalAddressSpinBox = new QSpinBox; |
|
77 | 78 | spwLinkSpinBox = new QSpinBox;; |
|
78 | 79 | CCSDSTargetLogicalAddressSpinBox = new QSpinBox; |
|
79 | 80 | gresbVirtualLinkSpinBox->setRange(0, 4); |
|
80 | 81 | gresbVirtualLinkSpinBox->setValue(1); |
|
81 | 82 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); |
|
82 | 83 | rmapTargetLogicalAddressSpinBox->setRange(0, 255); |
|
83 | 84 | spwLinkSpinBox->setRange(0, 2); |
|
84 | 85 | spwLinkSpinBox->setValue(0); |
|
85 | 86 | |
|
86 | 87 | //*** MISC **// |
|
87 | 88 | starDundee = new StarDundee; |
|
88 | 89 | gresbBridge = new gresb; |
|
90 | tmEchoBridge = new TMEchoBridge(); | |
|
89 | 91 | console = new QTextEdit; |
|
90 | 92 | gresbStatusQueryDialog = new QDialog; |
|
91 | 93 | logEnableCheckBox = new QCheckBox(tr("Enable Logs")); |
|
92 | 94 | RMAP_write_verify = new QCheckBox(tr("data checked before write\nlimited to 4 bytes\nNOT IMPLEMENTED")); |
|
93 | 95 | RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable")); |
|
94 | 96 | logFile = new QFile(); |
|
95 | 97 | wfDisplay = new WFDisplay(); |
|
96 | 98 | tmStatistics = new TMStatistics(); |
|
97 | 99 | |
|
98 | 100 | logFileEn = false; |
|
99 | 101 | |
|
100 | 102 | connectionLayout->setRowStretch(7, 1); |
|
101 | 103 | connectionLayout->setColumnStretch(2, 1); |
|
102 | 104 | |
|
103 | 105 | bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1); |
|
104 | 106 | bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1); |
|
105 | 107 | |
|
106 | 108 | bridgeSelection_LAYOUT->setRowStretch(1, 1); |
|
107 | 109 | bridgeSelection_LAYOUT->setColumnStretch(2, 1); |
|
108 | 110 | |
|
109 | 111 | generalParameters_LAYOUT->addWidget(logEnableCheckBox, 0, 0, 1, 1); |
|
110 | 112 | generalParameters_LAYOUT->addWidget(logFileChooseButton, 0, 1, 1, 1); |
|
111 | 113 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressLabel, 1, 0, 0); |
|
112 | 114 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressSpinBox, 1, 1, 0); |
|
113 | 115 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressLabel, 2, 0, 0); |
|
114 | 116 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressSpinBox, 2, 1, 0); |
|
115 | 117 | generalParameters_LAYOUT->addWidget(rmapOpenCommunicationButton, 3, 0, 1, 1); |
|
116 | 118 | generalParameters_LAYOUT->addWidget(rmapCloseCommunicationButton, 3, 1, 1, 1); |
|
117 | 119 | generalParameters_LAYOUT->addWidget(RMAP_write_verify, 4, 0, 1, 2); |
|
118 | 120 | generalParameters_LAYOUT->addWidget(RMAP_write_reply, 5, 0, 1, 2); |
|
119 | 121 | |
|
120 | 122 | generalParameters_LAYOUT->setRowStretch(6, 1); |
|
121 | 123 | generalParameters_LAYOUT->setColumnStretch(2, 1); |
|
122 | 124 | |
|
123 | 125 | gresb_GROUPBOX->setLayout(gresbBridge->layout()); |
|
124 | 126 | gresb_GROUPBOX->setVisible(false); |
|
125 | 127 | stardundee_GROUPBOX->setLayout(starDundee->layout()); |
|
126 | 128 | stardundee_GROUPBOX->setVisible(false); |
|
127 | 129 | selection_GROUPBOX->setLayout(bridgeSelection_LAYOUT); |
|
128 | 130 | generalParameters_GROUPBOX->setLayout(generalParameters_LAYOUT); |
|
129 | 131 | selectionLayout->addWidget(selection_GROUPBOX); |
|
130 | 132 | selectionLayout->addWidget(generalParameters_GROUPBOX); |
|
131 | 133 | selectionLayout->addWidget(gresb_GROUPBOX); |
|
132 | 134 | selectionLayout->addWidget(stardundee_GROUPBOX); |
|
133 | 135 | |
|
134 | 136 | //******** |
|
135 | 137 | // CONSOLE |
|
136 | 138 | consoleLayout->addWidget(console); |
|
137 | 139 | consoleLayout->addWidget(clearConsoleButton); |
|
138 | 140 | consoleLayout->addWidget(nbPacketInStore); |
|
139 | 141 | |
|
140 | 142 | connect(this->logFileChooseButton, SIGNAL(clicked()), this, SLOT(chooseLogFile())); |
|
141 | 143 | connect(this, SIGNAL(setLogFileName(QString)), this->logFileName, SLOT(setText(QString))); |
|
142 | 144 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); |
|
143 | 145 | |
|
144 | 146 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); |
|
145 | 147 | spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); |
|
146 | 148 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); |
|
147 | 149 | spwTabWidget->addTab(spwTabWidgetPage4, tr("TM statistics")); |
|
148 | 150 | spwTabWidget->addTab(spwTabWidgetPage5, tr("waveforms")); |
|
151 | spwTabWidget->addTab(spwTabWidgetPage6, tr("TM Echo Bridge")); | |
|
149 | 152 | |
|
150 | 153 | spwTabWidgetPage0->setLayout(selectionLayout); |
|
151 | 154 | spwTabWidgetPage2->setLayout(this->gresbBridge->spwLinkStatusEnquiry->mainLayout); |
|
152 | 155 | spwTabWidgetPage3->setLayout(consoleLayout); |
|
153 | 156 | spwTabWidgetPage4->setLayout(tmStatistics->layout()); |
|
154 | 157 | spwTabWidgetPage5->setLayout(wfDisplay->layout()); |
|
158 | spwTabWidgetPage6->setLayout(tmEchoBridge->layout()); | |
|
155 | 159 | |
|
156 | 160 | mainLayout->addWidget(spwTabWidget); |
|
157 | 161 | setLayout(mainLayout); |
|
158 | 162 | |
|
159 | 163 | connect(this->clearConsoleButton, SIGNAL(clicked()), this->console, SLOT(clear())); |
|
160 | 164 | |
|
161 | 165 | // briges |
|
162 | 166 | connect(this->selectGRESB_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); |
|
163 | 167 | connect(this->selectStarDundee_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); |
|
164 | 168 | connect(this->starDundee, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); |
|
165 | 169 | connect(this->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); |
|
166 | 170 | |
|
167 | 171 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(sourceHasChanged(int))); |
|
168 | 172 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(targetHasChanged(int))); |
|
169 | 173 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(sourceHasChanged(int))); |
|
170 | 174 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(targetHasChanged(int))); |
|
171 | 175 | |
|
172 | 176 | // command code |
|
173 | 177 | connect(this->RMAP_write_reply, SIGNAL(clicked()), this, SLOT(getCommandCode())); |
|
174 | 178 | connect(this->RMAP_write_verify, SIGNAL(clicked()), this, SLOT(getCommandCode())); |
|
175 | 179 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), |
|
176 | 180 | this->starDundee, SLOT(commandCodeHasChanged(RMAP_command_codes))); |
|
177 | 181 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), |
|
178 | 182 | this->gresbBridge, SLOT(commandCodeHasChanged(RMAP_command_codes))); |
|
179 | 183 | |
|
180 | 184 | getCommandCode(); // init the command code value |
|
181 | 185 | rmapSourceLogicalAddressSpinBox->setValue(DEFAULT_SOURCE); |
|
182 | 186 | rmapTargetLogicalAddressSpinBox->setValue(DEFAULT_TARGET); |
|
183 | 187 | } |
|
184 | 188 | |
|
185 | 189 | rmapPluginUI::~rmapPluginUI() |
|
186 | 190 | { |
|
187 | 191 | //delete ui; |
|
188 | 192 | } |
|
189 | 193 | |
|
190 | 194 | void rmapPluginUI::chooseLogFile() |
|
191 | 195 | { |
|
192 | 196 | if(this->logFile->isOpen()) |
|
193 | 197 | this->logFile->close(); |
|
194 | 198 | this->logFile->setFileName(QFileDialog::getSaveFileName(this,tr("Open Log file"), |
|
195 | 199 | QDir::homePath() |
|
196 | 200 | + "/" |
|
197 | 201 | + QDate::currentDate().toString() |
|
198 | 202 | + "_" |
|
199 | 203 | + QTime::currentTime().toString() |
|
200 | 204 | + "_rmapPluginUI.log", |
|
201 | 205 | tr("Log Files (*.txt *.log)"))); |
|
202 | 206 | if(this->logFile->open(QIODevice::WriteOnly)) |
|
203 | 207 | { |
|
204 | 208 | this->logFileStrm = new QTextStream(this->logFile); |
|
205 | 209 | emit this->setLogFileName(this->logFile->fileName()); |
|
206 | 210 | } |
|
207 | 211 | } |
|
208 | 212 | |
|
209 | 213 | void rmapPluginUI::logFileEnDisable(int state) |
|
210 | 214 | { |
|
211 | 215 | if(state==Qt::Checked) |
|
212 | 216 | { |
|
213 | 217 | this->logFileEn = true; |
|
214 | 218 | } |
|
215 | 219 | else if(state==Qt::Unchecked) |
|
216 | 220 | { |
|
217 | 221 | this->logFileEn = false; |
|
218 | 222 | } |
|
219 | 223 | } |
|
220 | 224 | |
|
221 | 225 | bool rmapPluginUI::islogfileenable() |
|
222 | 226 | { |
|
223 | 227 | return this->logFileEn; |
|
224 | 228 | } |
|
225 | 229 | |
|
226 | 230 | void rmapPluginUI::appendToLogFile(const QString & text) |
|
227 | 231 | { |
|
228 | 232 | if(this->logFileEn && this->logFile->isOpen()) |
|
229 | 233 | { |
|
230 | 234 | *(this->logFileStrm) << text << endl; |
|
231 | 235 | } |
|
232 | 236 | } |
|
233 | 237 | |
|
234 | 238 | void rmapPluginUI::closeEvent(QCloseEvent *event) |
|
235 | 239 | { |
|
236 | 240 | if(this->logFile->isOpen()) |
|
237 | 241 | { |
|
238 | 242 | this->logFileStrm->flush(); |
|
239 | 243 | this->logFile->waitForBytesWritten(3000); |
|
240 | 244 | this->logFile->close(); |
|
241 | 245 | } |
|
242 | 246 | event->accept(); |
|
243 | 247 | } |
|
244 | 248 | |
|
245 | 249 | RMAP_command_codes rmapPluginUI::getCommandCode() |
|
246 | 250 | { |
|
247 | 251 | RMAP_command_codes commandCode = invalid0; |
|
248 | 252 | if (RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_rep; |
|
249 | 253 | if (RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_noRep; |
|
250 | 254 | if (!RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_Rep; |
|
251 | 255 | if (!RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_noRep; |
|
252 | 256 | emit commandCodeHasChanged(commandCode); |
|
253 | 257 | return commandCode; |
|
254 | 258 | } |
|
255 | 259 | |
|
256 | 260 | // SLOT |
|
257 | 261 | |
|
258 | 262 | void rmapPluginUI::selectionBetweenGresbAndStarDundee() //SLOT |
|
259 | 263 | { |
|
260 | 264 | if (selectGRESB_BUTTON->isChecked()) |
|
261 | 265 | { |
|
262 | 266 | gresb_GROUPBOX->setVisible(true); |
|
263 | 267 | stardundee_GROUPBOX->setVisible(false); |
|
264 | 268 | rmapOpenCommunicationButton->setEnabled(true); |
|
265 | 269 | emit bridgeHasChanged(selectedBridgeIsGRESB); |
|
266 | 270 | } |
|
267 | 271 | if (selectStarDundee_BUTTON->isChecked()) |
|
268 | 272 | { |
|
269 | 273 | stardundee_GROUPBOX->setVisible(true); |
|
270 | 274 | gresb_GROUPBOX->setVisible(false); |
|
271 | 275 | rmapOpenCommunicationButton->setEnabled(true); |
|
272 | 276 | emit bridgeHasChanged(selectedBridgeIsStarDundee); |
|
273 | 277 | } |
|
274 | 278 | } |
|
275 | 279 | |
|
276 | 280 | void rmapPluginUI::isOpen(bool flag) |
|
277 | 281 | { |
|
278 | 282 | if (flag == true) |
|
279 | 283 | { |
|
280 | 284 | selection_GROUPBOX->setEnabled(false); |
|
281 | 285 | this->rmapOpenCommunicationButton->setEnabled(false); |
|
282 | 286 | this->rmapCloseCommunicationButton->setEnabled(true); |
|
283 | 287 | } |
|
284 | 288 | if (flag == false) |
|
285 | 289 | { |
|
286 | 290 | selection_GROUPBOX->setEnabled(true); |
|
287 | 291 | this->rmapOpenCommunicationButton->setEnabled(true); |
|
288 | 292 | this->rmapCloseCommunicationButton->setEnabled(false); |
|
289 | 293 | } |
|
290 | 294 | } |
|
291 | 295 | |
|
292 | 296 |
@@ -1,160 +1,164 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPPMON Software |
|
3 | 3 | -- Copyright (C) 20011, Laboratory of Plasma Physics - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Paul Leroy |
|
20 | 20 | -- Mail : paul.leroy@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef RMAPPLUGINUI_H |
|
23 | 23 | #define RMAPPLUGINUI_H |
|
24 | 24 | |
|
25 | 25 | #include <QWidget> |
|
26 | 26 | #include <QPushButton> |
|
27 | 27 | #include <QLabel> |
|
28 | 28 | #include <QSlider> |
|
29 | 29 | #include <QSpinBox> |
|
30 | 30 | #include <QGridLayout> |
|
31 | 31 | #include <QCheckBox> |
|
32 | 32 | #include <QFile> |
|
33 | 33 | #include <QTextStream> |
|
34 | 34 | #include <QFileDialog> |
|
35 | 35 | #include <QDir> |
|
36 | 36 | #include <QDialog> |
|
37 | 37 | #include <QCloseEvent> |
|
38 | 38 | #include <QTabWidget> |
|
39 | 39 | #include "qipdialogbox.h" |
|
40 | 40 | #include <rmapoperations.h> |
|
41 | 41 | #include <gresbstatusenquiry.h> |
|
42 | 42 | #include <QTextEdit> |
|
43 | 43 | #include <stardundee.h> |
|
44 | 44 | #include <gresb.h> |
|
45 | 45 | #include <QRadioButton> |
|
46 | 46 | #include <QGroupBox> |
|
47 | 47 | #include "wfdisplay.h" |
|
48 | 48 | #include "tmstatistics.h" |
|
49 | #include "tmechobridge.h" | |
|
49 | 50 | |
|
50 | 51 | enum selectedBridge{ |
|
51 | 52 | selectedBridgeIsUnknown, |
|
52 | 53 | selectedBridgeIsGRESB, |
|
53 | 54 | selectedBridgeIsStarDundee |
|
54 | 55 | }; |
|
55 | 56 | |
|
56 | 57 | class rmapPluginUI : public QWidget |
|
57 | 58 | { |
|
58 | 59 | Q_OBJECT |
|
59 | 60 | |
|
60 | 61 | public: |
|
61 | 62 | explicit rmapPluginUI(QWidget *parent = 0); |
|
62 | 63 | ~rmapPluginUI(); |
|
63 | 64 | |
|
64 | 65 | QPushButton* rmapOpenCommunicationButton; |
|
65 | 66 | QPushButton* rmapCloseCommunicationButton; |
|
66 | 67 | QPushButton* logFileChooseButton; |
|
67 | 68 | QPushButton* gresbStatusQueryRetryButton; |
|
68 | 69 | QPushButton* gresbStatusQueryAbortButton; |
|
69 | 70 | QPushButton* sendCCSDSCommandButton; |
|
70 | 71 | QPushButton* send_TC_LFR_UPDATE_TIME_Button; |
|
71 | 72 | QPushButton* reset_TC_LFR_UPDATE_TIME_Button; |
|
72 | 73 | QPushButton* clearConsoleButton; |
|
73 | 74 | |
|
74 | 75 | QRadioButton* selectGRESB_BUTTON; |
|
75 | 76 | QRadioButton* selectStarDundee_BUTTON; |
|
76 | 77 | |
|
77 | 78 | QGroupBox *selection_GROUPBOX; |
|
78 | 79 | |
|
79 | 80 | QSpinBox* gresbVirtualLinkSpinBox; |
|
80 | 81 | QSpinBox* spwLinkSpinBox; |
|
81 | 82 | QSpinBox* rmapSourceLogicalAddressSpinBox; |
|
82 | 83 | QSpinBox* rmapTargetLogicalAddressSpinBox; |
|
83 | 84 | QSpinBox* CCSDSTargetLogicalAddressSpinBox; |
|
84 | 85 | |
|
85 | 86 | QCheckBox *logEnableCheckBox; |
|
86 | 87 | QCheckBox *RMAP_write_verify; |
|
87 | 88 | QCheckBox *RMAP_write_reply; |
|
88 | 89 | |
|
89 | 90 | QLabel* rmapSendStateLabel; |
|
90 | 91 | QLabel* rmapReceiveStateLabel; |
|
91 | 92 | QLabel* gresbStatusQueryLabel; |
|
92 | 93 | QLabel* gresbStatusQueryDialogLabel; |
|
93 | 94 | QLabel* sendCCSDSCommandLabel; |
|
94 | 95 | QLabel* nbPacketInStore; |
|
95 | 96 | |
|
96 | 97 | QDialog* gresbStatusQueryDialog; |
|
97 | 98 | |
|
98 | 99 | QTextEdit* console; |
|
99 | 100 | |
|
100 | 101 | WFDisplay* wfDisplay; |
|
101 | 102 | |
|
102 | 103 | TMStatistics* tmStatistics; |
|
103 | 104 | |
|
104 | 105 | // SPACEWIRE BRIDGES |
|
105 | 106 | StarDundee *starDundee; |
|
106 | 107 | gresb *gresbBridge; |
|
107 | 108 | |
|
109 | // TM Echo Bridge | |
|
110 | TMEchoBridge * tmEchoBridge; | |
|
111 | ||
|
108 | 112 | bool islogfileenable(); |
|
109 | 113 | void appendToLogFile(const QString & text); |
|
110 | 114 | void closeEvent(QCloseEvent *event); |
|
111 | 115 | |
|
112 | 116 | public slots: |
|
113 | 117 | void chooseLogFile(); |
|
114 | 118 | void logFileEnDisable(int state); |
|
115 | 119 | RMAP_command_codes getCommandCode(); |
|
116 | 120 | |
|
117 | 121 | private slots: |
|
118 | 122 | void selectionBetweenGresbAndStarDundee(); |
|
119 | 123 | void isOpen(bool flag); |
|
120 | 124 | |
|
121 | 125 | signals: |
|
122 | 126 | void connectPortsig(QString PortName,int baudrate); |
|
123 | 127 | void setLogFileName(QString FileName); |
|
124 | 128 | void commandCodeHasChanged(RMAP_command_codes commandCode); |
|
125 | 129 | void bridgeHasChanged(selectedBridge bridge); |
|
126 | 130 | void targetHasChanged(unsigned char target); |
|
127 | 131 | void sourceHasChanged(unsigned char source); |
|
128 | 132 | |
|
129 | 133 | private: |
|
130 | 134 | QLabel *gresbBridgeIPLabel; |
|
131 | 135 | QLabel *gresbVirtualLinkLabel; |
|
132 | 136 | QLabel *spwLinkLabel; |
|
133 | 137 | QLabel *rmapSourceLogicalAddressLabel; |
|
134 | 138 | QLabel *rmapTargetLogicalAddressLabel; |
|
135 | 139 | QLabel *logFileName; |
|
136 | 140 | |
|
137 | 141 | QGridLayout *bridgeSelection_LAYOUT; |
|
138 | 142 | QGridLayout *connectionLayout; |
|
139 | 143 | QGridLayout *gresbStatusQueryDialogLayout; |
|
140 | 144 | QGridLayout *generalParameters_LAYOUT; |
|
141 | 145 | QVBoxLayout *selectionLayout; |
|
142 | 146 | QVBoxLayout *mainLayout; |
|
143 | 147 | QVBoxLayout *ccsdsLayout; |
|
144 | 148 | QVBoxLayout *consoleLayout; |
|
145 | 149 | |
|
146 | 150 | QTabWidget *spwTabWidget; |
|
147 | 151 | |
|
148 | 152 | QWidget* bridgeWidget; |
|
149 | 153 | |
|
150 | 154 | QGroupBox *gresb_GROUPBOX; |
|
151 | 155 | QGroupBox *stardundee_GROUPBOX; |
|
152 | 156 | QGroupBox *generalParameters_GROUPBOX; |
|
153 | 157 | |
|
154 | 158 | QFile *logFile; |
|
155 | 159 | QTextStream *logFileStrm; |
|
156 | 160 | bool logFileEn; |
|
157 | 161 | |
|
158 | 162 | }; |
|
159 | 163 | |
|
160 | 164 | #endif // RMAPPLUGINUI_H |
@@ -1,517 +1,519 | |||
|
1 | 1 | #include "tmstatistics.h" |
|
2 | 2 | #include <QtGui> |
|
3 | 3 | #include <QFontInfo> |
|
4 | 4 | |
|
5 | 5 | TMStatistics::TMStatistics(QWidget *parent) : |
|
6 | 6 | QWidget(parent) |
|
7 | 7 | { |
|
8 | 8 | // Create Fonts |
|
9 | 9 | QFont font; |
|
10 | 10 | font = QFont(this->fontInfo().family(), STATISTICS_FONT_SIZE, QFont::Light); |
|
11 | 11 | |
|
12 | 12 | label_UNKNOWN = new QLabel("UNKNOWN"); |
|
13 | 13 | label_UNKNOWN_nb = new QLabel("-"); |
|
14 | 14 | |
|
15 | 15 | mainLayout = new QGridLayout(); |
|
16 | 16 | layout_stat = new QGridLayout(); // TM stastictics |
|
17 | 17 | layout_NORM = new QGridLayout(); // TM_LFR_SCIENCE_NORMAL_ |
|
18 | 18 | layout_BURST = new QGridLayout(); // TM_LFR_SCIENCE_BURST_ |
|
19 | 19 | layout_SBM1 = new QGridLayout(); // TM_LFR_SCIENCE_SBM1_ |
|
20 | 20 | layout_SBM2 = new QGridLayout(); // TM_LFR_SCIENCE_SBM2_ |
|
21 | 21 | layout_last = new QGridLayout(); // last TM description |
|
22 | 22 | |
|
23 | 23 | //*************** |
|
24 | 24 | // TM_LFR_TC_EXE_ |
|
25 | 25 | label_SUCC = new QLabel("SUCCESS"); |
|
26 | 26 | label_INCO = new QLabel("INCONSISTENT"); |
|
27 | 27 | label_NOTE = new QLabel("NOT_EXECUTABLE"); |
|
28 | 28 | label_NOTI = new QLabel("NOT_IMPLEMENTED"); |
|
29 | 29 | label_ERRO = new QLabel("ERROR"); |
|
30 | 30 | label_CORR = new QLabel("CORRUPTED"); |
|
31 | 31 | label_HK = new QLabel("TM_LFR_HK"); |
|
32 | 32 | // |
|
33 | 33 | label_SUCC_nb = new QLabel("-"); |
|
34 | 34 | label_INCO_nb = new QLabel("-"); |
|
35 | 35 | label_NOTE_nb = new QLabel("-"); |
|
36 | 36 | label_NOTI_nb = new QLabel("-"); |
|
37 | 37 | label_ERRO_nb = new QLabel("-"); |
|
38 | 38 | label_CORR_nb = new QLabel("-"); |
|
39 | 39 | label_HK_nb = new QLabel("-"); |
|
40 | 40 | |
|
41 | 41 | //*********************** |
|
42 | 42 | // TM_LFR_SCIENCE_NORMAL_ |
|
43 | 43 | label_NORM_SWF_F0 = new QLabel("SWF_F0"); |
|
44 | 44 | label_NORM_SWF_F1 = new QLabel("SWF_F1"); |
|
45 | 45 | label_NORM_SWF_F2 = new QLabel("SWF_F2"); |
|
46 | 46 | label_NORM_CWF_F3 = new QLabel("CWF_F3"); |
|
47 | 47 | label_NORM_ASM_F0 = new QLabel("ASM_F0"); |
|
48 | 48 | label_NORM_ASM_F1 = new QLabel("ASM_F1"); |
|
49 | 49 | label_NORM_ASM_F2 = new QLabel("ASM_F2"); |
|
50 | 50 | label_NORM_BP1_F0 = new QLabel("BP1_F0"); |
|
51 | 51 | label_NORM_BP1_F1 = new QLabel("BP1_F1"); |
|
52 | 52 | label_NORM_BP1_F2 = new QLabel("BP1_F2"); |
|
53 | 53 | label_NORM_BP2_F0 = new QLabel("BP2_F0"); |
|
54 | 54 | label_NORM_BP2_F1 = new QLabel("BP2_F1"); |
|
55 | 55 | label_NORM_BP2_F2 = new QLabel("BP2_F2"); |
|
56 | 56 | // |
|
57 | 57 | label_NORM_SWF_F0_nb = new QLabel("-"); |
|
58 | 58 | label_NORM_SWF_F1_nb = new QLabel("-"); |
|
59 | 59 | label_NORM_SWF_F2_nb = new QLabel("-"); |
|
60 | 60 | label_NORM_CWF_F3_nb = new QLabel("-"); |
|
61 | 61 | label_NORM_ASM_F0_nb = new QLabel("-"); |
|
62 | 62 | label_NORM_ASM_F1_nb = new QLabel("-"); |
|
63 | 63 | label_NORM_ASM_F2_nb = new QLabel("-"); |
|
64 | 64 | label_NORM_BP1_F0_nb = new QLabel("-"); |
|
65 | 65 | label_NORM_BP1_F1_nb = new QLabel("-"); |
|
66 | 66 | label_NORM_BP1_F2_nb = new QLabel("-"); |
|
67 | 67 | label_NORM_BP2_F0_nb = new QLabel("-"); |
|
68 | 68 | label_NORM_BP2_F1_nb = new QLabel("-"); |
|
69 | 69 | label_NORM_BP2_F2_nb = new QLabel("-"); |
|
70 | 70 | |
|
71 | 71 | //********************** |
|
72 | 72 | // TM_LFR_SCIENCE_BURST_ |
|
73 | 73 | label_BURST_CWF_F2 = new QLabel("CWF_F3"); |
|
74 | 74 | label_BURST_BP1_F0 = new QLabel("BP1_F0"); |
|
75 | 75 | label_BURST_BP2_F0 = new QLabel("BP2_F0"); |
|
76 | 76 | label_BURST_BP1_F1 = new QLabel("BP1_F1"); |
|
77 | 77 | label_BURST_BP2_F1 = new QLabel("BP2_F1"); |
|
78 | 78 | // |
|
79 | 79 | label_BURST_CWF_F2_nb = new QLabel("-"); |
|
80 | 80 | label_BURST_BP1_F0_nb = new QLabel("-"); |
|
81 | 81 | label_BURST_BP2_F0_nb = new QLabel("-"); |
|
82 | 82 | label_BURST_BP1_F1_nb = new QLabel("-"); |
|
83 | 83 | label_BURST_BP2_F1_nb = new QLabel("-"); |
|
84 | 84 | |
|
85 | 85 | //********************* |
|
86 | 86 | // TM_LFR_SCIENCE_SBM1_ |
|
87 | 87 | label_SBM1_CWF_F1 = new QLabel("CWF_F1"); |
|
88 | 88 | label_SBM1_BP1_F0 = new QLabel("BP1_F0"); |
|
89 | 89 | label_SBM1_BP2_F0 = new QLabel("BP2_F0"); |
|
90 | 90 | // |
|
91 | 91 | label_SBM1_CWF_F1_nb = new QLabel("-"); |
|
92 | 92 | label_SBM1_BP1_F0_nb = new QLabel("-"); |
|
93 | 93 | label_SBM1_BP2_F0_nb = new QLabel("-"); |
|
94 | 94 | |
|
95 | 95 | //********************* |
|
96 | 96 | // TM_LFR_SCIENCE_SBM2_ |
|
97 | 97 | label_SBM2_CWF_F2 = new QLabel("CWF_F2"); |
|
98 | 98 | label_SBM2_BP1_F0 = new QLabel("BP1_F0"); |
|
99 | 99 | label_SBM2_BP2_F0 = new QLabel("BP2_F0"); |
|
100 | 100 | label_SBM2_BP1_F1 = new QLabel("BP1_F1"); |
|
101 | 101 | label_SBM2_BP2_F1 = new QLabel("BP2_F1"); |
|
102 | 102 | // |
|
103 | 103 | label_SBM2_CWF_F2_nb = new QLabel("-"); |
|
104 | 104 | label_SBM2_BP1_F0_nb = new QLabel("-"); |
|
105 | 105 | label_SBM2_BP2_F0_nb = new QLabel("-"); |
|
106 | 106 | label_SBM2_BP1_F1_nb = new QLabel("-"); |
|
107 | 107 | label_SBM2_BP2_F1_nb = new QLabel("-"); |
|
108 | 108 | |
|
109 | 109 | //******** |
|
110 | 110 | // LAST TM |
|
111 | 111 | label_PID = new QLabel("PID"); |
|
112 | 112 | label_CAT = new QLabel("CAT"); |
|
113 | 113 | label_TYP = new QLabel("Type"); |
|
114 | 114 | label_SUB = new QLabel("Subtype"); |
|
115 | 115 | label_SID = new QLabel("SID"); |
|
116 | 116 | label_SIZ = new QLabel("Length"); |
|
117 | 117 | label_coarse_time = new QLabel("Coarse time: "); |
|
118 | 118 | label_fine_time = new QLabel("Fine time: "); |
|
119 | 119 | // |
|
120 | 120 | label_PID_is = new QLabel("-"); |
|
121 | 121 | label_CAT_is = new QLabel("-"); |
|
122 | 122 | label_TYP_is = new QLabel("-"); |
|
123 | 123 | label_SUB_is = new QLabel("-"); |
|
124 | 124 | label_SID_is = new QLabel("-"); |
|
125 | 125 | label_SIZ_is = new QLabel("-"); |
|
126 | 126 | label_coarse_time_val = new QLabel("-"); |
|
127 | 127 | label_fine_time_val = new QLabel("-"); |
|
128 | 128 | |
|
129 | 129 | // QPushButton |
|
130 | 130 | button_reset_stat = new QPushButton("reset stat"); |
|
131 | 131 | |
|
132 | 132 | //********** |
|
133 | 133 | // QGroupBox |
|
134 | 134 | this->setStyleSheet("QGroupBox {border: 1px solid black; }"); |
|
135 | 135 | |
|
136 | 136 | groupbox_stat = new QGroupBox("TM_LFR_TC_EXE_"); |
|
137 | 137 | groupbox_NORM = new QGroupBox("TM_LFR_SCIENCE_NORMAL_"); |
|
138 | 138 | groupbox_BURST = new QGroupBox("TM_LFR_SCIENCE_BURST_"); |
|
139 | 139 | groupbox_SBM1 = new QGroupBox("TM_LFR_SCIENCE_SBM1_"); |
|
140 | 140 | groupbox_SBM2 = new QGroupBox("TM_LFR_SCIENCE_SBM2_"); |
|
141 | 141 | groupbox_last = new QGroupBox("Last TM received"); |
|
142 | 142 | |
|
143 | 143 | groupbox_stat->setFont(font); |
|
144 | 144 | groupbox_NORM->setFont(font); |
|
145 | 145 | groupbox_BURST->setFont(font); |
|
146 | 146 | groupbox_SBM1->setFont(font); |
|
147 | 147 | groupbox_SBM2->setFont(font); |
|
148 | 148 | groupbox_last->setFont(font); |
|
149 | 149 | |
|
150 | 150 | initConstants(); |
|
151 | 151 | |
|
152 | 152 | buildMonitor_NORM(); |
|
153 | 153 | buildMonitor_BURST(); |
|
154 | 154 | buildMonitor_SBM1(); |
|
155 | 155 | buildMonitor_SBM2(); |
|
156 | 156 | buildMonitor(); |
|
157 | 157 | |
|
158 | 158 | connect(this->button_reset_stat, SIGNAL(clicked()), this, SLOT(resetStatistics())); |
|
159 | 159 | |
|
160 | 160 | } |
|
161 | 161 | |
|
162 | 162 | void TMStatistics::initConstants() |
|
163 | 163 | { |
|
164 | 164 | UNKNOWN_nb = 0; |
|
165 | 165 | |
|
166 | 166 | // TM_LFR_SCIENCE_NORMAL_ |
|
167 | 167 | SUCC_nb = 0; |
|
168 | 168 | INCO_nb = 0; |
|
169 | 169 | NOTE_nb = 0; |
|
170 | 170 | NOTI_nb = 0; |
|
171 | 171 | ERRO_nb = 0; |
|
172 | 172 | CORR_nb = 0; |
|
173 | 173 | HK_nb = 0; |
|
174 | 174 | |
|
175 | 175 | // TM_LFR_SCIENCE_NORMAL_ |
|
176 | 176 | NORM_SWF_F0_nb = 0; |
|
177 | 177 | NORM_SWF_F1_nb = 0; |
|
178 | 178 | NORM_SWF_F2_nb = 0; |
|
179 | 179 | NORM_CWF_F3_nb = 0; |
|
180 | 180 | NORM_ASM_F0_nb = 0; |
|
181 | 181 | NORM_ASM_F1_nb = 0; |
|
182 | 182 | NORM_ASM_F2_nb = 0; |
|
183 | 183 | NORM_BP1_F0_nb = 0; |
|
184 | 184 | NORM_BP1_F1_nb = 0; |
|
185 | 185 | NORM_BP1_F2_nb = 0; |
|
186 | 186 | NORM_BP2_F0_nb = 0; |
|
187 | 187 | NORM_BP2_F1_nb = 0; |
|
188 | 188 | NORM_BP2_F2_nb = 0; |
|
189 | 189 | |
|
190 | 190 | BURST_CWF_F2_nb = 0; |
|
191 | 191 | BURST_BP1_F0_nb = 0; |
|
192 | 192 | BURST_BP2_F0_nb = 0; |
|
193 | 193 | BURST_BP1_F1_nb = 0; |
|
194 | 194 | BURST_BP2_F1_nb = 0; |
|
195 | 195 | SBM1_CWF_F2_nb = 0; |
|
196 | 196 | SBM1_BP1_F0_nb = 0; |
|
197 | 197 | SBM1_BP2_F0_nb = 0; |
|
198 | 198 | SBM2_CWF_F2_nb = 0; |
|
199 | 199 | SBM2_BP1_F0_nb = 0; |
|
200 | 200 | SBM2_BP2_F0_nb = 0; |
|
201 | 201 | SBM2_BP1_F1_nb = 0; |
|
202 | 202 | SBM2_BP2_F1_nb = 0; |
|
203 | 203 | } |
|
204 | 204 | |
|
205 | 205 | void TMStatistics::buildMonitor_NORM() |
|
206 | 206 | { |
|
207 | 207 | layout_NORM->addWidget(label_NORM_SWF_F0, 0, 0, 1, 1); |
|
208 | 208 | layout_NORM->addWidget(label_NORM_SWF_F1, 1, 0, 1, 1); |
|
209 | 209 | layout_NORM->addWidget(label_NORM_SWF_F2, 2, 0, 1, 1); |
|
210 | 210 | layout_NORM->addWidget(label_NORM_CWF_F3, 3, 0, 1, 1); |
|
211 | 211 | // |
|
212 | 212 | layout_NORM->addWidget(label_NORM_SWF_F0_nb, 0, 1, 1, 1); |
|
213 | 213 | layout_NORM->addWidget(label_NORM_SWF_F1_nb, 1, 1, 1, 1); |
|
214 | 214 | layout_NORM->addWidget(label_NORM_SWF_F2_nb, 2, 1, 1, 1); |
|
215 | 215 | layout_NORM->addWidget(label_NORM_CWF_F3_nb, 3, 1, 1, 1); |
|
216 | 216 | // |
|
217 | 217 | layout_NORM->addWidget(label_NORM_ASM_F0, 4, 0, 1, 1); |
|
218 | 218 | layout_NORM->addWidget(label_NORM_ASM_F1, 5, 0, 1, 1); |
|
219 | 219 | layout_NORM->addWidget(label_NORM_ASM_F2, 6, 0, 1, 1); |
|
220 | 220 | // |
|
221 | 221 | layout_NORM->addWidget(label_NORM_ASM_F0_nb, 4, 1, 1, 1); |
|
222 | 222 | layout_NORM->addWidget(label_NORM_ASM_F1_nb, 5, 1, 1, 1); |
|
223 | 223 | layout_NORM->addWidget(label_NORM_ASM_F2_nb, 6, 1, 1, 1); |
|
224 | 224 | // |
|
225 | 225 | layout_NORM->addWidget(label_NORM_BP1_F0, 0, 2, 1, 1); |
|
226 | 226 | layout_NORM->addWidget(label_NORM_BP1_F1, 1, 2, 1, 1); |
|
227 | 227 | layout_NORM->addWidget(label_NORM_BP1_F2, 2, 2, 1, 1); |
|
228 | 228 | layout_NORM->addWidget(label_NORM_BP2_F0, 3, 2, 1, 1); |
|
229 | 229 | layout_NORM->addWidget(label_NORM_BP2_F1, 4, 2, 1, 1); |
|
230 | 230 | layout_NORM->addWidget(label_NORM_BP2_F2, 5, 2, 1, 1); |
|
231 | 231 | // |
|
232 | 232 | layout_NORM->addWidget(label_NORM_BP1_F0_nb, 0, 3, 1, 1); |
|
233 | 233 | layout_NORM->addWidget(label_NORM_BP1_F1_nb, 1, 3, 1, 1); |
|
234 | 234 | layout_NORM->addWidget(label_NORM_BP1_F2_nb, 2, 3, 1, 1); |
|
235 | 235 | layout_NORM->addWidget(label_NORM_BP2_F0_nb, 3, 3, 1, 1); |
|
236 | 236 | layout_NORM->addWidget(label_NORM_BP2_F1_nb, 4, 3, 1, 1); |
|
237 | 237 | layout_NORM->addWidget(label_NORM_BP2_F2_nb, 5, 3, 1, 1); |
|
238 | 238 | } |
|
239 | 239 | |
|
240 | 240 | void TMStatistics::buildMonitor_BURST() |
|
241 | 241 | { |
|
242 | 242 | layout_BURST->addWidget(label_BURST_CWF_F2, 0, 0, 1, 1); |
|
243 | 243 | layout_BURST->addWidget(label_BURST_BP1_F0, 1, 0, 1, 1); |
|
244 | 244 | layout_BURST->addWidget(label_BURST_BP2_F0, 2, 0, 1, 1); |
|
245 | 245 | layout_BURST->addWidget(label_BURST_BP1_F1, 3, 0, 1, 1); |
|
246 | 246 | layout_BURST->addWidget(label_BURST_BP2_F1, 4, 0, 1, 1); |
|
247 | 247 | // |
|
248 | 248 | layout_BURST->addWidget(label_BURST_CWF_F2_nb, 0, 1, 1, 1); |
|
249 | 249 | layout_BURST->addWidget(label_BURST_BP1_F0_nb, 1, 1, 1, 1); |
|
250 | 250 | layout_BURST->addWidget(label_BURST_BP2_F0_nb, 2, 1, 1, 1); |
|
251 | 251 | layout_BURST->addWidget(label_BURST_BP1_F1_nb, 3, 1, 1, 1); |
|
252 | 252 | layout_BURST->addWidget(label_BURST_BP2_F1_nb, 4, 1, 1, 1); |
|
253 | 253 | // |
|
254 | 254 | layout_BURST->setRowStretch(5, 1); |
|
255 | 255 | layout_BURST->setColumnStretch(2,1); |
|
256 | 256 | } |
|
257 | 257 | |
|
258 | 258 | void TMStatistics::buildMonitor_SBM1() |
|
259 | 259 | { |
|
260 | 260 | layout_SBM1->addWidget(label_SBM1_CWF_F1, 0, 0, 1, 1); |
|
261 | 261 | layout_SBM1->addWidget(label_SBM1_BP1_F0, 1, 0, 1, 1); |
|
262 | 262 | layout_SBM1->addWidget(label_SBM1_BP2_F0, 2, 0, 1, 1); |
|
263 | 263 | // |
|
264 | 264 | layout_SBM1->addWidget(label_SBM1_CWF_F1_nb, 0, 1, 1, 1); |
|
265 | 265 | layout_SBM1->addWidget(label_SBM1_BP1_F0_nb, 1, 1, 1, 1); |
|
266 | 266 | layout_SBM1->addWidget(label_SBM1_BP2_F0_nb, 2, 1, 1, 1); |
|
267 | 267 | // |
|
268 | 268 | layout_SBM1->setRowStretch(3, 1); |
|
269 | 269 | layout_SBM1->setColumnStretch(2,1); |
|
270 | 270 | } |
|
271 | 271 | |
|
272 | 272 | void TMStatistics::buildMonitor_SBM2() |
|
273 | 273 | { |
|
274 | 274 | layout_SBM2->addWidget(label_SBM2_CWF_F2, 0, 0, 1, 1); |
|
275 | 275 | layout_SBM2->addWidget(label_SBM2_BP1_F0, 1, 0, 1, 1); |
|
276 | 276 | layout_SBM2->addWidget(label_SBM2_BP2_F0, 2, 0, 1, 1); |
|
277 | 277 | layout_SBM2->addWidget(label_SBM2_BP1_F1, 3, 0, 1, 1); |
|
278 | 278 | layout_SBM2->addWidget(label_SBM2_BP2_F1, 4, 0, 1, 1); |
|
279 | 279 | // |
|
280 | 280 | layout_SBM2->addWidget(label_SBM2_CWF_F2_nb, 0, 1, 1, 1); |
|
281 | 281 | layout_SBM2->addWidget(label_SBM2_BP1_F0_nb, 1, 1, 1, 1); |
|
282 | 282 | layout_SBM2->addWidget(label_SBM2_BP2_F0_nb, 2, 1, 1, 1); |
|
283 | 283 | layout_SBM2->addWidget(label_SBM2_BP1_F1_nb, 3, 1, 1, 1); |
|
284 | 284 | layout_SBM2->addWidget(label_SBM2_BP2_F1_nb, 4, 1, 1, 1); |
|
285 | 285 | // |
|
286 | 286 | layout_SBM2->setRowStretch(5, 1); |
|
287 | 287 | layout_SBM2->setColumnStretch(2,1); |
|
288 | 288 | } |
|
289 | 289 | |
|
290 | 290 | void TMStatistics::buildMonitor() |
|
291 | 291 | { |
|
292 | 292 | //*************** |
|
293 | 293 | // TM_LFR_TC_EXE_ |
|
294 | 294 | layout_stat->addWidget(label_SUCC, 0, 0, 1, 1); |
|
295 | 295 | layout_stat->addWidget(label_INCO, 1, 0, 1, 1); |
|
296 | 296 | layout_stat->addWidget(label_NOTE, 2, 0, 1, 1); |
|
297 | 297 | layout_stat->addWidget(label_NOTI, 3, 0, 1, 1); |
|
298 | 298 | layout_stat->addWidget(label_ERRO, 4, 0, 1, 1); |
|
299 | 299 | layout_stat->addWidget(label_CORR, 5, 0, 1, 1); |
|
300 | 300 | layout_stat->addWidget(label_HK, 6, 0, 1, 1); |
|
301 | 301 | // |
|
302 | 302 | layout_stat->addWidget(label_SUCC_nb, 0, 1, 1, 1); |
|
303 | 303 | layout_stat->addWidget(label_INCO_nb, 1, 1, 1, 1); |
|
304 | 304 | layout_stat->addWidget(label_NOTE_nb, 2, 1, 1, 1); |
|
305 | 305 | layout_stat->addWidget(label_NOTI_nb, 3, 1, 1, 1); |
|
306 | 306 | layout_stat->addWidget(label_ERRO_nb, 4, 1, 1, 1); |
|
307 | 307 | layout_stat->addWidget(label_CORR_nb, 5, 1, 1, 1); |
|
308 | 308 | layout_stat->addWidget(label_HK_nb, 6, 1, 1, 1); |
|
309 | 309 | |
|
310 | 310 | //******** |
|
311 | 311 | // LAST TM |
|
312 | 312 | layout_last->addWidget(label_PID, 0, 0, 1, 1); |
|
313 | 313 | layout_last->addWidget(label_CAT, 0, 1, 1, 1); |
|
314 | 314 | layout_last->addWidget(label_TYP, 0, 2, 1, 1); |
|
315 | 315 | layout_last->addWidget(label_SUB, 0, 3, 1, 1); |
|
316 | 316 | layout_last->addWidget(label_SID, 0, 4, 1, 1); |
|
317 | 317 | layout_last->addWidget(label_SIZ, 0, 5, 1, 1); |
|
318 | 318 | // |
|
319 | 319 | layout_last->addWidget(label_PID_is, 1, 0, 1, 1); |
|
320 | 320 | layout_last->addWidget(label_CAT_is, 1, 1, 1, 1); |
|
321 | 321 | layout_last->addWidget(label_TYP_is, 1, 2, 1, 1); |
|
322 | 322 | layout_last->addWidget(label_SUB_is, 1, 3, 1, 1); |
|
323 | 323 | layout_last->addWidget(label_SID_is, 1, 4, 1, 1); |
|
324 | 324 | layout_last->addWidget(label_SIZ_is, 1, 5, 1, 1); |
|
325 | 325 | // |
|
326 | 326 | layout_last->addWidget(label_coarse_time, 2, 0, 1, 1); |
|
327 | 327 | layout_last->addWidget(label_coarse_time_val, 2, 1, 1, 1); |
|
328 | 328 | layout_last->addWidget(label_fine_time, 2, 2, 1, 1); |
|
329 | 329 | layout_last->addWidget(label_fine_time_val, 2, 3, 1, 1); |
|
330 | 330 | // |
|
331 | 331 | layout_last->addWidget(label_UNKNOWN, 3, 0, 1, 1); |
|
332 | 332 | layout_last->addWidget(label_UNKNOWN_nb, 3, 1, 1, 1); |
|
333 | 333 | |
|
334 | 334 | //*********** |
|
335 | 335 | // groupboxes |
|
336 | 336 | groupbox_stat->setLayout(layout_stat); |
|
337 | 337 | groupbox_NORM->setLayout(layout_NORM); |
|
338 | 338 | groupbox_BURST->setLayout(layout_BURST); |
|
339 | 339 | groupbox_SBM1->setLayout(layout_SBM1); |
|
340 | 340 | groupbox_SBM2->setLayout(layout_SBM2); |
|
341 | 341 | groupbox_last->setLayout(layout_last); |
|
342 | 342 | // |
|
343 | 343 | mainLayout->addWidget(groupbox_stat, 0, 0, 1, 1); |
|
344 | 344 | mainLayout->addWidget(groupbox_NORM, 1, 0, 1, 1); |
|
345 | 345 | mainLayout->addWidget(groupbox_last, 2, 0, 1, 2); |
|
346 | 346 | mainLayout->addWidget(groupbox_SBM1, 0, 1, 1, 1); |
|
347 | 347 | mainLayout->addWidget(groupbox_SBM2, 0, 2, 1, 1); |
|
348 | 348 | mainLayout->addWidget(groupbox_BURST, 1, 1, 1, 1); |
|
349 | 349 | mainLayout->addWidget(button_reset_stat, 3, 0, 1, 2); |
|
350 | 350 | mainLayout->setColumnStretch(3, 1); |
|
351 | 351 | mainLayout->setRowStretch(4, 1); |
|
352 | 352 | // |
|
353 | 353 | this->setLayout(mainLayout); |
|
354 | 354 | } |
|
355 | 355 | |
|
356 | 356 | void TMStatistics::resetStatistics() |
|
357 | 357 | { |
|
358 | 358 | initConstants(); |
|
359 | 359 | // |
|
360 | 360 | label_UNKNOWN_nb->setText("-"); |
|
361 | 361 | label_SUCC_nb->setText("-"); |
|
362 | 362 | label_INCO_nb->setText("-"); |
|
363 | 363 | label_NOTE_nb->setText("-"); |
|
364 | 364 | label_NOTI_nb->setText("-"); |
|
365 | 365 | label_ERRO_nb->setText("-"); |
|
366 | 366 | label_CORR_nb->setText("-"); |
|
367 | 367 | label_HK_nb->setText("-"); |
|
368 | 368 | // |
|
369 | 369 | label_NORM_SWF_F0_nb->setText("-"); |
|
370 | 370 | label_NORM_SWF_F1_nb->setText("-"); |
|
371 | 371 | label_NORM_SWF_F2_nb->setText("-"); |
|
372 | 372 | label_NORM_CWF_F3_nb->setText("-"); |
|
373 | 373 | // |
|
374 | 374 | label_PID_is->setText("-"); |
|
375 | 375 | label_CAT_is->setText("-"); |
|
376 | 376 | label_TYP_is->setText("-"); |
|
377 | 377 | label_SUB_is->setText("-"); |
|
378 | 378 | label_SID_is->setText("-"); |
|
379 | 379 | label_SIZ_is->setText("-"); |
|
380 | 380 | // |
|
381 | 381 | label_coarse_time_val->setText("-"); |
|
382 | 382 | label_fine_time_val->setText("-"); |
|
383 | 383 | } |
|
384 | 384 | |
|
385 | 385 | void TMStatistics::updateStatistics(unsigned char pid, unsigned char cat, |
|
386 | 386 | unsigned char typ, unsigned char sub, |
|
387 | 387 | unsigned int sid, unsigned int length, |
|
388 | 388 | unsigned int coarse_t, unsigned int fine_t) |
|
389 | 389 | { |
|
390 | 390 | if (cat == 1) |
|
391 | 391 | { |
|
392 | 392 | if (typ == 1) |
|
393 | 393 | { |
|
394 | 394 | if (sub == 7) |
|
395 | 395 | { |
|
396 | 396 | SUCC_nb = SUCC_nb + 1; |
|
397 | 397 | label_SUCC_nb->setText(QString::number(SUCC_nb)); |
|
398 | 398 | } |
|
399 | 399 | else if (sub == 8) |
|
400 | 400 | { |
|
401 | 401 | if (sid == 5) |
|
402 | 402 | { |
|
403 | 403 | INCO_nb = INCO_nb + 1; |
|
404 | 404 | label_INCO_nb->setText(QString::number(INCO_nb)); |
|
405 | 405 | } |
|
406 | 406 | else if (sid == 40000) |
|
407 | 407 | { |
|
408 | 408 | NOTE_nb = NOTE_nb + 1; |
|
409 | 409 | label_NOTE_nb->setText(QString::number(NOTE_nb)); |
|
410 | 410 | } |
|
411 | 411 | else if (sid == 40002) |
|
412 | 412 | { |
|
413 | 413 | NOTI_nb = NOTI_nb + 1; |
|
414 | 414 | label_NOTI_nb->setText(QString::number(NOTI_nb)); |
|
415 | 415 | } |
|
416 | 416 | else if (sid == 40003) |
|
417 | 417 | { |
|
418 | 418 | ERRO_nb = ERRO_nb + 1; |
|
419 | 419 | label_ERRO_nb->setText(QString::number(ERRO_nb)); |
|
420 | 420 | } |
|
421 | 421 | else if (sid == 40005) |
|
422 | 422 | { |
|
423 | 423 | CORR_nb = CORR_nb + 1; |
|
424 | 424 | label_CORR_nb->setText(QString::number(CORR_nb)); |
|
425 | 425 | } |
|
426 | 426 | else incrementUnknown(); |
|
427 | 427 | } |
|
428 | 428 | else incrementUnknown(); |
|
429 | 429 | } |
|
430 | 430 | else |
|
431 | 431 | incrementUnknown(); |
|
432 | 432 | } |
|
433 | 433 | else if (cat == 4) |
|
434 | 434 | { |
|
435 | 435 | if (typ == 3) |
|
436 | 436 | { |
|
437 | 437 | if (sub == 25) |
|
438 | 438 | if (sid == 1) |
|
439 | 439 | { |
|
440 | 440 | HK_nb = HK_nb + 1; |
|
441 | 441 | label_HK_nb->setText(QString::number(HK_nb)); |
|
442 | 442 | } |
|
443 | 443 | else |
|
444 | 444 | { |
|
445 | 445 | incrementUnknown(); |
|
446 | 446 | } |
|
447 | 447 | else |
|
448 | 448 | { |
|
449 | 449 | incrementUnknown(); |
|
450 | 450 | } |
|
451 | 451 | } |
|
452 | 452 | else |
|
453 | 453 | { |
|
454 | 454 | incrementUnknown(); |
|
455 | 455 | } |
|
456 | 456 | } |
|
457 | 457 | else if (cat == 12) |
|
458 | 458 | { |
|
459 | 459 | if (typ == 21) |
|
460 | 460 | { |
|
461 | 461 | if (sub == 3) |
|
462 | { | |
|
462 | 463 | if (sid == 1) |
|
463 | 464 | { |
|
464 | 465 | NORM_CWF_F3_nb = NORM_CWF_F3_nb + 1; |
|
465 | 466 | label_NORM_CWF_F3_nb->setText(QString::number(NORM_CWF_F3_nb)); |
|
466 | 467 | } |
|
467 | 468 | else if (sid == 3) |
|
468 | 469 | { |
|
469 | 470 | NORM_SWF_F0_nb = NORM_SWF_F0_nb + 1; |
|
470 | 471 | label_NORM_SWF_F0_nb->setText(QString::number(NORM_SWF_F0_nb)); |
|
471 | 472 | } |
|
472 | 473 | else if (sid == 4) |
|
473 | 474 | { |
|
474 | 475 | NORM_SWF_F1_nb = NORM_SWF_F1_nb + 1; |
|
475 | 476 | label_NORM_SWF_F1_nb->setText(QString::number(NORM_SWF_F1_nb)); |
|
476 | 477 | } |
|
477 | 478 | else if (sid == 5) |
|
478 | 479 | { |
|
479 | 480 | NORM_SWF_F2_nb = NORM_SWF_F2_nb + 1; |
|
480 | 481 | label_NORM_SWF_F2_nb->setText(QString::number(NORM_SWF_F2_nb)); |
|
481 | 482 | } |
|
482 | 483 | else |
|
483 | 484 | { |
|
484 | 485 | incrementUnknown(); |
|
485 | 486 | } |
|
487 | } | |
|
486 | 488 | } |
|
487 | 489 | else |
|
488 | 490 | { |
|
489 | 491 | incrementUnknown(); |
|
490 | 492 | } |
|
491 | 493 | } |
|
492 | 494 | else |
|
493 | 495 | { |
|
494 | 496 | incrementUnknown(); |
|
495 | 497 | } |
|
496 | 498 | |
|
497 | 499 | label_PID_is->setText(QString::number(pid)); |
|
498 | 500 | label_CAT_is->setText(QString::number(cat)); |
|
499 | 501 | label_TYP_is->setText(QString::number(typ)); |
|
500 | 502 | label_SUB_is->setText(QString::number(sub)); |
|
501 | 503 | label_SID_is->setText(QString::number(sid)); |
|
502 | 504 | label_SIZ_is->setText(QString::number(length)); |
|
503 | 505 | label_coarse_time_val->setText(QString::number(coarse_t, 16)); |
|
504 | 506 | label_fine_time_val->setText(QString::number(fine_t, 16)); |
|
505 | 507 | } |
|
506 | 508 | |
|
507 | 509 | void TMStatistics::incrementUnknown() |
|
508 | 510 | { |
|
509 | 511 | UNKNOWN_nb = UNKNOWN_nb + 1; |
|
510 | 512 | label_UNKNOWN_nb->setText(QString::number(UNKNOWN_nb)); |
|
511 | 513 | } |
|
512 | 514 | |
|
513 | 515 | |
|
514 | 516 | |
|
515 | 517 | |
|
516 | 518 | |
|
517 | 519 |
@@ -1,37 +1,37 | |||
|
1 | 1 | #ifndef WFDISPLAY_H |
|
2 | 2 | #define WFDISPLAY_H |
|
3 | 3 | |
|
4 | 4 | #include <QWidget> |
|
5 |
#include < |
|
|
5 | #include <lppmonplot.h> | |
|
6 | 6 | #include <QGridLayout> |
|
7 | 7 | #include <QVBoxLayout> |
|
8 | 8 | #include <wfplot.h> |
|
9 | 9 | #include <wfpage.h> |
|
10 | 10 | #include <QTabWidget> |
|
11 | 11 | #include <params.h> |
|
12 | 12 | |
|
13 | 13 | class WFDisplay : public QWidget |
|
14 | 14 | { |
|
15 | 15 | Q_OBJECT |
|
16 | 16 | public: |
|
17 | 17 | explicit WFDisplay(QWidget *parent = 0); |
|
18 | 18 | |
|
19 | 19 | WFPage * page_f0; |
|
20 | 20 | WFPage * page_f1; |
|
21 | 21 | WFPage * page_f2; |
|
22 | 22 | WFPage * page_f3; |
|
23 | 23 | |
|
24 | 24 | QTabWidget *spwTabWidget; |
|
25 | 25 | |
|
26 | 26 | QVBoxLayout *waveforms_LAYOUT; |
|
27 | 27 | |
|
28 | 28 | void displayOnPlot(short *data, unsigned char num_page, unsigned char num); |
|
29 | 29 | |
|
30 | 30 | |
|
31 | 31 | signals: |
|
32 | 32 | |
|
33 | 33 | public slots: |
|
34 | 34 | |
|
35 | 35 | }; |
|
36 | 36 | |
|
37 | 37 | #endif // WFDISPLAY_H |
General Comments 0
You need to be logged in to leave comments.
Login now