##// END OF EJS Templates
First version with the Star Dundee bridge operational
paul@pc-solar1.lab-lpp.local -
r1:45ff379330d3 default
parent child
Show More
@@ -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.3) on: Thu Nov 29 09:03:10 2012
3 # Generated by qmake (2.01a) (Qt 4.8.3) on: Thu Nov 29 14:02:20 2012
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,264
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, 2012-11-29T13:08:48. -->
3 <!-- Written by Qt Creator 2.4.1, 2012-12-06T08:47:47. -->
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.RunConfigurationCount">1</value>
249 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
250 </valuemap>
250 </valuemap>
251 </data>
251 </data>
252 <data>
252 <data>
253 <variable>ProjectExplorer.Project.TargetCount</variable>
253 <variable>ProjectExplorer.Project.TargetCount</variable>
254 <value type="int">1</value>
254 <value type="int">1</value>
255 </data>
255 </data>
256 <data>
256 <data>
257 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
257 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
258 <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
258 <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
259 </data>
259 </data>
260 <data>
260 <data>
261 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
261 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
262 <value type="int">10</value>
262 <value type="int">10</value>
263 </data>
263 </data>
264 </qtcreator>
264 </qtcreator>
@@ -1,410 +1,428
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.3) on: Thu Nov 29 09:38:20 2012
3 # Generated by qmake (2.01a) (Qt 4.8.3) on: Mon Dec 3 13:45:43 2012
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 -DUNIXTRANSLATIONPATH -DLPPMON_PLUGINS_INSTALL_PATH="QDir::homePath()+\"/.lppmon/plugins\"" -DLPPMON_TRANSLATION_PATH="\"/etc/lppmon/translations\"" -DLPPMONPLUGIN_LIBRARY -DQT_NO_DEBUG -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 -DUNIXTRANSLATIONPATH -DLPPMON_PLUGINS_INSTALL_PATH="QDir::homePath()+\"/.lppmon/plugins\"" -DLPPMON_TRANSLATION_PATH="\"/etc/lppmon/translations\"" -DLPPMONPLUGIN_LIBRARY -DQT_NO_DEBUG -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 -I. -I../common_PLE -I../spw_usb_driver_v2.61/inc -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 -I. -I../common_PLE -I../spw_usb_driver_v2.61/inc -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.61/lib/libSpaceWireUSBAPI.so -ldl -lutil -lm -lpython2.7 -lPythonQt_QtAll -lPythonQt -lQtGui -lQtNetwork -lQtCore -lpthread
19 LIBS = $(SUBLIBS) -L/usr/lib64 ../spw_usb_driver_v2.61/lib/x86_64/libSpaceWireUSBAPI.so ../spw_usb_driver_v2.61/lib/x86_64/libConfigLibraryUSB.so -ldl -lutil -lm -lpython2.7 -lPythonQt_QtAll -lPythonQt -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 spwpacketreceiver.cpp \
50 spwpacketreceiver.cpp \
51 ../common_PLE/qipdialogbox.cpp \
51 ../common_PLE/qipdialogbox.cpp \
52 ../common_PLE/gresbstatusenquiry.cpp \
52 ../common_PLE/gresbstatusenquiry.cpp \
53 spectralmatricesdmasimulator.cpp \
53 spectralmatricesdmasimulator.cpp \
54 rmappluginpythonwrapper.cpp \
54 rmappluginpythonwrapper.cpp \
55 stardundee.cpp \
55 stardundee.cpp \
56 gresb.cpp \
56 /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \
57 /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \
57 moc/moc_rmapplugin.cpp \
58 moc/moc_rmapplugin.cpp \
58 moc/moc_spwpacketreceiver.cpp \
59 moc/moc_spwpacketreceiver.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 \
65 moc/moc_gresb.cpp \
64 moc/moc_genericPySysdriver.cpp \
66 moc/moc_genericPySysdriver.cpp \
65 moc/moc_lppmonplugin.cpp
67 moc/moc_lppmonplugin.cpp
66 OBJECTS = obj/rmapplugin.o \
68 OBJECTS = obj/rmapplugin.o \
67 obj/rmappluginui.o \
69 obj/rmappluginui.o \
68 obj/rmapoperations.o \
70 obj/rmapoperations.o \
69 obj/ccsds.o \
71 obj/ccsds.o \
70 obj/spwpacketreceiver.o \
72 obj/spwpacketreceiver.o \
71 obj/qipdialogbox.o \
73 obj/qipdialogbox.o \
72 obj/gresbstatusenquiry.o \
74 obj/gresbstatusenquiry.o \
73 obj/spectralmatricesdmasimulator.o \
75 obj/spectralmatricesdmasimulator.o \
74 obj/rmappluginpythonwrapper.o \
76 obj/rmappluginpythonwrapper.o \
75 obj/stardundee.o \
77 obj/stardundee.o \
78 obj/gresb.o \
76 obj/lppmonplugininterface.o \
79 obj/lppmonplugininterface.o \
77 obj/moc_rmappluginui.o \
80 obj/moc_rmappluginui.o \
78 obj/moc_rmapplugin.o \
81 obj/moc_rmapplugin.o \
79 obj/moc_spwpacketreceiver.o \
82 obj/moc_spwpacketreceiver.o \
80 obj/moc_qipdialogbox.o \
83 obj/moc_qipdialogbox.o \
81 obj/moc_gresbstatusenquiry.o \
84 obj/moc_gresbstatusenquiry.o \
82 obj/moc_spectralmatricesdmasimulator.o \
85 obj/moc_spectralmatricesdmasimulator.o \
83 obj/moc_rmappluginpythonwrapper.o \
86 obj/moc_rmappluginpythonwrapper.o \
84 obj/moc_stardundee.o \
87 obj/moc_stardundee.o \
88 obj/moc_gresb.o \
85 obj/moc_genericPySysdriver.o \
89 obj/moc_genericPySysdriver.o \
86 obj/moc_lppmonplugin.o
90 obj/moc_lppmonplugin.o
87 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
91 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
88 /usr/lib64/qt4/mkspecs/common/linux.conf \
92 /usr/lib64/qt4/mkspecs/common/linux.conf \
89 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
93 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
90 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
94 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
91 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
95 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
92 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
96 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
93 /usr/lib64/qt4/mkspecs/qconfig.pri \
97 /usr/lib64/qt4/mkspecs/qconfig.pri \
94 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \
98 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \
95 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
99 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
96 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
100 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
97 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
101 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
98 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
102 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
99 /usr/lib64/qt4/mkspecs/features/release.prf \
103 /usr/lib64/qt4/mkspecs/features/release.prf \
100 /usr/lib64/qt4/mkspecs/features/default_post.prf \
104 /usr/lib64/qt4/mkspecs/features/default_post.prf \
101 /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \
105 /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \
102 /usr/lib64/qt4/mkspecs/features/pythonqt.prf \
106 /usr/lib64/qt4/mkspecs/features/pythonqt.prf \
103 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
107 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
104 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
108 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
105 /usr/lib64/qt4/mkspecs/features/qt.prf \
109 /usr/lib64/qt4/mkspecs/features/qt.prf \
106 /usr/lib64/qt4/mkspecs/features/unix/thread.prf \
110 /usr/lib64/qt4/mkspecs/features/unix/thread.prf \
107 /usr/lib64/qt4/mkspecs/features/moc.prf \
111 /usr/lib64/qt4/mkspecs/features/moc.prf \
108 /usr/lib64/qt4/mkspecs/features/resources.prf \
112 /usr/lib64/qt4/mkspecs/features/resources.prf \
109 /usr/lib64/qt4/mkspecs/features/uic.prf \
113 /usr/lib64/qt4/mkspecs/features/uic.prf \
110 /usr/lib64/qt4/mkspecs/features/yacc.prf \
114 /usr/lib64/qt4/mkspecs/features/yacc.prf \
111 /usr/lib64/qt4/mkspecs/features/lex.prf \
115 /usr/lib64/qt4/mkspecs/features/lex.prf \
112 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
116 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
113 rmapplugin.pro
117 rmapplugin.pro
114 QMAKE_TARGET = rmapplugin
118 QMAKE_TARGET = rmapplugin
115 DESTDIR = bin/
119 DESTDIR = bin/
116 TARGET = librmapplugin.so.1.0.0
120 TARGET = librmapplugin.so.1.0.0
117 TARGETA = bin/librmapplugin.a
121 TARGETA = bin/librmapplugin.a
118 TARGETD = librmapplugin.so.1.0.0
122 TARGETD = librmapplugin.so.1.0.0
119 TARGET0 = librmapplugin.so
123 TARGET0 = librmapplugin.so
120 TARGET1 = librmapplugin.so.1
124 TARGET1 = librmapplugin.so.1
121 TARGET2 = librmapplugin.so.1.0
125 TARGET2 = librmapplugin.so.1.0
122
126
123 first: all
127 first: all
124 ####### Implicit rules
128 ####### Implicit rules
125
129
126 .SUFFIXES: .o .c .cpp .cc .cxx .C
130 .SUFFIXES: .o .c .cpp .cc .cxx .C
127
131
128 .cpp.o:
132 .cpp.o:
129 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
133 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
130
134
131 .cc.o:
135 .cc.o:
132 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
136 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
133
137
134 .cxx.o:
138 .cxx.o:
135 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
139 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
136
140
137 .C.o:
141 .C.o:
138 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
142 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
139
143
140 .c.o:
144 .c.o:
141 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
145 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
142
146
143 ####### Build rules
147 ####### Build rules
144
148
145 all: Makefile bin/$(TARGET)
149 all: Makefile bin/$(TARGET)
146
150
147 bin/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
151 bin/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
148 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
152 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
149 -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
153 -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
150 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
154 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
151 -ln -s $(TARGET) $(TARGET0)
155 -ln -s $(TARGET) $(TARGET0)
152 -ln -s $(TARGET) $(TARGET1)
156 -ln -s $(TARGET) $(TARGET1)
153 -ln -s $(TARGET) $(TARGET2)
157 -ln -s $(TARGET) $(TARGET2)
154 -$(DEL_FILE) bin/$(TARGET)
158 -$(DEL_FILE) bin/$(TARGET)
155 -$(DEL_FILE) bin/$(TARGET0)
159 -$(DEL_FILE) bin/$(TARGET0)
156 -$(DEL_FILE) bin/$(TARGET1)
160 -$(DEL_FILE) bin/$(TARGET1)
157 -$(DEL_FILE) bin/$(TARGET2)
161 -$(DEL_FILE) bin/$(TARGET2)
158 -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) bin/
162 -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) bin/
159
163
160
164
161
165
162 staticlib: $(TARGETA)
166 staticlib: $(TARGETA)
163
167
164 $(TARGETA): $(OBJECTS) $(OBJCOMP)
168 $(TARGETA): $(OBJECTS) $(OBJCOMP)
165 -$(DEL_FILE) $(TARGETA)
169 -$(DEL_FILE) $(TARGETA)
166 $(AR) $(TARGETA) $(OBJECTS)
170 $(AR) $(TARGETA) $(OBJECTS)
167
171
168 Makefile: rmapplugin.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
172 Makefile: rmapplugin.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
169 /usr/lib64/qt4/mkspecs/common/linux.conf \
173 /usr/lib64/qt4/mkspecs/common/linux.conf \
170 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
174 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
171 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
175 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
172 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
176 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
173 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
177 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
174 /usr/lib64/qt4/mkspecs/qconfig.pri \
178 /usr/lib64/qt4/mkspecs/qconfig.pri \
175 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \
179 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \
176 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
180 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
177 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
181 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
178 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
182 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
179 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
183 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
180 /usr/lib64/qt4/mkspecs/features/release.prf \
184 /usr/lib64/qt4/mkspecs/features/release.prf \
181 /usr/lib64/qt4/mkspecs/features/default_post.prf \
185 /usr/lib64/qt4/mkspecs/features/default_post.prf \
182 /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \
186 /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \
183 /usr/lib64/qt4/mkspecs/features/pythonqt.prf \
187 /usr/lib64/qt4/mkspecs/features/pythonqt.prf \
184 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
188 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
185 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
189 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
186 /usr/lib64/qt4/mkspecs/features/qt.prf \
190 /usr/lib64/qt4/mkspecs/features/qt.prf \
187 /usr/lib64/qt4/mkspecs/features/unix/thread.prf \
191 /usr/lib64/qt4/mkspecs/features/unix/thread.prf \
188 /usr/lib64/qt4/mkspecs/features/moc.prf \
192 /usr/lib64/qt4/mkspecs/features/moc.prf \
189 /usr/lib64/qt4/mkspecs/features/resources.prf \
193 /usr/lib64/qt4/mkspecs/features/resources.prf \
190 /usr/lib64/qt4/mkspecs/features/uic.prf \
194 /usr/lib64/qt4/mkspecs/features/uic.prf \
191 /usr/lib64/qt4/mkspecs/features/yacc.prf \
195 /usr/lib64/qt4/mkspecs/features/yacc.prf \
192 /usr/lib64/qt4/mkspecs/features/lex.prf \
196 /usr/lib64/qt4/mkspecs/features/lex.prf \
193 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
197 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
194 /usr/lib64/libQtGui.prl \
198 /usr/lib64/libQtGui.prl \
195 /usr/lib64/libQtCore.prl \
199 /usr/lib64/libQtCore.prl \
196 /usr/lib64/libQtNetwork.prl
200 /usr/lib64/libQtNetwork.prl
197 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro
201 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro
198 /usr/lib64/qt4/mkspecs/common/unix.conf:
202 /usr/lib64/qt4/mkspecs/common/unix.conf:
199 /usr/lib64/qt4/mkspecs/common/linux.conf:
203 /usr/lib64/qt4/mkspecs/common/linux.conf:
200 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
204 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
201 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
205 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
202 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
206 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
203 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
207 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
204 /usr/lib64/qt4/mkspecs/qconfig.pri:
208 /usr/lib64/qt4/mkspecs/qconfig.pri:
205 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri:
209 /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri:
206 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
210 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
207 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
211 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
208 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
212 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
209 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
213 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
210 /usr/lib64/qt4/mkspecs/features/release.prf:
214 /usr/lib64/qt4/mkspecs/features/release.prf:
211 /usr/lib64/qt4/mkspecs/features/default_post.prf:
215 /usr/lib64/qt4/mkspecs/features/default_post.prf:
212 /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf:
216 /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf:
213 /usr/lib64/qt4/mkspecs/features/pythonqt.prf:
217 /usr/lib64/qt4/mkspecs/features/pythonqt.prf:
214 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
218 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
215 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
219 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
216 /usr/lib64/qt4/mkspecs/features/qt.prf:
220 /usr/lib64/qt4/mkspecs/features/qt.prf:
217 /usr/lib64/qt4/mkspecs/features/unix/thread.prf:
221 /usr/lib64/qt4/mkspecs/features/unix/thread.prf:
218 /usr/lib64/qt4/mkspecs/features/moc.prf:
222 /usr/lib64/qt4/mkspecs/features/moc.prf:
219 /usr/lib64/qt4/mkspecs/features/resources.prf:
223 /usr/lib64/qt4/mkspecs/features/resources.prf:
220 /usr/lib64/qt4/mkspecs/features/uic.prf:
224 /usr/lib64/qt4/mkspecs/features/uic.prf:
221 /usr/lib64/qt4/mkspecs/features/yacc.prf:
225 /usr/lib64/qt4/mkspecs/features/yacc.prf:
222 /usr/lib64/qt4/mkspecs/features/lex.prf:
226 /usr/lib64/qt4/mkspecs/features/lex.prf:
223 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
227 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
224 /usr/lib64/libQtGui.prl:
228 /usr/lib64/libQtGui.prl:
225 /usr/lib64/libQtCore.prl:
229 /usr/lib64/libQtCore.prl:
226 /usr/lib64/libQtNetwork.prl:
230 /usr/lib64/libQtNetwork.prl:
227 qmake: FORCE
231 qmake: FORCE
228 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro
232 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro
229
233
230 dist:
234 dist:
231 @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0
235 @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0
232 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmappluginui.h rmapplugin.h rmapoperations.h ccsds.h spwpacketreceiver.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 /usr/include/genericPySysdriver.h /usr/include/lppmonplugin.h obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmapplugin.cpp rmappluginui.cpp rmapoperations.cpp ccsds.cpp spwpacketreceiver.cpp ../common_PLE/qipdialogbox.cpp ../common_PLE/gresbstatusenquiry.cpp spectralmatricesdmasimulator.cpp rmappluginpythonwrapper.cpp stardundee.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
236 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmappluginui.h rmapplugin.h rmapoperations.h ccsds.h spwpacketreceiver.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 /usr/include/genericPySysdriver.h /usr/include/lppmonplugin.h obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmapplugin.cpp rmappluginui.cpp rmapoperations.cpp ccsds.cpp spwpacketreceiver.cpp ../common_PLE/qipdialogbox.cpp ../common_PLE/gresbstatusenquiry.cpp spectralmatricesdmasimulator.cpp rmappluginpythonwrapper.cpp stardundee.cpp gresb.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
233
237
234
238
235 clean:compiler_clean
239 clean:compiler_clean
236 -$(DEL_FILE) $(OBJECTS)
240 -$(DEL_FILE) $(OBJECTS)
237 -$(DEL_FILE) *~ core *.core
241 -$(DEL_FILE) *~ core *.core
238
242
239
243
240 ####### Sub-libraries
244 ####### Sub-libraries
241
245
242 distclean: clean
246 distclean: clean
243 -$(DEL_FILE) bin/$(TARGET)
247 -$(DEL_FILE) bin/$(TARGET)
244 -$(DEL_FILE) bin/$(TARGET0) bin/$(TARGET1) bin/$(TARGET2) $(TARGETA)
248 -$(DEL_FILE) bin/$(TARGET0) bin/$(TARGET1) bin/$(TARGET2) $(TARGETA)
245 -$(DEL_FILE) Makefile
249 -$(DEL_FILE) Makefile
246
250
247
251
248 check: first
252 check: first
249
253
250 mocclean: compiler_moc_header_clean compiler_moc_source_clean
254 mocclean: compiler_moc_header_clean compiler_moc_source_clean
251
255
252 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
256 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
253
257
254 compiler_moc_header_make_all: moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_spwpacketreceiver.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp
258 compiler_moc_header_make_all: moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_spwpacketreceiver.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_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp
255 compiler_moc_header_clean:
259 compiler_moc_header_clean:
256 -$(DEL_FILE) moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_spwpacketreceiver.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp
260 -$(DEL_FILE) moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_spwpacketreceiver.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_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp
257 moc/moc_rmappluginui.cpp: rmapoperations.h \
261 moc/moc_rmappluginui.cpp: rmapoperations.h \
258 spectralmatricesdmasimulator.h \
262 spectralmatricesdmasimulator.h \
263 stardundee.h \
259 rmappluginui.h
264 rmappluginui.h
260 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp
265 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp
261
266
262 moc/moc_rmapplugin.cpp: rmappluginui.h \
267 moc/moc_rmapplugin.cpp: rmappluginui.h \
263 rmapoperations.h \
268 rmapoperations.h \
264 spectralmatricesdmasimulator.h \
269 spectralmatricesdmasimulator.h \
270 stardundee.h \
265 ccsds.h \
271 ccsds.h \
266 spwpacketreceiver.h \
272 spwpacketreceiver.h \
267 rmapplugin.h
273 rmapplugin.h
268 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp
274 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp
269
275
270 moc/moc_spwpacketreceiver.cpp: spwpacketreceiver.h
276 moc/moc_spwpacketreceiver.cpp: spwpacketreceiver.h
271 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) spwpacketreceiver.h -o moc/moc_spwpacketreceiver.cpp
277 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) spwpacketreceiver.h -o moc/moc_spwpacketreceiver.cpp
272
278
273 moc/moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h
279 moc/moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h
274 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc/moc_qipdialogbox.cpp
280 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc/moc_qipdialogbox.cpp
275
281
276 moc/moc_gresbstatusenquiry.cpp: ../common_PLE/gresbstatusenquiry.h
282 moc/moc_gresbstatusenquiry.cpp: ../common_PLE/gresbstatusenquiry.h
277 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/gresbstatusenquiry.h -o moc/moc_gresbstatusenquiry.cpp
283 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/gresbstatusenquiry.h -o moc/moc_gresbstatusenquiry.cpp
278
284
279 moc/moc_spectralmatricesdmasimulator.cpp: spectralmatricesdmasimulator.h
285 moc/moc_spectralmatricesdmasimulator.cpp: spectralmatricesdmasimulator.h
280 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) spectralmatricesdmasimulator.h -o moc/moc_spectralmatricesdmasimulator.cpp
286 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) spectralmatricesdmasimulator.h -o moc/moc_spectralmatricesdmasimulator.cpp
281
287
282 moc/moc_rmappluginpythonwrapper.cpp: rmappluginpythonwrapper.h
288 moc/moc_rmappluginpythonwrapper.cpp: rmappluginpythonwrapper.h
283 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginpythonwrapper.h -o moc/moc_rmappluginpythonwrapper.cpp
289 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginpythonwrapper.h -o moc/moc_rmappluginpythonwrapper.cpp
284
290
285 moc/moc_stardundee.cpp: stardundee.h
291 moc/moc_stardundee.cpp: stardundee.h
286 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) stardundee.h -o moc/moc_stardundee.cpp
292 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) stardundee.h -o moc/moc_stardundee.cpp
287
293
294 moc/moc_gresb.cpp: gresb.h
295 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) gresb.h -o moc/moc_gresb.cpp
296
288 moc/moc_genericPySysdriver.cpp: /usr/include/genericPySysdriver.h
297 moc/moc_genericPySysdriver.cpp: /usr/include/genericPySysdriver.h
289 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp
298 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp
290
299
291 moc/moc_lppmonplugin.cpp: /usr/include/lppmonplugin.h
300 moc/moc_lppmonplugin.cpp: /usr/include/lppmonplugin.h
292 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmonplugin.h -o moc/moc_lppmonplugin.cpp
301 /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmonplugin.h -o moc/moc_lppmonplugin.cpp
293
302
294 compiler_rcc_make_all:
303 compiler_rcc_make_all:
295 compiler_rcc_clean:
304 compiler_rcc_clean:
296 compiler_image_collection_make_all: qmake_image_collection.cpp
305 compiler_image_collection_make_all: qmake_image_collection.cpp
297 compiler_image_collection_clean:
306 compiler_image_collection_clean:
298 -$(DEL_FILE) qmake_image_collection.cpp
307 -$(DEL_FILE) qmake_image_collection.cpp
299 compiler_moc_source_make_all:
308 compiler_moc_source_make_all:
300 compiler_moc_source_clean:
309 compiler_moc_source_clean:
301 compiler_uic_make_all:
310 compiler_uic_make_all:
302 compiler_uic_clean:
311 compiler_uic_clean:
303 compiler_yacc_decl_make_all:
312 compiler_yacc_decl_make_all:
304 compiler_yacc_decl_clean:
313 compiler_yacc_decl_clean:
305 compiler_yacc_impl_make_all:
314 compiler_yacc_impl_make_all:
306 compiler_yacc_impl_clean:
315 compiler_yacc_impl_clean:
307 compiler_lex_make_all:
316 compiler_lex_make_all:
308 compiler_lex_clean:
317 compiler_lex_clean:
309 compiler_clean: compiler_moc_header_clean
318 compiler_clean: compiler_moc_header_clean
310
319
311 ####### Compile
320 ####### Compile
312
321
313 obj/rmapplugin.o: rmapplugin.cpp rmapplugin.h \
322 obj/rmapplugin.o: rmapplugin.cpp rmapplugin.h \
314 rmappluginui.h \
323 rmappluginui.h \
315 rmapoperations.h \
324 rmapoperations.h \
316 spectralmatricesdmasimulator.h \
325 spectralmatricesdmasimulator.h \
326 stardundee.h \
317 ccsds.h \
327 ccsds.h \
318 spwpacketreceiver.h \
328 spwpacketreceiver.h \
319 rmappluginpythonwrapper.h
329 rmappluginpythonwrapper.h
320 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp
330 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp
321
331
322 obj/rmappluginui.o: rmappluginui.cpp rmapplugin.h \
332 obj/rmappluginui.o: rmappluginui.cpp rmapplugin.h \
323 rmappluginui.h \
333 rmappluginui.h \
324 rmapoperations.h \
334 rmapoperations.h \
325 spectralmatricesdmasimulator.h \
335 spectralmatricesdmasimulator.h \
336 stardundee.h \
326 ccsds.h \
337 ccsds.h \
327 spwpacketreceiver.h
338 spwpacketreceiver.h
328 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp
339 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp
329
340
330 obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h
341 obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h
331 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapoperations.o rmapoperations.cpp
342 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapoperations.o rmapoperations.cpp
332
343
333 obj/ccsds.o: ccsds.cpp ccsds.h
344 obj/ccsds.o: ccsds.cpp ccsds.h
334 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ccsds.o ccsds.cpp
345 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ccsds.o ccsds.cpp
335
346
336 obj/spwpacketreceiver.o: spwpacketreceiver.cpp spwpacketreceiver.h
347 obj/spwpacketreceiver.o: spwpacketreceiver.cpp spwpacketreceiver.h
337 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/spwpacketreceiver.o spwpacketreceiver.cpp
348 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/spwpacketreceiver.o spwpacketreceiver.cpp
338
349
339 obj/qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h
350 obj/qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h
340 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qipdialogbox.o ../common_PLE/qipdialogbox.cpp
351 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qipdialogbox.o ../common_PLE/qipdialogbox.cpp
341
352
342 obj/gresbstatusenquiry.o: ../common_PLE/gresbstatusenquiry.cpp ../common_PLE/gresbstatusenquiry.h
353 obj/gresbstatusenquiry.o: ../common_PLE/gresbstatusenquiry.cpp ../common_PLE/gresbstatusenquiry.h
343 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresbstatusenquiry.o ../common_PLE/gresbstatusenquiry.cpp
354 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresbstatusenquiry.o ../common_PLE/gresbstatusenquiry.cpp
344
355
345 obj/spectralmatricesdmasimulator.o: spectralmatricesdmasimulator.cpp spectralmatricesdmasimulator.h
356 obj/spectralmatricesdmasimulator.o: spectralmatricesdmasimulator.cpp spectralmatricesdmasimulator.h
346 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/spectralmatricesdmasimulator.o spectralmatricesdmasimulator.cpp
357 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/spectralmatricesdmasimulator.o spectralmatricesdmasimulator.cpp
347
358
348 obj/rmappluginpythonwrapper.o: rmappluginpythonwrapper.cpp rmappluginpythonwrapper.h
359 obj/rmappluginpythonwrapper.o: rmappluginpythonwrapper.cpp rmappluginpythonwrapper.h
349 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginpythonwrapper.o rmappluginpythonwrapper.cpp
360 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginpythonwrapper.o rmappluginpythonwrapper.cpp
350
361
351 obj/stardundee.o: stardundee.cpp stardundee.h
362 obj/stardundee.o: stardundee.cpp stardundee.h \
363 rmapoperations.h
352 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/stardundee.o stardundee.cpp
364 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/stardundee.o stardundee.cpp
353
365
366 obj/gresb.o: gresb.cpp gresb.h
367 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresb.o gresb.cpp
368
354 obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \
369 obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \
355 /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h
370 /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h
356 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp
371 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp
357
372
358 obj/moc_rmappluginui.o: moc/moc_rmappluginui.cpp
373 obj/moc_rmappluginui.o: moc/moc_rmappluginui.cpp
359 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginui.o moc/moc_rmappluginui.cpp
374 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginui.o moc/moc_rmappluginui.cpp
360
375
361 obj/moc_rmapplugin.o: moc/moc_rmapplugin.cpp
376 obj/moc_rmapplugin.o: moc/moc_rmapplugin.cpp
362 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmapplugin.o moc/moc_rmapplugin.cpp
377 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmapplugin.o moc/moc_rmapplugin.cpp
363
378
364 obj/moc_spwpacketreceiver.o: moc/moc_spwpacketreceiver.cpp
379 obj/moc_spwpacketreceiver.o: moc/moc_spwpacketreceiver.cpp
365 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_spwpacketreceiver.o moc/moc_spwpacketreceiver.cpp
380 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_spwpacketreceiver.o moc/moc_spwpacketreceiver.cpp
366
381
367 obj/moc_qipdialogbox.o: moc/moc_qipdialogbox.cpp
382 obj/moc_qipdialogbox.o: moc/moc_qipdialogbox.cpp
368 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_qipdialogbox.o moc/moc_qipdialogbox.cpp
383 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_qipdialogbox.o moc/moc_qipdialogbox.cpp
369
384
370 obj/moc_gresbstatusenquiry.o: moc/moc_gresbstatusenquiry.cpp
385 obj/moc_gresbstatusenquiry.o: moc/moc_gresbstatusenquiry.cpp
371 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresbstatusenquiry.o moc/moc_gresbstatusenquiry.cpp
386 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresbstatusenquiry.o moc/moc_gresbstatusenquiry.cpp
372
387
373 obj/moc_spectralmatricesdmasimulator.o: moc/moc_spectralmatricesdmasimulator.cpp
388 obj/moc_spectralmatricesdmasimulator.o: moc/moc_spectralmatricesdmasimulator.cpp
374 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_spectralmatricesdmasimulator.o moc/moc_spectralmatricesdmasimulator.cpp
389 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_spectralmatricesdmasimulator.o moc/moc_spectralmatricesdmasimulator.cpp
375
390
376 obj/moc_rmappluginpythonwrapper.o: moc/moc_rmappluginpythonwrapper.cpp
391 obj/moc_rmappluginpythonwrapper.o: moc/moc_rmappluginpythonwrapper.cpp
377 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginpythonwrapper.o moc/moc_rmappluginpythonwrapper.cpp
392 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginpythonwrapper.o moc/moc_rmappluginpythonwrapper.cpp
378
393
379 obj/moc_stardundee.o: moc/moc_stardundee.cpp
394 obj/moc_stardundee.o: moc/moc_stardundee.cpp
380 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_stardundee.o moc/moc_stardundee.cpp
395 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_stardundee.o moc/moc_stardundee.cpp
381
396
397 obj/moc_gresb.o: moc/moc_gresb.cpp
398 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresb.o moc/moc_gresb.cpp
399
382 obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp
400 obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp
383 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp
401 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp
384
402
385 obj/moc_lppmonplugin.o: moc/moc_lppmonplugin.cpp
403 obj/moc_lppmonplugin.o: moc/moc_lppmonplugin.cpp
386 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lppmonplugin.o moc/moc_lppmonplugin.cpp
404 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lppmonplugin.o moc/moc_lppmonplugin.cpp
387
405
388 ####### Install
406 ####### Install
389
407
390 install_target: first FORCE
408 install_target: first FORCE
391 @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ || $(MKDIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/
409 @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ || $(MKDIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/
392 -$(INSTALL_PROGRAM) "bin/$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)"
410 -$(INSTALL_PROGRAM) "bin/$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)"
393 -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)"
411 -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)"
394 -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)"
412 -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)"
395 -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)"
413 -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)"
396
414
397 uninstall_target: FORCE
415 uninstall_target: FORCE
398 -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)"
416 -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)"
399 -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)"
417 -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)"
400 -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)"
418 -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)"
401 -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)"
419 -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)"
402 -$(DEL_DIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/
420 -$(DEL_DIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/
403
421
404
422
405 install: install_target FORCE
423 install: install_target FORCE
406
424
407 uninstall: uninstall_target FORCE
425 uninstall: uninstall_target FORCE
408
426
409 FORCE:
427 FORCE:
410
428
@@ -1,95 +1,95
1 #include "rmapoperations.h"
1 #include "rmapoperations.h"
2
2
3 RMAP::RMAP(RMAP_command_codes commandCode, char targetLogicalAddress, char initiatorLogicalAddress, int startAddress, int nbBytes, char* data)
3 RMAP::RMAP(RMAP_command_codes commandCode, char targetLogicalAddress, char initiatorLogicalAddress, int startAddress, int nbBytes, char* data)
4 {
4 {
5 char packetType; // 2 most Significant Bits
5 char packetType; // 2 most Significant Bits
6 char command; // 4 bits
6 char command; // 4 bits
7 char replyAddressLength; // 2 Least Significant Bits
7 char replyAddressLength; // 2 Least Significant Bits
8 int SPWPacketSize;
8 int SPWPacketSize;
9
9
10 // GRESB HEADER
10 // GRESB HEADER
11 if (data == NULL){
11 if (data == NULL){
12 SPWPacketSize = sizeof(RMAPHeader) ;
12 SPWPacketSize = sizeof(RMAPHeader) ;
13 dataCRC = 0x00;
13 dataCRC = 0x00;
14 }
14 }
15 else{
15 else{
16 SPWPacketSize = sizeof(RMAPHeader) + nbBytes + 1 ; // SPW Packet = Header + Data + dataCRC
16 SPWPacketSize = sizeof(RMAPHeader) + nbBytes + 1 ; // SPW Packet = Header + Data + dataCRC
17 dataCRC = RMAPCalculateDataCRC(data, nbBytes);
17 dataCRC = RMAPCalculateDataCRC(data, nbBytes);
18 }
18 }
19 GRESBHeader.GRESBProtocoleID = 0x00; // packets with protocole ID 0 have SpaceWire a packet as payload
19 GRESBHeader.GRESBProtocoleID = 0x00; // packets with protocole ID 0 have a SpaceWire packet as payload
20 GRESBHeader.SPWPacketSize2 = (SPWPacketSize>>16);
20 GRESBHeader.SPWPacketSize2 = (SPWPacketSize>>16);
21 GRESBHeader.SPWPacketSize1 = (SPWPacketSize>>8);
21 GRESBHeader.SPWPacketSize1 = (SPWPacketSize>>8);
22 GRESBHeader.SPWPacketSize0 = (SPWPacketSize);
22 GRESBHeader.SPWPacketSize0 = (SPWPacketSize);
23
23
24 // SPACEWIRE HEADER
24 // SPACEWIRE HEADER
25 packetType = (char) 0b01; // 0b01 for a command, 0b00 for a reply
25 packetType = (char) 0b01; // 0b01 for a command, 0b00 for a reply
26 command = (char) commandCode;
26 command = (char) commandCode;
27 replyAddressLength = (char) 0b00; // RMAP command: number of bytes in the reply address field
27 replyAddressLength = (char) 0b00; // RMAP command: number of bytes in the reply address field
28 // RMAP reply: copy of the reply address field of the command
28 // RMAP reply: copy of the reply address field of the command
29 switch (commandCode){
29 switch (commandCode){
30 case writeSingle_noVer_noRep:
30 case writeSingle_noVer_noRep:
31 case writeSingle_noVer_Rep:
31 case writeSingle_noVer_Rep:
32 case writeSingle_ver_noRep:
32 case writeSingle_ver_noRep:
33 case writeSingle_ver_rep:
33 case writeSingle_ver_rep:
34 if (nbBytes > 4) command = command + 1; // switch between Single and Incremental Read/Write operations
34 if (nbBytes > 4) command = command + 1; // switch between Single and Incremental Read/Write operations
35 break;
35 break;
36 default:
36 default:
37 break;
37 break;
38 }
38 }
39 RMAPHeader.targetLogicalAddress = targetLogicalAddress ;
39 RMAPHeader.targetLogicalAddress = targetLogicalAddress ;
40 RMAPHeader.protocolIdentifier = 0x01; // 0x01 is the protocole identifier for RMAP
40 RMAPHeader.protocolIdentifier = 0x01; // 0x01 is the protocole identifier for RMAP
41 RMAPHeader.instruction = (packetType<<6) + (command<<2) + (replyAddressLength);
41 RMAPHeader.instruction = (packetType<<6) + (command<<2) + (replyAddressLength);
42 RMAPHeader.key = 0; // used for command authorization
42 RMAPHeader.key = 0; // used for command authorization
43 RMAPHeader.initiatorLogicalAddress = initiatorLogicalAddress; // 0 is the default address for the GRESB module
43 RMAPHeader.initiatorLogicalAddress = initiatorLogicalAddress; // 0 is the default address for the GRESB module
44 RMAPHeader.transactionIdentifier1 = 0x00;
44 RMAPHeader.transactionIdentifier1 = 0x00;
45 RMAPHeader.transactionIdentifier0 = 0x01;
45 RMAPHeader.transactionIdentifier0 = 0x01;
46 RMAPHeader.extendedAddress = 0x00;
46 RMAPHeader.extendedAddress = 0x00;
47 RMAPHeader.address3 = (char) (startAddress>>24);
47 RMAPHeader.address3 = (char) (startAddress>>24);
48 RMAPHeader.address2 = (char) (startAddress>>16);
48 RMAPHeader.address2 = (char) (startAddress>>16);
49 RMAPHeader.address1 = (char) (startAddress>>8);
49 RMAPHeader.address1 = (char) (startAddress>>8);
50 RMAPHeader.address0 = (char) (startAddress);
50 RMAPHeader.address0 = (char) (startAddress);
51 RMAPHeader.dataLength2 = (char) (nbBytes>>16);
51 RMAPHeader.dataLength2 = (char) (nbBytes>>16);
52 RMAPHeader.dataLength1 = (char) (nbBytes>>8);
52 RMAPHeader.dataLength1 = (char) (nbBytes>>8);
53 RMAPHeader.dataLength0 = (char) (nbBytes);
53 RMAPHeader.dataLength0 = (char) (nbBytes);
54 RMAPHeader.headerCRC = RMAPCalculateHeaderCRC();
54 RMAPHeader.headerCRC = RMAPCalculateHeaderCRC();
55 }
55 }
56
56
57 unsigned char RMAP::RMAPCalculateCRC(unsigned char INCR, unsigned char INBYTE)
57 unsigned char RMAP::RMAPCalculateCRC(unsigned char INCR, unsigned char INBYTE)
58 {
58 {
59 return RMAP_CRCTable[INCR ^ INBYTE];
59 return RMAP_CRCTable[INCR ^ INBYTE];
60 }
60 }
61
61
62 unsigned char RMAP::RMAPCalculateHeaderCRC()
62 unsigned char RMAP::RMAPCalculateHeaderCRC()
63 {
63 {
64 unsigned char INCR = 0;
64 unsigned char INCR = 0;
65
65
66 INCR = RMAPCalculateCRC(INCR, RMAPHeader.targetLogicalAddress);
66 INCR = RMAPCalculateCRC(INCR, RMAPHeader.targetLogicalAddress);
67 INCR = RMAPCalculateCRC(INCR, RMAPHeader.protocolIdentifier);
67 INCR = RMAPCalculateCRC(INCR, RMAPHeader.protocolIdentifier);
68 INCR = RMAPCalculateCRC(INCR, RMAPHeader.instruction);
68 INCR = RMAPCalculateCRC(INCR, RMAPHeader.instruction);
69 INCR = RMAPCalculateCRC(INCR, RMAPHeader.key);
69 INCR = RMAPCalculateCRC(INCR, RMAPHeader.key);
70 INCR = RMAPCalculateCRC(INCR, RMAPHeader.initiatorLogicalAddress);
70 INCR = RMAPCalculateCRC(INCR, RMAPHeader.initiatorLogicalAddress);
71 INCR = RMAPCalculateCRC(INCR, RMAPHeader.transactionIdentifier1);
71 INCR = RMAPCalculateCRC(INCR, RMAPHeader.transactionIdentifier1);
72 INCR = RMAPCalculateCRC(INCR, RMAPHeader.transactionIdentifier0);
72 INCR = RMAPCalculateCRC(INCR, RMAPHeader.transactionIdentifier0);
73 INCR = RMAPCalculateCRC(INCR, RMAPHeader.extendedAddress);
73 INCR = RMAPCalculateCRC(INCR, RMAPHeader.extendedAddress);
74 INCR = RMAPCalculateCRC(INCR, RMAPHeader.address3);
74 INCR = RMAPCalculateCRC(INCR, RMAPHeader.address3);
75 INCR = RMAPCalculateCRC(INCR, RMAPHeader.address2);
75 INCR = RMAPCalculateCRC(INCR, RMAPHeader.address2);
76 INCR = RMAPCalculateCRC(INCR, RMAPHeader.address1);
76 INCR = RMAPCalculateCRC(INCR, RMAPHeader.address1);
77 INCR = RMAPCalculateCRC(INCR, RMAPHeader.address0);
77 INCR = RMAPCalculateCRC(INCR, RMAPHeader.address0);
78 INCR = RMAPCalculateCRC(INCR, RMAPHeader.dataLength2);
78 INCR = RMAPCalculateCRC(INCR, RMAPHeader.dataLength2);
79 INCR = RMAPCalculateCRC(INCR, RMAPHeader.dataLength1);
79 INCR = RMAPCalculateCRC(INCR, RMAPHeader.dataLength1);
80 INCR = RMAPCalculateCRC(INCR, RMAPHeader.dataLength0);
80 INCR = RMAPCalculateCRC(INCR, RMAPHeader.dataLength0);
81
81
82 return(INCR);
82 return(INCR);
83 }
83 }
84
84
85 unsigned char RMAP::RMAPCalculateDataCRC(char *data, int nbBytes)
85 unsigned char RMAP::RMAPCalculateDataCRC(char *data, int nbBytes)
86 {
86 {
87 unsigned char INCR = 0;
87 unsigned char INCR = 0;
88
88
89 for (int k=0; k<nbBytes; k++)
89 for (int k=0; k<nbBytes; k++)
90 {
90 {
91 INCR = RMAPCalculateCRC(INCR, data[k]);
91 INCR = RMAPCalculateCRC(INCR, data[k]);
92 }
92 }
93
93
94 return(INCR);
94 return(INCR);
95 }
95 }
@@ -1,140 +1,148
1 #ifndef RMAPOPERATIONS_H
1 #ifndef RMAPOPERATIONS_H
2 #define RMAPOPERATIONS_H
2 #define RMAPOPERATIONS_H
3
3
4 #include "qhexspinbox.h"
4 #include "qhexspinbox.h"
5
5
6 #define READ_WRITE_MAX_COUNTS 4096 // in words
7 #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
8 #define RMAP_READ_REPLY_HEADER_LENGTH 12 // in bytes => ECSS
9 #define RMAP_READ_COMMAND_HEADER_LENGTH 16 // in bytes => ECSS
10 #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS
11 #define RMAP_MAX_PACKET_LENGTH RMAP_READ_REPLY_HEADER_LENGTH + RMAP_MAX_DATA_LENGTH + RMAP_DATA_CRC_LENGTH
12 #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification
13
6 static const unsigned char RMAP_CRCTable[] = {
14 static const unsigned char RMAP_CRCTable[] = {
7 0x00, 0x91, 0xe3, 0x72, 0x07, 0x96, 0xe4, 0x75,
15 0x00, 0x91, 0xe3, 0x72, 0x07, 0x96, 0xe4, 0x75,
8 0x0e, 0x9f, 0xed, 0x7c, 0x09, 0x98, 0xea, 0x7b,
16 0x0e, 0x9f, 0xed, 0x7c, 0x09, 0x98, 0xea, 0x7b,
9 0x1c, 0x8d, 0xff, 0x6e, 0x1b, 0x8a, 0xf8, 0x69,
17 0x1c, 0x8d, 0xff, 0x6e, 0x1b, 0x8a, 0xf8, 0x69,
10 0x12, 0x83, 0xf1, 0x60, 0x15, 0x84, 0xf6, 0x67,
18 0x12, 0x83, 0xf1, 0x60, 0x15, 0x84, 0xf6, 0x67,
11 0x38, 0xa9, 0xdb, 0x4a, 0x3f, 0xae, 0xdc, 0x4d,
19 0x38, 0xa9, 0xdb, 0x4a, 0x3f, 0xae, 0xdc, 0x4d,
12 0x36, 0xa7, 0xd5, 0x44, 0x31, 0xa0, 0xd2, 0x43,
20 0x36, 0xa7, 0xd5, 0x44, 0x31, 0xa0, 0xd2, 0x43,
13 0x24, 0xb5, 0xc7, 0x56, 0x23, 0xb2, 0xc0, 0x51,
21 0x24, 0xb5, 0xc7, 0x56, 0x23, 0xb2, 0xc0, 0x51,
14 0x2a, 0xbb, 0xc9, 0x58, 0x2d, 0xbc, 0xce, 0x5f,
22 0x2a, 0xbb, 0xc9, 0x58, 0x2d, 0xbc, 0xce, 0x5f,
15 0x70, 0xe1, 0x93, 0x02, 0x77, 0xe6, 0x94, 0x05,
23 0x70, 0xe1, 0x93, 0x02, 0x77, 0xe6, 0x94, 0x05,
16 0x7e, 0xef, 0x9d, 0x0c, 0x79, 0xe8, 0x9a, 0x0b,
24 0x7e, 0xef, 0x9d, 0x0c, 0x79, 0xe8, 0x9a, 0x0b,
17 0x6c, 0xfd, 0x8f, 0x1e, 0x6b, 0xfa, 0x88, 0x19,
25 0x6c, 0xfd, 0x8f, 0x1e, 0x6b, 0xfa, 0x88, 0x19,
18 0x62, 0xf3, 0x81, 0x10, 0x65, 0xf4, 0x86, 0x17,
26 0x62, 0xf3, 0x81, 0x10, 0x65, 0xf4, 0x86, 0x17,
19 0x48, 0xd9, 0xab, 0x3a, 0x4f, 0xde, 0xac, 0x3d,
27 0x48, 0xd9, 0xab, 0x3a, 0x4f, 0xde, 0xac, 0x3d,
20 0x46, 0xd7, 0xa5, 0x34, 0x41, 0xd0, 0xa2, 0x33,
28 0x46, 0xd7, 0xa5, 0x34, 0x41, 0xd0, 0xa2, 0x33,
21 0x54, 0xc5, 0xb7, 0x26, 0x53, 0xc2, 0xb0, 0x21,
29 0x54, 0xc5, 0xb7, 0x26, 0x53, 0xc2, 0xb0, 0x21,
22 0x5a, 0xcb, 0xb9, 0x28, 0x5d, 0xcc, 0xbe, 0x2f,
30 0x5a, 0xcb, 0xb9, 0x28, 0x5d, 0xcc, 0xbe, 0x2f,
23 0xe0, 0x71, 0x03, 0x92, 0xe7, 0x76, 0x04, 0x95,
31 0xe0, 0x71, 0x03, 0x92, 0xe7, 0x76, 0x04, 0x95,
24 0xee, 0x7f, 0x0d, 0x9c, 0xe9, 0x78, 0x0a, 0x9b,
32 0xee, 0x7f, 0x0d, 0x9c, 0xe9, 0x78, 0x0a, 0x9b,
25 0xfc, 0x6d, 0x1f, 0x8e, 0xfb, 0x6a, 0x18, 0x89,
33 0xfc, 0x6d, 0x1f, 0x8e, 0xfb, 0x6a, 0x18, 0x89,
26 0xf2, 0x63, 0x11, 0x80, 0xf5, 0x64, 0x16, 0x87,
34 0xf2, 0x63, 0x11, 0x80, 0xf5, 0x64, 0x16, 0x87,
27 0xd8, 0x49, 0x3b, 0xaa, 0xdf, 0x4e, 0x3c, 0xad,
35 0xd8, 0x49, 0x3b, 0xaa, 0xdf, 0x4e, 0x3c, 0xad,
28 0xd6, 0x47, 0x35, 0xa4, 0xd1, 0x40, 0x32, 0xa3,
36 0xd6, 0x47, 0x35, 0xa4, 0xd1, 0x40, 0x32, 0xa3,
29 0xc4, 0x55, 0x27, 0xb6, 0xc3, 0x52, 0x20, 0xb1,
37 0xc4, 0x55, 0x27, 0xb6, 0xc3, 0x52, 0x20, 0xb1,
30 0xca, 0x5b, 0x29, 0xb8, 0xcd, 0x5c, 0x2e, 0xbf,
38 0xca, 0x5b, 0x29, 0xb8, 0xcd, 0x5c, 0x2e, 0xbf,
31 0x90, 0x01, 0x73, 0xe2, 0x97, 0x06, 0x74, 0xe5,
39 0x90, 0x01, 0x73, 0xe2, 0x97, 0x06, 0x74, 0xe5,
32 0x9e, 0x0f, 0x7d, 0xec, 0x99, 0x08, 0x7a, 0xeb,
40 0x9e, 0x0f, 0x7d, 0xec, 0x99, 0x08, 0x7a, 0xeb,
33 0x8c, 0x1d, 0x6f, 0xfe, 0x8b, 0x1a, 0x68, 0xf9,
41 0x8c, 0x1d, 0x6f, 0xfe, 0x8b, 0x1a, 0x68, 0xf9,
34 0x82, 0x13, 0x61, 0xf0, 0x85, 0x14, 0x66, 0xf7,
42 0x82, 0x13, 0x61, 0xf0, 0x85, 0x14, 0x66, 0xf7,
35 0xa8, 0x39, 0x4b, 0xda, 0xaf, 0x3e, 0x4c, 0xdd,
43 0xa8, 0x39, 0x4b, 0xda, 0xaf, 0x3e, 0x4c, 0xdd,
36 0xa6, 0x37, 0x45, 0xd4, 0xa1, 0x30, 0x42, 0xd3,
44 0xa6, 0x37, 0x45, 0xd4, 0xa1, 0x30, 0x42, 0xd3,
37 0xb4, 0x25, 0x57, 0xc6, 0xb3, 0x22, 0x50, 0xc1,
45 0xb4, 0x25, 0x57, 0xc6, 0xb3, 0x22, 0x50, 0xc1,
38 0xba, 0x2b, 0x59, 0xc8, 0xbd, 0x2c, 0x5e, 0xcf
46 0xba, 0x2b, 0x59, 0xc8, 0xbd, 0x2c, 0x5e, 0xcf
39 };
47 };
40
48
41 enum RMAP_command_codes{
49 enum RMAP_command_codes{
42 invalid0, //0000
50 invalid0, //0000
43 invalid1, //0001
51 invalid1, //0001
44 read_Single, //0010
52 read_Single, //0010
45 read_Inc, //0011
53 read_Inc, //0011
46 invalid2, //0100
54 invalid2, //0100
47 invalid3, //0101
55 invalid3, //0101
48 invalid4, //0110
56 invalid4, //0110
49 readModWri_Inc, //0111
57 readModWri_Inc, //0111
50 writeSingle_noVer_noRep, //1000
58 writeSingle_noVer_noRep, //1000
51 writeInc_noVer_noRep, //1001
59 writeInc_noVer_noRep, //1001
52 writeSingle_noVer_Rep, //1010
60 writeSingle_noVer_Rep, //1010
53 writeInc_noVer_Rep, //1011
61 writeInc_noVer_Rep, //1011
54 writeSingle_ver_noRep, //1100
62 writeSingle_ver_noRep, //1100
55 writeInc_ver_noRep, //1101
63 writeInc_ver_noRep, //1101
56 writeSingle_ver_rep, //1110
64 writeSingle_ver_rep, //1110
57 writeInc_ver_rep //1111
65 writeInc_ver_rep //1111
58 };
66 };
59
67
60 struct rmap_command_format_str
68 struct rmap_command_format_str
61 {
69 {
62 // char tagetSpaceWireAddress[]; // used for path addressing or regional addressing
70 // char tagetSpaceWireAddress[]; // used for path addressing or regional addressing
63 char targetLogicalAddress;
71 char targetLogicalAddress;
64 char protocolIdentifier;
72 char protocolIdentifier;
65 char instruction;
73 char instruction;
66 char key; // used for command authorization => check Gaisler GRSPW for compliance
74 char key; // used for command authorization => check Gaisler GRSPW for compliance
67 //char replyAddress[]; // not needed if logical addressing is used (replyAddressLength = 0b00)
75 //char replyAddress[]; // not needed if logical addressing is used (replyAddressLength = 0b00)
68 char initiatorLogicalAddress;
76 char initiatorLogicalAddress;
69 char transactionIdentifier1;
77 char transactionIdentifier1;
70 char transactionIdentifier0;
78 char transactionIdentifier0;
71 char extendedAddress;
79 char extendedAddress;
72 char address3;
80 char address3;
73 char address2;
81 char address2;
74 char address1;
82 char address1;
75 char address0;
83 char address0;
76 unsigned char dataLength2;
84 unsigned char dataLength2;
77 unsigned char dataLength1;
85 unsigned char dataLength1;
78 unsigned char dataLength0;
86 unsigned char dataLength0;
79 char headerCRC;
87 char headerCRC;
80 };
88 };
81 typedef struct rmap_command_format_str rmap_command_format_t;
89 typedef struct rmap_command_format_str rmap_command_format_t;
82
90
83 struct rmap_write_reply_str
91 struct rmap_write_reply_str
84 {
92 {
85 unsigned char initiatorLogicalAddress;
93 unsigned char initiatorLogicalAddress;
86 unsigned char protocolIdentifier;
94 unsigned char protocolIdentifier;
87 unsigned char instruction;
95 unsigned char instruction;
88 unsigned char status;
96 unsigned char status;
89 unsigned char targetLogicalAddress;
97 unsigned char targetLogicalAddress;
90 unsigned char transactionIdentifier1;
98 unsigned char transactionIdentifier1;
91 unsigned char transactionIdentifier2;
99 unsigned char transactionIdentifier2;
92 unsigned char headerCRC;
100 unsigned char headerCRC;
93 };
101 };
94 typedef struct rmap_write_reply_str rmap_write_reply_t;
102 typedef struct rmap_write_reply_str rmap_write_reply_t;
95
103
96 struct rmap_read_reply_PcktHdr_str
104 struct rmap_read_reply_PcktHdr_str
97 {
105 {
98 //char replyAddress[]; // not needed if logical addressing is used
106 //char replyAddress[]; // not needed if logical addressing is used
99 char initiatorLogicalAddress;
107 char initiatorLogicalAddress;
100 char protocolIdentifier;
108 char protocolIdentifier;
101 char instruction;
109 char instruction;
102 char status;
110 char status;
103 char targetLogicalAddress;
111 char targetLogicalAddress;
104 char transactionIdentifier1;
112 char transactionIdentifier1;
105 char transactionIdentifier0;
113 char transactionIdentifier0;
106 char reserved;
114 char reserved;
107 unsigned char dataLength2;
115 unsigned char dataLength2;
108 unsigned char dataLength1;
116 unsigned char dataLength1;
109 unsigned char dataLength0;
117 unsigned char dataLength0;
110 char headerCRC;
118 char headerCRC;
111 };
119 };
112 typedef struct rmap_read_reply_PcktHdr_str rmap_read_reply_PcktHdr_t;
120 typedef struct rmap_read_reply_PcktHdr_str rmap_read_reply_PcktHdr_t;
113
121
114 struct rmap_gresb_header_str
122 struct rmap_gresb_header_str
115 {
123 {
116 char GRESBProtocoleID;
124 char GRESBProtocoleID;
117 unsigned char SPWPacketSize2;
125 unsigned char SPWPacketSize2;
118 unsigned char SPWPacketSize1;
126 unsigned char SPWPacketSize1;
119 unsigned char SPWPacketSize0;
127 unsigned char SPWPacketSize0;
120 };
128 };
121 typedef struct rmap_gresb_header_str rmap_gresb_header_str;
129 typedef struct rmap_gresb_header_str rmap_gresb_header_str;
122
130
123 class RMAP
131 class RMAP
124 {
132 {
125 public:
133 public:
126 RMAP(RMAP_command_codes commandCode,
134 RMAP(RMAP_command_codes commandCode,
127 char targetLogicalAddress,
135 char targetLogicalAddress,
128 char initiatorLogicalAddress,
136 char initiatorLogicalAddress,
129 int startAddress,
137 int startAddress,
130 int nbBytes,
138 int nbBytes,
131 char *data);
139 char *data);
132 unsigned char RMAPCalculateCRC(unsigned char INCR, unsigned char INBYTE); // ECSS-E-ST-50-52C
140 unsigned char RMAPCalculateCRC(unsigned char INCR, unsigned char INBYTE); // ECSS-E-ST-50-52C
133 unsigned char RMAPCalculateHeaderCRC();
141 unsigned char RMAPCalculateHeaderCRC();
134 unsigned char RMAPCalculateDataCRC(char *data, int nbBytes);
142 unsigned char RMAPCalculateDataCRC(char *data, int nbBytes);
135 rmap_gresb_header_str GRESBHeader;
143 rmap_gresb_header_str GRESBHeader;
136 rmap_command_format_t RMAPHeader;
144 rmap_command_format_t RMAPHeader;
137 char dataCRC;
145 char dataCRC;
138 };
146 };
139
147
140 #endif // RMAPOPERATIONS_H
148 #endif // RMAPOPERATIONS_H
@@ -1,817 +1,936
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
27
28 rmapplugin::rmapplugin(QWidget *parent)
28 rmapplugin::rmapplugin(QWidget *parent)
29 :lppmonplugin(parent,false)
29 :lppmonplugin(parent,false)
30 {
30 {
31 this->UI = new rmapPluginUI();
31 this->UI = new rmapPluginUI();
32 this->setWindowTitle(tr("RMAP and SPW Communication"));
32 this->setWindowTitle(tr("RMAP and SPW Communication"));
33 this->setWidget((QWidget*)this->UI);
33 this->setWidget((QWidget*)this->UI);
34 RMAPSend_SOCKET = new QTcpSocket;
34 RMAPSend_SOCKET = new QTcpSocket;
35 RMAPReceive_SOCKET = new QTcpSocket;
35 RMAPReceive_SOCKET = new QTcpSocket;
36 GRESBStatusQuery_SOCKET = new QTcpSocket;
36 GRESBStatusQuery_SOCKET = new QTcpSocket;
37 spwPacketReceiverOBJECT = new spwpacketreceiver;
37 spwPacketReceiverOBJECT = new spwpacketreceiver;
38 spwPacketReceiverOBJECT->gresbReceptionSocket = RMAPReceive_SOCKET;
38 spwPacketReceiverOBJECT->gresbReceptionSocket = RMAPReceive_SOCKET;
39 timeCode = 0;
39 timeCode = 0;
40 time_COARSE = 0;
40 time_COARSE = 0;
41 time_FINE = 0;
41 time_FINE = 0;
42 currentBridge = selectedBridgeIsUnknown;
42
43
43 /*Python wrapper*/
44 /*Python wrapper*/
44 this->pyObject = new rmappluginPythonWrapper();
45 this->pyObject = new rmappluginPythonWrapper();
45 connect(this->pyObject,SIGNAL(ReadSig(uint*,uint,uint)),this,SLOT(Read(uint*,uint,uint)));
46 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)));
47 connect(this->pyObject,SIGNAL(WriteSig(uint*,uint,uint)),this,SLOT(Write(uint*,uint,uint)));
47 /*==============*/
48 /*==============*/
48
49
49 connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(RMAP_CONNECT()));
50 //connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(RMAP_CONNECT()));
50 connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(RMAP_DISCONNECT()));
51 //connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(RMAP_DISCONNECT()));
52 connect(UI->rmapOpenCommunicationButton, SIGNAL(clicked()), this, SLOT(openBridge()));
53 connect(UI->rmapCloseCommunicationButton, SIGNAL(clicked()), this, SLOT(closeBridge()));
51 connect(RMAPSend_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPSendConnectionState(QAbstractSocket::SocketState)));
54 connect(RMAPSend_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPSendConnectionState(QAbstractSocket::SocketState)));
52 connect(RMAPReceive_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPReceiveConnectionState(QAbstractSocket::SocketState)));
55 connect(RMAPReceive_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(RMAPReceiveConnectionState(QAbstractSocket::SocketState)));
53 connect(GRESBStatusQuery_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(GRESBConnectionState(QAbstractSocket::SocketState)));
56 connect(GRESBStatusQuery_SOCKET, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(GRESBConnectionState(QAbstractSocket::SocketState)));
54 connect(UI->gresbStatusQueryRetryButton, SIGNAL(clicked()), this, SLOT(reTestSPWLink()));
57 connect(UI->gresbStatusQueryRetryButton, SIGNAL(clicked()), this, SLOT(reTestSPWLink()));
55 connect(this->UI->spwLinkStatusEnquiry->readSPWStatusButton, SIGNAL(clicked()), this, SLOT(GRESBStatusQuery()));
58 connect(this->UI->spwLinkStatusEnquiry->readSPWStatusButton, SIGNAL(clicked()), this, SLOT(GRESBStatusQuery()));
56 connect(this->RMAPReceive_SOCKET, SIGNAL(readyRead()), this->spwPacketReceiverOBJECT, SLOT(receiveSPWPacket()));
59 connect(this->RMAPReceive_SOCKET, SIGNAL(readyRead()), this->spwPacketReceiverOBJECT, SLOT(receiveSPWPacket()));
57
60
58 // CCSDS
61 // CCSDS
59 connect(this->UI->sendCCSDSCommandButton, SIGNAL(clicked()), this, SLOT(sendCCSDS()));
62 connect(this->UI->sendCCSDSCommandButton, SIGNAL(clicked()), this, SLOT(sendCCSDS()));
60 connect(this->UI->send_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(send_TC_LFR_UPDATE_TIME()));
63 connect(this->UI->send_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(send_TC_LFR_UPDATE_TIME()));
61 connect(this->UI->reset_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(reset_TC_LFR_UPDATE_TIME()));
64 connect(this->UI->reset_TC_LFR_UPDATE_TIME_Button, SIGNAL(clicked()), this, SLOT(reset_TC_LFR_UPDATE_TIME()));
62
65
63 // CONSOLE
66 // CONSOLE
64 connect(this->spwPacketReceiverOBJECT, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString)));
67 connect(this->spwPacketReceiverOBJECT, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString)));
65 connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString)));
68 connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString)));
66
69
67 // spectralMAtricesDMASimulator
70 // spectralMAtricesDMASimulator
68 connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginRead(uint*,uint,uint)), this, SLOT(Read(uint*,uint,uint)));
71 connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginRead(uint*,uint,uint)), this, SLOT(Read(uint*,uint,uint)));
69 connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginWrite(uint*,uint,uint)), this, SLOT(Write(uint*,uint,uint)));
72 connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginWrite(uint*,uint,uint)), this, SLOT(Write(uint*,uint,uint)));
70 connect(this->UI->spectralMatricesDMASimulator, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString)));
73 connect(this->UI->spectralMatricesDMASimulator, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString)));
74
75 // GRESB
76 connect(this, SIGNAL(gresbIsOpen(bool)), this, SLOT(gresbSelection(bool)));
77
78 // Star Dundee
79 connect(this->UI->starDundee, SIGNAL(starDundeeIsOpen(bool)), this, SLOT(activatePluginViaStarDundee(bool)));
80 connect(this->UI->starDundee, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString)));
81 connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString)));
82
83 connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge)));
71 }
84 }
72
85
73 rmapplugin::~rmapplugin()
86 rmapplugin::~rmapplugin()
74 {
87 {
75 if (!RMAPSend_SOCKET->isOpen()) RMAPSend_SOCKET->disconnectFromHost();
88 if (!RMAPSend_SOCKET->isOpen()) RMAPSend_SOCKET->disconnectFromHost();
76 if (!RMAPReceive_SOCKET->isOpen()) RMAPReceive_SOCKET->disconnectFromHost();
89 if (!RMAPReceive_SOCKET->isOpen()) RMAPReceive_SOCKET->disconnectFromHost();
77 if (!GRESBStatusQuery_SOCKET->isOpen()) GRESBStatusQuery_SOCKET->disconnectFromHost();
90 if (!GRESBStatusQuery_SOCKET->isOpen()) GRESBStatusQuery_SOCKET->disconnectFromHost();
78 }
91 }
79
92
80 unsigned int rmapplugin::Write(unsigned int *Value, unsigned int count, unsigned int address)
93 unsigned int rmapplugin::Write(unsigned int *Value, unsigned int count, unsigned int address)
81 {
94 {
95 unsigned int result;
96 switch(currentBridge)
97 {
98 case selectedBridgeIsGRESB :
99 result = WriteGRESB(Value, count, address);
100 break;
101 case selectedBridgeIsStarDundee :
102 result = this->WriteStarDundee(Value, count, address);
103 break;
104 default:
105 result = 1;
106 break;
107 }
108 return result;
109 }
110
111 unsigned int rmapplugin::Read(unsigned int *Value, unsigned int count, unsigned int address)
112 {
113 unsigned int result;
114 switch(currentBridge)
115 {
116 case selectedBridgeIsGRESB :
117 result = ReadGRESB(Value, count, address);
118 break;
119 case selectedBridgeIsStarDundee :
120 result = this->ReadStarDundee(Value, count, address);
121 break;
122 default:
123 result = 1;
124 break;
125 }
126 return result;
127 }
128
129 unsigned int rmapplugin::WriteGRESB(unsigned int *Value, unsigned int count, unsigned int address)
130 {
82 unsigned int remainingCount = count;
131 unsigned int remainingCount = count;
83 unsigned int iOffset = 0;
132 unsigned int iOffset = 0;
84 QString console_message;
133 QString console_message;
85 char* data;
134 char* data;
86
135
87 unsigned char command = 0x08; // initialize command at 0b00001000 for write
88
89 if(spwPacketReceiverOBJECT->rmapPacketSEMAPHORE->available()!=0)
136 if(spwPacketReceiverOBJECT->rmapPacketSEMAPHORE->available()!=0)
90 {
137 {
91 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped");
138 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped");
92 return 1;
139 return 1;
93 }
140 }
94 if (UI->RMAP_write_verify->isChecked()) command = command + (1<<2);
95 if (UI->RMAP_write_reply->isChecked()) command = command + (1<<1);
96
141
97 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: unavailable");
142 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: unavailable");
98
143
99 data = (char*) malloc(READ_WRITE_MAX_COUNTS*4);
144 data = (char*) malloc(READ_WRITE_MAX_COUNTS*4);
100
145
101 APPENDTOLOG(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16));
146 APPENDTOLOG(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16));
102
147
103 while (remainingCount > READ_WRITE_MAX_COUNTS)
148 while (remainingCount > READ_WRITE_MAX_COUNTS)
104 {
149 {
105 for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++)
150 for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++)
106 {
151 {
107 data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]);
152 data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]);
108 data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8);
153 data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8);
109 data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16);
154 data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16);
110 data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24);
155 data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24);
111 }
156 }
112
157
113 console_message.sprintf("remainingCount: %d => ", remainingCount);
158 console_message.sprintf("remainingCount: %d => ", remainingCount);
114 APPENDTOLOG(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16));
159 APPENDTOLOG(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16));
115
160
116 if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0)
161 if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0)
117 {
162 {
118 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** RMAP write command failed");
163 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** RMAP write command failed");
119 return 1;
164 return 1;
120 }
165 }
121
166
122 remainingCount = remainingCount - READ_WRITE_MAX_COUNTS;
167 remainingCount = remainingCount - READ_WRITE_MAX_COUNTS;
123 address = address + READ_WRITE_MAX_COUNTS * 4;
168 address = address + READ_WRITE_MAX_COUNTS * 4;
124 iOffset = iOffset + READ_WRITE_MAX_COUNTS;
169 iOffset = iOffset + READ_WRITE_MAX_COUNTS;
125 }
170 }
126
171
127 if (remainingCount > 0)
172 if (remainingCount > 0)
128 {
173 {
129 for (unsigned int i = 0; i<remainingCount; i++)
174 for (unsigned int i = 0; i<remainingCount; i++)
130 {
175 {
131 data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]);
176 data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]);
132 data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8);
177 data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8);
133 data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16);
178 data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16);
134 data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24);
179 data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24);
135 }
180 }
136
181
137 console_message.sprintf("remainingCount: %d => ", remainingCount);
182 console_message.sprintf("remainingCount: %d => ", remainingCount);
138 APPENDTOLOG(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16));
183 APPENDTOLOG(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16));
139
184
140 if (WriteBLOCK(data, remainingCount*4, address)==0)
185 if (WriteBLOCK(data, remainingCount*4, address)==0)
141 {
186 {
142 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** RMAP write command failed");
187 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** RMAP write command failed");
143 return 1;
188 return 1;
144 }
189 }
145 }
190 }
146
191
147 APPENDTOLOG(QString("*** STOP *** WRITE"));
192 APPENDTOLOG(QString("*** STOP *** WRITE"));
148 free(data);
193 free(data);
149 return count;
194 return count;
150 }
195 }
151
196
152 unsigned int rmapplugin::Read(unsigned int *Value, unsigned int count, unsigned int address)
197 unsigned int rmapplugin::ReadGRESB(unsigned int *Value, unsigned int count, unsigned int address)
153 {
198 {
154 unsigned int remainingCount = count;
199 unsigned int remainingCount = count;
155 unsigned int iOffset = 0;
200 unsigned int iOffset = 0;
156 QString console_message;
201 QString console_message;
157
202
158 if(spwPacketReceiverOBJECT->rmapPacketSEMAPHORE->available()!=0)
203 if(spwPacketReceiverOBJECT->rmapPacketSEMAPHORE->available()!=0)
159 {
204 {
160 APPENDTOLOG("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped");
205 APPENDTOLOG("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped");
161 return 1;
206 return 1;
162 }
207 }
163 APPENDTOLOG(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16));
208 APPENDTOLOG(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16));
164
209
165 while (remainingCount > READ_WRITE_MAX_COUNTS)
210 while (remainingCount > READ_WRITE_MAX_COUNTS)
166 {
211 {
167 console_message.sprintf("remainingCount: %d => ", remainingCount);
212 console_message.sprintf("remainingCount: %d => ", remainingCount);
168 APPENDTOLOG(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16));
213 APPENDTOLOG(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16));
169
214
170 if (ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0)
215 if (ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0)
171 {
216 {
172 APPENDTOLOG("WARNING === in function READ of rmapplugin *** RMAP packet not received");
217 APPENDTOLOG("WARNING === in function READ of rmapplugin *** RMAP packet not received");
173 return 1;
218 return 1;
174 }
219 }
175
220
176 for(int i=0;i<READ_WRITE_MAX_COUNTS;i++)
221 for(int i=0;i<READ_WRITE_MAX_COUNTS;i++)
177 {
222 {
178 Value[i+iOffset] = (unsigned char) spwPacketReceiverOBJECT->rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH];
223 Value[i+iOffset] = (unsigned char) spwPacketReceiverOBJECT->rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH];
179 for(int j=1;j<4;j++)
224 for(int j=1;j<4;j++)
180 {
225 {
181 Value[i+iOffset]= ((unsigned char)(spwPacketReceiverOBJECT->rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256;
226 Value[i+iOffset]= ((unsigned char)(spwPacketReceiverOBJECT->rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256;
182 }
227 }
183 }
228 }
184
229
185 remainingCount = remainingCount - READ_WRITE_MAX_COUNTS;
230 remainingCount = remainingCount - READ_WRITE_MAX_COUNTS;
186 address = address + READ_WRITE_MAX_COUNTS * 4;
231 address = address + READ_WRITE_MAX_COUNTS * 4;
187 iOffset = iOffset + READ_WRITE_MAX_COUNTS;
232 iOffset = iOffset + READ_WRITE_MAX_COUNTS;
188 spwPacketReceiverOBJECT->acquireRMAPSemaphore();
233 spwPacketReceiverOBJECT->acquireRMAPSemaphore();
189 }
234 }
190
235
191 if (remainingCount > 0)
236 if (remainingCount > 0)
192 {
237 {
193 console_message.sprintf("remainingCount: %d => ", remainingCount);
238 console_message.sprintf("remainingCount: %d => ", remainingCount);
194 APPENDTOLOG(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16));
239 APPENDTOLOG(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16));
195
240
196 if (ReadBLOCK(4*remainingCount, address)==0)
241 if (ReadBLOCK(4*remainingCount, address)==0)
197 {
242 {
198 APPENDTOLOG("WARNING === in function READ of rmapplugin *** RMAP packet not received");
243 APPENDTOLOG("WARNING === in function READ of rmapplugin *** RMAP packet not received");
199 return 1;
244 return 1;
200 }
245 }
201
246
202 for(unsigned int i=0;i<remainingCount;i++)
247 for(unsigned int i=0;i<remainingCount;i++)
203 {
248 {
204 Value[i+iOffset] = (unsigned char) spwPacketReceiverOBJECT->rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH];
249 Value[i+iOffset] = (unsigned char) spwPacketReceiverOBJECT->rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH];
205 for(int j=1;j<4;j++)
250 for(int j=1;j<4;j++)
206 {
251 {
207 Value[i+iOffset]= ((unsigned char)(spwPacketReceiverOBJECT->rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256;
252 Value[i+iOffset]= ((unsigned char)(spwPacketReceiverOBJECT->rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256;
208 }
253 }
209 }
254 }
210 spwPacketReceiverOBJECT->acquireRMAPSemaphore();
255 spwPacketReceiverOBJECT->acquireRMAPSemaphore();
211 }
256 }
212
257
213 APPENDTOLOG(QString("*** STOP *** READ "));
258 APPENDTOLOG(QString("*** STOP *** READ "));
214 return count;
259 return count;
215 }
260 }
216
261
217 unsigned int rmapplugin::ReadBLOCK(unsigned int nbBytes, unsigned int address)
218 {
219 int errorCode;
220 RMAP *RMAPCommand;
221 QTime RMAPTimeout;
222 unsigned int dataLength;
223 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) == 1)
224 {
225 RMAP_DISCONNECT();
226 return 1;
227 }
228
229 if (nbBytes > 4)
230 {
231 RMAPCommand = new RMAP(read_Inc,
232 UI->rmapTargetLogicalAddressSpinBox->value(),
233 UI->rmapSourceLogicalAddressSpinBox->value(),
234 address,
235 nbBytes,
236 NULL);
237 }
238 else
239 {
240 RMAPCommand = new RMAP(read_Single,
241 UI->rmapTargetLogicalAddressSpinBox->value(),
242 UI->rmapSourceLogicalAddressSpinBox->value(),
243 address,
244 nbBytes,
245 NULL);
246 }
247
248 // SEND THE GRESB HEADER FOR THE RMAP READ COMMAND
249 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4);
250 // SEND THE SPACEWIRE PACKET FOR THE RMAP READ COMMAND
251 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader));
252 RMAPSend_SOCKET->waitForBytesWritten(100);
253 RMAPTimeout.start();
254 // write timeout
255 while(RMAPSend_SOCKET->bytesToWrite() > 0)
256 {
257 RMAPSend_SOCKET->waitForBytesWritten(100);
258 if(RMAPTimeout.elapsed()>1000)
259 {
260 APPENDTOLOG("WARNING === in function READ of rmapplugin *** sending Read RMAP Command timeout\n");
261 return 0;
262 }
263 }
264
265 // RECEIVE THE INCOMING RMAP PACKET
266 errorCode = spwPacketReceiverOBJECT->receiveSPWPacket(1); // request ID 1 is for RMAP packet
267 if (errorCode<=0)
268 {
269 APPENDTOLOG("WARNING === in function ReadBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode));
270 return 0;
271 }
272 dataLength = spwPacketReceiverOBJECT->rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH;
273 if(dataLength != nbBytes)
274 {
275 APPENDTOLOG("WARNING === in function READ of rmapplugin *** number of data received ("
276 +QString::number(dataLength)
277 +") not equal to number of data requested ("
278 +QString::number(READ_WRITE_MAX_COUNTS*4)
279 +")");
280 return 0;
281 }
282 return dataLength;
283 }
284
285 unsigned int rmapplugin::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address)
262 unsigned int rmapplugin::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address)
286 {
263 {
287 QTime RMAPTimeout;
264 QTime RMAPTimeout;
288 RMAP *RMAPCommand;
265 RMAP *RMAPCommand;
289 int errorCode;
266 int errorCode;
290 QString console_message;
267 QString console_message;
291
268
292 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) == 1)
269 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) == 1)
293 {
270 {
294 RMAP_DISCONNECT();
271 RMAP_DISCONNECT();
295 return 1;
272 return 1;
296 }
273 }
297
274
298 RMAPCommand = new RMAP(UI->getCommandCode(),
275 RMAPCommand = new RMAP(UI->getCommandCode(),
299 UI->rmapTargetLogicalAddressSpinBox->value(),
276 UI->rmapTargetLogicalAddressSpinBox->value(),
300 UI->rmapSourceLogicalAddressSpinBox->value(),
277 UI->rmapSourceLogicalAddressSpinBox->value(),
301 address,
278 address,
302 nbBytes,
279 nbBytes,
303 data);
280 data);
304
281
305 // SEND GRESB HEADER
282 // SEND GRESB HEADER
306 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4);
283 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4);
307 // SEND SPACEWIRE PACKET HEADER
284 // SEND SPACEWIRE PACKET HEADER
308 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader));
285 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader));
309 // SEND DATA
286 // SEND DATA
310 RMAPSend_SOCKET->write( data, nbBytes);
287 RMAPSend_SOCKET->write( data, nbBytes);
311 // SEND DATA CRC
288 // SEND DATA CRC
312 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->dataCRC), 1);
289 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->dataCRC), 1);
313 RMAPTimeout.start();
290 RMAPTimeout.start();
314 while(RMAPSend_SOCKET->bytesToWrite() > 0)
291 while(RMAPSend_SOCKET->bytesToWrite() > 0)
315 {
292 {
316 RMAPSend_SOCKET->waitForBytesWritten(100);
293 RMAPSend_SOCKET->waitForBytesWritten(100);
317 if(RMAPTimeout.elapsed()>1000)
294 if(RMAPTimeout.elapsed()>1000)
318 {
295 {
319 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** sending Write RMAP Command timeout");
296 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** sending Write RMAP Command timeout");
320 return 0;
297 return 0;
321 }
298 }
322 }
299 }
323
300
324 if (UI->RMAP_write_reply->isChecked())
301 if (UI->RMAP_write_reply->isChecked())
325 {
302 {
326 // WAIT FOR THE RMAP REPLY PACKET
303 // WAIT FOR THE RMAP REPLY PACKET
327 errorCode = spwPacketReceiverOBJECT->receiveSPWPacket(1);
304 errorCode = spwPacketReceiverOBJECT->receiveSPWPacket(1);
328 if (errorCode<=0)
305 if (errorCode<=0)
329 {
306 {
330 APPENDTOLOG("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode));
307 APPENDTOLOG("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode));
331 return 0;
308 return 0;
332 }
309 }
333 if(spwPacketReceiverOBJECT->rmapPacketSize != 8)
310 if(spwPacketReceiverOBJECT->rmapPacketSize != 8)
334 {
311 {
335 console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n");
312 console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n");
336 APPENDTOLOG(console_message);
313 APPENDTOLOG(console_message);
337 return 0;
314 return 0;
338 }
315 }
339 switch (spwPacketReceiverOBJECT->rmapPacket[3]) // byte 4 is the status byte in the reply
316 switch (spwPacketReceiverOBJECT->rmapPacket[3]) // byte 4 is the status byte in the reply
340 {
317 {
341 case 0:
318 case 0:
342 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 0 Successfull");
319 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 0 Successfull");
343 break;
320 break;
344 case 1:
321 case 1:
345 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** General error code");
322 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** General error code");
346 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 1 General error code");
323 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 1 General error code");
347 break;
324 break;
348 case 2:
325 case 2:
349 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code");
326 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code");
350 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code");
327 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code");
351 break;
328 break;
352 case 3:
329 case 3:
353 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key");
330 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key");
354 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 3 Invalid key");
331 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 3 Invalid key");
355 break;
332 break;
356 case 4:
333 case 4:
357 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC");
334 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC");
358 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 4 Invalid data CRC");
335 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 4 Invalid data CRC");
359 break;
336 break;
360 case 5:
337 case 5:
361 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP");
338 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP");
362 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 5 Early EOP");
339 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 5 Early EOP");
363 break;
340 break;
364 case 6:
341 case 6:
365 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data");
342 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data");
366 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 6 Too much data");
343 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 6 Too much data");
367 break;
344 break;
368 case 7:
345 case 7:
369 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** EEP");
346 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** EEP");
370 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 7 EEP");
347 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 7 EEP");
371 break;
348 break;
372 case 8:
349 case 8:
373 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved");
350 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved");
374 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 8 Reserved");
351 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 8 Reserved");
375 break;
352 break;
376 case 9:
353 case 9:
377 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun");
354 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun");
378 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun");
355 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun");
379 break;
356 break;
380 case 10:
357 case 10:
381 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised");
358 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised");
382 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised");
359 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised");
383 break;
360 break;
384 case 11:
361 case 11:
385 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error");
362 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error");
386 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error");
363 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error");
387 break;
364 break;
388 case 12:
365 case 12:
389 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address");
366 APPENDTOLOG("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address");
390 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 12 Invalid target logical address");
367 UI->RMAP_write_reply->setText("reply to the write command required\nlast reply status: 12 Invalid target logical address");
391 break;
368 break;
392 }
369 }
393 spwPacketReceiverOBJECT->acquireRMAPSemaphore();
370 spwPacketReceiverOBJECT->acquireRMAPSemaphore();
394 }
371 }
395 return nbBytes;
372 return nbBytes;
396 }
373 }
397
374
375 unsigned int rmapplugin::ReadBLOCK(unsigned int nbBytes, unsigned int address)
376 {
377 int errorCode;
378 RMAP *RMAPCommand;
379 QTime RMAPTimeout;
380 unsigned int dataLength;
381 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) == 1)
382 {
383 RMAP_DISCONNECT();
384 return 1;
385 }
386
387 if (nbBytes > 4)
388 {
389 RMAPCommand = new RMAP(read_Inc,
390 UI->rmapTargetLogicalAddressSpinBox->value(),
391 UI->rmapSourceLogicalAddressSpinBox->value(),
392 address,
393 nbBytes,
394 NULL);
395 }
396 else
397 {
398 RMAPCommand = new RMAP(read_Single,
399 UI->rmapTargetLogicalAddressSpinBox->value(),
400 UI->rmapSourceLogicalAddressSpinBox->value(),
401 address,
402 nbBytes,
403 NULL);
404 }
405
406 // SEND THE GRESB HEADER FOR THE RMAP READ COMMAND
407 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4);
408 // SEND THE SPACEWIRE PACKET FOR THE RMAP READ COMMAND
409 RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader));
410 RMAPSend_SOCKET->waitForBytesWritten(100);
411 RMAPTimeout.start();
412 // write timeout
413 while(RMAPSend_SOCKET->bytesToWrite() > 0)
414 {
415 RMAPSend_SOCKET->waitForBytesWritten(100);
416 if(RMAPTimeout.elapsed()>1000)
417 {
418 APPENDTOLOG("WARNING === in function READ of rmapplugin *** sending Read RMAP Command timeout\n");
419 return 0;
420 }
421 }
422
423 // RECEIVE THE INCOMING RMAP PACKET
424 errorCode = spwPacketReceiverOBJECT->receiveSPWPacket(1); // request ID 1 is for RMAP packet
425 if (errorCode<=0)
426 {
427 APPENDTOLOG("WARNING === in function ReadBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode));
428 return 0;
429 }
430 dataLength = spwPacketReceiverOBJECT->rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH;
431 if(dataLength != nbBytes)
432 {
433 APPENDTOLOG("WARNING === in function READ of rmapplugin *** number of data received ("
434 +QString::number(dataLength)
435 +") not equal to number of data requested ("
436 +QString::number(READ_WRITE_MAX_COUNTS*4)
437 +")");
438 return 0;
439 }
440 return dataLength;
441 }
442
443 unsigned int rmapplugin::WriteStarDundee(unsigned int *Value, unsigned int count, unsigned int address)
444 {
445 unsigned int result;
446 result = UI->starDundee->WriteStarDundee(Value, count, address);
447 return result;
448 }
449
450 unsigned int rmapplugin::ReadStarDundee(unsigned int *Value, unsigned int count, unsigned int address)
451 {
452 unsigned int result;
453 result = UI->starDundee->ReadStarDundee(Value, count, address);
454 return result;
455 }
456
398 ////////
457 ////////
399 // SLOTS
458 // SLOTS
400
459
401 unsigned int rmapplugin::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) // SLOT
460 unsigned int rmapplugin::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) // SLOT
402 {
461 {
403 char protocoleIdentifier = 0x02;
462 char protocoleIdentifier = 0x02;
404 char reserved = 0x00;
463 char reserved = 0x00;
405 char gresbProtocole = 0x00;
464 char gresbProtocole = 0x00;
406 unsigned char size[3];
465 unsigned char size[3];
407 unsigned int spwPacketSize = count + 4;
466 unsigned int spwPacketSize = count + 4;
408 QTime SPWTimeout;
467 QTime SPWTimeout;
409
468
410 if (count>248)
469 if (count>248)
411 {
470 {
412 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n");
471 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n");
413 return 1;
472 return 1;
414 }
473 }
415
474
416 APPENDTOLOG(QString("*** START *** Send CCSDS packet of ")+ QString::number(count) + QString(" byte(s)"));
475 APPENDTOLOG(QString("*** START *** Send CCSDS packet of ")+ QString::number(count) + QString(" byte(s)"));
417
476
418 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) == 1)
477 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) == 1)
419 {
478 {
420 RMAP_DISCONNECT();
479 RMAP_DISCONNECT();
421 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** SPW link not running\n");
480 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** SPW link not running\n");
422 return 1;
481 return 1;
423 }
482 }
424
483
425 // SEND GRESB HEADER
484 // SEND GRESB HEADER
426 size[0] = (unsigned char) ((unsigned int) spwPacketSize>>16);
485 size[0] = (unsigned char) ((unsigned int) spwPacketSize>>16);
427 size[1] = (unsigned char) ((unsigned int) spwPacketSize>>8);
486 size[1] = (unsigned char) ((unsigned int) spwPacketSize>>8);
428 size[2] = (unsigned char) ((unsigned int) spwPacketSize);
487 size[2] = (unsigned char) ((unsigned int) spwPacketSize);
429 RMAPSend_SOCKET->write(&gresbProtocole, 1);
488 RMAPSend_SOCKET->write(&gresbProtocole, 1);
430 RMAPSend_SOCKET->write((char*) size, 3);
489 RMAPSend_SOCKET->write((char*) size, 3);
431 // SEND SPW HEADER
490 // SEND SPW HEADER
432 RMAPSend_SOCKET->write(&targetLogicalAddress, 1);
491 RMAPSend_SOCKET->write(&targetLogicalAddress, 1);
433 RMAPSend_SOCKET->write(&protocoleIdentifier, 1);
492 RMAPSend_SOCKET->write(&protocoleIdentifier, 1);
434 RMAPSend_SOCKET->write(&reserved, 1);
493 RMAPSend_SOCKET->write(&reserved, 1);
435 RMAPSend_SOCKET->write(&userApplication, 1);
494 RMAPSend_SOCKET->write(&userApplication, 1);
436 // SEND CCSDS PACKET
495 // SEND CCSDS PACKET
437 RMAPSend_SOCKET->write(Value, count);
496 RMAPSend_SOCKET->write(Value, count);
438 SPWTimeout.start();
497 SPWTimeout.start();
439 while(RMAPSend_SOCKET->bytesToWrite() > 0)
498 while(RMAPSend_SOCKET->bytesToWrite() > 0)
440 {
499 {
441 RMAPSend_SOCKET->waitForBytesWritten(100);
500 RMAPSend_SOCKET->waitForBytesWritten(100);
442 if(SPWTimeout.elapsed()>1000)
501 if(SPWTimeout.elapsed()>1000)
443 {
502 {
444 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** sending CCSDS packet timeout\n");
503 APPENDTOLOG("WARNING === in function WRITE of rmapplugin *** sending CCSDS packet timeout\n");
445 return 1;
504 return 1;
446 }
505 }
447 }
506 }
448
507
449 APPENDTOLOG(QString("*** CCSDS packet sent"));
508 APPENDTOLOG(QString("*** CCSDS packet sent"));
450
509
451 return count;
510 return count;
452 }
511 }
453
512
454 void rmapplugin::sendCCSDS() // SLOT
513 void rmapplugin::sendCCSDS() // SLOT
455 {
514 {
456 unsigned int nbBYTES_application_data = 8;
515 unsigned int nbBYTES_application_data = 8;
457 unsigned int count;
516 unsigned int count;
458 char *tab;
517 char *tab;
459 unsigned char packetErrorControl1 = 0xaa;
518 unsigned char packetErrorControl1 = 0xaa;
460 unsigned char packetErrorControl0 = 0xbb;
519 unsigned char packetErrorControl0 = 0xbb;
461
520
462 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
521 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
463 /* unsigned char data_field_header,
522 /* unsigned char data_field_header,
464 unsigned char processID,
523 unsigned char processID,
465 unsigned int sequence_count,
524 unsigned int sequence_count,
466 unsigned int packet_length,
525 unsigned int packet_length,
467 unsigned char acceptance,
526 unsigned char acceptance,
468 unsigned int completion,
527 unsigned int completion,
469 unsigned char service_type,
528 unsigned char service_type,
470 unsigned char service_subtype,
529 unsigned char service_subtype,
471 unsigned char sourceID*/
530 unsigned char sourceID*/
472
531
473 count = nbBYTES_application_data+12; // 12 is the size in bytes of the header
532 count = nbBYTES_application_data+12; // 12 is the size in bytes of the header
474 tab = (char*) malloc(count);
533 tab = (char*) malloc(count);
475 tab[0] = ccsds_command->ccsds_header->packetId1;
534 tab[0] = ccsds_command->ccsds_header->packetId1;
476 tab[1] = ccsds_command->ccsds_header->packetId0;
535 tab[1] = ccsds_command->ccsds_header->packetId0;
477 tab[2] = ccsds_command->ccsds_header->packetSequenceControl1;
536 tab[2] = ccsds_command->ccsds_header->packetSequenceControl1;
478 tab[3] = ccsds_command->ccsds_header->packetSequenceControl0;
537 tab[3] = ccsds_command->ccsds_header->packetSequenceControl0;
479 tab[4] = ccsds_command->ccsds_header->packetLength1;
538 tab[4] = ccsds_command->ccsds_header->packetLength1;
480 tab[5] = ccsds_command->ccsds_header->packetLength0;
539 tab[5] = ccsds_command->ccsds_header->packetLength0;
481 tab[6] = ccsds_command->ccsds_header->dataFieldHeader3;
540 tab[6] = ccsds_command->ccsds_header->dataFieldHeader3;
482 tab[7] = ccsds_command->ccsds_header->dataFieldHeader2;
541 tab[7] = ccsds_command->ccsds_header->dataFieldHeader2;
483 tab[8] = ccsds_command->ccsds_header->dataFieldHeader1;
542 tab[8] = ccsds_command->ccsds_header->dataFieldHeader1;
484 tab[9] = ccsds_command->ccsds_header->dataFieldHeader0;
543 tab[9] = ccsds_command->ccsds_header->dataFieldHeader0;
485 tab[10]=0x00;
544 tab[10]=0x00;
486 tab[11]=0x00;
545 tab[11]=0x00;
487 tab[12]=0x00;
546 tab[12]=0x00;
488 tab[13]=0x00;
547 tab[13]=0x00;
489 tab[14]=0x00;
548 tab[14]=0x00;
490 tab[15]=0x00;
549 tab[15]=0x00;
491 tab[nbBYTES_application_data+10] = packetErrorControl1;
550 tab[nbBYTES_application_data+10] = packetErrorControl1;
492 tab[nbBYTES_application_data+11] = packetErrorControl0;
551 tab[nbBYTES_application_data+11] = packetErrorControl0;
493
552
494 WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00);
553 WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00);
495
554
496 free(tab);
555 free(tab);
497 }
556 }
498
557
499 void rmapplugin::send_TC_LFR_UPDATE_TIME()
558 void rmapplugin::send_TC_LFR_UPDATE_TIME()
500 {
559 {
501 unsigned int nbBYTES_application_data = 6; // Time at CUC format is on 48 bits / 6 bytes
560 unsigned int nbBYTES_application_data = 6; // Time at CUC format is on 48 bits / 6 bytes
502 unsigned int count;
561 unsigned int count;
503 char *tab;
562 char *tab;
504 unsigned char packetErrorControl1 = 0xaa;
563 unsigned char packetErrorControl1 = 0xaa;
505 unsigned char packetErrorControl0 = 0xbb;
564 unsigned char packetErrorControl0 = 0xbb;
506
565
507 ccsds_command = new ccsds(1, 11, 0, nbBYTES_application_data, 1, 1, 9, 129, 0);
566 ccsds_command = new ccsds(1, 11, 0, nbBYTES_application_data, 1, 1, 9, 129, 0);
508 /* unsigned char data_field_header,
567 /* unsigned char data_field_header,
509 unsigned char processID,
568 unsigned char processID,
510 unsigned int sequence_count,
569 unsigned int sequence_count,
511 unsigned int packet_length,
570 unsigned int packet_length,
512 unsigned char acceptance,
571 unsigned char acceptance,
513 unsigned int completion,
572 unsigned int completion,
514 unsigned char service_type,
573 unsigned char service_type,
515 unsigned char service_subtype,
574 unsigned char service_subtype,
516 unsigned char sourceID*/
575 unsigned char sourceID*/
517
576
518 count = nbBYTES_application_data+12; // +12 => packet header 6 bytes + data field header 4 bytes + packet error control 2 bytes
577 count = nbBYTES_application_data+12; // +12 => packet header 6 bytes + data field header 4 bytes + packet error control 2 bytes
519 tab = (char*) malloc(count);
578 tab = (char*) malloc(count);
520 tab[0] = ccsds_command->ccsds_header->packetId1;
579 tab[0] = ccsds_command->ccsds_header->packetId1;
521 tab[1] = ccsds_command->ccsds_header->packetId0;
580 tab[1] = ccsds_command->ccsds_header->packetId0;
522 tab[2] = ccsds_command->ccsds_header->packetSequenceControl1;
581 tab[2] = ccsds_command->ccsds_header->packetSequenceControl1;
523 tab[3] = ccsds_command->ccsds_header->packetSequenceControl0;
582 tab[3] = ccsds_command->ccsds_header->packetSequenceControl0;
524 tab[4] = ccsds_command->ccsds_header->packetLength1;
583 tab[4] = ccsds_command->ccsds_header->packetLength1;
525 tab[5] = ccsds_command->ccsds_header->packetLength0;
584 tab[5] = ccsds_command->ccsds_header->packetLength0;
526 tab[6] = ccsds_command->ccsds_header->dataFieldHeader3;
585 tab[6] = ccsds_command->ccsds_header->dataFieldHeader3;
527 tab[7] = ccsds_command->ccsds_header->dataFieldHeader2;
586 tab[7] = ccsds_command->ccsds_header->dataFieldHeader2;
528 tab[8] = ccsds_command->ccsds_header->dataFieldHeader1;
587 tab[8] = ccsds_command->ccsds_header->dataFieldHeader1;
529 tab[9] = ccsds_command->ccsds_header->dataFieldHeader0;
588 tab[9] = ccsds_command->ccsds_header->dataFieldHeader0;
530 tab[10] = (unsigned char) (time_COARSE>>24);
589 tab[10] = (unsigned char) (time_COARSE>>24);
531 tab[11] = (unsigned char) (time_COARSE>>18);
590 tab[11] = (unsigned char) (time_COARSE>>18);
532 tab[12] = (unsigned char) (time_COARSE>>8);
591 tab[12] = (unsigned char) (time_COARSE>>8);
533 tab[13] = (unsigned char) (time_COARSE);
592 tab[13] = (unsigned char) (time_COARSE);
534 tab[14] = (unsigned char) (time_FINE>>8);
593 tab[14] = (unsigned char) (time_FINE>>8);
535 tab[15] = (unsigned char) (time_FINE);
594 tab[15] = (unsigned char) (time_FINE);
536 tab[nbBYTES_application_data+10] = packetErrorControl1;
595 tab[nbBYTES_application_data+10] = packetErrorControl1;
537 tab[nbBYTES_application_data+11] = packetErrorControl0;
596 tab[nbBYTES_application_data+11] = packetErrorControl0;
538
597
539 WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00);
598 WriteSPW(tab, count, UI->CCSDSTargetLogicalAddressSpinBox->value(), 0x00);
540
599
541 time_COARSE = time_COARSE+1;
600 time_COARSE = time_COARSE+1;
542
601
543 free(tab);
602 free(tab);
544 }
603 }
545
604
546 void rmapplugin::reset_TC_LFR_UPDATE_TIME()
605 void rmapplugin::reset_TC_LFR_UPDATE_TIME()
547 {
606 {
548 time_COARSE = 0;
607 time_COARSE = 0;
549 time_FINE = 0;
608 time_FINE = 0;
550 }
609 }
551
610
611 void rmapplugin::openBridge()
612 {
613 switch(currentBridge)
614 {
615 case selectedBridgeIsGRESB :
616 RMAP_CONNECT();
617 break;
618 case selectedBridgeIsStarDundee :
619 this->UI->starDundee->OpenStarDundee();
620 break;
621 default:
622 break;
623 }
624 }
625
626 void rmapplugin::closeBridge()
627 {
628 switch(currentBridge)
629 {
630 case selectedBridgeIsGRESB :
631 RMAP_DISCONNECT();
632 break;
633 case selectedBridgeIsStarDundee :
634 this->UI->starDundee->CloseStarDundee();
635 break;
636 default:
637 break;
638 }
639 }
640
552 void rmapplugin::RMAP_CONNECT() // SLOT
641 void rmapplugin::RMAP_CONNECT() // SLOT
553 {
642 {
554 bool spwRunning = true;
643 bool spwRunning = true;
555 RMAPSend_SOCKET->connectToHost( QHostAddress(UI->gresbBridgeIPDialogBox->getGRESBIP()),
644 RMAPSend_SOCKET->connectToHost( QHostAddress(UI->gresbBridgeIPDialogBox->getGRESBIP()),
556 3000 + UI->gresbVirtualLinkSpinBox->value()*2,
645 3000 + UI->gresbVirtualLinkSpinBox->value()*2,
557 QIODevice::WriteOnly);
646 QIODevice::WriteOnly);
558 RMAPReceive_SOCKET->connectToHost( QHostAddress(UI->gresbBridgeIPDialogBox->getGRESBIP()),
647 RMAPReceive_SOCKET->connectToHost( QHostAddress(UI->gresbBridgeIPDialogBox->getGRESBIP()),
559 3000 + UI->gresbVirtualLinkSpinBox->value()*2+1,
648 3000 + UI->gresbVirtualLinkSpinBox->value()*2+1,
560 QIODevice::ReadOnly);
649 QIODevice::ReadOnly);
561 GRESBStatusQuery_SOCKET->connectToHost( QHostAddress(UI->gresbBridgeIPDialogBox->getGRESBIP()),
650 GRESBStatusQuery_SOCKET->connectToHost( QHostAddress(UI->gresbBridgeIPDialogBox->getGRESBIP()),
562 3010,
651 3010,
563 QIODevice::ReadWrite);
652 QIODevice::ReadWrite);
564 GRESBStatusQuery_SOCKET->waitForConnected(10000);
653 GRESBStatusQuery_SOCKET->waitForConnected(10000);
565 RMAPReceive_SOCKET->readAll(); // read all remaining data from the reception socket
654 RMAPReceive_SOCKET->readAll(); // read all remaining data from the reception socket
566 // initialize SPW packet semaphores
655 // initialize SPW packet semaphores
567 while (spwPacketReceiverOBJECT->rmapPacketSEMAPHORE->available()!=0) spwPacketReceiverOBJECT->rmapPacketSEMAPHORE->acquire();
656 while (spwPacketReceiverOBJECT->rmapPacketSEMAPHORE->available()!=0) spwPacketReceiverOBJECT->rmapPacketSEMAPHORE->acquire();
568 while (spwPacketReceiverOBJECT->ccsdsPacketSEMAPHORE->available()!=0) spwPacketReceiverOBJECT->ccsdsPacketSEMAPHORE->acquire();
657 while (spwPacketReceiverOBJECT->ccsdsPacketSEMAPHORE->available()!=0) spwPacketReceiverOBJECT->ccsdsPacketSEMAPHORE->acquire();
569 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) != 0)
658 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) != 0)
570 {
659 {
571 spwRunning = UI->gresbStatusQueryDialog->exec();
660 spwRunning = UI->gresbStatusQueryDialog->exec();
572 }
661 }
573 if (spwRunning == false) RMAP_DISCONNECT();
662 if (spwRunning == false) RMAP_DISCONNECT();
574 else
663 else
575 {
664 {
576 APPENDTOLOG(QString("SpaceWire running on virtual link ")+ QString::number(UI->spwLinkSpinBox->value()));
665 APPENDTOLOG(QString("SpaceWire running on virtual link ")+ QString::number(UI->spwLinkSpinBox->value()));
577 emit this->activateSig(true);
666 emit this->activateSig(true);
667 emit gresbIsOpen(true);
578 }
668 }
579 }
669 }
580
670
581 void rmapplugin::RMAP_DISCONNECT() // SLOT
671 void rmapplugin::RMAP_DISCONNECT() // SLOT
582 {
672 {
583 RMAPSend_SOCKET->disconnectFromHost();
673 RMAPSend_SOCKET->disconnectFromHost();
584 RMAPReceive_SOCKET->disconnectFromHost();
674 RMAPReceive_SOCKET->disconnectFromHost();
585 GRESBStatusQuery_SOCKET->disconnectFromHost();
675 GRESBStatusQuery_SOCKET->disconnectFromHost();
586 emit this->activateSig(false);
676 emit this->activateSig(false);
677 emit gresbIsOpen(false);
587 }
678 }
588
679
589 void rmapplugin::RMAPSendConnectionState(QAbstractSocket::SocketState socketState) // SLOT
680 void rmapplugin::RMAPSendConnectionState(QAbstractSocket::SocketState socketState) // SLOT
590 {
681 {
591 UI->rmapSendStateLabel->setText("");
682 UI->rmapSendStateLabel->setText("");
592 QString socketMessage = "RMAP Send Socket State: ";
683 QString socketMessage = "RMAP Send Socket State: ";
593 switch(socketState)
684 switch(socketState)
594 {
685 {
595 case QAbstractSocket::UnconnectedState :
686 case QAbstractSocket::UnconnectedState :
596 socketMessage.append("0 => Unconnected");
687 socketMessage.append("0 => Unconnected");
597 UI->rmapOpenCommunicationButton->setEnabled(true);
688 UI->rmapOpenCommunicationButton->setEnabled(true);
598 UI->rmapCloseCommunicationButton->setEnabled(false);
689 UI->rmapCloseCommunicationButton->setEnabled(false);
599 emit this->activateSig(false);
690 emit this->activateSig(false);
600 break;
691 break;
601 case 1:
692 case 1:
602 socketMessage.append("1 => HostLookup");
693 socketMessage.append("1 => HostLookup");
603 break;
694 break;
604 case 2:
695 case 2:
605 socketMessage.append("2 => Connecting");
696 socketMessage.append("2 => Connecting");
606 break;
697 break;
607 case 3:
698 case 3:
608 socketMessage.append("3 => Connected");
699 socketMessage.append("3 => Connected");
609 UI->rmapOpenCommunicationButton->setEnabled(false);
700 UI->rmapOpenCommunicationButton->setEnabled(false);
610 UI->rmapCloseCommunicationButton->setEnabled(true);
701 UI->rmapCloseCommunicationButton->setEnabled(true);
611 break;
702 break;
612 case 4:
703 case 4:
613 socketMessage.append("4 => Bound");
704 socketMessage.append("4 => Bound");
614 break;
705 break;
615 case 5:
706 case 5:
616 socketMessage.append("5 => Closing");
707 socketMessage.append("5 => Closing");
617 break;
708 break;
618 case 6:
709 case 6:
619 socketMessage.append("6 => Listening");
710 socketMessage.append("6 => Listening");
620 break;
711 break;
621 }
712 }
622 UI->rmapSendStateLabel->setText(socketMessage);
713 UI->rmapSendStateLabel->setText(socketMessage);
623 APPENDTOLOG(socketMessage);
714 APPENDTOLOG(socketMessage);
624 }
715 }
625
716
626 void rmapplugin::RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState) // SLOT
717 void rmapplugin::RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState) // SLOT
627 {
718 {
628 UI->rmapReceiveStateLabel->setText("");
719 UI->rmapReceiveStateLabel->setText("");
629 QString socketMessage = "RMAP Receive Socket State: ";
720 QString socketMessage = "RMAP Receive Socket State: ";
630 switch(socketState)
721 switch(socketState)
631 {
722 {
632 case QAbstractSocket::UnconnectedState :
723 case QAbstractSocket::UnconnectedState :
633 socketMessage.append("0 => Unconnected");
724 socketMessage.append("0 => Unconnected");
634 break;
725 break;
635 case 1:
726 case 1:
636 socketMessage.append("1 => HostLookup");
727 socketMessage.append("1 => HostLookup");
637 break;
728 break;
638 case 2:
729 case 2:
639 socketMessage.append("2 => Connecting");
730 socketMessage.append("2 => Connecting");
640 break;
731 break;
641 case 3:
732 case 3:
642 socketMessage.append("3 => Connected");
733 socketMessage.append("3 => Connected");
643 break;
734 break;
644 case 4:
735 case 4:
645 socketMessage.append("4 => Bound");
736 socketMessage.append("4 => Bound");
646 break;
737 break;
647 case 5:
738 case 5:
648 socketMessage.append("5 => Closing");
739 socketMessage.append("5 => Closing");
649 break;
740 break;
650 case 6:
741 case 6:
651 socketMessage.append("6 => Listening");
742 socketMessage.append("6 => Listening");
652 break;
743 break;
653 }
744 }
654 UI->rmapReceiveStateLabel->setText(socketMessage);
745 UI->rmapReceiveStateLabel->setText(socketMessage);
655 APPENDTOLOG(socketMessage);
746 APPENDTOLOG(socketMessage);
656 }
747 }
657
748
658 void rmapplugin::GRESBConnectionState(QAbstractSocket::SocketState socketState) // SLOT
749 void rmapplugin::GRESBConnectionState(QAbstractSocket::SocketState socketState) // SLOT
659 {
750 {
660 UI->gresbStatusQueryLabel->setText("");
751 UI->gresbStatusQueryLabel->setText("");
661 QString socketMessage = "GRESB status query socket (port 3010): ";
752 QString socketMessage = "GRESB status query socket (port 3010): ";
662 switch(socketState)
753 switch(socketState)
663 {
754 {
664 case QAbstractSocket::UnconnectedState :
755 case QAbstractSocket::UnconnectedState :
665 socketMessage.append("0 => Unconnected");
756 socketMessage.append("0 => Unconnected");
666 break;
757 break;
667 case 1:
758 case 1:
668 socketMessage.append("1 => HostLookup");
759 socketMessage.append("1 => HostLookup");
669 break;
760 break;
670 case 2:
761 case 2:
671 socketMessage.append("2 => Connecting");
762 socketMessage.append("2 => Connecting");
672 break;
763 break;
673 case 3:
764 case 3:
674 socketMessage.append("3 => Connected");
765 socketMessage.append("3 => Connected");
675 break;
766 break;
676 case 4:
767 case 4:
677 socketMessage.append("4 => Bound");
768 socketMessage.append("4 => Bound");
678 break;
769 break;
679 case 5:
770 case 5:
680 socketMessage.append("5 => Closing");
771 socketMessage.append("5 => Closing");
681 break;
772 break;
682 case 6:
773 case 6:
683 socketMessage.append("6 => Listening");
774 socketMessage.append("6 => Listening");
684 break;
775 break;
685 }
776 }
686 UI->gresbStatusQueryLabel->setText(socketMessage);
777 UI->gresbStatusQueryLabel->setText(socketMessage);
687 }
778 }
688
779
689 void rmapplugin::reTestSPWLink() // SLOT
780 void rmapplugin::reTestSPWLink() // SLOT
690 {
781 {
691 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) == 0)
782 if (GRESBStatusQueryRequest(LinkStatus, UI->spwLinkSpinBox->value()) == 0)
692 {
783 {
693 UI->gresbStatusQueryDialog->accept();
784 UI->gresbStatusQueryDialog->accept();
694 }
785 }
695 }
786 }
696
787
697 int rmapplugin::GRESBStatusQuery() // SLOT
788 int rmapplugin::GRESBStatusQuery() // SLOT
698 {
789 {
699 GRESBStatusQueryRequest(LinkStatus, 0);
790 GRESBStatusQueryRequest(LinkStatus, 0);
700 GRESBStatusQueryRequest(LinkStatus, 1);
791 GRESBStatusQueryRequest(LinkStatus, 1);
701 GRESBStatusQueryRequest(LinkStatus, 2);
792 GRESBStatusQueryRequest(LinkStatus, 2);
702 GRESBStatusQueryRequest(LinkStatistics, 0);
793 GRESBStatusQueryRequest(LinkStatistics, 0);
703 GRESBStatusQueryRequest(LinkStatistics, 1);
794 GRESBStatusQueryRequest(LinkStatistics, 1);
704 GRESBStatusQueryRequest(LinkStatistics, 2);
795 GRESBStatusQueryRequest(LinkStatistics, 2);
705 return 0;
796 return 0;
706 }
797 }
707
798
708 void rmapplugin::displayOnConsole(QString message)
799 void rmapplugin::displayOnConsole(QString message)
709 {
800 {
710 this->UI->console->append(message);
801 this->UI->console->append(message);
711 }
802 }
712
803
804 void rmapplugin::activatePluginViaStarDundee(bool flag)
805 {
806 emit activateSig(flag);
807 }
808
809 void rmapplugin::RMAP_write_reply_setText(QString text)
810 {
811 this->UI->RMAP_write_reply->setText(text);
812 }
813
814 void rmapplugin::appendToLog(QString text)
815 {
816 APPENDTOLOG(text);
817 }
818
713 /////////////////////
819 /////////////////////
714 // INTERNAL FUNCTIONS
820 // INTERNAL FUNCTIONS
715
821
716 int rmapplugin::GRESBStatusQueryRequest(GresbStatusQueryOption option, char link)
822 int rmapplugin::GRESBStatusQueryRequest(GresbStatusQueryOption option, char link)
717 {
823 {
718 gresb_status_query_t statusQueryCommand;
824 gresb_status_query_t statusQueryCommand;
719 gresb_link_status_reply_t linkStatusReply;
825 gresb_link_status_reply_t linkStatusReply;
720 gresb_link_statistics_reply_t linkStatisticsReply;
826 gresb_link_statistics_reply_t linkStatisticsReply;
721 QTime statusQueryTimeout;
827 QTime statusQueryTimeout;
722 QString console_message;
828 QString console_message;
723
829
724 statusQueryCommand.protocolIdentifier = (char) 0x02;
830 statusQueryCommand.protocolIdentifier = (char) 0x02;
725 statusQueryCommand.reserved1 = (char) 0x00;
831 statusQueryCommand.reserved1 = (char) 0x00;
726 statusQueryCommand.reserved0 = (char) 0x00;
832 statusQueryCommand.reserved0 = (char) 0x00;
727 statusQueryCommand.option = (char) option;
833 statusQueryCommand.option = (char) option;
728 statusQueryCommand.value3 = (char) 0x00;
834 statusQueryCommand.value3 = (char) 0x00;
729 statusQueryCommand.value2 = (char) 0x00;
835 statusQueryCommand.value2 = (char) 0x00;
730 statusQueryCommand.value1 = (char) 0x00;
836 statusQueryCommand.value1 = (char) 0x00;
731 statusQueryCommand.value0 = (char) link;
837 statusQueryCommand.value0 = (char) link;
732
838
733 GRESBStatusQuery_SOCKET->write((char*) ((void*) &statusQueryCommand), sizeof(statusQueryCommand));
839 GRESBStatusQuery_SOCKET->write((char*) ((void*) &statusQueryCommand), sizeof(statusQueryCommand));
734 GRESBStatusQuery_SOCKET->flush();
840 GRESBStatusQuery_SOCKET->flush();
735 GRESBStatusQuery_SOCKET->waitForBytesWritten(1000);
841 GRESBStatusQuery_SOCKET->waitForBytesWritten(1000);
736
842
737 statusQueryTimeout.start();
843 statusQueryTimeout.start();
738 while(GRESBStatusQuery_SOCKET->bytesToWrite() > 0)
844 while(GRESBStatusQuery_SOCKET->bytesToWrite() > 0)
739 {
845 {
740 GRESBStatusQuery_SOCKET->waitForBytesWritten(100);
846 GRESBStatusQuery_SOCKET->waitForBytesWritten(100);
741 if(statusQueryTimeout.elapsed()>1000)
847 if(statusQueryTimeout.elapsed()>1000)
742 {
848 {
743 APPENDTOLOG("WARNING === in function GRESBStatusQueryRequest of rmapplugin *** sending StatusQueryCommand timeout");
849 APPENDTOLOG("WARNING === in function GRESBStatusQueryRequest of rmapplugin *** sending StatusQueryCommand timeout");
744 return 1;
850 return 1;
745 }
851 }
746 }
852 }
747
853
748 switch (option)
854 switch (option)
749 {
855 {
750 case LinkStatus:
856 case LinkStatus:
751 {
857 {
752 statusQueryTimeout.start();
858 statusQueryTimeout.start();
753 while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatusReply))
859 while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatusReply))
754 {
860 {
755 GRESBStatusQuery_SOCKET->waitForReadyRead(100);
861 GRESBStatusQuery_SOCKET->waitForReadyRead(100);
756 if(statusQueryTimeout.elapsed()>1000)
862 if(statusQueryTimeout.elapsed()>1000)
757 {
863 {
758 console_message.sprintf("GRESBStatusQueryRequest / LinkStatus => error timeout bytesAvailable()\n");
864 console_message.sprintf("GRESBStatusQueryRequest / LinkStatus => error timeout bytesAvailable()\n");
759 APPENDTOLOG(console_message);
865 APPENDTOLOG(console_message);
760 return 1;
866 return 1;
761 }
867 }
762 }
868 }
763 GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatusReply), (int) sizeof(linkStatusReply));
869 GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatusReply), (int) sizeof(linkStatusReply));
764 console_message.sprintf("%x", linkStatusReply.byte0);
870 console_message.sprintf("%x", linkStatusReply.byte0);
765 UI->spwLinkStatusEnquiry->statusQueryTable->item(0, link)->setText(console_message);
871 UI->spwLinkStatusEnquiry->statusQueryTable->item(0, link)->setText(console_message);
766 console_message.sprintf("%d", linkStatusReply.byte1);
872 console_message.sprintf("%d", linkStatusReply.byte1);
767 UI->spwLinkStatusEnquiry->statusQueryTable->item(1, link)->setText(console_message);
873 UI->spwLinkStatusEnquiry->statusQueryTable->item(1, link)->setText(console_message);
768 if (linkStatusReply.byte0 == 0) return 1;
874 if (linkStatusReply.byte0 == 0) return 1;
769 break;
875 break;
770 }
876 }
771 case LinkStatistics:
877 case LinkStatistics:
772 {
878 {
773 statusQueryTimeout.start();
879 statusQueryTimeout.start();
774 while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatisticsReply))
880 while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatisticsReply))
775 {
881 {
776 GRESBStatusQuery_SOCKET->waitForReadyRead(100);
882 GRESBStatusQuery_SOCKET->waitForReadyRead(100);
777 if(statusQueryTimeout.elapsed()>1000)
883 if(statusQueryTimeout.elapsed()>1000)
778 {
884 {
779 console_message.sprintf("GRESBStatusQueryRequest / LinkStatistics => error timeout bytesAvailable()\n");
885 console_message.sprintf("GRESBStatusQueryRequest / LinkStatistics => error timeout bytesAvailable()\n");
780 APPENDTOLOG(console_message);
886 APPENDTOLOG(console_message);
781 return 1;
887 return 1;
782 }
888 }
783 }
889 }
784 GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatisticsReply), sizeof(linkStatisticsReply));
890 GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatisticsReply), sizeof(linkStatisticsReply));
785 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataTransmitted));
891 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataTransmitted));
786 UI->spwLinkStatusEnquiry->statusQueryTable->item(9, link)->setText(console_message);
892 UI->spwLinkStatusEnquiry->statusQueryTable->item(9, link)->setText(console_message);
787 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsTransmitted));
893 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsTransmitted));
788 UI->spwLinkStatusEnquiry->statusQueryTable->item(8, link)->setText(console_message);
894 UI->spwLinkStatusEnquiry->statusQueryTable->item(8, link)->setText(console_message);
789 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfTruncatedPacketsReceived));
895 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfTruncatedPacketsReceived));
790 UI->spwLinkStatusEnquiry->statusQueryTable->item(6, link)->setText(console_message);
896 UI->spwLinkStatusEnquiry->statusQueryTable->item(6, link)->setText(console_message);
791 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsWithEEPReceived));
897 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsWithEEPReceived));
792 UI->spwLinkStatusEnquiry->statusQueryTable->item(5, link)->setText(console_message);
898 UI->spwLinkStatusEnquiry->statusQueryTable->item(5, link)->setText(console_message);
793 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataReceived));
899 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataReceived));
794 UI->spwLinkStatusEnquiry->statusQueryTable->item(4, link)->setText(console_message);
900 UI->spwLinkStatusEnquiry->statusQueryTable->item(4, link)->setText(console_message);
795 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsReceived));
901 console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsReceived));
796 UI->spwLinkStatusEnquiry->statusQueryTable->item(3, link)->setText(console_message);
902 UI->spwLinkStatusEnquiry->statusQueryTable->item(3, link)->setText(console_message);
797 break;
903 break;
798 }
904 }
799 case NodeAddressStatistics:
905 case NodeAddressStatistics:
800 {
906 {
801 break;
907 break;
802 }
908 }
803 case GetRoute:
909 case GetRoute:
804 {
910 {
805 break;
911 break;
806 }
912 }
807 }
913 }
808 return 0;
914 return 0;
809 }
915 }
810
916
811 int rmapplugin::charTab_TO_int(char *charTab)
917 int rmapplugin::charTab_TO_int(char *charTab)
812 {
918 {
813 int result = 0;
919 int result = 0;
814 result = (charTab[0]<<24) +(charTab[1]<<16) +(charTab[2]<<8) + charTab[3];
920 result = (charTab[0]<<24) +(charTab[1]<<16) +(charTab[2]<<8) + charTab[3];
815 return result;
921 return result;
816 }
922 }
817
923
924 void rmapplugin::gresbSelection(bool flag)
925 {
926 if (flag == true) UI->selection_GROUPBOX->setEnabled(false);
927 if (flag == false) UI->selection_GROUPBOX->setEnabled(true);
928 }
929
930 // SLOTS
931 void rmapplugin::bridgeHasChanged(selectedBridge bridge)
932 {
933 currentBridge = bridge;
934 }
935
936
@@ -1,95 +1,109
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the LPPMON Software
2 -- This file is a part of the LPPMON Software
3 -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS
3 -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #ifndef DRIVER1_H
22 #ifndef DRIVER1_H
23 #define DRIVER1_H
23 #define DRIVER1_H
24 #include <rmappluginui.h>
24 #include <rmappluginui.h>
25 #include <rmapoperations.h>
25 #include <rmapoperations.h>
26 #include <QMenuBar>
26 #include <QMenuBar>
27 #include <QMenu>
27 #include <QMenu>
28 #include <QAction>
28 #include <QAction>
29 #include <QMainWindow>
29 #include <QMainWindow>
30 #include <QTcpSocket>
30 #include <QTcpSocket>
31 #include <QTime>
31 #include <QTime>
32 #include <ccsds.h>
32 #include <ccsds.h>
33 #include <QSemaphore>
33 #include <QSemaphore>
34 #include <spwpacketreceiver.h>
34 #include <spwpacketreceiver.h>
35
35
36 #include <lppmonplugin.h>
36 #include <lppmonplugin.h>
37
37
38 #define APPENDTOLOG(message) this->UI->appendToLogFile(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": " + message)
38 #define APPENDTOLOG(message) this->UI->appendToLogFile(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": " + message)
39
39
40 #define READ_WRITE_MAX_COUNTS 4096 // in words
40 #define READ_WRITE_MAX_COUNTS 4096 // in words
41 #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_MAX_DATA_LENGTH 4*READ_WRITE_MAX_COUNTS // in bytes, shall be lower than the limit size of SPW packet of the GRESB bridge
42 #define RMAP_READ_REPLY_HEADER_LENGTH 12 // in bytes => ECSS
42 #define RMAP_READ_REPLY_HEADER_LENGTH 12 // in bytes => ECSS
43 #define RMAP_READ_COMMAND_HEADER_LENGTH 16 // in bytes => ECSS
43 #define RMAP_READ_COMMAND_HEADER_LENGTH 16 // in bytes => ECSS
44 #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS
44 #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS
45 #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification
45 #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification
46
46
47 class rmapplugin : public lppmonplugin
47 class rmapplugin : public lppmonplugin
48 {
48 {
49 Q_OBJECT
49 Q_OBJECT
50 public:
50 public:
51 explicit rmapplugin(QWidget *parent = 0);
51 explicit rmapplugin(QWidget *parent = 0);
52 ~rmapplugin();
52 ~rmapplugin();
53 int GRESBStatusQueryRequest(GresbStatusQueryOption option, char link);
53 int GRESBStatusQueryRequest(GresbStatusQueryOption option, char link);
54 int charTab_TO_int(char *charTab);
54 int charTab_TO_int(char *charTab);
55 unsigned int ReadGRESB(unsigned int *Value,unsigned int count,unsigned int address=0);
56 unsigned int WriteGRESB(unsigned int *Value,unsigned int count,unsigned int address=0);
57 unsigned int ReadStarDundee(unsigned int *Value, unsigned int count, unsigned int address=0);
58 unsigned int WriteStarDundee(unsigned int *Value, unsigned int count, unsigned int address=0);
55
59
56 public slots:
60 public slots:
57 unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0);
61 unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0);
58 unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0);
62 unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0);
59 //
63 //
60 unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication);
64 unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication);
61 void sendCCSDS();
65 void sendCCSDS();
62 void send_TC_LFR_UPDATE_TIME();
66 void send_TC_LFR_UPDATE_TIME();
63 void reset_TC_LFR_UPDATE_TIME();
67 void reset_TC_LFR_UPDATE_TIME();
64 int GRESBStatusQuery();
68 int GRESBStatusQuery();
65 void displayOnConsole(QString message);
69 void displayOnConsole(QString message);
66 //
70 //
67 void RMAP_CONNECT();
71 void RMAP_CONNECT();
68 void RMAP_DISCONNECT();
72 void RMAP_DISCONNECT();
73 void openBridge();
74 void closeBridge();
69 int RMAPSendReadCommand();
75 int RMAPSendReadCommand();
70 int RMAPSendWriteCommand();
76 int RMAPSendWriteCommand();
71 void reTestSPWLink();
77 void reTestSPWLink();
72 //
78 //
73 void RMAPSendConnectionState(QAbstractSocket::SocketState socketState);
79 void RMAPSendConnectionState(QAbstractSocket::SocketState socketState);
74 void RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState);
80 void RMAPReceiveConnectionState(QAbstractSocket::SocketState socketState);
75 void GRESBConnectionState(QAbstractSocket::SocketState socketState);
81 void GRESBConnectionState(QAbstractSocket::SocketState socketState);
82 //
83 void gresbSelection(bool flag);
84 void activatePluginViaStarDundee(bool flag);
85 void RMAP_write_reply_setText(QString text);
86 void appendToLog(QString text);
87 void bridgeHasChanged(selectedBridge bridge);
76
88
77 signals:
89 signals:
78 void ccsdsPacketReadyRead(char *ccsdsPacket, unsigned int size);
90 void ccsdsPacketReadyRead(char *ccsdsPacket, unsigned int size);
91 void gresbIsOpen(bool);
79
92
80 private:
93 private:
94 selectedBridge currentBridge;
81 rmapPluginUI* UI;
95 rmapPluginUI* UI;
82 QTcpSocket* GRESBStatusQuery_SOCKET;
96 QTcpSocket* GRESBStatusQuery_SOCKET;
83 QTcpSocket* RMAPSend_SOCKET;
97 QTcpSocket* RMAPSend_SOCKET;
84 QTcpSocket* RMAPReceive_SOCKET;
98 QTcpSocket* RMAPReceive_SOCKET;
85 ccsds* ccsds_command;
99 ccsds* ccsds_command;
86 unsigned int rmapPacketSize;
100 unsigned int rmapPacketSize;
87 unsigned int time_COARSE;
101 unsigned int time_COARSE;
88 unsigned int time_FINE;
102 unsigned int time_FINE;
89 spwpacketreceiver* spwPacketReceiverOBJECT;
103 spwpacketreceiver* spwPacketReceiverOBJECT;
90 unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0);
104 unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0);
91 unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0);
105 unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0);
92 char timeCode;
106 char timeCode;
93 };
107 };
94
108
95 #endif // DRIVER1_H
109 #endif // DRIVER1_H
@@ -1,69 +1,73
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
21
22 QT += network
22 QT += network
23
23
24
24
25 LIBS += ../spw_usb_driver_v2.61/lib/libSpaceWireUSBAPI.so
25 LIBS += ../spw_usb_driver_v2.61/lib/x86_64/libSpaceWireUSBAPI.so \
26 ../spw_usb_driver_v2.61/lib/x86_64/libConfigLibraryUSB.so
26
27
27
28
28 INCLUDEPATH += \
29 INCLUDEPATH += \
29 $${PWD} \
30 $${PWD} \
30 ../common_PLE \
31 ../common_PLE \
31 ../spw_usb_driver_v2.61/inc
32 ../spw_usb_driver_v2.61/inc
32
33
33
34
34 HEADERS += \
35 HEADERS += \
35 rmappluginui.h \
36 rmappluginui.h \
36 rmapplugin.h \
37 rmapplugin.h \
37 rmapoperations.h \
38 rmapoperations.h \
38 ccsds.h \
39 ccsds.h \
39 spwpacketreceiver.h \
40 spwpacketreceiver.h \
40 ../common_PLE/qipdialogbox.h \
41 ../common_PLE/qipdialogbox.h \
41 ../common_PLE/gresbstatusenquiry.h \
42 ../common_PLE/gresbstatusenquiry.h \
42 spectralmatricesdmasimulator.h \
43 spectralmatricesdmasimulator.h \
43 rmappluginpythonwrapper.h \
44 rmappluginpythonwrapper.h \
44 stardundee.h \
45 stardundee.h \
45 ../spw_usb_driver_v2.61/inc/spw_usb_api.h
46 ../spw_usb_driver_v2.61/inc/spw_usb_api.h \
47 ../spw_usb_driver_v2.61/inc/spw_config_library.h \
48 gresb.h
46
49
47
50
48 SOURCES += \
51 SOURCES += \
49 rmapplugin.cpp \
52 rmapplugin.cpp \
50 rmappluginui.cpp \
53 rmappluginui.cpp \
51 rmapoperations.cpp \
54 rmapoperations.cpp \
52 ccsds.cpp \
55 ccsds.cpp \
53 spwpacketreceiver.cpp \
56 spwpacketreceiver.cpp \
54 ../common_PLE/qipdialogbox.cpp \
57 ../common_PLE/qipdialogbox.cpp \
55 ../common_PLE/gresbstatusenquiry.cpp \
58 ../common_PLE/gresbstatusenquiry.cpp \
56 spectralmatricesdmasimulator.cpp \
59 spectralmatricesdmasimulator.cpp \
57 rmappluginpythonwrapper.cpp \
60 rmappluginpythonwrapper.cpp \
58 stardundee.cpp
61 stardundee.cpp \
62 gresb.cpp
59
63
60
64
61
65
62
66
63
67
64
68
65
69
66
70
67
71
68
72
69
73
@@ -1,240 +1,323
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 QWidget* spwTabWidgetPage5 = new QWidget;
34 QWidget* spwTabWidgetPage5 = new QWidget;
35 bridgeWidget = new QWidget;
35 mainLayout = new QVBoxLayout;
36 mainLayout = new QVBoxLayout;
36 connectionLayout = new QGridLayout;
37 connectionLayout = new QGridLayout;
37 ccsdsLayout = new QVBoxLayout;
38 ccsdsLayout = new QVBoxLayout;
38 consoleLayout = new QVBoxLayout;
39 consoleLayout = new QVBoxLayout;
40 selectionLayout = new QVBoxLayout;
41 bridgeSelection_LAYOUT = new QGridLayout;
42 generalParameters_LAYOUT = new QGridLayout;
43
44 gresb_GROUPBOX = new QGroupBox(tr("GRESB bridge parameters"));
45 stardundee_GROUPBOX = new QGroupBox(tr("Star Dundee brick parameters"));
46 selection_GROUPBOX = new QGroupBox(tr("Bridge selection"));
47 generalParameters_GROUPBOX = new QGroupBox(tr("General parameters"));
39
48
40 //*** QLABEL ***//
49 //*** QLABEL ***//
41 gresbBridgeIPLabel = new QLabel(tr("GRESB Bridge IP: "));
50 gresbBridgeIPLabel = new QLabel(tr("GRESB Bridge IP: "));
42 gresbVirtualLinkLabel = new QLabel(tr("GRESB Virtual Link: "));
51 gresbVirtualLinkLabel = new QLabel(tr("GRESB Virtual Link: "));
43 spwLinkLabel = new QLabel(tr("GRESB SPW Link: "));
52 spwLinkLabel = new QLabel(tr("GRESB SPW Link: "));
44 rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: "));
53 rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: "));
45 rmapTargetLogicalAddressLabel = new QLabel(tr("RMAP Target Logical Address: "));
54 rmapTargetLogicalAddressLabel = new QLabel(tr("RMAP Target Logical Address: "));
46 rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection"));
55 rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection"));
47 rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection"));
56 rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection"));
48 logFileName = new QLabel;
57 logFileName = new QLabel;
49 gresbStatusQueryLabel = new QLabel(tr("GRESB status query socket (port 3010): waiting for connection"));
58 gresbStatusQueryLabel = new QLabel(tr("GRESB status query socket (port 3010): waiting for connection"));
50 gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running"));
59 gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running"));
51 sendCCSDSCommandLabel = new QLabel(tr("Address of the target"));
60 sendCCSDSCommandLabel = new QLabel(tr("Address of the target"));
52
61
53 //*** QPUSHBUTTON ***//
62 //*** QPUSHBUTTON ***//
54 rmapOpenCommunicationButton = new QPushButton(tr("Open RMAP Communication"));
63 rmapOpenCommunicationButton = new QPushButton(tr("Open RMAP Communication"));
55 rmapCloseCommunicationButton = new QPushButton(tr("Close RMAP Communication"));
64 rmapCloseCommunicationButton = new QPushButton(tr("Close RMAP Communication"));
65 rmapOpenCommunicationButton->setEnabled(false);
56 rmapCloseCommunicationButton->setEnabled(false);
66 rmapCloseCommunicationButton->setEnabled(false);
57 logFileChooseButton = new QPushButton(tr("Choose file"));
67 logFileChooseButton = new QPushButton(tr("Choose file"));
58 gresbStatusQueryRetryButton = new QPushButton(tr("Retry"));
68 gresbStatusQueryRetryButton = new QPushButton(tr("Retry"));
59 gresbStatusQueryAbortButton = new QPushButton(tr("Abort"));
69 gresbStatusQueryAbortButton = new QPushButton(tr("Abort"));
60 sendCCSDSCommandButton = new QPushButton(tr("Send CCSDS Command"));
70 sendCCSDSCommandButton = new QPushButton(tr("Send CCSDS Command"));
61 send_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("Send TC_LFR_UPDATE_TIME Packet"));
71 send_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("Send TC_LFR_UPDATE_TIME Packet"));
62 reset_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("reset the TC_LFR_UPDATE_TIME Packet coarse and fine times"));
72 reset_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("reset the TC_LFR_UPDATE_TIME Packet coarse and fine times"));
63 clearConsoleButton = new QPushButton(tr("Clear"));
73 clearConsoleButton = new QPushButton(tr("Clear"));
64
74
75 selectGRESB_BUTTON = new QRadioButton(tr("GRESB"));
76 selectStarDundee_BUTTON = new QRadioButton(tr("Star Dundee"));
77
65 //*** SPINBOX ***//
78 //*** SPINBOX ***//
66 gresbVirtualLinkSpinBox = new QSpinBox;
79 gresbVirtualLinkSpinBox = new QSpinBox;
67 rmapSourceLogicalAddressSpinBox = new QSpinBox;
80 rmapSourceLogicalAddressSpinBox = new QSpinBox;
68 rmapTargetLogicalAddressSpinBox = new QSpinBox;
81 rmapTargetLogicalAddressSpinBox = new QSpinBox;
69 spwLinkSpinBox = new QSpinBox;;
82 spwLinkSpinBox = new QSpinBox;;
70 CCSDSTargetLogicalAddressSpinBox = new QSpinBox;
83 CCSDSTargetLogicalAddressSpinBox = new QSpinBox;
71 gresbVirtualLinkSpinBox->setRange(0, 4);
84 gresbVirtualLinkSpinBox->setRange(0, 4);
72 gresbVirtualLinkSpinBox->setValue(1);
85 gresbVirtualLinkSpinBox->setValue(1);
73 rmapSourceLogicalAddressSpinBox->setRange(0, 255);
86 rmapSourceLogicalAddressSpinBox->setRange(0, 255);
74 rmapSourceLogicalAddressSpinBox->setValue(33);
87 rmapSourceLogicalAddressSpinBox->setValue(33);
75 rmapTargetLogicalAddressSpinBox->setRange(0, 255);
88 rmapTargetLogicalAddressSpinBox->setRange(0, 255);
76 rmapTargetLogicalAddressSpinBox->setValue(254);
89 rmapTargetLogicalAddressSpinBox->setValue(254);
77 spwLinkSpinBox->setRange(0, 2);
90 spwLinkSpinBox->setRange(0, 2);
78 spwLinkSpinBox->setValue(0);
91 spwLinkSpinBox->setValue(0);
79 CCSDSTargetLogicalAddressSpinBox->setRange(0,255);
92 CCSDSTargetLogicalAddressSpinBox->setRange(0,255);
80 CCSDSTargetLogicalAddressSpinBox->setValue(254);
93 CCSDSTargetLogicalAddressSpinBox->setValue(254);
81
94
82 //*** MISC **//
95 //*** MISC **//
83 starDundee = new StarDundee;
96 starDundee = new StarDundee;
97 gresbBridge = new gresb;
84 console = new QTextEdit;
98 console = new QTextEdit;
85 gresbBridgeIPDialogBox = new QIPDialogBox;
99 gresbBridgeIPDialogBox = new QIPDialogBox;
86 gresbStatusQueryDialog = new QDialog;
100 gresbStatusQueryDialog = new QDialog;
87 logEnableCheckBox = new QCheckBox(tr("Enable Logs"));
101 logEnableCheckBox = new QCheckBox(tr("Enable Logs"));
88 RMAP_write_verify = new QCheckBox(tr("data checked before write\nlimited to 4 bytes\nNOT IMPLEMENTED"));
102 RMAP_write_verify = new QCheckBox(tr("data checked before write\nlimited to 4 bytes\nNOT IMPLEMENTED"));
89 RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable"));
103 RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable"));
90 spwLinkStatusEnquiry = new gresbStatusEnquiry;
104 spwLinkStatusEnquiry = new gresbStatusEnquiry;
91 logFile = new QFile();
105 logFile = new QFile();
92
106
93 logFileEn = false;
107 logFileEn = false;
94
108
95 connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0);
109 connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0);
96 connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0);
110 connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0);
97 connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0);
111 connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0);
98 connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0);
112 connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0);
99 connectionLayout->addWidget(rmapSourceLogicalAddressLabel, 2, 0, 0);
113 connectionLayout->addWidget(spwLinkLabel, 2, 0, 0);
100 connectionLayout->addWidget(rmapSourceLogicalAddressSpinBox, 2, 1, 0);
114 connectionLayout->addWidget(spwLinkSpinBox, 2, 1, 0);
101 connectionLayout->addWidget(spwLinkLabel, 3, 0, 0);
115 connectionLayout->addWidget(rmapSourceLogicalAddressLabel, 3, 0, 0);
102 connectionLayout->addWidget(spwLinkSpinBox, 3, 1, 0);
116 connectionLayout->addWidget(rmapSourceLogicalAddressSpinBox, 3, 1, 0);
103 connectionLayout->addWidget(rmapTargetLogicalAddressLabel, 4, 0, 0);
117 connectionLayout->addWidget(rmapSendStateLabel, 4, 0, 1, 2);
104 connectionLayout->addWidget(rmapTargetLogicalAddressSpinBox, 4, 1, 0);
118 connectionLayout->addWidget(rmapReceiveStateLabel, 5, 0, 1, 2);
105 connectionLayout->addWidget(rmapOpenCommunicationButton, 5, 0, 1, 2);
119 connectionLayout->addWidget(gresbStatusQueryLabel, 6, 0, 1, 2);
106 connectionLayout->addWidget(rmapCloseCommunicationButton, 6, 0, 1, 2);
120
107 connectionLayout->addWidget(rmapSendStateLabel, 7, 0, 1, 2);
121 connectionLayout->setRowStretch(7, 1);
108 connectionLayout->addWidget(rmapReceiveStateLabel, 8, 0, 1, 2);
122 connectionLayout->setColumnStretch(2, 1);
109 connectionLayout->addWidget(gresbStatusQueryLabel, 9, 0, 1, 2);
123
110 connectionLayout->addWidget(logEnableCheckBox, 10, 0, 0);
124 bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1);
111 connectionLayout->addWidget(logFileChooseButton, 10, 1, 0);
125 bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1);
112 connectionLayout->addWidget(RMAP_write_verify, 11, 0, 1, 2);
126 bridgeSelection_LAYOUT->setRowStretch(1, 1);
113 connectionLayout->addWidget(RMAP_write_reply, 12, 0, 1, 2);
127 bridgeSelection_LAYOUT->setColumnStretch(2, 1);
114
128
115 connectionLayout->setRowStretch(13, 1);
129 generalParameters_LAYOUT->addWidget(logEnableCheckBox, 0, 0, 1, 1);
116 connectionLayout->setColumnStretch(2, 1);
130 generalParameters_LAYOUT->addWidget(logFileChooseButton, 0, 1, 1, 1);
131 generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressLabel, 1, 0, 0);
132 generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressSpinBox, 1, 1, 0);
133 generalParameters_LAYOUT->addWidget(rmapOpenCommunicationButton, 2, 0, 1, 2);
134 generalParameters_LAYOUT->addWidget(rmapCloseCommunicationButton, 3, 0, 1, 2);
135 generalParameters_LAYOUT->addWidget(RMAP_write_verify, 4, 0, 1, 2);
136 generalParameters_LAYOUT->addWidget(RMAP_write_reply, 5, 0, 1, 2);
137 generalParameters_LAYOUT->setRowStretch(6, 1);
138 generalParameters_LAYOUT->setColumnStretch(2, 1);
139
140 gresb_GROUPBOX->setLayout(connectionLayout);
141 gresb_GROUPBOX->setVisible(false);
142 stardundee_GROUPBOX->setLayout(starDundee->layout());
143 stardundee_GROUPBOX->setVisible(false);
144 selection_GROUPBOX->setLayout(bridgeSelection_LAYOUT);
145 generalParameters_GROUPBOX->setLayout(generalParameters_LAYOUT);
146 selectionLayout->addWidget(selection_GROUPBOX);
147 selectionLayout->addWidget(generalParameters_GROUPBOX);
148 selectionLayout->addWidget(gresb_GROUPBOX);
149 selectionLayout->addWidget(stardundee_GROUPBOX);
117
150
118 ccsdsLayout->addWidget(sendCCSDSCommandButton);
151 ccsdsLayout->addWidget(sendCCSDSCommandButton);
119 ccsdsLayout->addWidget(send_TC_LFR_UPDATE_TIME_Button);
152 ccsdsLayout->addWidget(send_TC_LFR_UPDATE_TIME_Button);
120 ccsdsLayout->addWidget(reset_TC_LFR_UPDATE_TIME_Button);
153 ccsdsLayout->addWidget(reset_TC_LFR_UPDATE_TIME_Button);
121 ccsdsLayout->addWidget(sendCCSDSCommandLabel);
154 ccsdsLayout->addWidget(sendCCSDSCommandLabel);
122 ccsdsLayout->addWidget(CCSDSTargetLogicalAddressSpinBox);
155 ccsdsLayout->addWidget(CCSDSTargetLogicalAddressSpinBox);
123
156
124 consoleLayout->addWidget(console);
157 consoleLayout->addWidget(console);
125 consoleLayout->addWidget(clearConsoleButton);
158 consoleLayout->addWidget(clearConsoleButton);
126
159
127 connect(this->logFileChooseButton, SIGNAL(clicked()), this, SLOT(chooseLogFile()));
160 connect(this->logFileChooseButton, SIGNAL(clicked()), this, SLOT(chooseLogFile()));
128 connect(this, SIGNAL(setLogFileName(QString)), this->logFileName, SLOT(setText(QString)));
161 connect(this, SIGNAL(setLogFileName(QString)), this->logFileName, SLOT(setText(QString)));
129 connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int)));
162 connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int)));
130
163
131 spwTabWidget->addTab(spwTabWidgetPage0, tr("connection"));
164 spwTabWidget->addTab(spwTabWidgetPage0, tr("connection"));
132 spwTabWidget->addTab(spwTabWidgetPage1, tr("ccsds"));
165 spwTabWidget->addTab(spwTabWidgetPage1, tr("ccsds"));
133 spwTabWidget->addTab(spwTabWidgetPage2, tr("status"));
166 spwTabWidget->addTab(spwTabWidgetPage2, tr("status"));
134 spwTabWidget->addTab(spwTabWidgetPage3, tr("console"));
167 spwTabWidget->addTab(spwTabWidgetPage3, tr("console"));
135 spwTabWidget->addTab(spwTabWidgetPage4, tr("DMA"));
168 spwTabWidget->addTab(spwTabWidgetPage4, tr("DMA"));
136 spwTabWidget->addTab(spwTabWidgetPage5, tr("Star Dundee"));
169 spwTabWidget->addTab(spwTabWidgetPage5, tr("gresb"));
137 spwTabWidgetPage0->setLayout(connectionLayout);
170
171 spwTabWidgetPage0->setLayout(selectionLayout);
138 spwTabWidgetPage1->setLayout(ccsdsLayout);
172 spwTabWidgetPage1->setLayout(ccsdsLayout);
139 spwTabWidgetPage2->setLayout(this->spwLinkStatusEnquiry->mainLayout);
173 spwTabWidgetPage2->setLayout(this->spwLinkStatusEnquiry->mainLayout);
140 spwTabWidgetPage3->setLayout(consoleLayout);
174 spwTabWidgetPage3->setLayout(consoleLayout);
141 spwTabWidgetPage4->setLayout(spectralMatricesDMASimulator->mainLayout);
175 spwTabWidgetPage4->setLayout(spectralMatricesDMASimulator->mainLayout);
142 spwTabWidgetPage5->setLayout(starDundee->layout());
176 spwTabWidgetPage5->setLayout(gresbBridge->layout());
143 mainLayout->addWidget(spwTabWidget);
177 mainLayout->addWidget(spwTabWidget);
144 setLayout(mainLayout);
178 setLayout(mainLayout);
145
179
146 // GRESB STATUS QUERY DIALOG
180 // GRESB STATUS QUERY DIALOG
147 gresbStatusQueryDialogLayout = new QGridLayout;
181 gresbStatusQueryDialogLayout = new QGridLayout;
148 gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryDialogLabel, 0, 0, 1, 2);
182 gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryDialogLabel, 0, 0, 1, 2);
149 gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryRetryButton, 1, 0, 0);
183 gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryRetryButton, 1, 0, 0);
150 gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryAbortButton, 1, 1, 0);
184 gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryAbortButton, 1, 1, 0);
151 gresbStatusQueryDialog->setLayout(gresbStatusQueryDialogLayout);
185 gresbStatusQueryDialog->setLayout(gresbStatusQueryDialogLayout);
152
186
153 connect(gresbStatusQueryAbortButton, SIGNAL(clicked()), gresbStatusQueryDialog, SLOT(reject()));
187 connect(gresbStatusQueryAbortButton, SIGNAL(clicked()), gresbStatusQueryDialog, SLOT(reject()));
154 connect(this->clearConsoleButton, SIGNAL(clicked()), this->console, SLOT(clear()));
188 connect(this->clearConsoleButton, SIGNAL(clicked()), this->console, SLOT(clear()));
189 connect(this->selectGRESB_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee()));
190 connect(this->selectStarDundee_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee()));
191 connect(this->starDundee, SIGNAL(starDundeeIsOpen(bool)), this, SLOT(starDundeeIsOpen(bool)));
192
193 // command code
194 connect(this->RMAP_write_reply, SIGNAL(clicked()), this, SLOT(getCommandCode()));
195 connect(this->RMAP_write_verify, SIGNAL(clicked()), this, SLOT(getCommandCode()));
196 connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), this->starDundee, SLOT(updateCommandCode(RMAP_command_codes)));
197
198 getCommandCode(); // init the command code value
155 }
199 }
156
200
157 void rmapPluginUI::connectPort()
201 void rmapPluginUI::connectPort()
158 {
202 {
159 //emit this->connectPortsig(ui->PortName->text(),ui->PortspeedSlider->value());
203 //emit this->connectPortsig(ui->PortName->text(),ui->PortspeedSlider->value());
160 }
204 }
161
205
162 void rmapPluginUI::setConnected(bool connected)
206 void rmapPluginUI::setConnected(bool connected)
163 {
207 {
164 /*if(connected == true)
208 /*if(connected == true)
165 {
209 {
166 ui->OpenPort->setText(tr("Close port"));
210 ui->OpenPort->setText(tr("Close port"));
167 }
211 }
168 else
212 else
169 ui->OpenPort->setText(tr("Open port"));*/
213 ui->OpenPort->setText(tr("Open port"));*/
170 }
214 }
171
215
172
173 rmapPluginUI::~rmapPluginUI()
216 rmapPluginUI::~rmapPluginUI()
174 {
217 {
175 //delete ui;
218 //delete ui;
176 }
219 }
177
220
178 void rmapPluginUI::chooseLogFile()
221 void rmapPluginUI::chooseLogFile()
179 {
222 {
180 if(this->logFile->isOpen())
223 if(this->logFile->isOpen())
181 this->logFile->close();
224 this->logFile->close();
182 this->logFile->setFileName(QFileDialog::getSaveFileName(this,tr("Open Log file"),
225 this->logFile->setFileName(QFileDialog::getSaveFileName(this,tr("Open Log file"),
183 QDir::homePath()
226 QDir::homePath()
184 + "/"
227 + "/"
185 + QDate::currentDate().toString()
228 + QDate::currentDate().toString()
186 + "_"
229 + "_"
187 + QTime::currentTime().toString()
230 + QTime::currentTime().toString()
188 + "_rmapPluginUI.log",
231 + "_rmapPluginUI.log",
189 tr("Log Files (*.txt *.log)")));
232 tr("Log Files (*.txt *.log)")));
190 if(this->logFile->open(QIODevice::WriteOnly))
233 if(this->logFile->open(QIODevice::WriteOnly))
191 {
234 {
192 this->logFileStrm = new QTextStream(this->logFile);
235 this->logFileStrm = new QTextStream(this->logFile);
193 emit this->setLogFileName(this->logFile->fileName());
236 emit this->setLogFileName(this->logFile->fileName());
194 }
237 }
195 }
238 }
196
239
197 void rmapPluginUI::logFileEnDisable(int state)
240 void rmapPluginUI::logFileEnDisable(int state)
198 {
241 {
199 if(state==Qt::Checked)
242 if(state==Qt::Checked)
200 {
243 {
201 this->logFileEn = true;
244 this->logFileEn = true;
202 }
245 }
203 else if(state==Qt::Unchecked)
246 else if(state==Qt::Unchecked)
204 {
247 {
205 this->logFileEn = false;
248 this->logFileEn = false;
206 }
249 }
207 }
250 }
208
251
209 bool rmapPluginUI::islogfileenable()
252 bool rmapPluginUI::islogfileenable()
210 {
253 {
211 return this->logFileEn;
254 return this->logFileEn;
212 }
255 }
213
256
214 void rmapPluginUI::appendToLogFile(const QString & text)
257 void rmapPluginUI::appendToLogFile(const QString & text)
215 {
258 {
216 if(this->logFileEn && this->logFile->isOpen())
259 if(this->logFileEn && this->logFile->isOpen())
217 {
260 {
218 *(this->logFileStrm) << text << endl;
261 *(this->logFileStrm) << text << endl;
219 }
262 }
220 }
263 }
221
264
222 void rmapPluginUI::closeEvent(QCloseEvent *event)
265 void rmapPluginUI::closeEvent(QCloseEvent *event)
223 {
266 {
224 if(this->logFile->isOpen())
267 if(this->logFile->isOpen())
225 {
268 {
226 this->logFileStrm->flush();
269 this->logFileStrm->flush();
227 this->logFile->waitForBytesWritten(3000);
270 this->logFile->waitForBytesWritten(3000);
228 this->logFile->close();
271 this->logFile->close();
229 }
272 }
230 event->accept();
273 event->accept();
231 }
274 }
232
275
233 RMAP_command_codes rmapPluginUI::getCommandCode()
276 RMAP_command_codes rmapPluginUI::getCommandCode()
234 {
277 {
235 if (RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) return writeSingle_ver_rep;
278 RMAP_command_codes commandCode = invalid0;
236 if (RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) return writeSingle_ver_noRep;
279 if (RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_rep;
237 if (!RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) return writeSingle_noVer_Rep;
280 if (RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_noRep;
238 if (!RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) return writeSingle_noVer_noRep;
281 if (!RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_Rep;
239 else return invalid0;
282 if (!RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_noRep;
283 emit commandCodeHasChanged(commandCode);
284 return commandCode;
240 }
285 }
286
287 // SLOT
288
289 void rmapPluginUI::selectionBetweenGresbAndStarDundee() //SLOT
290 {
291 if (selectGRESB_BUTTON->isChecked())
292 {
293 gresb_GROUPBOX->setVisible(true);
294 stardundee_GROUPBOX->setVisible(false);
295 rmapOpenCommunicationButton->setEnabled(true);
296 emit bridgeHasChanged(selectedBridgeIsGRESB);
297 }
298 if (selectStarDundee_BUTTON->isChecked())
299 {
300 stardundee_GROUPBOX->setVisible(true);
301 gresb_GROUPBOX->setVisible(false);
302 rmapOpenCommunicationButton->setEnabled(true);
303 emit bridgeHasChanged(selectedBridgeIsStarDundee);
304 }
305 }
306
307 void rmapPluginUI::starDundeeIsOpen(bool flag)
308 {
309 if (flag == true)
310 {
311 selection_GROUPBOX->setEnabled(false);
312 this->rmapOpenCommunicationButton->setEnabled(false);
313 this->rmapCloseCommunicationButton->setEnabled(true);
314 }
315 if (flag == false)
316 {
317 selection_GROUPBOX->setEnabled(true);
318 this->rmapOpenCommunicationButton->setEnabled(true);
319 this->rmapCloseCommunicationButton->setEnabled(false);
320 }
321 }
322
323
@@ -1,129 +1,160
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>
46 #include <QRadioButton>
47 #include <QGroupBox>
48
49 enum selectedBridge{
50 selectedBridgeIsUnknown,
51 selectedBridgeIsGRESB,
52 selectedBridgeIsStarDundee
53 };
45
54
46 class rmapPluginUI : public QWidget
55 class rmapPluginUI : public QWidget
47 {
56 {
48 Q_OBJECT
57 Q_OBJECT
49
58
50 public:
59 public:
51 explicit rmapPluginUI(QWidget *parent = 0);
60 explicit rmapPluginUI(QWidget *parent = 0);
52 ~rmapPluginUI();
61 ~rmapPluginUI();
53
62
54 QPushButton* rmapOpenCommunicationButton;
63 QPushButton* rmapOpenCommunicationButton;
55 QPushButton* rmapCloseCommunicationButton;
64 QPushButton* rmapCloseCommunicationButton;
56 QPushButton* logFileChooseButton;
65 QPushButton* logFileChooseButton;
57 QPushButton* gresbStatusQueryRetryButton;
66 QPushButton* gresbStatusQueryRetryButton;
58 QPushButton* gresbStatusQueryAbortButton;
67 QPushButton* gresbStatusQueryAbortButton;
59 QPushButton* sendCCSDSCommandButton;
68 QPushButton* sendCCSDSCommandButton;
60 QPushButton* send_TC_LFR_UPDATE_TIME_Button;
69 QPushButton* send_TC_LFR_UPDATE_TIME_Button;
61 QPushButton* reset_TC_LFR_UPDATE_TIME_Button;
70 QPushButton* reset_TC_LFR_UPDATE_TIME_Button;
62 QPushButton* clearConsoleButton;
71 QPushButton* clearConsoleButton;
63
72
73 QRadioButton* selectGRESB_BUTTON;
74 QRadioButton* selectStarDundee_BUTTON;
75
76 QGroupBox *selection_GROUPBOX;
77
64 QSpinBox* gresbVirtualLinkSpinBox;
78 QSpinBox* gresbVirtualLinkSpinBox;
65 QSpinBox* spwLinkSpinBox;
79 QSpinBox* spwLinkSpinBox;
66 QSpinBox* rmapSourceLogicalAddressSpinBox;
80 QSpinBox* rmapSourceLogicalAddressSpinBox;
67 QSpinBox* rmapTargetLogicalAddressSpinBox;
81 QSpinBox* rmapTargetLogicalAddressSpinBox;
68 QSpinBox* CCSDSTargetLogicalAddressSpinBox;
82 QSpinBox* CCSDSTargetLogicalAddressSpinBox;
69
83
70 QIPDialogBox* gresbBridgeIPDialogBox;
84 QIPDialogBox* gresbBridgeIPDialogBox;
71
85
72 QCheckBox *logEnableCheckBox;
86 QCheckBox *logEnableCheckBox;
73 QCheckBox *RMAP_write_verify;
87 QCheckBox *RMAP_write_verify;
74 QCheckBox *RMAP_write_reply;
88 QCheckBox *RMAP_write_reply;
75
89
76 QLabel* rmapSendStateLabel;
90 QLabel* rmapSendStateLabel;
77 QLabel* rmapReceiveStateLabel;
91 QLabel* rmapReceiveStateLabel;
78 QLabel* gresbStatusQueryLabel;
92 QLabel* gresbStatusQueryLabel;
79 QLabel* gresbStatusQueryDialogLabel;
93 QLabel* gresbStatusQueryDialogLabel;
80 QLabel* sendCCSDSCommandLabel;
94 QLabel* sendCCSDSCommandLabel;
81
95
82 QDialog* gresbStatusQueryDialog;
96 QDialog* gresbStatusQueryDialog;
83
97
84 gresbStatusEnquiry* spwLinkStatusEnquiry;
98 gresbStatusEnquiry* spwLinkStatusEnquiry;
85
99
86 SpectralMatricesDMASimulator *spectralMatricesDMASimulator;
100 SpectralMatricesDMASimulator *spectralMatricesDMASimulator;
87
101
88 QTextEdit* console;
102 QTextEdit* console;
89
103
90 StarDundee *starDundee;
104 StarDundee *starDundee;
91
105
106 gresb *gresbBridge;
107
92 bool islogfileenable();
108 bool islogfileenable();
93 void appendToLogFile(const QString & text);
109 void appendToLogFile(const QString & text);
94 void closeEvent(QCloseEvent *event);
110 void closeEvent(QCloseEvent *event);
95 RMAP_command_codes getCommandCode();
96
111
97 public slots:
112 public slots:
98 void setConnected(bool connected);
113 void setConnected(bool connected);
99 void connectPort();
114 void connectPort();
100 void chooseLogFile();
115 void chooseLogFile();
101 void logFileEnDisable(int state);
116 void logFileEnDisable(int state);
117 RMAP_command_codes getCommandCode();
118
119 private slots:
120 void selectionBetweenGresbAndStarDundee();
121 void starDundeeIsOpen(bool flag);
102
122
103 signals:
123 signals:
104 void connectPortsig(QString PortName,int baudrate);
124 void connectPortsig(QString PortName,int baudrate);
105 void setLogFileName(QString FileName);
125 void setLogFileName(QString FileName);
126 void commandCodeHasChanged(RMAP_command_codes commandCode);
127 void bridgeHasChanged(selectedBridge bridge);
106
128
107 private:
129 private:
108 QLabel* gresbBridgeIPLabel;
130 QLabel *gresbBridgeIPLabel;
109 QLabel* gresbVirtualLinkLabel;
131 QLabel *gresbVirtualLinkLabel;
110 QLabel* spwLinkLabel;
132 QLabel *spwLinkLabel;
111 QLabel* rmapSourceLogicalAddressLabel;
133 QLabel *rmapSourceLogicalAddressLabel;
112 QLabel* rmapTargetLogicalAddressLabel;
134 QLabel *rmapTargetLogicalAddressLabel;
113 QLabel *logFileName;
135 QLabel *logFileName;
114
136
115 QVBoxLayout* mainLayout;
137 QGridLayout *bridgeSelection_LAYOUT;
116 QGridLayout* connectionLayout;
138 QVBoxLayout *selectionLayout;
117 QVBoxLayout* ccsdsLayout;
139 QVBoxLayout *mainLayout;
118 QVBoxLayout* consoleLayout;
140 QGridLayout *connectionLayout;
119 QGridLayout* gresbStatusQueryDialogLayout;
141 QVBoxLayout *ccsdsLayout;
142 QVBoxLayout *consoleLayout;
143 QGridLayout *gresbStatusQueryDialogLayout;
144 QGridLayout *generalParameters_LAYOUT;
120
145
121 QTabWidget* spwTabWidget;
146 QTabWidget *spwTabWidget;
147
148 QWidget* bridgeWidget;
122
149
123 QFile* logFile;
150 QGroupBox *gresb_GROUPBOX;
124 QTextStream* logFileStrm;
151 QGroupBox *stardundee_GROUPBOX;
152 QGroupBox *generalParameters_GROUPBOX;
153
154 QFile *logFile;
155 QTextStream *logFileStrm;
125 bool logFileEn;
156 bool logFileEn;
126
157
127 };
158 };
128
159
129 #endif // RMAPPLUGINUI_H
160 #endif // RMAPPLUGINUI_H
@@ -1,129 +1,130
1 #include "spwpacketreceiver.h"
1 #include "spwpacketreceiver.h"
2 #include <QTime>
2 #include <QTime>
3 #include "rmapoperations.h"
3
4
4 spwpacketreceiver::spwpacketreceiver(QObject *parent) :
5 spwpacketreceiver::spwpacketreceiver(QObject *parent) :
5 QObject(parent)
6 QObject(parent)
6 {
7 {
7 rmapPacketSEMAPHORE = new QSemaphore;
8 rmapPacketSEMAPHORE = new QSemaphore;
8 ccsdsPacketSEMAPHORE = new QSemaphore;
9 ccsdsPacketSEMAPHORE = new QSemaphore;
9 rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH);
10 rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH);
10 ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH);
11 ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH);
11 spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) );
12 spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) );
12 connect(this, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), this, SLOT(processCCSDSPacket(unsigned char*,uint)));
13 connect(this, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), this, SLOT(processCCSDSPacket(unsigned char*,uint)));
13 }
14 }
14
15
15 spwpacketreceiver::~spwpacketreceiver()
16 spwpacketreceiver::~spwpacketreceiver()
16 {
17 {
17 free(rmapPacket);
18 free(rmapPacket);
18 free(ccsdsPacket);
19 free(ccsdsPacket);
19 free(spwPacket);
20 free(spwPacket);
20 }
21 }
21
22
22 int spwpacketreceiver::receiveSPWPacket(unsigned char requestID) // SLOT
23 int spwpacketreceiver::receiveSPWPacket(unsigned char requestID) // SLOT
23 {
24 {
24 QTime spwPacketReceiverTimeout;
25 QTime spwPacketReceiverTimeout;
25 // GRESB HEADER
26 // GRESB HEADER
26 char RES_TR_EP; // 6 bits REserved + 1 bit TRuncated + 1 bit EP error end of packet
27 char RES_TR_EP; // 6 bits REserved + 1 bit TRuncated + 1 bit EP error end of packet
27 unsigned char packetLength2;
28 unsigned char packetLength2;
28 unsigned char packetLength1;
29 unsigned char packetLength1;
29 unsigned char packetLength0;
30 unsigned char packetLength0;
30 unsigned int packetLength;
31 unsigned int packetLength;
31
32
32 if (requestID==1)
33 if (requestID==1)
33 {
34 {
34 if (rmapPacketSEMAPHORE->available()) return rmapPacketSize;
35 if (rmapPacketSEMAPHORE->available()) return rmapPacketSize;
35 }
36 }
36
37
37 gresbReceptionSocket->blockSignals(1); // block the signals of the socket during packet reception
38 gresbReceptionSocket->blockSignals(1); // block the signals of the socket during packet reception
38 // READ THE GRESB HEADER OF THE INCOMING PACKET
39 // READ THE GRESB HEADER OF THE INCOMING PACKET
39 spwPacketReceiverTimeout.start();
40 spwPacketReceiverTimeout.start();
40 while(gresbReceptionSocket->bytesAvailable() < 4)
41 while(gresbReceptionSocket->bytesAvailable() < 4)
41 {
42 {
42 gresbReceptionSocket->waitForReadyRead(100);
43 gresbReceptionSocket->waitForReadyRead(100);
43 if(spwPacketReceiverTimeout.elapsed()>1000) return -1; // ERROR === read GRSEB header TIMEOUT
44 if(spwPacketReceiverTimeout.elapsed()>1000) return -1; // ERROR === read GRSEB header TIMEOUT
44 }
45 }
45 gresbReceptionSocket->read(&RES_TR_EP, 1);
46 gresbReceptionSocket->read(&RES_TR_EP, 1);
46 gresbReceptionSocket->read( (char*) &packetLength2, 1);
47 gresbReceptionSocket->read( (char*) &packetLength2, 1);
47 gresbReceptionSocket->read( (char*) &packetLength1, 1);
48 gresbReceptionSocket->read( (char*) &packetLength1, 1);
48 gresbReceptionSocket->read( (char*) &packetLength0, 1);
49 gresbReceptionSocket->read( (char*) &packetLength0, 1);
49 packetLength = (packetLength2<<16) + (packetLength1<<8) + (packetLength0);
50 packetLength = (packetLength2<<16) + (packetLength1<<8) + (packetLength0);
50 spwPacket = (char*) malloc(packetLength);
51 spwPacket = (char*) malloc(packetLength);
51
52
52 // READ THE SPW PACKET
53 // READ THE SPW PACKET
53 while(gresbReceptionSocket->bytesAvailable() < packetLength)
54 while(gresbReceptionSocket->bytesAvailable() < packetLength)
54 {
55 {
55 gresbReceptionSocket->waitForReadyRead(100);
56 gresbReceptionSocket->waitForReadyRead(100);
56 if(spwPacketReceiverTimeout.elapsed()>1000) return -2; // ERROR === read SPW packet TIMEOUT
57 if(spwPacketReceiverTimeout.elapsed()>1000) return -2; // ERROR === read SPW packet TIMEOUT
57 }
58 }
58 gresbReceptionSocket->read( spwPacket, packetLength );
59 gresbReceptionSocket->read( spwPacket, packetLength );
59 gresbReceptionSocket->blockSignals(0);
60 gresbReceptionSocket->blockSignals(0);
60
61
61 switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet
62 switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet
62 {
63 {
63 case 1: // 0x01 is the protocole identifier for RMAP packets
64 case 1: // 0x01 is the protocole identifier for RMAP packets
64 if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet
65 if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet
65 for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i];
66 for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i];
66 rmapPacketSize = packetLength;
67 rmapPacketSize = packetLength;
67 rmapPacketSEMAPHORE->release();
68 rmapPacketSEMAPHORE->release();
68 //emit sendMessage("RMAP packet of size " + QString::number(packetLength) + " received");
69 //emit sendMessage("RMAP packet of size " + QString::number(packetLength) + " received");
69 return packetLength;
70 return packetLength;
70
71
71 case 2: // 0x02 is the protocole identifier for CCSDS packets
72 case 2: // 0x02 is the protocole identifier for CCSDS packets
72 if (ccsdsPacketSEMAPHORE->available()!=0) return -4; // ERROR === previous CCSDS packet not processed yet
73 if (ccsdsPacketSEMAPHORE->available()!=0) return -4; // ERROR === previous CCSDS packet not processed yet
73 for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i];
74 for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i];
74 ccsdsPacketSize = packetLength;
75 ccsdsPacketSize = packetLength;
75 ccsdsPacketSEMAPHORE->release();
76 ccsdsPacketSEMAPHORE->release();
76 emit(ccsdsPacketAvailable(ccsdsPacket, packetLength));
77 emit(ccsdsPacketAvailable(ccsdsPacket, packetLength));
77 return packetLength;
78 return packetLength;
78 }
79 }
79 return 0;
80 return 0;
80 }
81 }
81
82
82 bool spwpacketreceiver::isRMAPPacketSemaphoreAvailable()
83 bool spwpacketreceiver::isRMAPPacketSemaphoreAvailable()
83 {
84 {
84 if (rmapPacketSEMAPHORE->available()!=0) return true;
85 if (rmapPacketSEMAPHORE->available()!=0) return true;
85 return false;
86 return false;
86 }
87 }
87
88
88 void spwpacketreceiver::acquireRMAPSemaphore()
89 void spwpacketreceiver::acquireRMAPSemaphore()
89 {
90 {
90 rmapPacketSEMAPHORE->acquire();
91 rmapPacketSEMAPHORE->acquire();
91 }
92 }
92
93
93 void spwpacketreceiver::acquireCCSDSSemaphore()
94 void spwpacketreceiver::acquireCCSDSSemaphore()
94 {
95 {
95 ccsdsPacketSEMAPHORE->acquire();
96 ccsdsPacketSEMAPHORE->acquire();
96 }
97 }
97
98
98 void spwpacketreceiver::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size)
99 void spwpacketreceiver::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size)
99 {
100 {
100 QString message;
101 QString message;
101 unsigned int fine_time_value = 0;
102 unsigned int fine_time_value = 0;
102 fine_time_value = ((unsigned int) ccsdsPacket[7]<<24)
103 fine_time_value = ((unsigned int) ccsdsPacket[7]<<24)
103 + ((unsigned int) ccsdsPacket[6]<<16)
104 + ((unsigned int) ccsdsPacket[6]<<16)
104 + ((unsigned int) ccsdsPacket[5]<<8)
105 + ((unsigned int) ccsdsPacket[5]<<8)
105 + ((unsigned int) ccsdsPacket[4]);
106 + ((unsigned int) ccsdsPacket[4]);
106 message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": ");
107 message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": ");
107 message.append("size "
108 message.append("size "
108 + QString::number(size)
109 + QString::number(size)
109 +" *** header "
110 +" *** header "
110 + QString::number(ccsdsPacket[0], 16)
111 + QString::number(ccsdsPacket[0], 16)
111 + " "
112 + " "
112 + QString::number(ccsdsPacket[1], 16)
113 + QString::number(ccsdsPacket[1], 16)
113 + " "
114 + " "
114 + QString::number(ccsdsPacket[2], 16)
115 + QString::number(ccsdsPacket[2], 16)
115 + " "
116 + " "
116 + QString::number(ccsdsPacket[3], 16)
117 + QString::number(ccsdsPacket[3], 16)
117 + " *** coarse time "
118 + " *** coarse time "
118 + QString::number(fine_time_value));
119 + QString::number(fine_time_value));
119 //+ QString::number(ccsdsPacket[4], 16)
120 //+ QString::number(ccsdsPacket[4], 16)
120 //+" "
121 //+" "
121 //+ QString::number(ccsdsPacket[5], 16)
122 //+ QString::number(ccsdsPacket[5], 16)
122 //+" "
123 //+" "
123 //+ QString::number(ccsdsPacket[6], 16)
124 //+ QString::number(ccsdsPacket[6], 16)
124 //+" "
125 //+" "
125 //+ QString::number(ccsdsPacket[7], 16));
126 //+ QString::number(ccsdsPacket[7], 16));
126 ccsdsPacketSEMAPHORE->acquire();
127 ccsdsPacketSEMAPHORE->acquire();
127 emit sendMessage(message);
128 emit sendMessage(message);
128 }
129 }
129
130
@@ -1,44 +1,36
1 #ifndef SPWPACKETRECEIVER_H
1 #ifndef SPWPACKETRECEIVER_H
2 #define SPWPACKETRECEIVER_H
2 #define SPWPACKETRECEIVER_H
3
3
4 #include <QSemaphore>
4 #include <QSemaphore>
5 #include <QTcpSocket>
5 #include <QTcpSocket>
6
6
7 #define READ_WRITE_MAX_COUNTS 4096 // in words
8 #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
9 #define RMAP_READ_REPLY_HEADER_LENGTH 12 // in bytes => ECSS
10 #define RMAP_READ_COMMAND_HEADER_LENGTH 16 // in bytes => ECSS
11 #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS
12 #define RMAP_MAX_PACKET_LENGTH RMAP_READ_REPLY_HEADER_LENGTH + RMAP_MAX_DATA_LENGTH + RMAP_DATA_CRC_LENGTH
13 #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification
14
15 class spwpacketreceiver : public QObject
7 class spwpacketreceiver : public QObject
16 {
8 {
17 Q_OBJECT
9 Q_OBJECT
18 public:
10 public:
19 explicit spwpacketreceiver(QObject *parent = 0);
11 explicit spwpacketreceiver(QObject *parent = 0);
20 ~spwpacketreceiver();
12 ~spwpacketreceiver();
21 int fetchRMAPPacket();
13 int fetchRMAPPacket();
22 void acquireRMAPSemaphore();
14 void acquireRMAPSemaphore();
23 void acquireCCSDSSemaphore();
15 void acquireCCSDSSemaphore();
24 bool isRMAPPacketSemaphoreAvailable();
16 bool isRMAPPacketSemaphoreAvailable();
25
17
26 unsigned char* ccsdsPacket;
18 unsigned char* ccsdsPacket;
27 char* rmapPacket;
19 char* rmapPacket;
28 char* spwPacket;
20 char* spwPacket;
29 unsigned int rmapPacketSize;
21 unsigned int rmapPacketSize;
30 unsigned int ccsdsPacketSize;
22 unsigned int ccsdsPacketSize;
31 QSemaphore* rmapPacketSEMAPHORE;
23 QSemaphore* rmapPacketSEMAPHORE;
32 QSemaphore* ccsdsPacketSEMAPHORE;
24 QSemaphore* ccsdsPacketSEMAPHORE;
33 QTcpSocket* gresbReceptionSocket;
25 QTcpSocket* gresbReceptionSocket;
34
26
35 public slots:
27 public slots:
36 int receiveSPWPacket(unsigned char requestID = 0); // request ID by default is 0 for CCSDS
28 int receiveSPWPacket(unsigned char requestID = 0); // request ID by default is 0 for CCSDS
37 void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size);
29 void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size);
38
30
39 signals:
31 signals:
40 void ccsdsPacketAvailable(unsigned char* ccsdsPacket, unsigned int size);
32 void ccsdsPacketAvailable(unsigned char* ccsdsPacket, unsigned int size);
41 void sendMessage(QString message);
33 void sendMessage(QString message);
42 };
34 };
43
35
44 #endif // SPWPACKETRECEIVER_H
36 #endif // SPWPACKETRECEIVER_H
This diff has been collapsed as it changes many lines, (506 lines changed) Show them Hide them
@@ -1,55 +1,529
1 #include "stardundee.h"
1 #include "stardundee.h"
2 #include <QTime>
3 #include <math.h>
2
4
3 StarDundee::StarDundee(QWidget *parent) :
5 StarDundee::StarDundee(QWidget *parent) :
4 QWidget(parent)
6 QWidget(parent)
5 {
7 {
8 commandCode = invalid0; // initialization of the cmmand code for the RMAP transfers
9 rmapPacket = (unsigned char*) malloc(RMAP_MAX_PACKET_LENGTH);
10
11 rmapTargetLogicalAddress = 0xfe;
12 rmapSourceLogicalAddress = 0x20;
6 connection_LAYOUT = new QGridLayout;
13 connection_LAYOUT = new QGridLayout;
7
14
8 openCommunication_BUTTON = new QPushButton(tr("Open communication link"));
15 sendPacket_BUTTON = new QPushButton(tr("Send a packet"));
9 closeCommunication_BUTTON = new QPushButton(tr("Close communication link"));
16 sendRMAPPacket_BUTTON = new QPushButton(tr("Write RMAP packet to the specified target"));
17 readRMAPPacket_BUTTON = new QPushButton(tr("Read RMAP packet from the specified target"));
18 getRoutingTableEntry_BUTTON = new QPushButton(tr("Get routing table entry (target logical address)"));
10
19
11 usbDeviceNumber_LABEL = new QLabel(tr("USB device number: "));
20 usbDeviceNumber_LABEL = new QLabel(tr("USB device number: "));
21 linkNumber_LABEL = new QLabel(tr("SpaceWire link number: "));
22 routingTableEntry_LABEL = new QLabel(tr("Target logical address: "));
23 sourceLogicalAddress_LABEL = new QLabel(tr("Source logical address: "));
12
24
13 usbDeviceNumber_SPINBOX = new QSpinBox;
25 usbDeviceNumber_SPINBOX = new QSpinBox;
14 usbDeviceNumber_SPINBOX->setRange(0,32);
26 usbDeviceNumber_SPINBOX->setRange(0,32);
15 usbDeviceNumber_SPINBOX->setValue(0);
27 usbDeviceNumber_SPINBOX->setValue(0);
28 linkNumber_SPINBOX = new QSpinBox;
29 linkNumber_SPINBOX->setRange(1,2);
30 linkNumber_SPINBOX->setValue(1);
31 routingTableEntry_SPINBOX = new QSpinBox;
32 routingTableEntry_SPINBOX->setRange(0, 254);
33 routingTableEntry_SPINBOX->setValue(254);
34 sourceLogicalAddress_SPINBOX = new QSpinBox;
35 sourceLogicalAddress_SPINBOX->setRange(0,254);
36 sourceLogicalAddress_SPINBOX->setValue(32);
16
37
17 closeCommunication_BUTTON->setEnabled(false);
38 sendPacket_BUTTON->setEnabled(false);
39 sendRMAPPacket_BUTTON->setEnabled(false);
40 readRMAPPacket_BUTTON->setEnabled(false);
41 getRoutingTableEntry_BUTTON->setEnabled(false);
18
42
19 connection_LAYOUT->addWidget(openCommunication_BUTTON, 0, 0, 1, 2);
43 connection_LAYOUT->addWidget(usbDeviceNumber_LABEL, 0, 0, 1, 1);
20 connection_LAYOUT->addWidget(closeCommunication_BUTTON, 1, 0, 1, 2);
44 connection_LAYOUT->addWidget(usbDeviceNumber_SPINBOX, 0, 1, 1, 1);
21 connection_LAYOUT->addWidget(usbDeviceNumber_LABEL, 2, 0, 1, 1);
45 connection_LAYOUT->addWidget(sendPacket_BUTTON, 1, 0, 1, 2);
22 connection_LAYOUT->addWidget(usbDeviceNumber_SPINBOX, 2, 1, 1, 1);
46 connection_LAYOUT->addWidget(linkNumber_LABEL, 2, 0, 1, 1);
47 connection_LAYOUT->addWidget(linkNumber_SPINBOX, 2, 1, 1, 1);
48 connection_LAYOUT->addWidget(sourceLogicalAddress_LABEL, 3, 0, 1, 1);
49 connection_LAYOUT->addWidget(sourceLogicalAddress_SPINBOX, 3, 1, 1, 1);
50 connection_LAYOUT->addWidget(routingTableEntry_LABEL, 4, 0, 1, 1);
51 connection_LAYOUT->addWidget(routingTableEntry_SPINBOX, 4, 1, 1, 1);
52 connection_LAYOUT->addWidget(sendRMAPPacket_BUTTON, 5, 0, 1, 2);
53 connection_LAYOUT->addWidget(readRMAPPacket_BUTTON, 6, 0, 1, 2);
54 connection_LAYOUT->addWidget(getRoutingTableEntry_BUTTON, 7, 0, 1, 2);
55
56 connection_LAYOUT->setRowStretch(8, 1);
57 connection_LAYOUT->setColumnStretch(2, 1);
23
58
24 this->setLayout(connection_LAYOUT);
59 this->setLayout(connection_LAYOUT);
25
60
26 connect(this->openCommunication_BUTTON, SIGNAL(clicked()), this, SLOT(OpenStarDundee()));
61 connect(this->sendPacket_BUTTON, SIGNAL(clicked()), this, SLOT(SendPacket()));
27 connect(this->closeCommunication_BUTTON, SIGNAL(clicked()), this, SLOT(CloseStarDundee()));
62 connect(this->readRMAPPacket_BUTTON, SIGNAL(clicked()),this, SLOT(ReadRMAP()));
63 connect(this->sendRMAPPacket_BUTTON, SIGNAL(clicked()), this, SLOT(SendRMAP()));
64 connect(this->getRoutingTableEntry_BUTTON, SIGNAL(clicked()), this, SLOT(GetRoutingTableEntry()));
28 }
65 }
29
66
30 StarDundee::~StarDundee()
67 StarDundee::~StarDundee()
31 {
68 {
32 USBSpaceWire_Close(hDevice); // Close the device
69 USBSpaceWire_Close(hDevice); // Close the device
33 }
70 }
34
71
35 unsigned int StarDundee::OpenStarDundee()
72 unsigned int StarDundee::OpenStarDundee()
36 {
73 {
37 if (!USBSpaceWire_Open(&hDevice, 0)) // Open the first device
74 int status;
75 U32 statusControl;
76 U32 routingTableEntry;
77 int tableEntry;
78
79 if (!USBSpaceWire_Open(&hDevice, usbDeviceNumber_SPINBOX->value())) // Open the USB device
38 {
80 {
39 emit sendMessage("stardundee *** Open *** ERROR: USBSpaceWire_Open(&hDevice, 0))");
81 emit sendMessage("stardundee *** Open *** ERROR: USBSpaceWire_Open(&hDevice, 0))");
40 return -1;
82 return -1;
41 }
83 }
42 openCommunication_BUTTON->setEnabled(false);
84 emit sendMessage("stardundee *** Open *** USBSpaceWire_Open successful, device number: "
43 closeCommunication_BUTTON->setEnabled(true);
85 + QString::number(usbDeviceNumber_SPINBOX->value()));
44 emit sendMessage("stardundee *** Open *** USBSpaceWire_Open(&hDevice, 0)) successful");
86
87 USBSpaceWire_EnableNetworkMode(hDevice, 0); // deactivate the network mode
88 CFGSpaceWire_EnableRMAP(1); // Enable the use of RMAP
89 CFGSpaceWire_SetRMAPDestinationKey(0x20); // Set the destination key expected by STAR-Dundee devices
90
91 // Set the path and return path to the device
92 CFGSpaceWire_StackClear();
93 CFGSpaceWire_AddrStackPush(0);
94 CFGSpaceWire_AddrStackPush(254);
95 CFGSpaceWire_RetAddrStackPush(254);
96
97 // set the base transmit rate to 100 MHz
98 status = CFGSpaceWire_SetBrickBaseTransmitRate( hDevice, CFG_BRK_CLK_100_MHZ, CFG_BRK_DVDR_1, 0xff);
99 if (status != CFG_TRANSFER_SUCCESS)
100 {
101 emit sendMessage("ERROR CFGSpaceWire_SetBrickBaseTransmitRate");
102 }
103 else emit sendMessage("OK CFGSpaceWire_SetBrickBaseTransmitRate, base rate = 100 MHz");
104 // read the link status
105 if (CFGSpaceWire_GetLinkStatusControl(hDevice, linkNumber_SPINBOX->value(), &statusControl) != CFG_TRANSFER_SUCCESS)
106 {
107 emit sendMessage("Could not read link status control for link " + QString::number(linkNumber_SPINBOX->value()));
108 }
109 else
110 {
111 emit sendMessage("OK CFGSpaceWire_GetLinkStatusControl of link " + QString::number(linkNumber_SPINBOX->value()));
112
113 // Set the link status control register properties
114 CFGSpaceWire_LSEnableAutoStart(&statusControl, 1);
115 CFGSpaceWire_LSEnableStart(&statusControl, 1);
116 CFGSpaceWire_LSEnableDisabled(&statusControl, 0);
117 CFGSpaceWire_LSEnableTristate(&statusControl, 0);
118 CFGSpaceWire_LSSetOperatingSpeed(&statusControl, 9); // sets the link speed to ( 100 MHz / (9+1) ) = 10 MHz
119
120 // Set the link status control register
121 if (CFGSpaceWire_SetLinkStatusControl(hDevice, linkNumber_SPINBOX->value(), statusControl) != CFG_TRANSFER_SUCCESS)
122 {
123 emit sendMessage("Could not set the link status control for link " + QString::number(linkNumber_SPINBOX->value()));
124 }
125 else emit sendMessage("Set the link status control for link " + QString::number(linkNumber_SPINBOX->value()));
126 }
127
128 // SET THE ROUTING TABLE ENTRY FOR LOGICAL ADDRESSING, TARGET 254 <=> 0xfe
129 tableEntry = routingTableEntry_SPINBOX->value();
130 if (CFGSpaceWire_ClearRoutingTableEntry(hDevice, tableEntry) != CFG_TRANSFER_SUCCESS)
131 {
132 emit sendMessage("Could not clear routing table entry " + QString::number(tableEntry));
133 }
134 else emit sendMessage("Routing table entry [" + QString::number(tableEntry) + "] cleared");
135 // Build the routing table entry to route out of port 1 with header deletion disabled and priority normal
136 CFGSpaceWire_RTBuildRoutingTableEntry(&routingTableEntry,
137 (1<<linkNumber_SPINBOX->value()), // 0x02 = 0000 0010
138 0,
139 0);
140 // Set the routing table entry for logical address tableEntry
141 if (CFGSpaceWire_SetRoutingTableEntry(hDevice, tableEntry, routingTableEntry) != CFG_TRANSFER_SUCCESS)
142 {
143 emit sendMessage("Could not set routing table entry [" + QString::number(tableEntry) + "]");
144 }
145 else emit sendMessage("Routing table entry [" + QString::number(tableEntry) + "] set" );
146
147 // SET THE ROUTING TABLE ENTRY FOR LOGICAL ADDRESSING, TARGET 32 <=> 0x20
148 tableEntry = sourceLogicalAddress_SPINBOX->value();
149 if (CFGSpaceWire_ClearRoutingTableEntry(hDevice, tableEntry) != CFG_TRANSFER_SUCCESS)
150 {
151 emit sendMessage("Could not clear routing table entry " + QString::number(tableEntry));
152 }
153 else emit sendMessage("Routing table entry [" + QString::number(tableEntry) + "] cleared");
154
155 // Build the routing table entry to route out of port 3 with header deletion disabled and priority normal
156 CFGSpaceWire_RTBuildRoutingTableEntry(&routingTableEntry,
157 (1<<3), // 0x02 = 0000 0010
158 0,
159 0);
160 // Set the routing table entry for logical address tableEntry
161 if (CFGSpaceWire_SetRoutingTableEntry(hDevice, tableEntry, routingTableEntry) != CFG_TRANSFER_SUCCESS)
162 {
163 emit sendMessage("Could not set routing table entry [" + QString::number(tableEntry) + "]");
164 }
165 else emit sendMessage("Routing table entry [" + QString::number(tableEntry) + "] set" );
166
167 emit sendMessage("The driver's current send buffer size is " + QString::number(USBSpaceWire_GetDriverSendBufferSize(hDevice)) + " bytes");
168
169 sendPacket_BUTTON->setEnabled(true);
170 sendRMAPPacket_BUTTON->setEnabled(true);
171 readRMAPPacket_BUTTON->setEnabled(true);
172 getRoutingTableEntry_BUTTON->setEnabled(true);
173
174 USBSpaceWire_RegisterReceiveOnAllPorts(hDevice); // Register to receive on all ports
175
176 emit starDundeeIsOpen(true);
177
178 emit sendMessage("command code: " + QString::number(commandCode,16) );
179
45 return 1;
180 return 1;
46 }
181 }
47
182
48 unsigned int StarDundee::CloseStarDundee()
183 unsigned int StarDundee::CloseStarDundee()
49 {
184 {
50 USBSpaceWire_Close(hDevice); // Close the device
185 USBSpaceWire_Close(hDevice); // Close the device
51 emit sendMessage("stardundee *** Close *** USBSpaceWire_Close(hDevice)");
186 emit sendMessage("stardundee *** Close *** USBSpaceWire_Close, device: " + QString::number(usbDeviceNumber_SPINBOX->value()));
52 openCommunication_BUTTON->setEnabled(true);
187 sendPacket_BUTTON->setEnabled(false);
53 closeCommunication_BUTTON->setEnabled(false);
188 sendRMAPPacket_BUTTON->setEnabled(false);
189 readRMAPPacket_BUTTON->setEnabled(false);
190 getRoutingTableEntry_BUTTON->setEnabled(false);
191
192 USBSpaceWire_UnregisterReceiveOnAllPorts(hDevice); // Stop receiving on all ports
193
194 emit starDundeeIsOpen(false);
195
196 return 1;
197 }
198
199 unsigned int StarDundee::GetRoutingTableEntry()
200 {
201 U32 routingTableEntry, outputPorts;
202 char enabled, delHead, priority;
203 int portNum;
204 int tableEntry;
205
206 tableEntry = routingTableEntry_SPINBOX->value();
207
208 // Set the path and return path to the device
209 CFGSpaceWire_StackClear();
210 CFGSpaceWire_AddrStackPush(0);
211 CFGSpaceWire_AddrStackPush(254);
212 CFGSpaceWire_RetAddrStackPush(254);
213
214 // Read the routing table entry
215 if (CFGSpaceWire_GetRoutingTableEntry(hDevice, tableEntry, &routingTableEntry) != CFG_TRANSFER_SUCCESS)
216 {
217 emit sendMessage("Could not read routing table entry [" + QString::number(tableEntry) + "]");
218 }
219 else
220 {
221 // Display the routing table entry properties
222 CFGSpaceWire_RTIsEnabled(routingTableEntry, &enabled);
223 CFGSpaceWire_RTIsDelHead(routingTableEntry, &delHead);
224 CFGSpaceWire_RTIsPriority(routingTableEntry, &priority);
225 CFGSpaceWire_RTGetOutputPorts(routingTableEntry, &outputPorts);
226 emit sendMessage("CFGSpaceWire_RTIsEnabled : " + QString::number(enabled));
227 emit sendMessage("CFGSpaceWire_RTIsDelHead : " + QString::number(delHead));
228 emit sendMessage("CFGSpaceWire_RTIsPriority : " + QString::number(priority));
229 emit sendMessage("CFGSpaceWire_RTGetOutputPorts : ");
230 for (portNum = 0; portNum < 32; portNum++)
231 {
232 if (outputPorts & (1 << portNum))
233 {
234 emit sendMessage(QString::number(portNum));
235 }
236 }
237 }
238
239 return 1;
240 }
241
242 unsigned int StarDundee::SendPacket()
243 {
244 U32 nBufferSize; // The amount of data, in bytes, to be transmitted.
245 char bWait; // If bWait is 0 then the transfer is started and the function returns immediately.
246 // If bWait is not 0 then the function will return only when the transfer is completed or an error is detected.
247
248 nBufferSize = 10;
249 bWait = 1;
250 // Send the packet and wait on it completing
251 result = USBSpaceWire_SendPacket(hDevice, pBuffer, nBufferSize, bWait, &pIdentifier);
252 if (result != TRANSFER_SUCCESS)
253 {
254 emit sendMessage("Error: Could not send the packet");
255 }
256 else emit sendMessage("The packet has been successfully sent");
257
258 // Free the send
259 USBSpaceWire_FreeSend(hDevice, pIdentifier);
260
261 return 1;
262 }
263
264 unsigned int StarDundee::SendRMAP()
265 {
266 unsigned int Value[4];
267 unsigned int count = 4;
268 unsigned int address = 0x40000000;
269 Value[0] = 0xabcd1234;
270 Value[1] = 0xbb;
271 Value[2] = 0xab;
272 Value[3] = 0xcd;
273 WriteStarDundee(Value, count, address);
274 return 1;
275 }
276
277 unsigned int StarDundee::ReadRMAP()
278 {
279 unsigned int Value[100000];
280 unsigned int count = 100000;
281 unsigned int address = 0x40000000;
282 unsigned int result;
283 result = ReadStarDundee(Value, count, address);
284 emit sendMessage("ReadRMAP, nbBytes: " + QString::number(result));
285 emit sendMessage("Value[0]: " + QString::number(Value[0], 16));
286 emit sendMessage("Value[1]: " + QString::number(Value[1], 16));
287 emit sendMessage("Value[2]: " + QString::number(Value[2], 16));
288 emit sendMessage("Value[3]: " + QString::number(Value[3], 16));
54 return 1;
289 return 1;
55 }
290 }
291
292 unsigned int StarDundee::ReadStarDundee(unsigned int *Value, unsigned int count, unsigned int address)
293 {
294 RMAP *RMAPCommand;
295 rmap_read_reply_PcktHdr_t rmapReplyHeader;
296 USB_SPACEWIRE_STATUS result; // The result of the receive operation
297 USB_SPACEWIRE_PACKET_PROPERTIES properties; // The properties of the read
298 unsigned int nbBytes;
299 unsigned char* packet;
300 U32 nPacketNum;
301 unsigned int offset;
302 unsigned int i;
303
304 //**********************
305 // SEND THE READ COMMAND
306 nbBytes = 4 * count;
307 if (nbBytes > 4)
308 {
309 RMAPCommand = new RMAP(read_Inc, // build the command
310 rmapTargetLogicalAddress,
311 rmapSourceLogicalAddress,
312 address,
313 nbBytes,
314 NULL);
315 }
316 else
317 {
318 RMAPCommand = new RMAP(read_Single, // build the command
319 rmapTargetLogicalAddress,
320 rmapSourceLogicalAddress,
321 address,
322 nbBytes,
323 NULL);
324 }
325
326 result = USBSpaceWire_SendPacket(hDevice,
327 (unsigned char*) ((void*) &RMAPCommand->RMAPHeader),
328 sizeof(RMAPCommand->RMAPHeader),
329 BWAIT_1, &pIdentifier);
330 if (result != TRANSFER_SUCCESS) emit sendMessage("ERROR *** ReadStarDundee when sending the READ command ");
331 else emit sendMessage("OK *** ReadStarDundee when sending the READ command");
332
333 //*****************
334 // RECEIVE THE DATA
335 nbBytes = sizeof(rmapReplyHeader) + 4 * count + 1; // 1 is for the data CRC
336 packet = (unsigned char *) malloc(nbBytes);
337 nPacketNum = 1;
338 result = USBSpaceWire_ReadPackets(hDevice, packet, nbBytes, nPacketNum, BWAIT_1, &properties, &pIdentifier);
339 if (result != TRANSFER_SUCCESS) emit sendMessage("Error: Could not receive the packet");
340 else
341 {
342 emit sendMessage("A packet of length " + QString::number(properties.len) + " has been successfully received");
343 offset = sizeof(rmapReplyHeader);
344 for(i=0; i<count; i++)
345 {
346 Value[i] = packet[offset+3];
347 Value[i] = Value[i] + packet[offset+2] * pow(2, 8);
348 Value[i] = Value[i] + packet[offset+1] * pow(2, 16);
349 Value[i] = Value[i] + packet[offset+0] * pow(2, 24);
350 offset = offset + 4;
351 }
352 free(packet);
353 USBSpaceWire_FreeRead(hDevice, pIdentifier); // Free the receive
354 return count;
355 }
356
357 return 1;
358 }
359
360 unsigned int StarDundee::WriteStarDundee(unsigned int *Value, unsigned int count, unsigned int address)
361 {
362 RMAP *RMAPCommand;
363 unsigned char *data;
364 char *dataCHAR;
365 unsigned char *aux;
366 unsigned int offset;
367 U32 dataSize, headerSize, CRCSize, totalSize; // sizes in bytes
368 U32 nPacketNum;
369 USB_SPACEWIRE_PACKET_PROPERTIES properties; // The properties of the read
370 rmap_write_reply_t rmapReplyHeader;
371
372 dataSize = count * 4;
373 dataCHAR = (char *) malloc(dataSize);
374 for (unsigned int i = 0; i<count; i++)
375 {
376 dataCHAR[i*4+3] = (char) ((unsigned int) Value[i]);
377 dataCHAR[i*4+2] = (char) ((unsigned int) Value[i]>>8);
378 dataCHAR[i*4+1] = (char) ((unsigned int) Value[i]>>16);
379 dataCHAR[i*4+0] = (char) ((unsigned int) Value[i]>>24);
380 }
381
382 RMAPCommand = new RMAP(commandCode,
383 rmapTargetLogicalAddress,
384 rmapSourceLogicalAddress,
385 address,
386 dataSize,
387 dataCHAR);
388 free(dataCHAR);
389 headerSize = sizeof(RMAPCommand->RMAPHeader);
390 CRCSize = 1;
391
392 //*************************
393 // BUILD THE PACKET TO SEND
394 totalSize = headerSize + dataSize + CRCSize;
395 data = (unsigned char*) malloc( totalSize );
396 aux = (unsigned char*) ((void*) &RMAPCommand->RMAPHeader);
397 for(unsigned int i = 0; i<headerSize; i++) data[i] = aux[i];
398 offset = headerSize;
399 for(unsigned int i = 0; i<count; i++)
400 {
401 data[offset+3] = (unsigned char) (Value[i]);
402 data[offset+2] = (unsigned char) (Value[i]>>8);
403 data[offset+1] = (unsigned char) (Value[i]>>16);
404 data[offset] = (unsigned char) (Value[i]>>24);
405 offset = offset + 4;
406 }
407 data[offset] = RMAPCommand->dataCRC;
408
409 //************
410 // SEND THE PACKET
411 result = USBSpaceWire_SendPacket(hDevice,
412 data,
413 totalSize,
414 BWAIT_1, &pIdentifier);
415 if (result != TRANSFER_SUCCESS)
416 {
417 emit sendMessage("ERROR *** WriteStarDundee when sending packet of size "
418 + QString::number(totalSize) +", with code: " + QString::number(result));
419 USBSpaceWire_FreeSend(hDevice, pIdentifier);
420 free(data);
421 return 1;
422 }
423 else emit sendMessage("OK *** WriteStarDundee when sending packet of size " + QString::number(totalSize));
424
425 //**************
426 // Free the send
427 USBSpaceWire_FreeSend(hDevice, pIdentifier);
428 free(data);
429
430 if ( (commandCode == writeSingle_noVer_Rep) | (commandCode == writeInc_noVer_Rep) |
431 (commandCode == writeSingle_ver_rep) | (commandCode == writeInc_ver_rep) )
432 {
433 //***********************
434 // RECEIVE THE RMAP REPLY
435 totalSize = sizeof(rmapReplyHeader);
436 nPacketNum = 1;
437 result = USBSpaceWire_ReadPackets(hDevice, (char *) &rmapReplyHeader, totalSize, nPacketNum, BWAIT_1, &properties, &pIdentifier);
438 if (result != TRANSFER_SUCCESS)
439 {
440 emit sendMessage("Error: Could not receive the RMAP reply");
441 USBSpaceWire_FreeRead(hDevice, pIdentifier); // Free the receive
442 return 1;
443 }
444 else
445 {
446 emit sendMessage("An RMAP reply of length " + QString::number(properties.len) + " has been successfully received");
447 USBSpaceWire_FreeRead(hDevice, pIdentifier); // Free the receive
448 }
449 if(properties.len != 8)
450 {
451 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n");
452 return 1;
453 }
454 emit sendMessage("data CRC " + QString::number(RMAPCommand->dataCRC, 16) );
455 emit sendMessage("rmapReplyHeader " + QString::number(rmapReplyHeader.initiatorLogicalAddress, 16) );
456 emit sendMessage("rmapReplyHeader " + QString::number(rmapReplyHeader.protocolIdentifier, 16) );
457 emit sendMessage("rmapReplyHeader " + QString::number(rmapReplyHeader.instruction, 16) );
458 emit sendMessage("rmapReplyHeader " + QString::number(rmapReplyHeader.status, 16) );
459 emit sendMessage("rmapReplyHeader " + QString::number(rmapReplyHeader.targetLogicalAddress, 16) );
460 emit sendMessage("rmapReplyHeader " + QString::number(rmapReplyHeader.transactionIdentifier1, 16) );
461 emit sendMessage("rmapReplyHeader " + QString::number(rmapReplyHeader.transactionIdentifier2, 16) );
462 emit sendMessage("rmapReplyHeader " + QString::number(rmapReplyHeader.headerCRC, 16) );
463 switch (rmapReplyHeader.status) // byte 4 is the status byte in the reply
464 {
465 case 0:
466 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 0 Successfull");
467 break;
468 case 1:
469 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** General error code");
470 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 1 General error code");
471 break;
472 case 2:
473 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code");
474 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code");
475 break;
476 case 3:
477 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key");
478 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 3 Invalid key");
479 break;
480 case 4:
481 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC");
482 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 4 Invalid data CRC");
483 break;
484 case 5:
485 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP");
486 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 5 Early EOP");
487 break;
488 case 6:
489 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data");
490 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 6 Too much data");
491 break;
492 case 7:
493 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** EEP");
494 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 7 EEP");
495 break;
496 case 8:
497 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved");
498 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 8 Reserved");
499 break;
500 case 9:
501 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun");
502 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun");
503 break;
504 case 10:
505 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised");
506 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised");
507 break;
508 case 11:
509 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error");
510 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error");
511 break;
512 case 12:
513 emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address");
514 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: 12 Invalid target logical address");
515 break;
516 }
517 }
518 else
519 emit RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable");
520 return count;
521 }
522
523 //******
524 // SLOTS
525
526 void StarDundee::updateCommandCode(RMAP_command_codes code)
527 {
528 this->commandCode = code;
529 }
@@ -1,38 +1,72
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 "spw_usb_api.h"
5 #include "spw_usb_api.h"
6 #include "spw_config_library.h"
6 #include <QPushButton>
7 #include <QPushButton>
7 #include <QGridLayout>
8 #include <QGridLayout>
8 #include <QSpinBox>
9 #include <QSpinBox>
9 #include <QLabel>
10 #include <QLabel>
11 #include "rmapoperations.h"
12
13 #define BWAIT_0 0
14 #define BWAIT_1 1
10
15
11 class StarDundee : public QWidget
16 class StarDundee : public QWidget
12 {
17 {
13 Q_OBJECT
18 Q_OBJECT
14 public:
19 public:
15 explicit StarDundee(QWidget *parent = 0);
20 explicit StarDundee(QWidget *parent = 0);
16 ~StarDundee();
21 ~StarDundee();
17 star_device_handle hDevice;// Handle to the SpaceWire device
22 unsigned int WriteStarDundee(unsigned int *Value,unsigned int count,unsigned int address=0);
18 QGridLayout *connection_LAYOUT;
23 unsigned int ReadStarDundee(unsigned int *Value,unsigned int count,unsigned int address=0);
19
24
20 signals:
25 signals:
21 void sendMessage(QString message);
26 void sendMessage(QString message);
27 void starDundeeIsOpen(bool);
28 void RMAP_write_reply_setText(QString);
29 void appendToLog(QString);
22
30
23 public slots:
31 public slots:
24 unsigned int OpenStarDundee();
32 unsigned int OpenStarDundee();
25 unsigned int CloseStarDundee();
33 unsigned int CloseStarDundee();
34 unsigned int SendPacket();
35 unsigned int SendRMAP();
36 unsigned int ReadRMAP();
37 unsigned int GetRoutingTableEntry();
38 void updateCommandCode(RMAP_command_codes code);
26
39
27 private:
40 private:
41 char rmapTargetLogicalAddress ;
42 char rmapSourceLogicalAddress ;
28
43
29 QPushButton *openCommunication_BUTTON;
44 QPushButton *sendPacket_BUTTON;
30 QPushButton *closeCommunication_BUTTON;
45 QPushButton *sendRMAPPacket_BUTTON;
46 QPushButton *readRMAPPacket_BUTTON;
47 QPushButton *getRoutingTableEntry_BUTTON;
31
48
32 QLabel *usbDeviceNumber_LABEL;
49 QLabel *usbDeviceNumber_LABEL;
50 QLabel *linkNumber_LABEL;
51 QLabel *routingTableEntry_LABEL;
52 QLabel *sourceLogicalAddress_LABEL;
33
53
34 QSpinBox *usbDeviceNumber_SPINBOX;
54 QSpinBox *usbDeviceNumber_SPINBOX;
55 QSpinBox *linkNumber_SPINBOX;
56 QSpinBox *routingTableEntry_SPINBOX;
57 QSpinBox *sourceLogicalAddress_SPINBOX;
58
59 QGridLayout *connection_LAYOUT;
60
61 unsigned char pBuffer[10]; // Pointer to the start of the user buffer from which to transmit data
62 unsigned char* rmapPacket; // The buffer to receive RMAP READ packets
63 USB_SPACEWIRE_ID pIdentifier; // A pointer to a variable which will be set to contain a unique identifier for the send
64
65 RMAP_command_codes commandCode;
66
67 star_device_handle hDevice; // Handle to the SpaceWire device
68 USB_SPACEWIRE_STATUS result; // The result of the send operation
35
69
36 };
70 };
37
71
38 #endif // STARDUNDEE_H
72 #endif // STARDUNDEE_H
General Comments 0
You need to be logged in to leave comments. Login now