@@ -1,339 +1,339 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 3.0.0, 2014-02- |
|
3 | <!-- Written by QtCreator 3.0.0, 2014-02-20T06:55:01. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">1</value> |
|
7 | <value type="int">1</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | |
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
16 | <value type="QString" key="language">Cpp</value> |
|
16 | <value type="QString" key="language">Cpp</value> | |
17 | <valuemap type="QVariantMap" key="value"> |
|
17 | <valuemap type="QVariantMap" key="value"> | |
18 | <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | </valuemap> |
|
20 | </valuemap> | |
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
22 | <value type="QString" key="language">QmlJS</value> |
|
22 | <value type="QString" key="language">QmlJS</value> | |
23 | <valuemap type="QVariantMap" key="value"> |
|
23 | <valuemap type="QVariantMap" key="value"> | |
24 | <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | </valuemap> |
|
26 | </valuemap> | |
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> | |
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
|
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | |
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
45 | </valuemap> |
|
45 | </valuemap> | |
46 | </data> |
|
46 | </data> | |
47 | <data> |
|
47 | <data> | |
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
49 | <valuemap type="QVariantMap"/> |
|
49 | <valuemap type="QVariantMap"/> | |
50 | </data> |
|
50 | </data> | |
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | |
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e04e3924-0bd8-4708-be18-f1474e45608e}</value> |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e04e3924-0bd8-4708-be18-f1474e45608e}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> |
|
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
72 | </valuemap> |
|
72 | </valuemap> | |
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
79 | <value type="QString">-w</value> |
|
79 | <value type="QString">-w</value> | |
80 | <value type="QString">-r</value> |
|
80 | <value type="QString">-r</value> | |
81 | </valuelist> |
|
81 | </valuelist> | |
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
85 | </valuemap> |
|
85 | </valuemap> | |
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
90 | </valuemap> |
|
90 | </valuemap> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
98 | <value type="QString">-w</value> |
|
98 | <value type="QString">-w</value> | |
99 | <value type="QString">-r</value> |
|
99 | <value type="QString">-r</value> | |
100 | </valuelist> |
|
100 | </valuelist> | |
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
104 | </valuemap> |
|
104 | </valuemap> | |
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
109 | </valuemap> |
|
109 | </valuemap> | |
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | |
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
126 | </valuemap> |
|
126 | </valuemap> | |
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
|
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
131 | </valuemap> |
|
131 | </valuemap> | |
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> |
|
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | |
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> |
|
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | |
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
|
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | |
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> |
|
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | |
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
153 | <value type="int">0</value> |
|
153 | <value type="int">0</value> | |
154 | <value type="int">1</value> |
|
154 | <value type="int">1</value> | |
155 | <value type="int">2</value> |
|
155 | <value type="int">2</value> | |
156 | <value type="int">3</value> |
|
156 | <value type="int">3</value> | |
157 | <value type="int">4</value> |
|
157 | <value type="int">4</value> | |
158 | <value type="int">5</value> |
|
158 | <value type="int">5</value> | |
159 | <value type="int">6</value> |
|
159 | <value type="int">6</value> | |
160 | <value type="int">7</value> |
|
160 | <value type="int">7</value> | |
161 | <value type="int">8</value> |
|
161 | <value type="int">8</value> | |
162 | <value type="int">9</value> |
|
162 | <value type="int">9</value> | |
163 | <value type="int">10</value> |
|
163 | <value type="int">10</value> | |
164 | <value type="int">11</value> |
|
164 | <value type="int">11</value> | |
165 | <value type="int">12</value> |
|
165 | <value type="int">12</value> | |
166 | <value type="int">13</value> |
|
166 | <value type="int">13</value> | |
167 | <value type="int">14</value> |
|
167 | <value type="int">14</value> | |
168 | </valuelist> |
|
168 | </valuelist> | |
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> | |
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> |
|
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | |
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> |
|
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> | |
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
185 | </valuemap> |
|
185 | </valuemap> | |
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
187 | </valuemap> |
|
187 | </valuemap> | |
188 | </data> |
|
188 | </data> | |
189 | <data> |
|
189 | <data> | |
190 | <variable>ProjectExplorer.Project.Target.1</variable> |
|
190 | <variable>ProjectExplorer.Project.Target.1</variable> | |
191 | <valuemap type="QVariantMap"> |
|
191 | <valuemap type="QVariantMap"> | |
192 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
192 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
193 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
193 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
194 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
194 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
195 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
195 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
196 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
196 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
197 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
197 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
198 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
198 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
199 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> |
|
199 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> | |
200 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
200 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
201 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
201 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
202 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
202 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
203 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
203 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
204 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
204 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
205 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
205 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
206 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
206 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
207 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
207 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
208 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
208 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
209 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
209 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
210 | </valuemap> |
|
210 | </valuemap> | |
211 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
211 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
212 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
212 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
213 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
213 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
214 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
214 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
215 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
215 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
216 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
216 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
217 | <value type="QString">-w</value> |
|
217 | <value type="QString">-w</value> | |
218 | <value type="QString">-r</value> |
|
218 | <value type="QString">-r</value> | |
219 | </valuelist> |
|
219 | </valuelist> | |
220 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
220 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
221 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
221 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
222 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
222 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
223 | </valuemap> |
|
223 | </valuemap> | |
224 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
224 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
225 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
225 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
226 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
226 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
228 | </valuemap> |
|
228 | </valuemap> | |
229 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
229 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
230 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
230 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
231 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
231 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
232 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
232 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
233 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
233 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
234 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
234 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
235 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
235 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
236 | <value type="QString">-w</value> |
|
236 | <value type="QString">-w</value> | |
237 | <value type="QString">-r</value> |
|
237 | <value type="QString">-r</value> | |
238 | </valuelist> |
|
238 | </valuelist> | |
239 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
239 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
240 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
240 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
241 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
241 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
242 | </valuemap> |
|
242 | </valuemap> | |
243 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
243 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
244 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
244 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
245 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
245 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
246 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
246 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
247 | </valuemap> |
|
247 | </valuemap> | |
248 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
248 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
249 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
249 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
250 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
250 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
251 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> |
|
251 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | |
252 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
252 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
253 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
253 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
254 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
254 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
255 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
|
255 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | |
256 | </valuemap> |
|
256 | </valuemap> | |
257 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
257 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
258 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
258 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
259 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
259 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
260 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
260 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
261 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
261 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
262 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
262 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
263 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
263 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
264 | </valuemap> |
|
264 | </valuemap> | |
265 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
265 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
266 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
|
266 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | |
267 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
267 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
268 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
268 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
269 | </valuemap> |
|
269 | </valuemap> | |
270 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
270 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
271 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
271 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
272 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
272 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
273 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
273 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
274 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
274 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
275 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
275 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
276 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
276 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
277 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
277 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
278 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
278 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
279 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
279 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
280 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
280 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
281 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
281 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
282 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> |
|
282 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | |
283 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
283 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
284 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
284 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
285 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> |
|
285 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | |
286 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
|
286 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | |
287 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> |
|
287 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | |
288 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
288 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
289 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
289 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
290 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
290 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
291 | <value type="int">0</value> |
|
291 | <value type="int">0</value> | |
292 | <value type="int">1</value> |
|
292 | <value type="int">1</value> | |
293 | <value type="int">2</value> |
|
293 | <value type="int">2</value> | |
294 | <value type="int">3</value> |
|
294 | <value type="int">3</value> | |
295 | <value type="int">4</value> |
|
295 | <value type="int">4</value> | |
296 | <value type="int">5</value> |
|
296 | <value type="int">5</value> | |
297 | <value type="int">6</value> |
|
297 | <value type="int">6</value> | |
298 | <value type="int">7</value> |
|
298 | <value type="int">7</value> | |
299 | <value type="int">8</value> |
|
299 | <value type="int">8</value> | |
300 | <value type="int">9</value> |
|
300 | <value type="int">9</value> | |
301 | <value type="int">10</value> |
|
301 | <value type="int">10</value> | |
302 | <value type="int">11</value> |
|
302 | <value type="int">11</value> | |
303 | <value type="int">12</value> |
|
303 | <value type="int">12</value> | |
304 | <value type="int">13</value> |
|
304 | <value type="int">13</value> | |
305 | <value type="int">14</value> |
|
305 | <value type="int">14</value> | |
306 | </valuelist> |
|
306 | </valuelist> | |
307 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
307 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
308 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
308 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
309 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
309 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> | |
310 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
310 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
311 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
311 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
312 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
312 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
313 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
313 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
314 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
314 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
315 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
315 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
316 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
316 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
317 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
317 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
318 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
318 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
319 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
319 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
320 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
320 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
321 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
321 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
322 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
322 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
323 | </valuemap> |
|
323 | </valuemap> | |
324 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
324 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
325 | </valuemap> |
|
325 | </valuemap> | |
326 | </data> |
|
326 | </data> | |
327 | <data> |
|
327 | <data> | |
328 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
328 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
329 | <value type="int">2</value> |
|
329 | <value type="int">2</value> | |
330 | </data> |
|
330 | </data> | |
331 | <data> |
|
331 | <data> | |
332 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
332 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
333 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
333 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
334 | </data> |
|
334 | </data> | |
335 | <data> |
|
335 | <data> | |
336 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
336 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
337 | <value type="int">15</value> |
|
337 | <value type="int">15</value> | |
338 | </data> |
|
338 | </data> | |
339 | </qtcreator> |
|
339 | </qtcreator> |
@@ -1,612 +1,609 | |||||
1 | #ifndef CCSDS_TYPES_H_INCLUDED |
|
1 | #ifndef CCSDS_TYPES_H_INCLUDED | |
2 | #define CCSDS_TYPES_H_INCLUDED |
|
2 | #define CCSDS_TYPES_H_INCLUDED | |
3 |
|
3 | |||
4 | #include "fsw_params_processing.h" |
|
4 | #include "fsw_params_processing.h" | |
5 |
|
5 | |||
6 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 |
|
6 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 | |
7 | #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4 |
|
7 | #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4 | |
8 | #define CCSDS_TM_PKT_MAX_SIZE 4412 |
|
8 | #define CCSDS_TM_PKT_MAX_SIZE 4412 | |
9 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 |
|
9 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 | |
10 | #define CCSDS_TC_PKT_MAX_SIZE 256 |
|
10 | #define CCSDS_TC_PKT_MAX_SIZE 256 | |
11 | #define CCSDS_TC_PKT_MIN_SIZE 16 |
|
11 | #define CCSDS_TC_PKT_MIN_SIZE 16 | |
12 | #define CCSDS_TC_TM_PACKET_OFFSET 7 |
|
12 | #define CCSDS_TC_TM_PACKET_OFFSET 7 | |
13 | #define CCSDS_PROCESS_ID 76 |
|
13 | #define CCSDS_PROCESS_ID 76 | |
14 | #define CCSDS_PACKET_CATEGORY 12 |
|
14 | #define CCSDS_PACKET_CATEGORY 12 | |
15 | #define CCSDS_NODE_ADDRESS 0xfe |
|
15 | #define CCSDS_NODE_ADDRESS 0xfe | |
16 | #define CCSDS_USER_APP 0x00 |
|
16 | #define CCSDS_USER_APP 0x00 | |
17 |
|
17 | |||
18 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 |
|
18 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 | |
19 | #define DEFAULT_RESERVED 0x00 |
|
19 | #define DEFAULT_RESERVED 0x00 | |
20 | #define DEFAULT_HKBIA 0x1e // 0001 1110 |
|
20 | #define DEFAULT_HKBIA 0x1e // 0001 1110 | |
21 |
|
21 | |||
22 | // PACKET ID |
|
22 | // PACKET ID | |
23 | #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1 |
|
23 | #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1 | |
24 | #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4 |
|
24 | #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4 | |
25 | #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9 |
|
25 | #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9 | |
26 | #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 |
|
26 | #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 | |
27 | #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 |
|
27 | #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 | |
28 | #define TM_PACKET_PID_DEFAULT 76 |
|
28 | #define TM_PACKET_PID_DEFAULT 76 | |
29 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 |
|
29 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 | |
30 | #define TM_PACKET_CAT_TC_EXE 1 |
|
30 | #define TM_PACKET_CAT_TC_EXE 1 | |
31 | #define TM_PACKET_CAT_HK 4 |
|
31 | #define TM_PACKET_CAT_HK 4 | |
32 | #define TM_PACKET_CAT_PARAMETER_DUMP 9 |
|
32 | #define TM_PACKET_CAT_PARAMETER_DUMP 9 | |
33 | #define TM_PACKET_CAT_SCIENCE 12 |
|
33 | #define TM_PACKET_CAT_SCIENCE 12 | |
34 |
|
34 | |||
35 | // PACKET SEQUENCE CONTROL |
|
35 | // PACKET SEQUENCE CONTROL | |
36 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] |
|
36 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] | |
37 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] |
|
37 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] | |
38 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] |
|
38 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] | |
39 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] |
|
39 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] | |
40 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] |
|
40 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] | |
41 |
|
41 | |||
42 | // DESTINATION ID |
|
42 | // DESTINATION ID | |
43 | #define TM_DESTINATION_ID_GROUND 0 |
|
43 | #define TM_DESTINATION_ID_GROUND 0 | |
44 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 |
|
44 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 | |
45 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 |
|
45 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 | |
46 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 |
|
46 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 | |
47 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 |
|
47 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 | |
48 | #define TM_DESTINATION_ID_DIRECT_CMD 120 |
|
48 | #define TM_DESTINATION_ID_DIRECT_CMD 120 | |
49 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 |
|
49 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 | |
50 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 |
|
50 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 | |
51 | #define TM_DESTINATION_ID_OBCP 15 |
|
51 | #define TM_DESTINATION_ID_OBCP 15 | |
52 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 |
|
52 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 | |
53 | #define TM_DESTINATION_ID_AOCS 11 |
|
53 | #define TM_DESTINATION_ID_AOCS 11 | |
54 |
|
54 | |||
55 | #define CCSDS_DESTINATION_ID 0x01 |
|
55 | #define CCSDS_DESTINATION_ID 0x01 | |
56 | #define CCSDS_PROTOCOLE_ID 0x02 |
|
56 | #define CCSDS_PROTOCOLE_ID 0x02 | |
57 | #define CCSDS_RESERVED 0x00 |
|
57 | #define CCSDS_RESERVED 0x00 | |
58 | #define CCSDS_USER_APP 0x00 |
|
58 | #define CCSDS_USER_APP 0x00 | |
59 |
|
59 | |||
60 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 |
|
60 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 | |
61 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 |
|
61 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 | |
62 | #define SIZE_HK_PARAMETERS 112 |
|
62 | #define SIZE_HK_PARAMETERS 112 | |
63 |
|
63 | |||
64 | // TC TYPES |
|
64 | // TC TYPES | |
65 | #define TC_TYPE_GEN 181 |
|
65 | #define TC_TYPE_GEN 181 | |
66 | #define TC_TYPE_TIME 9 |
|
66 | #define TC_TYPE_TIME 9 | |
67 |
|
67 | |||
68 | // TC SUBTYPES |
|
68 | // TC SUBTYPES | |
69 | #define TC_SUBTYPE_RESET 1 |
|
69 | #define TC_SUBTYPE_RESET 1 | |
70 | #define TC_SUBTYPE_LOAD_COMM 11 |
|
70 | #define TC_SUBTYPE_LOAD_COMM 11 | |
71 | #define TC_SUBTYPE_LOAD_NORM 13 |
|
71 | #define TC_SUBTYPE_LOAD_NORM 13 | |
72 | #define TC_SUBTYPE_LOAD_BURST 19 |
|
72 | #define TC_SUBTYPE_LOAD_BURST 19 | |
73 | #define TC_SUBTYPE_LOAD_SBM1 25 |
|
73 | #define TC_SUBTYPE_LOAD_SBM1 25 | |
74 | #define TC_SUBTYPE_LOAD_SBM2 27 |
|
74 | #define TC_SUBTYPE_LOAD_SBM2 27 | |
75 | #define TC_SUBTYPE_DUMP 31 |
|
75 | #define TC_SUBTYPE_DUMP 31 | |
76 | #define TC_SUBTYPE_ENTER 41 |
|
76 | #define TC_SUBTYPE_ENTER 41 | |
77 | #define TC_SUBTYPE_UPDT_INFO 51 |
|
77 | #define TC_SUBTYPE_UPDT_INFO 51 | |
78 | #define TC_SUBTYPE_EN_CAL 61 |
|
78 | #define TC_SUBTYPE_EN_CAL 61 | |
79 | #define TC_SUBTYPE_DIS_CAL 63 |
|
79 | #define TC_SUBTYPE_DIS_CAL 63 | |
80 | #define TC_SUBTYPE_UPDT_TIME 129 |
|
80 | #define TC_SUBTYPE_UPDT_TIME 129 | |
81 |
|
81 | |||
82 | // TC LEN |
|
82 | // TC LEN | |
83 | #define TC_LEN_RESET 12 |
|
83 | #define TC_LEN_RESET 12 | |
84 | #define TC_LEN_LOAD_COMM 14 |
|
84 | #define TC_LEN_LOAD_COMM 14 | |
85 | #define TC_LEN_LOAD_NORM 22 |
|
85 | #define TC_LEN_LOAD_NORM 22 | |
86 | #define TC_LEN_LOAD_BURST 14 |
|
86 | #define TC_LEN_LOAD_BURST 14 | |
87 | #define TC_LEN_LOAD_SBM1 14 |
|
87 | #define TC_LEN_LOAD_SBM1 14 | |
88 | #define TC_LEN_LOAD_SBM2 14 |
|
88 | #define TC_LEN_LOAD_SBM2 14 | |
89 | #define TC_LEN_DUMP 12 |
|
89 | #define TC_LEN_DUMP 12 | |
90 | #define TC_LEN_ENTER 20 |
|
90 | #define TC_LEN_ENTER 20 | |
91 | #define TC_LEN_UPDT_INFO 46 |
|
91 | #define TC_LEN_UPDT_INFO 46 | |
92 | #define TC_LEN_EN_CAL 12 |
|
92 | #define TC_LEN_EN_CAL 12 | |
93 | #define TC_LEN_DIS_CAL 12 |
|
93 | #define TC_LEN_DIS_CAL 12 | |
94 | #define TC_LEN_UPDT_TIME 18 |
|
94 | #define TC_LEN_UPDT_TIME 18 | |
95 |
|
95 | |||
96 | // TM TYPES |
|
96 | // TM TYPES | |
97 | #define TM_TYPE_TC_EXE 1 |
|
97 | #define TM_TYPE_TC_EXE 1 | |
98 | #define TM_TYPE_HK 3 |
|
98 | #define TM_TYPE_HK 3 | |
99 | #define TM_TYPE_PARAMETER_DUMP 3 |
|
99 | #define TM_TYPE_PARAMETER_DUMP 3 | |
100 | #define TM_TYPE_LFR_SCIENCE 21 |
|
100 | #define TM_TYPE_LFR_SCIENCE 21 | |
101 |
|
101 | |||
102 | // TM SUBTYPES |
|
102 | // TM SUBTYPES | |
103 | #define TM_SUBTYPE_EXE_OK 7 |
|
103 | #define TM_SUBTYPE_EXE_OK 7 | |
104 | #define TM_SUBTYPE_EXE_NOK 8 |
|
104 | #define TM_SUBTYPE_EXE_NOK 8 | |
105 | #define TM_SUBTYPE_HK 25 |
|
105 | #define TM_SUBTYPE_HK 25 | |
106 | #define TM_SUBTYPE_PARAMETER_DUMP 25 |
|
106 | #define TM_SUBTYPE_PARAMETER_DUMP 25 | |
107 | #define TM_SUBTYPE_SCIENCE 3 |
|
107 | #define TM_SUBTYPE_SCIENCE 3 | |
108 | #define TM_SUBTYPE_LFR_SCIENCE 3 |
|
108 | #define TM_SUBTYPE_LFR_SCIENCE 3 | |
109 |
|
109 | |||
110 | // FAILURE CODES |
|
110 | // FAILURE CODES | |
111 | #define ILLEGAL_APID 0 |
|
111 | #define ILLEGAL_APID 0 | |
112 | #define WRONG_LEN_PKT 1 |
|
112 | #define WRONG_LEN_PKT 1 | |
113 | #define INCOR_CHECKSUM 2 |
|
113 | #define INCOR_CHECKSUM 2 | |
114 | #define ILL_TYPE 3 |
|
114 | #define ILL_TYPE 3 | |
115 | #define ILL_SUBTYPE 4 |
|
115 | #define ILL_SUBTYPE 4 | |
116 | #define WRONG_APP_DATA 5 // 0x00 0x05 |
|
116 | #define WRONG_APP_DATA 5 // 0x00 0x05 | |
117 | #define TC_NOT_EXE 42000 // 0xa4 0x10 |
|
117 | #define TC_NOT_EXE 42000 // 0xa4 0x10 | |
118 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 |
|
118 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 | |
119 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 |
|
119 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 | |
120 | #define FAIL_DETECTED 42003 // 0xa4 0x13 |
|
120 | #define FAIL_DETECTED 42003 // 0xa4 0x13 | |
121 | #define NOT_ALLOWED 42004 // 0xa4 0x14 |
|
121 | #define NOT_ALLOWED 42004 // 0xa4 0x14 | |
122 | #define CORRUPTED 42005 // 0xa4 0x15 |
|
122 | #define CORRUPTED 42005 // 0xa4 0x15 | |
123 | #define CCSDS_TM_VALID 7 |
|
123 | #define CCSDS_TM_VALID 7 | |
124 |
|
124 | |||
125 | // TC SID |
|
125 | // TC SID | |
126 | #define SID_TC_GROUND 0 |
|
126 | #define SID_TC_GROUND 0 | |
127 | #define SID_TC_MISSION_TIMELINE 110 |
|
127 | #define SID_TC_MISSION_TIMELINE 110 | |
128 | #define SID_TC_TC_SEQUENCES 111 |
|
128 | #define SID_TC_TC_SEQUENCES 111 | |
129 | #define SID_TC_RECOVERY_ACTION_CMD 112 |
|
129 | #define SID_TC_RECOVERY_ACTION_CMD 112 | |
130 | #define SID_TC_BACKUP_MISSION_TIMELINE 113 |
|
130 | #define SID_TC_BACKUP_MISSION_TIMELINE 113 | |
131 | #define SID_TC_DIRECT_CMD 120 |
|
131 | #define SID_TC_DIRECT_CMD 120 | |
132 | #define SID_TC_SPARE_GRD_SRC1 121 |
|
132 | #define SID_TC_SPARE_GRD_SRC1 121 | |
133 | #define SID_TC_SPARE_GRD_SRC2 122 |
|
133 | #define SID_TC_SPARE_GRD_SRC2 122 | |
134 | #define SID_TC_OBCP 15 |
|
134 | #define SID_TC_OBCP 15 | |
135 | #define SID_TC_SYSTEM_CONTROL 14 |
|
135 | #define SID_TC_SYSTEM_CONTROL 14 | |
136 | #define SID_TC_AOCS 11 |
|
136 | #define SID_TC_AOCS 11 | |
137 | #define SID_TC_RPW_INTERNAL 254 |
|
137 | #define SID_TC_RPW_INTERNAL 254 | |
138 |
|
138 | |||
139 | enum apid_destid{ |
|
139 | enum apid_destid{ | |
140 | GROUND, |
|
140 | GROUND, | |
141 | MISSION_TIMELINE, |
|
141 | MISSION_TIMELINE, | |
142 | TC_SEQUENCES, |
|
142 | TC_SEQUENCES, | |
143 | RECOVERY_ACTION_CMD, |
|
143 | RECOVERY_ACTION_CMD, | |
144 | BACKUP_MISSION_TIMELINE, |
|
144 | BACKUP_MISSION_TIMELINE, | |
145 | DIRECT_CMD, |
|
145 | DIRECT_CMD, | |
146 | SPARE_GRD_SRC1, |
|
146 | SPARE_GRD_SRC1, | |
147 | SPARE_GRD_SRC2, |
|
147 | SPARE_GRD_SRC2, | |
148 | OBCP, |
|
148 | OBCP, | |
149 | SYSTEM_CONTROL, |
|
149 | SYSTEM_CONTROL, | |
150 | AOCS, |
|
150 | AOCS, | |
151 | RPW_INTERNAL |
|
151 | RPW_INTERNAL | |
152 | }; |
|
152 | }; | |
153 | // SEQUENCE COUNTERS |
|
153 | // SEQUENCE COUNTERS | |
154 | #define SEQ_CNT_MAX 16383 |
|
154 | #define SEQ_CNT_MAX 16383 | |
155 | #define SEQ_CNT_NB_DEST_ID 12 |
|
155 | #define SEQ_CNT_NB_DEST_ID 12 | |
156 |
|
156 | |||
157 | // TM SID |
|
157 | // TM SID | |
158 | #define SID_HK 1 |
|
158 | #define SID_HK 1 | |
159 | #define SID_PARAMETER_DUMP 10 |
|
159 | #define SID_PARAMETER_DUMP 10 | |
160 |
|
160 | |||
161 | #define SID_NORM_SWF_F0 3 |
|
161 | #define SID_NORM_SWF_F0 3 | |
162 | #define SID_NORM_SWF_F1 4 |
|
162 | #define SID_NORM_SWF_F1 4 | |
163 | #define SID_NORM_SWF_F2 5 |
|
163 | #define SID_NORM_SWF_F2 5 | |
164 | #define SID_NORM_CWF_F3 1 |
|
164 | #define SID_NORM_CWF_F3 1 | |
165 | #define SID_BURST_CWF_F2 2 |
|
165 | #define SID_BURST_CWF_F2 2 | |
166 | #define SID_SBM1_CWF_F1 24 |
|
166 | #define SID_SBM1_CWF_F1 24 | |
167 | #define SID_SBM2_CWF_F2 25 |
|
167 | #define SID_SBM2_CWF_F2 25 | |
168 | #define SID_NORM_ASM_F0 11 |
|
168 | #define SID_NORM_ASM_F0 11 | |
169 | #define SID_NORM_ASM_F1 12 |
|
169 | #define SID_NORM_ASM_F1 12 | |
170 | #define SID_NORM_ASM_F2 13 |
|
170 | #define SID_NORM_ASM_F2 13 | |
171 | #define SID_NORM_BP1_F0 14 |
|
171 | #define SID_NORM_BP1_F0 14 | |
172 | #define SID_NORM_BP1_F1 15 |
|
172 | #define SID_NORM_BP1_F1 15 | |
173 | #define SID_NORM_BP1_F2 16 |
|
173 | #define SID_NORM_BP1_F2 16 | |
174 | #define SID_NORM_BP2_F0 19 |
|
174 | #define SID_NORM_BP2_F0 19 | |
175 | #define SID_NORM_BP2_F1 20 |
|
175 | #define SID_NORM_BP2_F1 20 | |
176 | #define SID_NORM_BP2_F2 21 |
|
176 | #define SID_NORM_BP2_F2 21 | |
177 | #define SID_BURST_BP1_F0 17 |
|
177 | #define SID_BURST_BP1_F0 17 | |
178 | #define SID_BURST_BP2_F0 22 |
|
178 | #define SID_BURST_BP2_F0 22 | |
179 | #define SID_BURST_BP1_F1 18 |
|
179 | #define SID_BURST_BP1_F1 18 | |
180 | #define SID_BURST_BP2_F1 23 |
|
180 | #define SID_BURST_BP2_F1 23 | |
181 | #define SID_SBM1_BP1_F0 28 |
|
181 | #define SID_SBM1_BP1_F0 28 | |
182 | #define SID_SBM1_BP2_F0 31 |
|
182 | #define SID_SBM1_BP2_F0 31 | |
183 | #define SID_SBM2_BP1_F0 29 |
|
183 | #define SID_SBM2_BP1_F0 29 | |
184 | #define SID_SBM2_BP2_F0 32 |
|
184 | #define SID_SBM2_BP2_F0 32 | |
185 | #define SID_SBM2_BP1_F1 30 |
|
185 | #define SID_SBM2_BP1_F1 30 | |
186 | #define SID_SBM2_BP2_F1 33 |
|
186 | #define SID_SBM2_BP2_F1 33 | |
187 | #define SID_NORM_CWF_LONG_F3 34 |
|
187 | #define SID_NORM_CWF_LONG_F3 34 | |
188 |
|
188 | |||
189 | // LENGTH (BYTES) |
|
189 | // LENGTH (BYTES) | |
190 | #define LENGTH_TM_LFR_TC_EXE_MAX 32 |
|
190 | #define LENGTH_TM_LFR_TC_EXE_MAX 32 | |
191 | #define LENGTH_TM_LFR_HK 126 |
|
191 | #define LENGTH_TM_LFR_HK 126 | |
192 |
|
192 | |||
193 | // HEADER_LENGTH |
|
193 | // HEADER_LENGTH | |
194 | #define TM_HEADER_LEN 16 |
|
194 | #define TM_HEADER_LEN 16 | |
195 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28 |
|
195 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28 | |
196 | // PACKET_LENGTH |
|
196 | // PACKET_LENGTH | |
197 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) |
|
197 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) | |
198 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
198 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
199 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
199 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
200 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
200 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
201 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
201 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
202 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) |
|
202 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) | |
203 | #define PACKET_LENGTH_HK (124 - CCSDS_TC_TM_PACKET_OFFSET) |
|
203 | #define PACKET_LENGTH_HK (124 - CCSDS_TC_TM_PACKET_OFFSET) | |
204 | #define PACKET_LENGTH_PARAMETER_DUMP (36 - CCSDS_TC_TM_PACKET_OFFSET) |
|
204 | #define PACKET_LENGTH_PARAMETER_DUMP (36 - CCSDS_TC_TM_PACKET_OFFSET) | |
205 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0 (TOTAL_SIZE_ASM_F0 + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET) |
|
205 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0 2221 // 44 * 25 * 2 + 28 - 7 | |
206 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1 (TOTAL_SIZE_ASM_F1 + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET) |
|
206 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1 2621 // 52 * 25 * 2 + 28 - 7 | |
207 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F2 (TOTAL_SIZE_ASM_F2 + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET) |
|
207 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F2 2421 // 48 * 25 * 2 + 28 - 7 | |
208 |
|
208 | |||
209 | #define SPARE1_PUSVERSION_SPARE2 0x10 |
|
209 | #define SPARE1_PUSVERSION_SPARE2 0x10 | |
210 |
|
210 | |||
211 | #define LEN_TM_LFR_HK 130 // 126 + 4 |
|
|||
212 | #define LEN_TM_LFR_TC_EXE_NOT_IMP 28 // 24 + 4 |
|
|||
213 |
|
||||
214 | // R1 |
|
211 | // R1 | |
215 | #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1 |
|
212 | #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1 | |
216 | #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1 |
|
213 | #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1 | |
217 | #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1 |
|
214 | #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1 | |
218 | #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1 |
|
215 | #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1 | |
219 | #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1 |
|
216 | #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1 | |
220 | #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1 |
|
217 | #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1 | |
221 | // R2 |
|
218 | // R2 | |
222 | #define TM_LEN_SCI_SWF_304 3669 // 304 * 12 + 10 + 12 - 1 |
|
219 | #define TM_LEN_SCI_SWF_304 3669 // 304 * 12 + 10 + 12 - 1 | |
223 | #define TM_LEN_SCI_SWF_224 2709 // 224 * 12 + 10 + 12 - 1 |
|
220 | #define TM_LEN_SCI_SWF_224 2709 // 224 * 12 + 10 + 12 - 1 | |
224 | #define TM_LEN_SCI_CWF_336 4051 // 336 * 12 + 10 + 10 - 1 |
|
221 | #define TM_LEN_SCI_CWF_336 4051 // 336 * 12 + 10 + 10 - 1 | |
225 | #define TM_LEN_SCI_CWF_672 4051 // 672 * 6 + 10 + 10 - 1 |
|
222 | #define TM_LEN_SCI_CWF_672 4051 // 672 * 6 + 10 + 10 - 1 | |
226 | // |
|
223 | // | |
227 | #define DEFAULT_PKTCNT 0x07 |
|
224 | #define DEFAULT_PKTCNT 0x07 | |
228 | #define BLK_NR_304 0x0130 |
|
225 | #define BLK_NR_304 0x0130 | |
229 | #define BLK_NR_224 0x00e0 |
|
226 | #define BLK_NR_224 0x00e0 | |
230 | #define BLK_NR_CWF 0x0150 // 336 |
|
227 | #define BLK_NR_CWF 0x0150 // 336 | |
231 | #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672 |
|
228 | #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672 | |
232 |
|
229 | |||
233 | enum TM_TYPE{ |
|
230 | enum TM_TYPE{ | |
234 | TM_LFR_TC_EXE_OK, |
|
231 | TM_LFR_TC_EXE_OK, | |
235 | TM_LFR_TC_EXE_ERR, |
|
232 | TM_LFR_TC_EXE_ERR, | |
236 | TM_LFR_HK, |
|
233 | TM_LFR_HK, | |
237 | TM_LFR_SCI, |
|
234 | TM_LFR_SCI, | |
238 | TM_LFR_SCI_SBM, |
|
235 | TM_LFR_SCI_SBM, | |
239 | TM_LFR_PAR_DUMP |
|
236 | TM_LFR_PAR_DUMP | |
240 | }; |
|
237 | }; | |
241 |
|
238 | |||
242 | typedef struct { |
|
239 | typedef struct { | |
243 | unsigned char targetLogicalAddress; |
|
240 | unsigned char targetLogicalAddress; | |
244 | unsigned char protocolIdentifier; |
|
241 | unsigned char protocolIdentifier; | |
245 | unsigned char reserved; |
|
242 | unsigned char reserved; | |
246 | unsigned char userApplication; |
|
243 | unsigned char userApplication; | |
247 | // PACKET HEADER |
|
244 | // PACKET HEADER | |
248 | unsigned char packetID[2]; |
|
245 | unsigned char packetID[2]; | |
249 | unsigned char packetSequenceControl[2]; |
|
246 | unsigned char packetSequenceControl[2]; | |
250 | unsigned char packetLength[2]; |
|
247 | unsigned char packetLength[2]; | |
251 | // DATA FIELD HEADER |
|
248 | // DATA FIELD HEADER | |
252 | unsigned char spare1_pusVersion_spare2; |
|
249 | unsigned char spare1_pusVersion_spare2; | |
253 | unsigned char serviceType; |
|
250 | unsigned char serviceType; | |
254 | unsigned char serviceSubType; |
|
251 | unsigned char serviceSubType; | |
255 | unsigned char destinationID; |
|
252 | unsigned char destinationID; | |
256 | unsigned char time[6]; |
|
253 | unsigned char time[6]; | |
257 | // |
|
254 | // | |
258 | unsigned char telecommand_pkt_id[2]; |
|
255 | unsigned char telecommand_pkt_id[2]; | |
259 | unsigned char pkt_seq_control[2]; |
|
256 | unsigned char pkt_seq_control[2]; | |
260 | } Packet_TM_LFR_TC_EXE_SUCCESS_t; |
|
257 | } Packet_TM_LFR_TC_EXE_SUCCESS_t; | |
261 |
|
258 | |||
262 | typedef struct { |
|
259 | typedef struct { | |
263 | unsigned char targetLogicalAddress; |
|
260 | unsigned char targetLogicalAddress; | |
264 | unsigned char protocolIdentifier; |
|
261 | unsigned char protocolIdentifier; | |
265 | unsigned char reserved; |
|
262 | unsigned char reserved; | |
266 | unsigned char userApplication; |
|
263 | unsigned char userApplication; | |
267 | // PACKET HEADER |
|
264 | // PACKET HEADER | |
268 | unsigned char packetID[2]; |
|
265 | unsigned char packetID[2]; | |
269 | unsigned char packetSequenceControl[2]; |
|
266 | unsigned char packetSequenceControl[2]; | |
270 | unsigned char packetLength[2]; |
|
267 | unsigned char packetLength[2]; | |
271 | // DATA FIELD HEADER |
|
268 | // DATA FIELD HEADER | |
272 | unsigned char spare1_pusVersion_spare2; |
|
269 | unsigned char spare1_pusVersion_spare2; | |
273 | unsigned char serviceType; |
|
270 | unsigned char serviceType; | |
274 | unsigned char serviceSubType; |
|
271 | unsigned char serviceSubType; | |
275 | unsigned char destinationID; |
|
272 | unsigned char destinationID; | |
276 | unsigned char time[6]; |
|
273 | unsigned char time[6]; | |
277 | // |
|
274 | // | |
278 | unsigned char tc_failure_code[2]; |
|
275 | unsigned char tc_failure_code[2]; | |
279 | unsigned char telecommand_pkt_id[2]; |
|
276 | unsigned char telecommand_pkt_id[2]; | |
280 | unsigned char pkt_seq_control[2]; |
|
277 | unsigned char pkt_seq_control[2]; | |
281 | unsigned char tc_service; |
|
278 | unsigned char tc_service; | |
282 | unsigned char tc_subtype; |
|
279 | unsigned char tc_subtype; | |
283 | unsigned char byte_position; |
|
280 | unsigned char byte_position; | |
284 | unsigned char rcv_value; |
|
281 | unsigned char rcv_value; | |
285 | } Packet_TM_LFR_TC_EXE_INCONSISTENT_t; |
|
282 | } Packet_TM_LFR_TC_EXE_INCONSISTENT_t; | |
286 |
|
283 | |||
287 | typedef struct { |
|
284 | typedef struct { | |
288 | unsigned char targetLogicalAddress; |
|
285 | unsigned char targetLogicalAddress; | |
289 | unsigned char protocolIdentifier; |
|
286 | unsigned char protocolIdentifier; | |
290 | unsigned char reserved; |
|
287 | unsigned char reserved; | |
291 | unsigned char userApplication; |
|
288 | unsigned char userApplication; | |
292 | // PACKET HEADER |
|
289 | // PACKET HEADER | |
293 | unsigned char packetID[2]; |
|
290 | unsigned char packetID[2]; | |
294 | unsigned char packetSequenceControl[2]; |
|
291 | unsigned char packetSequenceControl[2]; | |
295 | unsigned char packetLength[2]; |
|
292 | unsigned char packetLength[2]; | |
296 | // DATA FIELD HEADER |
|
293 | // DATA FIELD HEADER | |
297 | unsigned char spare1_pusVersion_spare2; |
|
294 | unsigned char spare1_pusVersion_spare2; | |
298 | unsigned char serviceType; |
|
295 | unsigned char serviceType; | |
299 | unsigned char serviceSubType; |
|
296 | unsigned char serviceSubType; | |
300 | unsigned char destinationID; |
|
297 | unsigned char destinationID; | |
301 | unsigned char time[6]; |
|
298 | unsigned char time[6]; | |
302 | // |
|
299 | // | |
303 | unsigned char tc_failure_code[2]; |
|
300 | unsigned char tc_failure_code[2]; | |
304 | unsigned char telecommand_pkt_id[2]; |
|
301 | unsigned char telecommand_pkt_id[2]; | |
305 | unsigned char pkt_seq_control[2]; |
|
302 | unsigned char pkt_seq_control[2]; | |
306 | unsigned char tc_service; |
|
303 | unsigned char tc_service; | |
307 | unsigned char tc_subtype; |
|
304 | unsigned char tc_subtype; | |
308 | unsigned char lfr_status_word[2]; |
|
305 | unsigned char lfr_status_word[2]; | |
309 | } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; |
|
306 | } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; | |
310 |
|
307 | |||
311 | typedef struct { |
|
308 | typedef struct { | |
312 | unsigned char targetLogicalAddress; |
|
309 | unsigned char targetLogicalAddress; | |
313 | unsigned char protocolIdentifier; |
|
310 | unsigned char protocolIdentifier; | |
314 | unsigned char reserved; |
|
311 | unsigned char reserved; | |
315 | unsigned char userApplication; |
|
312 | unsigned char userApplication; | |
316 | // PACKET HEADER |
|
313 | // PACKET HEADER | |
317 | unsigned char packetID[2]; |
|
314 | unsigned char packetID[2]; | |
318 | unsigned char packetSequenceControl[2]; |
|
315 | unsigned char packetSequenceControl[2]; | |
319 | unsigned char packetLength[2]; |
|
316 | unsigned char packetLength[2]; | |
320 | // DATA FIELD HEADER |
|
317 | // DATA FIELD HEADER | |
321 | unsigned char spare1_pusVersion_spare2; |
|
318 | unsigned char spare1_pusVersion_spare2; | |
322 | unsigned char serviceType; |
|
319 | unsigned char serviceType; | |
323 | unsigned char serviceSubType; |
|
320 | unsigned char serviceSubType; | |
324 | unsigned char destinationID; |
|
321 | unsigned char destinationID; | |
325 | unsigned char time[6]; |
|
322 | unsigned char time[6]; | |
326 | // |
|
323 | // | |
327 | unsigned char tc_failure_code[2]; |
|
324 | unsigned char tc_failure_code[2]; | |
328 | unsigned char telecommand_pkt_id[2]; |
|
325 | unsigned char telecommand_pkt_id[2]; | |
329 | unsigned char pkt_seq_control[2]; |
|
326 | unsigned char pkt_seq_control[2]; | |
330 | unsigned char tc_service; |
|
327 | unsigned char tc_service; | |
331 | unsigned char tc_subtype; |
|
328 | unsigned char tc_subtype; | |
332 | } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; |
|
329 | } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; | |
333 |
|
330 | |||
334 | typedef struct { |
|
331 | typedef struct { | |
335 | unsigned char targetLogicalAddress; |
|
332 | unsigned char targetLogicalAddress; | |
336 | unsigned char protocolIdentifier; |
|
333 | unsigned char protocolIdentifier; | |
337 | unsigned char reserved; |
|
334 | unsigned char reserved; | |
338 | unsigned char userApplication; |
|
335 | unsigned char userApplication; | |
339 | // PACKET HEADER |
|
336 | // PACKET HEADER | |
340 | unsigned char packetID[2]; |
|
337 | unsigned char packetID[2]; | |
341 | unsigned char packetSequenceControl[2]; |
|
338 | unsigned char packetSequenceControl[2]; | |
342 | unsigned char packetLength[2]; |
|
339 | unsigned char packetLength[2]; | |
343 | // DATA FIELD HEADER |
|
340 | // DATA FIELD HEADER | |
344 | unsigned char spare1_pusVersion_spare2; |
|
341 | unsigned char spare1_pusVersion_spare2; | |
345 | unsigned char serviceType; |
|
342 | unsigned char serviceType; | |
346 | unsigned char serviceSubType; |
|
343 | unsigned char serviceSubType; | |
347 | unsigned char destinationID; |
|
344 | unsigned char destinationID; | |
348 | unsigned char time[6]; |
|
345 | unsigned char time[6]; | |
349 | // |
|
346 | // | |
350 | unsigned char tc_failure_code[2]; |
|
347 | unsigned char tc_failure_code[2]; | |
351 | unsigned char telecommand_pkt_id[2]; |
|
348 | unsigned char telecommand_pkt_id[2]; | |
352 | unsigned char pkt_seq_control[2]; |
|
349 | unsigned char pkt_seq_control[2]; | |
353 | unsigned char tc_service; |
|
350 | unsigned char tc_service; | |
354 | unsigned char tc_subtype; |
|
351 | unsigned char tc_subtype; | |
355 | } Packet_TM_LFR_TC_EXE_ERROR_t; |
|
352 | } Packet_TM_LFR_TC_EXE_ERROR_t; | |
356 |
|
353 | |||
357 | typedef struct { |
|
354 | typedef struct { | |
358 | unsigned char targetLogicalAddress; |
|
355 | unsigned char targetLogicalAddress; | |
359 | unsigned char protocolIdentifier; |
|
356 | unsigned char protocolIdentifier; | |
360 | unsigned char reserved; |
|
357 | unsigned char reserved; | |
361 | unsigned char userApplication; |
|
358 | unsigned char userApplication; | |
362 | // PACKET HEADER |
|
359 | // PACKET HEADER | |
363 | unsigned char packetID[2]; |
|
360 | unsigned char packetID[2]; | |
364 | unsigned char packetSequenceControl[2]; |
|
361 | unsigned char packetSequenceControl[2]; | |
365 | unsigned char packetLength[2]; |
|
362 | unsigned char packetLength[2]; | |
366 | // DATA FIELD HEADER |
|
363 | // DATA FIELD HEADER | |
367 | unsigned char spare1_pusVersion_spare2; |
|
364 | unsigned char spare1_pusVersion_spare2; | |
368 | unsigned char serviceType; |
|
365 | unsigned char serviceType; | |
369 | unsigned char serviceSubType; |
|
366 | unsigned char serviceSubType; | |
370 | unsigned char destinationID; |
|
367 | unsigned char destinationID; | |
371 | unsigned char time[6]; |
|
368 | unsigned char time[6]; | |
372 | // |
|
369 | // | |
373 | unsigned char tc_failure_code[2]; |
|
370 | unsigned char tc_failure_code[2]; | |
374 | unsigned char telecommand_pkt_id[2]; |
|
371 | unsigned char telecommand_pkt_id[2]; | |
375 | unsigned char pkt_seq_control[2]; |
|
372 | unsigned char pkt_seq_control[2]; | |
376 | unsigned char tc_service; |
|
373 | unsigned char tc_service; | |
377 | unsigned char tc_subtype; |
|
374 | unsigned char tc_subtype; | |
378 | unsigned char pkt_len_rcv_value[2]; |
|
375 | unsigned char pkt_len_rcv_value[2]; | |
379 | unsigned char pkt_datafieldsize_cnt[2]; |
|
376 | unsigned char pkt_datafieldsize_cnt[2]; | |
380 | unsigned char rcv_crc[2]; |
|
377 | unsigned char rcv_crc[2]; | |
381 | unsigned char computed_crc[2]; |
|
378 | unsigned char computed_crc[2]; | |
382 | } Packet_TM_LFR_TC_EXE_CORRUPTED_t; |
|
379 | } Packet_TM_LFR_TC_EXE_CORRUPTED_t; | |
383 |
|
380 | |||
384 | typedef struct { |
|
381 | typedef struct { | |
385 | unsigned char targetLogicalAddress; |
|
382 | unsigned char targetLogicalAddress; | |
386 | unsigned char protocolIdentifier; |
|
383 | unsigned char protocolIdentifier; | |
387 | unsigned char reserved; |
|
384 | unsigned char reserved; | |
388 | unsigned char userApplication; |
|
385 | unsigned char userApplication; | |
389 | unsigned char packetID[2]; |
|
386 | unsigned char packetID[2]; | |
390 | unsigned char packetSequenceControl[2]; |
|
387 | unsigned char packetSequenceControl[2]; | |
391 | unsigned char packetLength[2]; |
|
388 | unsigned char packetLength[2]; | |
392 | // DATA FIELD HEADER |
|
389 | // DATA FIELD HEADER | |
393 | unsigned char spare1_pusVersion_spare2; |
|
390 | unsigned char spare1_pusVersion_spare2; | |
394 | unsigned char serviceType; |
|
391 | unsigned char serviceType; | |
395 | unsigned char serviceSubType; |
|
392 | unsigned char serviceSubType; | |
396 | unsigned char destinationID; |
|
393 | unsigned char destinationID; | |
397 | unsigned char time[6]; |
|
394 | unsigned char time[6]; | |
398 | // AUXILIARY HEADER |
|
395 | // AUXILIARY HEADER | |
399 | unsigned char sid; |
|
396 | unsigned char sid; | |
400 | unsigned char hkBIA; |
|
397 | unsigned char hkBIA; | |
401 | unsigned char pktCnt; |
|
398 | unsigned char pktCnt; | |
402 | unsigned char pktNr; |
|
399 | unsigned char pktNr; | |
403 | unsigned char acquisitionTime[6]; |
|
400 | unsigned char acquisitionTime[6]; | |
404 | unsigned char blkNr[2]; |
|
401 | unsigned char blkNr[2]; | |
405 | } Header_TM_LFR_SCIENCE_SWF_t; |
|
402 | } Header_TM_LFR_SCIENCE_SWF_t; | |
406 |
|
403 | |||
407 | typedef struct { |
|
404 | typedef struct { | |
408 | unsigned char targetLogicalAddress; |
|
405 | unsigned char targetLogicalAddress; | |
409 | unsigned char protocolIdentifier; |
|
406 | unsigned char protocolIdentifier; | |
410 | unsigned char reserved; |
|
407 | unsigned char reserved; | |
411 | unsigned char userApplication; |
|
408 | unsigned char userApplication; | |
412 | unsigned char packetID[2]; |
|
409 | unsigned char packetID[2]; | |
413 | unsigned char packetSequenceControl[2]; |
|
410 | unsigned char packetSequenceControl[2]; | |
414 | unsigned char packetLength[2]; |
|
411 | unsigned char packetLength[2]; | |
415 | // DATA FIELD HEADER |
|
412 | // DATA FIELD HEADER | |
416 | unsigned char spare1_pusVersion_spare2; |
|
413 | unsigned char spare1_pusVersion_spare2; | |
417 | unsigned char serviceType; |
|
414 | unsigned char serviceType; | |
418 | unsigned char serviceSubType; |
|
415 | unsigned char serviceSubType; | |
419 | unsigned char destinationID; |
|
416 | unsigned char destinationID; | |
420 | unsigned char time[6]; |
|
417 | unsigned char time[6]; | |
421 | // AUXILIARY DATA HEADER |
|
418 | // AUXILIARY DATA HEADER | |
422 | unsigned char sid; |
|
419 | unsigned char sid; | |
423 | unsigned char hkBIA; |
|
420 | unsigned char hkBIA; | |
424 | unsigned char acquisitionTime[6]; |
|
421 | unsigned char acquisitionTime[6]; | |
425 | unsigned char blkNr[2]; |
|
422 | unsigned char blkNr[2]; | |
426 | } Header_TM_LFR_SCIENCE_CWF_t; |
|
423 | } Header_TM_LFR_SCIENCE_CWF_t; | |
427 |
|
424 | |||
428 | typedef struct { |
|
425 | typedef struct { | |
429 | unsigned char targetLogicalAddress; |
|
426 | unsigned char targetLogicalAddress; | |
430 | unsigned char protocolIdentifier; |
|
427 | unsigned char protocolIdentifier; | |
431 | unsigned char reserved; |
|
428 | unsigned char reserved; | |
432 | unsigned char userApplication; |
|
429 | unsigned char userApplication; | |
433 | unsigned char packetID[2]; |
|
430 | unsigned char packetID[2]; | |
434 | unsigned char packetSequenceControl[2]; |
|
431 | unsigned char packetSequenceControl[2]; | |
435 | unsigned char packetLength[2]; |
|
432 | unsigned char packetLength[2]; | |
436 | // DATA FIELD HEADER |
|
433 | // DATA FIELD HEADER | |
437 | unsigned char spare1_pusVersion_spare2; |
|
434 | unsigned char spare1_pusVersion_spare2; | |
438 | unsigned char serviceType; |
|
435 | unsigned char serviceType; | |
439 | unsigned char serviceSubType; |
|
436 | unsigned char serviceSubType; | |
440 | unsigned char destinationID; |
|
437 | unsigned char destinationID; | |
441 | unsigned char time[6]; |
|
438 | unsigned char time[6]; | |
442 | // AUXILIARY HEADER |
|
439 | // AUXILIARY HEADER | |
443 | unsigned char sid; |
|
440 | unsigned char sid; | |
444 | unsigned char biaStatusInfo; |
|
441 | unsigned char biaStatusInfo; | |
445 | unsigned char pa_lfr_pkt_cnt_asm; |
|
442 | unsigned char pa_lfr_pkt_cnt_asm; | |
446 | unsigned char pa_lfr_pkt_nr_asm; |
|
443 | unsigned char pa_lfr_pkt_nr_asm; | |
447 | unsigned char acquisitionTime[6]; |
|
444 | unsigned char acquisitionTime[6]; | |
448 | unsigned char pa_lfr_asm_blk_nr[2]; |
|
445 | unsigned char pa_lfr_asm_blk_nr[2]; | |
449 | } Header_TM_LFR_SCIENCE_ASM_t; |
|
446 | } Header_TM_LFR_SCIENCE_ASM_t; | |
450 |
|
447 | |||
451 | typedef struct { |
|
448 | typedef struct { | |
452 | //targetLogicalAddress is removed by the grspw module |
|
449 | //targetLogicalAddress is removed by the grspw module | |
453 | unsigned char protocolIdentifier; |
|
450 | unsigned char protocolIdentifier; | |
454 | unsigned char reserved; |
|
451 | unsigned char reserved; | |
455 | unsigned char userApplication; |
|
452 | unsigned char userApplication; | |
456 | unsigned char packetID[2]; |
|
453 | unsigned char packetID[2]; | |
457 | unsigned char packetSequenceControl[2]; |
|
454 | unsigned char packetSequenceControl[2]; | |
458 | unsigned char packetLength[2]; |
|
455 | unsigned char packetLength[2]; | |
459 | // DATA FIELD HEADER |
|
456 | // DATA FIELD HEADER | |
460 | unsigned char headerFlag_pusVersion_Ack; |
|
457 | unsigned char headerFlag_pusVersion_Ack; | |
461 | unsigned char serviceType; |
|
458 | unsigned char serviceType; | |
462 | unsigned char serviceSubType; |
|
459 | unsigned char serviceSubType; | |
463 | unsigned char sourceID; |
|
460 | unsigned char sourceID; | |
464 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; |
|
461 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; | |
465 | } ccsdsTelecommandPacket_t; |
|
462 | } ccsdsTelecommandPacket_t; | |
466 |
|
463 | |||
467 | typedef struct { |
|
464 | typedef struct { | |
468 | unsigned char targetLogicalAddress; |
|
465 | unsigned char targetLogicalAddress; | |
469 | unsigned char protocolIdentifier; |
|
466 | unsigned char protocolIdentifier; | |
470 | unsigned char reserved; |
|
467 | unsigned char reserved; | |
471 | unsigned char userApplication; |
|
468 | unsigned char userApplication; | |
472 | unsigned char packetID[2]; |
|
469 | unsigned char packetID[2]; | |
473 | unsigned char packetSequenceControl[2]; |
|
470 | unsigned char packetSequenceControl[2]; | |
474 | unsigned char packetLength[2]; |
|
471 | unsigned char packetLength[2]; | |
475 | unsigned char spare1_pusVersion_spare2; |
|
472 | unsigned char spare1_pusVersion_spare2; | |
476 | unsigned char serviceType; |
|
473 | unsigned char serviceType; | |
477 | unsigned char serviceSubType; |
|
474 | unsigned char serviceSubType; | |
478 | unsigned char destinationID; |
|
475 | unsigned char destinationID; | |
479 | unsigned char time[6]; |
|
476 | unsigned char time[6]; | |
480 | unsigned char sid; |
|
477 | unsigned char sid; | |
481 |
|
478 | |||
482 | //************** |
|
479 | //************** | |
483 | // HK PARAMETERS |
|
480 | // HK PARAMETERS | |
484 | unsigned char lfr_status_word[2]; |
|
481 | unsigned char lfr_status_word[2]; | |
485 | unsigned char lfr_sw_version[4]; |
|
482 | unsigned char lfr_sw_version[4]; | |
486 | unsigned char lfr_fpga_version[3]; |
|
483 | unsigned char lfr_fpga_version[3]; | |
487 | // ressource statistics |
|
484 | // ressource statistics | |
488 | unsigned char hk_lfr_cpu_load; |
|
485 | unsigned char hk_lfr_cpu_load; | |
489 | unsigned char hk_lfr_load_max; |
|
486 | unsigned char hk_lfr_load_max; | |
490 | unsigned char hk_lfr_load_aver; |
|
487 | unsigned char hk_lfr_load_aver; | |
491 | // tc statistics |
|
488 | // tc statistics | |
492 | unsigned char hk_lfr_update_info_tc_cnt[2]; |
|
489 | unsigned char hk_lfr_update_info_tc_cnt[2]; | |
493 | unsigned char hk_lfr_update_time_tc_cnt[2]; |
|
490 | unsigned char hk_lfr_update_time_tc_cnt[2]; | |
494 | unsigned char hk_lfr_exe_tc_cnt[2]; |
|
491 | unsigned char hk_lfr_exe_tc_cnt[2]; | |
495 | unsigned char hk_lfr_rej_tc_cnt[2]; |
|
492 | unsigned char hk_lfr_rej_tc_cnt[2]; | |
496 | unsigned char hk_lfr_last_exe_tc_id[2]; |
|
493 | unsigned char hk_lfr_last_exe_tc_id[2]; | |
497 | unsigned char hk_lfr_last_exe_tc_type[2]; |
|
494 | unsigned char hk_lfr_last_exe_tc_type[2]; | |
498 | unsigned char hk_lfr_last_exe_tc_subtype[2]; |
|
495 | unsigned char hk_lfr_last_exe_tc_subtype[2]; | |
499 | unsigned char hk_lfr_last_exe_tc_time[6]; |
|
496 | unsigned char hk_lfr_last_exe_tc_time[6]; | |
500 | unsigned char hk_lfr_last_rej_tc_id[2]; |
|
497 | unsigned char hk_lfr_last_rej_tc_id[2]; | |
501 | unsigned char hk_lfr_last_rej_tc_type[2]; |
|
498 | unsigned char hk_lfr_last_rej_tc_type[2]; | |
502 | unsigned char hk_lfr_last_rej_tc_subtype[2]; |
|
499 | unsigned char hk_lfr_last_rej_tc_subtype[2]; | |
503 | unsigned char hk_lfr_last_rej_tc_time[6]; |
|
500 | unsigned char hk_lfr_last_rej_tc_time[6]; | |
504 | // anomaly statistics |
|
501 | // anomaly statistics | |
505 | unsigned char hk_lfr_le_cnt[2]; |
|
502 | unsigned char hk_lfr_le_cnt[2]; | |
506 | unsigned char hk_lfr_me_cnt[2]; |
|
503 | unsigned char hk_lfr_me_cnt[2]; | |
507 | unsigned char hk_lfr_he_cnt[2]; |
|
504 | unsigned char hk_lfr_he_cnt[2]; | |
508 | unsigned char hk_lfr_last_er_rid[2]; |
|
505 | unsigned char hk_lfr_last_er_rid[2]; | |
509 | unsigned char hk_lfr_last_er_code; |
|
506 | unsigned char hk_lfr_last_er_code; | |
510 | unsigned char hk_lfr_last_er_time[6]; |
|
507 | unsigned char hk_lfr_last_er_time[6]; | |
511 | // vhdl_blk_status |
|
508 | // vhdl_blk_status | |
512 | unsigned char hk_lfr_vhdl_aa_sm; |
|
509 | unsigned char hk_lfr_vhdl_aa_sm; | |
513 | unsigned char hk_lfr_vhdl_fft_sr; |
|
510 | unsigned char hk_lfr_vhdl_fft_sr; | |
514 | unsigned char hk_lfr_vhdl_cic_hk; |
|
511 | unsigned char hk_lfr_vhdl_cic_hk; | |
515 | unsigned char hk_lfr_vhdl_iir_cal; |
|
512 | unsigned char hk_lfr_vhdl_iir_cal; | |
516 | // spacewire_if_statistics |
|
513 | // spacewire_if_statistics | |
517 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; |
|
514 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; | |
518 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; |
|
515 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; | |
519 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; |
|
516 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; | |
520 | unsigned char hk_lfr_dpu_spw_last_timc; |
|
517 | unsigned char hk_lfr_dpu_spw_last_timc; | |
521 | // ahb error statistics |
|
518 | // ahb error statistics | |
522 | unsigned int hk_lfr_last_fail_addr; |
|
519 | unsigned int hk_lfr_last_fail_addr; | |
523 | // temperatures |
|
520 | // temperatures | |
524 | unsigned char hk_lfr_temp_scm[2]; |
|
521 | unsigned char hk_lfr_temp_scm[2]; | |
525 | unsigned char hk_lfr_temp_pcb[2]; |
|
522 | unsigned char hk_lfr_temp_pcb[2]; | |
526 | unsigned char hk_lfr_temp_fpga[2]; |
|
523 | unsigned char hk_lfr_temp_fpga[2]; | |
527 | // spacecraft potential |
|
524 | // spacecraft potential | |
528 | unsigned char hk_lfr_sc_v_f3[2]; |
|
525 | unsigned char hk_lfr_sc_v_f3[2]; | |
529 | unsigned char hk_lfr_sc_e1_f3[2]; |
|
526 | unsigned char hk_lfr_sc_e1_f3[2]; | |
530 | unsigned char hk_lfr_sc_e2_f3[2]; |
|
527 | unsigned char hk_lfr_sc_e2_f3[2]; | |
531 | // error counters |
|
528 | // error counters | |
532 | unsigned char hk_lfr_dpu_spw_parity; |
|
529 | unsigned char hk_lfr_dpu_spw_parity; | |
533 | unsigned char hk_lfr_dpu_spw_disconnect; |
|
530 | unsigned char hk_lfr_dpu_spw_disconnect; | |
534 | unsigned char hk_lfr_dpu_spw_escape; |
|
531 | unsigned char hk_lfr_dpu_spw_escape; | |
535 | unsigned char hk_lfr_dpu_spw_credit; |
|
532 | unsigned char hk_lfr_dpu_spw_credit; | |
536 | unsigned char hk_lfr_dpu_spw_write_sync; |
|
533 | unsigned char hk_lfr_dpu_spw_write_sync; | |
537 | unsigned char hk_lfr_dpu_spw_rx_ahb; |
|
534 | unsigned char hk_lfr_dpu_spw_rx_ahb; | |
538 | unsigned char hk_lfr_dpu_spw_tx_ahb; |
|
535 | unsigned char hk_lfr_dpu_spw_tx_ahb; | |
539 | unsigned char hk_lfr_dpu_spw_early_eop; |
|
536 | unsigned char hk_lfr_dpu_spw_early_eop; | |
540 | unsigned char hk_lfr_dpu_spw_invalid_addr; |
|
537 | unsigned char hk_lfr_dpu_spw_invalid_addr; | |
541 | unsigned char hk_lfr_dpu_spw_eep; |
|
538 | unsigned char hk_lfr_dpu_spw_eep; | |
542 | unsigned char hk_lfr_dpu_spw_rx_too_big; |
|
539 | unsigned char hk_lfr_dpu_spw_rx_too_big; | |
543 | // timecode |
|
540 | // timecode | |
544 | unsigned char hk_lfr_timecode_erroneous; |
|
541 | unsigned char hk_lfr_timecode_erroneous; | |
545 | unsigned char hk_lfr_timecode_missing; |
|
542 | unsigned char hk_lfr_timecode_missing; | |
546 | unsigned char hk_lfr_timecode_invalid; |
|
543 | unsigned char hk_lfr_timecode_invalid; | |
547 | // time |
|
544 | // time | |
548 | unsigned char hk_lfr_time_timecode_it; |
|
545 | unsigned char hk_lfr_time_timecode_it; | |
549 | unsigned char hk_lfr_time_not_synchro; |
|
546 | unsigned char hk_lfr_time_not_synchro; | |
550 | unsigned char hk_lfr_time_timecode_ctr; |
|
547 | unsigned char hk_lfr_time_timecode_ctr; | |
551 | // hk_lfr_buffer_dpu_ |
|
548 | // hk_lfr_buffer_dpu_ | |
552 | unsigned char hk_lfr_buffer_dpu_tc_fifo; |
|
549 | unsigned char hk_lfr_buffer_dpu_tc_fifo; | |
553 | unsigned char hk_lfr_buffer_dpu_tm_fifo; |
|
550 | unsigned char hk_lfr_buffer_dpu_tm_fifo; | |
554 | // hk_lfr_ahb_ |
|
551 | // hk_lfr_ahb_ | |
555 | unsigned char hk_lfr_ahb_correctable; |
|
552 | unsigned char hk_lfr_ahb_correctable; | |
556 | unsigned char hk_lfr_ahb_uncorrectable; |
|
553 | unsigned char hk_lfr_ahb_uncorrectable; | |
557 | // spare |
|
554 | // spare | |
558 | unsigned char parameters_spare; |
|
555 | unsigned char parameters_spare; | |
559 | } Packet_TM_LFR_HK_t; |
|
556 | } Packet_TM_LFR_HK_t; | |
560 |
|
557 | |||
561 | typedef struct { |
|
558 | typedef struct { | |
562 | unsigned char targetLogicalAddress; |
|
559 | unsigned char targetLogicalAddress; | |
563 | unsigned char protocolIdentifier; |
|
560 | unsigned char protocolIdentifier; | |
564 | unsigned char reserved; |
|
561 | unsigned char reserved; | |
565 | unsigned char userApplication; |
|
562 | unsigned char userApplication; | |
566 | unsigned char packetID[2]; |
|
563 | unsigned char packetID[2]; | |
567 | unsigned char packetSequenceControl[2]; |
|
564 | unsigned char packetSequenceControl[2]; | |
568 | unsigned char packetLength[2]; |
|
565 | unsigned char packetLength[2]; | |
569 | // DATA FIELD HEADER |
|
566 | // DATA FIELD HEADER | |
570 | unsigned char spare1_pusVersion_spare2; |
|
567 | unsigned char spare1_pusVersion_spare2; | |
571 | unsigned char serviceType; |
|
568 | unsigned char serviceType; | |
572 | unsigned char serviceSubType; |
|
569 | unsigned char serviceSubType; | |
573 | unsigned char destinationID; |
|
570 | unsigned char destinationID; | |
574 | unsigned char time[6]; |
|
571 | unsigned char time[6]; | |
575 | unsigned char sid; |
|
572 | unsigned char sid; | |
576 |
|
573 | |||
577 | //****************** |
|
574 | //****************** | |
578 | // COMMON PARAMETERS |
|
575 | // COMMON PARAMETERS | |
579 | unsigned char unused0; |
|
576 | unsigned char unused0; | |
580 | unsigned char bw_sp0_sp1_r0_r1; |
|
577 | unsigned char bw_sp0_sp1_r0_r1; | |
581 |
|
578 | |||
582 | //****************** |
|
579 | //****************** | |
583 | // NORMAL PARAMETERS |
|
580 | // NORMAL PARAMETERS | |
584 | unsigned char sy_lfr_n_swf_l[2]; |
|
581 | unsigned char sy_lfr_n_swf_l[2]; | |
585 | unsigned char sy_lfr_n_swf_p[2]; |
|
582 | unsigned char sy_lfr_n_swf_p[2]; | |
586 | unsigned char sy_lfr_n_asm_p[2]; |
|
583 | unsigned char sy_lfr_n_asm_p[2]; | |
587 | unsigned char sy_lfr_n_bp_p0; |
|
584 | unsigned char sy_lfr_n_bp_p0; | |
588 | unsigned char sy_lfr_n_bp_p1; |
|
585 | unsigned char sy_lfr_n_bp_p1; | |
589 | unsigned char sy_lfr_n_cwf_long_f3; |
|
586 | unsigned char sy_lfr_n_cwf_long_f3; | |
590 | unsigned char lfr_normal_parameters_spare; |
|
587 | unsigned char lfr_normal_parameters_spare; | |
591 |
|
588 | |||
592 | //***************** |
|
589 | //***************** | |
593 | // BURST PARAMETERS |
|
590 | // BURST PARAMETERS | |
594 | unsigned char sy_lfr_b_bp_p0; |
|
591 | unsigned char sy_lfr_b_bp_p0; | |
595 | unsigned char sy_lfr_b_bp_p1; |
|
592 | unsigned char sy_lfr_b_bp_p1; | |
596 |
|
593 | |||
597 | //**************** |
|
594 | //**************** | |
598 | // SBM1 PARAMETERS |
|
595 | // SBM1 PARAMETERS | |
599 | unsigned char sy_lfr_s1_bp_p0; |
|
596 | unsigned char sy_lfr_s1_bp_p0; | |
600 | unsigned char sy_lfr_s1_bp_p1; |
|
597 | unsigned char sy_lfr_s1_bp_p1; | |
601 |
|
598 | |||
602 | //**************** |
|
599 | //**************** | |
603 | // SBM2 PARAMETERS |
|
600 | // SBM2 PARAMETERS | |
604 | unsigned char sy_lfr_s2_bp_p0; |
|
601 | unsigned char sy_lfr_s2_bp_p0; | |
605 | unsigned char sy_lfr_s2_bp_p1; |
|
602 | unsigned char sy_lfr_s2_bp_p1; | |
606 |
|
603 | |||
607 | // SPARE |
|
604 | // SPARE | |
608 | unsigned char source_data_spare; |
|
605 | unsigned char source_data_spare; | |
609 | } Packet_TM_LFR_PARAMETER_DUMP_t; |
|
606 | } Packet_TM_LFR_PARAMETER_DUMP_t; | |
610 |
|
607 | |||
611 |
|
608 | |||
612 | #endif // CCSDS_TYPES_H_INCLUDED |
|
609 | #endif // CCSDS_TYPES_H_INCLUDED |
@@ -1,42 +1,45 | |||||
1 | #ifndef FSW_PARAMS_PROCESSING_H |
|
1 | #ifndef FSW_PARAMS_PROCESSING_H | |
2 | #define FSW_PARAMS_PROCESSING_H |
|
2 | #define FSW_PARAMS_PROCESSING_H | |
3 |
|
3 | |||
4 | #define NB_BINS_PER_SM 128 // |
|
4 | #define NB_BINS_PER_SM 128 // | |
5 | #define NB_VALUES_PER_SM 25 // |
|
5 | #define NB_VALUES_PER_SM 25 // | |
6 | #define TOTAL_SIZE_SM 3200 // 25 * 128 |
|
6 | #define TOTAL_SIZE_SM 3200 // 25 * 128 | |
7 | #define SM_HEADER 0 // |
|
7 | #define SM_HEADER 0 // | |
8 | // |
|
8 | // | |
9 | #define NB_BINS_PER_ASM_F0 88 |
|
9 | #define NB_BINS_PER_ASM_F0 88 | |
10 | #define TOTAL_SIZE_ASM_F0 2200 // 25 * 88 |
|
10 | #define NB_BINS_PER_PKT_ASM_F0 44 | |
|
11 | #define TOTAL_SIZE_ASM_F0_IN_BYTES 4400 // 25 * 88 * 2 | |||
11 | #define ASM_F0_INDICE_START 17 // 88 bins |
|
12 | #define ASM_F0_INDICE_START 17 // 88 bins | |
12 | #define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins |
|
13 | #define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins | |
13 | // |
|
14 | // | |
14 | #define NB_BINS_PER_ASM_F1 104 |
|
15 | #define NB_BINS_PER_ASM_F1 104 | |
|
16 | #define NB_BINS_PER_PKT_ASM_F1 52 | |||
15 | #define TOTAL_SIZE_ASM_F1 2600 // 25 * 104 |
|
17 | #define TOTAL_SIZE_ASM_F1 2600 // 25 * 104 | |
16 | #define ASM_F1_INDICE_START 6 // 104 bins |
|
18 | #define ASM_F1_INDICE_START 6 // 104 bins | |
17 | #define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins |
|
19 | #define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins | |
18 | // |
|
20 | // | |
19 | #define NB_BINS_PER_ASM_F2 96 |
|
21 | #define NB_BINS_PER_ASM_F2 96 | |
|
22 | #define NB_BINS_PER_PKT_ASM_F2 48 | |||
20 | #define TOTAL_SIZE_ASM_F2 2400 // 25 * 96 |
|
23 | #define TOTAL_SIZE_ASM_F2 2400 // 25 * 96 | |
21 | #define ASM_F2_INDICE_START 7 // 96 bins |
|
24 | #define ASM_F2_INDICE_START 7 // 96 bins | |
22 | #define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins |
|
25 | #define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins | |
23 | // |
|
26 | // | |
24 | #define NB_BINS_COMPRESSED_SM_F0 11 |
|
27 | #define NB_BINS_COMPRESSED_SM_F0 11 | |
25 | #define NB_BINS_COMPRESSED_SM_F1 13 |
|
28 | #define NB_BINS_COMPRESSED_SM_F1 13 | |
26 | #define NB_BINS_COMPRESSED_SM_F2 12 |
|
29 | #define NB_BINS_COMPRESSED_SM_F2 12 | |
27 | // |
|
30 | // | |
28 | #define TOTAL_SIZE_COMPRESSED_MATRIX_f0 (NB_BINS_COMPRESSED_SM_F0 * NB_VALUES_PER_SM) |
|
31 | #define TOTAL_SIZE_COMPRESSED_MATRIX_f0 (NB_BINS_COMPRESSED_SM_F0 * NB_VALUES_PER_SM) | |
29 | #define NB_AVERAGE_NORMAL_f0 96*4 |
|
32 | #define NB_AVERAGE_NORMAL_f0 96*4 | |
30 | #define NB_SM_TO_RECEIVE_BEFORE_AVF0 8 |
|
33 | #define NB_SM_TO_RECEIVE_BEFORE_AVF0 8 | |
31 |
|
34 | |||
32 | typedef struct { |
|
35 | typedef struct { | |
33 | volatile unsigned char PE[2]; |
|
36 | volatile unsigned char PE[2]; | |
34 | volatile unsigned char PB[2]; |
|
37 | volatile unsigned char PB[2]; | |
35 | volatile unsigned char V0; |
|
38 | volatile unsigned char V0; | |
36 | volatile unsigned char V1; |
|
39 | volatile unsigned char V1; | |
37 | volatile unsigned char V2_ELLIP_DOP; |
|
40 | volatile unsigned char V2_ELLIP_DOP; | |
38 | volatile unsigned char SZ; |
|
41 | volatile unsigned char SZ; | |
39 | volatile unsigned char VPHI; |
|
42 | volatile unsigned char VPHI; | |
40 | } BP1_t; |
|
43 | } BP1_t; | |
41 |
|
44 | |||
42 | #endif // FSW_PARAMS_PROCESSING_H |
|
45 | #endif // FSW_PARAMS_PROCESSING_H |
@@ -1,90 +1,90 | |||||
1 | #ifndef WF_HANDLER_H_INCLUDED |
|
1 | #ifndef WF_HANDLER_H_INCLUDED | |
2 | #define WF_HANDLER_H_INCLUDED |
|
2 | #define WF_HANDLER_H_INCLUDED | |
3 |
|
3 | |||
4 | #include <rtems.h> |
|
4 | #include <rtems.h> | |
5 | #include <grspw.h> |
|
5 | #include <grspw.h> | |
6 | #include <stdio.h> |
|
6 | #include <stdio.h> | |
7 | #include <math.h> |
|
7 | #include <math.h> | |
8 |
|
8 | |||
9 | #include "fsw_params.h" |
|
9 | #include "fsw_params.h" | |
10 | #include "fsw_spacewire.h" |
|
10 | #include "fsw_spacewire.h" | |
11 | #include "fsw_misc.h" |
|
11 | #include "fsw_misc.h" | |
12 |
|
12 | |||
13 | #define pi 3.1415 |
|
13 | #define pi 3.1415 | |
14 |
|
14 | |||
15 | extern int fdSPW; |
|
15 | extern int fdSPW; | |
16 |
|
16 | |||
17 | //***************** |
|
17 | //***************** | |
18 | // waveform buffers |
|
18 | // waveform buffers | |
19 | // F0 |
|
19 | // F0 | |
20 | //extern volatile int wf_snap_f0[ ]; |
|
20 | //extern volatile int wf_snap_f0[ ]; | |
21 | // F1 F2 |
|
21 | // F1 F2 | |
22 |
extern volatile int wf_snap_f0[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + |
|
22 | extern volatile int wf_snap_f0[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 62 ]; | |
23 |
extern volatile int wf_snap_f1[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + |
|
23 | extern volatile int wf_snap_f1[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 62 ]; | |
24 |
extern volatile int wf_snap_f2[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + |
|
24 | extern volatile int wf_snap_f2[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 62 ]; | |
25 | // F3 |
|
25 | // F3 | |
26 | extern volatile int wf_cont_f3_a[ ]; |
|
26 | extern volatile int wf_cont_f3_a[ ]; | |
27 | extern volatile int wf_cont_f3_b[ ]; |
|
27 | extern volatile int wf_cont_f3_b[ ]; | |
28 | extern char wf_cont_f3_light[ ]; |
|
28 | extern char wf_cont_f3_light[ ]; | |
29 |
|
29 | |||
30 | extern waveform_picker_regs_new_t *waveform_picker_regs; |
|
30 | extern waveform_picker_regs_new_t *waveform_picker_regs; | |
31 | extern time_management_regs_t *time_management_regs; |
|
31 | extern time_management_regs_t *time_management_regs; | |
32 | extern Packet_TM_LFR_HK_t housekeeping_packet; |
|
32 | extern Packet_TM_LFR_HK_t housekeeping_packet; | |
33 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
|
33 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | |
34 | extern struct param_local_str param_local; |
|
34 | extern struct param_local_str param_local; | |
35 |
|
35 | |||
36 | extern unsigned short sequenceCounters_SCIENCE_NORMAL_BURST; |
|
36 | extern unsigned short sequenceCounters_SCIENCE_NORMAL_BURST; | |
37 | extern unsigned short sequenceCounters_SCIENCE_SBM1_SBM2; |
|
37 | extern unsigned short sequenceCounters_SCIENCE_SBM1_SBM2; | |
38 |
|
38 | |||
39 | extern rtems_id Task_id[20]; /* array of task ids */ |
|
39 | extern rtems_id Task_id[20]; /* array of task ids */ | |
40 |
|
40 | |||
41 | extern unsigned char lfrCurrentMode; |
|
41 | extern unsigned char lfrCurrentMode; | |
42 |
|
42 | |||
43 | rtems_isr waveforms_isr( rtems_vector_number vector ); |
|
43 | rtems_isr waveforms_isr( rtems_vector_number vector ); | |
44 | rtems_isr waveforms_isr_alt( rtems_vector_number vector ); |
|
44 | rtems_isr waveforms_isr_alt( rtems_vector_number vector ); | |
45 | rtems_task wfrm_task( rtems_task_argument argument ); |
|
45 | rtems_task wfrm_task( rtems_task_argument argument ); | |
46 | rtems_task cwf3_task( rtems_task_argument argument ); |
|
46 | rtems_task cwf3_task( rtems_task_argument argument ); | |
47 | rtems_task cwf2_task( rtems_task_argument argument ); |
|
47 | rtems_task cwf2_task( rtems_task_argument argument ); | |
48 | rtems_task cwf1_task( rtems_task_argument argument ); |
|
48 | rtems_task cwf1_task( rtems_task_argument argument ); | |
49 |
|
49 | |||
50 | //****************** |
|
50 | //****************** | |
51 | // general functions |
|
51 | // general functions | |
52 | void init_waveforms( void ); |
|
52 | void init_waveforms( void ); | |
53 | void init_waveform_rings( void ); |
|
53 | void init_waveform_rings( void ); | |
54 | void reset_current_ring_nodes( void ); |
|
54 | void reset_current_ring_nodes( void ); | |
55 | // |
|
55 | // | |
56 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF ); |
|
56 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF ); | |
57 | int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); |
|
57 | int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); | |
58 | int init_header_continuous_cwf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); |
|
58 | int init_header_continuous_cwf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); | |
59 | // |
|
59 | // | |
60 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ); |
|
60 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ); | |
61 | int send_waveform_CWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); |
|
61 | int send_waveform_CWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | |
62 | int send_waveform_CWF3( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); |
|
62 | int send_waveform_CWF3( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | |
63 | int send_waveform_CWF3_light( volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); |
|
63 | int send_waveform_CWF3_light( volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | |
64 | // |
|
64 | // | |
65 | void compute_acquisition_time(unsigned int coarseTime, unsigned int fineTime, |
|
65 | void compute_acquisition_time(unsigned int coarseTime, unsigned int fineTime, | |
66 | unsigned int sid, unsigned char pa_lfr_pkt_nr, unsigned char *acquisitionTime ); |
|
66 | unsigned int sid, unsigned char pa_lfr_pkt_nr, unsigned char *acquisitionTime ); | |
67 | // |
|
67 | // | |
68 | rtems_id get_pkts_queue_id( void ); |
|
68 | rtems_id get_pkts_queue_id( void ); | |
69 |
|
69 | |||
70 | //************** |
|
70 | //************** | |
71 | // wfp registers |
|
71 | // wfp registers | |
72 | // RESET |
|
72 | // RESET | |
73 | void reset_wfp_burst_enable( void ); |
|
73 | void reset_wfp_burst_enable( void ); | |
74 | void reset_wfp_status(void); |
|
74 | void reset_wfp_status(void); | |
75 | void reset_waveform_picker_regs( void ); |
|
75 | void reset_waveform_picker_regs( void ); | |
76 | // SET |
|
76 | // SET | |
77 | void set_wfp_data_shaping(void); |
|
77 | void set_wfp_data_shaping(void); | |
78 | void set_wfp_burst_enable_register( unsigned char mode ); |
|
78 | void set_wfp_burst_enable_register( unsigned char mode ); | |
79 | void set_wfp_delta_snapshot( void ); |
|
79 | void set_wfp_delta_snapshot( void ); | |
80 | void set_wfp_delta_f0_f0_2( void ); |
|
80 | void set_wfp_delta_f0_f0_2( void ); | |
81 | void set_wfp_delta_f1( void ); |
|
81 | void set_wfp_delta_f1( void ); | |
82 | void set_wfp_delta_f2( void ); |
|
82 | void set_wfp_delta_f2( void ); | |
83 |
|
83 | |||
84 | //***************** |
|
84 | //***************** | |
85 | // local parameters |
|
85 | // local parameters | |
86 | void set_local_nb_interrupt_f0_MAX( void ); |
|
86 | void set_local_nb_interrupt_f0_MAX( void ); | |
87 |
|
87 | |||
88 | void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid ); |
|
88 | void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid ); | |
89 |
|
89 | |||
90 | #endif // WF_HANDLER_H_INCLUDED |
|
90 | #endif // WF_HANDLER_H_INCLUDED |
@@ -1,70 +1,72 | |||||
1 | /** Global variables of the LFR flight software. |
|
1 | /** Global variables of the LFR flight software. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * Among global variables, there are: |
|
6 | * Among global variables, there are: | |
7 | * - RTEMS names and id. |
|
7 | * - RTEMS names and id. | |
8 | * - APB configuration registers. |
|
8 | * - APB configuration registers. | |
9 | * - waveforms global buffers, used by the waveform picker hardware module to store data. |
|
9 | * - waveforms global buffers, used by the waveform picker hardware module to store data. | |
10 | * - spectral matrices buffesr, used by the hardware module to store data. |
|
10 | * - spectral matrices buffesr, used by the hardware module to store data. | |
11 | * - variable related to LFR modes parameters. |
|
11 | * - variable related to LFR modes parameters. | |
12 | * - the global HK packet buffer. |
|
12 | * - the global HK packet buffer. | |
13 | * - the global dump parameter buffer. |
|
13 | * - the global dump parameter buffer. | |
14 | * |
|
14 | * | |
15 | */ |
|
15 | */ | |
16 |
|
16 | |||
17 | #include <rtems.h> |
|
17 | #include <rtems.h> | |
18 | #include <grspw.h> |
|
18 | #include <grspw.h> | |
19 |
|
19 | |||
20 | #include "ccsds_types.h" |
|
20 | #include "ccsds_types.h" | |
21 | #include "grlib_regs.h" |
|
21 | #include "grlib_regs.h" | |
22 | #include "fsw_params.h" |
|
22 | #include "fsw_params.h" | |
23 |
|
23 | |||
24 | // RTEMS GLOBAL VARIABLES |
|
24 | // RTEMS GLOBAL VARIABLES | |
25 | rtems_name misc_name[5]; |
|
25 | rtems_name misc_name[5]; | |
26 | rtems_id misc_id[5]; |
|
26 | rtems_id misc_id[5]; | |
27 | rtems_name Task_name[20]; /* array of task names */ |
|
27 | rtems_name Task_name[20]; /* array of task names */ | |
28 | rtems_id Task_id[20]; /* array of task ids */ |
|
28 | rtems_id Task_id[20]; /* array of task ids */ | |
29 | unsigned int maxCount; |
|
29 | unsigned int maxCount; | |
30 | int fdSPW = 0; |
|
30 | int fdSPW = 0; | |
31 | int fdUART = 0; |
|
31 | int fdUART = 0; | |
32 | unsigned char lfrCurrentMode; |
|
32 | unsigned char lfrCurrentMode; | |
33 |
|
33 | |||
34 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes |
|
34 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes = 24584 | |
|
35 | // 97 * 256 = 24832 => delta = 248 bytes = 62 words | |||
|
36 | // WAVEFORMS GLOBAL VARIABLES // 2688 * 3 * 4 + 2 * 4 = 32256 + 8 bytes = 32264 | |||
|
37 | // 127 * 256 = 32512 => delta = 248 bytes = 62 words | |||
35 | // F0 |
|
38 | // F0 | |
36 |
|
|
39 | volatile int wf_snap_f0[ NB_RING_NODES_F0 ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 62 ] __attribute__((aligned(0x100))); | |
37 | volatile int wf_snap_f0[ NB_RING_NODES_F0 ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 46 ] __attribute__((aligned(0x100))); |
|
|||
38 | // F1 F2 |
|
40 | // F1 F2 | |
39 |
volatile int wf_snap_f1[ NB_RING_NODES_F1 ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + |
|
41 | volatile int wf_snap_f1[ NB_RING_NODES_F1 ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 62 ] __attribute__((aligned(0x100))); | |
40 |
volatile int wf_snap_f2[ NB_RING_NODES_F2 ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + |
|
42 | volatile int wf_snap_f2[ NB_RING_NODES_F2 ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 62 ] __attribute__((aligned(0x100))); | |
41 | // F3 |
|
43 | // F3 | |
42 | volatile int wf_cont_f3_a [ (NB_SAMPLES_PER_SNAPSHOT) * NB_WORDS_SWF_BLK + TIME_OFFSET ] __attribute__((aligned(0x100))); |
|
44 | volatile int wf_cont_f3_a [ (NB_SAMPLES_PER_SNAPSHOT) * NB_WORDS_SWF_BLK + TIME_OFFSET ] __attribute__((aligned(0x100))); | |
43 | volatile int wf_cont_f3_b [ (NB_SAMPLES_PER_SNAPSHOT) * NB_WORDS_SWF_BLK + TIME_OFFSET ] __attribute__((aligned(0x100))); |
|
45 | volatile int wf_cont_f3_b [ (NB_SAMPLES_PER_SNAPSHOT) * NB_WORDS_SWF_BLK + TIME_OFFSET ] __attribute__((aligned(0x100))); | |
44 | char wf_cont_f3_light[ (NB_SAMPLES_PER_SNAPSHOT) * NB_BYTES_CWF3_LIGHT_BLK + TIME_OFFSET_IN_BYTES ] __attribute__((aligned(0x100))); |
|
46 | char wf_cont_f3_light[ (NB_SAMPLES_PER_SNAPSHOT) * NB_BYTES_CWF3_LIGHT_BLK + TIME_OFFSET_IN_BYTES ] __attribute__((aligned(0x100))); | |
45 |
|
47 | |||
46 | // SPECTRAL MATRICES GLOBAL VARIABLES |
|
48 | // SPECTRAL MATRICES GLOBAL VARIABLES | |
47 | volatile int sm_f0[ NB_RING_NODES_ASM_F0 ][ SM_HEADER + TOTAL_SIZE_SM ]; |
|
49 | volatile int sm_f0[ NB_RING_NODES_ASM_F0 ][ SM_HEADER + TOTAL_SIZE_SM ] __attribute__((aligned(0x100))); | |
48 | volatile int sm_f1[ NB_RING_NODES_ASM_F1 ][ SM_HEADER + TOTAL_SIZE_SM ]; |
|
50 | volatile int sm_f1[ NB_RING_NODES_ASM_F1 ][ SM_HEADER + TOTAL_SIZE_SM ] __attribute__((aligned(0x100))); | |
49 | volatile int sm_f2[ NB_RING_NODES_ASM_F2 ][ SM_HEADER + TOTAL_SIZE_SM ]; |
|
51 | volatile int sm_f2[ NB_RING_NODES_ASM_F2 ][ SM_HEADER + TOTAL_SIZE_SM ] __attribute__((aligned(0x100))); | |
50 |
|
52 | |||
51 | // APB CONFIGURATION REGISTERS |
|
53 | // APB CONFIGURATION REGISTERS | |
52 | time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT; |
|
54 | time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT; | |
53 | gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER; |
|
55 | gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER; | |
54 | waveform_picker_regs_new_t *waveform_picker_regs = (waveform_picker_regs_new_t*) REGS_ADDR_WAVEFORM_PICKER; |
|
56 | waveform_picker_regs_new_t *waveform_picker_regs = (waveform_picker_regs_new_t*) REGS_ADDR_WAVEFORM_PICKER; | |
55 | spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX; |
|
57 | spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX; | |
56 |
|
58 | |||
57 | // MODE PARAMETERS |
|
59 | // MODE PARAMETERS | |
58 | Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
|
60 | Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | |
59 | struct param_local_str param_local; |
|
61 | struct param_local_str param_local; | |
60 |
|
62 | |||
61 | // HK PACKETS |
|
63 | // HK PACKETS | |
62 | Packet_TM_LFR_HK_t housekeeping_packet; |
|
64 | Packet_TM_LFR_HK_t housekeeping_packet; | |
63 | // sequence counters are incremented by APID (PID + CAT) and destination ID |
|
65 | // sequence counters are incremented by APID (PID + CAT) and destination ID | |
64 | unsigned short sequenceCounters_SCIENCE_NORMAL_BURST; |
|
66 | unsigned short sequenceCounters_SCIENCE_NORMAL_BURST; | |
65 | unsigned short sequenceCounters_SCIENCE_SBM1_SBM2; |
|
67 | unsigned short sequenceCounters_SCIENCE_SBM1_SBM2; | |
66 | unsigned short sequenceCounters_TC_EXE[SEQ_CNT_NB_DEST_ID]; |
|
68 | unsigned short sequenceCounters_TC_EXE[SEQ_CNT_NB_DEST_ID]; | |
67 | spw_stats spacewire_stats; |
|
69 | spw_stats spacewire_stats; | |
68 | spw_stats spacewire_stats_backup; |
|
70 | spw_stats spacewire_stats_backup; | |
69 |
|
71 | |||
70 |
|
72 |
@@ -1,341 +1,343 | |||||
1 | /** General usage functions and RTEMS tasks. |
|
1 | /** General usage functions and RTEMS tasks. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | */ |
|
6 | */ | |
7 |
|
7 | |||
8 | #include "fsw_misc.h" |
|
8 | #include "fsw_misc.h" | |
9 |
|
9 | |||
10 | void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, |
|
10 | void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, | |
11 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) |
|
11 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) | |
12 | { |
|
12 | { | |
13 | /** This function configures a GPTIMER timer instantiated in the VHDL design. |
|
13 | /** This function configures a GPTIMER timer instantiated in the VHDL design. | |
14 | * |
|
14 | * | |
15 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
15 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
16 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
16 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
17 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. |
|
17 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. | |
18 | * @param interrupt_level is the interrupt level that the timer drives. |
|
18 | * @param interrupt_level is the interrupt level that the timer drives. | |
19 | * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer. |
|
19 | * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer. | |
20 | * |
|
20 | * | |
21 | * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76 |
|
21 | * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76 | |
22 | * |
|
22 | * | |
23 | */ |
|
23 | */ | |
24 |
|
24 | |||
25 | rtems_status_code status; |
|
25 | rtems_status_code status; | |
26 | rtems_isr_entry old_isr_handler; |
|
26 | rtems_isr_entry old_isr_handler; | |
27 |
|
27 | |||
|
28 | gptimer_regs->timer[timer].ctrl = 0x00; // reset the control register | |||
|
29 | ||||
28 | status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels |
|
30 | status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels | |
29 | if (status!=RTEMS_SUCCESSFUL) |
|
31 | if (status!=RTEMS_SUCCESSFUL) | |
30 | { |
|
32 | { | |
31 | PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n") |
|
33 | PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n") | |
32 | } |
|
34 | } | |
33 |
|
35 | |||
34 | timer_set_clock_divider( gptimer_regs, timer, clock_divider); |
|
36 | timer_set_clock_divider( gptimer_regs, timer, clock_divider); | |
35 | } |
|
37 | } | |
36 |
|
38 | |||
37 | void timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer) |
|
39 | void timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer) | |
38 | { |
|
40 | { | |
39 | /** This function starts a GPTIMER timer. |
|
41 | /** This function starts a GPTIMER timer. | |
40 | * |
|
42 | * | |
41 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
43 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
42 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
44 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
43 | * |
|
45 | * | |
44 | */ |
|
46 | */ | |
45 |
|
47 | |||
46 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any |
|
48 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any | |
47 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register |
|
49 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register | |
48 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer |
|
50 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer | |
49 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart |
|
51 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart | |
50 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable |
|
52 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable | |
51 | } |
|
53 | } | |
52 |
|
54 | |||
53 | void timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer) |
|
55 | void timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer) | |
54 | { |
|
56 | { | |
55 | /** This function stops a GPTIMER timer. |
|
57 | /** This function stops a GPTIMER timer. | |
56 | * |
|
58 | * | |
57 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
59 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
58 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
60 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
59 | * |
|
61 | * | |
60 | */ |
|
62 | */ | |
61 |
|
63 | |||
62 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer |
|
64 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer | |
63 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable |
|
65 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable | |
64 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any |
|
66 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any | |
65 | } |
|
67 | } | |
66 |
|
68 | |||
67 | void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider) |
|
69 | void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider) | |
68 | { |
|
70 | { | |
69 | /** This function sets the clock divider of a GPTIMER timer. |
|
71 | /** This function sets the clock divider of a GPTIMER timer. | |
70 | * |
|
72 | * | |
71 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
73 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
72 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
74 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
73 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. |
|
75 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. | |
74 | * |
|
76 | * | |
75 | */ |
|
77 | */ | |
76 |
|
78 | |||
77 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz |
|
79 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz | |
78 | } |
|
80 | } | |
79 |
|
81 | |||
80 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port |
|
82 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port | |
81 | { |
|
83 | { | |
82 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
84 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |
83 |
|
85 | |||
84 | apbuart_regs->ctrl = APBUART_CTRL_REG_MASK_TE; |
|
86 | apbuart_regs->ctrl = APBUART_CTRL_REG_MASK_TE; | |
85 |
|
87 | |||
86 | return 0; |
|
88 | return 0; | |
87 | } |
|
89 | } | |
88 |
|
90 | |||
89 | int enable_apbuart_transmitter( void ) // set the bit 1, TE Transmitter Enable to 1 in the APBUART control register |
|
91 | int enable_apbuart_transmitter( void ) // set the bit 1, TE Transmitter Enable to 1 in the APBUART control register | |
90 | { |
|
92 | { | |
91 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
93 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |
92 |
|
94 | |||
93 | apbuart_regs->ctrl = apbuart_regs->ctrl | APBUART_CTRL_REG_MASK_TE; |
|
95 | apbuart_regs->ctrl = apbuart_regs->ctrl | APBUART_CTRL_REG_MASK_TE; | |
94 |
|
96 | |||
95 | return 0; |
|
97 | return 0; | |
96 | } |
|
98 | } | |
97 |
|
99 | |||
98 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value) |
|
100 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value) | |
99 | { |
|
101 | { | |
100 | /** This function sets the scaler reload register of the apbuart module |
|
102 | /** This function sets the scaler reload register of the apbuart module | |
101 | * |
|
103 | * | |
102 | * @param regs is the address of the apbuart registers in memory |
|
104 | * @param regs is the address of the apbuart registers in memory | |
103 | * @param value is the value that will be stored in the scaler register |
|
105 | * @param value is the value that will be stored in the scaler register | |
104 | * |
|
106 | * | |
105 | * The value shall be set by the software to get data on the serial interface. |
|
107 | * The value shall be set by the software to get data on the serial interface. | |
106 | * |
|
108 | * | |
107 | */ |
|
109 | */ | |
108 |
|
110 | |||
109 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; |
|
111 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; | |
110 |
|
112 | |||
111 | apbuart_regs->scaler = value; |
|
113 | apbuart_regs->scaler = value; | |
112 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) |
|
114 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) | |
113 | } |
|
115 | } | |
114 |
|
116 | |||
115 | //************ |
|
117 | //************ | |
116 | // RTEMS TASKS |
|
118 | // RTEMS TASKS | |
117 |
|
119 | |||
118 | rtems_task stat_task(rtems_task_argument argument) |
|
120 | rtems_task stat_task(rtems_task_argument argument) | |
119 | { |
|
121 | { | |
120 | int i; |
|
122 | int i; | |
121 | int j; |
|
123 | int j; | |
122 | i = 0; |
|
124 | i = 0; | |
123 | j = 0; |
|
125 | j = 0; | |
124 | BOOT_PRINTF("in STAT *** \n") |
|
126 | BOOT_PRINTF("in STAT *** \n") | |
125 | while(1){ |
|
127 | while(1){ | |
126 | rtems_task_wake_after(1000); |
|
128 | rtems_task_wake_after(1000); | |
127 | PRINTF1("%d\n", j) |
|
129 | PRINTF1("%d\n", j) | |
128 | if (i == CPU_USAGE_REPORT_PERIOD) { |
|
130 | if (i == CPU_USAGE_REPORT_PERIOD) { | |
129 | // #ifdef PRINT_TASK_STATISTICS |
|
131 | // #ifdef PRINT_TASK_STATISTICS | |
130 | // rtems_cpu_usage_report(); |
|
132 | // rtems_cpu_usage_report(); | |
131 | // rtems_cpu_usage_reset(); |
|
133 | // rtems_cpu_usage_reset(); | |
132 | // #endif |
|
134 | // #endif | |
133 | i = 0; |
|
135 | i = 0; | |
134 | } |
|
136 | } | |
135 | else i++; |
|
137 | else i++; | |
136 | j++; |
|
138 | j++; | |
137 | } |
|
139 | } | |
138 | } |
|
140 | } | |
139 |
|
141 | |||
140 | rtems_task hous_task(rtems_task_argument argument) |
|
142 | rtems_task hous_task(rtems_task_argument argument) | |
141 | { |
|
143 | { | |
142 | rtems_status_code status; |
|
144 | rtems_status_code status; | |
143 | rtems_id queue_id; |
|
145 | rtems_id queue_id; | |
144 |
|
146 | |||
145 | status = get_message_queue_id_send( &queue_id ); |
|
147 | status = get_message_queue_id_send( &queue_id ); | |
146 | if (status != RTEMS_SUCCESSFUL) |
|
148 | if (status != RTEMS_SUCCESSFUL) | |
147 | { |
|
149 | { | |
148 | PRINTF1("in HOUS *** ERR get_message_queue_id_send %d\n", status) |
|
150 | PRINTF1("in HOUS *** ERR get_message_queue_id_send %d\n", status) | |
149 | } |
|
151 | } | |
150 |
|
152 | |||
151 | BOOT_PRINTF("in HOUS ***\n") |
|
153 | BOOT_PRINTF("in HOUS ***\n") | |
152 |
|
154 | |||
153 | if (rtems_rate_monotonic_ident( name_hk_rate_monotonic, &HK_id) != RTEMS_SUCCESSFUL) { |
|
155 | if (rtems_rate_monotonic_ident( name_hk_rate_monotonic, &HK_id) != RTEMS_SUCCESSFUL) { | |
154 | status = rtems_rate_monotonic_create( name_hk_rate_monotonic, &HK_id ); |
|
156 | status = rtems_rate_monotonic_create( name_hk_rate_monotonic, &HK_id ); | |
155 | if( status != RTEMS_SUCCESSFUL ) { |
|
157 | if( status != RTEMS_SUCCESSFUL ) { | |
156 | PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status ) |
|
158 | PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status ) | |
157 | } |
|
159 | } | |
158 | } |
|
160 | } | |
159 |
|
161 | |||
160 | housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
162 | housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
161 | housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
163 | housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
162 | housekeeping_packet.reserved = DEFAULT_RESERVED; |
|
164 | housekeeping_packet.reserved = DEFAULT_RESERVED; | |
163 | housekeeping_packet.userApplication = CCSDS_USER_APP; |
|
165 | housekeeping_packet.userApplication = CCSDS_USER_APP; | |
164 | housekeeping_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_HK >> 8); |
|
166 | housekeeping_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_HK >> 8); | |
165 | housekeeping_packet.packetID[1] = (unsigned char) (TM_PACKET_ID_HK); |
|
167 | housekeeping_packet.packetID[1] = (unsigned char) (TM_PACKET_ID_HK); | |
166 | housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; |
|
168 | housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; | |
167 | housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
169 | housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
168 | housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); |
|
170 | housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); | |
169 | housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); |
|
171 | housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); | |
170 | housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
172 | housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
171 | housekeeping_packet.serviceType = TM_TYPE_HK; |
|
173 | housekeeping_packet.serviceType = TM_TYPE_HK; | |
172 | housekeeping_packet.serviceSubType = TM_SUBTYPE_HK; |
|
174 | housekeeping_packet.serviceSubType = TM_SUBTYPE_HK; | |
173 | housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND; |
|
175 | housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND; | |
174 | housekeeping_packet.sid = SID_HK; |
|
176 | housekeeping_packet.sid = SID_HK; | |
175 |
|
177 | |||
176 | status = rtems_rate_monotonic_cancel(HK_id); |
|
178 | status = rtems_rate_monotonic_cancel(HK_id); | |
177 | if( status != RTEMS_SUCCESSFUL ) { |
|
179 | if( status != RTEMS_SUCCESSFUL ) { | |
178 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status ) |
|
180 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status ) | |
179 | } |
|
181 | } | |
180 | else { |
|
182 | else { | |
181 | DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n") |
|
183 | DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n") | |
182 | } |
|
184 | } | |
183 |
|
185 | |||
184 | while(1){ // launch the rate monotonic task |
|
186 | while(1){ // launch the rate monotonic task | |
185 | status = rtems_rate_monotonic_period( HK_id, HK_PERIOD ); |
|
187 | status = rtems_rate_monotonic_period( HK_id, HK_PERIOD ); | |
186 | if ( status != RTEMS_SUCCESSFUL ) { |
|
188 | if ( status != RTEMS_SUCCESSFUL ) { | |
187 | PRINTF1( "in HOUS *** ERR period: %d\n", status); |
|
189 | PRINTF1( "in HOUS *** ERR period: %d\n", status); | |
188 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_6 ); |
|
190 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_6 ); | |
189 | } |
|
191 | } | |
190 | else { |
|
192 | else { | |
191 | increment_seq_counter( housekeeping_packet.packetSequenceControl ); |
|
193 | increment_seq_counter( housekeeping_packet.packetSequenceControl ); | |
192 | housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
194 | housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
193 | housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
195 | housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
194 | housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
196 | housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
195 | housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
197 | housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
196 | housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
198 | housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
197 | housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
199 | housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time); | |
198 |
|
200 | |||
199 | spacewire_update_statistics(); |
|
201 | spacewire_update_statistics(); | |
200 |
|
202 | |||
201 | // SEND PACKET |
|
203 | // SEND PACKET | |
202 | status = rtems_message_queue_send( queue_id, &housekeeping_packet, |
|
204 | status = rtems_message_queue_send( queue_id, &housekeeping_packet, | |
203 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); |
|
205 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); | |
204 | if (status != RTEMS_SUCCESSFUL) { |
|
206 | if (status != RTEMS_SUCCESSFUL) { | |
205 | PRINTF1("in HOUS *** ERR send: %d\n", status) |
|
207 | PRINTF1("in HOUS *** ERR send: %d\n", status) | |
206 | } |
|
208 | } | |
207 | } |
|
209 | } | |
208 | } |
|
210 | } | |
209 |
|
211 | |||
210 | PRINTF("in HOUS *** deleting task\n") |
|
212 | PRINTF("in HOUS *** deleting task\n") | |
211 |
|
213 | |||
212 | status = rtems_task_delete( RTEMS_SELF ); // should not return |
|
214 | status = rtems_task_delete( RTEMS_SELF ); // should not return | |
213 | printf( "rtems_task_delete returned with status of %d.\n", status ); |
|
215 | printf( "rtems_task_delete returned with status of %d.\n", status ); | |
214 | return; |
|
216 | return; | |
215 | } |
|
217 | } | |
216 |
|
218 | |||
217 | rtems_task dumb_task( rtems_task_argument unused ) |
|
219 | rtems_task dumb_task( rtems_task_argument unused ) | |
218 | { |
|
220 | { | |
219 | /** This RTEMS taks is used to print messages without affecting the general behaviour of the software. |
|
221 | /** This RTEMS taks is used to print messages without affecting the general behaviour of the software. | |
220 | * |
|
222 | * | |
221 | * @param unused is the starting argument of the RTEMS task |
|
223 | * @param unused is the starting argument of the RTEMS task | |
222 | * |
|
224 | * | |
223 | * The DUMB taks waits for RTEMS events and print messages depending on the incoming events. |
|
225 | * The DUMB taks waits for RTEMS events and print messages depending on the incoming events. | |
224 | * |
|
226 | * | |
225 | */ |
|
227 | */ | |
226 |
|
228 | |||
227 | unsigned int i; |
|
229 | unsigned int i; | |
228 | unsigned int intEventOut; |
|
230 | unsigned int intEventOut; | |
229 | unsigned int coarse_time = 0; |
|
231 | unsigned int coarse_time = 0; | |
230 | unsigned int fine_time = 0; |
|
232 | unsigned int fine_time = 0; | |
231 | rtems_event_set event_out; |
|
233 | rtems_event_set event_out; | |
232 |
|
234 | |||
233 | char *DumbMessages[8] = {"in DUMB *** default", // RTEMS_EVENT_0 |
|
235 | char *DumbMessages[8] = {"in DUMB *** default", // RTEMS_EVENT_0 | |
234 | "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 |
|
236 | "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 | |
235 | "in DUMB *** waveforms_isr", // RTEMS_EVENT_2 |
|
237 | "in DUMB *** waveforms_isr", // RTEMS_EVENT_2 | |
236 | "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 |
|
238 | "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 | |
237 | "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 |
|
239 | "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 | |
238 | "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5 |
|
240 | "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5 | |
239 | "ERR HK", // RTEMS_EVENT_6 |
|
241 | "ERR HK", // RTEMS_EVENT_6 | |
240 | "ready for dump" // RTEMS_EVENT_7 |
|
242 | "ready for dump" // RTEMS_EVENT_7 | |
241 | }; |
|
243 | }; | |
242 |
|
244 | |||
243 | BOOT_PRINTF("in DUMB *** \n") |
|
245 | BOOT_PRINTF("in DUMB *** \n") | |
244 |
|
246 | |||
245 | while(1){ |
|
247 | while(1){ | |
246 | rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 |
|
248 | rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 | |
247 | | RTEMS_EVENT_4 | RTEMS_EVENT_5 | RTEMS_EVENT_6 | RTEMS_EVENT_7, |
|
249 | | RTEMS_EVENT_4 | RTEMS_EVENT_5 | RTEMS_EVENT_6 | RTEMS_EVENT_7, | |
248 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT |
|
250 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT | |
249 | intEventOut = (unsigned int) event_out; |
|
251 | intEventOut = (unsigned int) event_out; | |
250 | for ( i=0; i<32; i++) |
|
252 | for ( i=0; i<32; i++) | |
251 | { |
|
253 | { | |
252 | if ( ((intEventOut >> i) & 0x0001) != 0) |
|
254 | if ( ((intEventOut >> i) & 0x0001) != 0) | |
253 | { |
|
255 | { | |
254 | coarse_time = time_management_regs->coarse_time; |
|
256 | coarse_time = time_management_regs->coarse_time; | |
255 | fine_time = time_management_regs->fine_time; |
|
257 | fine_time = time_management_regs->fine_time; | |
256 | printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); |
|
258 | printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); | |
257 | PRINTF1("status = %x\n", waveform_picker_regs->status) |
|
259 | PRINTF1("status = %x\n", waveform_picker_regs->status) | |
258 | } |
|
260 | } | |
259 | } |
|
261 | } | |
260 | } |
|
262 | } | |
261 | } |
|
263 | } | |
262 |
|
264 | |||
263 | //***************************** |
|
265 | //***************************** | |
264 | // init housekeeping parameters |
|
266 | // init housekeeping parameters | |
265 |
|
267 | |||
266 | void init_housekeeping_parameters( void ) |
|
268 | void init_housekeeping_parameters( void ) | |
267 | { |
|
269 | { | |
268 | /** This function initialize the housekeeping_packet global variable with default values. |
|
270 | /** This function initialize the housekeeping_packet global variable with default values. | |
269 | * |
|
271 | * | |
270 | */ |
|
272 | */ | |
271 |
|
273 | |||
272 | unsigned int i = 0; |
|
274 | unsigned int i = 0; | |
273 | unsigned char *parameters; |
|
275 | unsigned char *parameters; | |
274 |
|
276 | |||
275 | parameters = (unsigned char*) &housekeeping_packet.lfr_status_word; |
|
277 | parameters = (unsigned char*) &housekeeping_packet.lfr_status_word; | |
276 | for(i = 0; i< SIZE_HK_PARAMETERS; i++) |
|
278 | for(i = 0; i< SIZE_HK_PARAMETERS; i++) | |
277 | { |
|
279 | { | |
278 | parameters[i] = 0x00; |
|
280 | parameters[i] = 0x00; | |
279 | } |
|
281 | } | |
280 | // init status word |
|
282 | // init status word | |
281 | housekeeping_packet.lfr_status_word[0] = DEFAULT_STATUS_WORD_BYTE0; |
|
283 | housekeeping_packet.lfr_status_word[0] = DEFAULT_STATUS_WORD_BYTE0; | |
282 | housekeeping_packet.lfr_status_word[1] = DEFAULT_STATUS_WORD_BYTE1; |
|
284 | housekeeping_packet.lfr_status_word[1] = DEFAULT_STATUS_WORD_BYTE1; | |
283 | // init software version |
|
285 | // init software version | |
284 | housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1; |
|
286 | housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1; | |
285 | housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2; |
|
287 | housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2; | |
286 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; |
|
288 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; | |
287 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; |
|
289 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; | |
288 | // init fpga version |
|
290 | // init fpga version | |
289 | parameters = (unsigned char *) (REGS_ADDR_WAVEFORM_PICKER + 0xd0); |
|
291 | parameters = (unsigned char *) (REGS_ADDR_WAVEFORM_PICKER + 0xd0); | |
290 | housekeeping_packet.lfr_fpga_version[0] = parameters[1]; // n1 |
|
292 | housekeeping_packet.lfr_fpga_version[0] = parameters[1]; // n1 | |
291 | housekeeping_packet.lfr_fpga_version[1] = parameters[2]; // n2 |
|
293 | housekeeping_packet.lfr_fpga_version[1] = parameters[2]; // n2 | |
292 | housekeeping_packet.lfr_fpga_version[2] = parameters[3]; // n3 |
|
294 | housekeeping_packet.lfr_fpga_version[2] = parameters[3]; // n3 | |
293 | } |
|
295 | } | |
294 |
|
296 | |||
295 | void increment_seq_counter( unsigned char *packet_sequence_control) |
|
297 | void increment_seq_counter( unsigned char *packet_sequence_control) | |
296 | { |
|
298 | { | |
297 | /** This function increment the sequence counter psased in argument. |
|
299 | /** This function increment the sequence counter psased in argument. | |
298 | * |
|
300 | * | |
299 | * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0. |
|
301 | * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0. | |
300 | * |
|
302 | * | |
301 | */ |
|
303 | */ | |
302 |
|
304 | |||
303 | unsigned short sequence_cnt; |
|
305 | unsigned short sequence_cnt; | |
304 | unsigned short segmentation_grouping_flag; |
|
306 | unsigned short segmentation_grouping_flag; | |
305 | unsigned short new_packet_sequence_control; |
|
307 | unsigned short new_packet_sequence_control; | |
306 |
|
308 | |||
307 | segmentation_grouping_flag = (unsigned short) ( (packet_sequence_control[0] & 0xc0) << 8 ); // keep bits 7 downto 6 |
|
309 | segmentation_grouping_flag = (unsigned short) ( (packet_sequence_control[0] & 0xc0) << 8 ); // keep bits 7 downto 6 | |
308 | sequence_cnt = (unsigned short) ( |
|
310 | sequence_cnt = (unsigned short) ( | |
309 | ( (packet_sequence_control[0] & 0x3f) << 8 ) // keep bits 5 downto 0 |
|
311 | ( (packet_sequence_control[0] & 0x3f) << 8 ) // keep bits 5 downto 0 | |
310 | + packet_sequence_control[1] |
|
312 | + packet_sequence_control[1] | |
311 | ); |
|
313 | ); | |
312 |
|
314 | |||
313 | if ( sequence_cnt < SEQ_CNT_MAX) |
|
315 | if ( sequence_cnt < SEQ_CNT_MAX) | |
314 | { |
|
316 | { | |
315 | sequence_cnt = sequence_cnt + 1; |
|
317 | sequence_cnt = sequence_cnt + 1; | |
316 | } |
|
318 | } | |
317 | else |
|
319 | else | |
318 | { |
|
320 | { | |
319 | sequence_cnt = 0; |
|
321 | sequence_cnt = 0; | |
320 | } |
|
322 | } | |
321 |
|
323 | |||
322 | new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ; |
|
324 | new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ; | |
323 |
|
325 | |||
324 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); |
|
326 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); | |
325 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); |
|
327 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); | |
326 | } |
|
328 | } | |
327 |
|
329 | |||
328 | void getTime( unsigned char *time) |
|
330 | void getTime( unsigned char *time) | |
329 | { |
|
331 | { | |
330 | /** This function write the current local time in the time buffer passed in argument. |
|
332 | /** This function write the current local time in the time buffer passed in argument. | |
331 | * |
|
333 | * | |
332 | */ |
|
334 | */ | |
333 |
|
335 | |||
334 | time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
336 | time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
335 | time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
337 | time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
336 | time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
338 | time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
337 | time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
339 | time[3] = (unsigned char) (time_management_regs->coarse_time); | |
338 | time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
340 | time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
339 | time[5] = (unsigned char) (time_management_regs->fine_time); |
|
341 | time[5] = (unsigned char) (time_management_regs->fine_time); | |
340 | } |
|
342 | } | |
341 |
|
343 |
@@ -1,687 +1,686 | |||||
1 | /** Functions related to data processing. |
|
1 | /** Functions related to data processing. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. |
|
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. | |
7 | * |
|
7 | * | |
8 | */ |
|
8 | */ | |
9 |
|
9 | |||
10 | #include <fsw_processing.h> |
|
10 | #include <fsw_processing.h> | |
11 |
|
11 | |||
12 | #include "fsw_processing_globals.c" |
|
12 | #include "fsw_processing_globals.c" | |
13 |
|
13 | |||
14 | //************************ |
|
14 | //************************ | |
15 | // spectral matrices rings |
|
15 | // spectral matrices rings | |
16 | ring_node sm_ring_f0[NB_RING_NODES_ASM_F0]; |
|
16 | ring_node sm_ring_f0[NB_RING_NODES_ASM_F0]; | |
17 | ring_node sm_ring_f1[NB_RING_NODES_ASM_F1]; |
|
17 | ring_node sm_ring_f1[NB_RING_NODES_ASM_F1]; | |
18 | ring_node sm_ring_f2[NB_RING_NODES_ASM_F2]; |
|
18 | ring_node sm_ring_f2[NB_RING_NODES_ASM_F2]; | |
19 | ring_node *current_ring_node_sm_f0; |
|
19 | ring_node *current_ring_node_sm_f0; | |
20 | ring_node *ring_node_for_averaging_sm_f0; |
|
20 | ring_node *ring_node_for_averaging_sm_f0; | |
21 | ring_node *current_ring_node_sm_f1; |
|
21 | ring_node *current_ring_node_sm_f1; | |
22 | ring_node *current_ring_node_sm_f2; |
|
22 | ring_node *current_ring_node_sm_f2; | |
23 |
|
23 | |||
24 | BP1_t data_BP1[ NB_BINS_COMPRESSED_SM_F0 ]; |
|
24 | BP1_t data_BP1[ NB_BINS_COMPRESSED_SM_F0 ]; | |
25 | float averaged_sm_f0[ TOTAL_SIZE_SM ]; |
|
25 | float averaged_sm_f0[ TOTAL_SIZE_SM ]; | |
26 | char averaged_sm_f0_char[ TOTAL_SIZE_SM * 2 ]; |
|
26 | char averaged_sm_f0_char[ TOTAL_SIZE_SM * 2 ]; | |
27 | float compressed_sm_f0[ TOTAL_SIZE_COMPRESSED_MATRIX_f0 ]; |
|
27 | float compressed_sm_f0[ TOTAL_SIZE_COMPRESSED_MATRIX_f0 ]; | |
28 |
|
28 | |||
29 | unsigned int nb_sm_f0; |
|
29 | unsigned int nb_sm_f0; | |
30 |
|
30 | |||
31 | void init_sm_rings( void ) |
|
31 | void init_sm_rings( void ) | |
32 | { |
|
32 | { | |
33 | unsigned char i; |
|
33 | unsigned char i; | |
34 |
|
34 | |||
35 | // F0 RING |
|
35 | // F0 RING | |
36 | sm_ring_f0[0].next = (ring_node*) &sm_ring_f0[1]; |
|
36 | sm_ring_f0[0].next = (ring_node*) &sm_ring_f0[1]; | |
37 | sm_ring_f0[0].previous = (ring_node*) &sm_ring_f0[NB_RING_NODES_ASM_F0-1]; |
|
37 | sm_ring_f0[0].previous = (ring_node*) &sm_ring_f0[NB_RING_NODES_ASM_F0-1]; | |
38 | sm_ring_f0[0].buffer_address = (int) &sm_f0[0][0]; |
|
38 | sm_ring_f0[0].buffer_address = (int) &sm_f0[0][0]; | |
39 |
|
39 | |||
40 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].next = (ring_node*) &sm_ring_f0[0]; |
|
40 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].next = (ring_node*) &sm_ring_f0[0]; | |
41 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].previous = (ring_node*) &sm_ring_f0[NB_RING_NODES_ASM_F0-2]; |
|
41 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].previous = (ring_node*) &sm_ring_f0[NB_RING_NODES_ASM_F0-2]; | |
42 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].buffer_address = (int) &sm_f0[NB_RING_NODES_ASM_F0-1][0]; |
|
42 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].buffer_address = (int) &sm_f0[NB_RING_NODES_ASM_F0-1][0]; | |
43 |
|
43 | |||
44 | for(i=1; i<NB_RING_NODES_ASM_F0-1; i++) |
|
44 | for(i=1; i<NB_RING_NODES_ASM_F0-1; i++) | |
45 | { |
|
45 | { | |
46 | sm_ring_f0[i].next = (ring_node*) &sm_ring_f0[i+1]; |
|
46 | sm_ring_f0[i].next = (ring_node*) &sm_ring_f0[i+1]; | |
47 | sm_ring_f0[i].previous = (ring_node*) &sm_ring_f0[i-1]; |
|
47 | sm_ring_f0[i].previous = (ring_node*) &sm_ring_f0[i-1]; | |
48 | sm_ring_f0[i].buffer_address = (int) &sm_f0[i][0]; |
|
48 | sm_ring_f0[i].buffer_address = (int) &sm_f0[i][0]; | |
49 | } |
|
49 | } | |
50 |
|
50 | |||
51 | DEBUG_PRINTF1("asm_ring_f0 @%x\n", (unsigned int) sm_ring_f0) |
|
51 | DEBUG_PRINTF1("asm_ring_f0 @%x\n", (unsigned int) sm_ring_f0) | |
52 |
|
52 | |||
53 | spectral_matrix_regs->matrixF0_Address0 = sm_ring_f0[0].buffer_address; |
|
53 | spectral_matrix_regs->matrixF0_Address0 = sm_ring_f0[0].buffer_address; | |
54 | DEBUG_PRINTF1("spectral_matrix_regs->matrixF0_Address0 @%x\n", spectral_matrix_regs->matrixF0_Address0) |
|
54 | DEBUG_PRINTF1("spectral_matrix_regs->matrixF0_Address0 @%x\n", spectral_matrix_regs->matrixF0_Address0) | |
55 | } |
|
55 | } | |
56 |
|
56 | |||
57 | void reset_current_sm_ring_nodes( void ) |
|
57 | void reset_current_sm_ring_nodes( void ) | |
58 | { |
|
58 | { | |
59 | current_ring_node_sm_f0 = sm_ring_f0; |
|
59 | current_ring_node_sm_f0 = sm_ring_f0; | |
60 | ring_node_for_averaging_sm_f0 = sm_ring_f0; |
|
60 | ring_node_for_averaging_sm_f0 = sm_ring_f0; | |
61 | } |
|
61 | } | |
62 |
|
62 | |||
63 | //*********************************************************** |
|
63 | //*********************************************************** | |
64 | // Interrupt Service Routine for spectral matrices processing |
|
64 | // Interrupt Service Routine for spectral matrices processing | |
65 | void reset_nb_sm_f0( void ) |
|
65 | void reset_nb_sm_f0( void ) | |
66 | { |
|
66 | { | |
67 | nb_sm_f0 = 0; |
|
67 | nb_sm_f0 = 0; | |
68 | } |
|
68 | } | |
69 |
|
69 | |||
70 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ) |
|
70 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ) | |
71 | { |
|
71 | { | |
72 | // unsigned char status; |
|
72 | // unsigned char status; | |
73 | // unsigned char i; |
|
73 | // unsigned char i; | |
74 |
|
74 | |||
75 | // status = spectral_matrix_regs->status; //[f2 f1 f0_1 f0_0] |
|
75 | // status = spectral_matrix_regs->status; //[f2 f1 f0_1 f0_0] | |
76 | // for (i=0; i<4; i++) |
|
76 | // for (i=0; i<4; i++) | |
77 | // { |
|
77 | // { | |
78 | // if ( ( (status >> i) & 0x01) == 1) // (1) buffer rotation |
|
78 | // if ( ( (status >> i) & 0x01) == 1) // (1) buffer rotation | |
79 | // { |
|
79 | // { | |
80 | // switch(i) |
|
80 | // switch(i) | |
81 | // { |
|
81 | // { | |
82 | // case 0: |
|
82 | // case 0: | |
83 | // current_ring_node_sm_f0 = current_ring_node_sm_f0->next; |
|
83 | // current_ring_node_sm_f0 = current_ring_node_sm_f0->next; | |
84 | // spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; |
|
84 | // spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; | |
85 | // spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; |
|
85 | // spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; | |
86 | // nb_interrupt_f0 = nb_interrupt_f0 + 1; |
|
86 | // nb_interrupt_f0 = nb_interrupt_f0 + 1; | |
87 | // if (nb_interrupt_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ){ |
|
87 | // if (nb_interrupt_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ){ | |
88 | // ring_node_for_averaging_sm_f0 = current_ring_node_sm_f0; |
|
88 | // ring_node_for_averaging_sm_f0 = current_ring_node_sm_f0; | |
89 | // if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) |
|
89 | // if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) | |
90 | // { |
|
90 | // { | |
91 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); |
|
91 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); | |
92 | // } |
|
92 | // } | |
93 | // nb_interrupt_f0 = 0; |
|
93 | // nb_interrupt_f0 = 0; | |
94 | // } |
|
94 | // } | |
95 | // break; |
|
95 | // break; | |
96 | // case 1: |
|
96 | // case 1: | |
97 | // break; |
|
97 | // break; | |
98 | // case 2: |
|
98 | // case 2: | |
99 | // break; |
|
99 | // break; | |
100 | // default: |
|
100 | // default: | |
101 | // break; |
|
101 | // break; | |
102 | // } |
|
102 | // } | |
103 | // } |
|
103 | // } | |
104 | // } |
|
104 | // } | |
105 |
|
105 | |||
106 | // // reset error codes to 0 |
|
106 | // // reset error codes to 0 | |
107 | // spectral_matrix_regs->status = spectral_matrix_regs->status & 0xffffffcf; // [1100 1111] |
|
107 | // spectral_matrix_regs->status = spectral_matrix_regs->status & 0xffffffcf; // [1100 1111] | |
108 | } |
|
108 | } | |
109 |
|
109 | |||
110 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ) |
|
110 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ) | |
111 | { |
|
111 | { | |
112 | current_ring_node_sm_f0 = current_ring_node_sm_f0->next; |
|
112 | //current_ring_node_sm_f0 = current_ring_node_sm_f0->next; | |
113 | spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; |
|
113 | //spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; | |
114 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; |
|
114 | //spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; | |
115 |
|
115 | |||
116 | rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ); |
|
116 | if (nb_sm_f0 == (NB_SM_TO_RECEIVE_BEFORE_AVF0-1) ) | |
117 | // if (nb_sm_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ) |
|
117 | { | |
118 | // { |
|
118 | ring_node_for_averaging_sm_f0 = current_ring_node_sm_f0; | |
119 | // ring_node_for_averaging_sm_f0 = current_ring_node_sm_f0; |
|
119 | if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) | |
120 | // if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) |
|
120 | { | |
121 | // { |
|
121 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); | |
122 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); |
|
122 | } | |
123 | // } |
|
123 | nb_sm_f0 = 0; | |
124 | // nb_sm_f0 = 0; |
|
124 | } | |
125 | // } |
|
125 | else | |
126 | // else |
|
126 | { | |
127 | // { |
|
127 | nb_sm_f0 = nb_sm_f0 + 1; | |
128 | // nb_sm_f0 = nb_sm_f0 + 1; |
|
128 | } | |
129 | // } |
|
|||
130 | } |
|
129 | } | |
131 |
|
130 | |||
132 | //************ |
|
131 | //************ | |
133 | // RTEMS TASKS |
|
132 | // RTEMS TASKS | |
134 |
|
133 | |||
135 | rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ |
|
134 | rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ | |
136 | { |
|
135 | { | |
137 | rtems_event_set event_out; |
|
136 | rtems_event_set event_out; | |
138 |
|
137 | |||
139 | BOOT_PRINTF("in SMIQ *** \n") |
|
138 | BOOT_PRINTF("in SMIQ *** \n") | |
140 |
|
139 | |||
141 | while(1){ |
|
140 | while(1){ | |
142 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
141 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
143 | } |
|
142 | } | |
144 | } |
|
143 | } | |
145 |
|
144 | |||
146 | rtems_task spw_bppr_task(rtems_task_argument argument) |
|
145 | rtems_task spw_bppr_task(rtems_task_argument argument) | |
147 | { |
|
146 | { | |
148 | rtems_status_code status; |
|
147 | rtems_status_code status; | |
149 | rtems_event_set event_out; |
|
148 | rtems_event_set event_out; | |
150 |
|
149 | |||
151 | BOOT_PRINTF("in BPPR ***\n"); |
|
150 | BOOT_PRINTF("in BPPR ***\n"); | |
152 |
|
151 | |||
153 | while( true ){ // wait for an event to begin with the processing |
|
152 | while( true ){ // wait for an event to begin with the processing | |
154 | status = rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); |
|
153 | status = rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); | |
155 | } |
|
154 | } | |
156 | } |
|
155 | } | |
157 |
|
156 | |||
158 | rtems_task avf0_task(rtems_task_argument argument) |
|
157 | rtems_task avf0_task(rtems_task_argument argument) | |
159 | { |
|
158 | { | |
160 | int i; |
|
159 | int i; | |
161 | static int nb_average; |
|
160 | static int nb_average; | |
162 | rtems_event_set event_out; |
|
161 | rtems_event_set event_out; | |
163 | rtems_status_code status; |
|
162 | rtems_status_code status; | |
164 | ring_node *ring_node_tab[8]; |
|
163 | ring_node *ring_node_tab[8]; | |
165 |
|
164 | |||
166 | nb_average = 0; |
|
165 | nb_average = 0; | |
167 |
|
166 | |||
168 | BOOT_PRINTF("in AVFO *** \n") |
|
167 | BOOT_PRINTF("in AVFO *** \n") | |
169 |
|
168 | |||
170 | while(1){ |
|
169 | while(1){ | |
171 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
170 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
172 | PRINTF("avf0\n") |
|
171 | ring_node_for_averaging_sm_f0 = &sm_ring_f0[NB_SM_TO_RECEIVE_BEFORE_AVF0-1]; | |
173 | ring_node_tab[NB_SM_TO_RECEIVE_BEFORE_AVF0-1] = ring_node_for_averaging_sm_f0; |
|
172 | ring_node_tab[NB_SM_TO_RECEIVE_BEFORE_AVF0-1] = ring_node_for_averaging_sm_f0; | |
174 |
for (i= |
|
173 | for (i=2; i<NB_SM_TO_RECEIVE_BEFORE_AVF0+1; i++) | |
175 | { |
|
174 | { | |
176 | ring_node_for_averaging_sm_f0 = ring_node_for_averaging_sm_f0->previous; |
|
175 | ring_node_for_averaging_sm_f0 = ring_node_for_averaging_sm_f0->previous; | |
177 | ring_node_tab[i] = ring_node_for_averaging_sm_f0; |
|
176 | ring_node_tab[NB_SM_TO_RECEIVE_BEFORE_AVF0-i] = ring_node_for_averaging_sm_f0; | |
178 | } |
|
177 | } | |
179 | for(i=0; i<TOTAL_SIZE_SM; i++) |
|
178 | for(i=0; i<TOTAL_SIZE_SM; i++) | |
180 | { |
|
179 | { | |
181 | averaged_sm_f0[i] = ( (int *) (ring_node_tab[0]->buffer_address) ) [i] |
|
180 | averaged_sm_f0[i] = ( (int *) (ring_node_tab[0]->buffer_address) ) [i] | |
182 | + ( (int *) (ring_node_tab[1]->buffer_address) ) [i] |
|
181 | + ( (int *) (ring_node_tab[1]->buffer_address) ) [i] | |
183 | + ( (int *) (ring_node_tab[2]->buffer_address) ) [i] |
|
182 | + ( (int *) (ring_node_tab[2]->buffer_address) ) [i] | |
184 | + ( (int *) (ring_node_tab[3]->buffer_address) ) [i] |
|
183 | + ( (int *) (ring_node_tab[3]->buffer_address) ) [i] | |
185 | + ( (int *) (ring_node_tab[4]->buffer_address) ) [i] |
|
184 | + ( (int *) (ring_node_tab[4]->buffer_address) ) [i] | |
186 | + ( (int *) (ring_node_tab[5]->buffer_address) ) [i] |
|
185 | + ( (int *) (ring_node_tab[5]->buffer_address) ) [i] | |
187 | + ( (int *) (ring_node_tab[6]->buffer_address) ) [i] |
|
186 | + ( (int *) (ring_node_tab[6]->buffer_address) ) [i] | |
188 | + ( (int *) (ring_node_tab[7]->buffer_address) ) [i]; |
|
187 | + ( (int *) (ring_node_tab[7]->buffer_address) ) [i]; | |
189 | } |
|
188 | } | |
190 | nb_average = nb_average + NB_SM_TO_RECEIVE_BEFORE_AVF0; |
|
189 | nb_average = nb_average + NB_SM_TO_RECEIVE_BEFORE_AVF0; | |
191 | if (nb_average == NB_AVERAGE_NORMAL_f0) { |
|
190 | if (nb_average == NB_AVERAGE_NORMAL_f0) { | |
192 | nb_average = 0; |
|
191 | nb_average = 0; | |
193 | status = rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ); // sending an event to the task 7, BPF0 |
|
192 | status = rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ); // sending an event to the task 7, BPF0 | |
194 | if (status != RTEMS_SUCCESSFUL) { |
|
193 | if (status != RTEMS_SUCCESSFUL) { | |
195 | printf("in AVF0 *** Error sending RTEMS_EVENT_0, code %d\n", status); |
|
194 | printf("in AVF0 *** Error sending RTEMS_EVENT_0, code %d\n", status); | |
196 | } |
|
195 | } | |
197 | } |
|
196 | } | |
198 | } |
|
197 | } | |
199 | } |
|
198 | } | |
200 |
|
199 | |||
201 | rtems_task bpf0_task(rtems_task_argument argument) |
|
200 | rtems_task bpf0_task(rtems_task_argument argument) | |
202 | { |
|
201 | { | |
203 | rtems_event_set event_out; |
|
202 | rtems_event_set event_out; | |
204 | static unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_SM_F0 * 9 ]; |
|
203 | static unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_SM_F0 * 9 ]; | |
205 |
|
204 | |||
206 | BOOT_PRINTF("in BPFO *** \n") |
|
205 | BOOT_PRINTF("in BPFO *** \n") | |
207 |
|
206 | |||
208 | while(1){ |
|
207 | while(1){ | |
209 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
208 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
210 | matrix_compression(averaged_sm_f0, 0, compressed_sm_f0); |
|
209 | matrix_compression(averaged_sm_f0, 0, compressed_sm_f0); | |
211 | BP1_set(compressed_sm_f0, NB_BINS_COMPRESSED_SM_F0, LFR_BP1_F0); |
|
210 | BP1_set(compressed_sm_f0, NB_BINS_COMPRESSED_SM_F0, LFR_BP1_F0); | |
212 | } |
|
211 | } | |
213 | } |
|
212 | } | |
214 |
|
213 | |||
215 | rtems_task matr_task(rtems_task_argument argument) |
|
214 | rtems_task matr_task(rtems_task_argument argument) | |
216 | { |
|
215 | { | |
217 | spw_ioctl_pkt_send spw_ioctl_send_ASM; |
|
216 | spw_ioctl_pkt_send spw_ioctl_send_ASM; | |
218 | rtems_event_set event_out; |
|
217 | rtems_event_set event_out; | |
219 | rtems_status_code status; |
|
218 | rtems_status_code status; | |
220 | rtems_id queue_id; |
|
219 | rtems_id queue_id; | |
221 | Header_TM_LFR_SCIENCE_ASM_t headerASM; |
|
220 | Header_TM_LFR_SCIENCE_ASM_t headerASM; | |
222 |
|
221 | |||
223 | init_header_asm( &headerASM ); |
|
222 | init_header_asm( &headerASM ); | |
224 |
|
223 | |||
225 | status = get_message_queue_id_send( &queue_id ); |
|
224 | status = get_message_queue_id_send( &queue_id ); | |
226 | if (status != RTEMS_SUCCESSFUL) |
|
225 | if (status != RTEMS_SUCCESSFUL) | |
227 | { |
|
226 | { | |
228 | PRINTF1("in MATR *** ERR get_message_queue_id_send %d\n", status) |
|
227 | PRINTF1("in MATR *** ERR get_message_queue_id_send %d\n", status) | |
229 | } |
|
228 | } | |
230 |
|
229 | |||
231 | BOOT_PRINTF("in MATR *** \n") |
|
230 | BOOT_PRINTF("in MATR *** \n") | |
232 |
|
231 | |||
233 | fill_averaged_spectral_matrix( ); |
|
232 | fill_averaged_spectral_matrix( ); | |
234 |
|
233 | |||
235 | while(1){ |
|
234 | while(1){ | |
236 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
235 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
237 | // 1) convert the float array in a char array |
|
236 | // 1) convert the float array in a char array | |
238 | convert_averaged_spectral_matrix( averaged_sm_f0, averaged_sm_f0_char); |
|
237 | convert_averaged_spectral_matrix( averaged_sm_f0, averaged_sm_f0_char); | |
239 | // 2) send the spectral matrix packets |
|
238 | // 2) send the spectral matrix packets | |
240 | send_spectral_matrix( &headerASM, averaged_sm_f0_char, SID_NORM_ASM_F0, &spw_ioctl_send_ASM, queue_id); |
|
239 | send_spectral_matrix( &headerASM, averaged_sm_f0_char, SID_NORM_ASM_F0, &spw_ioctl_send_ASM, queue_id); | |
241 | } |
|
240 | } | |
242 | } |
|
241 | } | |
243 |
|
242 | |||
244 | //***************************** |
|
243 | //***************************** | |
245 | // Spectral matrices processing |
|
244 | // Spectral matrices processing | |
246 |
|
245 | |||
247 | void matrix_reset(volatile float *averaged_spec_mat) |
|
246 | void matrix_reset(volatile float *averaged_spec_mat) | |
248 | { |
|
247 | { | |
249 | int i; |
|
248 | int i; | |
250 | for(i=0; i<TOTAL_SIZE_SM; i++){ |
|
249 | for(i=0; i<TOTAL_SIZE_SM; i++){ | |
251 | averaged_spec_mat[i] = 0; |
|
250 | averaged_spec_mat[i] = 0; | |
252 | } |
|
251 | } | |
253 | } |
|
252 | } | |
254 |
|
253 | |||
255 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat) |
|
254 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat) | |
256 | { |
|
255 | { | |
257 | int i; |
|
256 | int i; | |
258 | int j; |
|
257 | int j; | |
259 | switch (fChannel){ |
|
258 | switch (fChannel){ | |
260 | case 0: |
|
259 | case 0: | |
261 | for(i=0;i<NB_BINS_COMPRESSED_SM_F0;i++){ |
|
260 | for(i=0;i<NB_BINS_COMPRESSED_SM_F0;i++){ | |
262 | j = 17 + (i * 8); |
|
261 | j = 17 + (i * 8); | |
263 | compressed_spec_mat[i] = (averaged_spec_mat[j] |
|
262 | compressed_spec_mat[i] = (averaged_spec_mat[j] | |
264 | + averaged_spec_mat[j+1] |
|
263 | + averaged_spec_mat[j+1] | |
265 | + averaged_spec_mat[j+2] |
|
264 | + averaged_spec_mat[j+2] | |
266 | + averaged_spec_mat[j+3] |
|
265 | + averaged_spec_mat[j+3] | |
267 | + averaged_spec_mat[j+4] |
|
266 | + averaged_spec_mat[j+4] | |
268 | + averaged_spec_mat[j+5] |
|
267 | + averaged_spec_mat[j+5] | |
269 | + averaged_spec_mat[j+6] |
|
268 | + averaged_spec_mat[j+6] | |
270 | + averaged_spec_mat[j+7])/(8*NB_AVERAGE_NORMAL_f0); |
|
269 | + averaged_spec_mat[j+7])/(8*NB_AVERAGE_NORMAL_f0); | |
271 | } |
|
270 | } | |
272 | break; |
|
271 | break; | |
273 | case 1: |
|
272 | case 1: | |
274 | // case fChannel = f1 to be completed later |
|
273 | // case fChannel = f1 to be completed later | |
275 | break; |
|
274 | break; | |
276 | case 2: |
|
275 | case 2: | |
277 | // case fChannel = f1 to be completed later |
|
276 | // case fChannel = f1 to be completed later | |
278 | break; |
|
277 | break; | |
279 | default: |
|
278 | default: | |
280 | break; |
|
279 | break; | |
281 | } |
|
280 | } | |
282 | } |
|
281 | } | |
283 |
|
282 | |||
284 | void BP1_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1){ |
|
283 | void BP1_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1){ | |
285 | int i; |
|
284 | int i; | |
286 | int j; |
|
285 | int j; | |
287 | unsigned char tmp_u_char; |
|
286 | unsigned char tmp_u_char; | |
288 | unsigned char * pt_char = NULL; |
|
287 | unsigned char * pt_char = NULL; | |
289 | float PSDB, PSDE; |
|
288 | float PSDB, PSDE; | |
290 | float NVEC_V0; |
|
289 | float NVEC_V0; | |
291 | float NVEC_V1; |
|
290 | float NVEC_V1; | |
292 | float NVEC_V2; |
|
291 | float NVEC_V2; | |
293 | //float significand; |
|
292 | //float significand; | |
294 | //int exponent; |
|
293 | //int exponent; | |
295 | float aux; |
|
294 | float aux; | |
296 | float tr_SB_SB; |
|
295 | float tr_SB_SB; | |
297 | float tmp; |
|
296 | float tmp; | |
298 | float sx_re; |
|
297 | float sx_re; | |
299 | float sx_im; |
|
298 | float sx_im; | |
300 | float nebx_re = 0; |
|
299 | float nebx_re = 0; | |
301 | float nebx_im = 0; |
|
300 | float nebx_im = 0; | |
302 | float ny = 0; |
|
301 | float ny = 0; | |
303 | float nz = 0; |
|
302 | float nz = 0; | |
304 | float bx_bx_star = 0; |
|
303 | float bx_bx_star = 0; | |
305 | for(i=0; i<nb_bins_compressed_spec_mat; i++){ |
|
304 | for(i=0; i<nb_bins_compressed_spec_mat; i++){ | |
306 | //============================================== |
|
305 | //============================================== | |
307 | // BP1 PSD == B PAR_LFR_SC_BP1_PE_FL0 == 16 bits |
|
306 | // BP1 PSD == B PAR_LFR_SC_BP1_PE_FL0 == 16 bits | |
308 | PSDB = compressed_spec_mat[i*30] // S11 |
|
307 | PSDB = compressed_spec_mat[i*30] // S11 | |
309 | + compressed_spec_mat[(i*30) + 10] // S22 |
|
308 | + compressed_spec_mat[(i*30) + 10] // S22 | |
310 | + compressed_spec_mat[(i*30) + 18]; // S33 |
|
309 | + compressed_spec_mat[(i*30) + 18]; // S33 | |
311 | //significand = frexp(PSDB, &exponent); |
|
310 | //significand = frexp(PSDB, &exponent); | |
312 | pt_char = (unsigned char*) &PSDB; |
|
311 | pt_char = (unsigned char*) &PSDB; | |
313 | LFR_BP1[(i*9) + 2] = pt_char[0]; // bits 31 downto 24 of the float |
|
312 | LFR_BP1[(i*9) + 2] = pt_char[0]; // bits 31 downto 24 of the float | |
314 | LFR_BP1[(i*9) + 3] = pt_char[1]; // bits 23 downto 16 of the float |
|
313 | LFR_BP1[(i*9) + 3] = pt_char[1]; // bits 23 downto 16 of the float | |
315 | //============================================== |
|
314 | //============================================== | |
316 | // BP1 PSD == E PAR_LFR_SC_BP1_PB_FL0 == 16 bits |
|
315 | // BP1 PSD == E PAR_LFR_SC_BP1_PB_FL0 == 16 bits | |
317 | PSDE = compressed_spec_mat[(i*30) + 24] * K44_pe // S44 |
|
316 | PSDE = compressed_spec_mat[(i*30) + 24] * K44_pe // S44 | |
318 | + compressed_spec_mat[(i*30) + 28] * K55_pe // S55 |
|
317 | + compressed_spec_mat[(i*30) + 28] * K55_pe // S55 | |
319 | + compressed_spec_mat[(i*30) + 26] * K45_pe_re // S45 |
|
318 | + compressed_spec_mat[(i*30) + 26] * K45_pe_re // S45 | |
320 | - compressed_spec_mat[(i*30) + 27] * K45_pe_im; // S45 |
|
319 | - compressed_spec_mat[(i*30) + 27] * K45_pe_im; // S45 | |
321 | pt_char = (unsigned char*) &PSDE; |
|
320 | pt_char = (unsigned char*) &PSDE; | |
322 | LFR_BP1[(i*9) + 0] = pt_char[0]; // bits 31 downto 24 of the float |
|
321 | LFR_BP1[(i*9) + 0] = pt_char[0]; // bits 31 downto 24 of the float | |
323 | LFR_BP1[(i*9) + 1] = pt_char[1]; // bits 23 downto 16 of the float |
|
322 | LFR_BP1[(i*9) + 1] = pt_char[1]; // bits 23 downto 16 of the float | |
324 | //============================================================================== |
|
323 | //============================================================================== | |
325 | // BP1 normal wave vector == PAR_LFR_SC_BP1_NVEC_V0_F0 == 8 bits |
|
324 | // BP1 normal wave vector == PAR_LFR_SC_BP1_NVEC_V0_F0 == 8 bits | |
326 | // == PAR_LFR_SC_BP1_NVEC_V1_F0 == 8 bits |
|
325 | // == PAR_LFR_SC_BP1_NVEC_V1_F0 == 8 bits | |
327 | // == PAR_LFR_SC_BP1_NVEC_V2_F0 == 1 bits |
|
326 | // == PAR_LFR_SC_BP1_NVEC_V2_F0 == 1 bits | |
328 | tmp = sqrt( |
|
327 | tmp = sqrt( | |
329 | compressed_spec_mat[(i*30) + 3]*compressed_spec_mat[(i*30) + 3] //Im S12 |
|
328 | compressed_spec_mat[(i*30) + 3]*compressed_spec_mat[(i*30) + 3] //Im S12 | |
330 | +compressed_spec_mat[(i*30) + 5]*compressed_spec_mat[(i*30) + 5] //Im S13 |
|
329 | +compressed_spec_mat[(i*30) + 5]*compressed_spec_mat[(i*30) + 5] //Im S13 | |
331 | +compressed_spec_mat[(i*30) + 13]*compressed_spec_mat[(i*30) + 13] //Im S23 |
|
330 | +compressed_spec_mat[(i*30) + 13]*compressed_spec_mat[(i*30) + 13] //Im S23 | |
332 | ); |
|
331 | ); | |
333 | NVEC_V0 = compressed_spec_mat[(i*30) + 13] / tmp; // Im S23 |
|
332 | NVEC_V0 = compressed_spec_mat[(i*30) + 13] / tmp; // Im S23 | |
334 | NVEC_V1 = -compressed_spec_mat[(i*30) + 5] / tmp; // Im S13 |
|
333 | NVEC_V1 = -compressed_spec_mat[(i*30) + 5] / tmp; // Im S13 | |
335 | NVEC_V2 = compressed_spec_mat[(i*30) + 3] / tmp; // Im S12 |
|
334 | NVEC_V2 = compressed_spec_mat[(i*30) + 3] / tmp; // Im S12 | |
336 | LFR_BP1[(i*9) + 4] = (char) (NVEC_V0*127); |
|
335 | LFR_BP1[(i*9) + 4] = (char) (NVEC_V0*127); | |
337 | LFR_BP1[(i*9) + 5] = (char) (NVEC_V1*127); |
|
336 | LFR_BP1[(i*9) + 5] = (char) (NVEC_V1*127); | |
338 | pt_char = (unsigned char*) &NVEC_V2; |
|
337 | pt_char = (unsigned char*) &NVEC_V2; | |
339 | LFR_BP1[(i*9) + 6] = pt_char[0] & 0x80; // extract the sign of NVEC_V2 |
|
338 | LFR_BP1[(i*9) + 6] = pt_char[0] & 0x80; // extract the sign of NVEC_V2 | |
340 | //======================================================= |
|
339 | //======================================================= | |
341 | // BP1 ellipticity == PAR_LFR_SC_BP1_ELLIP_F0 == 4 bits |
|
340 | // BP1 ellipticity == PAR_LFR_SC_BP1_ELLIP_F0 == 4 bits | |
342 | aux = 2*tmp / PSDB; // compute the ellipticity |
|
341 | aux = 2*tmp / PSDB; // compute the ellipticity | |
343 | tmp_u_char = (unsigned char) (aux*(16-1)); // convert the ellipticity |
|
342 | tmp_u_char = (unsigned char) (aux*(16-1)); // convert the ellipticity | |
344 | LFR_BP1[i*9+6] = LFR_BP1[i*9+6] | ((tmp_u_char&0x0f)<<3); // keeps 4 bits of the resulting unsigned char |
|
343 | LFR_BP1[i*9+6] = LFR_BP1[i*9+6] | ((tmp_u_char&0x0f)<<3); // keeps 4 bits of the resulting unsigned char | |
345 | //============================================================== |
|
344 | //============================================================== | |
346 | // BP1 degree of polarization == PAR_LFR_SC_BP1_DOP_F0 == 3 bits |
|
345 | // BP1 degree of polarization == PAR_LFR_SC_BP1_DOP_F0 == 3 bits | |
347 | for(j = 0; j<NB_VALUES_PER_SM;j++){ |
|
346 | for(j = 0; j<NB_VALUES_PER_SM;j++){ | |
348 | tr_SB_SB = compressed_spec_mat[i*30] * compressed_spec_mat[i*30] |
|
347 | tr_SB_SB = compressed_spec_mat[i*30] * compressed_spec_mat[i*30] | |
349 | + compressed_spec_mat[(i*30) + 10] * compressed_spec_mat[(i*30) + 10] |
|
348 | + compressed_spec_mat[(i*30) + 10] * compressed_spec_mat[(i*30) + 10] | |
350 | + compressed_spec_mat[(i*30) + 18] * compressed_spec_mat[(i*30) + 18] |
|
349 | + compressed_spec_mat[(i*30) + 18] * compressed_spec_mat[(i*30) + 18] | |
351 | + 2 * compressed_spec_mat[(i*30) + 2] * compressed_spec_mat[(i*30) + 2] |
|
350 | + 2 * compressed_spec_mat[(i*30) + 2] * compressed_spec_mat[(i*30) + 2] | |
352 | + 2 * compressed_spec_mat[(i*30) + 3] * compressed_spec_mat[(i*30) + 3] |
|
351 | + 2 * compressed_spec_mat[(i*30) + 3] * compressed_spec_mat[(i*30) + 3] | |
353 | + 2 * compressed_spec_mat[(i*30) + 4] * compressed_spec_mat[(i*30) + 4] |
|
352 | + 2 * compressed_spec_mat[(i*30) + 4] * compressed_spec_mat[(i*30) + 4] | |
354 | + 2 * compressed_spec_mat[(i*30) + 5] * compressed_spec_mat[(i*30) + 5] |
|
353 | + 2 * compressed_spec_mat[(i*30) + 5] * compressed_spec_mat[(i*30) + 5] | |
355 | + 2 * compressed_spec_mat[(i*30) + 12] * compressed_spec_mat[(i*30) + 12] |
|
354 | + 2 * compressed_spec_mat[(i*30) + 12] * compressed_spec_mat[(i*30) + 12] | |
356 | + 2 * compressed_spec_mat[(i*30) + 13] * compressed_spec_mat[(i*30) + 13]; |
|
355 | + 2 * compressed_spec_mat[(i*30) + 13] * compressed_spec_mat[(i*30) + 13]; | |
357 | } |
|
356 | } | |
358 | aux = PSDB*PSDB; |
|
357 | aux = PSDB*PSDB; | |
359 | tmp = sqrt( abs( ( 3*tr_SB_SB - aux ) / ( 2 * aux ) ) ); |
|
358 | tmp = sqrt( abs( ( 3*tr_SB_SB - aux ) / ( 2 * aux ) ) ); | |
360 | tmp_u_char = (unsigned char) (NVEC_V0*(8-1)); |
|
359 | tmp_u_char = (unsigned char) (NVEC_V0*(8-1)); | |
361 | LFR_BP1[(i*9) + 6] = LFR_BP1[(i*9) + 6] | (tmp_u_char & 0x07); // keeps 3 bits of the resulting unsigned char |
|
360 | LFR_BP1[(i*9) + 6] = LFR_BP1[(i*9) + 6] | (tmp_u_char & 0x07); // keeps 3 bits of the resulting unsigned char | |
362 | //======================================================================================= |
|
361 | //======================================================================================= | |
363 | // BP1 x-component of the normalized Poynting flux == PAR_LFR_SC_BP1_SZ_F0 == 8 bits (7+1) |
|
362 | // BP1 x-component of the normalized Poynting flux == PAR_LFR_SC_BP1_SZ_F0 == 8 bits (7+1) | |
364 | sx_re = compressed_spec_mat[(i*30) + 20] * K34_sx_re |
|
363 | sx_re = compressed_spec_mat[(i*30) + 20] * K34_sx_re | |
365 | + compressed_spec_mat[(i*30) + 6] * K14_sx_re |
|
364 | + compressed_spec_mat[(i*30) + 6] * K14_sx_re | |
366 | + compressed_spec_mat[(i*30) + 8] * K15_sx_re |
|
365 | + compressed_spec_mat[(i*30) + 8] * K15_sx_re | |
367 | + compressed_spec_mat[(i*30) + 14] * K24_sx_re |
|
366 | + compressed_spec_mat[(i*30) + 14] * K24_sx_re | |
368 | + compressed_spec_mat[(i*30) + 16] * K25_sx_re |
|
367 | + compressed_spec_mat[(i*30) + 16] * K25_sx_re | |
369 | + compressed_spec_mat[(i*30) + 22] * K35_sx_re; |
|
368 | + compressed_spec_mat[(i*30) + 22] * K35_sx_re; | |
370 | sx_im = compressed_spec_mat[(i*30) + 21] * K34_sx_im |
|
369 | sx_im = compressed_spec_mat[(i*30) + 21] * K34_sx_im | |
371 | + compressed_spec_mat[(i*30) + 7] * K14_sx_im |
|
370 | + compressed_spec_mat[(i*30) + 7] * K14_sx_im | |
372 | + compressed_spec_mat[(i*30) + 9] * K15_sx_im |
|
371 | + compressed_spec_mat[(i*30) + 9] * K15_sx_im | |
373 | + compressed_spec_mat[(i*30) + 15] * K24_sx_im |
|
372 | + compressed_spec_mat[(i*30) + 15] * K24_sx_im | |
374 | + compressed_spec_mat[(i*30) + 17] * K25_sx_im |
|
373 | + compressed_spec_mat[(i*30) + 17] * K25_sx_im | |
375 | + compressed_spec_mat[(i*30) + 23] * K35_sx_im; |
|
374 | + compressed_spec_mat[(i*30) + 23] * K35_sx_im; | |
376 | LFR_BP1[(i*9) + 7] = ((unsigned char) (sx_re * 128)) & 0x7f; // cf DOC for the compression |
|
375 | LFR_BP1[(i*9) + 7] = ((unsigned char) (sx_re * 128)) & 0x7f; // cf DOC for the compression | |
377 | if ( abs(sx_re) > abs(sx_im) ) { |
|
376 | if ( abs(sx_re) > abs(sx_im) ) { | |
378 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] | (0x80); // extract the sector of sx |
|
377 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] | (0x80); // extract the sector of sx | |
379 | } |
|
378 | } | |
380 | else { |
|
379 | else { | |
381 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] & (0x7f); // extract the sector of sx |
|
380 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] & (0x7f); // extract the sector of sx | |
382 | } |
|
381 | } | |
383 | //====================================================================== |
|
382 | //====================================================================== | |
384 | // BP1 phase velocity estimator == PAR_LFR_SC_BP1_VPHI_F0 == 8 bits (7+1) |
|
383 | // BP1 phase velocity estimator == PAR_LFR_SC_BP1_VPHI_F0 == 8 bits (7+1) | |
385 | ny = sin(Alpha_M)*NVEC_V1 + cos(Alpha_M)*NVEC_V2; |
|
384 | ny = sin(Alpha_M)*NVEC_V1 + cos(Alpha_M)*NVEC_V2; | |
386 | nz = NVEC_V0; |
|
385 | nz = NVEC_V0; | |
387 | bx_bx_star = cos(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+10] // re S22 |
|
386 | bx_bx_star = cos(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+10] // re S22 | |
388 | + sin(Alpha_M) * sin(Alpha_M) * compressed_spec_mat[i*30+18] // re S33 |
|
387 | + sin(Alpha_M) * sin(Alpha_M) * compressed_spec_mat[i*30+18] // re S33 | |
389 | - 2 * sin(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+12]; // re S23 |
|
388 | - 2 * sin(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+12]; // re S23 | |
390 | nebx_re = ny * (compressed_spec_mat[(i*30) + 14] * K24_ny_re |
|
389 | nebx_re = ny * (compressed_spec_mat[(i*30) + 14] * K24_ny_re | |
391 | +compressed_spec_mat[(i*30) + 16] * K25_ny_re |
|
390 | +compressed_spec_mat[(i*30) + 16] * K25_ny_re | |
392 | +compressed_spec_mat[(i*30) + 20] * K34_ny_re |
|
391 | +compressed_spec_mat[(i*30) + 20] * K34_ny_re | |
393 | +compressed_spec_mat[(i*30) + 22] * K35_ny_re) |
|
392 | +compressed_spec_mat[(i*30) + 22] * K35_ny_re) | |
394 | + nz * (compressed_spec_mat[(i*30) + 14] * K24_nz_re |
|
393 | + nz * (compressed_spec_mat[(i*30) + 14] * K24_nz_re | |
395 | +compressed_spec_mat[(i*30) + 16] * K25_nz_re |
|
394 | +compressed_spec_mat[(i*30) + 16] * K25_nz_re | |
396 | +compressed_spec_mat[(i*30) + 20] * K34_nz_re |
|
395 | +compressed_spec_mat[(i*30) + 20] * K34_nz_re | |
397 | +compressed_spec_mat[(i*30) + 22] * K35_nz_re); |
|
396 | +compressed_spec_mat[(i*30) + 22] * K35_nz_re); | |
398 | nebx_im = ny * (compressed_spec_mat[(i*30) + 15]*K24_ny_re |
|
397 | nebx_im = ny * (compressed_spec_mat[(i*30) + 15]*K24_ny_re | |
399 | +compressed_spec_mat[(i*30) + 17] * K25_ny_re |
|
398 | +compressed_spec_mat[(i*30) + 17] * K25_ny_re | |
400 | +compressed_spec_mat[(i*30) + 21] * K34_ny_re |
|
399 | +compressed_spec_mat[(i*30) + 21] * K34_ny_re | |
401 | +compressed_spec_mat[(i*30) + 23] * K35_ny_re) |
|
400 | +compressed_spec_mat[(i*30) + 23] * K35_ny_re) | |
402 | + nz * (compressed_spec_mat[(i*30) + 15] * K24_nz_im |
|
401 | + nz * (compressed_spec_mat[(i*30) + 15] * K24_nz_im | |
403 | +compressed_spec_mat[(i*30) + 17] * K25_nz_im |
|
402 | +compressed_spec_mat[(i*30) + 17] * K25_nz_im | |
404 | +compressed_spec_mat[(i*30) + 21] * K34_nz_im |
|
403 | +compressed_spec_mat[(i*30) + 21] * K34_nz_im | |
405 | +compressed_spec_mat[(i*30) + 23] * K35_nz_im); |
|
404 | +compressed_spec_mat[(i*30) + 23] * K35_nz_im); | |
406 | tmp = nebx_re / bx_bx_star; |
|
405 | tmp = nebx_re / bx_bx_star; | |
407 | LFR_BP1[(i*9) + 8] = ((unsigned char) (tmp * 128)) & 0x7f; // cf DOC for the compression |
|
406 | LFR_BP1[(i*9) + 8] = ((unsigned char) (tmp * 128)) & 0x7f; // cf DOC for the compression | |
408 | if ( abs(nebx_re) > abs(nebx_im) ) { |
|
407 | if ( abs(nebx_re) > abs(nebx_im) ) { | |
409 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] | (0x80); // extract the sector of nebx |
|
408 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] | (0x80); // extract the sector of nebx | |
410 | } |
|
409 | } | |
411 | else { |
|
410 | else { | |
412 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] & (0x7f); // extract the sector of nebx |
|
411 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] & (0x7f); // extract the sector of nebx | |
413 | } |
|
412 | } | |
414 | } |
|
413 | } | |
415 |
|
414 | |||
416 | } |
|
415 | } | |
417 |
|
416 | |||
418 | void BP2_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat){ |
|
417 | void BP2_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat){ | |
419 | // BP2 autocorrelation |
|
418 | // BP2 autocorrelation | |
420 | int i; |
|
419 | int i; | |
421 | int aux = 0; |
|
420 | int aux = 0; | |
422 |
|
421 | |||
423 | for(i = 0; i<nb_bins_compressed_spec_mat; i++){ |
|
422 | for(i = 0; i<nb_bins_compressed_spec_mat; i++){ | |
424 | // S12 |
|
423 | // S12 | |
425 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 10]); |
|
424 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 10]); | |
426 | compressed_spec_mat[(i*30) + 2] = compressed_spec_mat[(i*30) + 2] / aux; |
|
425 | compressed_spec_mat[(i*30) + 2] = compressed_spec_mat[(i*30) + 2] / aux; | |
427 | compressed_spec_mat[(i*30) + 3] = compressed_spec_mat[(i*30) + 3] / aux; |
|
426 | compressed_spec_mat[(i*30) + 3] = compressed_spec_mat[(i*30) + 3] / aux; | |
428 | // S13 |
|
427 | // S13 | |
429 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 18]); |
|
428 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 18]); | |
430 | compressed_spec_mat[(i*30) + 4] = compressed_spec_mat[(i*30) + 4] / aux; |
|
429 | compressed_spec_mat[(i*30) + 4] = compressed_spec_mat[(i*30) + 4] / aux; | |
431 | compressed_spec_mat[(i*30) + 5] = compressed_spec_mat[(i*30) + 5] / aux; |
|
430 | compressed_spec_mat[(i*30) + 5] = compressed_spec_mat[(i*30) + 5] / aux; | |
432 | // S23 |
|
431 | // S23 | |
433 | aux = sqrt(compressed_spec_mat[i*30+12]*compressed_spec_mat[(i*30) + 18]); |
|
432 | aux = sqrt(compressed_spec_mat[i*30+12]*compressed_spec_mat[(i*30) + 18]); | |
434 | compressed_spec_mat[(i*30) + 12] = compressed_spec_mat[(i*30) + 12] / aux; |
|
433 | compressed_spec_mat[(i*30) + 12] = compressed_spec_mat[(i*30) + 12] / aux; | |
435 | compressed_spec_mat[(i*30) + 13] = compressed_spec_mat[(i*30) + 13] / aux; |
|
434 | compressed_spec_mat[(i*30) + 13] = compressed_spec_mat[(i*30) + 13] / aux; | |
436 | // S45 |
|
435 | // S45 | |
437 | aux = sqrt(compressed_spec_mat[i*30+24]*compressed_spec_mat[(i*30) + 28]); |
|
436 | aux = sqrt(compressed_spec_mat[i*30+24]*compressed_spec_mat[(i*30) + 28]); | |
438 | compressed_spec_mat[(i*30) + 26] = compressed_spec_mat[(i*30) + 26] / aux; |
|
437 | compressed_spec_mat[(i*30) + 26] = compressed_spec_mat[(i*30) + 26] / aux; | |
439 | compressed_spec_mat[(i*30) + 27] = compressed_spec_mat[(i*30) + 27] / aux; |
|
438 | compressed_spec_mat[(i*30) + 27] = compressed_spec_mat[(i*30) + 27] / aux; | |
440 | // S14 |
|
439 | // S14 | |
441 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) +24]); |
|
440 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) +24]); | |
442 | compressed_spec_mat[(i*30) + 6] = compressed_spec_mat[(i*30) + 6] / aux; |
|
441 | compressed_spec_mat[(i*30) + 6] = compressed_spec_mat[(i*30) + 6] / aux; | |
443 | compressed_spec_mat[(i*30) + 7] = compressed_spec_mat[(i*30) + 7] / aux; |
|
442 | compressed_spec_mat[(i*30) + 7] = compressed_spec_mat[(i*30) + 7] / aux; | |
444 | // S15 |
|
443 | // S15 | |
445 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 28]); |
|
444 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 28]); | |
446 | compressed_spec_mat[(i*30) + 8] = compressed_spec_mat[(i*30) + 8] / aux; |
|
445 | compressed_spec_mat[(i*30) + 8] = compressed_spec_mat[(i*30) + 8] / aux; | |
447 | compressed_spec_mat[(i*30) + 9] = compressed_spec_mat[(i*30) + 9] / aux; |
|
446 | compressed_spec_mat[(i*30) + 9] = compressed_spec_mat[(i*30) + 9] / aux; | |
448 | // S24 |
|
447 | // S24 | |
449 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 24]); |
|
448 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 24]); | |
450 | compressed_spec_mat[(i*30) + 14] = compressed_spec_mat[(i*30) + 14] / aux; |
|
449 | compressed_spec_mat[(i*30) + 14] = compressed_spec_mat[(i*30) + 14] / aux; | |
451 | compressed_spec_mat[(i*30) + 15] = compressed_spec_mat[(i*30) + 15] / aux; |
|
450 | compressed_spec_mat[(i*30) + 15] = compressed_spec_mat[(i*30) + 15] / aux; | |
452 | // S25 |
|
451 | // S25 | |
453 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 28]); |
|
452 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 28]); | |
454 | compressed_spec_mat[(i*30) + 16] = compressed_spec_mat[(i*30) + 16] / aux; |
|
453 | compressed_spec_mat[(i*30) + 16] = compressed_spec_mat[(i*30) + 16] / aux; | |
455 | compressed_spec_mat[(i*30) + 17] = compressed_spec_mat[(i*30) + 17] / aux; |
|
454 | compressed_spec_mat[(i*30) + 17] = compressed_spec_mat[(i*30) + 17] / aux; | |
456 | // S34 |
|
455 | // S34 | |
457 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 24]); |
|
456 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 24]); | |
458 | compressed_spec_mat[(i*30) + 20] = compressed_spec_mat[(i*30) + 20] / aux; |
|
457 | compressed_spec_mat[(i*30) + 20] = compressed_spec_mat[(i*30) + 20] / aux; | |
459 | compressed_spec_mat[(i*30) + 21] = compressed_spec_mat[(i*30) + 21] / aux; |
|
458 | compressed_spec_mat[(i*30) + 21] = compressed_spec_mat[(i*30) + 21] / aux; | |
460 | // S35 |
|
459 | // S35 | |
461 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 28]); |
|
460 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 28]); | |
462 | compressed_spec_mat[(i*30) + 22] = compressed_spec_mat[(i*30) + 22] / aux; |
|
461 | compressed_spec_mat[(i*30) + 22] = compressed_spec_mat[(i*30) + 22] / aux; | |
463 | compressed_spec_mat[(i*30) + 23] = compressed_spec_mat[(i*30) + 23] / aux; |
|
462 | compressed_spec_mat[(i*30) + 23] = compressed_spec_mat[(i*30) + 23] / aux; | |
464 | } |
|
463 | } | |
465 | } |
|
464 | } | |
466 |
|
465 | |||
467 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header) |
|
466 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header) | |
468 | { |
|
467 | { | |
469 | header->targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
468 | header->targetLogicalAddress = CCSDS_DESTINATION_ID; | |
470 | header->protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
469 | header->protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
471 | header->reserved = 0x00; |
|
470 | header->reserved = 0x00; | |
472 | header->userApplication = CCSDS_USER_APP; |
|
471 | header->userApplication = CCSDS_USER_APP; | |
473 | header->packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
472 | header->packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); | |
474 | header->packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); |
|
473 | header->packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
475 | header->packetSequenceControl[0] = 0xc0; |
|
474 | header->packetSequenceControl[0] = 0xc0; | |
476 | header->packetSequenceControl[1] = 0x00; |
|
475 | header->packetSequenceControl[1] = 0x00; | |
477 | header->packetLength[0] = 0x00; |
|
476 | header->packetLength[0] = 0x00; | |
478 | header->packetLength[1] = 0x00; |
|
477 | header->packetLength[1] = 0x00; | |
479 | // DATA FIELD HEADER |
|
478 | // DATA FIELD HEADER | |
480 | header->spare1_pusVersion_spare2 = 0x10; |
|
479 | header->spare1_pusVersion_spare2 = 0x10; | |
481 | header->serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
480 | header->serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
482 | header->serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
481 | header->serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
483 | header->destinationID = TM_DESTINATION_ID_GROUND; |
|
482 | header->destinationID = TM_DESTINATION_ID_GROUND; | |
484 | // AUXILIARY DATA HEADER |
|
483 | // AUXILIARY DATA HEADER | |
485 | header->sid = 0x00; |
|
484 | header->sid = 0x00; | |
486 | header->biaStatusInfo = 0x00; |
|
485 | header->biaStatusInfo = 0x00; | |
487 | header->pa_lfr_pkt_cnt_asm = 0x00; |
|
486 | header->pa_lfr_pkt_cnt_asm = 0x00; | |
488 | header->pa_lfr_pkt_nr_asm = 0x00; |
|
487 | header->pa_lfr_pkt_nr_asm = 0x00; | |
489 | header->time[0] = 0x00; |
|
488 | header->time[0] = 0x00; | |
490 | header->time[0] = 0x00; |
|
489 | header->time[0] = 0x00; | |
491 | header->time[0] = 0x00; |
|
490 | header->time[0] = 0x00; | |
492 | header->time[0] = 0x00; |
|
491 | header->time[0] = 0x00; | |
493 | header->time[0] = 0x00; |
|
492 | header->time[0] = 0x00; | |
494 | header->time[0] = 0x00; |
|
493 | header->time[0] = 0x00; | |
495 | header->pa_lfr_asm_blk_nr[0] = 0x00; // BLK_NR MSB |
|
494 | header->pa_lfr_asm_blk_nr[0] = 0x00; // BLK_NR MSB | |
496 | header->pa_lfr_asm_blk_nr[1] = 0x00; // BLK_NR LSB |
|
495 | header->pa_lfr_asm_blk_nr[1] = 0x00; // BLK_NR LSB | |
497 | } |
|
496 | } | |
498 |
|
497 | |||
499 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, |
|
498 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, | |
500 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id) |
|
499 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id) | |
501 | { |
|
500 | { | |
502 | unsigned int i; |
|
501 | unsigned int i; | |
503 | unsigned int length = 0; |
|
502 | unsigned int length = 0; | |
504 | rtems_status_code status; |
|
503 | rtems_status_code status; | |
505 |
|
504 | |||
506 | for (i=0; i<2; i++) |
|
505 | for (i=0; i<2; i++) | |
507 | { |
|
506 | { | |
508 | // (1) BUILD THE DATA |
|
507 | // (1) BUILD THE DATA | |
509 | switch(sid) |
|
508 | switch(sid) | |
510 | { |
|
509 | { | |
511 | case SID_NORM_ASM_F0: |
|
510 | case SID_NORM_ASM_F0: | |
512 | spw_ioctl_send->dlen = TOTAL_SIZE_ASM_F0 / 2; |
|
511 | spw_ioctl_send->dlen = TOTAL_SIZE_ASM_F0_IN_BYTES / 2; | |
513 |
spw_ioctl_send->data = &spectral_matrix[ ASM_F0_INDICE_START |
|
512 | spw_ioctl_send->data = &spectral_matrix[ ( (ASM_F0_INDICE_START+ (i*NB_BINS_PER_PKT_ASM_F0)) * NB_VALUES_PER_SM) * 2 ]; | |
514 | length = PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0; |
|
513 | length = PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0; | |
515 |
header->pa_lfr_asm_blk_nr[0] = (unsigned char) ( (NB_BINS_PER_ASM_F0 |
|
514 | header->pa_lfr_asm_blk_nr[0] = (unsigned char) ( (NB_BINS_PER_PKT_ASM_F0) >> 8 ); // BLK_NR MSB | |
516 |
header->pa_lfr_asm_blk_nr[1] = (unsigned char) (NB_BINS_PER_ASM_F0 |
|
515 | header->pa_lfr_asm_blk_nr[1] = (unsigned char) (NB_BINS_PER_PKT_ASM_F0); // BLK_NR LSB | |
517 | break; |
|
516 | break; | |
518 | case SID_NORM_ASM_F1: |
|
517 | case SID_NORM_ASM_F1: | |
519 | break; |
|
518 | break; | |
520 | case SID_NORM_ASM_F2: |
|
519 | case SID_NORM_ASM_F2: | |
521 | break; |
|
520 | break; | |
522 | default: |
|
521 | default: | |
523 | PRINTF1("ERR *** in send_spectral_matrix *** unexpected sid %d\n", sid) |
|
522 | PRINTF1("ERR *** in send_spectral_matrix *** unexpected sid %d\n", sid) | |
524 | break; |
|
523 | break; | |
525 | } |
|
524 | } | |
526 | spw_ioctl_send->hlen = HEADER_LENGTH_TM_LFR_SCIENCE_ASM + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
525 | spw_ioctl_send->hlen = HEADER_LENGTH_TM_LFR_SCIENCE_ASM + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
527 | spw_ioctl_send->hdr = (char *) header; |
|
526 | spw_ioctl_send->hdr = (char *) header; | |
528 | spw_ioctl_send->options = 0; |
|
527 | spw_ioctl_send->options = 0; | |
529 |
|
528 | |||
530 | // (2) BUILD THE HEADER |
|
529 | // (2) BUILD THE HEADER | |
531 | header->packetLength[0] = (unsigned char) (length>>8); |
|
530 | header->packetLength[0] = (unsigned char) (length>>8); | |
532 | header->packetLength[1] = (unsigned char) (length); |
|
531 | header->packetLength[1] = (unsigned char) (length); | |
533 | header->sid = (unsigned char) sid; // SID |
|
532 | header->sid = (unsigned char) sid; // SID | |
534 | header->pa_lfr_pkt_cnt_asm = 2; |
|
533 | header->pa_lfr_pkt_cnt_asm = 2; | |
535 | header->pa_lfr_pkt_nr_asm = (unsigned char) (i+1); |
|
534 | header->pa_lfr_pkt_nr_asm = (unsigned char) (i+1); | |
536 |
|
535 | |||
537 | // (3) SET PACKET TIME |
|
536 | // (3) SET PACKET TIME | |
538 | header->time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
537 | header->time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
539 | header->time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
538 | header->time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
540 | header->time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
539 | header->time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
541 | header->time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
540 | header->time[3] = (unsigned char) (time_management_regs->coarse_time); | |
542 | header->time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
541 | header->time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
543 | header->time[5] = (unsigned char) (time_management_regs->fine_time); |
|
542 | header->time[5] = (unsigned char) (time_management_regs->fine_time); | |
544 | // |
|
543 | // | |
545 | header->acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
544 | header->acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
546 | header->acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
545 | header->acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
547 | header->acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
546 | header->acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
548 | header->acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); |
|
547 | header->acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); | |
549 | header->acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
548 | header->acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
550 | header->acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); |
|
549 | header->acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); | |
551 |
|
550 | |||
552 | // (4) SEND PACKET |
|
551 | // (4) SEND PACKET | |
553 | status = rtems_message_queue_send( queue_id, spw_ioctl_send, ACTION_MSG_SPW_IOCTL_SEND_SIZE); |
|
552 | status = rtems_message_queue_send( queue_id, spw_ioctl_send, ACTION_MSG_SPW_IOCTL_SEND_SIZE); | |
554 | if (status != RTEMS_SUCCESSFUL) { |
|
553 | if (status != RTEMS_SUCCESSFUL) { | |
555 | printf("in send_spectral_matrix *** ERR %d\n", (int) status); |
|
554 | printf("in send_spectral_matrix *** ERR %d\n", (int) status); | |
556 | } |
|
555 | } | |
557 | } |
|
556 | } | |
558 | } |
|
557 | } | |
559 |
|
558 | |||
560 | void convert_averaged_spectral_matrix( volatile float *input_matrix, char *output_matrix) |
|
559 | void convert_averaged_spectral_matrix( volatile float *input_matrix, char *output_matrix) | |
561 | { |
|
560 | { | |
562 | unsigned int i; |
|
561 | unsigned int i; | |
563 | unsigned int j; |
|
562 | unsigned int j; | |
564 | char * pt_char_input; |
|
563 | char * pt_char_input; | |
565 | char * pt_char_output; |
|
564 | char * pt_char_output; | |
566 |
|
565 | |||
567 | pt_char_input = NULL; |
|
566 | pt_char_input = NULL; | |
568 | pt_char_output = NULL; |
|
567 | pt_char_output = NULL; | |
569 |
|
568 | |||
570 | for( i=0; i<NB_BINS_PER_SM; i++) |
|
569 | for( i=0; i<NB_BINS_PER_SM; i++) | |
571 | { |
|
570 | { | |
572 | for ( j=0; j<NB_VALUES_PER_SM; j++) |
|
571 | for ( j=0; j<NB_VALUES_PER_SM; j++) | |
573 | { |
|
572 | { | |
574 | pt_char_input = (char*) &input_matrix [ (i*NB_VALUES_PER_SM) + j ]; |
|
573 | pt_char_input = (char*) &input_matrix [ (i*NB_VALUES_PER_SM) + j ]; | |
575 | pt_char_output = (char*) &output_matrix[ 2 * ( (i*NB_VALUES_PER_SM) + j ) ]; |
|
574 | pt_char_output = (char*) &output_matrix[ 2 * ( (i*NB_VALUES_PER_SM) + j ) ]; | |
576 | pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float |
|
575 | pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float | |
577 | pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float |
|
576 | pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float | |
578 | } |
|
577 | } | |
579 | } |
|
578 | } | |
580 | } |
|
579 | } | |
581 |
|
580 | |||
582 | void fill_averaged_spectral_matrix(void) |
|
581 | void fill_averaged_spectral_matrix(void) | |
583 | { |
|
582 | { | |
584 | /** This function fills spectral matrices related buffers with arbitrary data. |
|
583 | /** This function fills spectral matrices related buffers with arbitrary data. | |
585 | * |
|
584 | * | |
586 | * This function is for testing purpose only. |
|
585 | * This function is for testing purpose only. | |
587 | * |
|
586 | * | |
588 | */ |
|
587 | */ | |
589 |
|
588 | |||
590 | float offset; |
|
589 | float offset; | |
591 | float coeff; |
|
590 | float coeff; | |
592 |
|
591 | |||
593 | offset = 10.; |
|
592 | offset = 10.; | |
594 | coeff = 100000.; |
|
593 | coeff = 100000.; | |
595 | averaged_sm_f0[ 0 + 25 * 0 ] = 0. + offset; |
|
594 | averaged_sm_f0[ 0 + 25 * 0 ] = 0. + offset; | |
596 | averaged_sm_f0[ 0 + 25 * 1 ] = 1. + offset; |
|
595 | averaged_sm_f0[ 0 + 25 * 1 ] = 1. + offset; | |
597 | averaged_sm_f0[ 0 + 25 * 2 ] = 2. + offset; |
|
596 | averaged_sm_f0[ 0 + 25 * 2 ] = 2. + offset; | |
598 | averaged_sm_f0[ 0 + 25 * 3 ] = 3. + offset; |
|
597 | averaged_sm_f0[ 0 + 25 * 3 ] = 3. + offset; | |
599 | averaged_sm_f0[ 0 + 25 * 4 ] = 4. + offset; |
|
598 | averaged_sm_f0[ 0 + 25 * 4 ] = 4. + offset; | |
600 | averaged_sm_f0[ 0 + 25 * 5 ] = 5. + offset; |
|
599 | averaged_sm_f0[ 0 + 25 * 5 ] = 5. + offset; | |
601 | averaged_sm_f0[ 0 + 25 * 6 ] = 6. + offset; |
|
600 | averaged_sm_f0[ 0 + 25 * 6 ] = 6. + offset; | |
602 | averaged_sm_f0[ 0 + 25 * 7 ] = 7. + offset; |
|
601 | averaged_sm_f0[ 0 + 25 * 7 ] = 7. + offset; | |
603 | averaged_sm_f0[ 0 + 25 * 8 ] = 8. + offset; |
|
602 | averaged_sm_f0[ 0 + 25 * 8 ] = 8. + offset; | |
604 | averaged_sm_f0[ 0 + 25 * 9 ] = 9. + offset; |
|
603 | averaged_sm_f0[ 0 + 25 * 9 ] = 9. + offset; | |
605 | averaged_sm_f0[ 0 + 25 * 10 ] = 10. + offset; |
|
604 | averaged_sm_f0[ 0 + 25 * 10 ] = 10. + offset; | |
606 | averaged_sm_f0[ 0 + 25 * 11 ] = 11. + offset; |
|
605 | averaged_sm_f0[ 0 + 25 * 11 ] = 11. + offset; | |
607 | averaged_sm_f0[ 0 + 25 * 12 ] = 12. + offset; |
|
606 | averaged_sm_f0[ 0 + 25 * 12 ] = 12. + offset; | |
608 | averaged_sm_f0[ 0 + 25 * 13 ] = 13. + offset; |
|
607 | averaged_sm_f0[ 0 + 25 * 13 ] = 13. + offset; | |
609 | averaged_sm_f0[ 0 + 25 * 14 ] = 14. + offset; |
|
608 | averaged_sm_f0[ 0 + 25 * 14 ] = 14. + offset; | |
610 | averaged_sm_f0[ 9 + 25 * 0 ] = -(0. + offset)* coeff; |
|
609 | averaged_sm_f0[ 9 + 25 * 0 ] = -(0. + offset)* coeff; | |
611 | averaged_sm_f0[ 9 + 25 * 1 ] = -(1. + offset)* coeff; |
|
610 | averaged_sm_f0[ 9 + 25 * 1 ] = -(1. + offset)* coeff; | |
612 | averaged_sm_f0[ 9 + 25 * 2 ] = -(2. + offset)* coeff; |
|
611 | averaged_sm_f0[ 9 + 25 * 2 ] = -(2. + offset)* coeff; | |
613 | averaged_sm_f0[ 9 + 25 * 3 ] = -(3. + offset)* coeff; |
|
612 | averaged_sm_f0[ 9 + 25 * 3 ] = -(3. + offset)* coeff; | |
614 | averaged_sm_f0[ 9 + 25 * 4 ] = -(4. + offset)* coeff; |
|
613 | averaged_sm_f0[ 9 + 25 * 4 ] = -(4. + offset)* coeff; | |
615 | averaged_sm_f0[ 9 + 25 * 5 ] = -(5. + offset)* coeff; |
|
614 | averaged_sm_f0[ 9 + 25 * 5 ] = -(5. + offset)* coeff; | |
616 | averaged_sm_f0[ 9 + 25 * 6 ] = -(6. + offset)* coeff; |
|
615 | averaged_sm_f0[ 9 + 25 * 6 ] = -(6. + offset)* coeff; | |
617 | averaged_sm_f0[ 9 + 25 * 7 ] = -(7. + offset)* coeff; |
|
616 | averaged_sm_f0[ 9 + 25 * 7 ] = -(7. + offset)* coeff; | |
618 | averaged_sm_f0[ 9 + 25 * 8 ] = -(8. + offset)* coeff; |
|
617 | averaged_sm_f0[ 9 + 25 * 8 ] = -(8. + offset)* coeff; | |
619 | averaged_sm_f0[ 9 + 25 * 9 ] = -(9. + offset)* coeff; |
|
618 | averaged_sm_f0[ 9 + 25 * 9 ] = -(9. + offset)* coeff; | |
620 | averaged_sm_f0[ 9 + 25 * 10 ] = -(10. + offset)* coeff; |
|
619 | averaged_sm_f0[ 9 + 25 * 10 ] = -(10. + offset)* coeff; | |
621 | averaged_sm_f0[ 9 + 25 * 11 ] = -(11. + offset)* coeff; |
|
620 | averaged_sm_f0[ 9 + 25 * 11 ] = -(11. + offset)* coeff; | |
622 | averaged_sm_f0[ 9 + 25 * 12 ] = -(12. + offset)* coeff; |
|
621 | averaged_sm_f0[ 9 + 25 * 12 ] = -(12. + offset)* coeff; | |
623 | averaged_sm_f0[ 9 + 25 * 13 ] = -(13. + offset)* coeff; |
|
622 | averaged_sm_f0[ 9 + 25 * 13 ] = -(13. + offset)* coeff; | |
624 | averaged_sm_f0[ 9 + 25 * 14 ] = -(14. + offset)* coeff; |
|
623 | averaged_sm_f0[ 9 + 25 * 14 ] = -(14. + offset)* coeff; | |
625 |
|
624 | |||
626 | offset = 10000000; |
|
625 | offset = 10000000; | |
627 | averaged_sm_f0[ 16 + 25 * 0 ] = (0. + offset)* coeff; |
|
626 | averaged_sm_f0[ 16 + 25 * 0 ] = (0. + offset)* coeff; | |
628 | averaged_sm_f0[ 16 + 25 * 1 ] = (1. + offset)* coeff; |
|
627 | averaged_sm_f0[ 16 + 25 * 1 ] = (1. + offset)* coeff; | |
629 | averaged_sm_f0[ 16 + 25 * 2 ] = (2. + offset)* coeff; |
|
628 | averaged_sm_f0[ 16 + 25 * 2 ] = (2. + offset)* coeff; | |
630 | averaged_sm_f0[ 16 + 25 * 3 ] = (3. + offset)* coeff; |
|
629 | averaged_sm_f0[ 16 + 25 * 3 ] = (3. + offset)* coeff; | |
631 | averaged_sm_f0[ 16 + 25 * 4 ] = (4. + offset)* coeff; |
|
630 | averaged_sm_f0[ 16 + 25 * 4 ] = (4. + offset)* coeff; | |
632 | averaged_sm_f0[ 16 + 25 * 5 ] = (5. + offset)* coeff; |
|
631 | averaged_sm_f0[ 16 + 25 * 5 ] = (5. + offset)* coeff; | |
633 | averaged_sm_f0[ 16 + 25 * 6 ] = (6. + offset)* coeff; |
|
632 | averaged_sm_f0[ 16 + 25 * 6 ] = (6. + offset)* coeff; | |
634 | averaged_sm_f0[ 16 + 25 * 7 ] = (7. + offset)* coeff; |
|
633 | averaged_sm_f0[ 16 + 25 * 7 ] = (7. + offset)* coeff; | |
635 | averaged_sm_f0[ 16 + 25 * 8 ] = (8. + offset)* coeff; |
|
634 | averaged_sm_f0[ 16 + 25 * 8 ] = (8. + offset)* coeff; | |
636 | averaged_sm_f0[ 16 + 25 * 9 ] = (9. + offset)* coeff; |
|
635 | averaged_sm_f0[ 16 + 25 * 9 ] = (9. + offset)* coeff; | |
637 | averaged_sm_f0[ 16 + 25 * 10 ] = (10. + offset)* coeff; |
|
636 | averaged_sm_f0[ 16 + 25 * 10 ] = (10. + offset)* coeff; | |
638 | averaged_sm_f0[ 16 + 25 * 11 ] = (11. + offset)* coeff; |
|
637 | averaged_sm_f0[ 16 + 25 * 11 ] = (11. + offset)* coeff; | |
639 | averaged_sm_f0[ 16 + 25 * 12 ] = (12. + offset)* coeff; |
|
638 | averaged_sm_f0[ 16 + 25 * 12 ] = (12. + offset)* coeff; | |
640 | averaged_sm_f0[ 16 + 25 * 13 ] = (13. + offset)* coeff; |
|
639 | averaged_sm_f0[ 16 + 25 * 13 ] = (13. + offset)* coeff; | |
641 | averaged_sm_f0[ 16 + 25 * 14 ] = (14. + offset)* coeff; |
|
640 | averaged_sm_f0[ 16 + 25 * 14 ] = (14. + offset)* coeff; | |
642 |
|
641 | |||
643 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 0 ] = averaged_sm_f0[ 0 ]; |
|
642 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 0 ] = averaged_sm_f0[ 0 ]; | |
644 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 1 ] = averaged_sm_f0[ 1 ]; |
|
643 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 1 ] = averaged_sm_f0[ 1 ]; | |
645 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 2 ] = averaged_sm_f0[ 2 ]; |
|
644 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 2 ] = averaged_sm_f0[ 2 ]; | |
646 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 3 ] = averaged_sm_f0[ 3 ]; |
|
645 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 3 ] = averaged_sm_f0[ 3 ]; | |
647 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 4 ] = averaged_sm_f0[ 4 ]; |
|
646 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 4 ] = averaged_sm_f0[ 4 ]; | |
648 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 5 ] = averaged_sm_f0[ 5 ]; |
|
647 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 5 ] = averaged_sm_f0[ 5 ]; | |
649 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 6 ] = averaged_sm_f0[ 6 ]; |
|
648 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 6 ] = averaged_sm_f0[ 6 ]; | |
650 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 7 ] = averaged_sm_f0[ 7 ]; |
|
649 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 7 ] = averaged_sm_f0[ 7 ]; | |
651 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 8 ] = averaged_sm_f0[ 8 ]; |
|
650 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 8 ] = averaged_sm_f0[ 8 ]; | |
652 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 9 ] = averaged_sm_f0[ 9 ]; |
|
651 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 9 ] = averaged_sm_f0[ 9 ]; | |
653 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 10 ] = averaged_sm_f0[ 10 ]; |
|
652 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 10 ] = averaged_sm_f0[ 10 ]; | |
654 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 11 ] = averaged_sm_f0[ 11 ]; |
|
653 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 11 ] = averaged_sm_f0[ 11 ]; | |
655 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 12 ] = averaged_sm_f0[ 12 ]; |
|
654 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 12 ] = averaged_sm_f0[ 12 ]; | |
656 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 13 ] = averaged_sm_f0[ 13 ]; |
|
655 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 13 ] = averaged_sm_f0[ 13 ]; | |
657 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 14 ] = averaged_sm_f0[ 14 ]; |
|
656 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 14 ] = averaged_sm_f0[ 14 ]; | |
658 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 15 ] = averaged_sm_f0[ 15 ]; |
|
657 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 15 ] = averaged_sm_f0[ 15 ]; | |
659 | } |
|
658 | } | |
660 |
|
659 | |||
661 | void reset_spectral_matrix_regs() |
|
660 | void reset_spectral_matrix_regs() | |
662 | { |
|
661 | { | |
663 | /** This function resets the spectral matrices module registers. |
|
662 | /** This function resets the spectral matrices module registers. | |
664 | * |
|
663 | * | |
665 | * The registers affected by this function are located at the following offset addresses: |
|
664 | * The registers affected by this function are located at the following offset addresses: | |
666 | * |
|
665 | * | |
667 | * - 0x00 config |
|
666 | * - 0x00 config | |
668 | * - 0x04 status |
|
667 | * - 0x04 status | |
669 | * - 0x08 matrixF0_Address0 |
|
668 | * - 0x08 matrixF0_Address0 | |
670 | * - 0x10 matrixFO_Address1 |
|
669 | * - 0x10 matrixFO_Address1 | |
671 | * - 0x14 matrixF1_Address |
|
670 | * - 0x14 matrixF1_Address | |
672 | * - 0x18 matrixF2_Address |
|
671 | * - 0x18 matrixF2_Address | |
673 | * |
|
672 | * | |
674 | */ |
|
673 | */ | |
675 |
|
674 | |||
676 | spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; |
|
675 | spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; | |
677 | spectral_matrix_regs->matrixFO_Address1 = current_ring_node_sm_f0->buffer_address; |
|
676 | spectral_matrix_regs->matrixFO_Address1 = current_ring_node_sm_f0->buffer_address; | |
678 | spectral_matrix_regs->matrixF1_Address = current_ring_node_sm_f1->buffer_address; |
|
677 | spectral_matrix_regs->matrixF1_Address = current_ring_node_sm_f1->buffer_address; | |
679 | spectral_matrix_regs->matrixF2_Address = current_ring_node_sm_f2->buffer_address; |
|
678 | spectral_matrix_regs->matrixF2_Address = current_ring_node_sm_f2->buffer_address; | |
680 | } |
|
679 | } | |
681 |
|
680 | |||
682 | //****************** |
|
681 | //****************** | |
683 | // general functions |
|
682 | // general functions | |
684 |
|
683 | |||
685 |
|
684 | |||
686 |
|
685 | |||
687 |
|
686 |
General Comments 0
You need to be logged in to leave comments.
Login now