@@ -1,142 +1,142 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: PAULs_LPPMON_PLUGINS |
|
2 | # Makefile for building: PAULs_LPPMON_PLUGINS | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.4) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Apr 5 15:41:42 2013 | |
4 | # Project: PAULs_LPPMON_PLUGINS.pro |
|
4 | # Project: PAULs_LPPMON_PLUGINS.pro | |
5 | # Template: subdirs |
|
5 | # Template: subdirs | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | first: make_default |
|
9 | first: make_default | |
10 | MAKEFILE = Makefile |
|
10 | MAKEFILE = Makefile | |
11 | QMAKE = /usr/bin/qmake-qt4 |
|
11 | QMAKE = /usr/bin/qmake-qt4 | |
12 | DEL_FILE = rm -f |
|
12 | DEL_FILE = rm -f | |
13 | CHK_DIR_EXISTS= test -d |
|
13 | CHK_DIR_EXISTS= test -d | |
14 | MKDIR = mkdir -p |
|
14 | MKDIR = mkdir -p | |
15 | COPY = cp -f |
|
15 | COPY = cp -f | |
16 | COPY_FILE = $(COPY) |
|
16 | COPY_FILE = $(COPY) | |
17 | COPY_DIR = $(COPY) -r |
|
17 | COPY_DIR = $(COPY) -r | |
18 | INSTALL_FILE = install -m 644 -p |
|
18 | INSTALL_FILE = install -m 644 -p | |
19 | INSTALL_PROGRAM = install -m 755 -p |
|
19 | INSTALL_PROGRAM = install -m 755 -p | |
20 | INSTALL_DIR = $(COPY_DIR) |
|
20 | INSTALL_DIR = $(COPY_DIR) | |
21 | DEL_FILE = rm -f |
|
21 | DEL_FILE = rm -f | |
22 | SYMLINK = ln -f -s |
|
22 | SYMLINK = ln -f -s | |
23 | DEL_DIR = rmdir |
|
23 | DEL_DIR = rmdir | |
24 | MOVE = mv -f |
|
24 | MOVE = mv -f | |
25 | CHK_DIR_EXISTS= test -d |
|
25 | CHK_DIR_EXISTS= test -d | |
26 | MKDIR = mkdir -p |
|
26 | MKDIR = mkdir -p | |
27 | SUBTARGETS = \ |
|
27 | SUBTARGETS = \ | |
28 | sub-rmapplugin |
|
28 | sub-rmapplugin | |
29 |
|
29 | |||
30 | rmapplugin/$(MAKEFILE): |
|
30 | rmapplugin/$(MAKEFILE): | |
31 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ |
|
31 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ | |
32 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) |
|
32 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) | |
33 | sub-rmapplugin-qmake_all: FORCE |
|
33 | sub-rmapplugin-qmake_all: FORCE | |
34 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ |
|
34 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ | |
35 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) |
|
35 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) | |
36 | sub-rmapplugin: rmapplugin/$(MAKEFILE) FORCE |
|
36 | sub-rmapplugin: rmapplugin/$(MAKEFILE) FORCE | |
37 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
37 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) | |
38 | sub-rmapplugin-make_default-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
38 | sub-rmapplugin-make_default-ordered: rmapplugin/$(MAKEFILE) FORCE | |
39 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
39 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) | |
40 | sub-rmapplugin-make_default: rmapplugin/$(MAKEFILE) FORCE |
|
40 | sub-rmapplugin-make_default: rmapplugin/$(MAKEFILE) FORCE | |
41 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
41 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) | |
42 | sub-rmapplugin-make_first-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
42 | sub-rmapplugin-make_first-ordered: rmapplugin/$(MAKEFILE) FORCE | |
43 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first |
|
43 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first | |
44 | sub-rmapplugin-make_first: rmapplugin/$(MAKEFILE) FORCE |
|
44 | sub-rmapplugin-make_first: rmapplugin/$(MAKEFILE) FORCE | |
45 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first |
|
45 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first | |
46 | sub-rmapplugin-all-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
46 | sub-rmapplugin-all-ordered: rmapplugin/$(MAKEFILE) FORCE | |
47 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all |
|
47 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all | |
48 | sub-rmapplugin-all: rmapplugin/$(MAKEFILE) FORCE |
|
48 | sub-rmapplugin-all: rmapplugin/$(MAKEFILE) FORCE | |
49 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all |
|
49 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all | |
50 | sub-rmapplugin-clean-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
50 | sub-rmapplugin-clean-ordered: rmapplugin/$(MAKEFILE) FORCE | |
51 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean |
|
51 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean | |
52 | sub-rmapplugin-clean: rmapplugin/$(MAKEFILE) FORCE |
|
52 | sub-rmapplugin-clean: rmapplugin/$(MAKEFILE) FORCE | |
53 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean |
|
53 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean | |
54 | sub-rmapplugin-distclean-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
54 | sub-rmapplugin-distclean-ordered: rmapplugin/$(MAKEFILE) FORCE | |
55 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean |
|
55 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean | |
56 | sub-rmapplugin-distclean: rmapplugin/$(MAKEFILE) FORCE |
|
56 | sub-rmapplugin-distclean: rmapplugin/$(MAKEFILE) FORCE | |
57 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean |
|
57 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean | |
58 | sub-rmapplugin-install_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
58 | sub-rmapplugin-install_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE | |
59 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install |
|
59 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install | |
60 | sub-rmapplugin-install_subtargets: rmapplugin/$(MAKEFILE) FORCE |
|
60 | sub-rmapplugin-install_subtargets: rmapplugin/$(MAKEFILE) FORCE | |
61 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install |
|
61 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install | |
62 | sub-rmapplugin-uninstall_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
62 | sub-rmapplugin-uninstall_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE | |
63 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall |
|
63 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall | |
64 | sub-rmapplugin-uninstall_subtargets: rmapplugin/$(MAKEFILE) FORCE |
|
64 | sub-rmapplugin-uninstall_subtargets: rmapplugin/$(MAKEFILE) FORCE | |
65 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall |
|
65 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall | |
66 |
|
66 | |||
67 | Makefile: PAULs_LPPMON_PLUGINS.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
67 | Makefile: PAULs_LPPMON_PLUGINS.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
68 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
68 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
69 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
69 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
70 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
70 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
71 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
71 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
72 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
72 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
73 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
73 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
74 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ |
|
74 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ | |
75 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
75 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
76 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
76 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
77 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
77 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
78 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
78 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
79 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
79 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
81 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
81 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
82 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
82 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
83 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
83 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
84 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
91 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
91 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro | |
92 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
92 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
93 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
93 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
94 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
94 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
95 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
95 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
96 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
96 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
97 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
97 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
98 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
98 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
99 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: |
|
99 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: | |
100 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
100 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
101 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
101 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
102 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
102 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
103 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
103 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
104 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
104 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
105 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
105 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
106 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
106 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
107 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
107 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
108 | /usr/lib64/qt4/mkspecs/features/qt.prf: |
|
108 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |
109 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: |
|
109 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |
110 | /usr/lib64/qt4/mkspecs/features/moc.prf: |
|
110 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |
111 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
111 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
112 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
112 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
113 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
113 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
114 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
114 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
115 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
115 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
116 | qmake: qmake_all FORCE |
|
116 | qmake: qmake_all FORCE | |
117 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
117 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro | |
118 |
|
118 | |||
119 | qmake_all: sub-rmapplugin-qmake_all FORCE |
|
119 | qmake_all: sub-rmapplugin-qmake_all FORCE | |
120 |
|
120 | |||
121 | make_default: sub-rmapplugin-make_default-ordered FORCE |
|
121 | make_default: sub-rmapplugin-make_default-ordered FORCE | |
122 | make_first: sub-rmapplugin-make_first-ordered FORCE |
|
122 | make_first: sub-rmapplugin-make_first-ordered FORCE | |
123 | all: sub-rmapplugin-all-ordered FORCE |
|
123 | all: sub-rmapplugin-all-ordered FORCE | |
124 | clean: sub-rmapplugin-clean-ordered FORCE |
|
124 | clean: sub-rmapplugin-clean-ordered FORCE | |
125 | distclean: sub-rmapplugin-distclean-ordered FORCE |
|
125 | distclean: sub-rmapplugin-distclean-ordered FORCE | |
126 | -$(DEL_FILE) Makefile |
|
126 | -$(DEL_FILE) Makefile | |
127 | install_subtargets: sub-rmapplugin-install_subtargets-ordered FORCE |
|
127 | install_subtargets: sub-rmapplugin-install_subtargets-ordered FORCE | |
128 | uninstall_subtargets: sub-rmapplugin-uninstall_subtargets-ordered FORCE |
|
128 | uninstall_subtargets: sub-rmapplugin-uninstall_subtargets-ordered FORCE | |
129 |
|
129 | |||
130 | sub-rmapplugin-check_ordered: rmapplugin/$(MAKEFILE) |
|
130 | sub-rmapplugin-check_ordered: rmapplugin/$(MAKEFILE) | |
131 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) check |
|
131 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) check | |
132 | check: sub-rmapplugin-check_ordered |
|
132 | check: sub-rmapplugin-check_ordered | |
133 |
|
133 | |||
134 | mocclean: compiler_moc_header_clean compiler_moc_source_clean |
|
134 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |
135 |
|
135 | |||
136 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all |
|
136 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |
137 | install: install_subtargets FORCE |
|
137 | install: install_subtargets FORCE | |
138 |
|
138 | |||
139 | uninstall: uninstall_subtargets FORCE |
|
139 | uninstall: uninstall_subtargets FORCE | |
140 |
|
140 | |||
141 | FORCE: |
|
141 | FORCE: | |
142 |
|
142 |
@@ -1,264 +1,342 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by Qt Creator 2.4.1, 2013-0 |
|
3 | <!-- Written by Qt Creator 2.4.1, 2013-04-05T17:42:05. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">0</value> |
|
7 | <value type="int">0</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
14 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
15 | <value type="QString" key="language">Cpp</value> |
|
15 | <value type="QString" key="language">Cpp</value> | |
16 | <valuemap type="QVariantMap" key="value"> |
|
16 | <valuemap type="QVariantMap" key="value"> | |
17 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
17 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |
18 | </valuemap> |
|
18 | </valuemap> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
20 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
21 | <value type="QString" key="language">QmlJS</value> |
|
21 | <value type="QString" key="language">QmlJS</value> | |
22 | <valuemap type="QVariantMap" key="value"> |
|
22 | <valuemap type="QVariantMap" key="value"> | |
23 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
23 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |
24 | </valuemap> |
|
24 | </valuemap> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
26 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
27 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> |
|
27 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
28 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
28 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
29 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
29 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
30 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
30 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
31 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
31 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
32 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
33 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
33 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
34 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
35 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
36 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
36 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
37 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
37 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
38 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
38 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
39 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
40 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
40 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
41 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
42 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
42 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
43 | </valuemap> |
|
43 | </valuemap> | |
44 | </data> |
|
44 | </data> | |
45 | <data> |
|
45 | <data> | |
46 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
46 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
47 | <valuemap type="QVariantMap"/> |
|
47 | <valuemap type="QVariantMap"/> | |
48 | </data> |
|
48 | </data> | |
49 | <data> |
|
49 | <data> | |
50 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
50 | <variable>ProjectExplorer.Project.Target.0</variable> | |
51 | <valuemap type="QVariantMap"> |
|
51 | <valuemap type="QVariantMap"> | |
52 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> |
|
52 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | |
53 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> |
|
53 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value> | |
55 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
55 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
56 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
56 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
58 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
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> |
|
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"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
62 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
62 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
63 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
63 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
65 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
65 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
66 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
66 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
67 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
67 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
69 | </valuemap> |
|
69 | </valuemap> | |
70 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
70 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
71 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
71 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
72 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
72 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
74 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
74 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
75 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
75 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
76 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
76 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
77 | </valuemap> |
|
77 | </valuemap> | |
78 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
78 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
79 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
79 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
82 | </valuemap> |
|
82 | </valuemap> | |
83 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
83 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
84 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
84 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
85 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
85 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
88 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
88 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
89 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
89 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
90 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
90 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
91 | </valuemap> |
|
91 | </valuemap> | |
92 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
92 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
96 | </valuemap> |
|
96 | </valuemap> | |
97 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
97 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
98 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
98 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
99 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
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> |
|
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> |
|
101 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
102 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
102 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
103 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
103 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
104 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> |
|
104 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> | |
105 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> |
|
105 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |
106 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
106 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
107 | </valuemap> |
|
107 | </valuemap> | |
108 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> |
|
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> |
|
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"> |
|
110 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
111 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
111 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
115 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
115 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
116 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
116 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
117 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
117 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
118 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
118 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
119 | </valuemap> |
|
119 | </valuemap> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
121 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
121 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
122 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
122 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
124 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
124 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
125 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
125 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
126 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
126 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
127 | </valuemap> |
|
127 | </valuemap> | |
128 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
128 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
131 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
131 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
132 | </valuemap> |
|
132 | </valuemap> | |
133 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
134 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
138 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
138 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
139 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
139 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
140 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
140 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
141 | </valuemap> |
|
141 | </valuemap> | |
142 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
142 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
143 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
143 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
144 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
144 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
146 | </valuemap> |
|
146 | </valuemap> | |
147 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
147 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
148 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
148 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
149 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
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> |
|
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> |
|
151 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
153 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> |
|
153 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | |
154 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> |
|
154 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> | |
155 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> |
|
155 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> | |
156 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
156 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
157 | </valuemap> |
|
157 | </valuemap> | |
158 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> |
|
158 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> | |
159 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
159 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
160 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
160 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
161 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
161 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
162 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
162 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
163 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
163 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
165 | </valuemap> |
|
165 | </valuemap> | |
166 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
166 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
167 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
167 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
170 | </valuemap> |
|
170 | </valuemap> | |
171 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
171 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
172 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
172 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
173 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
173 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
174 | <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"/> |
|
175 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
176 | <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> |
|
177 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
178 | <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> |
|
179 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
180 | <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> |
|
181 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
182 | <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> |
|
183 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
184 | <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> |
|
185 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
186 | <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> |
|
187 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
188 | <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> |
|
189 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
190 | <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> |
|
191 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
192 | <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> |
|
193 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
194 | <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"/> |
|
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
196 | <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> |
|
197 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
198 | <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> |
|
199 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
200 | <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"> |
|
201 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
202 | <value type="int">0</value> |
|
202 | <value type="int">0</value> | |
203 | <value type="int">1</value> |
|
203 | <value type="int">1</value> | |
204 | <value type="int">2</value> |
|
204 | <value type="int">2</value> | |
205 | <value type="int">3</value> |
|
205 | <value type="int">3</value> | |
206 | <value type="int">4</value> |
|
206 | <value type="int">4</value> | |
207 | <value type="int">5</value> |
|
207 | <value type="int">5</value> | |
208 | <value type="int">6</value> |
|
208 | <value type="int">6</value> | |
209 | <value type="int">7</value> |
|
209 | <value type="int">7</value> | |
210 | <value type="int">8</value> |
|
210 | <value type="int">8</value> | |
211 | <value type="int">9</value> |
|
211 | <value type="int">9</value> | |
212 | <value type="int">10</value> |
|
212 | <value type="int">10</value> | |
213 | <value type="int">11</value> |
|
213 | <value type="int">11</value> | |
214 | <value type="int">12</value> |
|
214 | <value type="int">12</value> | |
215 | <value type="int">13</value> |
|
215 | <value type="int">13</value> | |
216 | <value type="int">14</value> |
|
216 | <value type="int">14</value> | |
217 | </valuelist> |
|
217 | </valuelist> | |
218 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
218 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
219 | <value type="int">0</value> |
|
219 | <value type="int">0</value> | |
220 | <value type="int">1</value> |
|
220 | <value type="int">1</value> | |
221 | <value type="int">2</value> |
|
221 | <value type="int">2</value> | |
222 | <value type="int">3</value> |
|
222 | <value type="int">3</value> | |
223 | <value type="int">4</value> |
|
223 | <value type="int">4</value> | |
224 | <value type="int">5</value> |
|
224 | <value type="int">5</value> | |
225 | <value type="int">6</value> |
|
225 | <value type="int">6</value> | |
226 | <value type="int">7</value> |
|
226 | <value type="int">7</value> | |
227 | <value type="int">8</value> |
|
227 | <value type="int">8</value> | |
228 | <value type="int">9</value> |
|
228 | <value type="int">9</value> | |
229 | <value type="int">10</value> |
|
229 | <value type="int">10</value> | |
230 | <value type="int">11</value> |
|
230 | <value type="int">11</value> | |
231 | <value type="int">12</value> |
|
231 | <value type="int">12</value> | |
232 | <value type="int">13</value> |
|
232 | <value type="int">13</value> | |
233 | <value type="int">14</value> |
|
233 | <value type="int">14</value> | |
234 | </valuelist> |
|
234 | </valuelist> | |
235 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
235 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> | |
236 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> |
|
236 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> | |
237 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">lppmon</value> |
|
237 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">lppmon</value> | |
238 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> |
|
238 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> | |
239 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> |
|
239 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> | |
240 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> |
|
240 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> | |
241 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run lppmon</value> |
|
241 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run lppmon</value> | |
242 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
242 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
243 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> |
|
243 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> | |
244 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
244 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
245 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
245 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
246 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
246 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
247 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
247 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
248 | </valuemap> |
|
248 | </valuemap> | |
249 |
<value type="int" key="ProjectExplorer.Target.RunConfiguration |
|
249 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> | |
|
250 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |||
|
251 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |||
|
252 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |||
|
253 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |||
|
254 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |||
|
255 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |||
|
256 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |||
|
257 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |||
|
258 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |||
|
259 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |||
|
260 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |||
|
261 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |||
|
262 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |||
|
263 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |||
|
264 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |||
|
265 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |||
|
266 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |||
|
267 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |||
|
268 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |||
|
269 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |||
|
270 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |||
|
271 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |||
|
272 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |||
|
273 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |||
|
274 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |||
|
275 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |||
|
276 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |||
|
277 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |||
|
278 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |||
|
279 | <value type="int">0</value> | |||
|
280 | <value type="int">1</value> | |||
|
281 | <value type="int">2</value> | |||
|
282 | <value type="int">3</value> | |||
|
283 | <value type="int">4</value> | |||
|
284 | <value type="int">5</value> | |||
|
285 | <value type="int">6</value> | |||
|
286 | <value type="int">7</value> | |||
|
287 | <value type="int">8</value> | |||
|
288 | <value type="int">9</value> | |||
|
289 | <value type="int">10</value> | |||
|
290 | <value type="int">11</value> | |||
|
291 | <value type="int">12</value> | |||
|
292 | <value type="int">13</value> | |||
|
293 | <value type="int">14</value> | |||
|
294 | </valuelist> | |||
|
295 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |||
|
296 | <value type="int">0</value> | |||
|
297 | <value type="int">1</value> | |||
|
298 | <value type="int">2</value> | |||
|
299 | <value type="int">3</value> | |||
|
300 | <value type="int">4</value> | |||
|
301 | <value type="int">5</value> | |||
|
302 | <value type="int">6</value> | |||
|
303 | <value type="int">7</value> | |||
|
304 | <value type="int">8</value> | |||
|
305 | <value type="int">9</value> | |||
|
306 | <value type="int">10</value> | |||
|
307 | <value type="int">11</value> | |||
|
308 | <value type="int">12</value> | |||
|
309 | <value type="int">13</value> | |||
|
310 | <value type="int">14</value> | |||
|
311 | </valuelist> | |||
|
312 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">spwtimegenerator</value> | |||
|
313 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
314 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value> | |||
|
315 | <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value> | |||
|
316 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |||
|
317 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">spwtimegenerator/spwtimegenerator/spwtimegenerator.pro</value> | |||
|
318 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |||
|
319 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value> | |||
|
320 | <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/> | |||
|
321 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |||
|
322 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |||
|
323 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |||
|
324 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |||
|
325 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |||
|
326 | </valuemap> | |||
|
327 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value> | |||
250 | </valuemap> |
|
328 | </valuemap> | |
251 | </data> |
|
329 | </data> | |
252 | <data> |
|
330 | <data> | |
253 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
331 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
254 | <value type="int">1</value> |
|
332 | <value type="int">1</value> | |
255 | </data> |
|
333 | </data> | |
256 | <data> |
|
334 | <data> | |
257 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
335 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
258 | <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
336 | <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
259 | </data> |
|
337 | </data> | |
260 | <data> |
|
338 | <data> | |
261 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
339 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
262 | <value type="int">10</value> |
|
340 | <value type="int">10</value> | |
263 | </data> |
|
341 | </data> | |
264 | </qtcreator> |
|
342 | </qtcreator> |
@@ -1,446 +1,469 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: librmapplugin.so.1.0.0 |
|
2 | # Makefile for building: librmapplugin.so.1.0.0 | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.4) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Apr 5 15:41:42 2013 | |
4 | # Project: rmapplugin.pro |
|
4 | # Project: rmapplugin.pro | |
5 | # Template: lib |
|
5 | # Template: lib | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | ####### Compiler, tools and options |
|
9 | ####### Compiler, tools and options | |
10 |
|
10 | |||
11 | CC = gcc |
|
11 | CC = gcc | |
12 | CXX = g++ |
|
12 | CXX = g++ | |
13 | DEFINES = -DPLUGIN=rmapplugin -DPLUGINHEADER="\"rmapplugin.h\"" -Ddriver_Name="\"RMAPPlugin\"" -Ddriver_Author="\"Paul Leroy paul.leroy@lpp.polytechnique.fr\"" -Ddriver_Version="\"1.1.2\"" -Ddriver_Description="\"AHB bus controler, works with Gaisler's AHB plugn' play bus.\"" -Ddriver_can_be_root=1 -Ddriver_can_be_child=0 -Ddriver_VID=0 -Ddriver_PID=0 -DLPPMON_VERSION="\"0.0.1\"" -DUNIXTRANSLATIONPATH -DLPPMON_PLUGINS_INSTALL_PATH="QDir::homePath()+\"/.lppmon/plugins\"" -DLPPMON_CONFIG_PATH="QDir::homePath()+\"/.lppmon/config\"" -DLPPMON_TRANSLATION_PATH="\"/etc/lppmon/translations\"" -DLPPMONPLUGIN_LIBRARY -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED |
|
13 | DEFINES = -DPLUGIN=rmapplugin -DPLUGINHEADER="\"rmapplugin.h\"" -Ddriver_Name="\"RMAPPlugin\"" -Ddriver_Author="\"Paul Leroy paul.leroy@lpp.polytechnique.fr\"" -Ddriver_Version="\"1.1.2\"" -Ddriver_Description="\"AHB bus controler, works with Gaisler's AHB plugn' play bus.\"" -Ddriver_can_be_root=1 -Ddriver_can_be_child=0 -Ddriver_VID=0 -Ddriver_PID=0 -DLPPMON_VERSION="\"0.0.1\"" -DUNIXTRANSLATIONPATH -DLPPMON_PLUGINS_INSTALL_PATH="QDir::homePath()+\"/.lppmon/plugins\"" -DLPPMON_CONFIG_PATH="QDir::homePath()+\"/.lppmon/config\"" -DLPPMON_TRANSLATION_PATH="\"/etc/lppmon/translations\"" -DLPPMONPLUGIN_LIBRARY -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED | |
14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) |
|
14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -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 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -W -D_REENTRANT -fPIC $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -W -D_REENTRANT -fPIC $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include -I. -I../common_PLE -I../spw_usb_driver_v2.61/inc -I/usr/include/lppmon/common -I/usr/include/lppmon -I/usr/include/lppmon/pluginsInterface -I/usr/include/PythonQt -Imoc |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include -I. -I../common_PLE -I../spw_usb_driver_v2.61/inc -I/usr/include/lppmon/common -I/usr/include/lppmon -I/usr/include/lppmon/pluginsInterface -I/usr/include/PythonQt -Imoc | |
17 | LINK = g++ |
|
17 | LINK = g++ | |
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro -shared -Wl,-soname,librmapplugin.so.1 |
|
18 | LFLAGS = -Wl,-O1 -Wl,-z,relro -shared -Wl,-soname,librmapplugin.so.1 | |
19 | LIBS = $(SUBLIBS) -L/usr/lib64 ../spw_usb_driver_v2.62/lib/x86_64/libSpaceWireUSBAPI.so ../spw_usb_driver_v2.62/lib/x86_64/libConfigLibraryUSB.so -ldl -lutil -lm -lpython2.7 -lPythonQt_QtAll -lPythonQt -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread |
|
19 | LIBS = $(SUBLIBS) -L/usr/lib64 ../spw_usb_driver_v2.62/lib/x86_64/libSpaceWireUSBAPI.so ../spw_usb_driver_v2.62/lib/x86_64/libConfigLibraryUSB.so -ldl -lutil -lm -lpython2.7 -lPythonQt_QtAll -lPythonQt -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread | |
20 | AR = ar cqs |
|
20 | AR = ar cqs | |
21 | RANLIB = |
|
21 | RANLIB = | |
22 | QMAKE = /usr/bin/qmake-qt4 |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
23 | TAR = tar -cf |
|
23 | TAR = tar -cf | |
24 | COMPRESS = gzip -9f |
|
24 | COMPRESS = gzip -9f | |
25 | COPY = cp -f |
|
25 | COPY = cp -f | |
26 | SED = sed |
|
26 | SED = sed | |
27 | COPY_FILE = $(COPY) |
|
27 | COPY_FILE = $(COPY) | |
28 | COPY_DIR = $(COPY) -r |
|
28 | COPY_DIR = $(COPY) -r | |
29 | STRIP = |
|
29 | STRIP = | |
30 | INSTALL_FILE = install -m 644 -p |
|
30 | INSTALL_FILE = install -m 644 -p | |
31 | INSTALL_DIR = $(COPY_DIR) |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
32 | INSTALL_PROGRAM = install -m 755 -p |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
33 | DEL_FILE = rm -f |
|
33 | DEL_FILE = rm -f | |
34 | SYMLINK = ln -f -s |
|
34 | SYMLINK = ln -f -s | |
35 | DEL_DIR = rmdir |
|
35 | DEL_DIR = rmdir | |
36 | MOVE = mv -f |
|
36 | MOVE = mv -f | |
37 | CHK_DIR_EXISTS= test -d |
|
37 | CHK_DIR_EXISTS= test -d | |
38 | MKDIR = mkdir -p |
|
38 | MKDIR = mkdir -p | |
39 |
|
39 | |||
40 | ####### Output directory |
|
40 | ####### Output directory | |
41 |
|
41 | |||
42 | OBJECTS_DIR = obj/ |
|
42 | OBJECTS_DIR = obj/ | |
43 |
|
43 | |||
44 | ####### Files |
|
44 | ####### Files | |
45 |
|
45 | |||
46 | SOURCES = rmapplugin.cpp \ |
|
46 | SOURCES = rmapplugin.cpp \ | |
47 | rmappluginui.cpp \ |
|
47 | rmappluginui.cpp \ | |
48 | rmapoperations.cpp \ |
|
48 | rmapoperations.cpp \ | |
49 | ccsds.cpp \ |
|
49 | ccsds.cpp \ | |
50 | ../common_PLE/qipdialogbox.cpp \ |
|
50 | ../common_PLE/qipdialogbox.cpp \ | |
51 | ../common_PLE/gresbstatusenquiry.cpp \ |
|
51 | ../common_PLE/gresbstatusenquiry.cpp \ | |
52 | spectralmatricesdmasimulator.cpp \ |
|
52 | spectralmatricesdmasimulator.cpp \ | |
53 | rmappluginpythonwrapper.cpp \ |
|
53 | rmappluginpythonwrapper.cpp \ | |
54 | stardundee.cpp \ |
|
54 | stardundee.cpp \ | |
55 | gresb.cpp \ |
|
55 | gresb.cpp \ | |
56 | tcpackettosend.cpp \ |
|
56 | tcpackettosend.cpp \ | |
|
57 | tmpackettoread.cpp \ | |||
57 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \ |
|
58 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \ | |
58 | moc/moc_rmapplugin.cpp \ |
|
59 | moc/moc_rmapplugin.cpp \ | |
59 | moc/moc_qipdialogbox.cpp \ |
|
60 | moc/moc_qipdialogbox.cpp \ | |
60 | moc/moc_gresbstatusenquiry.cpp \ |
|
61 | moc/moc_gresbstatusenquiry.cpp \ | |
61 | moc/moc_spectralmatricesdmasimulator.cpp \ |
|
62 | moc/moc_spectralmatricesdmasimulator.cpp \ | |
62 | moc/moc_rmappluginpythonwrapper.cpp \ |
|
63 | moc/moc_rmappluginpythonwrapper.cpp \ | |
63 | moc/moc_stardundee.cpp \ |
|
64 | moc/moc_stardundee.cpp \ | |
64 | moc/moc_gresb.cpp \ |
|
65 | moc/moc_gresb.cpp \ | |
65 | moc/moc_tcpackettosend.cpp \ |
|
66 | moc/moc_tcpackettosend.cpp \ | |
|
67 | moc/moc_tmpackettoread.cpp \ | |||
66 | moc/moc_genericPySysdriver.cpp \ |
|
68 | moc/moc_genericPySysdriver.cpp \ | |
67 | moc/moc_lppmonplugin.cpp |
|
69 | moc/moc_lppmonplugin.cpp | |
68 | OBJECTS = obj/rmapplugin.o \ |
|
70 | OBJECTS = obj/rmapplugin.o \ | |
69 | obj/rmappluginui.o \ |
|
71 | obj/rmappluginui.o \ | |
70 | obj/rmapoperations.o \ |
|
72 | obj/rmapoperations.o \ | |
71 | obj/ccsds.o \ |
|
73 | obj/ccsds.o \ | |
72 | obj/qipdialogbox.o \ |
|
74 | obj/qipdialogbox.o \ | |
73 | obj/gresbstatusenquiry.o \ |
|
75 | obj/gresbstatusenquiry.o \ | |
74 | obj/spectralmatricesdmasimulator.o \ |
|
76 | obj/spectralmatricesdmasimulator.o \ | |
75 | obj/rmappluginpythonwrapper.o \ |
|
77 | obj/rmappluginpythonwrapper.o \ | |
76 | obj/stardundee.o \ |
|
78 | obj/stardundee.o \ | |
77 | obj/gresb.o \ |
|
79 | obj/gresb.o \ | |
78 | obj/tcpackettosend.o \ |
|
80 | obj/tcpackettosend.o \ | |
|
81 | obj/tmpackettoread.o \ | |||
79 | obj/lppmonplugininterface.o \ |
|
82 | obj/lppmonplugininterface.o \ | |
80 | obj/moc_rmappluginui.o \ |
|
83 | obj/moc_rmappluginui.o \ | |
81 | obj/moc_rmapplugin.o \ |
|
84 | obj/moc_rmapplugin.o \ | |
82 | obj/moc_qipdialogbox.o \ |
|
85 | obj/moc_qipdialogbox.o \ | |
83 | obj/moc_gresbstatusenquiry.o \ |
|
86 | obj/moc_gresbstatusenquiry.o \ | |
84 | obj/moc_spectralmatricesdmasimulator.o \ |
|
87 | obj/moc_spectralmatricesdmasimulator.o \ | |
85 | obj/moc_rmappluginpythonwrapper.o \ |
|
88 | obj/moc_rmappluginpythonwrapper.o \ | |
86 | obj/moc_stardundee.o \ |
|
89 | obj/moc_stardundee.o \ | |
87 | obj/moc_gresb.o \ |
|
90 | obj/moc_gresb.o \ | |
88 | obj/moc_tcpackettosend.o \ |
|
91 | obj/moc_tcpackettosend.o \ | |
|
92 | obj/moc_tmpackettoread.o \ | |||
89 | obj/moc_genericPySysdriver.o \ |
|
93 | obj/moc_genericPySysdriver.o \ | |
90 | obj/moc_lppmonplugin.o |
|
94 | obj/moc_lppmonplugin.o | |
91 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
95 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
92 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
96 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
93 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
97 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
94 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
98 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
95 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
99 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
96 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
100 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
97 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
101 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
98 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ |
|
102 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ | |
99 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
103 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
100 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
104 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
101 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
105 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
102 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
106 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
103 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
107 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
104 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
108 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
105 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ |
|
109 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ | |
106 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ |
|
110 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ | |
107 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
111 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
108 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
112 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
109 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
113 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
110 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
114 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
111 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
115 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
112 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
116 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
113 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
117 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
114 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
118 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
115 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
119 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
116 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
120 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
117 | rmapplugin.pro |
|
121 | rmapplugin.pro | |
118 | QMAKE_TARGET = rmapplugin |
|
122 | QMAKE_TARGET = rmapplugin | |
119 | DESTDIR = bin/ |
|
123 | DESTDIR = bin/ | |
120 | TARGET = librmapplugin.so.1.0.0 |
|
124 | TARGET = librmapplugin.so.1.0.0 | |
121 | TARGETA = bin/librmapplugin.a |
|
125 | TARGETA = bin/librmapplugin.a | |
122 | TARGETD = librmapplugin.so.1.0.0 |
|
126 | TARGETD = librmapplugin.so.1.0.0 | |
123 | TARGET0 = librmapplugin.so |
|
127 | TARGET0 = librmapplugin.so | |
124 | TARGET1 = librmapplugin.so.1 |
|
128 | TARGET1 = librmapplugin.so.1 | |
125 | TARGET2 = librmapplugin.so.1.0 |
|
129 | TARGET2 = librmapplugin.so.1.0 | |
126 |
|
130 | |||
127 | first: all |
|
131 | first: all | |
128 | ####### Implicit rules |
|
132 | ####### Implicit rules | |
129 |
|
133 | |||
130 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
134 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
131 |
|
135 | |||
132 | .cpp.o: |
|
136 | .cpp.o: | |
133 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
137 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
134 |
|
138 | |||
135 | .cc.o: |
|
139 | .cc.o: | |
136 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
140 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
137 |
|
141 | |||
138 | .cxx.o: |
|
142 | .cxx.o: | |
139 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
143 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
140 |
|
144 | |||
141 | .C.o: |
|
145 | .C.o: | |
142 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
146 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
143 |
|
147 | |||
144 | .c.o: |
|
148 | .c.o: | |
145 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
149 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
146 |
|
150 | |||
147 | ####### Build rules |
|
151 | ####### Build rules | |
148 |
|
152 | |||
149 | all: Makefile bin/$(TARGET) |
|
153 | all: Makefile bin/$(TARGET) | |
150 |
|
154 | |||
151 | bin/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) |
|
155 | bin/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) | |
152 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
156 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
153 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) |
|
157 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) | |
154 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) |
|
158 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) | |
155 | -ln -s $(TARGET) $(TARGET0) |
|
159 | -ln -s $(TARGET) $(TARGET0) | |
156 | -ln -s $(TARGET) $(TARGET1) |
|
160 | -ln -s $(TARGET) $(TARGET1) | |
157 | -ln -s $(TARGET) $(TARGET2) |
|
161 | -ln -s $(TARGET) $(TARGET2) | |
158 | -$(DEL_FILE) bin/$(TARGET) |
|
162 | -$(DEL_FILE) bin/$(TARGET) | |
159 | -$(DEL_FILE) bin/$(TARGET0) |
|
163 | -$(DEL_FILE) bin/$(TARGET0) | |
160 | -$(DEL_FILE) bin/$(TARGET1) |
|
164 | -$(DEL_FILE) bin/$(TARGET1) | |
161 | -$(DEL_FILE) bin/$(TARGET2) |
|
165 | -$(DEL_FILE) bin/$(TARGET2) | |
162 | -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) bin/ |
|
166 | -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) bin/ | |
163 |
|
167 | |||
164 |
|
168 | |||
165 |
|
169 | |||
166 | staticlib: $(TARGETA) |
|
170 | staticlib: $(TARGETA) | |
167 |
|
171 | |||
168 | $(TARGETA): $(OBJECTS) $(OBJCOMP) |
|
172 | $(TARGETA): $(OBJECTS) $(OBJCOMP) | |
169 | -$(DEL_FILE) $(TARGETA) |
|
173 | -$(DEL_FILE) $(TARGETA) | |
170 | $(AR) $(TARGETA) $(OBJECTS) |
|
174 | $(AR) $(TARGETA) $(OBJECTS) | |
171 |
|
175 | |||
172 | Makefile: rmapplugin.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
176 | Makefile: rmapplugin.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
173 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
177 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
174 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
178 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
175 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
179 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
176 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
180 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
177 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
181 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
178 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
182 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
179 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ |
|
183 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ | |
180 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
184 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
181 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
185 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
182 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
186 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
183 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
187 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
184 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
188 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
185 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
189 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
186 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ |
|
190 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ | |
187 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ |
|
191 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ | |
188 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
192 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
189 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
193 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
190 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
194 | /usr/lib64/qt4/mkspecs/features/qt.prf \ | |
191 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
195 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ | |
192 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
196 | /usr/lib64/qt4/mkspecs/features/moc.prf \ | |
193 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
197 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
194 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
198 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
195 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
199 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
196 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
200 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
197 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
201 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
198 | /usr/lib64/libQtXml.prl \ |
|
202 | /usr/lib64/libQtXml.prl \ | |
199 | /usr/lib64/libQtCore.prl \ |
|
203 | /usr/lib64/libQtCore.prl \ | |
200 | /usr/lib64/libQtGui.prl \ |
|
204 | /usr/lib64/libQtGui.prl \ | |
201 | /usr/lib64/libQtNetwork.prl |
|
205 | /usr/lib64/libQtNetwork.prl | |
202 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
206 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro | |
203 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
207 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
204 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
208 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
205 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
209 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
206 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
210 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
207 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
211 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
208 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
212 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
209 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
213 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
210 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: |
|
214 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: | |
211 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
215 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
212 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
216 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
213 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
217 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
214 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
218 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
215 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
219 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
216 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
220 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
217 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf: |
|
221 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf: | |
218 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf: |
|
222 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf: | |
219 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
223 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
220 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
224 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
221 | /usr/lib64/qt4/mkspecs/features/qt.prf: |
|
225 | /usr/lib64/qt4/mkspecs/features/qt.prf: | |
222 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: |
|
226 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: | |
223 | /usr/lib64/qt4/mkspecs/features/moc.prf: |
|
227 | /usr/lib64/qt4/mkspecs/features/moc.prf: | |
224 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
228 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
225 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
229 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
226 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
230 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
227 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
231 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
228 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
232 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
229 | /usr/lib64/libQtXml.prl: |
|
233 | /usr/lib64/libQtXml.prl: | |
230 | /usr/lib64/libQtCore.prl: |
|
234 | /usr/lib64/libQtCore.prl: | |
231 | /usr/lib64/libQtGui.prl: |
|
235 | /usr/lib64/libQtGui.prl: | |
232 | /usr/lib64/libQtNetwork.prl: |
|
236 | /usr/lib64/libQtNetwork.prl: | |
233 | qmake: FORCE |
|
237 | qmake: FORCE | |
234 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
238 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro | |
235 |
|
239 | |||
236 | dist: |
|
240 | dist: | |
237 | @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0 |
|
241 | @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0 | |
238 | $(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 spectralmatricesdmasimulator.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 /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 spectralmatricesdmasimulator.cpp rmappluginpythonwrapper.cpp stardundee.cpp gresb.cpp tcpackettosend.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 |
|
242 | $(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 spectralmatricesdmasimulator.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 /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 spectralmatricesdmasimulator.cpp rmappluginpythonwrapper.cpp stardundee.cpp gresb.cpp tcpackettosend.cpp tmpackettoread.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 | |
239 |
|
243 | |||
240 |
|
244 | |||
241 | clean:compiler_clean |
|
245 | clean:compiler_clean | |
242 | -$(DEL_FILE) $(OBJECTS) |
|
246 | -$(DEL_FILE) $(OBJECTS) | |
243 | -$(DEL_FILE) *~ core *.core |
|
247 | -$(DEL_FILE) *~ core *.core | |
244 |
|
248 | |||
245 |
|
249 | |||
246 | ####### Sub-libraries |
|
250 | ####### Sub-libraries | |
247 |
|
251 | |||
248 | distclean: clean |
|
252 | distclean: clean | |
249 | -$(DEL_FILE) bin/$(TARGET) |
|
253 | -$(DEL_FILE) bin/$(TARGET) | |
250 | -$(DEL_FILE) bin/$(TARGET0) bin/$(TARGET1) bin/$(TARGET2) $(TARGETA) |
|
254 | -$(DEL_FILE) bin/$(TARGET0) bin/$(TARGET1) bin/$(TARGET2) $(TARGETA) | |
251 | -$(DEL_FILE) Makefile |
|
255 | -$(DEL_FILE) Makefile | |
252 |
|
256 | |||
253 |
|
257 | |||
254 | check: first |
|
258 | check: first | |
255 |
|
259 | |||
256 | mocclean: compiler_moc_header_clean compiler_moc_source_clean |
|
260 | mocclean: compiler_moc_header_clean compiler_moc_source_clean | |
257 |
|
261 | |||
258 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all |
|
262 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all | |
259 |
|
263 | |||
260 | compiler_moc_header_make_all: moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp |
|
264 | compiler_moc_header_make_all: moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp | |
261 | compiler_moc_header_clean: |
|
265 | compiler_moc_header_clean: | |
262 | -$(DEL_FILE) moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp |
|
266 | -$(DEL_FILE) moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp | |
263 | moc/moc_rmappluginui.cpp: rmapoperations.h \ |
|
267 | moc/moc_rmappluginui.cpp: rmapoperations.h \ | |
264 | spectralmatricesdmasimulator.h \ |
|
268 | spectralmatricesdmasimulator.h \ | |
265 | stardundee.h \ |
|
269 | stardundee.h \ | |
266 | ccsds.h \ |
|
270 | ccsds.h \ | |
|
271 | tmpackettoread.h \ | |||
267 | gresb.h \ |
|
272 | gresb.h \ | |
268 | rmappluginui.h |
|
273 | rmappluginui.h | |
269 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp |
|
274 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp | |
270 |
|
275 | |||
271 | moc/moc_rmapplugin.cpp: rmappluginui.h \ |
|
276 | moc/moc_rmapplugin.cpp: rmappluginui.h \ | |
272 | rmapoperations.h \ |
|
277 | rmapoperations.h \ | |
273 | spectralmatricesdmasimulator.h \ |
|
278 | spectralmatricesdmasimulator.h \ | |
274 | stardundee.h \ |
|
279 | stardundee.h \ | |
275 | ccsds.h \ |
|
280 | ccsds.h \ | |
|
281 | tmpackettoread.h \ | |||
276 | gresb.h \ |
|
282 | gresb.h \ | |
277 | rmapplugin.h |
|
283 | rmapplugin.h | |
278 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp |
|
284 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp | |
279 |
|
285 | |||
280 | moc/moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h |
|
286 | moc/moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h | |
281 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc/moc_qipdialogbox.cpp |
|
287 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc/moc_qipdialogbox.cpp | |
282 |
|
288 | |||
283 | moc/moc_gresbstatusenquiry.cpp: ../common_PLE/gresbstatusenquiry.h |
|
289 | moc/moc_gresbstatusenquiry.cpp: ../common_PLE/gresbstatusenquiry.h | |
284 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/gresbstatusenquiry.h -o moc/moc_gresbstatusenquiry.cpp |
|
290 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/gresbstatusenquiry.h -o moc/moc_gresbstatusenquiry.cpp | |
285 |
|
291 | |||
286 | moc/moc_spectralmatricesdmasimulator.cpp: spectralmatricesdmasimulator.h |
|
292 | moc/moc_spectralmatricesdmasimulator.cpp: spectralmatricesdmasimulator.h | |
287 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) spectralmatricesdmasimulator.h -o moc/moc_spectralmatricesdmasimulator.cpp |
|
293 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) spectralmatricesdmasimulator.h -o moc/moc_spectralmatricesdmasimulator.cpp | |
288 |
|
294 | |||
289 | moc/moc_rmappluginpythonwrapper.cpp: rmapoperations.h \ |
|
295 | moc/moc_rmappluginpythonwrapper.cpp: rmapoperations.h \ | |
290 | ccsds.h \ |
|
296 | ccsds.h \ | |
291 | tcpackettosend.h \ |
|
297 | tcpackettosend.h \ | |
|
298 | tmpackettoread.h \ | |||
292 | rmappluginpythonwrapper.h |
|
299 | rmappluginpythonwrapper.h | |
293 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginpythonwrapper.h -o moc/moc_rmappluginpythonwrapper.cpp |
|
300 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginpythonwrapper.h -o moc/moc_rmappluginpythonwrapper.cpp | |
294 |
|
301 | |||
295 | moc/moc_stardundee.cpp: rmapoperations.h \ |
|
302 | moc/moc_stardundee.cpp: rmapoperations.h \ | |
296 | ccsds.h \ |
|
303 | ccsds.h \ | |
|
304 | tmpackettoread.h \ | |||
297 | stardundee.h |
|
305 | stardundee.h | |
298 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) stardundee.h -o moc/moc_stardundee.cpp |
|
306 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) stardundee.h -o moc/moc_stardundee.cpp | |
299 |
|
307 | |||
300 | moc/moc_gresb.cpp: rmapoperations.h \ |
|
308 | moc/moc_gresb.cpp: rmapoperations.h \ | |
301 | ccsds.h \ |
|
309 | ccsds.h \ | |
|
310 | tmpackettoread.h \ | |||
302 | gresb.h |
|
311 | gresb.h | |
303 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) gresb.h -o moc/moc_gresb.cpp |
|
312 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) gresb.h -o moc/moc_gresb.cpp | |
304 |
|
313 | |||
305 | moc/moc_tcpackettosend.cpp: tcpackettosend.h |
|
314 | moc/moc_tcpackettosend.cpp: tcpackettosend.h | |
306 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tcpackettosend.h -o moc/moc_tcpackettosend.cpp |
|
315 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tcpackettosend.h -o moc/moc_tcpackettosend.cpp | |
307 |
|
316 | |||
|
317 | moc/moc_tmpackettoread.cpp: tmpackettoread.h | |||
|
318 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmpackettoread.h -o moc/moc_tmpackettoread.cpp | |||
|
319 | ||||
308 | moc/moc_genericPySysdriver.cpp: /usr/include/lppmon/genericPySysdriver.h |
|
320 | moc/moc_genericPySysdriver.cpp: /usr/include/lppmon/genericPySysdriver.h | |
309 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp |
|
321 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp | |
310 |
|
322 | |||
311 | moc/moc_lppmonplugin.cpp: /usr/include/lppmon/lppmonplugin.h |
|
323 | moc/moc_lppmonplugin.cpp: /usr/include/lppmon/lppmonplugin.h | |
312 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/lppmonplugin.h -o moc/moc_lppmonplugin.cpp |
|
324 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/lppmonplugin.h -o moc/moc_lppmonplugin.cpp | |
313 |
|
325 | |||
314 | compiler_rcc_make_all: |
|
326 | compiler_rcc_make_all: | |
315 | compiler_rcc_clean: |
|
327 | compiler_rcc_clean: | |
316 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
328 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
317 | compiler_image_collection_clean: |
|
329 | compiler_image_collection_clean: | |
318 | -$(DEL_FILE) qmake_image_collection.cpp |
|
330 | -$(DEL_FILE) qmake_image_collection.cpp | |
319 | compiler_moc_source_make_all: |
|
331 | compiler_moc_source_make_all: | |
320 | compiler_moc_source_clean: |
|
332 | compiler_moc_source_clean: | |
321 | compiler_uic_make_all: |
|
333 | compiler_uic_make_all: | |
322 | compiler_uic_clean: |
|
334 | compiler_uic_clean: | |
323 | compiler_yacc_decl_make_all: |
|
335 | compiler_yacc_decl_make_all: | |
324 | compiler_yacc_decl_clean: |
|
336 | compiler_yacc_decl_clean: | |
325 | compiler_yacc_impl_make_all: |
|
337 | compiler_yacc_impl_make_all: | |
326 | compiler_yacc_impl_clean: |
|
338 | compiler_yacc_impl_clean: | |
327 | compiler_lex_make_all: |
|
339 | compiler_lex_make_all: | |
328 | compiler_lex_clean: |
|
340 | compiler_lex_clean: | |
329 | compiler_clean: compiler_moc_header_clean |
|
341 | compiler_clean: compiler_moc_header_clean | |
330 |
|
342 | |||
331 | ####### Compile |
|
343 | ####### Compile | |
332 |
|
344 | |||
333 | obj/rmapplugin.o: rmapplugin.cpp rmapplugin.h \ |
|
345 | obj/rmapplugin.o: rmapplugin.cpp rmapplugin.h \ | |
334 | rmappluginui.h \ |
|
346 | rmappluginui.h \ | |
335 | rmapoperations.h \ |
|
347 | rmapoperations.h \ | |
336 | spectralmatricesdmasimulator.h \ |
|
348 | spectralmatricesdmasimulator.h \ | |
337 | stardundee.h \ |
|
349 | stardundee.h \ | |
338 | ccsds.h \ |
|
350 | ccsds.h \ | |
|
351 | tmpackettoread.h \ | |||
339 | gresb.h \ |
|
352 | gresb.h \ | |
340 | rmappluginpythonwrapper.h \ |
|
353 | rmappluginpythonwrapper.h \ | |
341 | tcpackettosend.h |
|
354 | tcpackettosend.h | |
342 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp |
|
355 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp | |
343 |
|
356 | |||
344 | obj/rmappluginui.o: rmappluginui.cpp rmapplugin.h \ |
|
357 | obj/rmappluginui.o: rmappluginui.cpp rmapplugin.h \ | |
345 | rmappluginui.h \ |
|
358 | rmappluginui.h \ | |
346 | rmapoperations.h \ |
|
359 | rmapoperations.h \ | |
347 | spectralmatricesdmasimulator.h \ |
|
360 | spectralmatricesdmasimulator.h \ | |
348 | stardundee.h \ |
|
361 | stardundee.h \ | |
349 | ccsds.h \ |
|
362 | ccsds.h \ | |
|
363 | tmpackettoread.h \ | |||
350 | gresb.h |
|
364 | gresb.h | |
351 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp |
|
365 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp | |
352 |
|
366 | |||
353 | obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h |
|
367 | obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h | |
354 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapoperations.o rmapoperations.cpp |
|
368 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapoperations.o rmapoperations.cpp | |
355 |
|
369 | |||
356 | obj/ccsds.o: ccsds.cpp ccsds.h |
|
370 | obj/ccsds.o: ccsds.cpp ccsds.h | |
357 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ccsds.o ccsds.cpp |
|
371 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ccsds.o ccsds.cpp | |
358 |
|
372 | |||
359 | obj/qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h |
|
373 | obj/qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h | |
360 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qipdialogbox.o ../common_PLE/qipdialogbox.cpp |
|
374 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qipdialogbox.o ../common_PLE/qipdialogbox.cpp | |
361 |
|
375 | |||
362 | obj/gresbstatusenquiry.o: ../common_PLE/gresbstatusenquiry.cpp ../common_PLE/gresbstatusenquiry.h |
|
376 | obj/gresbstatusenquiry.o: ../common_PLE/gresbstatusenquiry.cpp ../common_PLE/gresbstatusenquiry.h | |
363 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresbstatusenquiry.o ../common_PLE/gresbstatusenquiry.cpp |
|
377 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresbstatusenquiry.o ../common_PLE/gresbstatusenquiry.cpp | |
364 |
|
378 | |||
365 | obj/spectralmatricesdmasimulator.o: spectralmatricesdmasimulator.cpp spectralmatricesdmasimulator.h |
|
379 | obj/spectralmatricesdmasimulator.o: spectralmatricesdmasimulator.cpp spectralmatricesdmasimulator.h | |
366 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/spectralmatricesdmasimulator.o spectralmatricesdmasimulator.cpp |
|
380 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/spectralmatricesdmasimulator.o spectralmatricesdmasimulator.cpp | |
367 |
|
381 | |||
368 | obj/rmappluginpythonwrapper.o: rmappluginpythonwrapper.cpp rmappluginpythonwrapper.h \ |
|
382 | obj/rmappluginpythonwrapper.o: rmappluginpythonwrapper.cpp rmappluginpythonwrapper.h \ | |
369 | rmapoperations.h \ |
|
383 | rmapoperations.h \ | |
370 | ccsds.h \ |
|
384 | ccsds.h \ | |
371 | tcpackettosend.h |
|
385 | tcpackettosend.h \ | |
|
386 | tmpackettoread.h | |||
372 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginpythonwrapper.o rmappluginpythonwrapper.cpp |
|
387 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginpythonwrapper.o rmappluginpythonwrapper.cpp | |
373 |
|
388 | |||
374 | obj/stardundee.o: stardundee.cpp stardundee.h \ |
|
389 | obj/stardundee.o: stardundee.cpp stardundee.h \ | |
375 | rmapoperations.h \ |
|
390 | rmapoperations.h \ | |
376 | ccsds.h |
|
391 | ccsds.h \ | |
|
392 | tmpackettoread.h | |||
377 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/stardundee.o stardundee.cpp |
|
393 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/stardundee.o stardundee.cpp | |
378 |
|
394 | |||
379 | obj/gresb.o: gresb.cpp gresb.h \ |
|
395 | obj/gresb.o: gresb.cpp gresb.h \ | |
380 | rmapoperations.h \ |
|
396 | rmapoperations.h \ | |
381 | ccsds.h |
|
397 | ccsds.h \ | |
|
398 | tmpackettoread.h | |||
382 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresb.o gresb.cpp |
|
399 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresb.o gresb.cpp | |
383 |
|
400 | |||
384 | obj/tcpackettosend.o: tcpackettosend.cpp tcpackettosend.h |
|
401 | obj/tcpackettosend.o: tcpackettosend.cpp tcpackettosend.h | |
385 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tcpackettosend.o tcpackettosend.cpp |
|
402 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tcpackettosend.o tcpackettosend.cpp | |
386 |
|
403 | |||
|
404 | obj/tmpackettoread.o: tmpackettoread.cpp tmpackettoread.h | |||
|
405 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmpackettoread.o tmpackettoread.cpp | |||
|
406 | ||||
387 | obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \ |
|
407 | obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \ | |
388 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h |
|
408 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h | |
389 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp |
|
409 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp | |
390 |
|
410 | |||
391 | obj/moc_rmappluginui.o: moc/moc_rmappluginui.cpp |
|
411 | obj/moc_rmappluginui.o: moc/moc_rmappluginui.cpp | |
392 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginui.o moc/moc_rmappluginui.cpp |
|
412 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginui.o moc/moc_rmappluginui.cpp | |
393 |
|
413 | |||
394 | obj/moc_rmapplugin.o: moc/moc_rmapplugin.cpp |
|
414 | obj/moc_rmapplugin.o: moc/moc_rmapplugin.cpp | |
395 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmapplugin.o moc/moc_rmapplugin.cpp |
|
415 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmapplugin.o moc/moc_rmapplugin.cpp | |
396 |
|
416 | |||
397 | obj/moc_qipdialogbox.o: moc/moc_qipdialogbox.cpp |
|
417 | obj/moc_qipdialogbox.o: moc/moc_qipdialogbox.cpp | |
398 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_qipdialogbox.o moc/moc_qipdialogbox.cpp |
|
418 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_qipdialogbox.o moc/moc_qipdialogbox.cpp | |
399 |
|
419 | |||
400 | obj/moc_gresbstatusenquiry.o: moc/moc_gresbstatusenquiry.cpp |
|
420 | obj/moc_gresbstatusenquiry.o: moc/moc_gresbstatusenquiry.cpp | |
401 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresbstatusenquiry.o moc/moc_gresbstatusenquiry.cpp |
|
421 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresbstatusenquiry.o moc/moc_gresbstatusenquiry.cpp | |
402 |
|
422 | |||
403 | obj/moc_spectralmatricesdmasimulator.o: moc/moc_spectralmatricesdmasimulator.cpp |
|
423 | obj/moc_spectralmatricesdmasimulator.o: moc/moc_spectralmatricesdmasimulator.cpp | |
404 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_spectralmatricesdmasimulator.o moc/moc_spectralmatricesdmasimulator.cpp |
|
424 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_spectralmatricesdmasimulator.o moc/moc_spectralmatricesdmasimulator.cpp | |
405 |
|
425 | |||
406 | obj/moc_rmappluginpythonwrapper.o: moc/moc_rmappluginpythonwrapper.cpp |
|
426 | obj/moc_rmappluginpythonwrapper.o: moc/moc_rmappluginpythonwrapper.cpp | |
407 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginpythonwrapper.o moc/moc_rmappluginpythonwrapper.cpp |
|
427 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginpythonwrapper.o moc/moc_rmappluginpythonwrapper.cpp | |
408 |
|
428 | |||
409 | obj/moc_stardundee.o: moc/moc_stardundee.cpp |
|
429 | obj/moc_stardundee.o: moc/moc_stardundee.cpp | |
410 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_stardundee.o moc/moc_stardundee.cpp |
|
430 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_stardundee.o moc/moc_stardundee.cpp | |
411 |
|
431 | |||
412 | obj/moc_gresb.o: moc/moc_gresb.cpp |
|
432 | obj/moc_gresb.o: moc/moc_gresb.cpp | |
413 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresb.o moc/moc_gresb.cpp |
|
433 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresb.o moc/moc_gresb.cpp | |
414 |
|
434 | |||
415 | obj/moc_tcpackettosend.o: moc/moc_tcpackettosend.cpp |
|
435 | obj/moc_tcpackettosend.o: moc/moc_tcpackettosend.cpp | |
416 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tcpackettosend.o moc/moc_tcpackettosend.cpp |
|
436 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tcpackettosend.o moc/moc_tcpackettosend.cpp | |
417 |
|
437 | |||
|
438 | obj/moc_tmpackettoread.o: moc/moc_tmpackettoread.cpp | |||
|
439 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmpackettoread.o moc/moc_tmpackettoread.cpp | |||
|
440 | ||||
418 | obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp |
|
441 | obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp | |
419 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp |
|
442 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp | |
420 |
|
443 | |||
421 | obj/moc_lppmonplugin.o: moc/moc_lppmonplugin.cpp |
|
444 | obj/moc_lppmonplugin.o: moc/moc_lppmonplugin.cpp | |
422 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lppmonplugin.o moc/moc_lppmonplugin.cpp |
|
445 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lppmonplugin.o moc/moc_lppmonplugin.cpp | |
423 |
|
446 | |||
424 | ####### Install |
|
447 | ####### Install | |
425 |
|
448 | |||
426 | install_target: first FORCE |
|
449 | install_target: first FORCE | |
427 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ || $(MKDIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ |
|
450 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ || $(MKDIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ | |
428 | -$(INSTALL_PROGRAM) "bin/$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" |
|
451 | -$(INSTALL_PROGRAM) "bin/$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" | |
429 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" |
|
452 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" | |
430 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" |
|
453 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" | |
431 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" |
|
454 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" | |
432 |
|
455 | |||
433 | uninstall_target: FORCE |
|
456 | uninstall_target: FORCE | |
434 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" |
|
457 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" | |
435 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" |
|
458 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" | |
436 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" |
|
459 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" | |
437 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" |
|
460 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" | |
438 | -$(DEL_DIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ |
|
461 | -$(DEL_DIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ | |
439 |
|
462 | |||
440 |
|
463 | |||
441 | install: install_target FORCE |
|
464 | install: install_target FORCE | |
442 |
|
465 | |||
443 | uninstall: uninstall_target FORCE |
|
466 | uninstall: uninstall_target FORCE | |
444 |
|
467 | |||
445 | FORCE: |
|
468 | FORCE: | |
446 |
|
469 |
@@ -1,798 +1,789 | |||||
1 | #include "gresb.h" |
|
1 | #include "gresb.h" | |
2 | #include <QTime> |
|
2 | #include <QTime> | |
3 | #include <QHostAddress> |
|
3 | #include <QHostAddress> | |
4 |
|
4 | |||
5 | gresb::gresb(QWidget *parent) : |
|
5 | gresb::gresb(QWidget *parent) : | |
6 | QWidget(parent) |
|
6 | QWidget(parent) | |
7 | { |
|
7 | { | |
8 | RMAPSend_SOCKET = new QTcpSocket; |
|
8 | RMAPSend_SOCKET = new QTcpSocket; | |
9 | RMAPReceive_SOCKET = new QTcpSocket; |
|
9 | RMAPReceive_SOCKET = new QTcpSocket; | |
10 | GRESBStatusQuery_SOCKET = new QTcpSocket; |
|
10 | GRESBStatusQuery_SOCKET = new QTcpSocket; | |
11 |
|
11 | |||
12 | rmapPacketSEMAPHORE = new QSemaphore; |
|
12 | rmapPacketSEMAPHORE = new QSemaphore; | |
13 | ccsdsPacketSEMAPHORE = new QSemaphore; |
|
13 | ccsdsPacketSEMAPHORE = new QSemaphore; | |
14 | rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH); |
|
14 | rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH); | |
15 | ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH); |
|
15 | ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH); | |
16 | spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) ); |
|
16 | spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) ); | |
17 |
|
17 | |||
18 | commandCode = invalid0; // initialization of the command code for the RMAP transfers |
|
18 | commandCode = invalid0; // initialization of the command code for the RMAP transfers | |
19 | rmapTargetLogicalAddress = DEFAULT_TARGET; |
|
19 | rmapTargetLogicalAddress = DEFAULT_TARGET; | |
20 | rmapSourceLogicalAddress = DEFAULT_SOURCE; |
|
20 | rmapSourceLogicalAddress = DEFAULT_SOURCE; | |
21 |
|
21 | |||
22 | //*** QLABEL ***// |
|
22 | //*** QLABEL ***// | |
23 | gresbBridgeIPLabel = new QLabel(tr("GRESB Bridge IP: ")); |
|
23 | gresbBridgeIPLabel = new QLabel(tr("GRESB Bridge IP: ")); | |
24 | gresbVirtualLinkLabel = new QLabel(tr("GRESB Virtual Link: ")); |
|
24 | gresbVirtualLinkLabel = new QLabel(tr("GRESB Virtual Link: ")); | |
25 | spwLinkLabel = new QLabel(tr("GRESB SPW Link: ")); |
|
25 | spwLinkLabel = new QLabel(tr("GRESB SPW Link: ")); | |
26 | rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection")); |
|
26 | rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection")); | |
27 | rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection")); |
|
27 | rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection")); | |
28 | gresbStatusQueryLabel = new QLabel(tr("GRESB status query socket (port 3010): waiting for connection")); |
|
28 | gresbStatusQueryLabel = new QLabel(tr("GRESB status query socket (port 3010): waiting for connection")); | |
29 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); |
|
29 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); | |
30 |
|
30 | |||
31 | //*** SPINBOX ***// |
|
31 | //*** SPINBOX ***// | |
32 | gresbVirtualLinkSpinBox = new QSpinBox; |
|
32 | gresbVirtualLinkSpinBox = new QSpinBox; | |
33 | spwLinkSpinBox = new QSpinBox;; |
|
33 | spwLinkSpinBox = new QSpinBox;; | |
34 | gresbVirtualLinkSpinBox->setRange(0, 4); |
|
34 | gresbVirtualLinkSpinBox->setRange(0, 4); | |
35 | gresbVirtualLinkSpinBox->setValue(1); |
|
35 | gresbVirtualLinkSpinBox->setValue(1); | |
36 | spwLinkSpinBox->setRange(0, 2); |
|
36 | spwLinkSpinBox->setRange(0, 2); | |
37 | spwLinkSpinBox->setValue(0); |
|
37 | spwLinkSpinBox->setValue(0); | |
38 |
|
38 | |||
39 | //*** QPUSHBUTTON ***// |
|
39 | //*** QPUSHBUTTON ***// | |
40 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
40 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); | |
41 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
41 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); | |
42 |
|
42 | |||
43 | //*** LAYOUT ***// |
|
43 | //*** LAYOUT ***// | |
44 | connectionLayout = new QGridLayout; |
|
44 | connectionLayout = new QGridLayout; | |
45 |
|
45 | |||
46 | //*** MISC ***// |
|
46 | //*** MISC ***// | |
47 | gresbStatusQueryDialog = new QDialog; |
|
47 | gresbStatusQueryDialog = new QDialog; | |
48 | gresbBridgeIPDialogBox = new QIPDialogBox; |
|
48 | gresbBridgeIPDialogBox = new QIPDialogBox; | |
49 | spwLinkStatusEnquiry = new gresbStatusEnquiry; |
|
49 | spwLinkStatusEnquiry = new gresbStatusEnquiry; | |
50 |
|
50 | |||
51 | connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0); |
|
51 | connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0); | |
52 | connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0); |
|
52 | connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0); | |
53 | connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0); |
|
53 | connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0); | |
54 | connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0); |
|
54 | connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0); | |
55 | connectionLayout->addWidget(spwLinkLabel, 2, 0, 0); |
|
55 | connectionLayout->addWidget(spwLinkLabel, 2, 0, 0); | |
56 | connectionLayout->addWidget(spwLinkSpinBox, 2, 1, 0); |
|
56 | connectionLayout->addWidget(spwLinkSpinBox, 2, 1, 0); | |
57 | connectionLayout->addWidget(rmapSendStateLabel, 3, 0, 1, 2); |
|
57 | connectionLayout->addWidget(rmapSendStateLabel, 3, 0, 1, 2); | |
58 | connectionLayout->addWidget(rmapReceiveStateLabel, 4, 0, 1, 2); |
|
58 | connectionLayout->addWidget(rmapReceiveStateLabel, 4, 0, 1, 2); | |
59 | connectionLayout->addWidget(gresbStatusQueryLabel, 5, 0, 1, 2); |
|
59 | connectionLayout->addWidget(gresbStatusQueryLabel, 5, 0, 1, 2); | |
60 |
|
60 | |||
61 | connectionLayout->setRowStretch(6, 1); |
|
61 | connectionLayout->setRowStretch(6, 1); | |
62 | connectionLayout->setColumnStretch(2, 1); |
|
62 | connectionLayout->setColumnStretch(2, 1); | |
63 |
|
63 | |||
64 | // GRESB STATUS QUERY DIALOG |
|
64 | // GRESB STATUS QUERY DIALOG | |
65 | gresbStatusQueryDialogLayout = new QGridLayout; |
|
65 | gresbStatusQueryDialogLayout = new QGridLayout; | |
66 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryDialogLabel, 0, 0, 1, 2); |
|
66 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryDialogLabel, 0, 0, 1, 2); | |
67 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryRetryButton, 1, 0, 0); |
|
67 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryRetryButton, 1, 0, 0); | |
68 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryAbortButton, 1, 1, 0); |
|
68 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryAbortButton, 1, 1, 0); | |
69 | gresbStatusQueryDialog->setLayout(gresbStatusQueryDialogLayout); |
|
69 | gresbStatusQueryDialog->setLayout(gresbStatusQueryDialogLayout); | |
70 |
|
70 | |||
71 | this->setLayout(connectionLayout); |
|
71 | this->setLayout(connectionLayout); | |
72 |
|
72 | |||
73 | connect(RMAPSend_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPSendConnectionState(QAbstractSocket::SocketState))); |
|
73 | connect(RMAPSend_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPSendConnectionState(QAbstractSocket::SocketState))); | |
74 | connect(RMAPReceive_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPReceiveConnectionState(QAbstractSocket::SocketState))); |
|
74 | connect(RMAPReceive_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPReceiveConnectionState(QAbstractSocket::SocketState))); | |
75 | connect(GRESBStatusQuery_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(GRESBConnectionState(QAbstractSocket::SocketState))); |
|
75 | connect(GRESBStatusQuery_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(GRESBConnectionState(QAbstractSocket::SocketState))); | |
76 | connect(gresbStatusQueryRetryButton, SIGNAL(clicked()), this, SLOT(reTestSPWLink())); |
|
76 | connect(gresbStatusQueryRetryButton, SIGNAL(clicked()), this, SLOT(reTestSPWLink())); | |
77 | connect(gresbStatusQueryAbortButton, SIGNAL(clicked()), gresbStatusQueryDialog, SLOT(reject())); |
|
77 | connect(gresbStatusQueryAbortButton, SIGNAL(clicked()), gresbStatusQueryDialog, SLOT(reject())); | |
78 | connect(spwLinkStatusEnquiry->readSPWStatusButton, SIGNAL(clicked()), this, SLOT(GRESBStatusQuery())); |
|
78 | connect(spwLinkStatusEnquiry->readSPWStatusButton, SIGNAL(clicked()), this, SLOT(GRESBStatusQuery())); | |
79 | connect(this->RMAPReceive_SOCKET, SIGNAL(readyRead()), this, SLOT(receiveSPWPacketLoop())); |
|
79 | connect(this->RMAPReceive_SOCKET, SIGNAL(readyRead()), this, SLOT(receiveSPWPacketLoop())); | |
80 | } |
|
80 | } | |
81 |
|
81 | |||
82 | gresb::~gresb() |
|
82 | gresb::~gresb() | |
83 | { |
|
83 | { | |
84 | free(rmapPacket); |
|
84 | free(rmapPacket); | |
85 | free(ccsdsPacket); |
|
85 | free(ccsdsPacket); | |
86 | free(spwPacket); |
|
86 | free(spwPacket); | |
87 | } |
|
87 | } | |
88 |
|
88 | |||
89 | unsigned int gresb::Write(unsigned int *Value, unsigned int count, unsigned int address) |
|
89 | unsigned int gresb::Write(unsigned int *Value, unsigned int count, unsigned int address) | |
90 | { |
|
90 | { | |
91 | unsigned int remainingCount = count; |
|
91 | unsigned int remainingCount = count; | |
92 | unsigned int iOffset = 0; |
|
92 | unsigned int iOffset = 0; | |
93 | QString console_message; |
|
93 | QString console_message; | |
94 | char* data; |
|
94 | char* data; | |
95 |
|
95 | |||
96 | if(rmapPacketSEMAPHORE->available()!=0) |
|
96 | if(rmapPacketSEMAPHORE->available()!=0) | |
97 | { |
|
97 | { | |
98 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped"); |
|
98 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped"); | |
99 | return 1; |
|
99 | return 1; | |
100 | } |
|
100 | } | |
101 |
|
101 | |||
102 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); |
|
102 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); | |
103 |
|
103 | |||
104 | data = (char*) malloc(READ_WRITE_MAX_COUNTS*4); |
|
104 | data = (char*) malloc(READ_WRITE_MAX_COUNTS*4); | |
105 |
|
105 | |||
106 | emit appendToLog(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); |
|
106 | emit appendToLog(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); | |
107 |
|
107 | |||
108 | while (remainingCount > READ_WRITE_MAX_COUNTS) |
|
108 | while (remainingCount > READ_WRITE_MAX_COUNTS) | |
109 | { |
|
109 | { | |
110 | for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++) |
|
110 | for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++) | |
111 | { |
|
111 | { | |
112 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); |
|
112 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); | |
113 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); |
|
113 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); | |
114 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); |
|
114 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); | |
115 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); |
|
115 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); | |
116 | } |
|
116 | } | |
117 |
|
117 | |||
118 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
118 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
119 | emit appendToLog(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
119 | emit appendToLog(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
120 |
|
120 | |||
121 | if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0) |
|
121 | if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0) | |
122 | { |
|
122 | { | |
123 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); |
|
123 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); | |
124 | return 1; |
|
124 | return 1; | |
125 | } |
|
125 | } | |
126 |
|
126 | |||
127 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; |
|
127 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; | |
128 | address = address + READ_WRITE_MAX_COUNTS * 4; |
|
128 | address = address + READ_WRITE_MAX_COUNTS * 4; | |
129 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; |
|
129 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; | |
130 | } |
|
130 | } | |
131 |
|
131 | |||
132 | if (remainingCount > 0) |
|
132 | if (remainingCount > 0) | |
133 | { |
|
133 | { | |
134 | for (unsigned int i = 0; i<remainingCount; i++) |
|
134 | for (unsigned int i = 0; i<remainingCount; i++) | |
135 | { |
|
135 | { | |
136 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); |
|
136 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); | |
137 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); |
|
137 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); | |
138 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); |
|
138 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); | |
139 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); |
|
139 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); | |
140 | } |
|
140 | } | |
141 |
|
141 | |||
142 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
142 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
143 | emit appendToLog(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
143 | emit appendToLog(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
144 |
|
144 | |||
145 | if (WriteBLOCK(data, remainingCount*4, address)==0) |
|
145 | if (WriteBLOCK(data, remainingCount*4, address)==0) | |
146 | { |
|
146 | { | |
147 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); |
|
147 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); | |
148 | return 1; |
|
148 | return 1; | |
149 | } |
|
149 | } | |
150 | } |
|
150 | } | |
151 |
|
151 | |||
152 | emit appendToLog(QString("*** STOP *** WRITE")); |
|
152 | emit appendToLog(QString("*** STOP *** WRITE")); | |
153 | free(data); |
|
153 | free(data); | |
154 | return count; |
|
154 | return count; | |
155 | } |
|
155 | } | |
156 |
|
156 | |||
157 | unsigned int gresb::Read(unsigned int *Value, unsigned int count, unsigned int address) |
|
157 | unsigned int gresb::Read(unsigned int *Value, unsigned int count, unsigned int address) | |
158 | { |
|
158 | { | |
159 | unsigned int remainingCount = count; |
|
159 | unsigned int remainingCount = count; | |
160 | unsigned int iOffset = 0; |
|
160 | unsigned int iOffset = 0; | |
161 | QString console_message; |
|
161 | QString console_message; | |
162 |
|
162 | |||
163 | if(rmapPacketSEMAPHORE->available()!=0) |
|
163 | if(rmapPacketSEMAPHORE->available()!=0) | |
164 | { |
|
164 | { | |
165 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped"); |
|
165 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped"); | |
166 | return 1; |
|
166 | return 1; | |
167 | } |
|
167 | } | |
168 | emit appendToLog(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); |
|
168 | emit appendToLog(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); | |
169 |
|
169 | |||
170 | while (remainingCount > READ_WRITE_MAX_COUNTS) |
|
170 | while (remainingCount > READ_WRITE_MAX_COUNTS) | |
171 | { |
|
171 | { | |
172 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
172 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
173 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
173 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
174 |
|
174 | |||
175 | if (ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0) |
|
175 | if (ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0) | |
176 | { |
|
176 | { | |
177 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); |
|
177 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); | |
178 | return 1; |
|
178 | return 1; | |
179 | } |
|
179 | } | |
180 |
|
180 | |||
181 | for(int i=0;i<READ_WRITE_MAX_COUNTS;i++) |
|
181 | for(int i=0;i<READ_WRITE_MAX_COUNTS;i++) | |
182 | { |
|
182 | { | |
183 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; |
|
183 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; | |
184 | for(int j=1;j<4;j++) |
|
184 | for(int j=1;j<4;j++) | |
185 | { |
|
185 | { | |
186 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; |
|
186 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; | |
187 | } |
|
187 | } | |
188 | } |
|
188 | } | |
189 |
|
189 | |||
190 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; |
|
190 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; | |
191 | address = address + READ_WRITE_MAX_COUNTS * 4; |
|
191 | address = address + READ_WRITE_MAX_COUNTS * 4; | |
192 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; |
|
192 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; | |
193 | rmapPacketSEMAPHORE->acquire(); |
|
193 | rmapPacketSEMAPHORE->acquire(); | |
194 | } |
|
194 | } | |
195 |
|
195 | |||
196 | if (remainingCount > 0) |
|
196 | if (remainingCount > 0) | |
197 | { |
|
197 | { | |
198 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
198 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
199 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
199 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
200 |
|
200 | |||
201 | if (ReadBLOCK(4*remainingCount, address)==0) |
|
201 | if (ReadBLOCK(4*remainingCount, address)==0) | |
202 | { |
|
202 | { | |
203 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); |
|
203 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); | |
204 | return 1; |
|
204 | return 1; | |
205 | } |
|
205 | } | |
206 |
|
206 | |||
207 | for(unsigned int i=0;i<remainingCount;i++) |
|
207 | for(unsigned int i=0;i<remainingCount;i++) | |
208 | { |
|
208 | { | |
209 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; |
|
209 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; | |
210 | for(int j=1;j<4;j++) |
|
210 | for(int j=1;j<4;j++) | |
211 | { |
|
211 | { | |
212 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; |
|
212 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; | |
213 | } |
|
213 | } | |
214 | } |
|
214 | } | |
215 | rmapPacketSEMAPHORE->acquire(); |
|
215 | rmapPacketSEMAPHORE->acquire(); | |
216 | } |
|
216 | } | |
217 |
|
217 | |||
218 | emit appendToLog(QString("*** STOP *** READ ")); |
|
218 | emit appendToLog(QString("*** STOP *** READ ")); | |
219 | return count; |
|
219 | return count; | |
220 | } |
|
220 | } | |
221 |
|
221 | |||
222 | unsigned int gresb::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address) |
|
222 | unsigned int gresb::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address) | |
223 | { |
|
223 | { | |
224 | QTime RMAPTimeout; |
|
224 | QTime RMAPTimeout; | |
225 | RMAP *RMAPCommand; |
|
225 | RMAP *RMAPCommand; | |
226 | int errorCode; |
|
226 | int errorCode; | |
227 | QString console_message; |
|
227 | QString console_message; | |
228 |
|
228 | |||
229 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) |
|
229 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
230 | { |
|
230 | { | |
231 | this->Close(); |
|
231 | this->Close(); | |
232 | return 1; |
|
232 | return 1; | |
233 | } |
|
233 | } | |
234 |
|
234 | |||
235 | RMAPCommand = new RMAP(commandCode, |
|
235 | RMAPCommand = new RMAP(commandCode, | |
236 | rmapTargetLogicalAddress, |
|
236 | rmapTargetLogicalAddress, | |
237 | rmapSourceLogicalAddress, |
|
237 | rmapSourceLogicalAddress, | |
238 | address, |
|
238 | address, | |
239 | nbBytes, |
|
239 | nbBytes, | |
240 | data); |
|
240 | data); | |
241 |
|
241 | |||
242 | // SEND GRESB HEADER |
|
242 | // SEND GRESB HEADER | |
243 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); |
|
243 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); | |
244 | // SEND SPACEWIRE PACKET HEADER |
|
244 | // SEND SPACEWIRE PACKET HEADER | |
245 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); |
|
245 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); | |
246 | // SEND DATA |
|
246 | // SEND DATA | |
247 | RMAPSend_SOCKET->write( data, nbBytes); |
|
247 | RMAPSend_SOCKET->write( data, nbBytes); | |
248 | // SEND DATA CRC |
|
248 | // SEND DATA CRC | |
249 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->dataCRC), 1); |
|
249 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->dataCRC), 1); | |
250 | RMAPTimeout.start(); |
|
250 | RMAPTimeout.start(); | |
251 | while(RMAPSend_SOCKET->bytesToWrite() > 0) |
|
251 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
252 | { |
|
252 | { | |
253 | RMAPSend_SOCKET->waitForBytesWritten(100); |
|
253 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
254 | if(RMAPTimeout.elapsed()>1000) |
|
254 | if(RMAPTimeout.elapsed()>1000) | |
255 | { |
|
255 | { | |
256 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** sending Write RMAP Command timeout"); |
|
256 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** sending Write RMAP Command timeout"); | |
257 | return 0; |
|
257 | return 0; | |
258 | } |
|
258 | } | |
259 | } |
|
259 | } | |
260 |
|
260 | |||
261 | if ( (commandCode == writeSingle_noVer_Rep) | (commandCode == writeInc_noVer_Rep) | |
|
261 | if ( (commandCode == writeSingle_noVer_Rep) | (commandCode == writeInc_noVer_Rep) | | |
262 | (commandCode == writeSingle_ver_rep) | (commandCode == writeInc_ver_rep) ) |
|
262 | (commandCode == writeSingle_ver_rep) | (commandCode == writeInc_ver_rep) ) | |
263 | { |
|
263 | { | |
264 | // WAIT FOR THE RMAP REPLY PACKET |
|
264 | // WAIT FOR THE RMAP REPLY PACKET | |
265 | errorCode = receiveSPWPacket(1); |
|
265 | errorCode = receiveSPWPacket(1); | |
266 | if (errorCode<=0) |
|
266 | if (errorCode<=0) | |
267 | { |
|
267 | { | |
268 | emit appendToLog("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); |
|
268 | emit appendToLog("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); | |
269 | return 0; |
|
269 | return 0; | |
270 | } |
|
270 | } | |
271 | if(rmapPacketSize != 8) |
|
271 | if(rmapPacketSize != 8) | |
272 | { |
|
272 | { | |
273 | console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n"); |
|
273 | console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n"); | |
274 | emit appendToLog(console_message); |
|
274 | emit appendToLog(console_message); | |
275 | return 0; |
|
275 | return 0; | |
276 | } |
|
276 | } | |
277 | switch (rmapPacket[3]) // byte 4 is the status byte in the reply |
|
277 | switch (rmapPacket[3]) // byte 4 is the status byte in the reply | |
278 | { |
|
278 | { | |
279 | case 0: |
|
279 | case 0: | |
280 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 0 Successfull"); |
|
280 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 0 Successfull"); | |
281 | break; |
|
281 | break; | |
282 | case 1: |
|
282 | case 1: | |
283 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** General error code"); |
|
283 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** General error code"); | |
284 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 1 General error code"); |
|
284 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 1 General error code"); | |
285 | break; |
|
285 | break; | |
286 | case 2: |
|
286 | case 2: | |
287 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code"); |
|
287 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code"); | |
288 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code"); |
|
288 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code"); | |
289 | break; |
|
289 | break; | |
290 | case 3: |
|
290 | case 3: | |
291 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key"); |
|
291 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key"); | |
292 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 3 Invalid key"); |
|
292 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 3 Invalid key"); | |
293 | break; |
|
293 | break; | |
294 | case 4: |
|
294 | case 4: | |
295 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC"); |
|
295 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC"); | |
296 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 4 Invalid data CRC"); |
|
296 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 4 Invalid data CRC"); | |
297 | break; |
|
297 | break; | |
298 | case 5: |
|
298 | case 5: | |
299 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP"); |
|
299 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP"); | |
300 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 5 Early EOP"); |
|
300 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 5 Early EOP"); | |
301 | break; |
|
301 | break; | |
302 | case 6: |
|
302 | case 6: | |
303 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data"); |
|
303 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data"); | |
304 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 6 Too much data"); |
|
304 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 6 Too much data"); | |
305 | break; |
|
305 | break; | |
306 | case 7: |
|
306 | case 7: | |
307 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** EEP"); |
|
307 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** EEP"); | |
308 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 7 EEP"); |
|
308 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 7 EEP"); | |
309 | break; |
|
309 | break; | |
310 | case 8: |
|
310 | case 8: | |
311 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved"); |
|
311 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved"); | |
312 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 8 Reserved"); |
|
312 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 8 Reserved"); | |
313 | break; |
|
313 | break; | |
314 | case 9: |
|
314 | case 9: | |
315 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun"); |
|
315 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun"); | |
316 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun"); |
|
316 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun"); | |
317 | break; |
|
317 | break; | |
318 | case 10: |
|
318 | case 10: | |
319 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised"); |
|
319 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised"); | |
320 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised"); |
|
320 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised"); | |
321 | break; |
|
321 | break; | |
322 | case 11: |
|
322 | case 11: | |
323 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error"); |
|
323 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error"); | |
324 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error"); |
|
324 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error"); | |
325 | break; |
|
325 | break; | |
326 | case 12: |
|
326 | case 12: | |
327 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address"); |
|
327 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address"); | |
328 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 12 Invalid target logical address"); |
|
328 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 12 Invalid target logical address"); | |
329 | break; |
|
329 | break; | |
330 | } |
|
330 | } | |
331 | acquireRMAPSemaphore(); |
|
331 | acquireRMAPSemaphore(); | |
332 | } |
|
332 | } | |
333 | return nbBytes; |
|
333 | return nbBytes; | |
334 | } |
|
334 | } | |
335 |
|
335 | |||
336 | unsigned int gresb::ReadBLOCK(unsigned int nbBytes, unsigned int address) |
|
336 | unsigned int gresb::ReadBLOCK(unsigned int nbBytes, unsigned int address) | |
337 | { |
|
337 | { | |
338 | int errorCode; |
|
338 | int errorCode; | |
339 | RMAP *RMAPCommand; |
|
339 | RMAP *RMAPCommand; | |
340 | QTime RMAPTimeout; |
|
340 | QTime RMAPTimeout; | |
341 | unsigned int dataLength; |
|
341 | unsigned int dataLength; | |
342 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) |
|
342 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
343 | { |
|
343 | { | |
344 | this->Close(); |
|
344 | this->Close(); | |
345 | return 1; |
|
345 | return 1; | |
346 | } |
|
346 | } | |
347 |
|
347 | |||
348 | if (nbBytes > 4) |
|
348 | if (nbBytes > 4) | |
349 | { |
|
349 | { | |
350 | RMAPCommand = new RMAP(read_Inc, |
|
350 | RMAPCommand = new RMAP(read_Inc, | |
351 | rmapTargetLogicalAddress, |
|
351 | rmapTargetLogicalAddress, | |
352 | rmapSourceLogicalAddress, |
|
352 | rmapSourceLogicalAddress, | |
353 | address, |
|
353 | address, | |
354 | nbBytes, |
|
354 | nbBytes, | |
355 | NULL); |
|
355 | NULL); | |
356 | } |
|
356 | } | |
357 | else |
|
357 | else | |
358 | { |
|
358 | { | |
359 | RMAPCommand = new RMAP(read_Single, |
|
359 | RMAPCommand = new RMAP(read_Single, | |
360 | rmapTargetLogicalAddress, |
|
360 | rmapTargetLogicalAddress, | |
361 | rmapSourceLogicalAddress, |
|
361 | rmapSourceLogicalAddress, | |
362 | address, |
|
362 | address, | |
363 | nbBytes, |
|
363 | nbBytes, | |
364 | NULL); |
|
364 | NULL); | |
365 | } |
|
365 | } | |
366 |
|
366 | |||
367 | // SEND THE GRESB HEADER FOR THE RMAP READ COMMAND |
|
367 | // SEND THE GRESB HEADER FOR THE RMAP READ COMMAND | |
368 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); |
|
368 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); | |
369 | // SEND THE SPACEWIRE PACKET FOR THE RMAP READ COMMAND |
|
369 | // SEND THE SPACEWIRE PACKET FOR THE RMAP READ COMMAND | |
370 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); |
|
370 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); | |
371 | RMAPSend_SOCKET->waitForBytesWritten(100); |
|
371 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
372 | RMAPTimeout.start(); |
|
372 | RMAPTimeout.start(); | |
373 | // write timeout |
|
373 | // write timeout | |
374 | while(RMAPSend_SOCKET->bytesToWrite() > 0) |
|
374 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
375 | { |
|
375 | { | |
376 | RMAPSend_SOCKET->waitForBytesWritten(100); |
|
376 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
377 | if(RMAPTimeout.elapsed()>1000) |
|
377 | if(RMAPTimeout.elapsed()>1000) | |
378 | { |
|
378 | { | |
379 | emit appendToLog("WARNING === in function READ of rmapplugin *** sending Read RMAP Command timeout\n"); |
|
379 | emit appendToLog("WARNING === in function READ of rmapplugin *** sending Read RMAP Command timeout\n"); | |
380 | return 0; |
|
380 | return 0; | |
381 | } |
|
381 | } | |
382 | } |
|
382 | } | |
383 |
|
383 | |||
384 | // RECEIVE THE INCOMING RMAP PACKET |
|
384 | // RECEIVE THE INCOMING RMAP PACKET | |
385 | errorCode = receiveSPWPacket(1); // request ID 1 is for RMAP packet |
|
385 | errorCode = receiveSPWPacket(1); // request ID 1 is for RMAP packet | |
386 | if (errorCode<=0) |
|
386 | if (errorCode<=0) | |
387 | { |
|
387 | { | |
388 | emit appendToLog("WARNING === in function ReadBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); |
|
388 | emit appendToLog("WARNING === in function ReadBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); | |
389 | return 0; |
|
389 | return 0; | |
390 | } |
|
390 | } | |
391 | dataLength = rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH; |
|
391 | dataLength = rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH; | |
392 | if(dataLength != nbBytes) |
|
392 | if(dataLength != nbBytes) | |
393 | { |
|
393 | { | |
394 | emit appendToLog("WARNING === in function READ of rmapplugin *** number of data received (" |
|
394 | emit appendToLog("WARNING === in function READ of rmapplugin *** number of data received (" | |
395 | +QString::number(dataLength) |
|
395 | +QString::number(dataLength) | |
396 | +") not equal to number of data requested (" |
|
396 | +") not equal to number of data requested (" | |
397 | +QString::number(nbBytes) |
|
397 | +QString::number(nbBytes) | |
398 | +")"); |
|
398 | +")"); | |
399 | return 0; |
|
399 | return 0; | |
400 | } |
|
400 | } | |
401 | return dataLength; |
|
401 | return dataLength; | |
402 | } |
|
402 | } | |
403 |
|
403 | |||
404 | unsigned int gresb::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) |
|
404 | unsigned int gresb::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) | |
405 | { |
|
405 | { | |
406 | char protocoleIdentifier = 0x02; |
|
406 | char protocoleIdentifier = 0x02; | |
407 | char reserved = 0x00; |
|
407 | char reserved = 0x00; | |
408 | char gresbProtocole = 0x00; |
|
408 | char gresbProtocole = 0x00; | |
409 | unsigned char size[3]; |
|
409 | unsigned char size[3]; | |
410 | unsigned int spwPacketSize = count + 4; |
|
410 | unsigned int spwPacketSize = count + 4; | |
411 | QTime SPWTimeout; |
|
411 | QTime SPWTimeout; | |
412 |
|
412 | |||
413 | if (count>248) |
|
413 | if (count>248) | |
414 | { |
|
414 | { | |
415 | appendToLog("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n"); |
|
415 | appendToLog("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n"); | |
416 | return 1; |
|
416 | return 1; | |
417 | } |
|
417 | } | |
418 |
|
418 | |||
419 | appendToLog(QString("*** START *** Send CCSDS packet of ")+ QString::number(count) + QString(" byte(s)")); |
|
419 | appendToLog(QString("*** START *** Send CCSDS packet of ")+ QString::number(count) + QString(" byte(s)")); | |
420 |
|
420 | |||
421 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) |
|
421 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
422 | { |
|
422 | { | |
423 | this->Close(); |
|
423 | this->Close(); | |
424 | appendToLog("WARNING === in function WRITE of rmapplugin *** SPW link not running\n"); |
|
424 | appendToLog("WARNING === in function WRITE of rmapplugin *** SPW link not running\n"); | |
425 | return 1; |
|
425 | return 1; | |
426 | } |
|
426 | } | |
427 |
|
427 | |||
428 | // SEND GRESB HEADER |
|
428 | // SEND GRESB HEADER | |
429 | size[0] = (unsigned char) ((unsigned int) spwPacketSize>>16); |
|
429 | size[0] = (unsigned char) ((unsigned int) spwPacketSize>>16); | |
430 | size[1] = (unsigned char) ((unsigned int) spwPacketSize>>8); |
|
430 | size[1] = (unsigned char) ((unsigned int) spwPacketSize>>8); | |
431 | size[2] = (unsigned char) ((unsigned int) spwPacketSize); |
|
431 | size[2] = (unsigned char) ((unsigned int) spwPacketSize); | |
432 | RMAPSend_SOCKET->write(&gresbProtocole, 1); |
|
432 | RMAPSend_SOCKET->write(&gresbProtocole, 1); | |
433 | RMAPSend_SOCKET->write((char*) size, 3); |
|
433 | RMAPSend_SOCKET->write((char*) size, 3); | |
434 | // SEND SPW HEADER |
|
434 | // SEND SPW HEADER | |
435 | RMAPSend_SOCKET->write(&targetLogicalAddress, 1); |
|
435 | RMAPSend_SOCKET->write(&targetLogicalAddress, 1); | |
436 | RMAPSend_SOCKET->write(&protocoleIdentifier, 1); |
|
436 | RMAPSend_SOCKET->write(&protocoleIdentifier, 1); | |
437 | RMAPSend_SOCKET->write(&reserved, 1); |
|
437 | RMAPSend_SOCKET->write(&reserved, 1); | |
438 | RMAPSend_SOCKET->write(&userApplication, 1); |
|
438 | RMAPSend_SOCKET->write(&userApplication, 1); | |
439 | // SEND CCSDS PACKET |
|
439 | // SEND CCSDS PACKET | |
440 | RMAPSend_SOCKET->write(Value, count); |
|
440 | RMAPSend_SOCKET->write(Value, count); | |
441 | SPWTimeout.start(); |
|
441 | SPWTimeout.start(); | |
442 | while(RMAPSend_SOCKET->bytesToWrite() > 0) |
|
442 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
443 | { |
|
443 | { | |
444 | RMAPSend_SOCKET->waitForBytesWritten(100); |
|
444 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
445 | if(SPWTimeout.elapsed()>1000) |
|
445 | if(SPWTimeout.elapsed()>1000) | |
446 | { |
|
446 | { | |
447 | appendToLog("WARNING === in function WRITE of rmapplugin *** sending CCSDS packet timeout\n"); |
|
447 | appendToLog("WARNING === in function WRITE of rmapplugin *** sending CCSDS packet timeout\n"); | |
448 | return 1; |
|
448 | return 1; | |
449 | } |
|
449 | } | |
450 | } |
|
450 | } | |
451 |
|
451 | |||
452 | appendToLog(QString("*** CCSDS packet sent")); |
|
452 | appendToLog(QString("*** CCSDS packet sent")); | |
453 |
|
453 | |||
454 | return count; |
|
454 | return count; | |
455 | } |
|
455 | } | |
456 |
|
456 | |||
457 | int gresb::receiveSPWPacketLoop(unsigned char requestID) |
|
457 | int gresb::receiveSPWPacketLoop(unsigned char requestID) | |
458 | { |
|
458 | { | |
459 | int result = 0; |
|
459 | int result = 0; | |
460 | while (RMAPReceive_SOCKET->bytesAvailable()) |
|
460 | while (RMAPReceive_SOCKET->bytesAvailable()) | |
461 | { |
|
461 | { | |
462 | result = receiveSPWPacket(requestID); |
|
462 | result = receiveSPWPacket(requestID); | |
463 | } |
|
463 | } | |
464 | if (!ccsdsPacketStore.isEmpty()) |
|
464 | if (!ccsdsPacketStore.isEmpty()) | |
465 | { |
|
465 | { | |
466 | emit packetStoreNotEmpty(); |
|
466 | emit packetStoreNotEmpty(); | |
467 | } |
|
467 | } | |
468 | return result; |
|
468 | return result; | |
469 | } |
|
469 | } | |
470 |
|
470 | |||
471 | int gresb::receiveSPWPacket(unsigned char requestID) // SLOT |
|
471 | int gresb::receiveSPWPacket(unsigned char requestID) // SLOT | |
472 | { |
|
472 | { | |
473 | QTime spwPacketReceiverTimeout; |
|
473 | QTime spwPacketReceiverTimeout; | |
474 | // GRESB HEADER |
|
474 | // GRESB HEADER | |
475 | char RES_TR_EP; // 6 bits REserved + 1 bit TRuncated + 1 bit EP error end of packet |
|
475 | char RES_TR_EP; // 6 bits REserved + 1 bit TRuncated + 1 bit EP error end of packet | |
476 | unsigned char packetLength2; |
|
476 | unsigned char packetLength2; | |
477 | unsigned char packetLength1; |
|
477 | unsigned char packetLength1; | |
478 | unsigned char packetLength0; |
|
478 | unsigned char packetLength0; | |
479 | unsigned int packetLength; |
|
479 | unsigned int packetLength; | |
480 |
|
480 | |||
481 | if (requestID==1) |
|
481 | if (requestID==1) | |
482 | { |
|
482 | { | |
483 | if (rmapPacketSEMAPHORE->available()) return rmapPacketSize; |
|
483 | if (rmapPacketSEMAPHORE->available()) return rmapPacketSize; | |
484 | } |
|
484 | } | |
485 |
|
485 | |||
486 | RMAPReceive_SOCKET->blockSignals(1); // block the signals of the socket during packet reception |
|
486 | RMAPReceive_SOCKET->blockSignals(1); // block the signals of the socket during packet reception | |
487 | // READ THE GRESB HEADER OF THE INCOMING PACKET |
|
487 | // READ THE GRESB HEADER OF THE INCOMING PACKET | |
488 | spwPacketReceiverTimeout.start(); |
|
488 | spwPacketReceiverTimeout.start(); | |
489 | while(RMAPReceive_SOCKET->bytesAvailable() < 4) |
|
489 | while(RMAPReceive_SOCKET->bytesAvailable() < 4) | |
490 | { |
|
490 | { | |
491 | RMAPReceive_SOCKET->waitForReadyRead(100); |
|
491 | RMAPReceive_SOCKET->waitForReadyRead(100); | |
492 | if(spwPacketReceiverTimeout.elapsed()>1000) return -1; // ERROR === read GRSEB header TIMEOUT |
|
492 | if(spwPacketReceiverTimeout.elapsed()>1000) return -1; // ERROR === read GRSEB header TIMEOUT | |
493 | } |
|
493 | } | |
494 | RMAPReceive_SOCKET->read(&RES_TR_EP, 1); |
|
494 | RMAPReceive_SOCKET->read(&RES_TR_EP, 1); | |
495 | RMAPReceive_SOCKET->read( (char*) &packetLength2, 1); |
|
495 | RMAPReceive_SOCKET->read( (char*) &packetLength2, 1); | |
496 | RMAPReceive_SOCKET->read( (char*) &packetLength1, 1); |
|
496 | RMAPReceive_SOCKET->read( (char*) &packetLength1, 1); | |
497 | RMAPReceive_SOCKET->read( (char*) &packetLength0, 1); |
|
497 | RMAPReceive_SOCKET->read( (char*) &packetLength0, 1); | |
498 | packetLength = (packetLength2<<16) + (packetLength1<<8) + (packetLength0); |
|
498 | packetLength = (packetLength2<<16) + (packetLength1<<8) + (packetLength0); | |
499 |
|
499 | |||
500 | // READ THE SPW PACKET |
|
500 | // READ THE SPW PACKET | |
501 | while(RMAPReceive_SOCKET->bytesAvailable() < packetLength) |
|
501 | while(RMAPReceive_SOCKET->bytesAvailable() < packetLength) | |
502 | { |
|
502 | { | |
503 | RMAPReceive_SOCKET->waitForReadyRead(100); |
|
503 | RMAPReceive_SOCKET->waitForReadyRead(100); | |
504 | if(spwPacketReceiverTimeout.elapsed()>1000) return -2; // ERROR === read SPW packet TIMEOUT |
|
504 | if(spwPacketReceiverTimeout.elapsed()>1000) return -2; // ERROR === read SPW packet TIMEOUT | |
505 | } |
|
505 | } | |
506 | RMAPReceive_SOCKET->read( spwPacket, packetLength ); |
|
506 | RMAPReceive_SOCKET->read( spwPacket, packetLength ); | |
507 | RMAPReceive_SOCKET->blockSignals(0); |
|
507 | RMAPReceive_SOCKET->blockSignals(0); | |
508 | //emit sendMessage("Packet of size " + QString::number(packetLength) + " received"); |
|
508 | //emit sendMessage("Packet of size " + QString::number(packetLength) + " received"); | |
509 |
|
509 | |||
510 | switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet |
|
510 | switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet | |
511 | { |
|
511 | { | |
512 | case 1: // 0x01 is the protocole identifier for RMAP packets |
|
512 | case 1: // 0x01 is the protocole identifier for RMAP packets | |
513 | if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet |
|
513 | if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet | |
514 | for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i]; |
|
514 | for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i]; | |
515 | rmapPacketSize = packetLength; |
|
515 | rmapPacketSize = packetLength; | |
516 | rmapPacketSEMAPHORE->release(); |
|
516 | rmapPacketSEMAPHORE->release(); | |
517 | emit sendMessage("RMAP packet of size " + QString::number(packetLength) + " received"); |
|
517 | emit sendMessage("RMAP packet of size " + QString::number(packetLength) + " received"); | |
518 | return packetLength; |
|
518 | return packetLength; | |
519 |
|
519 | |||
520 | case 2: // 0x02 is the protocole identifier for CCSDS packets |
|
520 | case 2: // 0x02 is the protocole identifier for CCSDS packets | |
521 | /*if (ccsdsPacketSEMAPHORE->available()!=0) |
|
521 | /*if (ccsdsPacketSEMAPHORE->available()!=0) | |
522 | { |
|
522 | { | |
523 | emit sendMessage("in function [receiveSPWPacket] === ERROR === previous CCSDS packet not processed yet"); |
|
523 | emit sendMessage("in function [receiveSPWPacket] === ERROR === previous CCSDS packet not processed yet"); | |
524 | return -4; // ERROR === previous CCSDS packet not processed yet |
|
524 | return -4; // ERROR === previous CCSDS packet not processed yet | |
525 | }*/ |
|
525 | }*/ | |
526 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; |
|
526 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; | |
527 | ccsdsPacketSize = packetLength; |
|
527 | ccsdsPacketSize = packetLength; | |
528 | //ccsdsPacketSEMAPHORE->release(); |
|
|||
529 | //emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); |
|
|||
530 | //emit sendMessage("CCSDS packet of size " + QString::number(packetLength) + " received"); |
|
|||
531 | storeCCSDSPacket(ccsdsPacket, packetLength); |
|
528 | storeCCSDSPacket(ccsdsPacket, packetLength); | |
532 | return packetLength; |
|
529 | return packetLength; | |
533 | } |
|
530 | } | |
534 | return 0; |
|
531 | return 0; | |
535 | } |
|
532 | } | |
536 |
|
533 | |||
537 | unsigned int gresb::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) |
|
534 | unsigned int gresb::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) | |
538 | { |
|
535 | { | |
539 | unsigned int i; |
|
536 | TMPacketToRead *packet; | |
540 | ccsdsPacketToProcess_t ccsdsPacketToStore; |
|
|||
541 |
|
537 | |||
542 | ccsdsPacketToStore.size = size; |
|
538 | packet = new TMPacketToRead(ccsdsPacket, size); | |
543 | for(i=0; i<size; i++) |
|
539 | ccsdsPacketStore.append(packet); | |
544 | { |
|
540 | ||
545 | ccsdsPacketToStore.data[i] = ccsdsPacket[i]; |
|
|||
546 | } |
|
|||
547 | ccsdsPacketStore << ccsdsPacketToStore; |
|
|||
548 | //emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); |
|
|||
549 | //emit ccsdsPacketIsAvailable(size); |
|
|||
550 | return 1; |
|
541 | return 1; | |
551 | } |
|
542 | } | |
552 |
|
543 | |||
553 | void gresb::Open() // SLOT |
|
544 | void gresb::Open() // SLOT | |
554 | { |
|
545 | { | |
555 | bool spwRunning = true; |
|
546 | bool spwRunning = true; | |
556 | RMAPSend_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), |
|
547 | RMAPSend_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), | |
557 | 3000 + gresbVirtualLinkSpinBox->value()*2, |
|
548 | 3000 + gresbVirtualLinkSpinBox->value()*2, | |
558 | QIODevice::WriteOnly); |
|
549 | QIODevice::WriteOnly); | |
559 | RMAPReceive_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), |
|
550 | RMAPReceive_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), | |
560 | 3000 + gresbVirtualLinkSpinBox->value()*2+1, |
|
551 | 3000 + gresbVirtualLinkSpinBox->value()*2+1, | |
561 | QIODevice::ReadOnly); |
|
552 | QIODevice::ReadOnly); | |
562 | GRESBStatusQuery_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), |
|
553 | GRESBStatusQuery_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getIP()), | |
563 | 3010, |
|
554 | 3010, | |
564 | QIODevice::ReadWrite); |
|
555 | QIODevice::ReadWrite); | |
565 | GRESBStatusQuery_SOCKET->waitForConnected(10000); |
|
556 | GRESBStatusQuery_SOCKET->waitForConnected(10000); | |
566 | // initialize SPW packet semaphores |
|
557 | // initialize SPW packet semaphores | |
567 | while (rmapPacketSEMAPHORE->available()!=0) rmapPacketSEMAPHORE->acquire(); |
|
558 | while (rmapPacketSEMAPHORE->available()!=0) rmapPacketSEMAPHORE->acquire(); | |
568 | while (ccsdsPacketSEMAPHORE->available()!=0) ccsdsPacketSEMAPHORE->acquire(); |
|
559 | while (ccsdsPacketSEMAPHORE->available()!=0) ccsdsPacketSEMAPHORE->acquire(); | |
569 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) != 0) |
|
560 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) != 0) | |
570 | { |
|
561 | { | |
571 | spwRunning = gresbStatusQueryDialog->exec(); |
|
562 | spwRunning = gresbStatusQueryDialog->exec(); | |
572 | } |
|
563 | } | |
573 | if (spwRunning == false) this->Close(); |
|
564 | if (spwRunning == false) this->Close(); | |
574 | else |
|
565 | else | |
575 | { |
|
566 | { | |
576 | emit appendToLog(QString("SpaceWire running on link ")+ QString::number(spwLinkSpinBox->value())); |
|
567 | emit appendToLog(QString("SpaceWire running on link ")+ QString::number(spwLinkSpinBox->value())); | |
577 | RMAPReceive_SOCKET->readAll(); // read all remaining data from the reception socket |
|
568 | RMAPReceive_SOCKET->readAll(); // read all remaining data from the reception socket | |
578 | emit isOpen(true); |
|
569 | emit isOpen(true); | |
579 | } |
|
570 | } | |
580 | } |
|
571 | } | |
581 |
|
572 | |||
582 | void gresb::Close() // SLOT |
|
573 | void gresb::Close() // SLOT | |
583 | { |
|
574 | { | |
584 | RMAPSend_SOCKET->disconnectFromHost(); |
|
575 | RMAPSend_SOCKET->disconnectFromHost(); | |
585 | RMAPReceive_SOCKET->disconnectFromHost(); |
|
576 | RMAPReceive_SOCKET->disconnectFromHost(); | |
586 | GRESBStatusQuery_SOCKET->disconnectFromHost(); |
|
577 | GRESBStatusQuery_SOCKET->disconnectFromHost(); | |
587 | emit isOpen(false); |
|
578 | emit isOpen(false); | |
588 | } |
|
579 | } | |
589 |
|
580 | |||
590 | int gresb::GRESBStatusQuery() // SLOT |
|
581 | int gresb::GRESBStatusQuery() // SLOT | |
591 | { |
|
582 | { | |
592 | GRESBStatusQueryRequest(LinkStatus, 0); |
|
583 | GRESBStatusQueryRequest(LinkStatus, 0); | |
593 | GRESBStatusQueryRequest(LinkStatus, 1); |
|
584 | GRESBStatusQueryRequest(LinkStatus, 1); | |
594 | GRESBStatusQueryRequest(LinkStatus, 2); |
|
585 | GRESBStatusQueryRequest(LinkStatus, 2); | |
595 | GRESBStatusQueryRequest(LinkStatistics, 0); |
|
586 | GRESBStatusQueryRequest(LinkStatistics, 0); | |
596 | GRESBStatusQueryRequest(LinkStatistics, 1); |
|
587 | GRESBStatusQueryRequest(LinkStatistics, 1); | |
597 | GRESBStatusQueryRequest(LinkStatistics, 2); |
|
588 | GRESBStatusQueryRequest(LinkStatistics, 2); | |
598 | return 0; |
|
589 | return 0; | |
599 | } |
|
590 | } | |
600 |
|
591 | |||
601 | int gresb::GRESBStatusQueryRequest(GresbStatusQueryOption option, char link) |
|
592 | int gresb::GRESBStatusQueryRequest(GresbStatusQueryOption option, char link) | |
602 | { |
|
593 | { | |
603 | gresb_status_query_t statusQueryCommand; |
|
594 | gresb_status_query_t statusQueryCommand; | |
604 | gresb_link_status_reply_t linkStatusReply; |
|
595 | gresb_link_status_reply_t linkStatusReply; | |
605 | gresb_link_statistics_reply_t linkStatisticsReply; |
|
596 | gresb_link_statistics_reply_t linkStatisticsReply; | |
606 | QTime statusQueryTimeout; |
|
597 | QTime statusQueryTimeout; | |
607 | QString console_message; |
|
598 | QString console_message; | |
608 |
|
599 | |||
609 | statusQueryCommand.protocolIdentifier = (char) 0x02; |
|
600 | statusQueryCommand.protocolIdentifier = (char) 0x02; | |
610 | statusQueryCommand.reserved1 = (char) 0x00; |
|
601 | statusQueryCommand.reserved1 = (char) 0x00; | |
611 | statusQueryCommand.reserved0 = (char) 0x00; |
|
602 | statusQueryCommand.reserved0 = (char) 0x00; | |
612 | statusQueryCommand.option = (char) option; |
|
603 | statusQueryCommand.option = (char) option; | |
613 | statusQueryCommand.value3 = (char) 0x00; |
|
604 | statusQueryCommand.value3 = (char) 0x00; | |
614 | statusQueryCommand.value2 = (char) 0x00; |
|
605 | statusQueryCommand.value2 = (char) 0x00; | |
615 | statusQueryCommand.value1 = (char) 0x00; |
|
606 | statusQueryCommand.value1 = (char) 0x00; | |
616 | statusQueryCommand.value0 = (char) link; |
|
607 | statusQueryCommand.value0 = (char) link; | |
617 |
|
608 | |||
618 | GRESBStatusQuery_SOCKET->write((char*) ((void*) &statusQueryCommand), sizeof(statusQueryCommand)); |
|
609 | GRESBStatusQuery_SOCKET->write((char*) ((void*) &statusQueryCommand), sizeof(statusQueryCommand)); | |
619 | GRESBStatusQuery_SOCKET->flush(); |
|
610 | GRESBStatusQuery_SOCKET->flush(); | |
620 | GRESBStatusQuery_SOCKET->waitForBytesWritten(1000); |
|
611 | GRESBStatusQuery_SOCKET->waitForBytesWritten(1000); | |
621 |
|
612 | |||
622 | statusQueryTimeout.start(); |
|
613 | statusQueryTimeout.start(); | |
623 | while(GRESBStatusQuery_SOCKET->bytesToWrite() > 0) |
|
614 | while(GRESBStatusQuery_SOCKET->bytesToWrite() > 0) | |
624 | { |
|
615 | { | |
625 | GRESBStatusQuery_SOCKET->waitForBytesWritten(100); |
|
616 | GRESBStatusQuery_SOCKET->waitForBytesWritten(100); | |
626 | if(statusQueryTimeout.elapsed()>1000) |
|
617 | if(statusQueryTimeout.elapsed()>1000) | |
627 | { |
|
618 | { | |
628 | emit appendToLog("WARNING === in function GRESBStatusQueryRequest of rmapplugin *** sending StatusQueryCommand timeout"); |
|
619 | emit appendToLog("WARNING === in function GRESBStatusQueryRequest of rmapplugin *** sending StatusQueryCommand timeout"); | |
629 | return 1; |
|
620 | return 1; | |
630 | } |
|
621 | } | |
631 | } |
|
622 | } | |
632 |
|
623 | |||
633 | switch (option) |
|
624 | switch (option) | |
634 | { |
|
625 | { | |
635 | case LinkStatus: |
|
626 | case LinkStatus: | |
636 | { |
|
627 | { | |
637 | statusQueryTimeout.start(); |
|
628 | statusQueryTimeout.start(); | |
638 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatusReply)) |
|
629 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatusReply)) | |
639 | { |
|
630 | { | |
640 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); |
|
631 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); | |
641 | if(statusQueryTimeout.elapsed()>1000) |
|
632 | if(statusQueryTimeout.elapsed()>1000) | |
642 | { |
|
633 | { | |
643 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatus => error timeout bytesAvailable()\n"); |
|
634 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatus => error timeout bytesAvailable()\n"); | |
644 | emit appendToLog(console_message); |
|
635 | emit appendToLog(console_message); | |
645 | return 1; |
|
636 | return 1; | |
646 | } |
|
637 | } | |
647 | } |
|
638 | } | |
648 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatusReply), (int) sizeof(linkStatusReply)); |
|
639 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatusReply), (int) sizeof(linkStatusReply)); | |
649 | console_message.sprintf("%x", linkStatusReply.byte0); |
|
640 | console_message.sprintf("%x", linkStatusReply.byte0); | |
650 | spwLinkStatusEnquiry->statusQueryTable->item(0, link)->setText(console_message); |
|
641 | spwLinkStatusEnquiry->statusQueryTable->item(0, link)->setText(console_message); | |
651 | console_message.sprintf("%d", linkStatusReply.byte1); |
|
642 | console_message.sprintf("%d", linkStatusReply.byte1); | |
652 | spwLinkStatusEnquiry->statusQueryTable->item(1, link)->setText(console_message); |
|
643 | spwLinkStatusEnquiry->statusQueryTable->item(1, link)->setText(console_message); | |
653 | if (linkStatusReply.byte0 == 0) return 1; |
|
644 | if (linkStatusReply.byte0 == 0) return 1; | |
654 | break; |
|
645 | break; | |
655 | } |
|
646 | } | |
656 | case LinkStatistics: |
|
647 | case LinkStatistics: | |
657 | { |
|
648 | { | |
658 | statusQueryTimeout.start(); |
|
649 | statusQueryTimeout.start(); | |
659 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatisticsReply)) |
|
650 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatisticsReply)) | |
660 | { |
|
651 | { | |
661 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); |
|
652 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); | |
662 | if(statusQueryTimeout.elapsed()>1000) |
|
653 | if(statusQueryTimeout.elapsed()>1000) | |
663 | { |
|
654 | { | |
664 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatistics => error timeout bytesAvailable()\n"); |
|
655 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatistics => error timeout bytesAvailable()\n"); | |
665 | emit appendToLog(console_message); |
|
656 | emit appendToLog(console_message); | |
666 | return 1; |
|
657 | return 1; | |
667 | } |
|
658 | } | |
668 | } |
|
659 | } | |
669 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatisticsReply), sizeof(linkStatisticsReply)); |
|
660 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatisticsReply), sizeof(linkStatisticsReply)); | |
670 | /*console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataTransmitted)); |
|
661 | /*console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataTransmitted)); | |
671 | UI->spwLinkStatusEnquiry->statusQueryTable->item(9, link)->setText(console_message); |
|
662 | UI->spwLinkStatusEnquiry->statusQueryTable->item(9, link)->setText(console_message); | |
672 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsTransmitted)); |
|
663 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsTransmitted)); | |
673 | UI->spwLinkStatusEnquiry->statusQueryTable->item(8, link)->setText(console_message); |
|
664 | UI->spwLinkStatusEnquiry->statusQueryTable->item(8, link)->setText(console_message); | |
674 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfTruncatedPacketsReceived)); |
|
665 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfTruncatedPacketsReceived)); | |
675 | UI->spwLinkStatusEnquiry->statusQueryTable->item(6, link)->setText(console_message); |
|
666 | UI->spwLinkStatusEnquiry->statusQueryTable->item(6, link)->setText(console_message); | |
676 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsWithEEPReceived)); |
|
667 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsWithEEPReceived)); | |
677 | UI->spwLinkStatusEnquiry->statusQueryTable->item(5, link)->setText(console_message); |
|
668 | UI->spwLinkStatusEnquiry->statusQueryTable->item(5, link)->setText(console_message); | |
678 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataReceived)); |
|
669 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataReceived)); | |
679 | UI->spwLinkStatusEnquiry->statusQueryTable->item(4, link)->setText(console_message); |
|
670 | UI->spwLinkStatusEnquiry->statusQueryTable->item(4, link)->setText(console_message); | |
680 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsReceived)); |
|
671 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsReceived)); | |
681 | UI->spwLinkStatusEnquiry->statusQueryTable->item(3, link)->setText(console_message);*/ |
|
672 | UI->spwLinkStatusEnquiry->statusQueryTable->item(3, link)->setText(console_message);*/ | |
682 | break; |
|
673 | break; | |
683 | } |
|
674 | } | |
684 | case NodeAddressStatistics: |
|
675 | case NodeAddressStatistics: | |
685 | { |
|
676 | { | |
686 | break; |
|
677 | break; | |
687 | } |
|
678 | } | |
688 | case GetRoute: |
|
679 | case GetRoute: | |
689 | { |
|
680 | { | |
690 | break; |
|
681 | break; | |
691 | } |
|
682 | } | |
692 | } |
|
683 | } | |
693 | return 0; |
|
684 | return 0; | |
694 | } |
|
685 | } | |
695 |
|
686 | |||
696 | void gresb::reTestSPWLink() // SLOT |
|
687 | void gresb::reTestSPWLink() // SLOT | |
697 | { |
|
688 | { | |
698 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 0) |
|
689 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 0) | |
699 | { |
|
690 | { | |
700 | gresbStatusQueryDialog->accept(); |
|
691 | gresbStatusQueryDialog->accept(); | |
701 | } |
|
692 | } | |
702 | } |
|
693 | } | |
703 |
|
694 | |||
704 | void gresb::RMAPSendConnectionState(QAbstractSocket::SocketState socketState) // SLOT |
|
695 | void gresb::RMAPSendConnectionState(QAbstractSocket::SocketState socketState) // SLOT | |
705 | { |
|
696 | { | |
706 | rmapSendStateLabel->setText(""); |
|
697 | rmapSendStateLabel->setText(""); | |
707 | QString socketMessage = "RMAP Send Socket State: "; |
|
698 | QString socketMessage = "RMAP Send Socket State: "; | |
708 | switch(socketState) |
|
699 | switch(socketState) | |
709 | { |
|
700 | { | |
710 | case QAbstractSocket::UnconnectedState : |
|
701 | case QAbstractSocket::UnconnectedState : | |
711 | socketMessage.append("0 => Unconnected"); |
|
702 | socketMessage.append("0 => Unconnected"); | |
712 | break; |
|
703 | break; | |
713 | case 1: |
|
704 | case 1: | |
714 | socketMessage.append("1 => HostLookup"); |
|
705 | socketMessage.append("1 => HostLookup"); | |
715 | break; |
|
706 | break; | |
716 | case 2: |
|
707 | case 2: | |
717 | socketMessage.append("2 => Connecting"); |
|
708 | socketMessage.append("2 => Connecting"); | |
718 | break; |
|
709 | break; | |
719 | case 3: |
|
710 | case 3: | |
720 | socketMessage.append("3 => Connected"); |
|
711 | socketMessage.append("3 => Connected"); | |
721 | break; |
|
712 | break; | |
722 | case 4: |
|
713 | case 4: | |
723 | socketMessage.append("4 => Bound"); |
|
714 | socketMessage.append("4 => Bound"); | |
724 | break; |
|
715 | break; | |
725 | case 5: |
|
716 | case 5: | |
726 | socketMessage.append("5 => Closing"); |
|
717 | socketMessage.append("5 => Closing"); | |
727 | break; |
|
718 | break; | |
728 | case 6: |
|
719 | case 6: | |
729 | socketMessage.append("6 => Listening"); |
|
720 | socketMessage.append("6 => Listening"); | |
730 | break; |
|
721 | break; | |
731 | } |
|
722 | } | |
732 | rmapSendStateLabel->setText(socketMessage); |
|
723 | rmapSendStateLabel->setText(socketMessage); | |
733 | emit appendToLog(socketMessage); |
|
724 | emit appendToLog(socketMessage); | |
734 | } |
|
725 | } | |
735 |
|
726 | |||
736 | void gresb::RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState) // SLOT |
|
727 | void gresb::RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState) // SLOT | |
737 | { |
|
728 | { | |
738 | rmapReceiveStateLabel->setText(""); |
|
729 | rmapReceiveStateLabel->setText(""); | |
739 | QString socketMessage = "RMAP Receive Socket State: "; |
|
730 | QString socketMessage = "RMAP Receive Socket State: "; | |
740 | switch(socketState) |
|
731 | switch(socketState) | |
741 | { |
|
732 | { | |
742 | case QAbstractSocket::UnconnectedState : |
|
733 | case QAbstractSocket::UnconnectedState : | |
743 | socketMessage.append("0 => Unconnected"); |
|
734 | socketMessage.append("0 => Unconnected"); | |
744 | break; |
|
735 | break; | |
745 | case 1: |
|
736 | case 1: | |
746 | socketMessage.append("1 => HostLookup"); |
|
737 | socketMessage.append("1 => HostLookup"); | |
747 | break; |
|
738 | break; | |
748 | case 2: |
|
739 | case 2: | |
749 | socketMessage.append("2 => Connecting"); |
|
740 | socketMessage.append("2 => Connecting"); | |
750 | break; |
|
741 | break; | |
751 | case 3: |
|
742 | case 3: | |
752 | socketMessage.append("3 => Connected"); |
|
743 | socketMessage.append("3 => Connected"); | |
753 | break; |
|
744 | break; | |
754 | case 4: |
|
745 | case 4: | |
755 | socketMessage.append("4 => Bound"); |
|
746 | socketMessage.append("4 => Bound"); | |
756 | break; |
|
747 | break; | |
757 | case 5: |
|
748 | case 5: | |
758 | socketMessage.append("5 => Closing"); |
|
749 | socketMessage.append("5 => Closing"); | |
759 | break; |
|
750 | break; | |
760 | case 6: |
|
751 | case 6: | |
761 | socketMessage.append("6 => Listening"); |
|
752 | socketMessage.append("6 => Listening"); | |
762 | break; |
|
753 | break; | |
763 | } |
|
754 | } | |
764 | rmapReceiveStateLabel->setText(socketMessage); |
|
755 | rmapReceiveStateLabel->setText(socketMessage); | |
765 | emit appendToLog(socketMessage); |
|
756 | emit appendToLog(socketMessage); | |
766 | } |
|
757 | } | |
767 |
|
758 | |||
768 | void gresb::GRESBConnectionState(QAbstractSocket::SocketState socketState) // SLOT |
|
759 | void gresb::GRESBConnectionState(QAbstractSocket::SocketState socketState) // SLOT | |
769 | { |
|
760 | { | |
770 | gresbStatusQueryLabel->setText(""); |
|
761 | gresbStatusQueryLabel->setText(""); | |
771 | QString socketMessage = "GRESB status query socket (port 3010): "; |
|
762 | QString socketMessage = "GRESB status query socket (port 3010): "; | |
772 | switch(socketState) |
|
763 | switch(socketState) | |
773 | { |
|
764 | { | |
774 | case QAbstractSocket::UnconnectedState : |
|
765 | case QAbstractSocket::UnconnectedState : | |
775 | socketMessage.append("0 => Unconnected"); |
|
766 | socketMessage.append("0 => Unconnected"); | |
776 | break; |
|
767 | break; | |
777 | case 1: |
|
768 | case 1: | |
778 | socketMessage.append("1 => HostLookup"); |
|
769 | socketMessage.append("1 => HostLookup"); | |
779 | break; |
|
770 | break; | |
780 | case 2: |
|
771 | case 2: | |
781 | socketMessage.append("2 => Connecting"); |
|
772 | socketMessage.append("2 => Connecting"); | |
782 | break; |
|
773 | break; | |
783 | case 3: |
|
774 | case 3: | |
784 | socketMessage.append("3 => Connected"); |
|
775 | socketMessage.append("3 => Connected"); | |
785 | break; |
|
776 | break; | |
786 | case 4: |
|
777 | case 4: | |
787 | socketMessage.append("4 => Bound"); |
|
778 | socketMessage.append("4 => Bound"); | |
788 | break; |
|
779 | break; | |
789 | case 5: |
|
780 | case 5: | |
790 | socketMessage.append("5 => Closing"); |
|
781 | socketMessage.append("5 => Closing"); | |
791 | break; |
|
782 | break; | |
792 | case 6: |
|
783 | case 6: | |
793 | socketMessage.append("6 => Listening"); |
|
784 | socketMessage.append("6 => Listening"); | |
794 | break; |
|
785 | break; | |
795 | } |
|
786 | } | |
796 | gresbStatusQueryLabel->setText(socketMessage); |
|
787 | gresbStatusQueryLabel->setText(socketMessage); | |
797 | } |
|
788 | } | |
798 |
|
789 |
@@ -1,109 +1,110 | |||||
1 | #ifndef GRESB_H |
|
1 | #ifndef GRESB_H | |
2 | #define GRESB_H |
|
2 | #define GRESB_H | |
3 |
|
3 | |||
4 | #include <QWidget> |
|
4 | #include <QWidget> | |
5 | #include <QLabel> |
|
5 | #include <QLabel> | |
6 | #include <QPushButton> |
|
6 | #include <QPushButton> | |
7 | #include <QSpinBox> |
|
7 | #include <QSpinBox> | |
8 | #include <QGridLayout> |
|
8 | #include <QGridLayout> | |
9 | #include <QTcpSocket> |
|
9 | #include <QTcpSocket> | |
10 | #include <QDialog> |
|
10 | #include <QDialog> | |
11 | #include <QSemaphore> |
|
11 | #include <QSemaphore> | |
12 |
|
12 | |||
13 | #include "gresbstatusenquiry.h" |
|
13 | #include "gresbstatusenquiry.h" | |
14 | #include "rmapoperations.h" |
|
14 | #include "rmapoperations.h" | |
15 | #include "qipdialogbox.h" |
|
15 | #include "qipdialogbox.h" | |
16 | #include "ccsds.h" |
|
16 | #include "ccsds.h" | |
|
17 | #include "tmpackettoread.h" | |||
17 |
|
18 | |||
18 | class gresb : public QWidget |
|
19 | class gresb : public QWidget | |
19 | { |
|
20 | { | |
20 | Q_OBJECT |
|
21 | Q_OBJECT | |
21 | public: |
|
22 | public: | |
22 | explicit gresb(QWidget *parent = 0); |
|
23 | explicit gresb(QWidget *parent = 0); | |
23 | ~gresb(); |
|
24 | ~gresb(); | |
24 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
25 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); | |
25 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
26 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); | |
26 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
27 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
27 |
|
28 | |||
28 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
29 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
29 |
QList< |
|
30 | QList<TMPacketToRead*> ccsdsPacketStore; | |
30 |
|
31 | |||
31 | signals: |
|
32 | signals: | |
32 | void sendMessage(QString message); |
|
33 | void sendMessage(QString message); | |
33 | void isOpen(bool); |
|
34 | void isOpen(bool); | |
34 | void RMAP_write_reply_setText(QString); |
|
35 | void RMAP_write_reply_setText(QString); | |
35 | void appendToLog(QString); |
|
36 | void appendToLog(QString); | |
36 | void ccsdsPacketAvailable(unsigned char*, unsigned int); |
|
37 | void ccsdsPacketAvailable(unsigned char*, unsigned int); | |
37 | void packetStoreNotEmpty(); |
|
38 | void packetStoreNotEmpty(); | |
38 |
|
39 | |||
39 | public slots: |
|
40 | public slots: | |
40 | void Open(); |
|
41 | void Open(); | |
41 | void Close(); |
|
42 | void Close(); | |
42 | int receiveSPWPacketLoop(unsigned char requestID=0); |
|
43 | int receiveSPWPacketLoop(unsigned char requestID=0); | |
43 | int receiveSPWPacket(unsigned char requestID=0); |
|
44 | int receiveSPWPacket(unsigned char requestID=0); | |
44 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} |
|
45 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} | |
45 | void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} |
|
46 | void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} | |
46 | void sourceHasChanged(int source) {rmapSourceLogicalAddress = (unsigned char) source;} |
|
47 | void sourceHasChanged(int source) {rmapSourceLogicalAddress = (unsigned char) source;} | |
47 | void ccsdsPacketIsProcessed() {ccsdsPacketSEMAPHORE->tryAcquire();} |
|
48 | void ccsdsPacketIsProcessed() {ccsdsPacketSEMAPHORE->tryAcquire();} | |
48 | void reTestSPWLink(); |
|
49 | void reTestSPWLink(); | |
49 | // |
|
50 | // | |
50 | void RMAPSendConnectionState(QAbstractSocket::SocketState socketState); |
|
51 | void RMAPSendConnectionState(QAbstractSocket::SocketState socketState); | |
51 | void RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState); |
|
52 | void RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState); | |
52 | void GRESBConnectionState(QAbstractSocket::SocketState socketState); |
|
53 | void GRESBConnectionState(QAbstractSocket::SocketState socketState); | |
53 | // |
|
54 | // | |
54 | void setIP(unsigned char address1, unsigned char address2, unsigned char address3, unsigned char address4) |
|
55 | void setIP(unsigned char address1, unsigned char address2, unsigned char address3, unsigned char address4) | |
55 | {this->gresbBridgeIPDialogBox->setIP(address1, address2, address3, address4);} |
|
56 | {this->gresbBridgeIPDialogBox->setIP(address1, address2, address3, address4);} | |
56 |
|
57 | |||
57 | private slots: |
|
58 | private slots: | |
58 | int GRESBStatusQuery(); |
|
59 | int GRESBStatusQuery(); | |
59 |
|
60 | |||
60 | private: |
|
61 | private: | |
61 | unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0); |
|
62 | unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0); | |
62 | unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0); |
|
63 | unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0); | |
63 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->tryAcquire();} |
|
64 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->tryAcquire();} | |
64 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->tryAcquire();} |
|
65 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->tryAcquire();} | |
65 | int GRESBStatusQueryRequest(GresbStatusQueryOption option, char link); |
|
66 | int GRESBStatusQueryRequest(GresbStatusQueryOption option, char link); | |
66 |
|
67 | |||
67 | unsigned char rmapTargetLogicalAddress ; |
|
68 | unsigned char rmapTargetLogicalAddress ; | |
68 | unsigned char rmapSourceLogicalAddress ; |
|
69 | unsigned char rmapSourceLogicalAddress ; | |
69 |
|
70 | |||
70 | RMAP_command_codes commandCode; |
|
71 | RMAP_command_codes commandCode; | |
71 |
|
72 | |||
72 | QPushButton *gresbStatusQueryRetryButton; |
|
73 | QPushButton *gresbStatusQueryRetryButton; | |
73 | QPushButton *gresbStatusQueryAbortButton; |
|
74 | QPushButton *gresbStatusQueryAbortButton; | |
74 |
|
75 | |||
75 | QLabel *gresbBridgeIPLabel; |
|
76 | QLabel *gresbBridgeIPLabel; | |
76 | QLabel *gresbVirtualLinkLabel; |
|
77 | QLabel *gresbVirtualLinkLabel; | |
77 | QLabel *spwLinkLabel; |
|
78 | QLabel *spwLinkLabel; | |
78 | QLabel *rmapSendStateLabel; |
|
79 | QLabel *rmapSendStateLabel; | |
79 | QLabel *rmapReceiveStateLabel; |
|
80 | QLabel *rmapReceiveStateLabel; | |
80 | QLabel *gresbStatusQueryLabel; |
|
81 | QLabel *gresbStatusQueryLabel; | |
81 | QLabel *gresbStatusQueryDialogLabel; |
|
82 | QLabel *gresbStatusQueryDialogLabel; | |
82 |
|
83 | |||
83 | QDialog *gresbStatusQueryDialog; |
|
84 | QDialog *gresbStatusQueryDialog; | |
84 |
|
85 | |||
85 | QIPDialogBox* gresbBridgeIPDialogBox; |
|
86 | QIPDialogBox* gresbBridgeIPDialogBox; | |
86 |
|
87 | |||
87 | QSpinBox *gresbVirtualLinkSpinBox; |
|
88 | QSpinBox *gresbVirtualLinkSpinBox; | |
88 | QSpinBox *spwLinkSpinBox; |
|
89 | QSpinBox *spwLinkSpinBox; | |
89 |
|
90 | |||
90 | QGridLayout *connectionLayout; |
|
91 | QGridLayout *connectionLayout; | |
91 | QGridLayout *gresbStatusQueryDialogLayout; |
|
92 | QGridLayout *gresbStatusQueryDialogLayout; | |
92 |
|
93 | |||
93 | QTcpSocket *RMAPSend_SOCKET; |
|
94 | QTcpSocket *RMAPSend_SOCKET; | |
94 | QTcpSocket *RMAPReceive_SOCKET; |
|
95 | QTcpSocket *RMAPReceive_SOCKET; | |
95 | QTcpSocket *GRESBStatusQuery_SOCKET; |
|
96 | QTcpSocket *GRESBStatusQuery_SOCKET; | |
96 |
|
97 | |||
97 | gresbStatusEnquiry* spwLinkStatusEnquiry; |
|
98 | gresbStatusEnquiry* spwLinkStatusEnquiry; | |
98 |
|
99 | |||
99 | // Packet receiver |
|
100 | // Packet receiver | |
100 | QSemaphore *rmapPacketSEMAPHORE; |
|
101 | QSemaphore *rmapPacketSEMAPHORE; | |
101 | QSemaphore *ccsdsPacketSEMAPHORE; |
|
102 | QSemaphore *ccsdsPacketSEMAPHORE; | |
102 | char* rmapPacket; // The buffer to receive RMAP READ packets |
|
103 | char* rmapPacket; // The buffer to receive RMAP READ packets | |
103 | unsigned char *ccsdsPacket; |
|
104 | unsigned char *ccsdsPacket; | |
104 | char *spwPacket; |
|
105 | char *spwPacket; | |
105 | unsigned int rmapPacketSize; |
|
106 | unsigned int rmapPacketSize; | |
106 | unsigned int ccsdsPacketSize; |
|
107 | unsigned int ccsdsPacketSize; | |
107 | }; |
|
108 | }; | |
108 |
|
109 | |||
109 | #endif // GRESB_H |
|
110 | #endif // GRESB_H |
@@ -1,416 +1,416 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPPMON Software |
|
2 | -- This file is a part of the LPPMON Software | |
3 | -- Copyright (C) 2012, Laboratory of Plasma Physics - CNRS |
|
3 | -- Copyright (C) 2012, Laboratory of Plasma Physics - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Paul LEROY |
|
19 | /*-- Author : Paul LEROY | |
20 | -- Mail : paul.leroy@lpp.polytechnique.fr |
|
20 | -- Mail : paul.leroy@lpp.polytechnique.fr | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #include "rmapplugin.h" |
|
22 | #include "rmapplugin.h" | |
23 | #include <QHostAddress> |
|
23 | #include <QHostAddress> | |
24 | #include <QIODevice> |
|
24 | #include <QIODevice> | |
25 | #include <QApplication> |
|
25 | #include <QApplication> | |
26 | #include <rmappluginpythonwrapper.h> |
|
26 | #include <rmappluginpythonwrapper.h> | |
27 | #include <PythonQt.h> |
|
27 | #include <PythonQt.h> | |
28 | #include <QTimer> |
|
28 | #include <QTimer> | |
29 |
|
29 | |||
30 | rmapplugin::rmapplugin(QWidget *parent) |
|
30 | rmapplugin::rmapplugin(QWidget *parent) | |
31 | :lppmonplugin(parent,false) |
|
31 | :lppmonplugin(parent,false) | |
32 | { |
|
32 | { | |
33 | this->UI = new rmapPluginUI(); |
|
33 | this->UI = new rmapPluginUI(); | |
34 | this->setWindowTitle(tr("RMAP and SPW Communication")); |
|
34 | this->setWindowTitle(tr("RMAP and SPW Communication")); | |
35 | this->setWidget((QWidget*)this->UI); |
|
35 | this->setWidget((QWidget*)this->UI); | |
36 |
|
36 | |||
37 | timeCode = 0; |
|
37 | timeCode = 0; | |
38 | time_COARSE = 0; |
|
38 | time_COARSE = 0; | |
39 | time_FINE = 0; |
|
39 | time_FINE = 0; | |
40 | currentBridge = selectedBridgeIsUnknown; |
|
40 | currentBridge = selectedBridgeIsUnknown; | |
41 |
|
41 | |||
42 | //************** |
|
42 | //************** | |
43 | //Python wrapper |
|
43 | //Python wrapper | |
44 | this->pyObject = new rmappluginPythonWrapper(); |
|
44 | this->pyObject = new rmappluginPythonWrapper(); | |
45 | connect(this->pyObject,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); |
|
45 | connect(this->pyObject,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint))); | |
46 | connect(this->pyObject,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); |
|
46 | connect(this->pyObject,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint))); | |
47 | //** |
|
47 | //** | |
48 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( WriteSPWSig(char*,uint,char,char) ), |
|
48 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( WriteSPWSig(char*,uint,char,char) ), | |
49 | this, SLOT( WriteSPW(char*,uint,char,char)), Qt::DirectConnection ); |
|
49 | this, SLOT( WriteSPW(char*,uint,char,char)), Qt::DirectConnection ); | |
50 | //** |
|
50 | //** | |
51 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateTargetAddress(unsigned char) ), |
|
51 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateTargetAddress(unsigned char) ), | |
52 | this, SLOT( setValueTargetAddress(unsigned char)) ); |
|
52 | this, SLOT( setValueTargetAddress(unsigned char)) ); | |
53 | //** |
|
53 | //** | |
54 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateSourceAddress(unsigned char) ), |
|
54 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL( updateSourceAddress(unsigned char) ), | |
55 | this, SLOT( setValueSourceAddress(unsigned char)) ); |
|
55 | this, SLOT( setValueSourceAddress(unsigned char)) ); | |
56 | //** |
|
56 | //** | |
57 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sendMessage(QString)), |
|
57 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sendMessage(QString)), | |
58 | this, SLOT(displayOnConsole(QString)) ); |
|
58 | this, SLOT(displayOnConsole(QString)) ); | |
59 | //** |
|
59 | //** | |
60 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(fetchPacketSig()), |
|
60 | connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(fetchPacketSig()), | |
61 | this, SLOT(fetchPacket()), Qt::DirectConnection ); |
|
61 | this, SLOT(fetchPacket()), Qt::DirectConnection ); | |
62 | //************** |
|
62 | //************** | |
63 |
|
63 | |||
64 | //************** |
|
64 | //************** | |
65 | // get a smart pointer to the __main__ module of the Python interpreter |
|
65 | // get a smart pointer to the __main__ module of the Python interpreter | |
66 | PythonQtObjectPtr context = PythonQt::self()->getMainModule(); |
|
66 | PythonQtObjectPtr context = PythonQt::self()->getMainModule(); | |
67 | // add a QObject as variable of name "BUTTON_rmapOpenCommunication" to the namespace of the __main__ module |
|
67 | // add a QObject as variable of name "BUTTON_rmapOpenCommunication" to the namespace of the __main__ module | |
68 | context.addObject("BUTTON_rmapOpenCommunication", UI->rmapOpenCommunicationButton); |
|
68 | context.addObject("BUTTON_rmapOpenCommunication", UI->rmapOpenCommunicationButton); | |
69 | context.addObject("BUTTON_rmapCloseCommunication", UI->rmapCloseCommunicationButton); |
|
69 | context.addObject("BUTTON_rmapCloseCommunication", UI->rmapCloseCommunicationButton); | |
70 | context.addObject("BUTTON_selectStarDundee", UI->selectStarDundee_BUTTON); |
|
70 | context.addObject("BUTTON_selectStarDundee", UI->selectStarDundee_BUTTON); | |
71 | context.addObject("BUTTON_selectGRESB", UI->selectGRESB_BUTTON); |
|
71 | context.addObject("BUTTON_selectGRESB", UI->selectGRESB_BUTTON); | |
72 | context.addObject("GRESB_Bridge", UI->gresbBridge); |
|
72 | context.addObject("GRESB_Bridge", UI->gresbBridge); | |
73 | //************** |
|
73 | //************** | |
74 |
|
74 | |||
75 | connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(openBridge())); |
|
75 | connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(openBridge())); | |
76 | connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(closeBridge())); |
|
76 | connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(closeBridge())); | |
77 |
|
77 | |||
78 | // CCSDS |
|
78 | // CCSDS | |
79 | connect(this->UI->sendCCSDSCommandButton, SIGNAL(clicked()), this, SLOT(sendCCSDS())); |
|
79 | connect(this->UI->sendCCSDSCommandButton, SIGNAL(clicked()), this, SLOT(sendCCSDS())); | |
80 | connect(this->UI->send_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(send_TC_LFR_UPDATE_TIME())); |
|
80 | connect(this->UI->send_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(send_TC_LFR_UPDATE_TIME())); | |
81 | connect(this->UI->reset_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(reset_TC_LFR_UPDATE_TIME())); |
|
81 | connect(this->UI->reset_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(reset_TC_LFR_UPDATE_TIME())); | |
82 |
|
82 | |||
83 | // spectralMAtricesDMASimulator |
|
83 | // spectralMAtricesDMASimulator | |
84 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginRead(uint*,uint,uint)), this, SLOT(Read(uint*,uint,uint))); |
|
84 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginRead(uint*,uint,uint)), this, SLOT(Read(uint*,uint,uint))); | |
85 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginWrite(uint*,uint,uint)), this, SLOT(Write(uint*,uint,uint))); |
|
85 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginWrite(uint*,uint,uint)), this, SLOT(Write(uint*,uint,uint))); | |
86 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
86 | connect(this->UI->spectralMatricesDMASimulator, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); | |
87 |
|
87 | |||
88 | // GRESB |
|
88 | // GRESB | |
89 | connect(this->UI->gresbBridge, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
89 | connect(this->UI->gresbBridge, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); | |
90 | connect(this->UI->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); |
|
90 | connect(this->UI->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); | |
91 | connect(this->UI->gresbBridge, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); |
|
91 | connect(this->UI->gresbBridge, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); | |
92 | connect(this->UI->gresbBridge, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); |
|
92 | connect(this->UI->gresbBridge, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); | |
93 | connect(this->UI->gresbBridge, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), |
|
93 | connect(this->UI->gresbBridge, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), | |
94 | this, SLOT(processCCSDSPacket(unsigned char*,uint))); |
|
94 | this, SLOT(processCCSDSPacket(unsigned char*,uint))); | |
95 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->gresbBridge, SLOT(ccsdsPacketIsProcessed())); |
|
95 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->gresbBridge, SLOT(ccsdsPacketIsProcessed())); | |
96 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
96 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
97 | this->UI->gresbBridge, SLOT(targetHasChanged(int))); |
|
97 | this->UI->gresbBridge, SLOT(targetHasChanged(int))); | |
98 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
98 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
99 | this->UI->gresbBridge, SLOT(sourceHasChanged(int))); |
|
99 | this->UI->gresbBridge, SLOT(sourceHasChanged(int))); | |
100 | connect(this->UI->gresbBridge, SIGNAL(packetStoreNotEmpty()), |
|
100 | connect(this->UI->gresbBridge, SIGNAL(packetStoreNotEmpty()), | |
101 | this, SLOT(processPacketStore())); |
|
101 | this, SLOT(processPacketStore())); | |
102 |
|
102 | |||
103 | // Star Dundee |
|
103 | // Star Dundee | |
104 | connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); |
|
104 | connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); | |
105 | connect(this->UI->starDundee, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); |
|
105 | connect(this->UI->starDundee, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); | |
106 | connect(this->UI->starDundee, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); |
|
106 | connect(this->UI->starDundee, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); | |
107 | connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); |
|
107 | connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); | |
108 | connect(this->UI->starDundee, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), |
|
108 | connect(this->UI->starDundee, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), | |
109 | this, SLOT(processCCSDSPacket(unsigned char*,uint))); |
|
109 | this, SLOT(processCCSDSPacket(unsigned char*,uint))); | |
110 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->starDundee, SLOT(ccsdsPacketIsProcessed())); |
|
110 | connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->starDundee, SLOT(ccsdsPacketIsProcessed())); | |
111 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
111 | connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
112 | this->UI->starDundee, SLOT(targetHasChanged(int))); |
|
112 | this->UI->starDundee, SLOT(targetHasChanged(int))); | |
113 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), |
|
113 | connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), | |
114 | this->UI->starDundee, SLOT(sourceHasChanged(int))); |
|
114 | this->UI->starDundee, SLOT(sourceHasChanged(int))); | |
115 | connect(this->UI->starDundee, SIGNAL(packetStoreNotEmpty()), |
|
115 | connect(this->UI->starDundee, SIGNAL(packetStoreNotEmpty()), | |
116 | this, SLOT(processPacketStore())); |
|
116 | this, SLOT(processPacketStore())); | |
117 |
|
117 | |||
118 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); |
|
118 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); | |
119 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(updatePacketStore())); |
|
119 | connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(updatePacketStore(selectedBridge))); | |
120 |
|
120 | |||
121 | } |
|
121 | } | |
122 |
|
122 | |||
123 | rmapplugin::~rmapplugin() |
|
123 | rmapplugin::~rmapplugin() | |
124 | { |
|
124 | { | |
125 | switch(currentBridge) |
|
125 | switch(currentBridge) | |
126 | { |
|
126 | { | |
127 | case selectedBridgeIsGRESB : |
|
127 | case selectedBridgeIsGRESB : | |
128 | if (RMAPSend_SOCKET->isOpen()) RMAPSend_SOCKET->disconnectFromHost(); |
|
128 | if (RMAPSend_SOCKET->isOpen()) RMAPSend_SOCKET->disconnectFromHost(); | |
129 | if (RMAPReceive_SOCKET->isOpen()) RMAPReceive_SOCKET->disconnectFromHost(); |
|
129 | if (RMAPReceive_SOCKET->isOpen()) RMAPReceive_SOCKET->disconnectFromHost(); | |
130 | if (GRESBStatusQuery_SOCKET->isOpen()) GRESBStatusQuery_SOCKET->disconnectFromHost(); |
|
130 | if (GRESBStatusQuery_SOCKET->isOpen()) GRESBStatusQuery_SOCKET->disconnectFromHost(); | |
131 | break; |
|
131 | break; | |
132 | case selectedBridgeIsStarDundee : |
|
132 | case selectedBridgeIsStarDundee : | |
133 | break; |
|
133 | break; | |
134 | default: |
|
134 | default: | |
135 | break; |
|
135 | break; | |
136 | } |
|
136 | } | |
137 | } |
|
137 | } | |
138 |
|
138 | |||
139 | unsigned int rmapplugin::Write(unsigned int *Value, unsigned int count, unsigned int address) |
|
139 | unsigned int rmapplugin::Write(unsigned int *Value, unsigned int count, unsigned int address) | |
140 | { |
|
140 | { | |
141 | unsigned int result; |
|
141 | unsigned int result; | |
142 | switch(currentBridge) |
|
142 | switch(currentBridge) | |
143 | { |
|
143 | { | |
144 | case selectedBridgeIsGRESB : |
|
144 | case selectedBridgeIsGRESB : | |
145 | result = UI->gresbBridge->Write(Value, count, address); |
|
145 | result = UI->gresbBridge->Write(Value, count, address); | |
146 | break; |
|
146 | break; | |
147 | case selectedBridgeIsStarDundee : |
|
147 | case selectedBridgeIsStarDundee : | |
148 | result = UI->starDundee->Write(Value, count, address); |
|
148 | result = UI->starDundee->Write(Value, count, address); | |
149 | break; |
|
149 | break; | |
150 | default: |
|
150 | default: | |
151 | result = 1; |
|
151 | result = 1; | |
152 | break; |
|
152 | break; | |
153 | } |
|
153 | } | |
154 | return result; |
|
154 | return result; | |
155 | } |
|
155 | } | |
156 |
|
156 | |||
157 | unsigned int rmapplugin::Read(unsigned int *Value, unsigned int count, unsigned int address) |
|
157 | unsigned int rmapplugin::Read(unsigned int *Value, unsigned int count, unsigned int address) | |
158 | { |
|
158 | { | |
159 | unsigned int result; |
|
159 | unsigned int result; | |
160 | switch(currentBridge) |
|
160 | switch(currentBridge) | |
161 | { |
|
161 | { | |
162 | case selectedBridgeIsGRESB : |
|
162 | case selectedBridgeIsGRESB : | |
163 | result = UI->gresbBridge->Read(Value, count, address); |
|
163 | result = UI->gresbBridge->Read(Value, count, address); | |
164 | break; |
|
164 | break; | |
165 | case selectedBridgeIsStarDundee : |
|
165 | case selectedBridgeIsStarDundee : | |
166 | result = UI->starDundee->Read(Value, count, address); |
|
166 | result = UI->starDundee->Read(Value, count, address); | |
167 | break; |
|
167 | break; | |
168 | default: |
|
168 | default: | |
169 | result = 1; |
|
169 | result = 1; | |
170 | break; |
|
170 | break; | |
171 | } |
|
171 | } | |
172 | return result; |
|
172 | return result; | |
173 | } |
|
173 | } | |
174 |
|
174 | |||
175 | //////// |
|
175 | //////// | |
176 | // SLOTS |
|
176 | // SLOTS | |
177 |
|
177 | |||
178 | unsigned int rmapplugin::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) // SLOT |
|
178 | unsigned int rmapplugin::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) // SLOT | |
179 | { |
|
179 | { | |
180 | unsigned int result; |
|
180 | unsigned int result; | |
181 | switch(currentBridge) |
|
181 | switch(currentBridge) | |
182 | { |
|
182 | { | |
183 | case selectedBridgeIsGRESB : |
|
183 | case selectedBridgeIsGRESB : | |
184 | result = UI->gresbBridge->WriteSPW(Value, count, targetLogicalAddress, userApplication); |
|
184 | result = UI->gresbBridge->WriteSPW(Value, count, targetLogicalAddress, userApplication); | |
185 | break; |
|
185 | break; | |
186 | case selectedBridgeIsStarDundee : |
|
186 | case selectedBridgeIsStarDundee : | |
187 | result = UI->starDundee->WriteSPW(Value, count, targetLogicalAddress, userApplication); |
|
187 | result = UI->starDundee->WriteSPW(Value, count, targetLogicalAddress, userApplication); | |
188 | break; |
|
188 | break; | |
189 | default: |
|
189 | default: | |
190 | result = 1; |
|
190 | result = 1; | |
191 | break; |
|
191 | break; | |
192 | } |
|
192 | } | |
193 | return result; |
|
193 | return result; | |
194 | } |
|
194 | } | |
195 |
|
195 | |||
196 | void rmapplugin::sendCCSDS() // SLOT |
|
196 | void rmapplugin::sendCCSDS() // SLOT | |
197 | { |
|
197 | { | |
198 | unsigned int nbBYTES_application_data = 8; |
|
198 | unsigned int nbBYTES_application_data = 8; | |
199 | unsigned int count; |
|
199 | unsigned int count; | |
200 | char *tab; |
|
200 | char *tab; | |
201 | unsigned char packetErrorControl1 = 0xaa; |
|
201 | unsigned char packetErrorControl1 = 0xaa; | |
202 | unsigned char packetErrorControl0 = 0xbb; |
|
202 | unsigned char packetErrorControl0 = 0xbb; | |
203 |
|
203 | |||
204 | ccsds_command = new ccsds(1, 0, 0, nbBYTES_application_data+12, 0, 0, 0, 0, 0); // +12 => packet header 6 bytes + data field header 4 bytes + packet error control 2 bytes |
|
204 | ccsds_command = new ccsds(1, 0, 0, nbBYTES_application_data+12, 0, 0, 0, 0, 0); // +12 => packet header 6 bytes + data field header 4 bytes + packet error control 2 bytes | |
205 | /* unsigned char data_field_header, |
|
205 | /* unsigned char data_field_header, | |
206 | unsigned char processID, |
|
206 | unsigned char processID, | |
207 | unsigned int sequence_count, |
|
207 | unsigned int sequence_count, | |
208 | unsigned int packet_length, |
|
208 | unsigned int packet_length, | |
209 | unsigned char acceptance, |
|
209 | unsigned char acceptance, | |
210 | unsigned int completion, |
|
210 | unsigned int completion, | |
211 | unsigned char service_type, |
|
211 | unsigned char service_type, | |
212 | unsigned char service_subtype, |
|
212 | unsigned char service_subtype, | |
213 | unsigned char sourceID*/ |
|
213 | unsigned char sourceID*/ | |
214 |
|
214 | |||
215 | count = nbBYTES_application_data+12; // 12 is the size in bytes of the header |
|
215 | count = nbBYTES_application_data+12; // 12 is the size in bytes of the header | |
216 | tab = (char*) malloc(count); |
|
216 | tab = (char*) malloc(count); | |
217 | tab[0] = ccsds_command->ccsds_header->packetId1; |
|
217 | tab[0] = ccsds_command->ccsds_header->packetId1; | |
218 | tab[1] = ccsds_command->ccsds_header->packetId0; |
|
218 | tab[1] = ccsds_command->ccsds_header->packetId0; | |
219 | tab[2] = ccsds_command->ccsds_header->packetSequenceControl1; |
|
219 | tab[2] = ccsds_command->ccsds_header->packetSequenceControl1; | |
220 | tab[3] = ccsds_command->ccsds_header->packetSequenceControl0; |
|
220 | tab[3] = ccsds_command->ccsds_header->packetSequenceControl0; | |
221 | tab[4] = ccsds_command->ccsds_header->packetLength1; |
|
221 | tab[4] = ccsds_command->ccsds_header->packetLength1; | |
222 | tab[5] = ccsds_command->ccsds_header->packetLength0; |
|
222 | tab[5] = ccsds_command->ccsds_header->packetLength0; | |
223 | tab[6] = ccsds_command->ccsds_header->dataFieldHeader3; |
|
223 | tab[6] = ccsds_command->ccsds_header->dataFieldHeader3; | |
224 | tab[7] = ccsds_command->ccsds_header->dataFieldHeader2; |
|
224 | tab[7] = ccsds_command->ccsds_header->dataFieldHeader2; | |
225 | tab[8] = ccsds_command->ccsds_header->dataFieldHeader1; |
|
225 | tab[8] = ccsds_command->ccsds_header->dataFieldHeader1; | |
226 | tab[9] = ccsds_command->ccsds_header->dataFieldHeader0; |
|
226 | tab[9] = ccsds_command->ccsds_header->dataFieldHeader0; | |
227 | tab[10]=0x00; |
|
227 | tab[10]=0x00; | |
228 | tab[11]=0x00; |
|
228 | tab[11]=0x00; | |
229 | tab[12]=0x00; |
|
229 | tab[12]=0x00; | |
230 | tab[13]=0x00; |
|
230 | tab[13]=0x00; | |
231 | tab[14]=0x00; |
|
231 | tab[14]=0x00; | |
232 | tab[15]=0x00; |
|
232 | tab[15]=0x00; | |
233 | tab[nbBYTES_application_data+10] = packetErrorControl1; |
|
233 | tab[nbBYTES_application_data+10] = packetErrorControl1; | |
234 | tab[nbBYTES_application_data+11] = packetErrorControl0; |
|
234 | tab[nbBYTES_application_data+11] = packetErrorControl0; | |
235 |
|
235 | |||
236 | WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00); |
|
236 | WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00); | |
237 |
|
237 | |||
238 | free(tab); |
|
238 | free(tab); | |
239 | } |
|
239 | } | |
240 |
|
240 | |||
241 | void rmapplugin::openBridge() |
|
241 | void rmapplugin::openBridge() | |
242 | { |
|
242 | { | |
243 | switch(currentBridge) |
|
243 | switch(currentBridge) | |
244 | { |
|
244 | { | |
245 | case selectedBridgeIsGRESB : |
|
245 | case selectedBridgeIsGRESB : | |
246 | this->UI->gresbBridge->Open(); |
|
246 | this->UI->gresbBridge->Open(); | |
247 | break; |
|
247 | break; | |
248 | case selectedBridgeIsStarDundee : |
|
248 | case selectedBridgeIsStarDundee : | |
249 | this->UI->starDundee->Open(); |
|
249 | this->UI->starDundee->Open(); | |
250 | break; |
|
250 | break; | |
251 | default: |
|
251 | default: | |
252 | break; |
|
252 | break; | |
253 | } |
|
253 | } | |
254 | } |
|
254 | } | |
255 |
|
255 | |||
256 | void rmapplugin::closeBridge() |
|
256 | void rmapplugin::closeBridge() | |
257 | { |
|
257 | { | |
258 | switch(currentBridge) |
|
258 | switch(currentBridge) | |
259 | { |
|
259 | { | |
260 | case selectedBridgeIsGRESB : |
|
260 | case selectedBridgeIsGRESB : | |
261 | this->UI->gresbBridge->Close(); |
|
261 | this->UI->gresbBridge->Close(); | |
262 | break; |
|
262 | break; | |
263 | case selectedBridgeIsStarDundee : |
|
263 | case selectedBridgeIsStarDundee : | |
264 | this->UI->starDundee->Close(); |
|
264 | this->UI->starDundee->Close(); | |
265 | break; |
|
265 | break; | |
266 | default: |
|
266 | default: | |
267 | break; |
|
267 | break; | |
268 | } |
|
268 | } | |
269 | } |
|
269 | } | |
270 |
|
270 | |||
271 | void rmapplugin::send_TC_LFR_UPDATE_TIME() |
|
271 | void rmapplugin::send_TC_LFR_UPDATE_TIME() | |
272 | { |
|
272 | { | |
273 | unsigned int nbBYTES_application_data = 6; // Time at CUC format is on 48 bits / 6 bytes |
|
273 | unsigned int nbBYTES_application_data = 6; // Time at CUC format is on 48 bits / 6 bytes | |
274 | unsigned int count; |
|
274 | unsigned int count; | |
275 | char *tab; |
|
275 | char *tab; | |
276 | unsigned char packetErrorControl1 = 0xaa; |
|
276 | unsigned char packetErrorControl1 = 0xaa; | |
277 | unsigned char packetErrorControl0 = 0xbb; |
|
277 | unsigned char packetErrorControl0 = 0xbb; | |
278 |
|
278 | |||
279 | ccsds_command = new ccsds(1, 11, 0, nbBYTES_application_data, 1, 1, 9, 129, 0); |
|
279 | ccsds_command = new ccsds(1, 11, 0, nbBYTES_application_data, 1, 1, 9, 129, 0); | |
280 | /* unsigned char data_field_header, |
|
280 | /* unsigned char data_field_header, | |
281 | unsigned char processID, |
|
281 | unsigned char processID, | |
282 | unsigned int sequence_count, |
|
282 | unsigned int sequence_count, | |
283 | unsigned int packet_length, |
|
283 | unsigned int packet_length, | |
284 | unsigned char acceptance, |
|
284 | unsigned char acceptance, | |
285 | unsigned int completion, |
|
285 | unsigned int completion, | |
286 | unsigned char service_type, |
|
286 | unsigned char service_type, | |
287 | unsigned char service_subtype, |
|
287 | unsigned char service_subtype, | |
288 | unsigned char sourceID*/ |
|
288 | unsigned char sourceID*/ | |
289 |
|
289 | |||
290 | count = nbBYTES_application_data+12; // +12 => packet header 6 bytes + data field header 4 bytes + packet error control 2 bytes |
|
290 | count = nbBYTES_application_data+12; // +12 => packet header 6 bytes + data field header 4 bytes + packet error control 2 bytes | |
291 | tab = (char*) malloc(count); |
|
291 | tab = (char*) malloc(count); | |
292 | tab[0] = ccsds_command->ccsds_header->packetId1; |
|
292 | tab[0] = ccsds_command->ccsds_header->packetId1; | |
293 | tab[1] = ccsds_command->ccsds_header->packetId0; |
|
293 | tab[1] = ccsds_command->ccsds_header->packetId0; | |
294 | tab[2] = ccsds_command->ccsds_header->packetSequenceControl1; |
|
294 | tab[2] = ccsds_command->ccsds_header->packetSequenceControl1; | |
295 | tab[3] = ccsds_command->ccsds_header->packetSequenceControl0; |
|
295 | tab[3] = ccsds_command->ccsds_header->packetSequenceControl0; | |
296 | tab[4] = ccsds_command->ccsds_header->packetLength1; |
|
296 | tab[4] = ccsds_command->ccsds_header->packetLength1; | |
297 | tab[5] = ccsds_command->ccsds_header->packetLength0; |
|
297 | tab[5] = ccsds_command->ccsds_header->packetLength0; | |
298 | tab[6] = ccsds_command->ccsds_header->dataFieldHeader3; |
|
298 | tab[6] = ccsds_command->ccsds_header->dataFieldHeader3; | |
299 | tab[7] = ccsds_command->ccsds_header->dataFieldHeader2; |
|
299 | tab[7] = ccsds_command->ccsds_header->dataFieldHeader2; | |
300 | tab[8] = ccsds_command->ccsds_header->dataFieldHeader1; |
|
300 | tab[8] = ccsds_command->ccsds_header->dataFieldHeader1; | |
301 | tab[9] = ccsds_command->ccsds_header->dataFieldHeader0; |
|
301 | tab[9] = ccsds_command->ccsds_header->dataFieldHeader0; | |
302 | tab[10] = (unsigned char) (time_COARSE>>24); |
|
302 | tab[10] = (unsigned char) (time_COARSE>>24); | |
303 | tab[11] = (unsigned char) (time_COARSE>>18); |
|
303 | tab[11] = (unsigned char) (time_COARSE>>18); | |
304 | tab[12] = (unsigned char) (time_COARSE>>8); |
|
304 | tab[12] = (unsigned char) (time_COARSE>>8); | |
305 | tab[13] = (unsigned char) (time_COARSE); |
|
305 | tab[13] = (unsigned char) (time_COARSE); | |
306 | tab[14] = (unsigned char) (time_FINE>>8); |
|
306 | tab[14] = (unsigned char) (time_FINE>>8); | |
307 | tab[15] = (unsigned char) (time_FINE); |
|
307 | tab[15] = (unsigned char) (time_FINE); | |
308 | tab[nbBYTES_application_data+10] = packetErrorControl1; |
|
308 | tab[nbBYTES_application_data+10] = packetErrorControl1; | |
309 | tab[nbBYTES_application_data+11] = packetErrorControl0; |
|
309 | tab[nbBYTES_application_data+11] = packetErrorControl0; | |
310 |
|
310 | |||
311 | WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00); |
|
311 | WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00); | |
312 |
|
312 | |||
313 | time_COARSE = time_COARSE+1; |
|
313 | time_COARSE = time_COARSE+1; | |
314 |
|
314 | |||
315 | free(tab); |
|
315 | free(tab); | |
316 | } |
|
316 | } | |
317 |
|
317 | |||
318 | void rmapplugin::reset_TC_LFR_UPDATE_TIME() |
|
318 | void rmapplugin::reset_TC_LFR_UPDATE_TIME() | |
319 | { |
|
319 | { | |
320 | time_COARSE = 0; |
|
320 | time_COARSE = 0; | |
321 | time_FINE = 0; |
|
321 | time_FINE = 0; | |
322 | } |
|
322 | } | |
323 |
|
323 | |||
324 | void rmapplugin::RMAP_write_reply_setText(QString text) |
|
324 | void rmapplugin::RMAP_write_reply_setText(QString text) | |
325 | { |
|
325 | { | |
326 | this->UI->RMAP_write_reply->setText(text); |
|
326 | this->UI->RMAP_write_reply->setText(text); | |
327 | } |
|
327 | } | |
328 |
|
328 | |||
329 | void rmapplugin::appendToLog(QString text) |
|
329 | void rmapplugin::appendToLog(QString text) | |
330 | { |
|
330 | { | |
331 | APPENDTOLOG(text); |
|
331 | APPENDTOLOG(text); | |
332 | } |
|
332 | } | |
333 |
|
333 | |||
334 | void rmapplugin::setValueTargetAddress(unsigned char newAddress) |
|
334 | void rmapplugin::setValueTargetAddress(unsigned char newAddress) | |
335 | { |
|
335 | { | |
336 | this->UI->rmapTargetLogicalAddressSpinBox->setValue(newAddress); |
|
336 | this->UI->rmapTargetLogicalAddressSpinBox->setValue(newAddress); | |
337 | } |
|
337 | } | |
338 |
|
338 | |||
339 | void rmapplugin::setValueSourceAddress(unsigned char newAddress) |
|
339 | void rmapplugin::setValueSourceAddress(unsigned char newAddress) | |
340 | { |
|
340 | { | |
341 | this->UI->rmapSourceLogicalAddressSpinBox->setValue(newAddress); |
|
341 | this->UI->rmapSourceLogicalAddressSpinBox->setValue(newAddress); | |
342 | } |
|
342 | } | |
343 |
|
343 | |||
344 | ///////////////////// |
|
344 | ///////////////////// | |
345 | // INTERNAL FUNCTIONS |
|
345 | // INTERNAL FUNCTIONS | |
346 |
|
346 | |||
347 | void rmapplugin::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) // SLOT |
|
347 | void rmapplugin::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) // SLOT | |
348 | { |
|
348 | { | |
349 | QString message; |
|
349 | QString message; | |
350 | unsigned int fine_time_value = 0; |
|
350 | unsigned int fine_time_value = 0; | |
351 | fine_time_value = ((unsigned int) ccsdsPacket[7]<<24) |
|
351 | fine_time_value = ((unsigned int) ccsdsPacket[7]<<24) | |
352 | + ((unsigned int) ccsdsPacket[6]<<16) |
|
352 | + ((unsigned int) ccsdsPacket[6]<<16) | |
353 | + ((unsigned int) ccsdsPacket[5]<<8) |
|
353 | + ((unsigned int) ccsdsPacket[5]<<8) | |
354 | + ((unsigned int) ccsdsPacket[4]); |
|
354 | + ((unsigned int) ccsdsPacket[4]); | |
355 | message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": "); |
|
355 | message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": "); | |
356 | message.append("size " |
|
356 | message.append("size " | |
357 | + QString::number(size) |
|
357 | + QString::number(size) | |
358 | +" *** header " |
|
358 | +" *** header " | |
359 | + QString::number(ccsdsPacket[0], 16) |
|
359 | + QString::number(ccsdsPacket[0], 16) | |
360 | + " " |
|
360 | + " " | |
361 | + QString::number(ccsdsPacket[1], 16) |
|
361 | + QString::number(ccsdsPacket[1], 16) | |
362 | + " " |
|
362 | + " " | |
363 | + QString::number(ccsdsPacket[2], 16) |
|
363 | + QString::number(ccsdsPacket[2], 16) | |
364 | + " " |
|
364 | + " " | |
365 | + QString::number(ccsdsPacket[3], 16) |
|
365 | + QString::number(ccsdsPacket[3], 16) | |
366 | + " *** coarse time " |
|
366 | + " *** coarse time " | |
367 | + QString::number(fine_time_value)); |
|
367 | + QString::number(fine_time_value)); | |
368 | //+ QString::number(ccsdsPacket[4], 16) |
|
368 | //+ QString::number(ccsdsPacket[4], 16) | |
369 | //+" " |
|
369 | //+" " | |
370 | //+ QString::number(ccsdsPacket[5], 16) |
|
370 | //+ QString::number(ccsdsPacket[5], 16) | |
371 | //+" " |
|
371 | //+" " | |
372 | //+ QString::number(ccsdsPacket[6], 16) |
|
372 | //+ QString::number(ccsdsPacket[6], 16) | |
373 | //+" " |
|
373 | //+" " | |
374 | //+ QString::number(ccsdsPacket[7], 16)); |
|
374 | //+ QString::number(ccsdsPacket[7], 16)); | |
375 | displayOnConsole(message); |
|
375 | displayOnConsole(message); | |
376 | ((rmappluginPythonWrapper*)this->pyObject)->storeCCSDSPacket(ccsdsPacket, size); |
|
376 | //((rmappluginPythonWrapper*)this->pyObject)->storeCCSDSPacket(ccsdsPacket, size); | |
377 | emit ccsdsPacketIsProcessed(); |
|
377 | emit ccsdsPacketIsProcessed(); | |
378 | } |
|
378 | } | |
379 |
|
379 | |||
380 | void rmapplugin::processPacketStore() |
|
380 | void rmapplugin::processPacketStore() | |
381 | { |
|
381 | { | |
382 | ((rmappluginPythonWrapper*)this->pyObject)->processPacketStore(); |
|
382 | ((rmappluginPythonWrapper*)this->pyObject)->processPacketStore(); | |
383 | } |
|
383 | } | |
384 |
|
384 | |||
385 | void rmapplugin::updatePacketStore() |
|
385 | void rmapplugin::updatePacketStore(selectedBridge bridge) | |
386 | { |
|
386 | { | |
387 |
switch( |
|
387 | switch(bridge) | |
388 | { |
|
388 | { | |
389 | case selectedBridgeIsGRESB : |
|
389 | case selectedBridgeIsGRESB : | |
390 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->UI->gresbBridge->ccsdsPacketStore); |
|
390 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->UI->gresbBridge->ccsdsPacketStore); | |
391 | break; |
|
391 | break; | |
392 | case selectedBridgeIsStarDundee : |
|
392 | case selectedBridgeIsStarDundee : | |
393 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->UI->starDundee->ccsdsPacketStore); |
|
393 | ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->UI->starDundee->ccsdsPacketStore); | |
394 | break; |
|
394 | break; | |
395 | default: |
|
395 | default: | |
396 | break; |
|
396 | break; | |
397 | } |
|
397 | } | |
398 | } |
|
398 | } | |
399 |
|
399 | |||
400 | int rmapplugin::fetchPacket() |
|
400 | int rmapplugin::fetchPacket() | |
401 | { |
|
401 | { | |
402 | int ret = 0; |
|
402 | int ret = 0; | |
403 |
|
403 | |||
404 | switch(currentBridge) |
|
404 | switch(currentBridge) | |
405 | { |
|
405 | { | |
406 | case selectedBridgeIsGRESB : |
|
406 | case selectedBridgeIsGRESB : | |
407 | break; |
|
407 | break; | |
408 | case selectedBridgeIsStarDundee : |
|
408 | case selectedBridgeIsStarDundee : | |
409 | ret = this->UI->starDundee->receiveSPWPacketLoop(); |
|
409 | ret = this->UI->starDundee->receiveSPWPacketLoop(); | |
410 | break; |
|
410 | break; | |
411 | default: |
|
411 | default: | |
412 | break; |
|
412 | break; | |
413 | } |
|
413 | } | |
414 |
|
414 | |||
415 | return ret; |
|
415 | return ret; | |
416 | } |
|
416 | } |
@@ -1,93 +1,93 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPPMON Software |
|
2 | -- This file is a part of the LPPMON Software | |
3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS |
|
3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #ifndef DRIVER1_H |
|
22 | #ifndef DRIVER1_H | |
23 | #define DRIVER1_H |
|
23 | #define DRIVER1_H | |
24 | #include <rmappluginui.h> |
|
24 | #include <rmappluginui.h> | |
25 | #include <rmapoperations.h> |
|
25 | #include <rmapoperations.h> | |
26 | #include <QMenuBar> |
|
26 | #include <QMenuBar> | |
27 | #include <QMenu> |
|
27 | #include <QMenu> | |
28 | #include <QAction> |
|
28 | #include <QAction> | |
29 | #include <QMainWindow> |
|
29 | #include <QMainWindow> | |
30 | #include <QTcpSocket> |
|
30 | #include <QTcpSocket> | |
31 | #include <QTime> |
|
31 | #include <QTime> | |
32 | #include <ccsds.h> |
|
32 | #include <ccsds.h> | |
33 | #include <QSemaphore> |
|
33 | #include <QSemaphore> | |
34 |
|
34 | |||
35 | #include <lppmonplugin.h> |
|
35 | #include <lppmonplugin.h> | |
36 |
|
36 | |||
37 | #define APPENDTOLOG(message) this->UI->appendToLogFile(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": " + message) |
|
37 | #define APPENDTOLOG(message) this->UI->appendToLogFile(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": " + message) | |
38 |
|
38 | |||
39 | #define READ_WRITE_MAX_COUNTS 4096 // in words |
|
39 | #define READ_WRITE_MAX_COUNTS 4096 // in words | |
40 | #define RMAP_MAX_DATA_LENGTH 4*READ_WRITE_MAX_COUNTS // in bytes, shall be lower than the limit size of SPW packet of the GRESB bridge |
|
40 | #define RMAP_MAX_DATA_LENGTH 4*READ_WRITE_MAX_COUNTS // in bytes, shall be lower than the limit size of SPW packet of the GRESB bridge | |
41 | #define RMAP_READ_REPLY_HEADER_LENGTH 12 // in bytes => ECSS |
|
41 | #define RMAP_READ_REPLY_HEADER_LENGTH 12 // in bytes => ECSS | |
42 | #define RMAP_READ_COMMAND_HEADER_LENGTH 16 // in bytes => ECSS |
|
42 | #define RMAP_READ_COMMAND_HEADER_LENGTH 16 // in bytes => ECSS | |
43 | #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS |
|
43 | #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS | |
44 | #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification |
|
44 | #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification | |
45 |
|
45 | |||
46 | class rmapplugin : public lppmonplugin |
|
46 | class rmapplugin : public lppmonplugin | |
47 | { |
|
47 | { | |
48 | Q_OBJECT |
|
48 | Q_OBJECT | |
49 | public: |
|
49 | public: | |
50 | explicit rmapplugin(QWidget *parent = 0); |
|
50 | explicit rmapplugin(QWidget *parent = 0); | |
51 | ~rmapplugin(); |
|
51 | ~rmapplugin(); | |
52 |
|
52 | |||
53 | public slots: |
|
53 | public slots: | |
54 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
54 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); | |
55 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
55 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); | |
56 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
56 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
57 | void setValueTargetAddress(unsigned char newAddress); |
|
57 | void setValueTargetAddress(unsigned char newAddress); | |
58 | void setValueSourceAddress(unsigned char newAddress); |
|
58 | void setValueSourceAddress(unsigned char newAddress); | |
59 | void openBridge(); |
|
59 | void openBridge(); | |
60 | void closeBridge(); |
|
60 | void closeBridge(); | |
61 | void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
61 | void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
62 | void processPacketStore(); |
|
62 | void processPacketStore(); | |
63 | void updatePacketStore(); |
|
63 | void updatePacketStore(selectedBridge bridge); | |
64 | int fetchPacket(); |
|
64 | int fetchPacket(); | |
65 | // |
|
65 | // | |
66 | void sendCCSDS(); |
|
66 | void sendCCSDS(); | |
67 | void send_TC_LFR_UPDATE_TIME(); |
|
67 | void send_TC_LFR_UPDATE_TIME(); | |
68 | void reset_TC_LFR_UPDATE_TIME(); |
|
68 | void reset_TC_LFR_UPDATE_TIME(); | |
69 | void displayOnConsole(QString message) {this->UI->console->append(message);} |
|
69 | void displayOnConsole(QString message) {this->UI->console->append(message);} | |
70 | // |
|
70 | // | |
71 | void RMAP_write_reply_setText(QString text); |
|
71 | void RMAP_write_reply_setText(QString text); | |
72 | void appendToLog(QString text); |
|
72 | void appendToLog(QString text); | |
73 | // |
|
73 | // | |
74 | void activatePlugin(bool flag) {emit activateSig(flag);} |
|
74 | void activatePlugin(bool flag) {emit activateSig(flag);} | |
75 | void bridgeHasChanged(selectedBridge bridge) {currentBridge = bridge;} |
|
75 | void bridgeHasChanged(selectedBridge bridge) {currentBridge = bridge;} | |
76 |
|
76 | |||
77 | signals: |
|
77 | signals: | |
78 | void ccsdsPacketIsProcessed(); |
|
78 | void ccsdsPacketIsProcessed(); | |
79 |
|
79 | |||
80 | private: |
|
80 | private: | |
81 | selectedBridge currentBridge; |
|
81 | selectedBridge currentBridge; | |
82 | rmapPluginUI* UI; |
|
82 | rmapPluginUI* UI; | |
83 | QTcpSocket* GRESBStatusQuery_SOCKET; |
|
83 | QTcpSocket* GRESBStatusQuery_SOCKET; | |
84 | QTcpSocket* RMAPSend_SOCKET; |
|
84 | QTcpSocket* RMAPSend_SOCKET; | |
85 | QTcpSocket* RMAPReceive_SOCKET; |
|
85 | QTcpSocket* RMAPReceive_SOCKET; | |
86 | ccsds* ccsds_command; |
|
86 | ccsds* ccsds_command; | |
87 | unsigned int rmapPacketSize; |
|
87 | unsigned int rmapPacketSize; | |
88 | unsigned int time_COARSE; |
|
88 | unsigned int time_COARSE; | |
89 | unsigned int time_FINE; |
|
89 | unsigned int time_FINE; | |
90 | char timeCode; |
|
90 | char timeCode; | |
91 | }; |
|
91 | }; | |
92 |
|
92 | |||
93 | #endif // DRIVER1_H |
|
93 | #endif // DRIVER1_H |
@@ -1,70 +1,72 | |||||
1 | # |
|
1 | # | |
2 | # Project created by QtCreator 2011-09-20T08:15:30 |
|
2 | # Project created by QtCreator 2011-09-20T08:15:30 | |
3 | # |
|
3 | # | |
4 | #------------------------------------------------- |
|
4 | #------------------------------------------------- | |
5 |
|
5 | |||
6 | #include(/etc/lppmon/lppmonplugin.prf) |
|
6 | #include(/etc/lppmon/lppmonplugin.prf) | |
7 | CONFIG += lppmonplugin |
|
7 | CONFIG += lppmonplugin | |
8 | TARGET = rmapplugin |
|
8 | TARGET = rmapplugin | |
9 |
|
9 | |||
10 | DEFINES += PLUGIN=rmapplugin |
|
10 | DEFINES += PLUGIN=rmapplugin | |
11 | DEFINES += PLUGINHEADER="\"\\\"rmapplugin.h"\\\"\" |
|
11 | DEFINES += PLUGINHEADER="\"\\\"rmapplugin.h"\\\"\" | |
12 | DEFINES += driver_Name="\"\\\"RMAPPlugin"\\\"\" |
|
12 | DEFINES += driver_Name="\"\\\"RMAPPlugin"\\\"\" | |
13 | DEFINES += driver_Author="\"\\\"Paul Leroy paul.leroy@lpp.polytechnique.fr"\\\"\" |
|
13 | DEFINES += driver_Author="\"\\\"Paul Leroy paul.leroy@lpp.polytechnique.fr"\\\"\" | |
14 | DEFINES += driver_Version="\"\\\"1.1.2"\\\"\" |
|
14 | DEFINES += driver_Version="\"\\\"1.1.2"\\\"\" | |
15 | DEFINES += driver_Description="\"\\\"AHB bus controler, works with Gaisler's AHB plugn' play bus."\\\"\" |
|
15 | DEFINES += driver_Description="\"\\\"AHB bus controler, works with Gaisler's AHB plugn' play bus."\\\"\" | |
16 | DEFINES += driver_can_be_root=1 |
|
16 | DEFINES += driver_can_be_root=1 | |
17 | DEFINES += driver_can_be_child=0 |
|
17 | DEFINES += driver_can_be_child=0 | |
18 | DEFINES += driver_VID=0 |
|
18 | DEFINES += driver_VID=0 | |
19 | DEFINES += driver_PID=0 |
|
19 | DEFINES += driver_PID=0 | |
20 |
|
20 | |||
21 | QT += network |
|
21 | QT += network | |
22 |
|
22 | |||
23 | LIBS += ../spw_usb_driver_v2.62/lib/x86_64/libSpaceWireUSBAPI.so \ |
|
23 | LIBS += ../spw_usb_driver_v2.62/lib/x86_64/libSpaceWireUSBAPI.so \ | |
24 | ../spw_usb_driver_v2.62/lib/x86_64/libConfigLibraryUSB.so |
|
24 | ../spw_usb_driver_v2.62/lib/x86_64/libConfigLibraryUSB.so | |
25 |
|
25 | |||
26 |
|
26 | |||
27 | INCLUDEPATH += \ |
|
27 | INCLUDEPATH += \ | |
28 | $${PWD} \ |
|
28 | $${PWD} \ | |
29 | ../common_PLE \ |
|
29 | ../common_PLE \ | |
30 | ../spw_usb_driver_v2.61/inc |
|
30 | ../spw_usb_driver_v2.61/inc | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | HEADERS += \ |
|
33 | HEADERS += \ | |
34 | rmappluginui.h \ |
|
34 | rmappluginui.h \ | |
35 | rmapplugin.h \ |
|
35 | rmapplugin.h \ | |
36 | rmapoperations.h \ |
|
36 | rmapoperations.h \ | |
37 | ccsds.h \ |
|
37 | ccsds.h \ | |
38 | ../common_PLE/qipdialogbox.h \ |
|
38 | ../common_PLE/qipdialogbox.h \ | |
39 | ../common_PLE/gresbstatusenquiry.h \ |
|
39 | ../common_PLE/gresbstatusenquiry.h \ | |
40 | spectralmatricesdmasimulator.h \ |
|
40 | spectralmatricesdmasimulator.h \ | |
41 | rmappluginpythonwrapper.h \ |
|
41 | rmappluginpythonwrapper.h \ | |
42 | stardundee.h \ |
|
42 | stardundee.h \ | |
43 | ../spw_usb_driver_v2.61/inc/spw_usb_api.h \ |
|
43 | ../spw_usb_driver_v2.61/inc/spw_usb_api.h \ | |
44 | ../spw_usb_driver_v2.61/inc/spw_config_library.h \ |
|
44 | ../spw_usb_driver_v2.61/inc/spw_config_library.h \ | |
45 | gresb.h \ |
|
45 | gresb.h \ | |
46 | tcpackettosend.h |
|
46 | tcpackettosend.h \ | |
|
47 | tmpackettoread.h | |||
47 |
|
48 | |||
48 |
|
49 | |||
49 | SOURCES += \ |
|
50 | SOURCES += \ | |
50 | rmapplugin.cpp \ |
|
51 | rmapplugin.cpp \ | |
51 | rmappluginui.cpp \ |
|
52 | rmappluginui.cpp \ | |
52 | rmapoperations.cpp \ |
|
53 | rmapoperations.cpp \ | |
53 | ccsds.cpp \ |
|
54 | ccsds.cpp \ | |
54 | ../common_PLE/qipdialogbox.cpp \ |
|
55 | ../common_PLE/qipdialogbox.cpp \ | |
55 | ../common_PLE/gresbstatusenquiry.cpp \ |
|
56 | ../common_PLE/gresbstatusenquiry.cpp \ | |
56 | spectralmatricesdmasimulator.cpp \ |
|
57 | spectralmatricesdmasimulator.cpp \ | |
57 | rmappluginpythonwrapper.cpp \ |
|
58 | rmappluginpythonwrapper.cpp \ | |
58 | stardundee.cpp \ |
|
59 | stardundee.cpp \ | |
59 | gresb.cpp \ |
|
60 | gresb.cpp \ | |
60 | tcpackettosend.cpp |
|
61 | tcpackettosend.cpp \ | |
|
62 | tmpackettoread.cpp | |||
61 |
|
63 | |||
62 |
|
64 | |||
63 |
|
65 | |||
64 |
|
66 | |||
65 |
|
67 | |||
66 |
|
68 | |||
67 |
|
69 | |||
68 |
|
70 | |||
69 |
|
71 | |||
70 |
|
72 |
@@ -1,163 +1,165 | |||||
1 | #include "rmappluginpythonwrapper.h" |
|
1 | #include "rmappluginpythonwrapper.h" | |
2 | #include <math.h> |
|
2 | #include <math.h> | |
3 | #include <QApplication> |
|
3 | #include <QApplication> | |
4 |
|
4 | |||
5 | rmappluginPythonWrapper::rmappluginPythonWrapper(QObject *parent) : |
|
5 | rmappluginPythonWrapper::rmappluginPythonWrapper(QObject *parent) : | |
6 | genericPySysdriver(parent) |
|
6 | genericPySysdriver(parent) | |
7 | { |
|
7 | { | |
8 | timer = new QTimer; |
|
8 | timer = new QTimer; | |
9 | timer->setSingleShot(true); |
|
9 | timer->setSingleShot(true); | |
10 | connect(timer, SIGNAL(timeout()), this, SLOT(sendTC())); |
|
10 | connect(timer, SIGNAL(timeout()), this, SLOT(sendTC())); | |
11 | connect(this, SIGNAL(activateTCLoopSig()), this, SLOT(sendTCLoop())); |
|
11 | connect(this, SIGNAL(activateTCLoopSig()), this, SLOT(sendTCLoop())); | |
12 | } |
|
12 | } | |
13 |
|
13 | |||
14 | QList<QVariant> rmappluginPythonWrapper::ReadSPW(unsigned int size) // size is not used |
|
14 | QList<QVariant> rmappluginPythonWrapper::ReadSPW(unsigned int size) // size is not used | |
15 | { |
|
15 | { | |
16 | QList<QVariant> result; |
|
16 | QList<QVariant> result; | |
17 |
|
|
17 | TMPacketToRead *ccsdsPacket; | |
18 |
|
18 | |||
19 | if (!ccsdsPacketStore->isEmpty()) |
|
19 | if (!ccsdsPacketStore->isEmpty()) | |
20 | { |
|
20 | { | |
21 | ccsdsPacket = ccsdsPacketStore->takeFirst(); |
|
21 | ccsdsPacket = ccsdsPacketStore->takeFirst(); | |
22 |
for(unsigned int i = 0;i<ccsdsPacket |
|
22 | for(unsigned int i = 0;i<ccsdsPacket->size;i++) | |
23 | { |
|
23 | { | |
24 |
result.append((QVariant)ccsdsPacket |
|
24 | result.append((QVariant)ccsdsPacket->Value[i]); | |
25 | } |
|
25 | } | |
|
26 | delete(ccsdsPacket); | |||
26 | } |
|
27 | } | |
|
28 | ||||
27 | return result; |
|
29 | return result; | |
28 | } |
|
30 | } | |
29 |
|
31 | |||
30 | void rmappluginPythonWrapper::WriteSPW(QList<int> dataList) |
|
32 | void rmappluginPythonWrapper::WriteSPW(QList<int> dataList) | |
31 | { |
|
33 | { | |
32 | char targetLogicalAddress; |
|
34 | char targetLogicalAddress; | |
33 | char userApplication; |
|
35 | char userApplication; | |
34 | unsigned int count; |
|
36 | unsigned int count; | |
35 | char *Value; |
|
37 | char *Value; | |
36 |
|
38 | |||
37 | unsigned char data[dataList.count()]; |
|
39 | unsigned char data[dataList.count()]; | |
38 |
|
40 | |||
39 | for(int i = 0; i<dataList.count(); i++) // get the data as unsigned char |
|
41 | for(int i = 0; i<dataList.count(); i++) // get the data as unsigned char | |
40 | { |
|
42 | { | |
41 | data[i] = (unsigned char)dataList.at(i); |
|
43 | data[i] = (unsigned char)dataList.at(i); | |
42 | } |
|
44 | } | |
43 | // read the first bytes of the data to get the targetLogicalAddress and the userApplication parameters |
|
45 | // read the first bytes of the data to get the targetLogicalAddress and the userApplication parameters | |
44 | targetLogicalAddress = data[0]; |
|
46 | targetLogicalAddress = data[0]; | |
45 | userApplication = data[3]; |
|
47 | userApplication = data[3]; | |
46 |
|
48 | |||
47 | count = dataList.count() - 4; // the CCSDS header (4 bytes) is added by LPPMON |
|
49 | count = dataList.count() - 4; // the CCSDS header (4 bytes) is added by LPPMON | |
48 | Value = (char*) &data[4]; |
|
50 | Value = (char*) &data[4]; | |
49 |
|
51 | |||
50 | emit WriteSPWSig(Value, count, targetLogicalAddress, userApplication); |
|
52 | emit WriteSPWSig(Value, count, targetLogicalAddress, userApplication); | |
51 | } |
|
53 | } | |
52 |
|
54 | |||
53 | void rmappluginPythonWrapper::WriteSPWDelay(QList<int> dataList, unsigned int delay) |
|
55 | void rmappluginPythonWrapper::WriteSPWDelay(QList<int> dataList, unsigned int delay) | |
54 | { |
|
56 | { | |
55 | char targetLogicalAddress; |
|
57 | char targetLogicalAddress; | |
56 | char userApplication; |
|
58 | char userApplication; | |
57 | unsigned int count; |
|
59 | unsigned int count; | |
58 | char *Value; |
|
60 | char *Value; | |
59 | TCPacketToSend *packet; |
|
61 | TCPacketToSend *packet; | |
60 |
|
62 | |||
61 | unsigned char data[dataList.count()]; |
|
63 | unsigned char data[dataList.count()]; | |
62 |
|
64 | |||
63 | for(int i = 0; i<dataList.count(); i++) // get the data as unsigned char |
|
65 | for(int i = 0; i<dataList.count(); i++) // get the data as unsigned char | |
64 | { |
|
66 | { | |
65 | data[i] = (unsigned char)dataList.at(i); |
|
67 | data[i] = (unsigned char)dataList.at(i); | |
66 | } |
|
68 | } | |
67 | // read the first bytes of the data to get the targetLogicalAddress and the userApplication parameters |
|
69 | // read the first bytes of the data to get the targetLogicalAddress and the userApplication parameters | |
68 | targetLogicalAddress = data[0]; |
|
70 | targetLogicalAddress = data[0]; | |
69 | userApplication = data[3]; |
|
71 | userApplication = data[3]; | |
70 |
|
72 | |||
71 | count = dataList.count() - 4; // the CCSDS header (4 bytes) is added by LPPMON |
|
73 | count = dataList.count() - 4; // the CCSDS header (4 bytes) is added by LPPMON | |
72 | Value = (char*) &data[4]; |
|
74 | Value = (char*) &data[4]; | |
73 |
|
75 | |||
74 | packet = new TCPacketToSend(Value, count, targetLogicalAddress, userApplication, delay); |
|
76 | packet = new TCPacketToSend(Value, count, targetLogicalAddress, userApplication, delay); | |
75 | TCPacketStore.append(packet); |
|
77 | TCPacketStore.append(packet); | |
76 |
|
78 | |||
77 | emit(activateTCLoopSig()); |
|
79 | emit(activateTCLoopSig()); | |
78 |
|
80 | |||
79 | } |
|
81 | } | |
80 |
|
82 | |||
81 | void rmappluginPythonWrapper::processPacketStoreLater(unsigned int delay) |
|
83 | void rmappluginPythonWrapper::processPacketStoreLater(unsigned int delay) | |
82 | { |
|
84 | { | |
83 | emit sendMessage( |
|
85 | emit sendMessage( | |
84 | "*** process packet store in " + QString::number(delay) + " ms" |
|
86 | "*** process packet store in " + QString::number(delay) + " ms" | |
85 | ); |
|
87 | ); | |
86 | QTimer::singleShot(delay, this, SLOT(sendProcessPacketStoreNowSig())); |
|
88 | QTimer::singleShot(delay, this, SLOT(sendProcessPacketStoreNowSig())); | |
87 | } |
|
89 | } | |
88 |
|
90 | |||
89 | void rmappluginPythonWrapper::sendTCLoop() |
|
91 | void rmappluginPythonWrapper::sendTCLoop() | |
90 | { |
|
92 | { | |
91 | unsigned int delay; |
|
93 | unsigned int delay; | |
92 |
|
94 | |||
93 | if (!timer->isActive()) |
|
95 | if (!timer->isActive()) | |
94 | { |
|
96 | { | |
95 | if (!TCPacketStore.isEmpty()) |
|
97 | if (!TCPacketStore.isEmpty()) | |
96 | { |
|
98 | { | |
97 | delay = TCPacketStore.at(0)->delay; |
|
99 | delay = TCPacketStore.at(0)->delay; | |
98 | timer->setInterval(delay); |
|
100 | timer->setInterval(delay); | |
99 | timer->start(); |
|
101 | timer->start(); | |
100 | } |
|
102 | } | |
101 | } |
|
103 | } | |
102 | } |
|
104 | } | |
103 |
|
105 | |||
104 | void rmappluginPythonWrapper::sendTC() |
|
106 | void rmappluginPythonWrapper::sendTC() | |
105 | { |
|
107 | { | |
106 | TCPacketToSend *packet; |
|
108 | TCPacketToSend *packet; | |
107 | unsigned int delay; |
|
109 | unsigned int delay; | |
108 |
|
110 | |||
109 | packet = TCPacketStore.takeFirst(); |
|
111 | packet = TCPacketStore.takeFirst(); | |
110 | // the signal is connected with the option Qt::DirectConnection, thus it is processed immediately |
|
112 | // the signal is connected with the option Qt::DirectConnection, thus it is processed immediately | |
111 | emit(WriteSPWSig(packet->Value, packet->count,packet->targetLogicalAddress, packet->userApplication)); |
|
113 | emit(WriteSPWSig(packet->Value, packet->count,packet->targetLogicalAddress, packet->userApplication)); | |
112 | delete(packet); |
|
114 | delete(packet); | |
113 | if (!TCPacketStore.isEmpty()) |
|
115 | if (!TCPacketStore.isEmpty()) | |
114 | { |
|
116 | { | |
115 | delay = TCPacketStore.at(0)->delay; |
|
117 | delay = TCPacketStore.at(0)->delay; | |
116 | timer->setInterval(delay); |
|
118 | timer->setInterval(delay); | |
117 | timer->start(); |
|
119 | timer->start(); | |
118 | } |
|
120 | } | |
119 | } |
|
121 | } | |
120 |
|
122 | |||
121 | unsigned int rmappluginPythonWrapper::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) |
|
123 | /*unsigned int rmappluginPythonWrapper::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) | |
122 |
|
|
124 | { | |
123 | unsigned int i; |
|
125 | unsigned int i; | |
124 |
|
|
126 | TMPacketToRead ccsdsPacketToStore; | |
125 |
|
|
127 | ||
126 | ccsdsPacketToStore.size = size; |
|
128 | ccsdsPacketToStore.size = size; | |
127 | for(i=0; i<size; i++) |
|
129 | for(i=0; i<size; i++) | |
128 | { |
|
130 | { | |
129 | //ccsdsPacket0[i] = ccsdsPacket[i]; |
|
131 | //ccsdsPacket0[i] = ccsdsPacket[i]; | |
130 | ccsdsPacketToStore.data[i] = ccsdsPacket[i]; |
|
132 | ccsdsPacketToStore.data[i] = ccsdsPacket[i]; | |
131 | } |
|
133 | } | |
132 | ccsdsPacketStore->append(ccsdsPacketToStore); |
|
134 | ccsdsPacketStore->append(ccsdsPacketToStore); | |
133 | emit ccsdsPacketIsAvailable(size); |
|
135 | emit ccsdsPacketIsAvailable(size); | |
134 | return 1; |
|
136 | return 1; | |
135 | } |
|
137 | }*/ | |
136 |
|
138 | |||
137 | void rmappluginPythonWrapper::processPacketStore() |
|
139 | void rmappluginPythonWrapper::processPacketStore() | |
138 | { |
|
140 | { | |
139 |
|
|
141 | while (!ccsdsPacketStore->isEmpty()) | |
140 | { |
|
142 | { | |
141 |
emit ccsdsPacketIsAvailable(ccsdsPacketStore->at(0) |
|
143 | emit ccsdsPacketIsAvailable(ccsdsPacketStore->at(0)->size); | |
142 | } |
|
144 | } | |
143 | } |
|
145 | } | |
144 |
|
146 | |||
145 | void rmappluginPythonWrapper::setTargetAddressValue(unsigned int address) |
|
147 | void rmappluginPythonWrapper::setTargetAddressValue(unsigned int address) | |
146 | { |
|
148 | { | |
147 | unsigned char newAddress; |
|
149 | unsigned char newAddress; | |
148 | newAddress = (unsigned char) address; |
|
150 | newAddress = (unsigned char) address; | |
149 | emit updateTargetAddress(newAddress); |
|
151 | emit updateTargetAddress(newAddress); | |
150 | } |
|
152 | } | |
151 |
|
153 | |||
152 | void rmappluginPythonWrapper::setSourceAddressValue(unsigned int address) |
|
154 | void rmappluginPythonWrapper::setSourceAddressValue(unsigned int address) | |
153 | { |
|
155 | { | |
154 | unsigned char newAddress; |
|
156 | unsigned char newAddress; | |
155 | newAddress = (unsigned char) address; |
|
157 | newAddress = (unsigned char) address; | |
156 | emit updateSourceAddress(newAddress); |
|
158 | emit updateSourceAddress(newAddress); | |
157 | } |
|
159 | } | |
158 |
|
160 | |||
159 | void rmappluginPythonWrapper::ProcessPendingEvents() |
|
161 | void rmappluginPythonWrapper::ProcessPendingEvents() | |
160 | { |
|
162 | { | |
161 | QCoreApplication::processEvents(); |
|
163 | QCoreApplication::processEvents(); | |
162 | } |
|
164 | } | |
163 |
|
165 |
@@ -1,56 +1,57 | |||||
1 | #ifndef RMAPPLUGINPYTHONWRAPPER_H |
|
1 | #ifndef RMAPPLUGINPYTHONWRAPPER_H | |
2 | #define RMAPPLUGINPYTHONWRAPPER_H |
|
2 | #define RMAPPLUGINPYTHONWRAPPER_H | |
3 |
|
3 | |||
4 | #include <QObject> |
|
4 | #include <QObject> | |
5 | #include <genericPySysdriver.h> |
|
5 | #include <genericPySysdriver.h> | |
6 | #include <QList> |
|
6 | #include <QList> | |
7 | #include <QVariant> |
|
7 | #include <QVariant> | |
8 | #include "rmapoperations.h" |
|
8 | #include "rmapoperations.h" | |
9 | #include "ccsds.h" |
|
9 | #include "ccsds.h" | |
10 | #include <tcpackettosend.h> |
|
10 | #include <tcpackettosend.h> | |
|
11 | #include <tmpackettoread.h> | |||
11 | #include <QTimer> |
|
12 | #include <QTimer> | |
12 |
|
13 | |||
13 | class rmappluginPythonWrapper : public genericPySysdriver |
|
14 | class rmappluginPythonWrapper : public genericPySysdriver | |
14 | { |
|
15 | { | |
15 | Q_OBJECT |
|
16 | Q_OBJECT | |
16 | public: |
|
17 | public: | |
17 | explicit rmappluginPythonWrapper(QObject *parent = 0); |
|
18 | explicit rmappluginPythonWrapper(QObject *parent = 0); | |
18 |
|
19 | |||
19 |
QList< |
|
20 | QList<TMPacketToRead*> *ccsdsPacketStore; | |
20 | void processPacketStore(); |
|
21 | void processPacketStore(); | |
21 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
22 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
22 |
|
23 | |||
23 | QList<TCPacketToSend*> TCPacketStore; |
|
24 | QList<TCPacketToSend*> TCPacketStore; | |
24 | QTimer *timer; |
|
25 | QTimer *timer; | |
25 |
|
26 | |||
26 | signals: |
|
27 | signals: | |
27 | void ccsdsPacketIsAvailable(unsigned int size); |
|
28 | void ccsdsPacketIsAvailable(unsigned int size); | |
28 | void wakeUpCallingThread(); |
|
29 | void wakeUpCallingThread(); | |
29 | unsigned int WriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
30 | unsigned int WriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
30 | void updateTargetAddress(unsigned char newAddress); |
|
31 | void updateTargetAddress(unsigned char newAddress); | |
31 | void updateSourceAddress(unsigned char newAddress); |
|
32 | void updateSourceAddress(unsigned char newAddress); | |
32 | void activateTCLoopSig(); |
|
33 | void activateTCLoopSig(); | |
33 | void processPacketStoreNowSig(); |
|
34 | void processPacketStoreNowSig(); | |
34 | void sendMessage(QString message); |
|
35 | void sendMessage(QString message); | |
35 | int fetchPacketSig(); |
|
36 | int fetchPacketSig(); | |
36 |
|
37 | |||
37 | public slots: |
|
38 | public slots: | |
38 | QList<QVariant> ReadSPW(unsigned int size=0); |
|
39 | QList<QVariant> ReadSPW(unsigned int size=0); | |
39 | int fetchPacket() {return emit fetchPacketSig();} |
|
40 | int fetchPacket() {return emit fetchPacketSig();} | |
40 | void WriteSPW(QList<int> dataList); |
|
41 | void WriteSPW(QList<int> dataList); | |
41 | void WriteSPWDelay(QList<int> dataList, unsigned int delay=0); |
|
42 | void WriteSPWDelay(QList<int> dataList, unsigned int delay=0); | |
42 | void processPacketStoreLater(unsigned int delay); |
|
43 | void processPacketStoreLater(unsigned int delay); | |
43 | void sendProcessPacketStoreNowSig(){emit processPacketStoreNowSig();} |
|
44 | void sendProcessPacketStoreNowSig(){emit processPacketStoreNowSig();} | |
44 | void sendTCLoop(); |
|
45 | void sendTCLoop(); | |
45 | void sendTC(); |
|
46 | void sendTC(); | |
46 | void reEmitWriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) |
|
47 | void reEmitWriteSPWSig(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) | |
47 | {emit WriteSPWSig(Value, count, targetLogicalAddress, userApplication);} |
|
48 | {emit WriteSPWSig(Value, count, targetLogicalAddress, userApplication);} | |
48 |
|
49 | |||
49 | void setTargetAddressValue(unsigned int address); |
|
50 | void setTargetAddressValue(unsigned int address); | |
50 | void setSourceAddressValue(unsigned int address); |
|
51 | void setSourceAddressValue(unsigned int address); | |
51 | void ProcessPendingEvents(); |
|
52 | void ProcessPendingEvents(); | |
52 | void BlockAllSignals(); |
|
53 | void BlockAllSignals(); | |
53 |
|
54 | |||
54 | }; |
|
55 | }; | |
55 |
|
56 | |||
56 | #endif // RMAPPLUGINPYTHONWRAPPER_H |
|
57 | #endif // RMAPPLUGINPYTHONWRAPPER_H |
@@ -1,298 +1,301 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPPMON Software |
|
2 | -- This file is a part of the LPPMON Software | |
3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS |
|
3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #include "rmapplugin.h" |
|
22 | #include "rmapplugin.h" | |
23 |
|
23 | |||
24 | rmapPluginUI::rmapPluginUI(QWidget *parent) : |
|
24 | rmapPluginUI::rmapPluginUI(QWidget *parent) : | |
25 | QWidget(parent) |
|
25 | QWidget(parent) | |
26 | { |
|
26 | { | |
27 | spectralMatricesDMASimulator = new SpectralMatricesDMASimulator; |
|
27 | spectralMatricesDMASimulator = new SpectralMatricesDMASimulator; | |
28 | spwTabWidget = new QTabWidget; |
|
28 | spwTabWidget = new QTabWidget; | |
29 | QWidget* spwTabWidgetPage0 = new QWidget; |
|
29 | QWidget* spwTabWidgetPage0 = new QWidget; | |
30 | QWidget* spwTabWidgetPage1 = new QWidget; |
|
30 | QWidget* spwTabWidgetPage1 = new QWidget; | |
31 | QWidget* spwTabWidgetPage2 = new QWidget; |
|
31 | QWidget* spwTabWidgetPage2 = new QWidget; | |
32 | QWidget* spwTabWidgetPage3 = new QWidget; |
|
32 | QWidget* spwTabWidgetPage3 = new QWidget; | |
33 | QWidget* spwTabWidgetPage4 = new QWidget; |
|
33 | QWidget* spwTabWidgetPage4 = new QWidget; | |
34 | bridgeWidget = new QWidget; |
|
34 | bridgeWidget = new QWidget; | |
35 | mainLayout = new QVBoxLayout; |
|
35 | mainLayout = new QVBoxLayout; | |
36 | connectionLayout = new QGridLayout; |
|
36 | connectionLayout = new QGridLayout; | |
37 | ccsdsLayout = new QVBoxLayout; |
|
37 | ccsdsLayout = new QVBoxLayout; | |
38 | consoleLayout = new QVBoxLayout; |
|
38 | consoleLayout = new QVBoxLayout; | |
39 | selectionLayout = new QVBoxLayout; |
|
39 | selectionLayout = new QVBoxLayout; | |
40 | bridgeSelection_LAYOUT = new QGridLayout; |
|
40 | bridgeSelection_LAYOUT = new QGridLayout; | |
41 | generalParameters_LAYOUT = new QGridLayout; |
|
41 | generalParameters_LAYOUT = new QGridLayout; | |
42 |
|
42 | |||
43 | gresb_GROUPBOX = new QGroupBox(tr("GRESB bridge parameters")); |
|
43 | gresb_GROUPBOX = new QGroupBox(tr("GRESB bridge parameters")); | |
44 | stardundee_GROUPBOX = new QGroupBox(tr("Star Dundee brick parameters")); |
|
44 | stardundee_GROUPBOX = new QGroupBox(tr("Star Dundee brick parameters")); | |
45 | selection_GROUPBOX = new QGroupBox(tr("Bridge selection")); |
|
45 | selection_GROUPBOX = new QGroupBox(tr("Bridge selection")); | |
46 | generalParameters_GROUPBOX = new QGroupBox(tr("General parameters")); |
|
46 | generalParameters_GROUPBOX = new QGroupBox(tr("General parameters")); | |
47 |
|
47 | |||
48 | //*** QLABEL ***// |
|
48 | //*** QLABEL ***// | |
49 | gresbBridgeIPLabel = new QLabel(tr("Bridge IP: ")); |
|
49 | gresbBridgeIPLabel = new QLabel(tr("Bridge IP: ")); | |
50 | gresbVirtualLinkLabel = new QLabel(tr("Virtual Link: ")); |
|
50 | gresbVirtualLinkLabel = new QLabel(tr("Virtual Link: ")); | |
51 | spwLinkLabel = new QLabel(tr("SPW Link: ")); |
|
51 | spwLinkLabel = new QLabel(tr("SPW Link: ")); | |
52 | rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: ")); |
|
52 | rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: ")); | |
53 | rmapTargetLogicalAddressLabel = new QLabel(tr("RMAP Target Logical Address: ")); |
|
53 | rmapTargetLogicalAddressLabel = new QLabel(tr("RMAP Target Logical Address: ")); | |
54 | logFileName = new QLabel; |
|
54 | logFileName = new QLabel; | |
55 | gresbStatusQueryLabel = new QLabel(tr("Status query socket (port 3010): waiting for connection")); |
|
55 | gresbStatusQueryLabel = new QLabel(tr("Status query socket (port 3010): waiting for connection")); | |
56 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); |
|
56 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); | |
57 | sendCCSDSCommandLabel = new QLabel(tr("Address of the target")); |
|
57 | sendCCSDSCommandLabel = new QLabel(tr("Address of the target")); | |
|
58 | nbPacketInStore = new QLabel(tr("nb packets in store: -")); | |||
58 |
|
59 | |||
59 | //*** QPUSHBUTTON ***// |
|
60 | //*** QPUSHBUTTON ***// | |
60 | rmapOpenCommunicationButton = new QPushButton(tr("Open selected bridge")); |
|
61 | rmapOpenCommunicationButton = new QPushButton(tr("Open selected bridge")); | |
61 | rmapCloseCommunicationButton = new QPushButton(tr("Close selected bridge")); |
|
62 | rmapCloseCommunicationButton = new QPushButton(tr("Close selected bridge")); | |
62 | rmapOpenCommunicationButton->setEnabled(false); |
|
63 | rmapOpenCommunicationButton->setEnabled(false); | |
63 | rmapCloseCommunicationButton->setEnabled(false); |
|
64 | rmapCloseCommunicationButton->setEnabled(false); | |
64 | logFileChooseButton = new QPushButton(tr("Choose file")); |
|
65 | logFileChooseButton = new QPushButton(tr("Choose file")); | |
65 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
66 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); | |
66 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
67 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); | |
67 | sendCCSDSCommandButton = new QPushButton(tr("Send CCSDS Command")); |
|
68 | sendCCSDSCommandButton = new QPushButton(tr("Send CCSDS Command")); | |
68 | send_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("Send TC_LFR_UPDATE_TIME Packet")); |
|
69 | send_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("Send TC_LFR_UPDATE_TIME Packet")); | |
69 | reset_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("reset the TC_LFR_UPDATE_TIME Packet coarse and fine times")); |
|
70 | reset_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("reset the TC_LFR_UPDATE_TIME Packet coarse and fine times")); | |
70 | clearConsoleButton = new QPushButton(tr("Clear")); |
|
71 | clearConsoleButton = new QPushButton(tr("Clear")); | |
71 |
|
72 | |||
72 | selectGRESB_BUTTON = new QRadioButton(tr("GRESB")); |
|
73 | selectGRESB_BUTTON = new QRadioButton(tr("GRESB")); | |
73 | selectStarDundee_BUTTON = new QRadioButton(tr("Star Dundee")); |
|
74 | selectStarDundee_BUTTON = new QRadioButton(tr("Star Dundee")); | |
74 |
|
75 | |||
75 | //*** SPINBOX ***// |
|
76 | //*** SPINBOX ***// | |
76 | gresbVirtualLinkSpinBox = new QSpinBox; |
|
77 | gresbVirtualLinkSpinBox = new QSpinBox; | |
77 | rmapSourceLogicalAddressSpinBox = new QSpinBox; |
|
78 | rmapSourceLogicalAddressSpinBox = new QSpinBox; | |
78 | rmapTargetLogicalAddressSpinBox = new QSpinBox; |
|
79 | rmapTargetLogicalAddressSpinBox = new QSpinBox; | |
79 | spwLinkSpinBox = new QSpinBox;; |
|
80 | spwLinkSpinBox = new QSpinBox;; | |
80 | CCSDSTargetLogicalAddressSpinBox = new QSpinBox; |
|
81 | CCSDSTargetLogicalAddressSpinBox = new QSpinBox; | |
81 | gresbVirtualLinkSpinBox->setRange(0, 4); |
|
82 | gresbVirtualLinkSpinBox->setRange(0, 4); | |
82 | gresbVirtualLinkSpinBox->setValue(1); |
|
83 | gresbVirtualLinkSpinBox->setValue(1); | |
83 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); |
|
84 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); | |
84 | rmapSourceLogicalAddressSpinBox->setValue(0); |
|
85 | rmapSourceLogicalAddressSpinBox->setValue(0); | |
85 | rmapTargetLogicalAddressSpinBox->setRange(0, 255); |
|
86 | rmapTargetLogicalAddressSpinBox->setRange(0, 255); | |
86 | spwLinkSpinBox->setRange(0, 2); |
|
87 | spwLinkSpinBox->setRange(0, 2); | |
87 | spwLinkSpinBox->setValue(0); |
|
88 | spwLinkSpinBox->setValue(0); | |
88 | CCSDSTargetLogicalAddressSpinBox->setRange(0,255); |
|
89 | CCSDSTargetLogicalAddressSpinBox->setRange(0,255); | |
89 | CCSDSTargetLogicalAddressSpinBox->setValue(0); |
|
90 | CCSDSTargetLogicalAddressSpinBox->setValue(0); | |
90 |
|
91 | |||
91 | //*** MISC **// |
|
92 | //*** MISC **// | |
92 | starDundee = new StarDundee; |
|
93 | starDundee = new StarDundee; | |
93 | gresbBridge = new gresb; |
|
94 | gresbBridge = new gresb; | |
94 | console = new QTextEdit; |
|
95 | console = new QTextEdit; | |
95 | //gresbBridgeIPDialogBox = new QIPDialogBox; |
|
96 | //gresbBridgeIPDialogBox = new QIPDialogBox; | |
96 | gresbStatusQueryDialog = new QDialog; |
|
97 | gresbStatusQueryDialog = new QDialog; | |
97 | logEnableCheckBox = new QCheckBox(tr("Enable Logs")); |
|
98 | logEnableCheckBox = new QCheckBox(tr("Enable Logs")); | |
98 | RMAP_write_verify = new QCheckBox(tr("data checked before write\nlimited to 4 bytes\nNOT IMPLEMENTED")); |
|
99 | RMAP_write_verify = new QCheckBox(tr("data checked before write\nlimited to 4 bytes\nNOT IMPLEMENTED")); | |
99 | RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable")); |
|
100 | RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable")); | |
100 | spwLinkStatusEnquiry = new gresbStatusEnquiry; |
|
101 | spwLinkStatusEnquiry = new gresbStatusEnquiry; | |
101 | logFile = new QFile(); |
|
102 | logFile = new QFile(); | |
102 |
|
103 | |||
103 | logFileEn = false; |
|
104 | logFileEn = false; | |
104 |
|
105 | |||
105 | connectionLayout->setRowStretch(7, 1); |
|
106 | connectionLayout->setRowStretch(7, 1); | |
106 | connectionLayout->setColumnStretch(2, 1); |
|
107 | connectionLayout->setColumnStretch(2, 1); | |
107 |
|
108 | |||
108 | bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1); |
|
109 | bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1); | |
109 | bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1); |
|
110 | bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1); | |
110 | bridgeSelection_LAYOUT->setRowStretch(1, 1); |
|
111 | bridgeSelection_LAYOUT->setRowStretch(1, 1); | |
111 | bridgeSelection_LAYOUT->setColumnStretch(2, 1); |
|
112 | bridgeSelection_LAYOUT->setColumnStretch(2, 1); | |
112 |
|
113 | |||
113 | generalParameters_LAYOUT->addWidget(logEnableCheckBox, 0, 0, 1, 1); |
|
114 | generalParameters_LAYOUT->addWidget(logEnableCheckBox, 0, 0, 1, 1); | |
114 | generalParameters_LAYOUT->addWidget(logFileChooseButton, 0, 1, 1, 1); |
|
115 | generalParameters_LAYOUT->addWidget(logFileChooseButton, 0, 1, 1, 1); | |
115 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressLabel, 1, 0, 0); |
|
116 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressLabel, 1, 0, 0); | |
116 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressSpinBox, 1, 1, 0); |
|
117 | generalParameters_LAYOUT->addWidget(rmapSourceLogicalAddressSpinBox, 1, 1, 0); | |
117 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressLabel, 2, 0, 0); |
|
118 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressLabel, 2, 0, 0); | |
118 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressSpinBox, 2, 1, 0); |
|
119 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressSpinBox, 2, 1, 0); | |
119 | generalParameters_LAYOUT->addWidget(rmapOpenCommunicationButton, 3, 0, 1, 1); |
|
120 | generalParameters_LAYOUT->addWidget(rmapOpenCommunicationButton, 3, 0, 1, 1); | |
120 | generalParameters_LAYOUT->addWidget(rmapCloseCommunicationButton, 3, 1, 1, 1); |
|
121 | generalParameters_LAYOUT->addWidget(rmapCloseCommunicationButton, 3, 1, 1, 1); | |
121 | generalParameters_LAYOUT->addWidget(RMAP_write_verify, 4, 0, 1, 2); |
|
122 | generalParameters_LAYOUT->addWidget(RMAP_write_verify, 4, 0, 1, 2); | |
122 | generalParameters_LAYOUT->addWidget(RMAP_write_reply, 5, 0, 1, 2); |
|
123 | generalParameters_LAYOUT->addWidget(RMAP_write_reply, 5, 0, 1, 2); | |
|
124 | ||||
123 | generalParameters_LAYOUT->setRowStretch(6, 1); |
|
125 | generalParameters_LAYOUT->setRowStretch(6, 1); | |
124 | generalParameters_LAYOUT->setColumnStretch(2, 1); |
|
126 | generalParameters_LAYOUT->setColumnStretch(2, 1); | |
125 |
|
127 | |||
126 | gresb_GROUPBOX->setLayout(gresbBridge->layout()); |
|
128 | gresb_GROUPBOX->setLayout(gresbBridge->layout()); | |
127 | gresb_GROUPBOX->setVisible(false); |
|
129 | gresb_GROUPBOX->setVisible(false); | |
128 | stardundee_GROUPBOX->setLayout(starDundee->layout()); |
|
130 | stardundee_GROUPBOX->setLayout(starDundee->layout()); | |
129 | stardundee_GROUPBOX->setVisible(false); |
|
131 | stardundee_GROUPBOX->setVisible(false); | |
130 | selection_GROUPBOX->setLayout(bridgeSelection_LAYOUT); |
|
132 | selection_GROUPBOX->setLayout(bridgeSelection_LAYOUT); | |
131 | generalParameters_GROUPBOX->setLayout(generalParameters_LAYOUT); |
|
133 | generalParameters_GROUPBOX->setLayout(generalParameters_LAYOUT); | |
132 | selectionLayout->addWidget(selection_GROUPBOX); |
|
134 | selectionLayout->addWidget(selection_GROUPBOX); | |
133 | selectionLayout->addWidget(generalParameters_GROUPBOX); |
|
135 | selectionLayout->addWidget(generalParameters_GROUPBOX); | |
134 | selectionLayout->addWidget(gresb_GROUPBOX); |
|
136 | selectionLayout->addWidget(gresb_GROUPBOX); | |
135 | selectionLayout->addWidget(stardundee_GROUPBOX); |
|
137 | selectionLayout->addWidget(stardundee_GROUPBOX); | |
136 |
|
138 | |||
137 | ccsdsLayout->addWidget(sendCCSDSCommandButton); |
|
139 | ccsdsLayout->addWidget(sendCCSDSCommandButton); | |
138 | ccsdsLayout->addWidget(send_TC_LFR_UPDATE_TIME_Button); |
|
140 | ccsdsLayout->addWidget(send_TC_LFR_UPDATE_TIME_Button); | |
139 | ccsdsLayout->addWidget(reset_TC_LFR_UPDATE_TIME_Button); |
|
141 | ccsdsLayout->addWidget(reset_TC_LFR_UPDATE_TIME_Button); | |
140 | ccsdsLayout->addWidget(sendCCSDSCommandLabel); |
|
142 | ccsdsLayout->addWidget(sendCCSDSCommandLabel); | |
141 | ccsdsLayout->addWidget(CCSDSTargetLogicalAddressSpinBox); |
|
143 | ccsdsLayout->addWidget(CCSDSTargetLogicalAddressSpinBox); | |
142 |
|
144 | |||
143 | consoleLayout->addWidget(console); |
|
145 | consoleLayout->addWidget(console); | |
144 | consoleLayout->addWidget(clearConsoleButton); |
|
146 | consoleLayout->addWidget(clearConsoleButton); | |
|
147 | consoleLayout->addWidget(nbPacketInStore); | |||
145 |
|
148 | |||
146 | connect(this->logFileChooseButton, SIGNAL(clicked()), this, SLOT(chooseLogFile())); |
|
149 | connect(this->logFileChooseButton, SIGNAL(clicked()), this, SLOT(chooseLogFile())); | |
147 | connect(this, SIGNAL(setLogFileName(QString)), this->logFileName, SLOT(setText(QString))); |
|
150 | connect(this, SIGNAL(setLogFileName(QString)), this->logFileName, SLOT(setText(QString))); | |
148 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); |
|
151 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); | |
149 |
|
152 | |||
150 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); |
|
153 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); | |
151 | spwTabWidget->addTab(spwTabWidgetPage1, tr("ccsds")); |
|
154 | spwTabWidget->addTab(spwTabWidgetPage1, tr("ccsds")); | |
152 | spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); |
|
155 | spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); | |
153 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); |
|
156 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); | |
154 | spwTabWidget->addTab(spwTabWidgetPage4, tr("DMA")); |
|
157 | spwTabWidget->addTab(spwTabWidgetPage4, tr("DMA")); | |
155 |
|
158 | |||
156 | spwTabWidgetPage0->setLayout(selectionLayout); |
|
159 | spwTabWidgetPage0->setLayout(selectionLayout); | |
157 | spwTabWidgetPage1->setLayout(ccsdsLayout); |
|
160 | spwTabWidgetPage1->setLayout(ccsdsLayout); | |
158 | spwTabWidgetPage2->setLayout(this->spwLinkStatusEnquiry->mainLayout); |
|
161 | spwTabWidgetPage2->setLayout(this->spwLinkStatusEnquiry->mainLayout); | |
159 | spwTabWidgetPage3->setLayout(consoleLayout); |
|
162 | spwTabWidgetPage3->setLayout(consoleLayout); | |
160 | spwTabWidgetPage4->setLayout(spectralMatricesDMASimulator->mainLayout); |
|
163 | spwTabWidgetPage4->setLayout(spectralMatricesDMASimulator->mainLayout); | |
161 |
|
164 | |||
162 | mainLayout->addWidget(spwTabWidget); |
|
165 | mainLayout->addWidget(spwTabWidget); | |
163 | setLayout(mainLayout); |
|
166 | setLayout(mainLayout); | |
164 |
|
167 | |||
165 | connect(this->clearConsoleButton, SIGNAL(clicked()), this->console, SLOT(clear())); |
|
168 | connect(this->clearConsoleButton, SIGNAL(clicked()), this->console, SLOT(clear())); | |
166 |
|
169 | |||
167 | // briges |
|
170 | // briges | |
168 | connect(this->selectGRESB_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); |
|
171 | connect(this->selectGRESB_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); | |
169 | connect(this->selectStarDundee_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); |
|
172 | connect(this->selectStarDundee_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); | |
170 | connect(this->starDundee, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); |
|
173 | connect(this->starDundee, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); | |
171 | connect(this->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); |
|
174 | connect(this->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); | |
172 |
|
175 | |||
173 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(sourceHasChanged(int))); |
|
176 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(sourceHasChanged(int))); | |
174 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(targetHasChanged(int))); |
|
177 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->gresbBridge, SLOT(targetHasChanged(int))); | |
175 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(sourceHasChanged(int))); |
|
178 | connect(this->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(sourceHasChanged(int))); | |
176 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(targetHasChanged(int))); |
|
179 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(targetHasChanged(int))); | |
177 |
|
180 | |||
178 | // command code |
|
181 | // command code | |
179 | connect(this->RMAP_write_reply, SIGNAL(clicked()), this, SLOT(getCommandCode())); |
|
182 | connect(this->RMAP_write_reply, SIGNAL(clicked()), this, SLOT(getCommandCode())); | |
180 | connect(this->RMAP_write_verify, SIGNAL(clicked()), this, SLOT(getCommandCode())); |
|
183 | connect(this->RMAP_write_verify, SIGNAL(clicked()), this, SLOT(getCommandCode())); | |
181 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), |
|
184 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), | |
182 | this->starDundee, SLOT(commandCodeHasChanged(RMAP_command_codes))); |
|
185 | this->starDundee, SLOT(commandCodeHasChanged(RMAP_command_codes))); | |
183 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), |
|
186 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), | |
184 | this->gresbBridge, SLOT(commandCodeHasChanged(RMAP_command_codes))); |
|
187 | this->gresbBridge, SLOT(commandCodeHasChanged(RMAP_command_codes))); | |
185 |
|
188 | |||
186 | getCommandCode(); // init the command code value |
|
189 | getCommandCode(); // init the command code value | |
187 | rmapSourceLogicalAddressSpinBox->setValue(DEFAULT_SOURCE); |
|
190 | rmapSourceLogicalAddressSpinBox->setValue(DEFAULT_SOURCE); | |
188 | rmapTargetLogicalAddressSpinBox->setValue(DEFAULT_TARGET); |
|
191 | rmapTargetLogicalAddressSpinBox->setValue(DEFAULT_TARGET); | |
189 | } |
|
192 | } | |
190 |
|
193 | |||
191 | rmapPluginUI::~rmapPluginUI() |
|
194 | rmapPluginUI::~rmapPluginUI() | |
192 | { |
|
195 | { | |
193 | //delete ui; |
|
196 | //delete ui; | |
194 | } |
|
197 | } | |
195 |
|
198 | |||
196 | void rmapPluginUI::chooseLogFile() |
|
199 | void rmapPluginUI::chooseLogFile() | |
197 | { |
|
200 | { | |
198 | if(this->logFile->isOpen()) |
|
201 | if(this->logFile->isOpen()) | |
199 | this->logFile->close(); |
|
202 | this->logFile->close(); | |
200 | this->logFile->setFileName(QFileDialog::getSaveFileName(this,tr("Open Log file"), |
|
203 | this->logFile->setFileName(QFileDialog::getSaveFileName(this,tr("Open Log file"), | |
201 | QDir::homePath() |
|
204 | QDir::homePath() | |
202 | + "/" |
|
205 | + "/" | |
203 | + QDate::currentDate().toString() |
|
206 | + QDate::currentDate().toString() | |
204 | + "_" |
|
207 | + "_" | |
205 | + QTime::currentTime().toString() |
|
208 | + QTime::currentTime().toString() | |
206 | + "_rmapPluginUI.log", |
|
209 | + "_rmapPluginUI.log", | |
207 | tr("Log Files (*.txt *.log)"))); |
|
210 | tr("Log Files (*.txt *.log)"))); | |
208 | if(this->logFile->open(QIODevice::WriteOnly)) |
|
211 | if(this->logFile->open(QIODevice::WriteOnly)) | |
209 | { |
|
212 | { | |
210 | this->logFileStrm = new QTextStream(this->logFile); |
|
213 | this->logFileStrm = new QTextStream(this->logFile); | |
211 | emit this->setLogFileName(this->logFile->fileName()); |
|
214 | emit this->setLogFileName(this->logFile->fileName()); | |
212 | } |
|
215 | } | |
213 | } |
|
216 | } | |
214 |
|
217 | |||
215 | void rmapPluginUI::logFileEnDisable(int state) |
|
218 | void rmapPluginUI::logFileEnDisable(int state) | |
216 | { |
|
219 | { | |
217 | if(state==Qt::Checked) |
|
220 | if(state==Qt::Checked) | |
218 | { |
|
221 | { | |
219 | this->logFileEn = true; |
|
222 | this->logFileEn = true; | |
220 | } |
|
223 | } | |
221 | else if(state==Qt::Unchecked) |
|
224 | else if(state==Qt::Unchecked) | |
222 | { |
|
225 | { | |
223 | this->logFileEn = false; |
|
226 | this->logFileEn = false; | |
224 | } |
|
227 | } | |
225 | } |
|
228 | } | |
226 |
|
229 | |||
227 | bool rmapPluginUI::islogfileenable() |
|
230 | bool rmapPluginUI::islogfileenable() | |
228 | { |
|
231 | { | |
229 | return this->logFileEn; |
|
232 | return this->logFileEn; | |
230 | } |
|
233 | } | |
231 |
|
234 | |||
232 | void rmapPluginUI::appendToLogFile(const QString & text) |
|
235 | void rmapPluginUI::appendToLogFile(const QString & text) | |
233 | { |
|
236 | { | |
234 | if(this->logFileEn && this->logFile->isOpen()) |
|
237 | if(this->logFileEn && this->logFile->isOpen()) | |
235 | { |
|
238 | { | |
236 | *(this->logFileStrm) << text << endl; |
|
239 | *(this->logFileStrm) << text << endl; | |
237 | } |
|
240 | } | |
238 | } |
|
241 | } | |
239 |
|
242 | |||
240 | void rmapPluginUI::closeEvent(QCloseEvent *event) |
|
243 | void rmapPluginUI::closeEvent(QCloseEvent *event) | |
241 | { |
|
244 | { | |
242 | if(this->logFile->isOpen()) |
|
245 | if(this->logFile->isOpen()) | |
243 | { |
|
246 | { | |
244 | this->logFileStrm->flush(); |
|
247 | this->logFileStrm->flush(); | |
245 | this->logFile->waitForBytesWritten(3000); |
|
248 | this->logFile->waitForBytesWritten(3000); | |
246 | this->logFile->close(); |
|
249 | this->logFile->close(); | |
247 | } |
|
250 | } | |
248 | event->accept(); |
|
251 | event->accept(); | |
249 | } |
|
252 | } | |
250 |
|
253 | |||
251 | RMAP_command_codes rmapPluginUI::getCommandCode() |
|
254 | RMAP_command_codes rmapPluginUI::getCommandCode() | |
252 | { |
|
255 | { | |
253 | RMAP_command_codes commandCode = invalid0; |
|
256 | RMAP_command_codes commandCode = invalid0; | |
254 | if (RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_rep; |
|
257 | if (RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_rep; | |
255 | if (RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_noRep; |
|
258 | if (RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_noRep; | |
256 | if (!RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_Rep; |
|
259 | if (!RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_Rep; | |
257 | if (!RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_noRep; |
|
260 | if (!RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_noRep; | |
258 | emit commandCodeHasChanged(commandCode); |
|
261 | emit commandCodeHasChanged(commandCode); | |
259 | return commandCode; |
|
262 | return commandCode; | |
260 | } |
|
263 | } | |
261 |
|
264 | |||
262 | // SLOT |
|
265 | // SLOT | |
263 |
|
266 | |||
264 | void rmapPluginUI::selectionBetweenGresbAndStarDundee() //SLOT |
|
267 | void rmapPluginUI::selectionBetweenGresbAndStarDundee() //SLOT | |
265 | { |
|
268 | { | |
266 | if (selectGRESB_BUTTON->isChecked()) |
|
269 | if (selectGRESB_BUTTON->isChecked()) | |
267 | { |
|
270 | { | |
268 | gresb_GROUPBOX->setVisible(true); |
|
271 | gresb_GROUPBOX->setVisible(true); | |
269 | stardundee_GROUPBOX->setVisible(false); |
|
272 | stardundee_GROUPBOX->setVisible(false); | |
270 | rmapOpenCommunicationButton->setEnabled(true); |
|
273 | rmapOpenCommunicationButton->setEnabled(true); | |
271 | emit bridgeHasChanged(selectedBridgeIsGRESB); |
|
274 | emit bridgeHasChanged(selectedBridgeIsGRESB); | |
272 | } |
|
275 | } | |
273 | if (selectStarDundee_BUTTON->isChecked()) |
|
276 | if (selectStarDundee_BUTTON->isChecked()) | |
274 | { |
|
277 | { | |
275 | stardundee_GROUPBOX->setVisible(true); |
|
278 | stardundee_GROUPBOX->setVisible(true); | |
276 | gresb_GROUPBOX->setVisible(false); |
|
279 | gresb_GROUPBOX->setVisible(false); | |
277 | rmapOpenCommunicationButton->setEnabled(true); |
|
280 | rmapOpenCommunicationButton->setEnabled(true); | |
278 | emit bridgeHasChanged(selectedBridgeIsStarDundee); |
|
281 | emit bridgeHasChanged(selectedBridgeIsStarDundee); | |
279 | } |
|
282 | } | |
280 | } |
|
283 | } | |
281 |
|
284 | |||
282 | void rmapPluginUI::isOpen(bool flag) |
|
285 | void rmapPluginUI::isOpen(bool flag) | |
283 | { |
|
286 | { | |
284 | if (flag == true) |
|
287 | if (flag == true) | |
285 | { |
|
288 | { | |
286 | selection_GROUPBOX->setEnabled(false); |
|
289 | selection_GROUPBOX->setEnabled(false); | |
287 | this->rmapOpenCommunicationButton->setEnabled(false); |
|
290 | this->rmapOpenCommunicationButton->setEnabled(false); | |
288 | this->rmapCloseCommunicationButton->setEnabled(true); |
|
291 | this->rmapCloseCommunicationButton->setEnabled(true); | |
289 | } |
|
292 | } | |
290 | if (flag == false) |
|
293 | if (flag == false) | |
291 | { |
|
294 | { | |
292 | selection_GROUPBOX->setEnabled(true); |
|
295 | selection_GROUPBOX->setEnabled(true); | |
293 | this->rmapOpenCommunicationButton->setEnabled(true); |
|
296 | this->rmapOpenCommunicationButton->setEnabled(true); | |
294 | this->rmapCloseCommunicationButton->setEnabled(false); |
|
297 | this->rmapCloseCommunicationButton->setEnabled(false); | |
295 | } |
|
298 | } | |
296 | } |
|
299 | } | |
297 |
|
300 | |||
298 |
|
301 |
@@ -1,160 +1,161 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPPMON Software |
|
2 | -- This file is a part of the LPPMON Software | |
3 | -- Copyright (C) 20011, Laboratory of Plasma Physics - CNRS |
|
3 | -- Copyright (C) 20011, Laboratory of Plasma Physics - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Paul Leroy |
|
19 | /*-- Author : Paul Leroy | |
20 | -- Mail : paul.leroy@lpp.polytechnique.fr |
|
20 | -- Mail : paul.leroy@lpp.polytechnique.fr | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #ifndef RMAPPLUGINUI_H |
|
22 | #ifndef RMAPPLUGINUI_H | |
23 | #define RMAPPLUGINUI_H |
|
23 | #define RMAPPLUGINUI_H | |
24 |
|
24 | |||
25 | #include <QWidget> |
|
25 | #include <QWidget> | |
26 | #include <QPushButton> |
|
26 | #include <QPushButton> | |
27 | #include <QLabel> |
|
27 | #include <QLabel> | |
28 | #include <QSlider> |
|
28 | #include <QSlider> | |
29 | #include <QSpinBox> |
|
29 | #include <QSpinBox> | |
30 | #include <QGridLayout> |
|
30 | #include <QGridLayout> | |
31 | #include <QCheckBox> |
|
31 | #include <QCheckBox> | |
32 | #include <QFile> |
|
32 | #include <QFile> | |
33 | #include <QTextStream> |
|
33 | #include <QTextStream> | |
34 | #include <QFileDialog> |
|
34 | #include <QFileDialog> | |
35 | #include <QDir> |
|
35 | #include <QDir> | |
36 | #include <QDialog> |
|
36 | #include <QDialog> | |
37 | #include <QCloseEvent> |
|
37 | #include <QCloseEvent> | |
38 | #include <QTabWidget> |
|
38 | #include <QTabWidget> | |
39 | #include "qipdialogbox.h" |
|
39 | #include "qipdialogbox.h" | |
40 | #include <rmapoperations.h> |
|
40 | #include <rmapoperations.h> | |
41 | #include <gresbstatusenquiry.h> |
|
41 | #include <gresbstatusenquiry.h> | |
42 | #include <QTextEdit> |
|
42 | #include <QTextEdit> | |
43 | #include "spectralmatricesdmasimulator.h" |
|
43 | #include "spectralmatricesdmasimulator.h" | |
44 | #include <stardundee.h> |
|
44 | #include <stardundee.h> | |
45 | #include <gresb.h> |
|
45 | #include <gresb.h> | |
46 | #include <QRadioButton> |
|
46 | #include <QRadioButton> | |
47 | #include <QGroupBox> |
|
47 | #include <QGroupBox> | |
48 |
|
48 | |||
49 | enum selectedBridge{ |
|
49 | enum selectedBridge{ | |
50 | selectedBridgeIsUnknown, |
|
50 | selectedBridgeIsUnknown, | |
51 | selectedBridgeIsGRESB, |
|
51 | selectedBridgeIsGRESB, | |
52 | selectedBridgeIsStarDundee |
|
52 | selectedBridgeIsStarDundee | |
53 | }; |
|
53 | }; | |
54 |
|
54 | |||
55 | class rmapPluginUI : public QWidget |
|
55 | class rmapPluginUI : public QWidget | |
56 | { |
|
56 | { | |
57 | Q_OBJECT |
|
57 | Q_OBJECT | |
58 |
|
58 | |||
59 | public: |
|
59 | public: | |
60 | explicit rmapPluginUI(QWidget *parent = 0); |
|
60 | explicit rmapPluginUI(QWidget *parent = 0); | |
61 | ~rmapPluginUI(); |
|
61 | ~rmapPluginUI(); | |
62 |
|
62 | |||
63 | QPushButton* rmapOpenCommunicationButton; |
|
63 | QPushButton* rmapOpenCommunicationButton; | |
64 | QPushButton* rmapCloseCommunicationButton; |
|
64 | QPushButton* rmapCloseCommunicationButton; | |
65 | QPushButton* logFileChooseButton; |
|
65 | QPushButton* logFileChooseButton; | |
66 | QPushButton* gresbStatusQueryRetryButton; |
|
66 | QPushButton* gresbStatusQueryRetryButton; | |
67 | QPushButton* gresbStatusQueryAbortButton; |
|
67 | QPushButton* gresbStatusQueryAbortButton; | |
68 | QPushButton* sendCCSDSCommandButton; |
|
68 | QPushButton* sendCCSDSCommandButton; | |
69 | QPushButton* send_TC_LFR_UPDATE_TIME_Button; |
|
69 | QPushButton* send_TC_LFR_UPDATE_TIME_Button; | |
70 | QPushButton* reset_TC_LFR_UPDATE_TIME_Button; |
|
70 | QPushButton* reset_TC_LFR_UPDATE_TIME_Button; | |
71 | QPushButton* clearConsoleButton; |
|
71 | QPushButton* clearConsoleButton; | |
72 |
|
72 | |||
73 | QRadioButton* selectGRESB_BUTTON; |
|
73 | QRadioButton* selectGRESB_BUTTON; | |
74 | QRadioButton* selectStarDundee_BUTTON; |
|
74 | QRadioButton* selectStarDundee_BUTTON; | |
75 |
|
75 | |||
76 | QGroupBox *selection_GROUPBOX; |
|
76 | QGroupBox *selection_GROUPBOX; | |
77 |
|
77 | |||
78 | QSpinBox* gresbVirtualLinkSpinBox; |
|
78 | QSpinBox* gresbVirtualLinkSpinBox; | |
79 | QSpinBox* spwLinkSpinBox; |
|
79 | QSpinBox* spwLinkSpinBox; | |
80 | QSpinBox* rmapSourceLogicalAddressSpinBox; |
|
80 | QSpinBox* rmapSourceLogicalAddressSpinBox; | |
81 | QSpinBox* rmapTargetLogicalAddressSpinBox; |
|
81 | QSpinBox* rmapTargetLogicalAddressSpinBox; | |
82 | QSpinBox* CCSDSTargetLogicalAddressSpinBox; |
|
82 | QSpinBox* CCSDSTargetLogicalAddressSpinBox; | |
83 |
|
83 | |||
84 | //QIPDialogBox* gresbBridgeIPDialogBox; |
|
84 | //QIPDialogBox* gresbBridgeIPDialogBox; | |
85 |
|
85 | |||
86 | QCheckBox *logEnableCheckBox; |
|
86 | QCheckBox *logEnableCheckBox; | |
87 | QCheckBox *RMAP_write_verify; |
|
87 | QCheckBox *RMAP_write_verify; | |
88 | QCheckBox *RMAP_write_reply; |
|
88 | QCheckBox *RMAP_write_reply; | |
89 |
|
89 | |||
90 | QLabel* rmapSendStateLabel; |
|
90 | QLabel* rmapSendStateLabel; | |
91 | QLabel* rmapReceiveStateLabel; |
|
91 | QLabel* rmapReceiveStateLabel; | |
92 | QLabel* gresbStatusQueryLabel; |
|
92 | QLabel* gresbStatusQueryLabel; | |
93 | QLabel* gresbStatusQueryDialogLabel; |
|
93 | QLabel* gresbStatusQueryDialogLabel; | |
94 | QLabel* sendCCSDSCommandLabel; |
|
94 | QLabel* sendCCSDSCommandLabel; | |
|
95 | QLabel* nbPacketInStore; | |||
95 |
|
96 | |||
96 | QDialog* gresbStatusQueryDialog; |
|
97 | QDialog* gresbStatusQueryDialog; | |
97 |
|
98 | |||
98 | gresbStatusEnquiry* spwLinkStatusEnquiry; |
|
99 | gresbStatusEnquiry* spwLinkStatusEnquiry; | |
99 |
|
100 | |||
100 | SpectralMatricesDMASimulator *spectralMatricesDMASimulator; |
|
101 | SpectralMatricesDMASimulator *spectralMatricesDMASimulator; | |
101 |
|
102 | |||
102 | QTextEdit* console; |
|
103 | QTextEdit* console; | |
103 |
|
104 | |||
104 | // SPACEWIRE BRIDGES |
|
105 | // SPACEWIRE BRIDGES | |
105 | StarDundee *starDundee; |
|
106 | StarDundee *starDundee; | |
106 | gresb *gresbBridge; |
|
107 | gresb *gresbBridge; | |
107 |
|
108 | |||
108 | bool islogfileenable(); |
|
109 | bool islogfileenable(); | |
109 | void appendToLogFile(const QString & text); |
|
110 | void appendToLogFile(const QString & text); | |
110 | void closeEvent(QCloseEvent *event); |
|
111 | void closeEvent(QCloseEvent *event); | |
111 |
|
112 | |||
112 | public slots: |
|
113 | public slots: | |
113 | void chooseLogFile(); |
|
114 | void chooseLogFile(); | |
114 | void logFileEnDisable(int state); |
|
115 | void logFileEnDisable(int state); | |
115 | RMAP_command_codes getCommandCode(); |
|
116 | RMAP_command_codes getCommandCode(); | |
116 |
|
117 | |||
117 | private slots: |
|
118 | private slots: | |
118 | void selectionBetweenGresbAndStarDundee(); |
|
119 | void selectionBetweenGresbAndStarDundee(); | |
119 | void isOpen(bool flag); |
|
120 | void isOpen(bool flag); | |
120 |
|
121 | |||
121 | signals: |
|
122 | signals: | |
122 | void connectPortsig(QString PortName,int baudrate); |
|
123 | void connectPortsig(QString PortName,int baudrate); | |
123 | void setLogFileName(QString FileName); |
|
124 | void setLogFileName(QString FileName); | |
124 | void commandCodeHasChanged(RMAP_command_codes commandCode); |
|
125 | void commandCodeHasChanged(RMAP_command_codes commandCode); | |
125 | void bridgeHasChanged(selectedBridge bridge); |
|
126 | void bridgeHasChanged(selectedBridge bridge); | |
126 | void targetHasChanged(unsigned char target); |
|
127 | void targetHasChanged(unsigned char target); | |
127 | void sourceHasChanged(unsigned char source); |
|
128 | void sourceHasChanged(unsigned char source); | |
128 |
|
129 | |||
129 | private: |
|
130 | private: | |
130 | QLabel *gresbBridgeIPLabel; |
|
131 | QLabel *gresbBridgeIPLabel; | |
131 | QLabel *gresbVirtualLinkLabel; |
|
132 | QLabel *gresbVirtualLinkLabel; | |
132 | QLabel *spwLinkLabel; |
|
133 | QLabel *spwLinkLabel; | |
133 | QLabel *rmapSourceLogicalAddressLabel; |
|
134 | QLabel *rmapSourceLogicalAddressLabel; | |
134 | QLabel *rmapTargetLogicalAddressLabel; |
|
135 | QLabel *rmapTargetLogicalAddressLabel; | |
135 | QLabel *logFileName; |
|
136 | QLabel *logFileName; | |
136 |
|
137 | |||
137 | QGridLayout *bridgeSelection_LAYOUT; |
|
138 | QGridLayout *bridgeSelection_LAYOUT; | |
138 | QVBoxLayout *selectionLayout; |
|
139 | QVBoxLayout *selectionLayout; | |
139 | QVBoxLayout *mainLayout; |
|
140 | QVBoxLayout *mainLayout; | |
140 | QGridLayout *connectionLayout; |
|
141 | QGridLayout *connectionLayout; | |
141 | QVBoxLayout *ccsdsLayout; |
|
142 | QVBoxLayout *ccsdsLayout; | |
142 | QVBoxLayout *consoleLayout; |
|
143 | QVBoxLayout *consoleLayout; | |
143 | QGridLayout *gresbStatusQueryDialogLayout; |
|
144 | QGridLayout *gresbStatusQueryDialogLayout; | |
144 | QGridLayout *generalParameters_LAYOUT; |
|
145 | QGridLayout *generalParameters_LAYOUT; | |
145 |
|
146 | |||
146 | QTabWidget *spwTabWidget; |
|
147 | QTabWidget *spwTabWidget; | |
147 |
|
148 | |||
148 | QWidget* bridgeWidget; |
|
149 | QWidget* bridgeWidget; | |
149 |
|
150 | |||
150 | QGroupBox *gresb_GROUPBOX; |
|
151 | QGroupBox *gresb_GROUPBOX; | |
151 | QGroupBox *stardundee_GROUPBOX; |
|
152 | QGroupBox *stardundee_GROUPBOX; | |
152 | QGroupBox *generalParameters_GROUPBOX; |
|
153 | QGroupBox *generalParameters_GROUPBOX; | |
153 |
|
154 | |||
154 | QFile *logFile; |
|
155 | QFile *logFile; | |
155 | QTextStream *logFileStrm; |
|
156 | QTextStream *logFileStrm; | |
156 | bool logFileEn; |
|
157 | bool logFileEn; | |
157 |
|
158 | |||
158 | }; |
|
159 | }; | |
159 |
|
160 | |||
160 | #endif // RMAPPLUGINUI_H |
|
161 | #endif // RMAPPLUGINUI_H |
@@ -1,856 +1,850 | |||||
1 | #include "stardundee.h" |
|
1 | #include "stardundee.h" | |
2 | #include <QTime> |
|
2 | #include <QTime> | |
3 | #include <math.h> |
|
3 | #include <math.h> | |
4 | #include "ccsds.h" |
|
4 | #include "ccsds.h" | |
5 |
|
5 | |||
6 | StarDundee::StarDundee(QWidget *parent) : |
|
6 | StarDundee::StarDundee(QWidget *parent) : | |
7 | QWidget(parent) |
|
7 | QWidget(parent) | |
8 | { |
|
8 | { | |
9 | // Packet receiver |
|
9 | // Packet receiver | |
10 | timer = new QTimer; |
|
10 | timer = new QTimer; | |
11 | rmapPacketSEMAPHORE = new QSemaphore; |
|
11 | rmapPacketSEMAPHORE = new QSemaphore; | |
12 | ccsdsPacketSEMAPHORE = new QSemaphore; |
|
12 | ccsdsPacketSEMAPHORE = new QSemaphore; | |
13 | rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH); |
|
13 | rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH); | |
14 | ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH); |
|
14 | ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH); | |
15 | spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) ); |
|
15 | spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) ); | |
16 |
|
16 | |||
17 | starDundeeStatusQueryDialog = new QDialog; |
|
17 | starDundeeStatusQueryDialog = new QDialog; | |
18 |
|
18 | |||
19 | commandCode = invalid0; // initialization of the cmmand code for the RMAP transfers |
|
19 | commandCode = invalid0; // initialization of the cmmand code for the RMAP transfers | |
20 | rmapTargetLogicalAddress = DEFAULT_TARGET; |
|
20 | rmapTargetLogicalAddress = DEFAULT_TARGET; | |
21 | rmapSourceLogicalAddress = DEFAULT_SOURCE; |
|
21 | rmapSourceLogicalAddress = DEFAULT_SOURCE; | |
22 |
|
22 | |||
23 | connection_LAYOUT = new QGridLayout; |
|
23 | connection_LAYOUT = new QGridLayout; | |
24 |
|
24 | |||
25 | usbDeviceNumber_LABEL = new QLabel(tr("USB device number: ")); |
|
25 | usbDeviceNumber_LABEL = new QLabel(tr("USB device number: ")); | |
26 | linkNumber_LABEL = new QLabel(tr("SpaceWire link number: ")); |
|
26 | linkNumber_LABEL = new QLabel(tr("SpaceWire link number: ")); | |
27 | starDundeeStatusQueryDialogLabel = new QLabel(tr("SpaceWire link not running")); |
|
27 | starDundeeStatusQueryDialogLabel = new QLabel(tr("SpaceWire link not running")); | |
28 |
|
28 | |||
29 | //*** QPUSHBUTTON ***// |
|
29 | //*** QPUSHBUTTON ***// | |
30 | starDundeeStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
30 | starDundeeStatusQueryRetryButton = new QPushButton(tr("Retry")); | |
31 | starDundeeStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
31 | starDundeeStatusQueryAbortButton = new QPushButton(tr("Abort")); | |
32 |
|
32 | |||
33 | usbDeviceNumber_SPINBOX = new QSpinBox; |
|
33 | usbDeviceNumber_SPINBOX = new QSpinBox; | |
34 | usbDeviceNumber_SPINBOX->setRange(0,32); |
|
34 | usbDeviceNumber_SPINBOX->setRange(0,32); | |
35 | usbDeviceNumber_SPINBOX->setValue(0); |
|
35 | usbDeviceNumber_SPINBOX->setValue(0); | |
36 | linkNumber_SPINBOX = new QSpinBox; |
|
36 | linkNumber_SPINBOX = new QSpinBox; | |
37 | linkNumber_SPINBOX->setRange(1,2); |
|
37 | linkNumber_SPINBOX->setRange(1,2); | |
38 | linkNumber_SPINBOX->setValue(1); |
|
38 | linkNumber_SPINBOX->setValue(1); | |
39 |
|
39 | |||
40 | // STAR DUNDEE STATUS QUERY DIALOG |
|
40 | // STAR DUNDEE STATUS QUERY DIALOG | |
41 | starDundeeStatusQueryDialogLayout = new QGridLayout; |
|
41 | starDundeeStatusQueryDialogLayout = new QGridLayout; | |
42 | starDundeeStatusQueryDialogLayout->addWidget(starDundeeStatusQueryDialogLabel, 0, 0, 1, 2); |
|
42 | starDundeeStatusQueryDialogLayout->addWidget(starDundeeStatusQueryDialogLabel, 0, 0, 1, 2); | |
43 | starDundeeStatusQueryDialogLayout->addWidget(starDundeeStatusQueryRetryButton, 1, 0, 0); |
|
43 | starDundeeStatusQueryDialogLayout->addWidget(starDundeeStatusQueryRetryButton, 1, 0, 0); | |
44 | starDundeeStatusQueryDialogLayout->addWidget(starDundeeStatusQueryAbortButton, 1, 1, 0); |
|
44 | starDundeeStatusQueryDialogLayout->addWidget(starDundeeStatusQueryAbortButton, 1, 1, 0); | |
45 | starDundeeStatusQueryDialog->setLayout(starDundeeStatusQueryDialogLayout); |
|
45 | starDundeeStatusQueryDialog->setLayout(starDundeeStatusQueryDialogLayout); | |
46 |
|
46 | |||
47 | connection_LAYOUT->addWidget(usbDeviceNumber_LABEL, 0, 0, 1, 1); |
|
47 | connection_LAYOUT->addWidget(usbDeviceNumber_LABEL, 0, 0, 1, 1); | |
48 | connection_LAYOUT->addWidget(usbDeviceNumber_SPINBOX, 0, 1, 1, 1); |
|
48 | connection_LAYOUT->addWidget(usbDeviceNumber_SPINBOX, 0, 1, 1, 1); | |
49 | connection_LAYOUT->addWidget(linkNumber_LABEL, 1, 0, 1, 1); |
|
49 | connection_LAYOUT->addWidget(linkNumber_LABEL, 1, 0, 1, 1); | |
50 | connection_LAYOUT->addWidget(linkNumber_SPINBOX, 1, 1, 1, 1); |
|
50 | connection_LAYOUT->addWidget(linkNumber_SPINBOX, 1, 1, 1, 1); | |
51 |
|
51 | |||
52 | connection_LAYOUT->setRowStretch(2, 1); |
|
52 | connection_LAYOUT->setRowStretch(2, 1); | |
53 | connection_LAYOUT->setColumnStretch(2, 1); |
|
53 | connection_LAYOUT->setColumnStretch(2, 1); | |
54 |
|
54 | |||
55 | this->setLayout(connection_LAYOUT); |
|
55 | this->setLayout(connection_LAYOUT); | |
56 |
|
56 | |||
57 | connect(starDundeeStatusQueryRetryButton, SIGNAL(clicked()), this, SLOT(reTestSPWLink())); |
|
57 | connect(starDundeeStatusQueryRetryButton, SIGNAL(clicked()), this, SLOT(reTestSPWLink())); | |
58 | connect(starDundeeStatusQueryAbortButton, SIGNAL(clicked()), starDundeeStatusQueryDialog, SLOT(reject())); |
|
58 | connect(starDundeeStatusQueryAbortButton, SIGNAL(clicked()), starDundeeStatusQueryDialog, SLOT(reject())); | |
59 |
|
59 | |||
60 | connect(this->timer, SIGNAL(timeout()), this, SLOT(receivePollingLoop())); |
|
60 | connect(this->timer, SIGNAL(timeout()), this, SLOT(receivePollingLoop())); | |
61 | timer->start(100); // starts the periodical timer, period = 100ms |
|
|||
62 | } |
|
61 | } | |
63 |
|
62 | |||
64 | StarDundee::~StarDundee() |
|
63 | StarDundee::~StarDundee() | |
65 | { |
|
64 | { | |
66 | free(rmapPacket); |
|
65 | free(rmapPacket); | |
67 | free(ccsdsPacket); |
|
66 | free(ccsdsPacket); | |
68 | free(spwPacket); |
|
67 | free(spwPacket); | |
69 | USBSpaceWire_Close(hDevice); // Close the device |
|
68 | USBSpaceWire_Close(hDevice); // Close the device | |
70 | } |
|
69 | } | |
71 |
|
70 | |||
72 | void StarDundee::Open() |
|
71 | void StarDundee::Open() | |
73 | { |
|
72 | { | |
74 | int status; |
|
73 | int status; | |
75 | U32 statusControl; |
|
74 | U32 statusControl; | |
76 |
|
75 | |||
77 | if (!USBSpaceWire_Open(&hDevice, usbDeviceNumber_SPINBOX->value())) // Open the USB device |
|
76 | if (!USBSpaceWire_Open(&hDevice, usbDeviceNumber_SPINBOX->value())) // Open the USB device | |
78 | { |
|
77 | { | |
79 | emit sendMessage("stardundee *** Open *** ERROR: USBSpaceWire_Open(&hDevice, 0))"); |
|
78 | emit sendMessage("stardundee *** Open *** ERROR: USBSpaceWire_Open(&hDevice, 0))"); | |
80 | return; |
|
79 | return; | |
81 | } |
|
80 | } | |
82 | emit sendMessage("stardundee *** Open *** USBSpaceWire_Open successful, device number: " |
|
81 | emit sendMessage("stardundee *** Open *** USBSpaceWire_Open successful, device number: " | |
83 | + QString::number(usbDeviceNumber_SPINBOX->value())); |
|
82 | + QString::number(usbDeviceNumber_SPINBOX->value())); | |
84 |
|
83 | |||
85 | USBSpaceWire_EnableNetworkMode(hDevice, 0); // deactivate the network mode |
|
84 | USBSpaceWire_EnableNetworkMode(hDevice, 0); // deactivate the network mode | |
86 | CFGSpaceWire_EnableRMAP(1); // Enable the use of RMAP for the StarDundee brick configuration |
|
85 | CFGSpaceWire_EnableRMAP(1); // Enable the use of RMAP for the StarDundee brick configuration | |
87 | CFGSpaceWire_SetRMAPDestinationKey(0x20); // Set the destination key expected by STAR-Dundee devices |
|
86 | CFGSpaceWire_SetRMAPDestinationKey(0x20); // Set the destination key expected by STAR-Dundee devices | |
88 |
|
87 | |||
89 | // Set the path and return path to the device |
|
88 | // Set the path and return path to the device | |
90 | CFGSpaceWire_StackClear(); |
|
89 | CFGSpaceWire_StackClear(); | |
91 | CFGSpaceWire_AddrStackPush(0); |
|
90 | CFGSpaceWire_AddrStackPush(0); | |
92 | CFGSpaceWire_AddrStackPush(254); |
|
91 | CFGSpaceWire_AddrStackPush(254); | |
93 | CFGSpaceWire_RetAddrStackPush(254); |
|
92 | CFGSpaceWire_RetAddrStackPush(254); | |
94 |
|
93 | |||
95 | // set the base transmit rate to 100 MHz |
|
94 | // set the base transmit rate to 100 MHz | |
96 | status = CFGSpaceWire_SetBrickBaseTransmitRate( hDevice, CFG_BRK_CLK_100_MHZ, CFG_BRK_DVDR_1, 0xff); |
|
95 | status = CFGSpaceWire_SetBrickBaseTransmitRate( hDevice, CFG_BRK_CLK_100_MHZ, CFG_BRK_DVDR_1, 0xff); | |
97 | if (status != CFG_TRANSFER_SUCCESS) |
|
96 | if (status != CFG_TRANSFER_SUCCESS) | |
98 | { |
|
97 | { | |
99 | emit sendMessage("ERROR CFGSpaceWire_SetBrickBaseTransmitRate"); |
|
98 | emit sendMessage("ERROR CFGSpaceWire_SetBrickBaseTransmitRate"); | |
100 | } |
|
99 | } | |
101 | else emit sendMessage("OK CFGSpaceWire_SetBrickBaseTransmitRate, base rate = 100 MHz"); |
|
100 | else emit sendMessage("OK CFGSpaceWire_SetBrickBaseTransmitRate, base rate = 100 MHz"); | |
102 | // read the link status |
|
101 | // read the link status | |
103 | if (CFGSpaceWire_GetLinkStatusControl(hDevice, linkNumber_SPINBOX->value(), &statusControl) != CFG_TRANSFER_SUCCESS) |
|
102 | if (CFGSpaceWire_GetLinkStatusControl(hDevice, linkNumber_SPINBOX->value(), &statusControl) != CFG_TRANSFER_SUCCESS) | |
104 | { |
|
103 | { | |
105 | emit sendMessage("Could not read link status control for link " + QString::number(linkNumber_SPINBOX->value())); |
|
104 | emit sendMessage("Could not read link status control for link " + QString::number(linkNumber_SPINBOX->value())); | |
106 | } |
|
105 | } | |
107 | else |
|
106 | else | |
108 | { |
|
107 | { | |
109 | emit sendMessage("OK CFGSpaceWire_GetLinkStatusControl of link " + QString::number(linkNumber_SPINBOX->value())); |
|
108 | emit sendMessage("OK CFGSpaceWire_GetLinkStatusControl of link " + QString::number(linkNumber_SPINBOX->value())); | |
110 |
|
109 | |||
111 | // Set the link status control register properties |
|
110 | // Set the link status control register properties | |
112 | CFGSpaceWire_LSEnableAutoStart(&statusControl, 1); |
|
111 | CFGSpaceWire_LSEnableAutoStart(&statusControl, 1); | |
113 | CFGSpaceWire_LSEnableStart(&statusControl, 1); |
|
112 | CFGSpaceWire_LSEnableStart(&statusControl, 1); | |
114 | CFGSpaceWire_LSEnableDisabled(&statusControl, 0); |
|
113 | CFGSpaceWire_LSEnableDisabled(&statusControl, 0); | |
115 | CFGSpaceWire_LSEnableTristate(&statusControl, 0); |
|
114 | CFGSpaceWire_LSEnableTristate(&statusControl, 0); | |
116 | CFGSpaceWire_LSSetOperatingSpeed(&statusControl, 9); // sets the link speed to ( 100 MHz / (9+1) ) = 10 MHz |
|
115 | CFGSpaceWire_LSSetOperatingSpeed(&statusControl, 9); // sets the link speed to ( 100 MHz / (9+1) ) = 10 MHz | |
117 |
|
116 | |||
118 | // Set the link status control register |
|
117 | // Set the link status control register | |
119 | if (CFGSpaceWire_SetLinkStatusControl(hDevice, linkNumber_SPINBOX->value(), statusControl) != CFG_TRANSFER_SUCCESS) |
|
118 | if (CFGSpaceWire_SetLinkStatusControl(hDevice, linkNumber_SPINBOX->value(), statusControl) != CFG_TRANSFER_SUCCESS) | |
120 | { |
|
119 | { | |
121 | emit sendMessage("Could not set the link status control for link " + QString::number(linkNumber_SPINBOX->value())); |
|
120 | emit sendMessage("Could not set the link status control for link " + QString::number(linkNumber_SPINBOX->value())); | |
122 | } |
|
121 | } | |
123 | else emit sendMessage("Set the link status control for link " + QString::number(linkNumber_SPINBOX->value())); |
|
122 | else emit sendMessage("Set the link status control for link " + QString::number(linkNumber_SPINBOX->value())); | |
124 | } |
|
123 | } | |
125 |
|
124 | |||
126 | if (CFGSpaceWire_SetAsInterface(hDevice, 1, 0) != CFG_TRANSFER_SUCCESS) |
|
125 | if (CFGSpaceWire_SetAsInterface(hDevice, 1, 0) != CFG_TRANSFER_SUCCESS) | |
127 | { |
|
126 | { | |
128 | emit sendMessage("Could not set the device to be an interface"); |
|
127 | emit sendMessage("Could not set the device to be an interface"); | |
129 | } |
|
128 | } | |
130 | else |
|
129 | else | |
131 | { |
|
130 | { | |
132 | emit sendMessage("Device set to be an interface"); |
|
131 | emit sendMessage("Device set to be an interface"); | |
133 | } |
|
132 | } | |
134 |
|
133 | |||
135 | //setRoutingTableEntry(rmapTargetLogicalAddress, (1<<linkNumber_SPINBOX->value())); |
|
134 | //setRoutingTableEntry(rmapTargetLogicalAddress, (1<<linkNumber_SPINBOX->value())); | |
136 | //setRoutingTableEntry(rmapSourceLogicalAddress, (1<<3)); |
|
135 | //setRoutingTableEntry(rmapSourceLogicalAddress, (1<<3)); | |
137 | //GetRoutingTableEntry(rmapTargetLogicalAddress); |
|
136 | //GetRoutingTableEntry(rmapTargetLogicalAddress); | |
138 | //GetRoutingTableEntry(rmapSourceLogicalAddress); |
|
137 | //GetRoutingTableEntry(rmapSourceLogicalAddress); | |
139 |
|
138 | |||
140 | USBSpaceWire_RegisterReceiveOnAllPorts(hDevice); // Register to receive on all ports |
|
139 | USBSpaceWire_RegisterReceiveOnAllPorts(hDevice); // Register to receive on all ports | |
141 | USBSpaceWire_ClearEndpoints(hDevice); // clear the USB endpoints |
|
140 | USBSpaceWire_ClearEndpoints(hDevice); // clear the USB endpoints | |
142 |
|
141 | |||
143 | emit sendMessage("The driver's current send buffer size is " + QString::number(USBSpaceWire_GetDriverSendBufferSize(hDevice)) + " bytes"); |
|
142 | emit sendMessage("The driver's current send buffer size is " + QString::number(USBSpaceWire_GetDriverSendBufferSize(hDevice)) + " bytes"); | |
144 | emit sendMessage("The driver's current read buffer size is " + QString::number(USBSpaceWire_GetDriverReadBufferSize(hDevice)) + " bytes"); |
|
143 | emit sendMessage("The driver's current read buffer size is " + QString::number(USBSpaceWire_GetDriverReadBufferSize(hDevice)) + " bytes"); | |
145 | emit sendMessage("USBSpaceWire_IsReadThrottling is " + QString::number(USBSpaceWire_IsReadThrottling(hDevice))); |
|
144 | emit sendMessage("USBSpaceWire_IsReadThrottling is " + QString::number(USBSpaceWire_IsReadThrottling(hDevice))); | |
146 |
|
145 | |||
147 | // initialize SPW packet semaphores |
|
146 | // initialize SPW packet semaphores | |
148 | while (rmapPacketSEMAPHORE->available()!=0) rmapPacketSEMAPHORE->acquire(); |
|
147 | while (rmapPacketSEMAPHORE->available()!=0) rmapPacketSEMAPHORE->acquire(); | |
149 | while (ccsdsPacketSEMAPHORE->available()!=0) ccsdsPacketSEMAPHORE->acquire(); |
|
148 | while (ccsdsPacketSEMAPHORE->available()!=0) ccsdsPacketSEMAPHORE->acquire(); | |
150 |
|
149 | |||
151 | if (getLinkStatus(linkNumber_SPINBOX->value())) |
|
150 | if (getLinkStatus(linkNumber_SPINBOX->value())) | |
152 | { |
|
151 | { | |
153 | emit isOpen(true); |
|
152 | emit isOpen(true); | |
|
153 | timer->start(100); // starts the periodical timer, period = 100ms | |||
154 | } |
|
154 | } | |
155 | else |
|
155 | else | |
156 | { |
|
156 | { | |
157 | starDundeeStatusQueryDialog->exec(); |
|
157 | starDundeeStatusQueryDialog->exec(); | |
158 | } |
|
158 | } | |
159 | } |
|
159 | } | |
160 |
|
160 | |||
161 | void StarDundee::Close() |
|
161 | void StarDundee::Close() | |
162 | { |
|
162 | { | |
163 | USBSpaceWire_Close(hDevice); // Close the device |
|
163 | USBSpaceWire_Close(hDevice); // Close the device | |
164 | emit sendMessage("stardundee *** Close *** USBSpaceWire_Close, device: " + QString::number(usbDeviceNumber_SPINBOX->value())); |
|
164 | emit sendMessage("stardundee *** Close *** USBSpaceWire_Close, device: " + QString::number(usbDeviceNumber_SPINBOX->value())); | |
165 |
|
165 | |||
166 | USBSpaceWire_UnregisterReceiveOnAllPorts(hDevice); // Stop receiving on all ports |
|
166 | USBSpaceWire_UnregisterReceiveOnAllPorts(hDevice); // Stop receiving on all ports | |
167 |
|
167 | |||
168 | emit isOpen(false); |
|
168 | emit isOpen(false); | |
169 | } |
|
169 | } | |
170 |
|
170 | |||
171 | unsigned char StarDundee::setRoutingTableEntry(int tableEntry, U32 dwOutputPorts) |
|
171 | unsigned char StarDundee::setRoutingTableEntry(int tableEntry, U32 dwOutputPorts) | |
172 | { |
|
172 | { | |
173 | U32 routingTableEntry; |
|
173 | U32 routingTableEntry; | |
174 | // SET THE ROUTING TABLE ENTRY FOR LOGICAL ADDRESSING, TARGET entryNumber |
|
174 | // SET THE ROUTING TABLE ENTRY FOR LOGICAL ADDRESSING, TARGET entryNumber | |
175 | if (CFGSpaceWire_ClearRoutingTableEntry(hDevice, tableEntry) != CFG_TRANSFER_SUCCESS) |
|
175 | if (CFGSpaceWire_ClearRoutingTableEntry(hDevice, tableEntry) != CFG_TRANSFER_SUCCESS) | |
176 | { |
|
176 | { | |
177 | emit sendMessage("Could not clear routing table entry " + QString::number(tableEntry)); |
|
177 | emit sendMessage("Could not clear routing table entry " + QString::number(tableEntry)); | |
178 | } |
|
178 | } | |
179 | // Build the routing table entry |
|
179 | // Build the routing table entry | |
180 | CFGSpaceWire_RTBuildRoutingTableEntry(&routingTableEntry, |
|
180 | CFGSpaceWire_RTBuildRoutingTableEntry(&routingTableEntry, | |
181 | dwOutputPorts, // route out of port dwOutputPorts |
|
181 | dwOutputPorts, // route out of port dwOutputPorts | |
182 | 0, // header deletion disabled |
|
182 | 0, // header deletion disabled | |
183 | 0); // priority normal |
|
183 | 0); // priority normal | |
184 | // Set the routing table entry for logical address tableEntry |
|
184 | // Set the routing table entry for logical address tableEntry | |
185 | if (CFGSpaceWire_SetRoutingTableEntry(hDevice, tableEntry, routingTableEntry) != CFG_TRANSFER_SUCCESS) |
|
185 | if (CFGSpaceWire_SetRoutingTableEntry(hDevice, tableEntry, routingTableEntry) != CFG_TRANSFER_SUCCESS) | |
186 | { |
|
186 | { | |
187 | emit sendMessage("Could not set routing table entry [" + QString::number(tableEntry) + "]"); |
|
187 | emit sendMessage("Could not set routing table entry [" + QString::number(tableEntry) + "]"); | |
188 | } |
|
188 | } | |
189 | else emit sendMessage("Routing table entry [" + QString::number(tableEntry) + "] set" ); |
|
189 | else emit sendMessage("Routing table entry [" + QString::number(tableEntry) + "] set" ); | |
190 | return 1; |
|
190 | return 1; | |
191 | } |
|
191 | } | |
192 |
|
192 | |||
193 | unsigned int StarDundee::GetRoutingTableEntry(int tableEntry) |
|
193 | unsigned int StarDundee::GetRoutingTableEntry(int tableEntry) | |
194 | { |
|
194 | { | |
195 | U32 routingTableEntry, outputPorts; |
|
195 | U32 routingTableEntry, outputPorts; | |
196 | char enabled, delHead, priority; |
|
196 | char enabled, delHead, priority; | |
197 | int portNum; |
|
197 | int portNum; | |
198 |
|
198 | |||
199 | emit sendMessage("GetRoutingTableEntry [" + QString::number(tableEntry) + "]"); |
|
199 | emit sendMessage("GetRoutingTableEntry [" + QString::number(tableEntry) + "]"); | |
200 | // Read the routing table entry |
|
200 | // Read the routing table entry | |
201 | if (CFGSpaceWire_GetRoutingTableEntry(hDevice, tableEntry, &routingTableEntry) != CFG_TRANSFER_SUCCESS) |
|
201 | if (CFGSpaceWire_GetRoutingTableEntry(hDevice, tableEntry, &routingTableEntry) != CFG_TRANSFER_SUCCESS) | |
202 | { |
|
202 | { | |
203 | emit sendMessage("Could not read routing table entry [" + QString::number(tableEntry) + "]"); |
|
203 | emit sendMessage("Could not read routing table entry [" + QString::number(tableEntry) + "]"); | |
204 | } |
|
204 | } | |
205 | else |
|
205 | else | |
206 | { |
|
206 | { | |
207 | // Display the routing table entry properties |
|
207 | // Display the routing table entry properties | |
208 | CFGSpaceWire_RTIsEnabled(routingTableEntry, &enabled); |
|
208 | CFGSpaceWire_RTIsEnabled(routingTableEntry, &enabled); | |
209 | CFGSpaceWire_RTIsDelHead(routingTableEntry, &delHead); |
|
209 | CFGSpaceWire_RTIsDelHead(routingTableEntry, &delHead); | |
210 | CFGSpaceWire_RTIsPriority(routingTableEntry, &priority); |
|
210 | CFGSpaceWire_RTIsPriority(routingTableEntry, &priority); | |
211 | CFGSpaceWire_RTGetOutputPorts(routingTableEntry, &outputPorts); |
|
211 | CFGSpaceWire_RTGetOutputPorts(routingTableEntry, &outputPorts); | |
212 | emit sendMessage("CFGSpaceWire_RTIsEnabled : " + QString::number(enabled)); |
|
212 | emit sendMessage("CFGSpaceWire_RTIsEnabled : " + QString::number(enabled)); | |
213 | emit sendMessage("CFGSpaceWire_RTIsDelHead : " + QString::number(delHead)); |
|
213 | emit sendMessage("CFGSpaceWire_RTIsDelHead : " + QString::number(delHead)); | |
214 | emit sendMessage("CFGSpaceWire_RTIsPriority : " + QString::number(priority)); |
|
214 | emit sendMessage("CFGSpaceWire_RTIsPriority : " + QString::number(priority)); | |
215 | emit sendMessage("CFGSpaceWire_RTGetOutputPorts : "); |
|
215 | emit sendMessage("CFGSpaceWire_RTGetOutputPorts : "); | |
216 | for (portNum = 0; portNum < 32; portNum++) |
|
216 | for (portNum = 0; portNum < 32; portNum++) | |
217 | { |
|
217 | { | |
218 | if (outputPorts & (1 << portNum)) |
|
218 | if (outputPorts & (1 << portNum)) | |
219 | { |
|
219 | { | |
220 | emit sendMessage(QString::number(portNum)); |
|
220 | emit sendMessage(QString::number(portNum)); | |
221 | } |
|
221 | } | |
222 | } |
|
222 | } | |
223 | } |
|
223 | } | |
224 |
|
224 | |||
225 | return 1; |
|
225 | return 1; | |
226 | } |
|
226 | } | |
227 |
|
227 | |||
228 | unsigned int StarDundee::Write(unsigned int *Value, unsigned int count, unsigned int address) |
|
228 | unsigned int StarDundee::Write(unsigned int *Value, unsigned int count, unsigned int address) | |
229 | { |
|
229 | { | |
230 | unsigned int remainingCount = count; |
|
230 | unsigned int remainingCount = count; | |
231 | unsigned int iOffset = 0; |
|
231 | unsigned int iOffset = 0; | |
232 | QString console_message; |
|
232 | QString console_message; | |
233 | char* data; |
|
233 | char* data; | |
234 |
|
234 | |||
235 | if(rmapPacketSEMAPHORE->available()!=0) |
|
235 | if(rmapPacketSEMAPHORE->available()!=0) | |
236 | { |
|
236 | { | |
237 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped"); |
|
237 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped"); | |
238 | return 1; |
|
238 | return 1; | |
239 | } |
|
239 | } | |
240 |
|
240 | |||
241 | emit this->RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); |
|
241 | emit this->RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); | |
242 |
|
242 | |||
243 | data = (char*) malloc(READ_WRITE_MAX_COUNTS*4); |
|
243 | data = (char*) malloc(READ_WRITE_MAX_COUNTS*4); | |
244 |
|
244 | |||
245 | emit appendToLog(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); |
|
245 | emit appendToLog(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); | |
246 |
|
246 | |||
247 | while (remainingCount > READ_WRITE_MAX_COUNTS) |
|
247 | while (remainingCount > READ_WRITE_MAX_COUNTS) | |
248 | { |
|
248 | { | |
249 | for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++) |
|
249 | for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++) | |
250 | { |
|
250 | { | |
251 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); |
|
251 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); | |
252 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); |
|
252 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); | |
253 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); |
|
253 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); | |
254 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); |
|
254 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); | |
255 | } |
|
255 | } | |
256 |
|
256 | |||
257 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
257 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
258 | emit appendToLog(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
258 | emit appendToLog(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
259 |
|
259 | |||
260 | if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0) |
|
260 | if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0) | |
261 | { |
|
261 | { | |
262 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); |
|
262 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); | |
263 | return 1; |
|
263 | return 1; | |
264 | } |
|
264 | } | |
265 |
|
265 | |||
266 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; |
|
266 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; | |
267 | address = address + READ_WRITE_MAX_COUNTS * 4; |
|
267 | address = address + READ_WRITE_MAX_COUNTS * 4; | |
268 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; |
|
268 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; | |
269 | } |
|
269 | } | |
270 |
|
270 | |||
271 | if (remainingCount > 0) |
|
271 | if (remainingCount > 0) | |
272 | { |
|
272 | { | |
273 | for (unsigned int i = 0; i<remainingCount; i++) |
|
273 | for (unsigned int i = 0; i<remainingCount; i++) | |
274 | { |
|
274 | { | |
275 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); |
|
275 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); | |
276 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); |
|
276 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); | |
277 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); |
|
277 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); | |
278 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); |
|
278 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); | |
279 | } |
|
279 | } | |
280 |
|
280 | |||
281 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
281 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
282 | emit appendToLog(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
282 | emit appendToLog(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
283 |
|
283 | |||
284 | if (WriteBLOCK(data, remainingCount*4, address)==0) |
|
284 | if (WriteBLOCK(data, remainingCount*4, address)==0) | |
285 | { |
|
285 | { | |
286 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); |
|
286 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); | |
287 | return 1; |
|
287 | return 1; | |
288 | } |
|
288 | } | |
289 | } |
|
289 | } | |
290 |
|
290 | |||
291 | emit appendToLog(QString("*** STOP *** WRITE")); |
|
291 | emit appendToLog(QString("*** STOP *** WRITE")); | |
292 | free(data); |
|
292 | free(data); | |
293 | return count; |
|
293 | return count; | |
294 | } |
|
294 | } | |
295 |
|
295 | |||
296 | unsigned int StarDundee::Read(unsigned int *Value, unsigned int count, unsigned int address) |
|
296 | unsigned int StarDundee::Read(unsigned int *Value, unsigned int count, unsigned int address) | |
297 | { |
|
297 | { | |
298 | unsigned int remainingCount = count; |
|
298 | unsigned int remainingCount = count; | |
299 | unsigned int iOffset = 0; |
|
299 | unsigned int iOffset = 0; | |
300 | QString console_message; |
|
300 | QString console_message; | |
301 |
|
301 | |||
302 | if(rmapPacketSEMAPHORE->available()!=0) |
|
302 | if(rmapPacketSEMAPHORE->available()!=0) | |
303 | { |
|
303 | { | |
304 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped"); |
|
304 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped"); | |
305 | return 1; |
|
305 | return 1; | |
306 | } |
|
306 | } | |
307 | emit appendToLog(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); |
|
307 | emit appendToLog(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); | |
308 |
|
308 | |||
309 | while (remainingCount > READ_WRITE_MAX_COUNTS) |
|
309 | while (remainingCount > READ_WRITE_MAX_COUNTS) | |
310 | { |
|
310 | { | |
311 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
311 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
312 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
312 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
313 |
|
313 | |||
314 | if (this->ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0) |
|
314 | if (this->ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0) | |
315 | { |
|
315 | { | |
316 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); |
|
316 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); | |
317 | return 1; |
|
317 | return 1; | |
318 | } |
|
318 | } | |
319 |
|
319 | |||
320 | for(int i=0;i<READ_WRITE_MAX_COUNTS;i++) |
|
320 | for(int i=0;i<READ_WRITE_MAX_COUNTS;i++) | |
321 | { |
|
321 | { | |
322 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; |
|
322 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; | |
323 | for(int j=1;j<4;j++) |
|
323 | for(int j=1;j<4;j++) | |
324 | { |
|
324 | { | |
325 | Value[i+iOffset]= ((unsigned char) (rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) |
|
325 | Value[i+iOffset]= ((unsigned char) (rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) | |
326 | + Value[i+iOffset]*256; |
|
326 | + Value[i+iOffset]*256; | |
327 | } |
|
327 | } | |
328 | } |
|
328 | } | |
329 |
|
329 | |||
330 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; |
|
330 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; | |
331 | address = address + READ_WRITE_MAX_COUNTS * 4; |
|
331 | address = address + READ_WRITE_MAX_COUNTS * 4; | |
332 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; |
|
332 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; | |
333 | this->acquireRMAPSemaphore(); |
|
333 | this->acquireRMAPSemaphore(); | |
334 | } |
|
334 | } | |
335 |
|
335 | |||
336 | if (remainingCount > 0) |
|
336 | if (remainingCount > 0) | |
337 | { |
|
337 | { | |
338 | console_message.sprintf("remainingCount: %d => ", remainingCount); |
|
338 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
339 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16)); |
|
339 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
340 |
|
340 | |||
341 | if (this->ReadBLOCK(4*remainingCount, address)==0) |
|
341 | if (this->ReadBLOCK(4*remainingCount, address)==0) | |
342 | { |
|
342 | { | |
343 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); |
|
343 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); | |
344 | return 1; |
|
344 | return 1; | |
345 | } |
|
345 | } | |
346 |
|
346 | |||
347 | for(unsigned int i=0;i<remainingCount;i++) |
|
347 | for(unsigned int i=0;i<remainingCount;i++) | |
348 | { |
|
348 | { | |
349 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; |
|
349 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; | |
350 | for(int j=1;j<4;j++) |
|
350 | for(int j=1;j<4;j++) | |
351 | { |
|
351 | { | |
352 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; |
|
352 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; | |
353 | } |
|
353 | } | |
354 | } |
|
354 | } | |
355 | this->acquireRMAPSemaphore(); |
|
355 | this->acquireRMAPSemaphore(); | |
356 | } |
|
356 | } | |
357 |
|
357 | |||
358 | emit appendToLog(QString("*** STOP *** READ ")); |
|
358 | emit appendToLog(QString("*** STOP *** READ ")); | |
359 | return count; |
|
359 | return count; | |
360 | } |
|
360 | } | |
361 |
|
361 | |||
362 | unsigned int StarDundee::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address) |
|
362 | unsigned int StarDundee::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address) | |
363 | { |
|
363 | { | |
364 | RMAP *RMAPCommand; |
|
364 | RMAP *RMAPCommand; | |
365 | char * packet; |
|
365 | char * packet; | |
366 | char* aux; |
|
366 | char* aux; | |
367 | unsigned char offset, headerSize, CRCSize; |
|
367 | unsigned char offset, headerSize, CRCSize; | |
368 | unsigned int totalSize; |
|
368 | unsigned int totalSize; | |
369 | int errorCode; |
|
369 | int errorCode; | |
370 | QString console_message; |
|
370 | QString console_message; | |
371 |
|
371 | |||
372 | if (getLinkStatus(this->linkNumber_SPINBOX->value()) == 0) |
|
372 | if (getLinkStatus(this->linkNumber_SPINBOX->value()) == 0) | |
373 | { |
|
373 | { | |
374 | this->Close(); |
|
374 | this->Close(); | |
375 | return 1; |
|
375 | return 1; | |
376 | } |
|
376 | } | |
377 |
|
377 | |||
378 | RMAPCommand = new RMAP(this->commandCode, |
|
378 | RMAPCommand = new RMAP(this->commandCode, | |
379 | rmapTargetLogicalAddress, |
|
379 | rmapTargetLogicalAddress, | |
380 | rmapSourceLogicalAddress, |
|
380 | rmapSourceLogicalAddress, | |
381 | address, |
|
381 | address, | |
382 | nbBytes, |
|
382 | nbBytes, | |
383 | data); |
|
383 | data); | |
384 | headerSize = sizeof(RMAPCommand->RMAPHeader); |
|
384 | headerSize = sizeof(RMAPCommand->RMAPHeader); | |
385 | CRCSize = 1; |
|
385 | CRCSize = 1; | |
386 |
|
386 | |||
387 | //************************* |
|
387 | //************************* | |
388 | // BUILD THE PACKET TO SEND |
|
388 | // BUILD THE PACKET TO SEND | |
389 | totalSize = headerSize + nbBytes + CRCSize + PATH_ADDRESSING_OFFSET; |
|
389 | totalSize = headerSize + nbBytes + CRCSize + PATH_ADDRESSING_OFFSET; | |
390 | packet = (char*) malloc( totalSize ); |
|
390 | packet = (char*) malloc( totalSize ); | |
391 | aux = (char*) ((void*) &RMAPCommand->RMAPHeader); |
|
391 | aux = (char*) ((void*) &RMAPCommand->RMAPHeader); | |
392 | packet[0] = this->linkNumber_SPINBOX->value(); |
|
392 | packet[0] = this->linkNumber_SPINBOX->value(); | |
393 | for(unsigned int i = 0; i<headerSize; i++) packet[i+PATH_ADDRESSING_OFFSET] = aux[i]; |
|
393 | for(unsigned int i = 0; i<headerSize; i++) packet[i+PATH_ADDRESSING_OFFSET] = aux[i]; | |
394 | offset = headerSize; |
|
394 | offset = headerSize; | |
395 | for(unsigned int i = 0; i<nbBytes; i++) |
|
395 | for(unsigned int i = 0; i<nbBytes; i++) | |
396 | { |
|
396 | { | |
397 | packet[i+offset+PATH_ADDRESSING_OFFSET] = data[i]; |
|
397 | packet[i+offset+PATH_ADDRESSING_OFFSET] = data[i]; | |
398 | } |
|
398 | } | |
399 | packet[nbBytes+offset+PATH_ADDRESSING_OFFSET] = RMAPCommand->dataCRC; |
|
399 | packet[nbBytes+offset+PATH_ADDRESSING_OFFSET] = RMAPCommand->dataCRC; | |
400 |
|
400 | |||
401 | //**************** |
|
401 | //**************** | |
402 | // SEND THE PACKET |
|
402 | // SEND THE PACKET | |
403 | result = USBSpaceWire_SendPacket(hDevice, |
|
403 | result = USBSpaceWire_SendPacket(hDevice, | |
404 | packet, |
|
404 | packet, | |
405 | totalSize, |
|
405 | totalSize, | |
406 | BWAIT_1, &pIdentifier); |
|
406 | BWAIT_1, &pIdentifier); | |
407 | if (result != TRANSFER_SUCCESS) |
|
407 | if (result != TRANSFER_SUCCESS) | |
408 | { |
|
408 | { | |
409 | emit sendMessage("ERROR *** WriteStarDundee when sending packet of size " |
|
409 | emit sendMessage("ERROR *** WriteStarDundee when sending packet of size " | |
410 | + QString::number(totalSize) +", with code: " + QString::number(result)); |
|
410 | + QString::number(totalSize) +", with code: " + QString::number(result)); | |
411 | USBSpaceWire_FreeSend(hDevice, pIdentifier); |
|
411 | USBSpaceWire_FreeSend(hDevice, pIdentifier); | |
412 | free(data); |
|
412 | free(data); | |
413 | return 1; |
|
413 | return 1; | |
414 | } |
|
414 | } | |
415 | else emit sendMessage("OK *** WriteStarDundee when sending packet of size " + QString::number(totalSize)); |
|
415 | else emit sendMessage("OK *** WriteStarDundee when sending packet of size " + QString::number(totalSize)); | |
416 |
|
416 | |||
417 | //************** |
|
417 | //************** | |
418 | // Free the send |
|
418 | // Free the send | |
419 | USBSpaceWire_FreeSend(hDevice, pIdentifier); |
|
419 | USBSpaceWire_FreeSend(hDevice, pIdentifier); | |
420 | free(packet); |
|
420 | free(packet); | |
421 |
|
421 | |||
422 | if ( (commandCode == writeSingle_noVer_Rep) | (commandCode == writeInc_noVer_Rep) | |
|
422 | if ( (commandCode == writeSingle_noVer_Rep) | (commandCode == writeInc_noVer_Rep) | | |
423 | (commandCode == writeSingle_ver_rep) | (commandCode == writeInc_ver_rep) ) |
|
423 | (commandCode == writeSingle_ver_rep) | (commandCode == writeInc_ver_rep) ) | |
424 | { |
|
424 | { | |
425 | // WAIT FOR THE RMAP REPLY PACKET |
|
425 | // WAIT FOR THE RMAP REPLY PACKET | |
426 | errorCode = this->receiveSPWPacket(1); |
|
426 | errorCode = this->receiveSPWPacket(1); | |
427 | if (errorCode<=0) |
|
427 | if (errorCode<=0) | |
428 | { |
|
428 | { | |
429 | emit appendToLog("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); |
|
429 | emit appendToLog("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); | |
430 | return 0; |
|
430 | return 0; | |
431 | } |
|
431 | } | |
432 | if(rmapPacketSize != 8) |
|
432 | if(rmapPacketSize != 8) | |
433 | { |
|
433 | { | |
434 | console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n"); |
|
434 | console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n"); | |
435 | emit appendToLog(console_message); |
|
435 | emit appendToLog(console_message); | |
436 | return 0; |
|
436 | return 0; | |
437 | } |
|
437 | } | |
438 | switch (this->rmapPacket[3]) // byte 4 is the status byte in the reply |
|
438 | switch (this->rmapPacket[3]) // byte 4 is the status byte in the reply | |
439 | { |
|
439 | { | |
440 | case 0: |
|
440 | case 0: | |
441 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 0 Successfull"); |
|
441 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 0 Successfull"); | |
442 | break; |
|
442 | break; | |
443 | case 1: |
|
443 | case 1: | |
444 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** General error code"); |
|
444 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** General error code"); | |
445 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 1 General error code"); |
|
445 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 1 General error code"); | |
446 | break; |
|
446 | break; | |
447 | case 2: |
|
447 | case 2: | |
448 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code"); |
|
448 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code"); | |
449 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code"); |
|
449 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code"); | |
450 | break; |
|
450 | break; | |
451 | case 3: |
|
451 | case 3: | |
452 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key"); |
|
452 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key"); | |
453 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 3 Invalid key"); |
|
453 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 3 Invalid key"); | |
454 | break; |
|
454 | break; | |
455 | case 4: |
|
455 | case 4: | |
456 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC"); |
|
456 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC"); | |
457 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 4 Invalid data CRC"); |
|
457 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 4 Invalid data CRC"); | |
458 | break; |
|
458 | break; | |
459 | case 5: |
|
459 | case 5: | |
460 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP"); |
|
460 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP"); | |
461 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 5 Early EOP"); |
|
461 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 5 Early EOP"); | |
462 | break; |
|
462 | break; | |
463 | case 6: |
|
463 | case 6: | |
464 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data"); |
|
464 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data"); | |
465 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 6 Too much data"); |
|
465 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 6 Too much data"); | |
466 | break; |
|
466 | break; | |
467 | case 7: |
|
467 | case 7: | |
468 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** EEP"); |
|
468 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** EEP"); | |
469 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 7 EEP"); |
|
469 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 7 EEP"); | |
470 | break; |
|
470 | break; | |
471 | case 8: |
|
471 | case 8: | |
472 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved"); |
|
472 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved"); | |
473 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 8 Reserved"); |
|
473 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 8 Reserved"); | |
474 | break; |
|
474 | break; | |
475 | case 9: |
|
475 | case 9: | |
476 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun"); |
|
476 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun"); | |
477 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun"); |
|
477 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun"); | |
478 | break; |
|
478 | break; | |
479 | case 10: |
|
479 | case 10: | |
480 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised"); |
|
480 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised"); | |
481 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised"); |
|
481 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised"); | |
482 | break; |
|
482 | break; | |
483 | case 11: |
|
483 | case 11: | |
484 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error"); |
|
484 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error"); | |
485 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error"); |
|
485 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error"); | |
486 | break; |
|
486 | break; | |
487 | case 12: |
|
487 | case 12: | |
488 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address"); |
|
488 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address"); | |
489 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 12 Invalid target logical address"); |
|
489 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 12 Invalid target logical address"); | |
490 | break; |
|
490 | break; | |
491 | } |
|
491 | } | |
492 | this->acquireRMAPSemaphore(); |
|
492 | this->acquireRMAPSemaphore(); | |
493 | } |
|
493 | } | |
494 | else |
|
494 | else | |
495 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); |
|
495 | emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); | |
496 |
|
496 | |||
497 | return nbBytes; |
|
497 | return nbBytes; | |
498 | } |
|
498 | } | |
499 |
|
499 | |||
500 | unsigned int StarDundee::ReadBLOCK(unsigned int nbBytes, unsigned int address) |
|
500 | unsigned int StarDundee::ReadBLOCK(unsigned int nbBytes, unsigned int address) | |
501 | { |
|
501 | { | |
502 | int errorCode; |
|
502 | int errorCode; | |
503 | RMAP *RMAPCommand; |
|
503 | RMAP *RMAPCommand; | |
504 | char *packet; |
|
504 | char *packet; | |
505 | char *aux; |
|
505 | char *aux; | |
506 | unsigned int dataLength = 0; |
|
506 | unsigned int dataLength = 0; | |
507 | unsigned int totalSize = 0; |
|
507 | unsigned int totalSize = 0; | |
508 |
|
508 | |||
509 | //********************** |
|
509 | //********************** | |
510 | // Check the link status |
|
510 | // Check the link status | |
511 | if ( getLinkStatus( this->linkNumber_SPINBOX->value() ) == 0 ) |
|
511 | if ( getLinkStatus( this->linkNumber_SPINBOX->value() ) == 0 ) | |
512 | { |
|
512 | { | |
513 | this->Close(); |
|
513 | this->Close(); | |
514 | emit appendToLog("WARNING === in function WriteSPW of StarDundee *** SPW link not running\n"); |
|
514 | emit appendToLog("WARNING === in function WriteSPW of StarDundee *** SPW link not running\n"); | |
515 | return 0; |
|
515 | return 0; | |
516 | } |
|
516 | } | |
517 |
|
517 | |||
518 | //********************** |
|
518 | //********************** | |
519 | // SEND THE READ COMMAND |
|
519 | // SEND THE READ COMMAND | |
520 | if (nbBytes > 4) |
|
520 | if (nbBytes > 4) | |
521 | { |
|
521 | { | |
522 | RMAPCommand = new RMAP(read_Inc, |
|
522 | RMAPCommand = new RMAP(read_Inc, | |
523 | rmapTargetLogicalAddress, |
|
523 | rmapTargetLogicalAddress, | |
524 | rmapSourceLogicalAddress, |
|
524 | rmapSourceLogicalAddress, | |
525 | address, |
|
525 | address, | |
526 | nbBytes, |
|
526 | nbBytes, | |
527 | NULL); |
|
527 | NULL); | |
528 | } |
|
528 | } | |
529 | else |
|
529 | else | |
530 | { |
|
530 | { | |
531 | RMAPCommand = new RMAP(read_Single, |
|
531 | RMAPCommand = new RMAP(read_Single, | |
532 | rmapTargetLogicalAddress, |
|
532 | rmapTargetLogicalAddress, | |
533 | rmapSourceLogicalAddress, |
|
533 | rmapSourceLogicalAddress, | |
534 | address, |
|
534 | address, | |
535 | nbBytes, |
|
535 | nbBytes, | |
536 | NULL); |
|
536 | NULL); | |
537 | } |
|
537 | } | |
538 |
|
538 | |||
539 | //************************* |
|
539 | //************************* | |
540 | // BUILD THE PACKET TO SEND |
|
540 | // BUILD THE PACKET TO SEND | |
541 | totalSize = sizeof(RMAPCommand->RMAPHeader) + PATH_ADDRESSING_OFFSET; |
|
541 | totalSize = sizeof(RMAPCommand->RMAPHeader) + PATH_ADDRESSING_OFFSET; | |
542 | packet = (char*) malloc( totalSize ); |
|
542 | packet = (char*) malloc( totalSize ); | |
543 | aux = (char*) ((void*) &RMAPCommand->RMAPHeader); |
|
543 | aux = (char*) ((void*) &RMAPCommand->RMAPHeader); | |
544 | packet[0] = this->linkNumber_SPINBOX->value(); |
|
544 | packet[0] = this->linkNumber_SPINBOX->value(); | |
545 | for (unsigned int i = 0; i<sizeof(RMAPCommand->RMAPHeader); i++) |
|
545 | for (unsigned int i = 0; i<sizeof(RMAPCommand->RMAPHeader); i++) | |
546 | packet[i+PATH_ADDRESSING_OFFSET] = aux[i]; |
|
546 | packet[i+PATH_ADDRESSING_OFFSET] = aux[i]; | |
547 |
|
547 | |||
548 | //**************** |
|
548 | //**************** | |
549 | // SEND THE PACKET |
|
549 | // SEND THE PACKET | |
550 | result = USBSpaceWire_SendPacket(hDevice, |
|
550 | result = USBSpaceWire_SendPacket(hDevice, | |
551 | packet, |
|
551 | packet, | |
552 | totalSize, |
|
552 | totalSize, | |
553 | BWAIT_1, &pIdentifier); |
|
553 | BWAIT_1, &pIdentifier); | |
554 | if (result != TRANSFER_SUCCESS) emit sendMessage("ERR *** ReadStarDundee *** ReadBLOCK *** sending the READ command "); |
|
554 | if (result != TRANSFER_SUCCESS) emit sendMessage("ERR *** ReadStarDundee *** ReadBLOCK *** sending the READ command "); | |
555 | else |
|
555 | else | |
556 | { |
|
556 | { | |
557 | emit sendMessage("OK *** ReadStarDundee *** ReadBLOCK *** sending the READ command"); |
|
557 | emit sendMessage("OK *** ReadStarDundee *** ReadBLOCK *** sending the READ command"); | |
558 | emit appendToLog("packet sent, B0 = " + QString::number(packet[0], 16) |
|
558 | emit appendToLog("packet sent, B0 = " + QString::number(packet[0], 16) | |
559 | + " *** B1 = " + QString::number(packet[1], 16) |
|
559 | + " *** B1 = " + QString::number(packet[1], 16) | |
560 | + " *** B2 = " + QString::number(packet[2], 16) |
|
560 | + " *** B2 = " + QString::number(packet[2], 16) | |
561 | + " *** B3 = " + QString::number(packet[3], 16) |
|
561 | + " *** B3 = " + QString::number(packet[3], 16) | |
562 | + " *** B4 = " + QString::number(packet[4], 16) |
|
562 | + " *** B4 = " + QString::number(packet[4], 16) | |
563 | + " *** B5 = " + QString::number(packet[5], 16) |
|
563 | + " *** B5 = " + QString::number(packet[5], 16) | |
564 | ); |
|
564 | ); | |
565 | } |
|
565 | } | |
566 |
|
566 | |||
567 | //************** |
|
567 | //************** | |
568 | // Free the send |
|
568 | // Free the send | |
569 | USBSpaceWire_FreeSend(hDevice, pIdentifier); |
|
569 | USBSpaceWire_FreeSend(hDevice, pIdentifier); | |
570 | free(packet); |
|
570 | free(packet); | |
571 |
|
571 | |||
572 | //********************************* |
|
572 | //********************************* | |
573 | // RECEIVE THE INCOMING RMAP PACKET |
|
573 | // RECEIVE THE INCOMING RMAP PACKET | |
574 | errorCode = this->receiveSPWPacket(1); // request ID 1 is for RMAP packet |
|
574 | errorCode = this->receiveSPWPacket(1); // request ID 1 is for RMAP packet | |
575 | if (errorCode<=0) |
|
575 | if (errorCode<=0) | |
576 | { |
|
576 | { | |
577 | emit appendToLog("WARNING === in function ReadBLOCK of StarDundee *** RMAP packet reception failed with code " + QString::number(errorCode)); |
|
577 | emit appendToLog("WARNING === in function ReadBLOCK of StarDundee *** RMAP packet reception failed with code " + QString::number(errorCode)); | |
578 | return 0; |
|
578 | return 0; | |
579 | } |
|
579 | } | |
580 | dataLength = rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH; |
|
580 | dataLength = rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH; | |
581 | if(dataLength != nbBytes) |
|
581 | if(dataLength != nbBytes) | |
582 | { |
|
582 | { | |
583 | emit appendToLog("WARNING === in function READ of StarDundee *** number of data received (" |
|
583 | emit appendToLog("WARNING === in function READ of StarDundee *** number of data received (" | |
584 | +QString::number(dataLength) |
|
584 | +QString::number(dataLength) | |
585 | +") not equal to number of data requested (" |
|
585 | +") not equal to number of data requested (" | |
586 | +QString::number(nbBytes) |
|
586 | +QString::number(nbBytes) | |
587 | +")"); |
|
587 | +")"); | |
588 | return 0; |
|
588 | return 0; | |
589 | } |
|
589 | } | |
590 | return dataLength; |
|
590 | return dataLength; | |
591 | } |
|
591 | } | |
592 |
|
592 | |||
593 | unsigned int StarDundee::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) |
|
593 | unsigned int StarDundee::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) | |
594 | { |
|
594 | { | |
595 | char protocoleIdentifier = 0x02; |
|
595 | char protocoleIdentifier = 0x02; | |
596 | char reserved = 0x00; |
|
596 | char reserved = 0x00; | |
597 | char *SPWData; |
|
597 | char *SPWData; | |
598 | unsigned int totalSize; |
|
598 | unsigned int totalSize; | |
599 |
|
599 | |||
600 | if (count>248) |
|
600 | if (count>248) | |
601 | { |
|
601 | { | |
602 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n"); |
|
602 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n"); | |
603 | return 1; |
|
603 | return 1; | |
604 | } |
|
604 | } | |
605 |
|
605 | |||
606 | emit appendToLog("*** START *** Send CCSDS packet of "+ QString::number(count) + " byte(s)"); |
|
606 | emit appendToLog("*** START *** Send CCSDS packet of "+ QString::number(count) + " byte(s)"); | |
607 |
|
607 | |||
608 | if ( getLinkStatus( this->linkNumber_SPINBOX->value() ) == 0 ) |
|
608 | if ( getLinkStatus( this->linkNumber_SPINBOX->value() ) == 0 ) | |
609 | { |
|
609 | { | |
610 | this->Close(); |
|
610 | this->Close(); | |
611 | emit appendToLog("WARNING === in function WriteSPW of StarDundee *** SPW link not running\n"); |
|
611 | emit appendToLog("WARNING === in function WriteSPW of StarDundee *** SPW link not running\n"); | |
612 | return 1; |
|
612 | return 1; | |
613 | } |
|
613 | } | |
614 |
|
614 | |||
615 | totalSize = count + 4 + PATH_ADDRESSING_OFFSET; // The StarDundee brick is in PATH addressing |
|
615 | totalSize = count + 4 + PATH_ADDRESSING_OFFSET; // The StarDundee brick is in PATH addressing | |
616 | SPWData = (char*) malloc(totalSize); |
|
616 | SPWData = (char*) malloc(totalSize); | |
617 | // SPW HEADER |
|
617 | // SPW HEADER | |
618 | SPWData[0] = this->linkNumber_SPINBOX->value(); // 1 by default, value can be 1 or 2 |
|
618 | SPWData[0] = this->linkNumber_SPINBOX->value(); // 1 by default, value can be 1 or 2 | |
619 | SPWData[0+PATH_ADDRESSING_OFFSET] = targetLogicalAddress; |
|
619 | SPWData[0+PATH_ADDRESSING_OFFSET] = targetLogicalAddress; | |
620 | SPWData[1+PATH_ADDRESSING_OFFSET] = protocoleIdentifier; |
|
620 | SPWData[1+PATH_ADDRESSING_OFFSET] = protocoleIdentifier; | |
621 | SPWData[2+PATH_ADDRESSING_OFFSET] = reserved; |
|
621 | SPWData[2+PATH_ADDRESSING_OFFSET] = reserved; | |
622 | SPWData[3+PATH_ADDRESSING_OFFSET] = userApplication; |
|
622 | SPWData[3+PATH_ADDRESSING_OFFSET] = userApplication; | |
623 | // CCSDS PACKET |
|
623 | // CCSDS PACKET | |
624 | for (unsigned int i = 0; i<count; i++) |
|
624 | for (unsigned int i = 0; i<count; i++) | |
625 | { |
|
625 | { | |
626 | SPWData[i+4+PATH_ADDRESSING_OFFSET] = Value[i]; |
|
626 | SPWData[i+4+PATH_ADDRESSING_OFFSET] = Value[i]; | |
627 | } |
|
627 | } | |
628 |
|
628 | |||
629 | //**************** |
|
629 | //**************** | |
630 | // SEND THE PACKET |
|
630 | // SEND THE PACKET | |
631 | result = USBSpaceWire_SendPacket(hDevice, |
|
631 | result = USBSpaceWire_SendPacket(hDevice, | |
632 | SPWData, |
|
632 | SPWData, | |
633 | totalSize, |
|
633 | totalSize, | |
634 | BWAIT_1, &pIdentifier); |
|
634 | BWAIT_1, &pIdentifier); | |
635 | if (result != TRANSFER_SUCCESS) |
|
635 | if (result != TRANSFER_SUCCESS) | |
636 | { |
|
636 | { | |
637 | emit sendMessage("ERROR *** WriteSPW when sending packet of size " |
|
637 | emit sendMessage("ERROR *** WriteSPW when sending packet of size " | |
638 | + QString::number(totalSize) +", with code: " + QString::number(result)); |
|
638 | + QString::number(totalSize) +", with code: " + QString::number(result)); | |
639 | USBSpaceWire_FreeSend(hDevice, pIdentifier); |
|
639 | USBSpaceWire_FreeSend(hDevice, pIdentifier); | |
640 | free(SPWData); |
|
640 | free(SPWData); | |
641 | return 0; |
|
641 | return 0; | |
642 | } |
|
642 | } | |
643 | else emit sendMessage("OK *** WriteSPW when sending packet of size " + QString::number(totalSize-1)); |
|
643 | else emit sendMessage("OK *** WriteSPW when sending packet of size " + QString::number(totalSize-1)); | |
644 | emit appendToLog("packet sent, B0 = " + QString::number(SPWData[0]) |
|
644 | emit appendToLog("packet sent, B0 = " + QString::number(SPWData[0]) | |
645 | + " *** B1 = " + QString::number(SPWData[1]) |
|
645 | + " *** B1 = " + QString::number(SPWData[1]) | |
646 | + " *** B2 = " + QString::number(SPWData[2]) |
|
646 | + " *** B2 = " + QString::number(SPWData[2]) | |
647 | + " *** B3 = " + QString::number(SPWData[3]) |
|
647 | + " *** B3 = " + QString::number(SPWData[3]) | |
648 | + " *** B4 = " + QString::number(SPWData[4]) |
|
648 | + " *** B4 = " + QString::number(SPWData[4]) | |
649 | + " *** B5 = " + QString::number(SPWData[5]) |
|
649 | + " *** B5 = " + QString::number(SPWData[5]) | |
650 | + " *** B6 = " + QString::number(SPWData[6]) |
|
650 | + " *** B6 = " + QString::number(SPWData[6]) | |
651 | + " *** B7 = " + QString::number(SPWData[7]) |
|
651 | + " *** B7 = " + QString::number(SPWData[7]) | |
652 | + " *** B8 = " + QString::number(SPWData[8]) |
|
652 | + " *** B8 = " + QString::number(SPWData[8]) | |
653 | + " *** B9 = " + QString::number(SPWData[9]) |
|
653 | + " *** B9 = " + QString::number(SPWData[9]) | |
654 | + " *** B10 = " + QString::number(SPWData[10]) |
|
654 | + " *** B10 = " + QString::number(SPWData[10]) | |
655 | + " *** B11 = " + QString::number(SPWData[11]) |
|
655 | + " *** B11 = " + QString::number(SPWData[11]) | |
656 | + " *** B12 = " + QString::number(SPWData[12]) |
|
656 | + " *** B12 = " + QString::number(SPWData[12]) | |
657 | ); |
|
657 | ); | |
658 |
|
658 | |||
659 | //************** |
|
659 | //************** | |
660 | // Free the send |
|
660 | // Free the send | |
661 | USBSpaceWire_FreeSend(hDevice, pIdentifier); |
|
661 | USBSpaceWire_FreeSend(hDevice, pIdentifier); | |
662 | free(SPWData); |
|
662 | free(SPWData); | |
663 |
|
663 | |||
664 | emit appendToLog(QString("*** CCSDS packet sent")); |
|
664 | emit appendToLog(QString("*** CCSDS packet sent")); | |
665 |
|
665 | |||
666 | return 1; |
|
666 | return 1; | |
667 | } |
|
667 | } | |
668 |
|
668 | |||
669 | unsigned int StarDundee::getLinkStatus(unsigned char link) |
|
669 | unsigned int StarDundee::getLinkStatus(unsigned char link) | |
670 | { |
|
670 | { | |
671 | U32 statusControl, errorStatus, portType; |
|
671 | U32 statusControl, errorStatus, portType; | |
672 | U32 linkStatus, operatingSpeed, outputPortConnection; |
|
672 | U32 linkStatus, operatingSpeed, outputPortConnection; | |
673 | char isLinkRunning, isAutoStart, isStart, isDisabled, isTristate; |
|
673 | char isLinkRunning, isAutoStart, isStart, isDisabled, isTristate; | |
674 |
|
674 | |||
675 | // Read the link status control register |
|
675 | // Read the link status control register | |
676 | if (CFGSpaceWire_GetLinkStatusControl(hDevice, 1, &statusControl) != CFG_TRANSFER_SUCCESS) |
|
676 | if (CFGSpaceWire_GetLinkStatusControl(hDevice, 1, &statusControl) != CFG_TRANSFER_SUCCESS) | |
677 | { |
|
677 | { | |
678 | emit appendToLog("Could not read link status control for link" + QString::number(link)); |
|
678 | emit appendToLog("Could not read link status control for link" + QString::number(link)); | |
679 | } |
|
679 | } | |
680 | else |
|
680 | else | |
681 | { |
|
681 | { | |
682 | // Display the link status control register properties |
|
682 | // Display the link status control register properties | |
683 | CFGSpaceWire_LSPortType(statusControl, &portType); |
|
683 | CFGSpaceWire_LSPortType(statusControl, &portType); | |
684 | if (portType == CFG_CONFIGURATION_PORT) |
|
684 | if (portType == CFG_CONFIGURATION_PORT) | |
685 | { |
|
685 | { | |
686 | CFGSpaceWire_LSConfigErrorStatus(statusControl, &errorStatus); |
|
686 | CFGSpaceWire_LSConfigErrorStatus(statusControl, &errorStatus); | |
687 | //emit appendToLog("Configuration port error status = " + QString::number(errorStatus)); |
|
687 | //emit appendToLog("Configuration port error status = " + QString::number(errorStatus)); | |
688 | } |
|
688 | } | |
689 | else if (portType == CFG_SPACEWIRE_EXTERNAL_PORT) |
|
689 | else if (portType == CFG_SPACEWIRE_EXTERNAL_PORT) | |
690 | { |
|
690 | { | |
691 | CFGSpaceWire_LSExternalErrorStatus(statusControl, &errorStatus); |
|
691 | CFGSpaceWire_LSExternalErrorStatus(statusControl, &errorStatus); | |
692 | //emit appendToLog("External port error status = " + QString::number(errorStatus)); |
|
692 | //emit appendToLog("External port error status = " + QString::number(errorStatus)); | |
693 | } |
|
693 | } | |
694 | else |
|
694 | else | |
695 | { |
|
695 | { | |
696 | CFGSpaceWire_LSErrorStatus(statusControl, &errorStatus); |
|
696 | CFGSpaceWire_LSErrorStatus(statusControl, &errorStatus); | |
697 | //emit appendToLog("SpaceWire link error status = " + QString::number(errorStatus)); |
|
697 | //emit appendToLog("SpaceWire link error status = " + QString::number(errorStatus)); | |
698 | } |
|
698 | } | |
699 | CFGSpaceWire_LSLinkState(statusControl, &linkStatus); |
|
699 | CFGSpaceWire_LSLinkState(statusControl, &linkStatus); | |
700 | CFGSpaceWire_LSIsLinkRunning(statusControl, &isLinkRunning); |
|
700 | CFGSpaceWire_LSIsLinkRunning(statusControl, &isLinkRunning); | |
701 | CFGSpaceWire_LSIsAutoStart(statusControl, &isAutoStart); |
|
701 | CFGSpaceWire_LSIsAutoStart(statusControl, &isAutoStart); | |
702 | CFGSpaceWire_LSIsStart(statusControl, &isStart); |
|
702 | CFGSpaceWire_LSIsStart(statusControl, &isStart); | |
703 | CFGSpaceWire_LSIsDisabled(statusControl, &isDisabled); |
|
703 | CFGSpaceWire_LSIsDisabled(statusControl, &isDisabled); | |
704 | CFGSpaceWire_LSIsTristate(statusControl, &isTristate); |
|
704 | CFGSpaceWire_LSIsTristate(statusControl, &isTristate); | |
705 | CFGSpaceWire_LSOperatingSpeed(statusControl, &operatingSpeed); |
|
705 | CFGSpaceWire_LSOperatingSpeed(statusControl, &operatingSpeed); | |
706 | CFGSpaceWire_LSOutputPortConnection(statusControl, &outputPortConnection); |
|
706 | CFGSpaceWire_LSOutputPortConnection(statusControl, &outputPortConnection); | |
707 | //emit appendToLog("The link state is = " + QString::number(linkStatus)); |
|
707 | //emit appendToLog("The link state is = " + QString::number(linkStatus)); | |
708 | //emit appendToLog("The link is running = " + QString::number(isLinkRunning)); |
|
708 | //emit appendToLog("The link is running = " + QString::number(isLinkRunning)); | |
709 | //emit appendToLog("The autostart bit is enabled = " + QString::number(isAutoStart)); |
|
709 | //emit appendToLog("The autostart bit is enabled = " + QString::number(isAutoStart)); | |
710 | //emit appendToLog("The start bit is enabled = " + QString::number(isStart)); |
|
710 | //emit appendToLog("The start bit is enabled = " + QString::number(isStart)); | |
711 | //emit appendToLog("The link is disabled = " + QString::number(isDisabled)); |
|
711 | //emit appendToLog("The link is disabled = " + QString::number(isDisabled)); | |
712 | //emit appendToLog("The tri-state bit is enabled = " + QString::number(isAutoStart)); |
|
712 | //emit appendToLog("The tri-state bit is enabled = " + QString::number(isAutoStart)); | |
713 | //emit appendToLog("The operating speed is = " + QString::number(operatingSpeed)); |
|
713 | //emit appendToLog("The operating speed is = " + QString::number(operatingSpeed)); | |
714 | //emit appendToLog("This port is currently connected to output port = " + QString::number(outputPortConnection)); |
|
714 | //emit appendToLog("This port is currently connected to output port = " + QString::number(outputPortConnection)); | |
715 | } |
|
715 | } | |
716 | if (linkStatus == 5) return 1; |
|
716 | if (linkStatus == 5) return 1; | |
717 | else return 0; |
|
717 | else return 0; | |
718 | } |
|
718 | } | |
719 |
|
719 | |||
720 | void StarDundee::receivePollingLoop() |
|
720 | void StarDundee::receivePollingLoop() | |
721 | { |
|
721 | { | |
722 | timer->blockSignals(true); |
|
722 | timer->blockSignals(true); | |
723 | if (USBSpaceWire_WaitOnReadPacketAvailable(hDevice, 0)) receiveSPWPacketLoop(0); |
|
723 | if (USBSpaceWire_WaitOnReadPacketAvailable(hDevice, 0)) receiveSPWPacketLoop(0); | |
724 | timer->blockSignals(false); |
|
724 | timer->blockSignals(false); | |
725 | } |
|
725 | } | |
726 |
|
726 | |||
727 | int StarDundee::receiveSPWPacketLoop(unsigned char requestID) |
|
727 | int StarDundee::receiveSPWPacketLoop(unsigned char requestID) | |
728 | { |
|
728 | { | |
729 | int result = 0; |
|
729 | int result = 0; | |
730 | emit appendToLog("Number of packets dropped by the driver: " + |
|
730 | emit appendToLog("Number of packets dropped by the driver: " + | |
731 | QString::number(USBSpaceWire_GetDriverDroppedPackets(hDevice))); |
|
731 | QString::number(USBSpaceWire_GetDriverDroppedPackets(hDevice))); | |
732 |
|
732 | |||
733 | while (USBSpaceWire_WaitOnReadPacketAvailable(hDevice, 0)) |
|
733 | while (USBSpaceWire_WaitOnReadPacketAvailable(hDevice, 0)) | |
734 | { |
|
734 | { | |
735 | //sendMessage("trying to get a packet"); |
|
|||
736 | result = receiveSPWPacket(requestID); |
|
735 | result = receiveSPWPacket(requestID); | |
737 | } |
|
736 | } | |
738 | if (!ccsdsPacketStore.isEmpty()) |
|
737 | if (!ccsdsPacketStore.isEmpty()) | |
739 | { |
|
738 | { | |
740 | emit packetStoreNotEmpty(); |
|
739 | emit packetStoreNotEmpty(); | |
741 | } |
|
740 | } | |
742 | return result; |
|
741 | return result; | |
743 | } |
|
742 | } | |
744 |
|
743 | |||
745 | int StarDundee::receiveSPWPacket(unsigned char requestID) // SLOT |
|
744 | int StarDundee::receiveSPWPacket(unsigned char requestID) // SLOT | |
746 | { |
|
745 | { | |
747 | unsigned int packetLength; |
|
746 | unsigned int packetLength; | |
748 | unsigned int nbBytes; |
|
747 | unsigned int nbBytes; | |
749 | unsigned nPacketNum; |
|
748 | unsigned nPacketNum; | |
750 | USB_SPACEWIRE_PACKET_PROPERTIES properties; // The properties of the read |
|
749 | USB_SPACEWIRE_PACKET_PROPERTIES properties; // The properties of the read | |
751 |
|
750 | |||
752 | if (requestID==1) |
|
751 | if (requestID==1) | |
753 | { |
|
752 | { | |
754 | if (rmapPacketSEMAPHORE->available()) |
|
753 | if (rmapPacketSEMAPHORE->available()) | |
755 | { |
|
754 | { | |
756 | return rmapPacketSize; |
|
755 | return rmapPacketSize; | |
757 | } |
|
756 | } | |
758 | } |
|
757 | } | |
759 |
|
758 | |||
760 | //******************** |
|
759 | //******************** | |
761 | // TRY TO RECEIVE DATA |
|
760 | // TRY TO RECEIVE DATA | |
762 | nbBytes = qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH); // maximum size of the packet to receive |
|
761 | nbBytes = qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH); // maximum size of the packet to receive | |
763 | nPacketNum = 1; |
|
762 | nPacketNum = 1; | |
764 | result = USBSpaceWire_ReadPackets(hDevice, spwPacket, nbBytes, nPacketNum, BWAIT_1, &properties, &pIdentifierRead); |
|
763 | result = USBSpaceWire_ReadPackets(hDevice, spwPacket, nbBytes, nPacketNum, BWAIT_1, &properties, &pIdentifierRead); | |
765 | if (result != TRANSFER_SUCCESS) |
|
764 | if (result != TRANSFER_SUCCESS) | |
766 | { |
|
765 | { | |
767 | emit sendMessage("Error: Could not receive the packet"); |
|
766 | emit sendMessage("Error: Could not receive the packet"); | |
|
767 | USBSpaceWire_FreeRead(hDevice, pIdentifierRead); // Free the read buffer | |||
768 | return 0; |
|
768 | return 0; | |
769 | } |
|
769 | } | |
770 | else |
|
770 | else | |
771 | { |
|
771 | { | |
772 | packetLength = properties.len; |
|
772 | packetLength = properties.len; | |
773 | if (properties.eop == SPACEWIRE_USB_NO_EOP) |
|
773 | if (properties.eop == SPACEWIRE_USB_NO_EOP) | |
774 | { |
|
774 | { | |
775 | emit appendToLog("No end of packet marker received"); |
|
775 | emit appendToLog("No end of packet marker received"); | |
776 | } |
|
776 | } | |
777 | else if (properties.eop == SPACEWIRE_USB_EOP) |
|
777 | else if (properties.eop == SPACEWIRE_USB_EOP) | |
778 | { |
|
778 | { | |
779 | emit appendToLog("Normal end of packet marker received"); |
|
779 | emit appendToLog("Normal end of packet marker received"); | |
780 | } |
|
780 | } | |
781 | else if (properties.eop == SPACEWIRE_USB_EEP) |
|
781 | else if (properties.eop == SPACEWIRE_USB_EEP) | |
782 | { |
|
782 | { | |
783 | emit appendToLog("Error end of packet marker received"); |
|
783 | emit appendToLog("Error end of packet marker received"); | |
784 | } |
|
784 | } | |
785 |
|
785 | |||
786 | USBSpaceWire_FreeRead(hDevice, pIdentifierRead); // Free the read buffer |
|
786 | USBSpaceWire_FreeRead(hDevice, pIdentifierRead); // Free the read buffer | |
787 | } |
|
787 | } | |
788 |
|
788 | |||
789 | switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet |
|
789 | switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet | |
790 | { |
|
790 | { | |
791 | case 1: // 0x01 is the protocole identifier for RMAP packets |
|
791 | case 1: // 0x01 is the protocole identifier for RMAP packets | |
792 | if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet |
|
792 | if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet | |
793 | for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i]; |
|
793 | for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i]; | |
794 | rmapPacketSize = packetLength; |
|
794 | rmapPacketSize = packetLength; | |
795 | rmapPacketSEMAPHORE->release(); |
|
795 | rmapPacketSEMAPHORE->release(); | |
796 | emit appendToLog("RMAP packet of size " + QString::number(packetLength) + " received"); |
|
796 | emit appendToLog("RMAP packet of size " + QString::number(packetLength) + " received"); | |
797 | emit appendToLog("packet received, B0 = " + QString::number(spwPacket[0], 16) |
|
797 | emit appendToLog("packet received, B0 = " + QString::number(spwPacket[0], 16) | |
798 | + " *** B1 = " + QString::number(spwPacket[1], 16) |
|
798 | + " *** B1 = " + QString::number(spwPacket[1], 16) | |
799 | + " *** B2 = " + QString::number(spwPacket[2], 16) |
|
799 | + " *** B2 = " + QString::number(spwPacket[2], 16) | |
800 | + " *** B3 = " + QString::number(spwPacket[3], 16) |
|
800 | + " *** B3 = " + QString::number(spwPacket[3], 16) | |
801 | + " *** B4 = " + QString::number(spwPacket[4], 16) |
|
801 | + " *** B4 = " + QString::number(spwPacket[4], 16) | |
802 | + " *** B5 = " + QString::number(spwPacket[5], 16) |
|
802 | + " *** B5 = " + QString::number(spwPacket[5], 16) | |
803 | ); |
|
803 | ); | |
804 | return packetLength; |
|
804 | return packetLength; | |
805 |
|
805 | |||
806 | case 2: // 0x02 is the protocole identifier for CCSDS packets |
|
806 | case 2: // 0x02 is the protocole identifier for CCSDS packets | |
807 | if (ccsdsPacketSEMAPHORE->available()!=0) |
|
807 | if (ccsdsPacketSEMAPHORE->available()!=0) | |
808 | { |
|
808 | { | |
809 | emit sendMessage("in function [receiveSPWPacket] === ERROR === previous CCSDS packet not processed yet"); |
|
809 | emit sendMessage("in function [receiveSPWPacket] === ERROR === previous CCSDS packet not processed yet"); | |
810 | return -4; // ERROR === previous CCSDS packet not processed yet |
|
810 | return -4; // ERROR === previous CCSDS packet not processed yet | |
811 | } |
|
811 | } | |
812 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; |
|
812 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; | |
813 | ccsdsPacketSize = packetLength; |
|
813 | ccsdsPacketSize = packetLength; | |
814 | //ccsdsPacketSEMAPHORE->release(); |
|
814 | //ccsdsPacketSEMAPHORE->release(); | |
815 | //emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); |
|
815 | //emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); | |
816 | emit appendToLog("CCSDS packet of size " + QString::number(packetLength) + " received"); |
|
816 | emit appendToLog("CCSDS packet of size " + QString::number(packetLength) + " received"); | |
817 | emit appendToLog("packet received, byte0 " + QString::number(spwPacket[0], 16) |
|
817 | emit appendToLog("packet received, byte0 " + QString::number(spwPacket[0], 16) | |
818 | + " *** byte1 " + QString::number(spwPacket[1], 16) |
|
818 | + " *** byte1 " + QString::number(spwPacket[1], 16) | |
819 | + " *** byte2 " + QString::number(spwPacket[2], 16) |
|
819 | + " *** byte2 " + QString::number(spwPacket[2], 16) | |
820 | + " *** byte3 " + QString::number(spwPacket[3], 16)); |
|
820 | + " *** byte3 " + QString::number(spwPacket[3], 16)); | |
821 | storeCCSDSPacket(ccsdsPacket, packetLength); |
|
821 | storeCCSDSPacket(ccsdsPacket, packetLength); | |
822 | return packetLength; |
|
822 | return packetLength; | |
823 | default: |
|
823 | default: | |
824 | emit appendToLog("packet received, byte0 " + QString::number(spwPacket[0], 16) |
|
824 | emit appendToLog("packet received, byte0 " + QString::number(spwPacket[0], 16) | |
825 | + " *** byte1 " + QString::number(spwPacket[1], 16) |
|
825 | + " *** byte1 " + QString::number(spwPacket[1], 16) | |
826 | + " *** byte2 " + QString::number(spwPacket[2], 16) |
|
826 | + " *** byte2 " + QString::number(spwPacket[2], 16) | |
827 | + " *** byte3 " + QString::number(spwPacket[3], 16)); |
|
827 | + " *** byte3 " + QString::number(spwPacket[3], 16)); | |
828 | return 0; |
|
828 | return 0; | |
829 | } |
|
829 | } | |
830 | return 0; |
|
830 | return 0; | |
831 | } |
|
831 | } | |
832 |
|
832 | |||
833 | unsigned int StarDundee::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) |
|
833 | unsigned int StarDundee::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) | |
834 | { |
|
834 | { | |
835 | unsigned int i; |
|
835 | TMPacketToRead *packet; | |
836 | ccsdsPacketToProcess_t ccsdsPacketToStore; |
|
|||
837 |
|
836 | |||
838 | ccsdsPacketToStore.size = size; |
|
837 | packet = new TMPacketToRead(ccsdsPacket, size); | |
839 | for(i=0; i<size; i++) |
|
838 | ccsdsPacketStore.append(packet); | |
840 | { |
|
839 | ||
841 | ccsdsPacketToStore.data[i] = ccsdsPacket[i]; |
|
|||
842 | } |
|
|||
843 | ccsdsPacketStore << ccsdsPacketToStore; |
|
|||
844 | //emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); |
|
|||
845 | //emit ccsdsPacketIsAvailable(size); |
|
|||
846 | return 1; |
|
840 | return 1; | |
847 | } |
|
841 | } | |
848 |
|
842 | |||
849 | void StarDundee::reTestSPWLink() // SLOT |
|
843 | void StarDundee::reTestSPWLink() // SLOT | |
850 | { |
|
844 | { | |
851 | if (getLinkStatus(linkNumber_SPINBOX->value())) |
|
845 | if (getLinkStatus(linkNumber_SPINBOX->value())) | |
852 | { |
|
846 | { | |
853 | emit isOpen(true); |
|
847 | emit isOpen(true); | |
854 | starDundeeStatusQueryDialog->accept(); |
|
848 | starDundeeStatusQueryDialog->accept(); | |
855 | } |
|
849 | } | |
856 | } |
|
850 | } |
@@ -1,105 +1,106 | |||||
1 | #ifndef STARDUNDEE_H |
|
1 | #ifndef STARDUNDEE_H | |
2 | #define STARDUNDEE_H |
|
2 | #define STARDUNDEE_H | |
3 |
|
3 | |||
4 | #include <QWidget> |
|
4 | #include <QWidget> | |
5 | #include <QPushButton> |
|
5 | #include <QPushButton> | |
6 | #include <QGridLayout> |
|
6 | #include <QGridLayout> | |
7 | #include <QSpinBox> |
|
7 | #include <QSpinBox> | |
8 | #include <QLabel> |
|
8 | #include <QLabel> | |
9 | #include <QSemaphore> |
|
9 | #include <QSemaphore> | |
10 | #include <QTimer> |
|
10 | #include <QTimer> | |
11 | #include <QDialog> |
|
11 | #include <QDialog> | |
12 |
|
12 | |||
13 | #include "rmapoperations.h" |
|
13 | #include "rmapoperations.h" | |
14 | #include "spw_usb_api.h" |
|
14 | #include "spw_usb_api.h" | |
15 | #include "spw_config_library.h" |
|
15 | #include "spw_config_library.h" | |
16 | #include "ccsds.h" |
|
16 | #include "ccsds.h" | |
|
17 | #include "tmpackettoread.h" | |||
17 |
|
18 | |||
18 | #define BWAIT_0 0 |
|
19 | #define BWAIT_0 0 | |
19 | #define BWAIT_1 1 |
|
20 | #define BWAIT_1 1 | |
20 | #define PATH_ADDRESSING_OFFSET 1 |
|
21 | #define PATH_ADDRESSING_OFFSET 1 | |
21 |
|
22 | |||
22 | class StarDundee : public QWidget |
|
23 | class StarDundee : public QWidget | |
23 | { |
|
24 | { | |
24 | Q_OBJECT |
|
25 | Q_OBJECT | |
25 | public: |
|
26 | public: | |
26 | explicit StarDundee(QWidget *parent = 0); |
|
27 | explicit StarDundee(QWidget *parent = 0); | |
27 | ~StarDundee(); |
|
28 | ~StarDundee(); | |
28 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
29 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); | |
29 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
30 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); | |
30 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
31 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); | |
31 |
|
32 | |||
32 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
33 | unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
33 |
QList< |
|
34 | QList<TMPacketToRead*> ccsdsPacketStore; | |
34 |
|
35 | |||
35 | signals: |
|
36 | signals: | |
36 | void sendMessage(QString message); |
|
37 | void sendMessage(QString message); | |
37 | void isOpen(bool); |
|
38 | void isOpen(bool); | |
38 | void RMAP_write_reply_setText(QString); |
|
39 | void RMAP_write_reply_setText(QString); | |
39 | void appendToLog(QString); |
|
40 | void appendToLog(QString); | |
40 | void ccsdsPacketAvailable(unsigned char*, unsigned int); |
|
41 | void ccsdsPacketAvailable(unsigned char*, unsigned int); | |
41 | void packetStoreNotEmpty(); |
|
42 | void packetStoreNotEmpty(); | |
42 |
|
43 | |||
43 | public slots: |
|
44 | public slots: | |
44 | void Open(); |
|
45 | void Open(); | |
45 | void Close(); |
|
46 | void Close(); | |
46 | void reTestSPWLink(); |
|
47 | void reTestSPWLink(); | |
47 | int receiveSPWPacketLoop(unsigned char requestID=0); |
|
48 | int receiveSPWPacketLoop(unsigned char requestID=0); | |
48 | int receiveSPWPacket(unsigned char requestID=0); |
|
49 | int receiveSPWPacket(unsigned char requestID=0); | |
49 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} |
|
50 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} | |
50 | void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} |
|
51 | void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} | |
51 | void sourceHasChanged(int source) {rmapSourceLogicalAddress = (unsigned char) source;} |
|
52 | void sourceHasChanged(int source) {rmapSourceLogicalAddress = (unsigned char) source;} | |
52 | void ccsdsPacketIsProcessed() {ccsdsPacketSEMAPHORE->tryAcquire();} |
|
53 | void ccsdsPacketIsProcessed() {ccsdsPacketSEMAPHORE->tryAcquire();} | |
53 | // |
|
54 | // | |
54 | void receivePollingLoop(); |
|
55 | void receivePollingLoop(); | |
55 |
|
56 | |||
56 | private: |
|
57 | private: | |
57 | unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0); |
|
58 | unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0); | |
58 | unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0); |
|
59 | unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0); | |
59 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->tryAcquire();} |
|
60 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->tryAcquire();} | |
60 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->tryAcquire();} |
|
61 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->tryAcquire();} | |
61 | unsigned char setRoutingTableEntry(int tableEntry, U32 dwOutputPorts); |
|
62 | unsigned char setRoutingTableEntry(int tableEntry, U32 dwOutputPorts); | |
62 |
|
63 | |||
63 | unsigned int getLinkStatus(unsigned char link); |
|
64 | unsigned int getLinkStatus(unsigned char link); | |
64 | unsigned int GetRoutingTableEntry(int tableEntry); |
|
65 | unsigned int GetRoutingTableEntry(int tableEntry); | |
65 |
|
66 | |||
66 | unsigned char rmapTargetLogicalAddress ; |
|
67 | unsigned char rmapTargetLogicalAddress ; | |
67 | unsigned char rmapSourceLogicalAddress ; |
|
68 | unsigned char rmapSourceLogicalAddress ; | |
68 |
|
69 | |||
69 | RMAP_command_codes commandCode; |
|
70 | RMAP_command_codes commandCode; | |
70 |
|
71 | |||
71 | QLabel *usbDeviceNumber_LABEL; |
|
72 | QLabel *usbDeviceNumber_LABEL; | |
72 | QLabel *linkNumber_LABEL; |
|
73 | QLabel *linkNumber_LABEL; | |
73 | QLabel *starDundeeStatusQueryDialogLabel; |
|
74 | QLabel *starDundeeStatusQueryDialogLabel; | |
74 |
|
75 | |||
75 | QSpinBox *usbDeviceNumber_SPINBOX; |
|
76 | QSpinBox *usbDeviceNumber_SPINBOX; | |
76 | QSpinBox *linkNumber_SPINBOX; |
|
77 | QSpinBox *linkNumber_SPINBOX; | |
77 |
|
78 | |||
78 | QGridLayout *connection_LAYOUT; |
|
79 | QGridLayout *connection_LAYOUT; | |
79 | QGridLayout *starDundeeStatusQueryDialogLayout; |
|
80 | QGridLayout *starDundeeStatusQueryDialogLayout; | |
80 |
|
81 | |||
81 | QDialog *starDundeeStatusQueryDialog; |
|
82 | QDialog *starDundeeStatusQueryDialog; | |
82 |
|
83 | |||
83 | QPushButton *starDundeeStatusQueryRetryButton; |
|
84 | QPushButton *starDundeeStatusQueryRetryButton; | |
84 | QPushButton *starDundeeStatusQueryAbortButton; |
|
85 | QPushButton *starDundeeStatusQueryAbortButton; | |
85 |
|
86 | |||
86 | QTimer *timer; |
|
87 | QTimer *timer; | |
87 |
|
88 | |||
88 | unsigned char pBuffer[10]; // Pointer to the start of the user buffer from which to transmit data |
|
89 | unsigned char pBuffer[10]; // Pointer to the start of the user buffer from which to transmit data | |
89 | USB_SPACEWIRE_ID pIdentifierRead; // A pointer to a variable which will be set to contain a unique identifier for the read |
|
90 | USB_SPACEWIRE_ID pIdentifierRead; // A pointer to a variable which will be set to contain a unique identifier for the read | |
90 | USB_SPACEWIRE_ID pIdentifier; |
|
91 | USB_SPACEWIRE_ID pIdentifier; | |
91 |
|
92 | |||
92 | star_device_handle hDevice; // Handle to the SpaceWire device |
|
93 | star_device_handle hDevice; // Handle to the SpaceWire device | |
93 | USB_SPACEWIRE_STATUS result; // The result of the send operation |
|
94 | USB_SPACEWIRE_STATUS result; // The result of the send operation | |
94 |
|
95 | |||
95 | // Packet receiver |
|
96 | // Packet receiver | |
96 | QSemaphore *rmapPacketSEMAPHORE; |
|
97 | QSemaphore *rmapPacketSEMAPHORE; | |
97 | QSemaphore *ccsdsPacketSEMAPHORE; |
|
98 | QSemaphore *ccsdsPacketSEMAPHORE; | |
98 | char* rmapPacket; // The buffer to receive RMAP READ packets |
|
99 | char* rmapPacket; // The buffer to receive RMAP READ packets | |
99 | unsigned char *ccsdsPacket; |
|
100 | unsigned char *ccsdsPacket; | |
100 | char *spwPacket; |
|
101 | char *spwPacket; | |
101 | unsigned int rmapPacketSize; |
|
102 | unsigned int rmapPacketSize; | |
102 | unsigned int ccsdsPacketSize; |
|
103 | unsigned int ccsdsPacketSize; | |
103 | }; |
|
104 | }; | |
104 |
|
105 | |||
105 | #endif // STARDUNDEE_H |
|
106 | #endif // STARDUNDEE_H |
General Comments 0
You need to be logged in to leave comments.
Login now