@@ -1,142 +1,142 | |||
|
1 | 1 | ############################################################################# |
|
2 | 2 | # Makefile for building: PAULs_LPPMON_PLUGINS |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.3) on: Mon Dec 10 0 |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.3) on: Mon Dec 10 09:02:30 2012 | |
|
4 | 4 | # Project: PAULs_LPPMON_PLUGINS.pro |
|
5 | 5 | # Template: subdirs |
|
6 | 6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
7 | 7 | ############################################################################# |
|
8 | 8 | |
|
9 | 9 | first: make_default |
|
10 | 10 | MAKEFILE = Makefile |
|
11 | 11 | QMAKE = /usr/bin/qmake-qt4 |
|
12 | 12 | DEL_FILE = rm -f |
|
13 | 13 | CHK_DIR_EXISTS= test -d |
|
14 | 14 | MKDIR = mkdir -p |
|
15 | 15 | COPY = cp -f |
|
16 | 16 | COPY_FILE = $(COPY) |
|
17 | 17 | COPY_DIR = $(COPY) -r |
|
18 | 18 | INSTALL_FILE = install -m 644 -p |
|
19 | 19 | INSTALL_PROGRAM = install -m 755 -p |
|
20 | 20 | INSTALL_DIR = $(COPY_DIR) |
|
21 | 21 | DEL_FILE = rm -f |
|
22 | 22 | SYMLINK = ln -f -s |
|
23 | 23 | DEL_DIR = rmdir |
|
24 | 24 | MOVE = mv -f |
|
25 | 25 | CHK_DIR_EXISTS= test -d |
|
26 | 26 | MKDIR = mkdir -p |
|
27 | 27 | SUBTARGETS = \ |
|
28 | 28 | sub-rmapplugin |
|
29 | 29 | |
|
30 | 30 | rmapplugin/$(MAKEFILE): |
|
31 | 31 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ |
|
32 | 32 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) |
|
33 | 33 | sub-rmapplugin-qmake_all: FORCE |
|
34 | 34 | @$(CHK_DIR_EXISTS) rmapplugin/ || $(MKDIR) rmapplugin/ |
|
35 | 35 | cd rmapplugin/ && $(QMAKE) /opt/LPPMON_PLUGINS_PAUL/rmapplugin/rmapplugin.pro -spec /usr/lib64/qt4/mkspecs/linux-g++ -o $(MAKEFILE) |
|
36 | 36 | sub-rmapplugin: rmapplugin/$(MAKEFILE) FORCE |
|
37 | 37 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
38 | 38 | sub-rmapplugin-make_default-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
39 | 39 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
40 | 40 | sub-rmapplugin-make_default: rmapplugin/$(MAKEFILE) FORCE |
|
41 | 41 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) |
|
42 | 42 | sub-rmapplugin-make_first-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
43 | 43 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first |
|
44 | 44 | sub-rmapplugin-make_first: rmapplugin/$(MAKEFILE) FORCE |
|
45 | 45 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) first |
|
46 | 46 | sub-rmapplugin-all-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
47 | 47 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all |
|
48 | 48 | sub-rmapplugin-all: rmapplugin/$(MAKEFILE) FORCE |
|
49 | 49 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) all |
|
50 | 50 | sub-rmapplugin-clean-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
51 | 51 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean |
|
52 | 52 | sub-rmapplugin-clean: rmapplugin/$(MAKEFILE) FORCE |
|
53 | 53 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) clean |
|
54 | 54 | sub-rmapplugin-distclean-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
55 | 55 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean |
|
56 | 56 | sub-rmapplugin-distclean: rmapplugin/$(MAKEFILE) FORCE |
|
57 | 57 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) distclean |
|
58 | 58 | sub-rmapplugin-install_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
59 | 59 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install |
|
60 | 60 | sub-rmapplugin-install_subtargets: rmapplugin/$(MAKEFILE) FORCE |
|
61 | 61 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) install |
|
62 | 62 | sub-rmapplugin-uninstall_subtargets-ordered: rmapplugin/$(MAKEFILE) FORCE |
|
63 | 63 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall |
|
64 | 64 | sub-rmapplugin-uninstall_subtargets: rmapplugin/$(MAKEFILE) FORCE |
|
65 | 65 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) uninstall |
|
66 | 66 | |
|
67 | 67 | Makefile: PAULs_LPPMON_PLUGINS.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
68 | 68 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
69 | 69 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
70 | 70 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
71 | 71 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
72 | 72 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
73 | 73 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
74 | 74 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ |
|
75 | 75 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
76 | 76 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
77 | 77 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
78 | 78 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
79 | 79 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
80 | 80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
81 | 81 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
82 | 82 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
83 | 83 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
84 | 84 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
85 | 85 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
86 | 86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
87 | 87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
88 | 88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
89 | 89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
90 | 90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
91 | 91 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
92 | 92 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
93 | 93 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
94 | 94 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
95 | 95 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
96 | 96 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
97 | 97 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
98 | 98 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
99 | 99 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: |
|
100 | 100 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
101 | 101 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
102 | 102 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
103 | 103 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
104 | 104 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
105 | 105 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
106 | 106 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
107 | 107 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
108 | 108 | /usr/lib64/qt4/mkspecs/features/qt.prf: |
|
109 | 109 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: |
|
110 | 110 | /usr/lib64/qt4/mkspecs/features/moc.prf: |
|
111 | 111 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
112 | 112 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
113 | 113 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
114 | 114 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
115 | 115 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
116 | 116 | qmake: qmake_all FORCE |
|
117 | 117 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro |
|
118 | 118 | |
|
119 | 119 | qmake_all: sub-rmapplugin-qmake_all FORCE |
|
120 | 120 | |
|
121 | 121 | make_default: sub-rmapplugin-make_default-ordered FORCE |
|
122 | 122 | make_first: sub-rmapplugin-make_first-ordered FORCE |
|
123 | 123 | all: sub-rmapplugin-all-ordered FORCE |
|
124 | 124 | clean: sub-rmapplugin-clean-ordered FORCE |
|
125 | 125 | distclean: sub-rmapplugin-distclean-ordered FORCE |
|
126 | 126 | -$(DEL_FILE) Makefile |
|
127 | 127 | install_subtargets: sub-rmapplugin-install_subtargets-ordered FORCE |
|
128 | 128 | uninstall_subtargets: sub-rmapplugin-uninstall_subtargets-ordered FORCE |
|
129 | 129 | |
|
130 | 130 | sub-rmapplugin-check_ordered: rmapplugin/$(MAKEFILE) |
|
131 | 131 | cd rmapplugin/ && $(MAKE) -f $(MAKEFILE) check |
|
132 | 132 | check: sub-rmapplugin-check_ordered |
|
133 | 133 | |
|
134 | 134 | mocclean: compiler_moc_header_clean compiler_moc_source_clean |
|
135 | 135 | |
|
136 | 136 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all |
|
137 | 137 | install: install_subtargets FORCE |
|
138 | 138 | |
|
139 | 139 | uninstall: uninstall_subtargets FORCE |
|
140 | 140 | |
|
141 | 141 | FORCE: |
|
142 | 142 |
@@ -1,264 +1,264 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by Qt Creator 2.4.1, 2012-12-10T |
|
|
3 | <!-- Written by Qt Creator 2.4.1, 2012-12-10T13:26:06. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
7 | 7 | <value type="int">0</value> |
|
8 | 8 | </data> |
|
9 | 9 | <data> |
|
10 | 10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
11 | 11 | <valuemap type="QVariantMap"> |
|
12 | 12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
13 | 13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
14 | 14 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | 15 | <value type="QString" key="language">Cpp</value> |
|
16 | 16 | <valuemap type="QVariantMap" key="value"> |
|
17 | 17 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
18 | 18 | </valuemap> |
|
19 | 19 | </valuemap> |
|
20 | 20 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | 21 | <value type="QString" key="language">QmlJS</value> |
|
22 | 22 | <valuemap type="QVariantMap" key="value"> |
|
23 | 23 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | 24 | </valuemap> |
|
25 | 25 | </valuemap> |
|
26 | 26 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | 27 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> |
|
28 | 28 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | 29 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | 30 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
31 | 31 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
32 | 32 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
33 | 33 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
34 | 34 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
35 | 35 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
36 | 36 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
37 | 37 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
38 | 38 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
39 | 39 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
40 | 40 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
41 | 41 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
42 | 42 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
43 | 43 | </valuemap> |
|
44 | 44 | </data> |
|
45 | 45 | <data> |
|
46 | 46 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
47 | 47 | <valuemap type="QVariantMap"/> |
|
48 | 48 | </data> |
|
49 | 49 | <data> |
|
50 | 50 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
51 | 51 | <valuemap type="QVariantMap"> |
|
52 | 52 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> |
|
53 | 53 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> |
|
54 | 54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value> |
|
55 | 55 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
56 | 56 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
57 | 57 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
58 | 58 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
59 | 59 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> |
|
60 | 60 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
61 | 61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
62 | 62 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
63 | 63 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
64 | 64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
65 | 65 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
66 | 66 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
67 | 67 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
68 | 68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
69 | 69 | </valuemap> |
|
70 | 70 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
71 | 71 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
72 | 72 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
73 | 73 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
74 | 74 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
75 | 75 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
76 | 76 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
77 | 77 | </valuemap> |
|
78 | 78 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
79 | 79 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
80 | 80 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
81 | 81 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
82 | 82 | </valuemap> |
|
83 | 83 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
84 | 84 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
85 | 85 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
86 | 86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
87 | 87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
88 | 88 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
89 | 89 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
90 | 90 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
91 | 91 | </valuemap> |
|
92 | 92 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
93 | 93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
94 | 94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
95 | 95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
96 | 96 | </valuemap> |
|
97 | 97 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
98 | 98 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
99 | 99 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
100 | 100 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
101 | 101 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
102 | 102 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
103 | 103 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
104 | 104 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> |
|
105 | 105 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> |
|
106 | 106 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
107 | 107 | </valuemap> |
|
108 | 108 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> |
|
109 | 109 | <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value> |
|
110 | 110 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
111 | 111 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
112 | 112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
113 | 113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
114 | 114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
115 | 115 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
116 | 116 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
117 | 117 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
118 | 118 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
119 | 119 | </valuemap> |
|
120 | 120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
121 | 121 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
122 | 122 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
123 | 123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
124 | 124 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
125 | 125 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
126 | 126 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
127 | 127 | </valuemap> |
|
128 | 128 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
129 | 129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
130 | 130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
131 | 131 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
132 | 132 | </valuemap> |
|
133 | 133 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
134 | 134 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
135 | 135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
136 | 136 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
137 | 137 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
138 | 138 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
139 | 139 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
140 | 140 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
141 | 141 | </valuemap> |
|
142 | 142 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
143 | 143 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
144 | 144 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
145 | 145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
146 | 146 | </valuemap> |
|
147 | 147 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
148 | 148 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
149 | 149 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
150 | 150 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> |
|
151 | 151 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
152 | 152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
153 | 153 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> |
|
154 | 154 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/LPPMON_PLUGINS_PAUL</value> |
|
155 | 155 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value> |
|
156 | 156 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
157 | 157 | </valuemap> |
|
158 | 158 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> |
|
159 | 159 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
160 | 160 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
161 | 161 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
162 | 162 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
163 | 163 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
164 | 164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
165 | 165 | </valuemap> |
|
166 | 166 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
167 | 167 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
168 | 168 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
169 | 169 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
170 | 170 | </valuemap> |
|
171 | 171 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
172 | 172 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
173 | 173 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
174 | 174 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
175 | 175 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
176 | 176 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
177 | 177 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
178 | 178 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
179 | 179 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
180 | 180 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
181 | 181 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
182 | 182 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
183 | 183 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
184 | 184 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
185 | 185 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
186 | 186 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
187 | 187 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
188 | 188 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
189 | 189 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
190 | 190 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
191 | 191 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
192 | 192 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
193 | 193 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
194 | 194 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
195 | 195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
196 | 196 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
197 | 197 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
198 | 198 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
199 | 199 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
200 | 200 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
201 | 201 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
202 | 202 | <value type="int">0</value> |
|
203 | 203 | <value type="int">1</value> |
|
204 | 204 | <value type="int">2</value> |
|
205 | 205 | <value type="int">3</value> |
|
206 | 206 | <value type="int">4</value> |
|
207 | 207 | <value type="int">5</value> |
|
208 | 208 | <value type="int">6</value> |
|
209 | 209 | <value type="int">7</value> |
|
210 | 210 | <value type="int">8</value> |
|
211 | 211 | <value type="int">9</value> |
|
212 | 212 | <value type="int">10</value> |
|
213 | 213 | <value type="int">11</value> |
|
214 | 214 | <value type="int">12</value> |
|
215 | 215 | <value type="int">13</value> |
|
216 | 216 | <value type="int">14</value> |
|
217 | 217 | </valuelist> |
|
218 | 218 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
219 | 219 | <value type="int">0</value> |
|
220 | 220 | <value type="int">1</value> |
|
221 | 221 | <value type="int">2</value> |
|
222 | 222 | <value type="int">3</value> |
|
223 | 223 | <value type="int">4</value> |
|
224 | 224 | <value type="int">5</value> |
|
225 | 225 | <value type="int">6</value> |
|
226 | 226 | <value type="int">7</value> |
|
227 | 227 | <value type="int">8</value> |
|
228 | 228 | <value type="int">9</value> |
|
229 | 229 | <value type="int">10</value> |
|
230 | 230 | <value type="int">11</value> |
|
231 | 231 | <value type="int">12</value> |
|
232 | 232 | <value type="int">13</value> |
|
233 | 233 | <value type="int">14</value> |
|
234 | 234 | </valuelist> |
|
235 | 235 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
236 | 236 | <value type="int" key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase">2</value> |
|
237 | 237 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">lppmon</value> |
|
238 | 238 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value> |
|
239 | 239 | <valuelist type="QVariantList" key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges"/> |
|
240 | 240 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value> |
|
241 | 241 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run lppmon</value> |
|
242 | 242 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
243 | 243 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> |
|
244 | 244 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
245 | 245 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
246 | 246 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
247 | 247 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
248 | 248 | </valuemap> |
|
249 | 249 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
250 | 250 | </valuemap> |
|
251 | 251 | </data> |
|
252 | 252 | <data> |
|
253 | 253 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
254 | 254 | <value type="int">1</value> |
|
255 | 255 | </data> |
|
256 | 256 | <data> |
|
257 | 257 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
258 | 258 | <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
259 | 259 | </data> |
|
260 | 260 | <data> |
|
261 | 261 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
262 | 262 | <value type="int">10</value> |
|
263 | 263 | </data> |
|
264 | 264 | </qtcreator> |
@@ -1,447 +1,452 | |||
|
1 | 1 | ############################################################################# |
|
2 | 2 | # Makefile for building: librmapplugin.so.1.0.0 |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.3) on: Mon Dec 10 0 |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.3) on: Mon Dec 10 09:02:30 2012 | |
|
4 | 4 | # Project: rmapplugin.pro |
|
5 | 5 | # Template: lib |
|
6 | 6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
7 | 7 | ############################################################################# |
|
8 | 8 | |
|
9 | 9 | ####### Compiler, tools and options |
|
10 | 10 | |
|
11 | 11 | CC = gcc |
|
12 | 12 | CXX = g++ |
|
13 | 13 | DEFINES = -DPLUGIN=rmapplugin -DPLUGINHEADER="\"rmapplugin.h\"" -Ddriver_Name="\"RMAPPlugin\"" -Ddriver_Author="\"Paul Leroy paul.leroy@lpp.polytechnique.fr\"" -Ddriver_Version="\"1.1.2\"" -Ddriver_Description="\"AHB bus controler, works with Gaisler's AHB plugn' play bus.\"" -Ddriver_can_be_root=1 -Ddriver_can_be_child=0 -Ddriver_VID=0 -Ddriver_PID=0 -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 | 14 | CFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) |
|
15 | 15 | CXXFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -W -D_REENTRANT -fPIC $(DEFINES) |
|
16 | 16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include -I. -I../common_PLE -I../spw_usb_driver_v2.61/inc -I/usr/include/lppmon/pluginsInterface -I/usr/include/PythonQt -Imoc |
|
17 | 17 | LINK = g++ |
|
18 | 18 | LFLAGS = -Wl,-O1 -Wl,-z,relro -shared -Wl,-soname,librmapplugin.so.1 |
|
19 | 19 | LIBS = $(SUBLIBS) -L/usr/lib64 ../spw_usb_driver_v2.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 | 20 | AR = ar cqs |
|
21 | 21 | RANLIB = |
|
22 | 22 | QMAKE = /usr/bin/qmake-qt4 |
|
23 | 23 | TAR = tar -cf |
|
24 | 24 | COMPRESS = gzip -9f |
|
25 | 25 | COPY = cp -f |
|
26 | 26 | SED = sed |
|
27 | 27 | COPY_FILE = $(COPY) |
|
28 | 28 | COPY_DIR = $(COPY) -r |
|
29 | 29 | STRIP = |
|
30 | 30 | INSTALL_FILE = install -m 644 -p |
|
31 | 31 | INSTALL_DIR = $(COPY_DIR) |
|
32 | 32 | INSTALL_PROGRAM = install -m 755 -p |
|
33 | 33 | DEL_FILE = rm -f |
|
34 | 34 | SYMLINK = ln -f -s |
|
35 | 35 | DEL_DIR = rmdir |
|
36 | 36 | MOVE = mv -f |
|
37 | 37 | CHK_DIR_EXISTS= test -d |
|
38 | 38 | MKDIR = mkdir -p |
|
39 | 39 | |
|
40 | 40 | ####### Output directory |
|
41 | 41 | |
|
42 | 42 | OBJECTS_DIR = obj/ |
|
43 | 43 | |
|
44 | 44 | ####### Files |
|
45 | 45 | |
|
46 | 46 | SOURCES = rmapplugin.cpp \ |
|
47 | 47 | rmappluginui.cpp \ |
|
48 | 48 | rmapoperations.cpp \ |
|
49 | 49 | ccsds.cpp \ |
|
50 | 50 | spwpacketreceiver.cpp \ |
|
51 | 51 | ../common_PLE/qipdialogbox.cpp \ |
|
52 | 52 | ../common_PLE/gresbstatusenquiry.cpp \ |
|
53 | 53 | spectralmatricesdmasimulator.cpp \ |
|
54 | 54 | rmappluginpythonwrapper.cpp \ |
|
55 | 55 | stardundee.cpp \ |
|
56 | 56 | gresb.cpp \ |
|
57 | 57 | bridge.cpp \ |
|
58 | 58 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \ |
|
59 | 59 | moc/moc_rmapplugin.cpp \ |
|
60 | 60 | moc/moc_spwpacketreceiver.cpp \ |
|
61 | 61 | moc/moc_qipdialogbox.cpp \ |
|
62 | 62 | moc/moc_gresbstatusenquiry.cpp \ |
|
63 | 63 | moc/moc_spectralmatricesdmasimulator.cpp \ |
|
64 | 64 | moc/moc_rmappluginpythonwrapper.cpp \ |
|
65 | 65 | moc/moc_stardundee.cpp \ |
|
66 | 66 | moc/moc_gresb.cpp \ |
|
67 | 67 | moc/moc_bridge.cpp \ |
|
68 | 68 | moc/moc_genericPySysdriver.cpp \ |
|
69 | 69 | moc/moc_lppmonplugin.cpp |
|
70 | 70 | OBJECTS = obj/rmapplugin.o \ |
|
71 | 71 | obj/rmappluginui.o \ |
|
72 | 72 | obj/rmapoperations.o \ |
|
73 | 73 | obj/ccsds.o \ |
|
74 | 74 | obj/spwpacketreceiver.o \ |
|
75 | 75 | obj/qipdialogbox.o \ |
|
76 | 76 | obj/gresbstatusenquiry.o \ |
|
77 | 77 | obj/spectralmatricesdmasimulator.o \ |
|
78 | 78 | obj/rmappluginpythonwrapper.o \ |
|
79 | 79 | obj/stardundee.o \ |
|
80 | 80 | obj/gresb.o \ |
|
81 | 81 | obj/bridge.o \ |
|
82 | 82 | obj/lppmonplugininterface.o \ |
|
83 | 83 | obj/moc_rmappluginui.o \ |
|
84 | 84 | obj/moc_rmapplugin.o \ |
|
85 | 85 | obj/moc_spwpacketreceiver.o \ |
|
86 | 86 | obj/moc_qipdialogbox.o \ |
|
87 | 87 | obj/moc_gresbstatusenquiry.o \ |
|
88 | 88 | obj/moc_spectralmatricesdmasimulator.o \ |
|
89 | 89 | obj/moc_rmappluginpythonwrapper.o \ |
|
90 | 90 | obj/moc_stardundee.o \ |
|
91 | 91 | obj/moc_gresb.o \ |
|
92 | 92 | obj/moc_bridge.o \ |
|
93 | 93 | obj/moc_genericPySysdriver.o \ |
|
94 | 94 | obj/moc_lppmonplugin.o |
|
95 | 95 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
96 | 96 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
97 | 97 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
98 | 98 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
99 | 99 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
100 | 100 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
101 | 101 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
102 | 102 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ |
|
103 | 103 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
104 | 104 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
105 | 105 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
106 | 106 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
107 | 107 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
108 | 108 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
109 | 109 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ |
|
110 | 110 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ |
|
111 | 111 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
112 | 112 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
113 | 113 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
114 | 114 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
115 | 115 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
116 | 116 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
117 | 117 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
118 | 118 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
119 | 119 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
120 | 120 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
121 | 121 | rmapplugin.pro |
|
122 | 122 | QMAKE_TARGET = rmapplugin |
|
123 | 123 | DESTDIR = bin/ |
|
124 | 124 | TARGET = librmapplugin.so.1.0.0 |
|
125 | 125 | TARGETA = bin/librmapplugin.a |
|
126 | 126 | TARGETD = librmapplugin.so.1.0.0 |
|
127 | 127 | TARGET0 = librmapplugin.so |
|
128 | 128 | TARGET1 = librmapplugin.so.1 |
|
129 | 129 | TARGET2 = librmapplugin.so.1.0 |
|
130 | 130 | |
|
131 | 131 | first: all |
|
132 | 132 | ####### Implicit rules |
|
133 | 133 | |
|
134 | 134 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
135 | 135 | |
|
136 | 136 | .cpp.o: |
|
137 | 137 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
138 | 138 | |
|
139 | 139 | .cc.o: |
|
140 | 140 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
141 | 141 | |
|
142 | 142 | .cxx.o: |
|
143 | 143 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
144 | 144 | |
|
145 | 145 | .C.o: |
|
146 | 146 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
147 | 147 | |
|
148 | 148 | .c.o: |
|
149 | 149 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
150 | 150 | |
|
151 | 151 | ####### Build rules |
|
152 | 152 | |
|
153 | 153 | all: Makefile bin/$(TARGET) |
|
154 | 154 | |
|
155 | 155 | bin/$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) |
|
156 | 156 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
157 | 157 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) |
|
158 | 158 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) |
|
159 | 159 | -ln -s $(TARGET) $(TARGET0) |
|
160 | 160 | -ln -s $(TARGET) $(TARGET1) |
|
161 | 161 | -ln -s $(TARGET) $(TARGET2) |
|
162 | 162 | -$(DEL_FILE) bin/$(TARGET) |
|
163 | 163 | -$(DEL_FILE) bin/$(TARGET0) |
|
164 | 164 | -$(DEL_FILE) bin/$(TARGET1) |
|
165 | 165 | -$(DEL_FILE) bin/$(TARGET2) |
|
166 | 166 | -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) bin/ |
|
167 | 167 | |
|
168 | 168 | |
|
169 | 169 | |
|
170 | 170 | staticlib: $(TARGETA) |
|
171 | 171 | |
|
172 | 172 | $(TARGETA): $(OBJECTS) $(OBJCOMP) |
|
173 | 173 | -$(DEL_FILE) $(TARGETA) |
|
174 | 174 | $(AR) $(TARGETA) $(OBJECTS) |
|
175 | 175 | |
|
176 | 176 | Makefile: rmapplugin.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
177 | 177 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
178 | 178 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
179 | 179 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
180 | 180 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
181 | 181 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
182 | 182 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
183 | 183 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri \ |
|
184 | 184 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
185 | 185 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
186 | 186 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
187 | 187 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
188 | 188 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
189 | 189 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
190 | 190 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf \ |
|
191 | 191 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf \ |
|
192 | 192 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
193 | 193 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
194 | 194 | /usr/lib64/qt4/mkspecs/features/qt.prf \ |
|
195 | 195 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf \ |
|
196 | 196 | /usr/lib64/qt4/mkspecs/features/moc.prf \ |
|
197 | 197 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
198 | 198 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
199 | 199 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
200 | 200 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
201 | 201 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
202 | 202 | /usr/lib64/libQtGui.prl \ |
|
203 | 203 | /usr/lib64/libQtCore.prl \ |
|
204 | 204 | /usr/lib64/libQtNetwork.prl |
|
205 | 205 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
206 | 206 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
207 | 207 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
208 | 208 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
209 | 209 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
210 | 210 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
211 | 211 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
212 | 212 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
213 | 213 | /usr/lib64/qt4/mkspecs/modules/qt_webkit_version.pri: |
|
214 | 214 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
215 | 215 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
216 | 216 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
217 | 217 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
218 | 218 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
219 | 219 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
220 | 220 | /usr/lib64/qt4/mkspecs/features/lppmonplugin.prf: |
|
221 | 221 | /usr/lib64/qt4/mkspecs/features/pythonqt.prf: |
|
222 | 222 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
223 | 223 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
224 | 224 | /usr/lib64/qt4/mkspecs/features/qt.prf: |
|
225 | 225 | /usr/lib64/qt4/mkspecs/features/unix/thread.prf: |
|
226 | 226 | /usr/lib64/qt4/mkspecs/features/moc.prf: |
|
227 | 227 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
228 | 228 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
229 | 229 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
230 | 230 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
231 | 231 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
232 | 232 | /usr/lib64/libQtGui.prl: |
|
233 | 233 | /usr/lib64/libQtCore.prl: |
|
234 | 234 | /usr/lib64/libQtNetwork.prl: |
|
235 | 235 | qmake: FORCE |
|
236 | 236 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro |
|
237 | 237 | |
|
238 | 238 | dist: |
|
239 | 239 | @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0 |
|
240 | 240 | $(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 bridge.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 bridge.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 |
|
241 | 241 | |
|
242 | 242 | |
|
243 | 243 | clean:compiler_clean |
|
244 | 244 | -$(DEL_FILE) $(OBJECTS) |
|
245 | 245 | -$(DEL_FILE) *~ core *.core |
|
246 | 246 | |
|
247 | 247 | |
|
248 | 248 | ####### Sub-libraries |
|
249 | 249 | |
|
250 | 250 | distclean: clean |
|
251 | 251 | -$(DEL_FILE) bin/$(TARGET) |
|
252 | 252 | -$(DEL_FILE) bin/$(TARGET0) bin/$(TARGET1) bin/$(TARGET2) $(TARGETA) |
|
253 | 253 | -$(DEL_FILE) Makefile |
|
254 | 254 | |
|
255 | 255 | |
|
256 | 256 | check: first |
|
257 | 257 | |
|
258 | 258 | mocclean: compiler_moc_header_clean compiler_moc_source_clean |
|
259 | 259 | |
|
260 | 260 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all |
|
261 | 261 | |
|
262 | 262 | 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_bridge.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp |
|
263 | 263 | compiler_moc_header_clean: |
|
264 | 264 | -$(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_bridge.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp |
|
265 | 265 | moc/moc_rmappluginui.cpp: rmapoperations.h \ |
|
266 | 266 | spectralmatricesdmasimulator.h \ |
|
267 | 267 | stardundee.h \ |
|
268 | 268 | gresb.h \ |
|
269 | spwpacketreceiver.h \ | |
|
269 | 270 | rmappluginui.h |
|
270 | 271 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp |
|
271 | 272 | |
|
272 | 273 | moc/moc_rmapplugin.cpp: rmappluginui.h \ |
|
273 | 274 | rmapoperations.h \ |
|
274 | 275 | spectralmatricesdmasimulator.h \ |
|
275 | 276 | stardundee.h \ |
|
276 | 277 | gresb.h \ |
|
278 | spwpacketreceiver.h \ | |
|
277 | 279 | ccsds.h \ |
|
278 | spwpacketreceiver.h \ | |
|
279 | 280 | rmapplugin.h |
|
280 | 281 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp |
|
281 | 282 | |
|
282 | 283 | moc/moc_spwpacketreceiver.cpp: spwpacketreceiver.h |
|
283 | 284 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) spwpacketreceiver.h -o moc/moc_spwpacketreceiver.cpp |
|
284 | 285 | |
|
285 | 286 | moc/moc_qipdialogbox.cpp: ../common_PLE/qipdialogbox.h |
|
286 | 287 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/qipdialogbox.h -o moc/moc_qipdialogbox.cpp |
|
287 | 288 | |
|
288 | 289 | moc/moc_gresbstatusenquiry.cpp: ../common_PLE/gresbstatusenquiry.h |
|
289 | 290 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) ../common_PLE/gresbstatusenquiry.h -o moc/moc_gresbstatusenquiry.cpp |
|
290 | 291 | |
|
291 | 292 | moc/moc_spectralmatricesdmasimulator.cpp: spectralmatricesdmasimulator.h |
|
292 | 293 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) spectralmatricesdmasimulator.h -o moc/moc_spectralmatricesdmasimulator.cpp |
|
293 | 294 | |
|
294 | 295 | moc/moc_rmappluginpythonwrapper.cpp: rmappluginpythonwrapper.h |
|
295 | 296 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginpythonwrapper.h -o moc/moc_rmappluginpythonwrapper.cpp |
|
296 | 297 | |
|
297 | 298 | moc/moc_stardundee.cpp: rmapoperations.h \ |
|
298 | 299 | stardundee.h |
|
299 | 300 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) stardundee.h -o moc/moc_stardundee.cpp |
|
300 | 301 | |
|
301 |
moc/moc_gresb.cpp: |
|
|
302 | moc/moc_gresb.cpp: spwpacketreceiver.h \ | |
|
303 | rmapoperations.h \ | |
|
304 | gresb.h | |
|
302 | 305 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) gresb.h -o moc/moc_gresb.cpp |
|
303 | 306 | |
|
304 | 307 | moc/moc_bridge.cpp: bridge.h |
|
305 | 308 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) bridge.h -o moc/moc_bridge.cpp |
|
306 | 309 | |
|
307 | 310 | moc/moc_genericPySysdriver.cpp: /usr/include/genericPySysdriver.h |
|
308 | 311 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp |
|
309 | 312 | |
|
310 | 313 | moc/moc_lppmonplugin.cpp: /usr/include/lppmonplugin.h |
|
311 | 314 | /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmonplugin.h -o moc/moc_lppmonplugin.cpp |
|
312 | 315 | |
|
313 | 316 | compiler_rcc_make_all: |
|
314 | 317 | compiler_rcc_clean: |
|
315 | 318 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
316 | 319 | compiler_image_collection_clean: |
|
317 | 320 | -$(DEL_FILE) qmake_image_collection.cpp |
|
318 | 321 | compiler_moc_source_make_all: |
|
319 | 322 | compiler_moc_source_clean: |
|
320 | 323 | compiler_uic_make_all: |
|
321 | 324 | compiler_uic_clean: |
|
322 | 325 | compiler_yacc_decl_make_all: |
|
323 | 326 | compiler_yacc_decl_clean: |
|
324 | 327 | compiler_yacc_impl_make_all: |
|
325 | 328 | compiler_yacc_impl_clean: |
|
326 | 329 | compiler_lex_make_all: |
|
327 | 330 | compiler_lex_clean: |
|
328 | 331 | compiler_clean: compiler_moc_header_clean |
|
329 | 332 | |
|
330 | 333 | ####### Compile |
|
331 | 334 | |
|
332 | 335 | obj/rmapplugin.o: rmapplugin.cpp rmapplugin.h \ |
|
333 | 336 | rmappluginui.h \ |
|
334 | 337 | rmapoperations.h \ |
|
335 | 338 | spectralmatricesdmasimulator.h \ |
|
336 | 339 | stardundee.h \ |
|
337 | 340 | gresb.h \ |
|
341 | spwpacketreceiver.h \ | |
|
338 | 342 | ccsds.h \ |
|
339 | spwpacketreceiver.h \ | |
|
340 | 343 | rmappluginpythonwrapper.h |
|
341 | 344 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp |
|
342 | 345 | |
|
343 | 346 | obj/rmappluginui.o: rmappluginui.cpp rmapplugin.h \ |
|
344 | 347 | rmappluginui.h \ |
|
345 | 348 | rmapoperations.h \ |
|
346 | 349 | spectralmatricesdmasimulator.h \ |
|
347 | 350 | stardundee.h \ |
|
348 | 351 | gresb.h \ |
|
349 | ccsds.h \ | |
|
350 | spwpacketreceiver.h | |
|
352 | spwpacketreceiver.h \ | |
|
353 | ccsds.h | |
|
351 | 354 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp |
|
352 | 355 | |
|
353 | 356 | obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h |
|
354 | 357 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapoperations.o rmapoperations.cpp |
|
355 | 358 | |
|
356 | 359 | obj/ccsds.o: ccsds.cpp ccsds.h |
|
357 | 360 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/ccsds.o ccsds.cpp |
|
358 | 361 | |
|
359 | 362 | obj/spwpacketreceiver.o: spwpacketreceiver.cpp spwpacketreceiver.h \ |
|
360 | 363 | rmapoperations.h |
|
361 | 364 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/spwpacketreceiver.o spwpacketreceiver.cpp |
|
362 | 365 | |
|
363 | 366 | obj/qipdialogbox.o: ../common_PLE/qipdialogbox.cpp ../common_PLE/qipdialogbox.h |
|
364 | 367 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qipdialogbox.o ../common_PLE/qipdialogbox.cpp |
|
365 | 368 | |
|
366 | 369 | obj/gresbstatusenquiry.o: ../common_PLE/gresbstatusenquiry.cpp ../common_PLE/gresbstatusenquiry.h |
|
367 | 370 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresbstatusenquiry.o ../common_PLE/gresbstatusenquiry.cpp |
|
368 | 371 | |
|
369 | 372 | obj/spectralmatricesdmasimulator.o: spectralmatricesdmasimulator.cpp spectralmatricesdmasimulator.h |
|
370 | 373 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/spectralmatricesdmasimulator.o spectralmatricesdmasimulator.cpp |
|
371 | 374 | |
|
372 | 375 | obj/rmappluginpythonwrapper.o: rmappluginpythonwrapper.cpp rmappluginpythonwrapper.h |
|
373 | 376 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginpythonwrapper.o rmappluginpythonwrapper.cpp |
|
374 | 377 | |
|
375 | 378 | obj/stardundee.o: stardundee.cpp stardundee.h \ |
|
376 | 379 | rmapoperations.h |
|
377 | 380 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/stardundee.o stardundee.cpp |
|
378 | 381 | |
|
379 | obj/gresb.o: gresb.cpp gresb.h | |
|
382 | obj/gresb.o: gresb.cpp gresb.h \ | |
|
383 | spwpacketreceiver.h \ | |
|
384 | rmapoperations.h | |
|
380 | 385 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/gresb.o gresb.cpp |
|
381 | 386 | |
|
382 | 387 | obj/bridge.o: bridge.cpp bridge.h |
|
383 | 388 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/bridge.o bridge.cpp |
|
384 | 389 | |
|
385 | 390 | obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \ |
|
386 | 391 | /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h |
|
387 | 392 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp |
|
388 | 393 | |
|
389 | 394 | obj/moc_rmappluginui.o: moc/moc_rmappluginui.cpp |
|
390 | 395 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginui.o moc/moc_rmappluginui.cpp |
|
391 | 396 | |
|
392 | 397 | obj/moc_rmapplugin.o: moc/moc_rmapplugin.cpp |
|
393 | 398 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmapplugin.o moc/moc_rmapplugin.cpp |
|
394 | 399 | |
|
395 | 400 | obj/moc_spwpacketreceiver.o: moc/moc_spwpacketreceiver.cpp |
|
396 | 401 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_spwpacketreceiver.o moc/moc_spwpacketreceiver.cpp |
|
397 | 402 | |
|
398 | 403 | obj/moc_qipdialogbox.o: moc/moc_qipdialogbox.cpp |
|
399 | 404 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_qipdialogbox.o moc/moc_qipdialogbox.cpp |
|
400 | 405 | |
|
401 | 406 | obj/moc_gresbstatusenquiry.o: moc/moc_gresbstatusenquiry.cpp |
|
402 | 407 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresbstatusenquiry.o moc/moc_gresbstatusenquiry.cpp |
|
403 | 408 | |
|
404 | 409 | obj/moc_spectralmatricesdmasimulator.o: moc/moc_spectralmatricesdmasimulator.cpp |
|
405 | 410 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_spectralmatricesdmasimulator.o moc/moc_spectralmatricesdmasimulator.cpp |
|
406 | 411 | |
|
407 | 412 | obj/moc_rmappluginpythonwrapper.o: moc/moc_rmappluginpythonwrapper.cpp |
|
408 | 413 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_rmappluginpythonwrapper.o moc/moc_rmappluginpythonwrapper.cpp |
|
409 | 414 | |
|
410 | 415 | obj/moc_stardundee.o: moc/moc_stardundee.cpp |
|
411 | 416 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_stardundee.o moc/moc_stardundee.cpp |
|
412 | 417 | |
|
413 | 418 | obj/moc_gresb.o: moc/moc_gresb.cpp |
|
414 | 419 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_gresb.o moc/moc_gresb.cpp |
|
415 | 420 | |
|
416 | 421 | obj/moc_bridge.o: moc/moc_bridge.cpp |
|
417 | 422 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_bridge.o moc/moc_bridge.cpp |
|
418 | 423 | |
|
419 | 424 | obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp |
|
420 | 425 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp |
|
421 | 426 | |
|
422 | 427 | obj/moc_lppmonplugin.o: moc/moc_lppmonplugin.cpp |
|
423 | 428 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_lppmonplugin.o moc/moc_lppmonplugin.cpp |
|
424 | 429 | |
|
425 | 430 | ####### Install |
|
426 | 431 | |
|
427 | 432 | install_target: first FORCE |
|
428 | 433 | @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ || $(MKDIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ |
|
429 | 434 | -$(INSTALL_PROGRAM) "bin/$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" |
|
430 | 435 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" |
|
431 | 436 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" |
|
432 | 437 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" |
|
433 | 438 | |
|
434 | 439 | uninstall_target: FORCE |
|
435 | 440 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET)" |
|
436 | 441 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET0)" |
|
437 | 442 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET1)" |
|
438 | 443 | -$(DEL_FILE) "$(INSTALL_ROOT)/home/paul/.lppmon/plugins/$(TARGET2)" |
|
439 | 444 | -$(DEL_DIR) $(INSTALL_ROOT)/home/paul/.lppmon/plugins/ |
|
440 | 445 | |
|
441 | 446 | |
|
442 | 447 | install: install_target FORCE |
|
443 | 448 | |
|
444 | 449 | uninstall: uninstall_target FORCE |
|
445 | 450 | |
|
446 | 451 | FORCE: |
|
447 | 452 |
@@ -1,215 +1,687 | |||
|
1 | 1 | #include "gresb.h" |
|
2 | 2 | #include <QTime> |
|
3 | 3 | #include <QHostAddress> |
|
4 | 4 | |
|
5 | 5 | gresb::gresb(QWidget *parent) : |
|
6 | 6 | QWidget(parent) |
|
7 | 7 | { |
|
8 | 8 | RMAPSend_SOCKET = new QTcpSocket; |
|
9 | 9 | RMAPReceive_SOCKET = new QTcpSocket; |
|
10 | 10 | GRESBStatusQuery_SOCKET = new QTcpSocket; |
|
11 | spwPacketReceiverOBJECT = new spwpacketreceiver; | |
|
12 | spwPacketReceiverOBJECT->gresbReceptionSocket = RMAPReceive_SOCKET; | |
|
11 | ||
|
12 | rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH); | |
|
13 | ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH); | |
|
14 | spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) ); | |
|
15 | ||
|
16 | commandCode = invalid0; // initialization of the command code for the RMAP transfers | |
|
13 | 17 | |
|
14 | 18 | //*** QLABEL ***// |
|
15 | 19 | gresbBridgeIPLabel = new QLabel(tr("GRESB Bridge IP: ")); |
|
16 | 20 | gresbVirtualLinkLabel = new QLabel(tr("GRESB Virtual Link: ")); |
|
17 | 21 | spwLinkLabel = new QLabel(tr("GRESB SPW Link: ")); |
|
18 | 22 | rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: ")); |
|
19 | 23 | rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection")); |
|
20 | 24 | rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection")); |
|
21 | 25 | gresbStatusQueryLabel = new QLabel(tr("GRESB status query socket (port 3010): waiting for connection")); |
|
22 | 26 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); |
|
23 | 27 | |
|
24 | 28 | //*** SPINBOX ***// |
|
25 | 29 | gresbVirtualLinkSpinBox = new QSpinBox; |
|
26 | 30 | rmapSourceLogicalAddressSpinBox = new QSpinBox; |
|
27 | 31 | spwLinkSpinBox = new QSpinBox;; |
|
28 | 32 | gresbVirtualLinkSpinBox->setRange(0, 4); |
|
29 | 33 | gresbVirtualLinkSpinBox->setValue(1); |
|
30 | 34 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); |
|
31 | 35 | rmapSourceLogicalAddressSpinBox->setValue(33); |
|
32 | 36 | spwLinkSpinBox->setRange(0, 2); |
|
33 | 37 | spwLinkSpinBox->setValue(0); |
|
34 | 38 | |
|
35 | 39 | //*** QPUSHBUTTON ***// |
|
36 | 40 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
37 | 41 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
38 | 42 | |
|
39 | 43 | //*** LAYOUT ***// |
|
40 | 44 | connectionLayout = new QGridLayout; |
|
41 | 45 | |
|
42 | 46 | //*** MISC ***// |
|
43 | 47 | gresbStatusQueryDialog = new QDialog; |
|
44 | 48 | gresbBridgeIPDialogBox = new QIPDialogBox; |
|
45 | 49 | spwLinkStatusEnquiry = new gresbStatusEnquiry; |
|
46 | 50 | |
|
47 | 51 | connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0); |
|
48 | 52 | connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0); |
|
49 | 53 | connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0); |
|
50 | 54 | connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0); |
|
51 | 55 | connectionLayout->addWidget(spwLinkLabel, 2, 0, 0); |
|
52 | 56 | connectionLayout->addWidget(spwLinkSpinBox, 2, 1, 0); |
|
53 | 57 | connectionLayout->addWidget(rmapSourceLogicalAddressLabel, 3, 0, 0); |
|
54 | 58 | connectionLayout->addWidget(rmapSourceLogicalAddressSpinBox, 3, 1, 0); |
|
55 | 59 | connectionLayout->addWidget(rmapSendStateLabel, 4, 0, 1, 2); |
|
56 | 60 | connectionLayout->addWidget(rmapReceiveStateLabel, 5, 0, 1, 2); |
|
57 | 61 | connectionLayout->addWidget(gresbStatusQueryLabel, 6, 0, 1, 2); |
|
58 | 62 | |
|
59 | 63 | connectionLayout->setRowStretch(7, 1); |
|
60 | 64 | connectionLayout->setColumnStretch(2, 1); |
|
61 | 65 | |
|
62 | 66 | // GRESB STATUS QUERY DIALOG |
|
63 | 67 | gresbStatusQueryDialogLayout = new QGridLayout; |
|
64 | 68 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryDialogLabel, 0, 0, 1, 2); |
|
65 | 69 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryRetryButton, 1, 0, 0); |
|
66 | 70 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryAbortButton, 1, 1, 0); |
|
67 | 71 | gresbStatusQueryDialog->setLayout(gresbStatusQueryDialogLayout); |
|
68 | 72 | |
|
69 | 73 | this->setLayout(connectionLayout); |
|
70 | 74 | |
|
71 | 75 | connect(gresbStatusQueryAbortButton, SIGNAL(clicked()), gresbStatusQueryDialog, SLOT(reject())); |
|
76 | connect(this->RMAPReceive_SOCKET, SIGNAL(readyRead()), this, SLOT(receiveSPWPacket())); | |
|
77 | } | |
|
78 | ||
|
79 | gresb::~gresb() | |
|
80 | { | |
|
81 | free(rmapPacket); | |
|
82 | free(ccsdsPacket); | |
|
83 | free(spwPacket); | |
|
84 | } | |
|
85 | ||
|
86 | unsigned int gresb::Write(unsigned int *Value, unsigned int count, unsigned int address) | |
|
87 | { | |
|
88 | unsigned int remainingCount = count; | |
|
89 | unsigned int iOffset = 0; | |
|
90 | QString console_message; | |
|
91 | char* data; | |
|
92 | ||
|
93 | if(rmapPacketSEMAPHORE->available()!=0) | |
|
94 | { | |
|
95 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP request already running, WRITE access stopped"); | |
|
96 | return 1; | |
|
97 | } | |
|
98 | ||
|
99 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: unavailable"); | |
|
100 | ||
|
101 | data = (char*) malloc(READ_WRITE_MAX_COUNTS*4); | |
|
102 | ||
|
103 | emit appendToLog(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); | |
|
104 | ||
|
105 | while (remainingCount > READ_WRITE_MAX_COUNTS) | |
|
106 | { | |
|
107 | for (int i = 0; i<READ_WRITE_MAX_COUNTS; i++) | |
|
108 | { | |
|
109 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); | |
|
110 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); | |
|
111 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); | |
|
112 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); | |
|
113 | } | |
|
114 | ||
|
115 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
|
116 | emit appendToLog(console_message + QString("Write ")+ QString::number(READ_WRITE_MAX_COUNTS*4) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
|
117 | ||
|
118 | if(WriteBLOCK(data, READ_WRITE_MAX_COUNTS*4, address)==0) | |
|
119 | { | |
|
120 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); | |
|
121 | return 1; | |
|
122 | } | |
|
123 | ||
|
124 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; | |
|
125 | address = address + READ_WRITE_MAX_COUNTS * 4; | |
|
126 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; | |
|
127 | } | |
|
128 | ||
|
129 | if (remainingCount > 0) | |
|
130 | { | |
|
131 | for (unsigned int i = 0; i<remainingCount; i++) | |
|
132 | { | |
|
133 | data[i*4+3] = (char) ((unsigned int) Value[i+iOffset]); | |
|
134 | data[i*4+2] = (char) ((unsigned int) Value[i+iOffset]>>8); | |
|
135 | data[i*4+1] = (char) ((unsigned int) Value[i+iOffset]>>16); | |
|
136 | data[i*4+0] = (char) ((unsigned int) Value[i+iOffset]>>24); | |
|
137 | } | |
|
138 | ||
|
139 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
|
140 | emit appendToLog(console_message + QString("Write ")+ QString::number(remainingCount*4) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
|
141 | ||
|
142 | if (WriteBLOCK(data, remainingCount*4, address)==0) | |
|
143 | { | |
|
144 | emit appendToLog("WARNING === in function WRITE of rmapplugin *** RMAP write command failed"); | |
|
145 | return 1; | |
|
146 | } | |
|
147 | } | |
|
148 | ||
|
149 | emit appendToLog(QString("*** STOP *** WRITE")); | |
|
150 | free(data); | |
|
151 | return count; | |
|
152 | } | |
|
153 | ||
|
154 | unsigned int gresb::Read(unsigned int *Value, unsigned int count, unsigned int address) | |
|
155 | { | |
|
156 | unsigned int remainingCount = count; | |
|
157 | unsigned int iOffset = 0; | |
|
158 | QString console_message; | |
|
159 | ||
|
160 | if(rmapPacketSEMAPHORE->available()!=0) | |
|
161 | { | |
|
162 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped"); | |
|
163 | return 1; | |
|
164 | } | |
|
165 | emit appendToLog(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16)); | |
|
166 | ||
|
167 | while (remainingCount > READ_WRITE_MAX_COUNTS) | |
|
168 | { | |
|
169 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
|
170 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*READ_WRITE_MAX_COUNTS) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
|
171 | ||
|
172 | if (ReadBLOCK(READ_WRITE_MAX_COUNTS*4, address)==0) | |
|
173 | { | |
|
174 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); | |
|
175 | return 1; | |
|
176 | } | |
|
177 | ||
|
178 | for(int i=0;i<READ_WRITE_MAX_COUNTS;i++) | |
|
179 | { | |
|
180 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; | |
|
181 | for(int j=1;j<4;j++) | |
|
182 | { | |
|
183 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; | |
|
184 | } | |
|
185 | } | |
|
186 | ||
|
187 | remainingCount = remainingCount - READ_WRITE_MAX_COUNTS; | |
|
188 | address = address + READ_WRITE_MAX_COUNTS * 4; | |
|
189 | iOffset = iOffset + READ_WRITE_MAX_COUNTS; | |
|
190 | acquireRMAPSemaphore(); | |
|
191 | } | |
|
192 | ||
|
193 | if (remainingCount > 0) | |
|
194 | { | |
|
195 | console_message.sprintf("remainingCount: %d => ", remainingCount); | |
|
196 | emit appendToLog(console_message + QString("Read ")+ QString::number(4*remainingCount) + QString(" byte(s) @0x")+ QString::number(address,16)); | |
|
197 | ||
|
198 | if (ReadBLOCK(4*remainingCount, address)==0) | |
|
199 | { | |
|
200 | emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP packet not received"); | |
|
201 | return 1; | |
|
202 | } | |
|
203 | ||
|
204 | for(unsigned int i=0;i<remainingCount;i++) | |
|
205 | { | |
|
206 | Value[i+iOffset] = (unsigned char) rmapPacket[i*4+RMAP_READ_REPLY_HEADER_LENGTH]; | |
|
207 | for(int j=1;j<4;j++) | |
|
208 | { | |
|
209 | Value[i+iOffset]= ((unsigned char)(rmapPacket[i*4+j+RMAP_READ_REPLY_HEADER_LENGTH])) + Value[i+iOffset]*256; | |
|
210 | } | |
|
211 | } | |
|
212 | acquireRMAPSemaphore(); | |
|
213 | } | |
|
214 | ||
|
215 | emit appendToLog(QString("*** STOP *** READ ")); | |
|
216 | return count; | |
|
217 | } | |
|
218 | ||
|
219 | unsigned int gresb::WriteBLOCK(char *data, unsigned int nbBytes, unsigned int address) | |
|
220 | { | |
|
221 | QTime RMAPTimeout; | |
|
222 | RMAP *RMAPCommand; | |
|
223 | int errorCode; | |
|
224 | QString console_message; | |
|
225 | ||
|
226 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
|
227 | { | |
|
228 | this->Close(); | |
|
229 | return 1; | |
|
230 | } | |
|
231 | ||
|
232 | RMAPCommand = new RMAP(commandCode, | |
|
233 | rmapTargetLogicalAddress, | |
|
234 | rmapSourceLogicalAddress, | |
|
235 | address, | |
|
236 | nbBytes, | |
|
237 | data); | |
|
238 | ||
|
239 | // SEND GRESB HEADER | |
|
240 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); | |
|
241 | // SEND SPACEWIRE PACKET HEADER | |
|
242 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); | |
|
243 | // SEND DATA | |
|
244 | RMAPSend_SOCKET->write( data, nbBytes); | |
|
245 | // SEND DATA CRC | |
|
246 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->dataCRC), 1); | |
|
247 | RMAPTimeout.start(); | |
|
248 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
|
249 | { | |
|
250 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
|
251 | if(RMAPTimeout.elapsed()>1000) | |
|
252 | { | |
|
253 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** sending Write RMAP Command timeout"); | |
|
254 | return 0; | |
|
255 | } | |
|
256 | } | |
|
257 | ||
|
258 | if ( (commandCode == writeSingle_noVer_Rep) | (commandCode == writeInc_noVer_Rep) | | |
|
259 | (commandCode == writeSingle_ver_rep) | (commandCode == writeInc_ver_rep) ) | |
|
260 | { | |
|
261 | // WAIT FOR THE RMAP REPLY PACKET | |
|
262 | errorCode = receiveSPWPacket(1); | |
|
263 | if (errorCode<=0) | |
|
264 | { | |
|
265 | emit appendToLog("WARNING === in function WriteBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); | |
|
266 | return 0; | |
|
267 | } | |
|
268 | if(rmapPacketSize != 8) | |
|
269 | { | |
|
270 | console_message.sprintf("WARNING === in function WRITE (with reply) of rmapplugin *** write reply format not compliant\n"); | |
|
271 | emit appendToLog(console_message); | |
|
272 | return 0; | |
|
273 | } | |
|
274 | switch (rmapPacket[3]) // byte 4 is the status byte in the reply | |
|
275 | { | |
|
276 | case 0: | |
|
277 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 0 Successfull"); | |
|
278 | break; | |
|
279 | case 1: | |
|
280 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** General error code"); | |
|
281 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 1 General error code"); | |
|
282 | break; | |
|
283 | case 2: | |
|
284 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Unused RMAP packet type or command code"); | |
|
285 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 2 Unused RMAP packet type or command code"); | |
|
286 | break; | |
|
287 | case 3: | |
|
288 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid key"); | |
|
289 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 3 Invalid key"); | |
|
290 | break; | |
|
291 | case 4: | |
|
292 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid data CRC"); | |
|
293 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 4 Invalid data CRC"); | |
|
294 | break; | |
|
295 | case 5: | |
|
296 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Early EOP"); | |
|
297 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 5 Early EOP"); | |
|
298 | break; | |
|
299 | case 6: | |
|
300 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Too much data"); | |
|
301 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 6 Too much data"); | |
|
302 | break; | |
|
303 | case 7: | |
|
304 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** EEP"); | |
|
305 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 7 EEP"); | |
|
306 | break; | |
|
307 | case 8: | |
|
308 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Reserved"); | |
|
309 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 8 Reserved"); | |
|
310 | break; | |
|
311 | case 9: | |
|
312 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Verify buffer overrun"); | |
|
313 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 9 Verify buffer overrun"); | |
|
314 | break; | |
|
315 | case 10: | |
|
316 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMAP command not implemented or not authorised"); | |
|
317 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 10 RMAP command not implemented or not authorised"); | |
|
318 | break; | |
|
319 | case 11: | |
|
320 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** RMW data length error"); | |
|
321 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 11 RMAP RMW data length error"); | |
|
322 | break; | |
|
323 | case 12: | |
|
324 | emit appendToLog("WARNING === in function WRITE (with reply) of rmapplugin *** Invalid target logical address"); | |
|
325 | RMAP_write_reply_setText("reply to the write command required\nlast reply status: 12 Invalid target logical address"); | |
|
326 | break; | |
|
327 | } | |
|
328 | acquireRMAPSemaphore(); | |
|
329 | } | |
|
330 | return nbBytes; | |
|
331 | } | |
|
332 | ||
|
333 | unsigned int gresb::ReadBLOCK(unsigned int nbBytes, unsigned int address) | |
|
334 | { | |
|
335 | int errorCode; | |
|
336 | RMAP *RMAPCommand; | |
|
337 | QTime RMAPTimeout; | |
|
338 | unsigned int dataLength; | |
|
339 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
|
340 | { | |
|
341 | this->Close(); | |
|
342 | return 1; | |
|
343 | } | |
|
344 | ||
|
345 | if (nbBytes > 4) | |
|
346 | { | |
|
347 | RMAPCommand = new RMAP(read_Inc, | |
|
348 | rmapTargetLogicalAddress, | |
|
349 | rmapSourceLogicalAddress, | |
|
350 | address, | |
|
351 | nbBytes, | |
|
352 | NULL); | |
|
353 | } | |
|
354 | else | |
|
355 | { | |
|
356 | RMAPCommand = new RMAP(read_Single, | |
|
357 | rmapTargetLogicalAddress, | |
|
358 | rmapSourceLogicalAddress, | |
|
359 | address, | |
|
360 | nbBytes, | |
|
361 | NULL); | |
|
362 | } | |
|
363 | ||
|
364 | // SEND THE GRESB HEADER FOR THE RMAP READ COMMAND | |
|
365 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->GRESBHeader), 4); | |
|
366 | // SEND THE SPACEWIRE PACKET FOR THE RMAP READ COMMAND | |
|
367 | RMAPSend_SOCKET->write((char*) ((void*) &RMAPCommand->RMAPHeader), sizeof(RMAPCommand->RMAPHeader)); | |
|
368 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
|
369 | RMAPTimeout.start(); | |
|
370 | // write timeout | |
|
371 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
|
372 | { | |
|
373 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
|
374 | if(RMAPTimeout.elapsed()>1000) | |
|
375 | { | |
|
376 | emit appendToLog("WARNING === in function READ of rmapplugin *** sending Read RMAP Command timeout\n"); | |
|
377 | return 0; | |
|
378 | } | |
|
379 | } | |
|
380 | ||
|
381 | // RECEIVE THE INCOMING RMAP PACKET | |
|
382 | errorCode = receiveSPWPacket(1); // request ID 1 is for RMAP packet | |
|
383 | if (errorCode<=0) | |
|
384 | { | |
|
385 | emit appendToLog("WARNING === in function ReadBLOCK of rmapplugin *** RMAP packet reception failed with code " + QString::number(errorCode)); | |
|
386 | return 0; | |
|
387 | } | |
|
388 | dataLength = rmapPacketSize - RMAP_READ_REPLY_HEADER_LENGTH - RMAP_DATA_CRC_LENGTH; | |
|
389 | if(dataLength != nbBytes) | |
|
390 | { | |
|
391 | emit appendToLog("WARNING === in function READ of rmapplugin *** number of data received (" | |
|
392 | +QString::number(dataLength) | |
|
393 | +") not equal to number of data requested (" | |
|
394 | +QString::number(READ_WRITE_MAX_COUNTS*4) | |
|
395 | +")"); | |
|
396 | return 0; | |
|
397 | } | |
|
398 | return dataLength; | |
|
399 | } | |
|
400 | ||
|
401 | unsigned int gresb::WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication) | |
|
402 | { | |
|
403 | char protocoleIdentifier = 0x02; | |
|
404 | char reserved = 0x00; | |
|
405 | char gresbProtocole = 0x00; | |
|
406 | unsigned char size[3]; | |
|
407 | unsigned int spwPacketSize = count + 4; | |
|
408 | QTime SPWTimeout; | |
|
409 | ||
|
410 | if (count>248) | |
|
411 | { | |
|
412 | appendToLog("WARNING === in function WRITE of rmapplugin *** CCSDS packet size > 248 bytes\n"); | |
|
413 | return 1; | |
|
414 | } | |
|
415 | ||
|
416 | appendToLog(QString("*** START *** Send CCSDS packet of ")+ QString::number(count) + QString(" byte(s)")); | |
|
417 | ||
|
418 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) == 1) | |
|
419 | { | |
|
420 | this->Close(); | |
|
421 | appendToLog("WARNING === in function WRITE of rmapplugin *** SPW link not running\n"); | |
|
422 | return 1; | |
|
423 | } | |
|
424 | ||
|
425 | // SEND GRESB HEADER | |
|
426 | size[0] = (unsigned char) ((unsigned int) spwPacketSize>>16); | |
|
427 | size[1] = (unsigned char) ((unsigned int) spwPacketSize>>8); | |
|
428 | size[2] = (unsigned char) ((unsigned int) spwPacketSize); | |
|
429 | RMAPSend_SOCKET->write(&gresbProtocole, 1); | |
|
430 | RMAPSend_SOCKET->write((char*) size, 3); | |
|
431 | // SEND SPW HEADER | |
|
432 | RMAPSend_SOCKET->write(&targetLogicalAddress, 1); | |
|
433 | RMAPSend_SOCKET->write(&protocoleIdentifier, 1); | |
|
434 | RMAPSend_SOCKET->write(&reserved, 1); | |
|
435 | RMAPSend_SOCKET->write(&userApplication, 1); | |
|
436 | // SEND CCSDS PACKET | |
|
437 | RMAPSend_SOCKET->write(Value, count); | |
|
438 | SPWTimeout.start(); | |
|
439 | while(RMAPSend_SOCKET->bytesToWrite() > 0) | |
|
440 | { | |
|
441 | RMAPSend_SOCKET->waitForBytesWritten(100); | |
|
442 | if(SPWTimeout.elapsed()>1000) | |
|
443 | { | |
|
444 | appendToLog("WARNING === in function WRITE of rmapplugin *** sending CCSDS packet timeout\n"); | |
|
445 | return 1; | |
|
446 | } | |
|
447 | } | |
|
448 | ||
|
449 | appendToLog(QString("*** CCSDS packet sent")); | |
|
450 | ||
|
451 | return count; | |
|
452 | } | |
|
453 | ||
|
454 | int gresb::receiveSPWPacket(unsigned char requestID) // SLOT | |
|
455 | { | |
|
456 | QTime spwPacketReceiverTimeout; | |
|
457 | // GRESB HEADER | |
|
458 | char RES_TR_EP; // 6 bits REserved + 1 bit TRuncated + 1 bit EP error end of packet | |
|
459 | unsigned char packetLength2; | |
|
460 | unsigned char packetLength1; | |
|
461 | unsigned char packetLength0; | |
|
462 | unsigned int packetLength; | |
|
463 | ||
|
464 | if (requestID==1) | |
|
465 | { | |
|
466 | if (rmapPacketSEMAPHORE->available()) return rmapPacketSize; | |
|
467 | } | |
|
468 | ||
|
469 | RMAPReceive_SOCKET->blockSignals(1); // block the signals of the socket during packet reception | |
|
470 | // READ THE GRESB HEADER OF THE INCOMING PACKET | |
|
471 | spwPacketReceiverTimeout.start(); | |
|
472 | while(RMAPReceive_SOCKET->bytesAvailable() < 4) | |
|
473 | { | |
|
474 | RMAPReceive_SOCKET->waitForReadyRead(100); | |
|
475 | if(spwPacketReceiverTimeout.elapsed()>1000) return -1; // ERROR === read GRSEB header TIMEOUT | |
|
476 | } | |
|
477 | RMAPReceive_SOCKET->read(&RES_TR_EP, 1); | |
|
478 | RMAPReceive_SOCKET->read( (char*) &packetLength2, 1); | |
|
479 | RMAPReceive_SOCKET->read( (char*) &packetLength1, 1); | |
|
480 | RMAPReceive_SOCKET->read( (char*) &packetLength0, 1); | |
|
481 | packetLength = (packetLength2<<16) + (packetLength1<<8) + (packetLength0); | |
|
482 | spwPacket = (char*) malloc(packetLength); | |
|
483 | ||
|
484 | // READ THE SPW PACKET | |
|
485 | while(RMAPReceive_SOCKET->bytesAvailable() < packetLength) | |
|
486 | { | |
|
487 | RMAPReceive_SOCKET->waitForReadyRead(100); | |
|
488 | if(spwPacketReceiverTimeout.elapsed()>1000) return -2; // ERROR === read SPW packet TIMEOUT | |
|
489 | } | |
|
490 | RMAPReceive_SOCKET->read( spwPacket, packetLength ); | |
|
491 | RMAPReceive_SOCKET->blockSignals(0); | |
|
492 | ||
|
493 | switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet | |
|
494 | { | |
|
495 | case 1: // 0x01 is the protocole identifier for RMAP packets | |
|
496 | if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet | |
|
497 | for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i]; | |
|
498 | rmapPacketSize = packetLength; | |
|
499 | rmapPacketSEMAPHORE->release(); | |
|
500 | //emit sendMessage("RMAP packet of size " + QString::number(packetLength) + " received"); | |
|
501 | return packetLength; | |
|
502 | ||
|
503 | case 2: // 0x02 is the protocole identifier for CCSDS packets | |
|
504 | if (ccsdsPacketSEMAPHORE->available()!=0) return -4; // ERROR === previous CCSDS packet not processed yet | |
|
505 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; | |
|
506 | ccsdsPacketSize = packetLength; | |
|
507 | ccsdsPacketSEMAPHORE->release(); | |
|
508 | emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); | |
|
509 | return packetLength; | |
|
510 | } | |
|
511 | return 0; | |
|
72 | 512 | } |
|
73 | 513 | |
|
74 | 514 | void gresb::Open() // SLOT |
|
75 | 515 | { |
|
76 | 516 | bool spwRunning = true; |
|
77 | 517 | RMAPSend_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getGRESBIP()), |
|
78 | 518 | 3000 + gresbVirtualLinkSpinBox->value()*2, |
|
79 | 519 | QIODevice::WriteOnly); |
|
80 | 520 | RMAPReceive_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getGRESBIP()), |
|
81 | 521 | 3000 + gresbVirtualLinkSpinBox->value()*2+1, |
|
82 | 522 | QIODevice::ReadOnly); |
|
83 | 523 | GRESBStatusQuery_SOCKET->connectToHost( QHostAddress(gresbBridgeIPDialogBox->getGRESBIP()), |
|
84 | 524 | 3010, |
|
85 | 525 | QIODevice::ReadWrite); |
|
86 | 526 | GRESBStatusQuery_SOCKET->waitForConnected(10000); |
|
87 | 527 | RMAPReceive_SOCKET->readAll(); // read all remaining data from the reception socket |
|
88 | 528 | // initialize SPW packet semaphores |
|
89 |
while ( |
|
|
90 |
while ( |
|
|
529 | while (rmapPacketSEMAPHORE->available()!=0) rmapPacketSEMAPHORE->acquire(); | |
|
530 | while (ccsdsPacketSEMAPHORE->available()!=0) ccsdsPacketSEMAPHORE->acquire(); | |
|
91 | 531 | if (GRESBStatusQueryRequest(LinkStatus, spwLinkSpinBox->value()) != 0) |
|
92 | 532 | { |
|
93 | 533 | spwRunning = gresbStatusQueryDialog->exec(); |
|
94 | 534 | } |
|
95 | 535 | if (spwRunning == false) this->Close(); |
|
96 | 536 | else |
|
97 | 537 | { |
|
98 | 538 | emit appendToLog(QString("SpaceWire running on virtual link ")+ QString::number(spwLinkSpinBox->value())); |
|
99 | 539 | emit isOpen(true); |
|
100 | 540 | } |
|
101 | 541 | } |
|
102 | 542 | |
|
103 | 543 | void gresb::Close() // SLOT |
|
104 | 544 | { |
|
105 | 545 | RMAPSend_SOCKET->disconnectFromHost(); |
|
106 | 546 | RMAPReceive_SOCKET->disconnectFromHost(); |
|
107 | 547 | GRESBStatusQuery_SOCKET->disconnectFromHost(); |
|
108 | 548 | emit isOpen(false); |
|
109 | 549 | } |
|
110 | 550 | |
|
111 | 551 | int gresb::GRESBStatusQuery() // SLOT |
|
112 | 552 | { |
|
113 | 553 | GRESBStatusQueryRequest(LinkStatus, 0); |
|
114 | 554 | GRESBStatusQueryRequest(LinkStatus, 1); |
|
115 | 555 | GRESBStatusQueryRequest(LinkStatus, 2); |
|
116 | 556 | GRESBStatusQueryRequest(LinkStatistics, 0); |
|
117 | 557 | GRESBStatusQueryRequest(LinkStatistics, 1); |
|
118 | 558 | GRESBStatusQueryRequest(LinkStatistics, 2); |
|
119 | 559 | return 0; |
|
120 | 560 | } |
|
121 | 561 | |
|
122 | 562 | int gresb::GRESBStatusQueryRequest(GresbStatusQueryOption option, char link) |
|
123 | 563 | { |
|
124 | 564 | gresb_status_query_t statusQueryCommand; |
|
125 | 565 | gresb_link_status_reply_t linkStatusReply; |
|
126 | 566 | gresb_link_statistics_reply_t linkStatisticsReply; |
|
127 | 567 | QTime statusQueryTimeout; |
|
128 | 568 | QString console_message; |
|
129 | 569 | |
|
130 | 570 | statusQueryCommand.protocolIdentifier = (char) 0x02; |
|
131 | 571 | statusQueryCommand.reserved1 = (char) 0x00; |
|
132 | 572 | statusQueryCommand.reserved0 = (char) 0x00; |
|
133 | 573 | statusQueryCommand.option = (char) option; |
|
134 | 574 | statusQueryCommand.value3 = (char) 0x00; |
|
135 | 575 | statusQueryCommand.value2 = (char) 0x00; |
|
136 | 576 | statusQueryCommand.value1 = (char) 0x00; |
|
137 | 577 | statusQueryCommand.value0 = (char) link; |
|
138 | 578 | |
|
139 | 579 | GRESBStatusQuery_SOCKET->write((char*) ((void*) &statusQueryCommand), sizeof(statusQueryCommand)); |
|
140 | 580 | GRESBStatusQuery_SOCKET->flush(); |
|
141 | 581 | GRESBStatusQuery_SOCKET->waitForBytesWritten(1000); |
|
142 | 582 | |
|
143 | 583 | statusQueryTimeout.start(); |
|
144 | 584 | while(GRESBStatusQuery_SOCKET->bytesToWrite() > 0) |
|
145 | 585 | { |
|
146 | 586 | GRESBStatusQuery_SOCKET->waitForBytesWritten(100); |
|
147 | 587 | if(statusQueryTimeout.elapsed()>1000) |
|
148 | 588 | { |
|
149 | 589 | emit appendToLog("WARNING === in function GRESBStatusQueryRequest of rmapplugin *** sending StatusQueryCommand timeout"); |
|
150 | 590 | return 1; |
|
151 | 591 | } |
|
152 | 592 | } |
|
153 | 593 | |
|
154 | 594 | switch (option) |
|
155 | 595 | { |
|
156 | 596 | case LinkStatus: |
|
157 | 597 | { |
|
158 | 598 | statusQueryTimeout.start(); |
|
159 | 599 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatusReply)) |
|
160 | 600 | { |
|
161 | 601 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); |
|
162 | 602 | if(statusQueryTimeout.elapsed()>1000) |
|
163 | 603 | { |
|
164 | 604 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatus => error timeout bytesAvailable()\n"); |
|
165 | 605 | emit appendToLog(console_message); |
|
166 | 606 | return 1; |
|
167 | 607 | } |
|
168 | 608 | } |
|
169 | 609 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatusReply), (int) sizeof(linkStatusReply)); |
|
170 | 610 | console_message.sprintf("%x", linkStatusReply.byte0); |
|
171 | 611 | spwLinkStatusEnquiry->statusQueryTable->item(0, link)->setText(console_message); |
|
172 | 612 | console_message.sprintf("%d", linkStatusReply.byte1); |
|
173 | 613 | spwLinkStatusEnquiry->statusQueryTable->item(1, link)->setText(console_message); |
|
174 | 614 | if (linkStatusReply.byte0 == 0) return 1; |
|
175 | 615 | break; |
|
176 | 616 | } |
|
177 | 617 | case LinkStatistics: |
|
178 | 618 | { |
|
179 | 619 | statusQueryTimeout.start(); |
|
180 | 620 | while(GRESBStatusQuery_SOCKET->bytesAvailable() < (int) sizeof(linkStatisticsReply)) |
|
181 | 621 | { |
|
182 | 622 | GRESBStatusQuery_SOCKET->waitForReadyRead(100); |
|
183 | 623 | if(statusQueryTimeout.elapsed()>1000) |
|
184 | 624 | { |
|
185 | 625 | console_message.sprintf("GRESBStatusQueryRequest / LinkStatistics => error timeout bytesAvailable()\n"); |
|
186 | 626 | emit appendToLog(console_message); |
|
187 | 627 | return 1; |
|
188 | 628 | } |
|
189 | 629 | } |
|
190 | 630 | GRESBStatusQuery_SOCKET->read((char*) ((void*) &linkStatisticsReply), sizeof(linkStatisticsReply)); |
|
191 | 631 | /*console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataTransmitted)); |
|
192 | 632 | UI->spwLinkStatusEnquiry->statusQueryTable->item(9, link)->setText(console_message); |
|
193 | 633 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsTransmitted)); |
|
194 | 634 | UI->spwLinkStatusEnquiry->statusQueryTable->item(8, link)->setText(console_message); |
|
195 | 635 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfTruncatedPacketsReceived)); |
|
196 | 636 | UI->spwLinkStatusEnquiry->statusQueryTable->item(6, link)->setText(console_message); |
|
197 | 637 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsWithEEPReceived)); |
|
198 | 638 | UI->spwLinkStatusEnquiry->statusQueryTable->item(5, link)->setText(console_message); |
|
199 | 639 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.sizeOfDataReceived)); |
|
200 | 640 | UI->spwLinkStatusEnquiry->statusQueryTable->item(4, link)->setText(console_message); |
|
201 | 641 | console_message.sprintf("%d", charTab_TO_int(linkStatisticsReply.numberOfPacketsReceived)); |
|
202 | 642 | UI->spwLinkStatusEnquiry->statusQueryTable->item(3, link)->setText(console_message);*/ |
|
203 | 643 | break; |
|
204 | 644 | } |
|
205 | 645 | case NodeAddressStatistics: |
|
206 | 646 | { |
|
207 | 647 | break; |
|
208 | 648 | } |
|
209 | 649 | case GetRoute: |
|
210 | 650 | { |
|
211 | 651 | break; |
|
212 | 652 | } |
|
213 | 653 | } |
|
214 | 654 | return 0; |
|
215 | 655 | } |
|
656 | ||
|
657 | void gresb::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) // SLOT | |
|
658 | { | |
|
659 | QString message; | |
|
660 | unsigned int fine_time_value = 0; | |
|
661 | fine_time_value = ((unsigned int) ccsdsPacket[7]<<24) | |
|
662 | + ((unsigned int) ccsdsPacket[6]<<16) | |
|
663 | + ((unsigned int) ccsdsPacket[5]<<8) | |
|
664 | + ((unsigned int) ccsdsPacket[4]); | |
|
665 | message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": "); | |
|
666 | message.append("size " | |
|
667 | + QString::number(size) | |
|
668 | +" *** header " | |
|
669 | + QString::number(ccsdsPacket[0], 16) | |
|
670 | + " " | |
|
671 | + QString::number(ccsdsPacket[1], 16) | |
|
672 | + " " | |
|
673 | + QString::number(ccsdsPacket[2], 16) | |
|
674 | + " " | |
|
675 | + QString::number(ccsdsPacket[3], 16) | |
|
676 | + " *** coarse time " | |
|
677 | + QString::number(fine_time_value)); | |
|
678 | //+ QString::number(ccsdsPacket[4], 16) | |
|
679 | //+" " | |
|
680 | //+ QString::number(ccsdsPacket[5], 16) | |
|
681 | //+" " | |
|
682 | //+ QString::number(ccsdsPacket[6], 16) | |
|
683 | //+" " | |
|
684 | //+ QString::number(ccsdsPacket[7], 16)); | |
|
685 | ccsdsPacketSEMAPHORE->acquire(); | |
|
686 | emit sendMessage(message); | |
|
687 | } |
@@ -1,86 +1,99 | |||
|
1 | 1 | #ifndef GRESB_H |
|
2 | 2 | #define GRESB_H |
|
3 | 3 | |
|
4 | 4 | #include <QWidget> |
|
5 | 5 | #include <QLabel> |
|
6 | 6 | #include <QPushButton> |
|
7 | 7 | #include <QSpinBox> |
|
8 | 8 | #include <QGridLayout> |
|
9 | 9 | #include <QTcpSocket> |
|
10 | 10 | #include <QDialog> |
|
11 | #include <QSemaphore> | |
|
11 | 12 | |
|
12 | 13 | #include "gresbstatusenquiry.h" |
|
13 | 14 | #include "spwpacketreceiver.h" |
|
14 | 15 | #include "rmapoperations.h" |
|
15 | 16 | #include "qipdialogbox.h" |
|
16 | 17 | |
|
17 | 18 | class gresb : public QWidget |
|
18 | 19 | { |
|
19 | 20 | Q_OBJECT |
|
20 | 21 | public: |
|
21 | 22 | explicit gresb(QWidget *parent = 0); |
|
22 | 23 | ~gresb(); |
|
23 | 24 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
24 | 25 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
25 | 26 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
26 | unsigned int getLinkStatus(unsigned char link); | |
|
27 | //unsigned int getLinkStatus(unsigned char link); | |
|
27 | 28 | |
|
28 | 29 | signals: |
|
29 | 30 | void sendMessage(QString message); |
|
30 | 31 | void isOpen(bool); |
|
31 | 32 | void RMAP_write_reply_setText(QString); |
|
32 | 33 | void appendToLog(QString); |
|
33 | 34 | void ccsdsPacketAvailable(unsigned char*, unsigned int); |
|
34 | 35 | |
|
35 | 36 | public slots: |
|
36 | 37 | void Open(); |
|
37 | 38 | void Close(); |
|
38 | int receiveSPWPacket(unsigned char requestID); | |
|
39 | int receiveSPWPacket(unsigned char requestID=0); | |
|
40 | void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); | |
|
39 | 41 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} |
|
40 | 42 | void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} |
|
41 | 43 | void sourceHasChanged(int target) {rmapSourceLogicalAddress = (unsigned char) target;} |
|
42 | 44 | |
|
43 | 45 | private slots: |
|
44 | 46 | int GRESBStatusQuery(); |
|
45 | 47 | |
|
46 | 48 | private: |
|
49 | unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0); | |
|
50 | unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0); | |
|
51 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->acquire();} | |
|
52 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->acquire();} | |
|
47 | 53 | int GRESBStatusQueryRequest(GresbStatusQueryOption option, char link); |
|
48 | 54 | |
|
49 | 55 | unsigned char rmapTargetLogicalAddress ; |
|
50 | 56 | unsigned char rmapSourceLogicalAddress ; |
|
51 | 57 | |
|
52 | 58 | RMAP_command_codes commandCode; |
|
53 | 59 | |
|
54 | 60 | QPushButton *gresbStatusQueryRetryButton; |
|
55 | 61 | QPushButton *gresbStatusQueryAbortButton; |
|
56 | 62 | |
|
57 | 63 | QLabel *gresbBridgeIPLabel; |
|
58 | 64 | QLabel *gresbVirtualLinkLabel; |
|
59 | 65 | QLabel *spwLinkLabel; |
|
60 | 66 | QLabel *rmapSourceLogicalAddressLabel; |
|
61 | 67 | QLabel *rmapSendStateLabel; |
|
62 | 68 | QLabel *rmapReceiveStateLabel; |
|
63 | 69 | QLabel *gresbStatusQueryLabel; |
|
64 | 70 | QLabel *gresbStatusQueryDialogLabel; |
|
65 | 71 | |
|
66 | 72 | QDialog *gresbStatusQueryDialog; |
|
67 | 73 | |
|
68 | 74 | QIPDialogBox* gresbBridgeIPDialogBox; |
|
69 | 75 | |
|
70 | 76 | QSpinBox *gresbVirtualLinkSpinBox; |
|
71 | 77 | QSpinBox *spwLinkSpinBox; |
|
72 | 78 | QSpinBox *rmapSourceLogicalAddressSpinBox; |
|
73 | 79 | |
|
74 | 80 | QGridLayout *connectionLayout; |
|
75 | 81 | QGridLayout *gresbStatusQueryDialogLayout; |
|
76 | 82 | |
|
77 | 83 | QTcpSocket *RMAPSend_SOCKET; |
|
78 | 84 | QTcpSocket *RMAPReceive_SOCKET; |
|
79 | 85 | QTcpSocket *GRESBStatusQuery_SOCKET; |
|
80 | 86 | |
|
81 | spwpacketreceiver *spwPacketReceiverOBJECT; | |
|
87 | gresbStatusEnquiry* spwLinkStatusEnquiry; | |
|
82 | 88 | |
|
83 | gresbStatusEnquiry* spwLinkStatusEnquiry; | |
|
89 | // Packet receiver | |
|
90 | QSemaphore *rmapPacketSEMAPHORE; | |
|
91 | QSemaphore *ccsdsPacketSEMAPHORE; | |
|
92 | char* rmapPacket; // The buffer to receive RMAP READ packets | |
|
93 | unsigned char *ccsdsPacket; | |
|
94 | char *spwPacket; | |
|
95 | unsigned int rmapPacketSize; | |
|
96 | unsigned int ccsdsPacketSize; | |
|
84 | 97 | }; |
|
85 | 98 | |
|
86 | 99 | #endif // GRESB_H |
@@ -1,324 +1,310 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPPMON Software |
|
3 | 3 | -- Copyright (C) 2011, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "rmapplugin.h" |
|
23 | 23 | |
|
24 | 24 | rmapPluginUI::rmapPluginUI(QWidget *parent) : |
|
25 | 25 | QWidget(parent) |
|
26 | 26 | { |
|
27 | 27 | spectralMatricesDMASimulator = new SpectralMatricesDMASimulator; |
|
28 | 28 | spwTabWidget = new QTabWidget; |
|
29 | 29 | QWidget* spwTabWidgetPage0 = new QWidget; |
|
30 | 30 | QWidget* spwTabWidgetPage1 = new QWidget; |
|
31 | 31 | QWidget* spwTabWidgetPage2 = new QWidget; |
|
32 | 32 | QWidget* spwTabWidgetPage3 = new QWidget; |
|
33 | 33 | QWidget* spwTabWidgetPage4 = new QWidget; |
|
34 | 34 | QWidget* spwTabWidgetPage5 = new QWidget; |
|
35 | 35 | bridgeWidget = new QWidget; |
|
36 | 36 | mainLayout = new QVBoxLayout; |
|
37 | 37 | connectionLayout = new QGridLayout; |
|
38 | 38 | ccsdsLayout = new QVBoxLayout; |
|
39 | 39 | consoleLayout = new QVBoxLayout; |
|
40 | 40 | selectionLayout = new QVBoxLayout; |
|
41 | 41 | bridgeSelection_LAYOUT = new QGridLayout; |
|
42 | 42 | generalParameters_LAYOUT = new QGridLayout; |
|
43 | 43 | |
|
44 | 44 | gresb_GROUPBOX = new QGroupBox(tr("GRESB bridge parameters")); |
|
45 | 45 | stardundee_GROUPBOX = new QGroupBox(tr("Star Dundee brick parameters")); |
|
46 | 46 | selection_GROUPBOX = new QGroupBox(tr("Bridge selection")); |
|
47 | 47 | generalParameters_GROUPBOX = new QGroupBox(tr("General parameters")); |
|
48 | 48 | |
|
49 | 49 | //*** QLABEL ***// |
|
50 | 50 | gresbBridgeIPLabel = new QLabel(tr("Bridge IP: ")); |
|
51 | 51 | gresbVirtualLinkLabel = new QLabel(tr("Virtual Link: ")); |
|
52 | 52 | spwLinkLabel = new QLabel(tr("SPW Link: ")); |
|
53 | 53 | rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: ")); |
|
54 | 54 | rmapTargetLogicalAddressLabel = new QLabel(tr("RMAP Target Logical Address: ")); |
|
55 | 55 | rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection")); |
|
56 | 56 | rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection")); |
|
57 | 57 | logFileName = new QLabel; |
|
58 | 58 | gresbStatusQueryLabel = new QLabel(tr("Status query socket (port 3010): waiting for connection")); |
|
59 | 59 | gresbStatusQueryDialogLabel = new QLabel(tr("sockets opened but SpaceWire link not running")); |
|
60 | 60 | sendCCSDSCommandLabel = new QLabel(tr("Address of the target")); |
|
61 | 61 | |
|
62 | 62 | //*** QPUSHBUTTON ***// |
|
63 | 63 | rmapOpenCommunicationButton = new QPushButton(tr("Open selected bridge")); |
|
64 | 64 | rmapCloseCommunicationButton = new QPushButton(tr("Close selected bridge")); |
|
65 | 65 | rmapOpenCommunicationButton->setEnabled(false); |
|
66 | 66 | rmapCloseCommunicationButton->setEnabled(false); |
|
67 | 67 | logFileChooseButton = new QPushButton(tr("Choose file")); |
|
68 | 68 | gresbStatusQueryRetryButton = new QPushButton(tr("Retry")); |
|
69 | 69 | gresbStatusQueryAbortButton = new QPushButton(tr("Abort")); |
|
70 | 70 | sendCCSDSCommandButton = new QPushButton(tr("Send CCSDS Command")); |
|
71 | 71 | send_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("Send TC_LFR_UPDATE_TIME Packet")); |
|
72 | 72 | reset_TC_LFR_UPDATE_TIME_Button = new QPushButton(tr("reset the TC_LFR_UPDATE_TIME Packet coarse and fine times")); |
|
73 | 73 | clearConsoleButton = new QPushButton(tr("Clear")); |
|
74 | 74 | |
|
75 | 75 | selectGRESB_BUTTON = new QRadioButton(tr("GRESB")); |
|
76 | 76 | selectStarDundee_BUTTON = new QRadioButton(tr("Star Dundee")); |
|
77 | 77 | |
|
78 | 78 | //*** SPINBOX ***// |
|
79 | 79 | gresbVirtualLinkSpinBox = new QSpinBox; |
|
80 | 80 | rmapSourceLogicalAddressSpinBox = new QSpinBox; |
|
81 | 81 | rmapTargetLogicalAddressSpinBox = new QSpinBox; |
|
82 | 82 | spwLinkSpinBox = new QSpinBox;; |
|
83 | 83 | CCSDSTargetLogicalAddressSpinBox = new QSpinBox; |
|
84 | 84 | gresbVirtualLinkSpinBox->setRange(0, 4); |
|
85 | 85 | gresbVirtualLinkSpinBox->setValue(1); |
|
86 | 86 | rmapSourceLogicalAddressSpinBox->setRange(0, 255); |
|
87 | 87 | rmapSourceLogicalAddressSpinBox->setValue(33); |
|
88 | 88 | rmapTargetLogicalAddressSpinBox->setRange(0, 255); |
|
89 | 89 | spwLinkSpinBox->setRange(0, 2); |
|
90 | 90 | spwLinkSpinBox->setValue(0); |
|
91 | 91 | CCSDSTargetLogicalAddressSpinBox->setRange(0,255); |
|
92 | 92 | CCSDSTargetLogicalAddressSpinBox->setValue(254); |
|
93 | 93 | |
|
94 | 94 | //*** MISC **// |
|
95 | 95 | starDundee = new StarDundee; |
|
96 | 96 | gresbBridge = new gresb; |
|
97 | 97 | console = new QTextEdit; |
|
98 | 98 | gresbBridgeIPDialogBox = new QIPDialogBox; |
|
99 | 99 | gresbStatusQueryDialog = new QDialog; |
|
100 | 100 | logEnableCheckBox = new QCheckBox(tr("Enable Logs")); |
|
101 | 101 | RMAP_write_verify = new QCheckBox(tr("data checked before write\nlimited to 4 bytes\nNOT IMPLEMENTED")); |
|
102 | 102 | RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable")); |
|
103 | 103 | spwLinkStatusEnquiry = new gresbStatusEnquiry; |
|
104 | 104 | logFile = new QFile(); |
|
105 | 105 | |
|
106 | 106 | logFileEn = false; |
|
107 | 107 | |
|
108 | 108 | connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0); |
|
109 | 109 | connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0); |
|
110 | 110 | connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0); |
|
111 | 111 | connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0); |
|
112 | 112 | connectionLayout->addWidget(spwLinkLabel, 2, 0, 0); |
|
113 | 113 | connectionLayout->addWidget(spwLinkSpinBox, 2, 1, 0); |
|
114 | 114 | connectionLayout->addWidget(rmapSourceLogicalAddressLabel, 3, 0, 0); |
|
115 | 115 | connectionLayout->addWidget(rmapSourceLogicalAddressSpinBox, 3, 1, 0); |
|
116 | 116 | connectionLayout->addWidget(rmapSendStateLabel, 4, 0, 1, 2); |
|
117 | 117 | connectionLayout->addWidget(rmapReceiveStateLabel, 5, 0, 1, 2); |
|
118 | 118 | connectionLayout->addWidget(gresbStatusQueryLabel, 6, 0, 1, 2); |
|
119 | 119 | |
|
120 | 120 | connectionLayout->setRowStretch(7, 1); |
|
121 | 121 | connectionLayout->setColumnStretch(2, 1); |
|
122 | 122 | |
|
123 | 123 | bridgeSelection_LAYOUT->addWidget(selectGRESB_BUTTON, 0, 0, 1, 1); |
|
124 | 124 | bridgeSelection_LAYOUT->addWidget(selectStarDundee_BUTTON, 0, 1, 1, 1); |
|
125 | 125 | bridgeSelection_LAYOUT->setRowStretch(1, 1); |
|
126 | 126 | bridgeSelection_LAYOUT->setColumnStretch(2, 1); |
|
127 | 127 | |
|
128 | 128 | generalParameters_LAYOUT->addWidget(logEnableCheckBox, 0, 0, 1, 1); |
|
129 | 129 | generalParameters_LAYOUT->addWidget(logFileChooseButton, 0, 1, 1, 1); |
|
130 | 130 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressLabel, 1, 0, 0); |
|
131 | 131 | generalParameters_LAYOUT->addWidget(rmapTargetLogicalAddressSpinBox, 1, 1, 0); |
|
132 | 132 | generalParameters_LAYOUT->addWidget(rmapOpenCommunicationButton, 2, 0, 1, 1); |
|
133 | 133 | generalParameters_LAYOUT->addWidget(rmapCloseCommunicationButton, 2, 1, 1, 1); |
|
134 | 134 | generalParameters_LAYOUT->addWidget(RMAP_write_verify, 3, 0, 1, 2); |
|
135 | 135 | generalParameters_LAYOUT->addWidget(RMAP_write_reply, 4, 0, 1, 2); |
|
136 | 136 | generalParameters_LAYOUT->setRowStretch(5, 1); |
|
137 | 137 | generalParameters_LAYOUT->setColumnStretch(2, 1); |
|
138 | 138 | |
|
139 | 139 | gresb_GROUPBOX->setLayout(connectionLayout); |
|
140 | //gresb_GROUPBOX->setLayout(gresbBridge->layout()); | |
|
140 | 141 | gresb_GROUPBOX->setVisible(false); |
|
141 | 142 | stardundee_GROUPBOX->setLayout(starDundee->layout()); |
|
142 | 143 | stardundee_GROUPBOX->setVisible(false); |
|
143 | 144 | selection_GROUPBOX->setLayout(bridgeSelection_LAYOUT); |
|
144 | 145 | generalParameters_GROUPBOX->setLayout(generalParameters_LAYOUT); |
|
145 | 146 | selectionLayout->addWidget(selection_GROUPBOX); |
|
146 | 147 | selectionLayout->addWidget(generalParameters_GROUPBOX); |
|
147 | 148 | selectionLayout->addWidget(gresb_GROUPBOX); |
|
148 | 149 | selectionLayout->addWidget(stardundee_GROUPBOX); |
|
149 | 150 | |
|
150 | 151 | ccsdsLayout->addWidget(sendCCSDSCommandButton); |
|
151 | 152 | ccsdsLayout->addWidget(send_TC_LFR_UPDATE_TIME_Button); |
|
152 | 153 | ccsdsLayout->addWidget(reset_TC_LFR_UPDATE_TIME_Button); |
|
153 | 154 | ccsdsLayout->addWidget(sendCCSDSCommandLabel); |
|
154 | 155 | ccsdsLayout->addWidget(CCSDSTargetLogicalAddressSpinBox); |
|
155 | 156 | |
|
156 | 157 | consoleLayout->addWidget(console); |
|
157 | 158 | consoleLayout->addWidget(clearConsoleButton); |
|
158 | 159 | |
|
159 | 160 | connect(this->logFileChooseButton, SIGNAL(clicked()), this, SLOT(chooseLogFile())); |
|
160 | 161 | connect(this, SIGNAL(setLogFileName(QString)), this->logFileName, SLOT(setText(QString))); |
|
161 | 162 | connect(this->logEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(logFileEnDisable(int))); |
|
162 | 163 | |
|
163 | 164 | spwTabWidget->addTab(spwTabWidgetPage0, tr("connection")); |
|
164 | 165 | spwTabWidget->addTab(spwTabWidgetPage1, tr("ccsds")); |
|
165 | 166 | spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); |
|
166 | 167 | spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); |
|
167 | 168 | spwTabWidget->addTab(spwTabWidgetPage4, tr("DMA")); |
|
168 | 169 | spwTabWidget->addTab(spwTabWidgetPage5, tr("gresb")); |
|
169 | 170 | |
|
170 | 171 | spwTabWidgetPage0->setLayout(selectionLayout); |
|
171 | 172 | spwTabWidgetPage1->setLayout(ccsdsLayout); |
|
172 | 173 | spwTabWidgetPage2->setLayout(this->spwLinkStatusEnquiry->mainLayout); |
|
173 | 174 | spwTabWidgetPage3->setLayout(consoleLayout); |
|
174 | 175 | spwTabWidgetPage4->setLayout(spectralMatricesDMASimulator->mainLayout); |
|
175 | 176 | spwTabWidgetPage5->setLayout(gresbBridge->layout()); |
|
176 | 177 | mainLayout->addWidget(spwTabWidget); |
|
177 | 178 | setLayout(mainLayout); |
|
178 | 179 | |
|
179 | 180 | // GRESB STATUS QUERY DIALOG |
|
180 | 181 | gresbStatusQueryDialogLayout = new QGridLayout; |
|
181 | 182 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryDialogLabel, 0, 0, 1, 2); |
|
182 | 183 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryRetryButton, 1, 0, 0); |
|
183 | 184 | gresbStatusQueryDialogLayout->addWidget(gresbStatusQueryAbortButton, 1, 1, 0); |
|
184 | 185 | gresbStatusQueryDialog->setLayout(gresbStatusQueryDialogLayout); |
|
185 | 186 | |
|
186 | 187 | connect(gresbStatusQueryAbortButton, SIGNAL(clicked()), gresbStatusQueryDialog, SLOT(reject())); |
|
187 | 188 | connect(this->clearConsoleButton, SIGNAL(clicked()), this->console, SLOT(clear())); |
|
188 | 189 | connect(this->selectGRESB_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); |
|
189 | 190 | connect(this->selectStarDundee_BUTTON, SIGNAL(clicked()), this, SLOT(selectionBetweenGresbAndStarDundee())); |
|
190 | 191 | connect(this->starDundee, SIGNAL(isOpen(bool)), this, SLOT(isOpen(bool))); |
|
191 | 192 | connect(this->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->starDundee, SLOT(targetHasChanged(int))); |
|
192 | 193 | |
|
193 | 194 | // command code |
|
194 | 195 | connect(this->RMAP_write_reply, SIGNAL(clicked()), this, SLOT(getCommandCode())); |
|
195 | 196 | connect(this->RMAP_write_verify, SIGNAL(clicked()), this, SLOT(getCommandCode())); |
|
196 | 197 | connect(this, SIGNAL(commandCodeHasChanged(RMAP_command_codes)), this->starDundee, SLOT(commandCodeHasChanged(RMAP_command_codes))); |
|
197 | 198 | |
|
198 | 199 | getCommandCode(); // init the command code value |
|
199 | 200 | rmapTargetLogicalAddressSpinBox->setValue(254); |
|
200 | 201 | } |
|
201 | 202 | |
|
202 | void rmapPluginUI::connectPort() | |
|
203 | { | |
|
204 | //emit this->connectPortsig(ui->PortName->text(),ui->PortspeedSlider->value()); | |
|
205 | } | |
|
206 | ||
|
207 | void rmapPluginUI::setConnected(bool connected) | |
|
208 | { | |
|
209 | /*if(connected == true) | |
|
210 | { | |
|
211 | ui->OpenPort->setText(tr("Close port")); | |
|
212 | } | |
|
213 | else | |
|
214 | ui->OpenPort->setText(tr("Open port"));*/ | |
|
215 | } | |
|
216 | ||
|
217 | 203 | rmapPluginUI::~rmapPluginUI() |
|
218 | 204 | { |
|
219 | 205 | //delete ui; |
|
220 | 206 | } |
|
221 | 207 | |
|
222 | 208 | void rmapPluginUI::chooseLogFile() |
|
223 | 209 | { |
|
224 | 210 | if(this->logFile->isOpen()) |
|
225 | 211 | this->logFile->close(); |
|
226 | 212 | this->logFile->setFileName(QFileDialog::getSaveFileName(this,tr("Open Log file"), |
|
227 | 213 | QDir::homePath() |
|
228 | 214 | + "/" |
|
229 | 215 | + QDate::currentDate().toString() |
|
230 | 216 | + "_" |
|
231 | 217 | + QTime::currentTime().toString() |
|
232 | 218 | + "_rmapPluginUI.log", |
|
233 | 219 | tr("Log Files (*.txt *.log)"))); |
|
234 | 220 | if(this->logFile->open(QIODevice::WriteOnly)) |
|
235 | 221 | { |
|
236 | 222 | this->logFileStrm = new QTextStream(this->logFile); |
|
237 | 223 | emit this->setLogFileName(this->logFile->fileName()); |
|
238 | 224 | } |
|
239 | 225 | } |
|
240 | 226 | |
|
241 | 227 | void rmapPluginUI::logFileEnDisable(int state) |
|
242 | 228 | { |
|
243 | 229 | if(state==Qt::Checked) |
|
244 | 230 | { |
|
245 | 231 | this->logFileEn = true; |
|
246 | 232 | } |
|
247 | 233 | else if(state==Qt::Unchecked) |
|
248 | 234 | { |
|
249 | 235 | this->logFileEn = false; |
|
250 | 236 | } |
|
251 | 237 | } |
|
252 | 238 | |
|
253 | 239 | bool rmapPluginUI::islogfileenable() |
|
254 | 240 | { |
|
255 | 241 | return this->logFileEn; |
|
256 | 242 | } |
|
257 | 243 | |
|
258 | 244 | void rmapPluginUI::appendToLogFile(const QString & text) |
|
259 | 245 | { |
|
260 | 246 | if(this->logFileEn && this->logFile->isOpen()) |
|
261 | 247 | { |
|
262 | 248 | *(this->logFileStrm) << text << endl; |
|
263 | 249 | } |
|
264 | 250 | } |
|
265 | 251 | |
|
266 | 252 | void rmapPluginUI::closeEvent(QCloseEvent *event) |
|
267 | 253 | { |
|
268 | 254 | if(this->logFile->isOpen()) |
|
269 | 255 | { |
|
270 | 256 | this->logFileStrm->flush(); |
|
271 | 257 | this->logFile->waitForBytesWritten(3000); |
|
272 | 258 | this->logFile->close(); |
|
273 | 259 | } |
|
274 | 260 | event->accept(); |
|
275 | 261 | } |
|
276 | 262 | |
|
277 | 263 | RMAP_command_codes rmapPluginUI::getCommandCode() |
|
278 | 264 | { |
|
279 | 265 | RMAP_command_codes commandCode = invalid0; |
|
280 | 266 | if (RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_rep; |
|
281 | 267 | if (RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_ver_noRep; |
|
282 | 268 | if (!RMAP_write_verify->isChecked() and RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_Rep; |
|
283 | 269 | if (!RMAP_write_verify->isChecked() and !RMAP_write_reply->isChecked()) commandCode = writeSingle_noVer_noRep; |
|
284 | 270 | emit commandCodeHasChanged(commandCode); |
|
285 | 271 | return commandCode; |
|
286 | 272 | } |
|
287 | 273 | |
|
288 | 274 | // SLOT |
|
289 | 275 | |
|
290 | 276 | void rmapPluginUI::selectionBetweenGresbAndStarDundee() //SLOT |
|
291 | 277 | { |
|
292 | 278 | if (selectGRESB_BUTTON->isChecked()) |
|
293 | 279 | { |
|
294 | 280 | gresb_GROUPBOX->setVisible(true); |
|
295 | 281 | stardundee_GROUPBOX->setVisible(false); |
|
296 | 282 | rmapOpenCommunicationButton->setEnabled(true); |
|
297 | 283 | emit bridgeHasChanged(selectedBridgeIsGRESB); |
|
298 | 284 | } |
|
299 | 285 | if (selectStarDundee_BUTTON->isChecked()) |
|
300 | 286 | { |
|
301 | 287 | stardundee_GROUPBOX->setVisible(true); |
|
302 | 288 | gresb_GROUPBOX->setVisible(false); |
|
303 | 289 | rmapOpenCommunicationButton->setEnabled(true); |
|
304 | 290 | emit bridgeHasChanged(selectedBridgeIsStarDundee); |
|
305 | 291 | } |
|
306 | 292 | } |
|
307 | 293 | |
|
308 | 294 | void rmapPluginUI::isOpen(bool flag) |
|
309 | 295 | { |
|
310 | 296 | if (flag == true) |
|
311 | 297 | { |
|
312 | 298 | selection_GROUPBOX->setEnabled(false); |
|
313 | 299 | this->rmapOpenCommunicationButton->setEnabled(false); |
|
314 | 300 | this->rmapCloseCommunicationButton->setEnabled(true); |
|
315 | 301 | } |
|
316 | 302 | if (flag == false) |
|
317 | 303 | { |
|
318 | 304 | selection_GROUPBOX->setEnabled(true); |
|
319 | 305 | this->rmapOpenCommunicationButton->setEnabled(true); |
|
320 | 306 | this->rmapCloseCommunicationButton->setEnabled(false); |
|
321 | 307 | } |
|
322 | 308 | } |
|
323 | 309 | |
|
324 | 310 |
@@ -1,161 +1,159 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the LPPMON Software |
|
3 | 3 | -- Copyright (C) 20011, Laboratory of Plasma Physics - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Paul Leroy |
|
20 | 20 | -- Mail : paul.leroy@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef RMAPPLUGINUI_H |
|
23 | 23 | #define RMAPPLUGINUI_H |
|
24 | 24 | |
|
25 | 25 | #include <QWidget> |
|
26 | 26 | #include <QPushButton> |
|
27 | 27 | #include <QLabel> |
|
28 | 28 | #include <QSlider> |
|
29 | 29 | #include <QSpinBox> |
|
30 | 30 | #include <QGridLayout> |
|
31 | 31 | #include <QCheckBox> |
|
32 | 32 | #include <QFile> |
|
33 | 33 | #include <QTextStream> |
|
34 | 34 | #include <QFileDialog> |
|
35 | 35 | #include <QDir> |
|
36 | 36 | #include <QDialog> |
|
37 | 37 | #include <QCloseEvent> |
|
38 | 38 | #include <QTabWidget> |
|
39 | 39 | #include "qipdialogbox.h" |
|
40 | 40 | #include <rmapoperations.h> |
|
41 | 41 | #include <gresbstatusenquiry.h> |
|
42 | 42 | #include <QTextEdit> |
|
43 | 43 | #include "spectralmatricesdmasimulator.h" |
|
44 | 44 | #include <stardundee.h> |
|
45 | 45 | #include <gresb.h> |
|
46 | 46 | #include <QRadioButton> |
|
47 | 47 | #include <QGroupBox> |
|
48 | 48 | |
|
49 | 49 | enum selectedBridge{ |
|
50 | 50 | selectedBridgeIsUnknown, |
|
51 | 51 | selectedBridgeIsGRESB, |
|
52 | 52 | selectedBridgeIsStarDundee |
|
53 | 53 | }; |
|
54 | 54 | |
|
55 | 55 | class rmapPluginUI : public QWidget |
|
56 | 56 | { |
|
57 | 57 | Q_OBJECT |
|
58 | 58 | |
|
59 | 59 | public: |
|
60 | 60 | explicit rmapPluginUI(QWidget *parent = 0); |
|
61 | 61 | ~rmapPluginUI(); |
|
62 | 62 | |
|
63 | 63 | QPushButton* rmapOpenCommunicationButton; |
|
64 | 64 | QPushButton* rmapCloseCommunicationButton; |
|
65 | 65 | QPushButton* logFileChooseButton; |
|
66 | 66 | QPushButton* gresbStatusQueryRetryButton; |
|
67 | 67 | QPushButton* gresbStatusQueryAbortButton; |
|
68 | 68 | QPushButton* sendCCSDSCommandButton; |
|
69 | 69 | QPushButton* send_TC_LFR_UPDATE_TIME_Button; |
|
70 | 70 | QPushButton* reset_TC_LFR_UPDATE_TIME_Button; |
|
71 | 71 | QPushButton* clearConsoleButton; |
|
72 | 72 | |
|
73 | 73 | QRadioButton* selectGRESB_BUTTON; |
|
74 | 74 | QRadioButton* selectStarDundee_BUTTON; |
|
75 | 75 | |
|
76 | 76 | QGroupBox *selection_GROUPBOX; |
|
77 | 77 | |
|
78 | 78 | QSpinBox* gresbVirtualLinkSpinBox; |
|
79 | 79 | QSpinBox* spwLinkSpinBox; |
|
80 | 80 | QSpinBox* rmapSourceLogicalAddressSpinBox; |
|
81 | 81 | QSpinBox* rmapTargetLogicalAddressSpinBox; |
|
82 | 82 | QSpinBox* CCSDSTargetLogicalAddressSpinBox; |
|
83 | 83 | |
|
84 | 84 | QIPDialogBox* gresbBridgeIPDialogBox; |
|
85 | 85 | |
|
86 | 86 | QCheckBox *logEnableCheckBox; |
|
87 | 87 | QCheckBox *RMAP_write_verify; |
|
88 | 88 | QCheckBox *RMAP_write_reply; |
|
89 | 89 | |
|
90 | 90 | QLabel* rmapSendStateLabel; |
|
91 | 91 | QLabel* rmapReceiveStateLabel; |
|
92 | 92 | QLabel* gresbStatusQueryLabel; |
|
93 | 93 | QLabel* gresbStatusQueryDialogLabel; |
|
94 | 94 | QLabel* sendCCSDSCommandLabel; |
|
95 | 95 | |
|
96 | 96 | QDialog* gresbStatusQueryDialog; |
|
97 | 97 | |
|
98 | 98 | gresbStatusEnquiry* spwLinkStatusEnquiry; |
|
99 | 99 | |
|
100 | 100 | SpectralMatricesDMASimulator *spectralMatricesDMASimulator; |
|
101 | 101 | |
|
102 | 102 | QTextEdit* console; |
|
103 | 103 | |
|
104 | 104 | StarDundee *starDundee; |
|
105 | 105 | |
|
106 | 106 | gresb *gresbBridge; |
|
107 | 107 | |
|
108 | 108 | bool islogfileenable(); |
|
109 | 109 | void appendToLogFile(const QString & text); |
|
110 | 110 | void closeEvent(QCloseEvent *event); |
|
111 | 111 | |
|
112 | 112 | public slots: |
|
113 | void setConnected(bool connected); | |
|
114 | void connectPort(); | |
|
115 | 113 | void chooseLogFile(); |
|
116 | 114 | void logFileEnDisable(int state); |
|
117 | 115 | RMAP_command_codes getCommandCode(); |
|
118 | 116 | |
|
119 | 117 | private slots: |
|
120 | 118 | void selectionBetweenGresbAndStarDundee(); |
|
121 | 119 | void isOpen(bool flag); |
|
122 | 120 | |
|
123 | 121 | signals: |
|
124 | 122 | void connectPortsig(QString PortName,int baudrate); |
|
125 | 123 | void setLogFileName(QString FileName); |
|
126 | 124 | void commandCodeHasChanged(RMAP_command_codes commandCode); |
|
127 | 125 | void bridgeHasChanged(selectedBridge bridge); |
|
128 | 126 | void targetHasChanged(unsigned char target); |
|
129 | 127 | |
|
130 | 128 | private: |
|
131 | 129 | QLabel *gresbBridgeIPLabel; |
|
132 | 130 | QLabel *gresbVirtualLinkLabel; |
|
133 | 131 | QLabel *spwLinkLabel; |
|
134 | 132 | QLabel *rmapSourceLogicalAddressLabel; |
|
135 | 133 | QLabel *rmapTargetLogicalAddressLabel; |
|
136 | 134 | QLabel *logFileName; |
|
137 | 135 | |
|
138 | 136 | QGridLayout *bridgeSelection_LAYOUT; |
|
139 | 137 | QVBoxLayout *selectionLayout; |
|
140 | 138 | QVBoxLayout *mainLayout; |
|
141 | 139 | QGridLayout *connectionLayout; |
|
142 | 140 | QVBoxLayout *ccsdsLayout; |
|
143 | 141 | QVBoxLayout *consoleLayout; |
|
144 | 142 | QGridLayout *gresbStatusQueryDialogLayout; |
|
145 | 143 | QGridLayout *generalParameters_LAYOUT; |
|
146 | 144 | |
|
147 | 145 | QTabWidget *spwTabWidget; |
|
148 | 146 | |
|
149 | 147 | QWidget* bridgeWidget; |
|
150 | 148 | |
|
151 | 149 | QGroupBox *gresb_GROUPBOX; |
|
152 | 150 | QGroupBox *stardundee_GROUPBOX; |
|
153 | 151 | QGroupBox *generalParameters_GROUPBOX; |
|
154 | 152 | |
|
155 | 153 | QFile *logFile; |
|
156 | 154 | QTextStream *logFileStrm; |
|
157 | 155 | bool logFileEn; |
|
158 | 156 | |
|
159 | 157 | }; |
|
160 | 158 | |
|
161 | 159 | #endif // RMAPPLUGINUI_H |
@@ -1,130 +1,113 | |||
|
1 | 1 | #include "spwpacketreceiver.h" |
|
2 | 2 | #include <QTime> |
|
3 | 3 | #include "rmapoperations.h" |
|
4 | 4 | |
|
5 | 5 | spwpacketreceiver::spwpacketreceiver(QObject *parent) : |
|
6 | 6 | QObject(parent) |
|
7 | 7 | { |
|
8 | 8 | rmapPacketSEMAPHORE = new QSemaphore; |
|
9 | 9 | ccsdsPacketSEMAPHORE = new QSemaphore; |
|
10 | 10 | rmapPacket = (char*) malloc(RMAP_MAX_PACKET_LENGTH); |
|
11 | 11 | ccsdsPacket = (unsigned char*) malloc(CCSDS_MAX_PACKET_LENGTH); |
|
12 | 12 | spwPacket = (char*) malloc( qMax(RMAP_MAX_PACKET_LENGTH, CCSDS_MAX_PACKET_LENGTH) ); |
|
13 | 13 | connect(this, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), this, SLOT(processCCSDSPacket(unsigned char*,uint))); |
|
14 | 14 | } |
|
15 | 15 | |
|
16 | 16 | spwpacketreceiver::~spwpacketreceiver() |
|
17 | 17 | { |
|
18 | 18 | free(rmapPacket); |
|
19 | 19 | free(ccsdsPacket); |
|
20 | 20 | free(spwPacket); |
|
21 | 21 | } |
|
22 | 22 | |
|
23 | 23 | int spwpacketreceiver::receiveSPWPacket(unsigned char requestID) // SLOT |
|
24 | 24 | { |
|
25 | 25 | QTime spwPacketReceiverTimeout; |
|
26 | 26 | // GRESB HEADER |
|
27 | 27 | char RES_TR_EP; // 6 bits REserved + 1 bit TRuncated + 1 bit EP error end of packet |
|
28 | 28 | unsigned char packetLength2; |
|
29 | 29 | unsigned char packetLength1; |
|
30 | 30 | unsigned char packetLength0; |
|
31 | 31 | unsigned int packetLength; |
|
32 | 32 | |
|
33 | 33 | if (requestID==1) |
|
34 | 34 | { |
|
35 | 35 | if (rmapPacketSEMAPHORE->available()) return rmapPacketSize; |
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | gresbReceptionSocket->blockSignals(1); // block the signals of the socket during packet reception |
|
39 | 39 | // READ THE GRESB HEADER OF THE INCOMING PACKET |
|
40 | 40 | spwPacketReceiverTimeout.start(); |
|
41 | 41 | while(gresbReceptionSocket->bytesAvailable() < 4) |
|
42 | 42 | { |
|
43 | 43 | gresbReceptionSocket->waitForReadyRead(100); |
|
44 | 44 | if(spwPacketReceiverTimeout.elapsed()>1000) return -1; // ERROR === read GRSEB header TIMEOUT |
|
45 | 45 | } |
|
46 | 46 | gresbReceptionSocket->read(&RES_TR_EP, 1); |
|
47 | 47 | gresbReceptionSocket->read( (char*) &packetLength2, 1); |
|
48 | 48 | gresbReceptionSocket->read( (char*) &packetLength1, 1); |
|
49 | 49 | gresbReceptionSocket->read( (char*) &packetLength0, 1); |
|
50 | 50 | packetLength = (packetLength2<<16) + (packetLength1<<8) + (packetLength0); |
|
51 | 51 | spwPacket = (char*) malloc(packetLength); |
|
52 | 52 | |
|
53 | 53 | // READ THE SPW PACKET |
|
54 | 54 | while(gresbReceptionSocket->bytesAvailable() < packetLength) |
|
55 | 55 | { |
|
56 | 56 | gresbReceptionSocket->waitForReadyRead(100); |
|
57 | 57 | if(spwPacketReceiverTimeout.elapsed()>1000) return -2; // ERROR === read SPW packet TIMEOUT |
|
58 | 58 | } |
|
59 | 59 | gresbReceptionSocket->read( spwPacket, packetLength ); |
|
60 | 60 | gresbReceptionSocket->blockSignals(0); |
|
61 | 61 | |
|
62 | 62 | switch(spwPacket[1]) // byte 1 is the protocole identifier in the SPW packet |
|
63 | 63 | { |
|
64 | 64 | case 1: // 0x01 is the protocole identifier for RMAP packets |
|
65 | 65 | if (rmapPacketSEMAPHORE->available()!=0) return -3; // ERROR === previous RMAP packet not processed yet |
|
66 | 66 | for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i]; |
|
67 | 67 | rmapPacketSize = packetLength; |
|
68 | 68 | rmapPacketSEMAPHORE->release(); |
|
69 | 69 | //emit sendMessage("RMAP packet of size " + QString::number(packetLength) + " received"); |
|
70 | 70 | return packetLength; |
|
71 | 71 | |
|
72 | 72 | case 2: // 0x02 is the protocole identifier for CCSDS packets |
|
73 | 73 | if (ccsdsPacketSEMAPHORE->available()!=0) return -4; // ERROR === previous CCSDS packet not processed yet |
|
74 | 74 | for(unsigned int i=0; i<packetLength; i++) ccsdsPacket[i] = spwPacket[i]; |
|
75 | 75 | ccsdsPacketSize = packetLength; |
|
76 | 76 | ccsdsPacketSEMAPHORE->release(); |
|
77 | 77 | emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); |
|
78 | 78 | return packetLength; |
|
79 | 79 | } |
|
80 | 80 | return 0; |
|
81 | 81 | } |
|
82 | 82 | |
|
83 | bool spwpacketreceiver::isRMAPPacketSemaphoreAvailable() | |
|
84 | { | |
|
85 | if (rmapPacketSEMAPHORE->available()!=0) return true; | |
|
86 | return false; | |
|
87 | } | |
|
88 | ||
|
89 | void spwpacketreceiver::acquireRMAPSemaphore() | |
|
90 | { | |
|
91 | rmapPacketSEMAPHORE->acquire(); | |
|
92 | } | |
|
93 | ||
|
94 | void spwpacketreceiver::acquireCCSDSSemaphore() | |
|
95 | { | |
|
96 | ccsdsPacketSEMAPHORE->acquire(); | |
|
97 | } | |
|
98 | ||
|
99 | void spwpacketreceiver::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) | |
|
83 | void spwpacketreceiver::processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) // SLOT | |
|
100 | 84 | { |
|
101 | 85 | QString message; |
|
102 | 86 | unsigned int fine_time_value = 0; |
|
103 | 87 | fine_time_value = ((unsigned int) ccsdsPacket[7]<<24) |
|
104 | 88 | + ((unsigned int) ccsdsPacket[6]<<16) |
|
105 | 89 | + ((unsigned int) ccsdsPacket[5]<<8) |
|
106 | 90 | + ((unsigned int) ccsdsPacket[4]); |
|
107 | 91 | message.append(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": "); |
|
108 | 92 | message.append("size " |
|
109 | 93 | + QString::number(size) |
|
110 | 94 | +" *** header " |
|
111 | 95 | + QString::number(ccsdsPacket[0], 16) |
|
112 | 96 | + " " |
|
113 | 97 | + QString::number(ccsdsPacket[1], 16) |
|
114 | 98 | + " " |
|
115 | 99 | + QString::number(ccsdsPacket[2], 16) |
|
116 | 100 | + " " |
|
117 | 101 | + QString::number(ccsdsPacket[3], 16) |
|
118 | 102 | + " *** coarse time " |
|
119 | 103 | + QString::number(fine_time_value)); |
|
120 | 104 | //+ QString::number(ccsdsPacket[4], 16) |
|
121 | 105 | //+" " |
|
122 | 106 | //+ QString::number(ccsdsPacket[5], 16) |
|
123 | 107 | //+" " |
|
124 | 108 | //+ QString::number(ccsdsPacket[6], 16) |
|
125 | 109 | //+" " |
|
126 | 110 | //+ QString::number(ccsdsPacket[7], 16)); |
|
127 | 111 | ccsdsPacketSEMAPHORE->acquire(); |
|
128 | 112 | emit sendMessage(message); |
|
129 | 113 | } |
|
130 |
@@ -1,36 +1,35 | |||
|
1 | 1 | #ifndef SPWPACKETRECEIVER_H |
|
2 | 2 | #define SPWPACKETRECEIVER_H |
|
3 | 3 | |
|
4 | 4 | #include <QSemaphore> |
|
5 | 5 | #include <QTcpSocket> |
|
6 | 6 | |
|
7 | 7 | class spwpacketreceiver : public QObject |
|
8 | 8 | { |
|
9 | 9 | Q_OBJECT |
|
10 | 10 | public: |
|
11 | 11 | explicit spwpacketreceiver(QObject *parent = 0); |
|
12 | 12 | ~spwpacketreceiver(); |
|
13 | 13 | int fetchRMAPPacket(); |
|
14 | void acquireRMAPSemaphore(); | |
|
15 | void acquireCCSDSSemaphore(); | |
|
16 | bool isRMAPPacketSemaphoreAvailable(); | |
|
14 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->acquire();} | |
|
15 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->acquire();} | |
|
17 | 16 | |
|
18 | 17 | unsigned char* ccsdsPacket; |
|
19 | 18 | char* rmapPacket; |
|
20 | 19 | char* spwPacket; |
|
21 | 20 | unsigned int rmapPacketSize; |
|
22 | 21 | unsigned int ccsdsPacketSize; |
|
23 | 22 | QSemaphore* rmapPacketSEMAPHORE; |
|
24 | 23 | QSemaphore* ccsdsPacketSEMAPHORE; |
|
25 | 24 | QTcpSocket* gresbReceptionSocket; |
|
26 | 25 | |
|
27 | 26 | public slots: |
|
28 | 27 | int receiveSPWPacket(unsigned char requestID = 0); // request ID by default is 0 for CCSDS |
|
29 | 28 | void processCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); |
|
30 | 29 | |
|
31 | 30 | signals: |
|
32 | 31 | void ccsdsPacketAvailable(unsigned char* ccsdsPacket, unsigned int size); |
|
33 | 32 | void sendMessage(QString message); |
|
34 | 33 | }; |
|
35 | 34 | |
|
36 | 35 | #endif // SPWPACKETRECEIVER_H |
@@ -1,81 +1,82 | |||
|
1 | 1 | #ifndef STARDUNDEE_H |
|
2 | 2 | #define STARDUNDEE_H |
|
3 | 3 | |
|
4 | 4 | #include <QWidget> |
|
5 | 5 | #include "spw_usb_api.h" |
|
6 | 6 | #include "spw_config_library.h" |
|
7 | 7 | #include <QPushButton> |
|
8 | 8 | #include <QGridLayout> |
|
9 | 9 | #include <QSpinBox> |
|
10 | 10 | #include <QLabel> |
|
11 | 11 | #include <QSemaphore> |
|
12 | 12 | #include "rmapoperations.h" |
|
13 | 13 | |
|
14 | 14 | #define BWAIT_0 0 |
|
15 | 15 | #define BWAIT_1 1 |
|
16 | 16 | |
|
17 | 17 | class StarDundee : public QWidget |
|
18 | 18 | { |
|
19 | 19 | Q_OBJECT |
|
20 | 20 | public: |
|
21 | 21 | explicit StarDundee(QWidget *parent = 0); |
|
22 | 22 | ~StarDundee(); |
|
23 | 23 | unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
24 | 24 | unsigned int Read(unsigned int *Value,unsigned int count,unsigned int address=0); |
|
25 | 25 | unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); |
|
26 | 26 | |
|
27 | 27 | signals: |
|
28 | 28 | void sendMessage(QString message); |
|
29 | 29 | void isOpen(bool); |
|
30 | 30 | void RMAP_write_reply_setText(QString); |
|
31 | 31 | void appendToLog(QString); |
|
32 | 32 | void ccsdsPacketAvailable(unsigned char*, unsigned int); |
|
33 | 33 | |
|
34 | 34 | public slots: |
|
35 | 35 | void Open(); |
|
36 | 36 | void Close(); |
|
37 | 37 | int receiveSPWPacket(unsigned char requestID); |
|
38 | 38 | void commandCodeHasChanged(RMAP_command_codes code) {this->commandCode = code;} |
|
39 | 39 | void targetHasChanged(int target) {rmapTargetLogicalAddress = (unsigned char) target;} |
|
40 | 40 | void sourceHasChanged(int target) {rmapSourceLogicalAddress = (unsigned char) target;} |
|
41 | 41 | |
|
42 | 42 | private: |
|
43 | unsigned int getLinkStatus(unsigned char link); | |
|
44 | unsigned int GetRoutingTableEntry(); | |
|
45 | 43 | unsigned int WriteBLOCK(char *data,unsigned int nbBytes,unsigned int address=0); |
|
46 | 44 | unsigned int ReadBLOCK(unsigned int nbBytes,unsigned int address=0); |
|
47 | 45 | void acquireRMAPSemaphore() {rmapPacketSEMAPHORE->acquire();} |
|
48 | 46 | void acquireCCSDSSemaphore() {ccsdsPacketSEMAPHORE->acquire();} |
|
49 | 47 | |
|
48 | unsigned int getLinkStatus(unsigned char link); | |
|
49 | unsigned int GetRoutingTableEntry(); | |
|
50 | ||
|
50 | 51 | unsigned char rmapTargetLogicalAddress ; |
|
51 | 52 | unsigned char rmapSourceLogicalAddress ; |
|
52 | 53 | |
|
53 | 54 | RMAP_command_codes commandCode; |
|
54 | 55 | |
|
55 | 56 | QLabel *usbDeviceNumber_LABEL; |
|
56 | 57 | QLabel *linkNumber_LABEL; |
|
57 | 58 | QLabel *sourceLogicalAddress_LABEL; |
|
58 | 59 | |
|
59 | 60 | QSpinBox *usbDeviceNumber_SPINBOX; |
|
60 | 61 | QSpinBox *linkNumber_SPINBOX; |
|
61 | 62 | QSpinBox *sourceLogicalAddress_SPINBOX; |
|
62 | 63 | |
|
63 | 64 | QGridLayout *connection_LAYOUT; |
|
64 | 65 | |
|
65 | 66 | unsigned char pBuffer[10]; // Pointer to the start of the user buffer from which to transmit data |
|
66 | 67 | USB_SPACEWIRE_ID pIdentifier; // A pointer to a variable which will be set to contain a unique identifier for the send |
|
67 | 68 | |
|
68 | 69 | star_device_handle hDevice; // Handle to the SpaceWire device |
|
69 | 70 | USB_SPACEWIRE_STATUS result; // The result of the send operation |
|
70 | 71 | |
|
71 | 72 | // Packet receiver |
|
72 | 73 | QSemaphore *rmapPacketSEMAPHORE; |
|
73 | 74 | QSemaphore *ccsdsPacketSEMAPHORE; |
|
74 | 75 | char* rmapPacket; // The buffer to receive RMAP READ packets |
|
75 | 76 | unsigned char *ccsdsPacket; |
|
76 | 77 | char *spwPacket; |
|
77 | 78 | unsigned int rmapPacketSize; |
|
78 | 79 | unsigned int ccsdsPacketSize; |
|
79 | 80 | }; |
|
80 | 81 | |
|
81 | 82 | #endif // STARDUNDEE_H |
General Comments 0
You need to be logged in to leave comments.
Login now