##// END OF EJS Templates
Minor modifications to meet Logiscope requirements
paul -
r78:c815bcdfb1c6 VHDLib206
parent child
Show More
@@ -1,198 +1,198
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.1, 2013-11-15T09:52:17. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-15T13:43:04. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
7 7 <value type="int">0</value>
8 8 </data>
9 9 <data>
10 10 <variable>ProjectExplorer.Project.EditorSettings</variable>
11 11 <valuemap type="QVariantMap">
12 12 <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
13 13 <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
14 14 <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
15 15 <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
16 16 <value type="QString" key="language">Cpp</value>
17 17 <valuemap type="QVariantMap" key="value">
18 18 <value type="QString" key="CurrentPreferences">CppGlobal</value>
19 19 </valuemap>
20 20 </valuemap>
21 21 <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
22 22 <value type="QString" key="language">QmlJS</value>
23 23 <valuemap type="QVariantMap" key="value">
24 24 <value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
25 25 </valuemap>
26 26 </valuemap>
27 27 <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
28 28 <value type="QByteArray" key="EditorConfiguration.Codec">System</value>
29 29 <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
30 30 <value type="int" key="EditorConfiguration.IndentSize">4</value>
31 31 <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
32 32 <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
33 33 <value type="int" key="EditorConfiguration.PaddingMode">1</value>
34 34 <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
35 35 <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
36 36 <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
37 37 <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
38 38 <value type="int" key="EditorConfiguration.TabSize">8</value>
39 39 <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
40 40 <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
41 41 <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
42 42 <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
43 43 <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
44 44 <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
45 45 </valuemap>
46 46 </data>
47 47 <data>
48 48 <variable>ProjectExplorer.Project.PluginSettings</variable>
49 49 <valuemap type="QVariantMap"/>
50 50 </data>
51 51 <data>
52 52 <variable>ProjectExplorer.Project.Target.0</variable>
53 53 <valuemap type="QVariantMap">
54 54 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.3 in PATH (System)</value>
55 55 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.3 in PATH (System)</value>
56 56 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{be73cf6a-f9d8-4d5a-8adf-adc2d83e2e44}</value>
57 57 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
58 58 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
59 59 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
60 60 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
61 61 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
62 62 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
63 63 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
64 64 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
65 65 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
66 66 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
67 67 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
68 68 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
69 69 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
70 70 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
71 71 </valuemap>
72 72 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
73 73 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
74 74 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
75 75 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
76 76 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
77 77 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
78 78 <value type="QString">-w</value>
79 79 <value type="QString">-r</value>
80 80 </valuelist>
81 81 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
82 82 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
83 83 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
84 84 </valuemap>
85 85 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
86 86 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
87 87 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
88 88 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
89 89 </valuemap>
90 90 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
91 91 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
92 92 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
93 93 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
94 94 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
95 95 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
96 96 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
97 97 <value type="QString">-w</value>
98 98 <value type="QString">-r</value>
99 99 </valuelist>
100 100 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
101 101 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
102 102 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
103 103 </valuemap>
104 104 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
105 105 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
106 106 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
107 107 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
108 108 </valuemap>
109 109 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
110 110 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
111 111 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
112 112 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
113 113 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
114 114 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
115 115 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
116 116 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/admin/opt/DEV_PLE/FSW-qt</value>
117 117 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
118 118 </valuemap>
119 119 <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
120 120 <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
121 121 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
122 122 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
123 123 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
124 124 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
125 125 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
126 126 </valuemap>
127 127 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
128 128 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
129 129 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
130 130 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
131 131 </valuemap>
132 132 <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
133 133 <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
134 134 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
135 135 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
136 136 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
137 137 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
138 138 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
139 139 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
140 140 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
141 141 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
142 142 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
143 143 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
144 144 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
145 145 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
146 146 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
147 147 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
148 148 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
149 149 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
150 150 <value type="int">0</value>
151 151 <value type="int">1</value>
152 152 <value type="int">2</value>
153 153 <value type="int">3</value>
154 154 <value type="int">4</value>
155 155 <value type="int">5</value>
156 156 <value type="int">6</value>
157 157 <value type="int">7</value>
158 158 <value type="int">8</value>
159 159 <value type="int">9</value>
160 160 <value type="int">10</value>
161 161 <value type="int">11</value>
162 162 <value type="int">12</value>
163 163 <value type="int">13</value>
164 164 <value type="int">14</value>
165 165 </valuelist>
166 166 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
167 167 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
168 168 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
169 169 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
170 170 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/admin/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value>
171 171 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
172 172 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
173 173 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
174 174 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
175 175 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
176 176 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
177 177 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
178 178 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
179 179 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
180 180 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
181 181 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
182 182 </valuemap>
183 183 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
184 184 </valuemap>
185 185 </data>
186 186 <data>
187 187 <variable>ProjectExplorer.Project.TargetCount</variable>
188 188 <value type="int">1</value>
189 189 </data>
190 190 <data>
191 191 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
192 192 <value type="QByteArray">{cdbf9cdc-1e84-406e-889b-c4feef49e75c}</value>
193 193 </data>
194 194 <data>
195 195 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
196 196 <value type="int">14</value>
197 197 </data>
198 198 </qtcreator>
@@ -1,449 +1,455
1 1 /** Functions to load and dump parameters in the LFR registers.
2 2 *
3 3 * @file
4 4 * @author P. LEROY
5 5 *
6 6 * A group of functions to handle TC related to parameter loading and dumping.\n
7 7 * TC_LFR_LOAD_COMMON_PAR\n
8 8 * TC_LFR_LOAD_NORMAL_PAR\n
9 9 * TC_LFR_LOAD_BURST_PAR\n
10 10 * TC_LFR_LOAD_SBM1_PAR\n
11 11 * TC_LFR_LOAD_SBM2_PAR\n
12 12 *
13 13 */
14 14
15 15 #include "tc_load_dump_parameters.h"
16 16
17 17 int action_load_common_par(ccsdsTelecommandPacket_t *TC)
18 18 {
19 19 /** This function updates the LFR registers with the incoming common parameters.
20 20 *
21 21 * @param TC points to the TeleCommand packet that is being processed
22 22 *
23 23 *
24 24 */
25 25
26 26 parameter_dump_packet.unused0 = TC->dataAndCRC[0];
27 27 parameter_dump_packet.bw_sp0_sp1_r0_r1 = TC->dataAndCRC[1];
28 28 set_wfp_data_shaping(parameter_dump_packet.bw_sp0_sp1_r0_r1);
29 29 return LFR_SUCCESSFUL;
30 30 }
31 31
32 32 int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
33 33 {
34 34 /** This function updates the LFR registers with the incoming normal parameters.
35 35 *
36 36 * @param TC points to the TeleCommand packet that is being processed
37 37 * @param queue_id is the id of the queue which handles TM related to this execution step
38 38 *
39 39 */
40 40
41 41 int result;
42 42 int flag;
43 rtems_status_code status;
43 44
44 45 flag = LFR_SUCCESSFUL;
45 46
46 47 if ( (lfrCurrentMode == LFR_MODE_NORMAL) ||
47 48 (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) {
48 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
49 status = send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
49 50 flag = LFR_DEFAULT;
50 51 }
51 52
52 53 //***************
53 54 // sy_lfr_n_swf_l
54 55 if (flag == LFR_SUCCESSFUL)
55 56 {
56 57 result = set_sy_lfr_n_swf_l( TC, queue_id, time );
57 58 if (result != LFR_SUCCESSFUL)
58 59 {
59 60 flag = LFR_DEFAULT;
60 61 }
61 62 }
62 63
63 64 //***************
64 65 // sy_lfr_n_swf_p
65 66 if (flag == LFR_SUCCESSFUL)
66 67 {
67 68 result = set_sy_lfr_n_swf_p( TC, queue_id, time );
68 69 if (result != LFR_SUCCESSFUL)
69 70 {
70 71 flag = LFR_DEFAULT;
71 72 }
72 73 }
73 74
74 75 //***************
75 76 // SY_LFR_N_ASM_P
76 77 if (flag == LFR_SUCCESSFUL)
77 78 {
78 79 result = set_sy_lfr_n_asm_p( TC, queue_id );
79 80 if (result != LFR_SUCCESSFUL)
80 81 {
81 82 flag = LFR_DEFAULT;
82 83 }
83 84 }
84 85
85 86 //***************
86 87 // SY_LFR_N_BP_P0
87 88 if (flag == LFR_SUCCESSFUL)
88 89 {
89 90 result = set_sy_lfr_n_bp_p0( TC, queue_id );
90 91 if (result != LFR_SUCCESSFUL)
91 92 {
92 93 flag = LFR_DEFAULT;
93 94 }
94 95 }
95 96
96 97 //***************
97 98 // sy_lfr_n_bp_p1
98 99 if (flag == LFR_SUCCESSFUL)
99 100 {
100 101 result = set_sy_lfr_n_bp_p1( TC, queue_id );
101 102 if (result != LFR_SUCCESSFUL)
102 103 {
103 104 flag = LFR_DEFAULT;
104 105 }
105 106 }
106 107
107 108 return flag;
108 109 }
109 110
110 111 int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
111 112 {
112 113 /** This function updates the LFR registers with the incoming burst parameters.
113 114 *
114 115 * @param TC points to the TeleCommand packet that is being processed
115 116 * @param queue_id is the id of the queue which handles TM related to this execution step
116 117 *
117 118 */
118 119
119 120 int result;
120 121 unsigned char lfrMode;
122 rtems_status_code status;
121 123
122 124 result = LFR_DEFAULT;
123 125 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
124 126
125 127 if ( lfrMode == LFR_MODE_BURST ) {
126 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
128 status = send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
127 129 result = LFR_DEFAULT;
128 130 }
129 131 else {
130 132 parameter_dump_packet.sy_lfr_b_bp_p0 = TC->dataAndCRC[0];
131 133 parameter_dump_packet.sy_lfr_b_bp_p1 = TC->dataAndCRC[1];
132 134
133 135 result = LFR_SUCCESSFUL;
134 136 }
135 137
136 138 return result;
137 139 }
138 140
139 141 int action_load_sbm1_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
140 142 {
141 143 /** This function updates the LFR registers with the incoming sbm1 parameters.
142 144 *
143 145 * @param TC points to the TeleCommand packet that is being processed
144 146 * @param queue_id is the id of the queue which handles TM related to this execution step
145 147 *
146 148 */
147 149 int result;
148 150 unsigned char lfrMode;
151 rtems_status_code status;
149 152
150 153 result = LFR_DEFAULT;
151 154 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
152 155
153 156 if ( (lfrMode == LFR_MODE_SBM1) || (lfrMode == LFR_MODE_SBM2) ) {
154 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
157 status = send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
155 158 result = LFR_DEFAULT;
156 159 }
157 160 else {
158 161 parameter_dump_packet.sy_lfr_s1_bp_p0 = TC->dataAndCRC[0];
159 162 parameter_dump_packet.sy_lfr_s1_bp_p1 = TC->dataAndCRC[1];
160 163
161 164 result = LFR_SUCCESSFUL;
162 165 }
163 166
164 167 return result;
165 168 }
166 169
167 170 int action_load_sbm2_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
168 171 {
169 172 /** This function updates the LFR registers with the incoming sbm2 parameters.
170 173 *
171 174 * @param TC points to the TeleCommand packet that is being processed
172 175 * @param queue_id is the id of the queue which handles TM related to this execution step
173 176 *
174 177 */
175 178
176 179 int result;
177 180 unsigned char lfrMode;
181 rtems_status_code status;
178 182
179 183 result = LFR_DEFAULT;
180 184 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
181 185
182 186 if ( (lfrMode == LFR_MODE_SBM2) || (lfrMode == LFR_MODE_SBM2) ) {
183 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
187 status = send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
184 188 result = LFR_DEFAULT;
185 189 }
186 190 else {
187 191 parameter_dump_packet.sy_lfr_s2_bp_p0 = TC->dataAndCRC[0];
188 192 parameter_dump_packet.sy_lfr_s2_bp_p1 = TC->dataAndCRC[1];
189 193
190 194 result = LFR_SUCCESSFUL;
191 195 }
192 196
193 197 return result;
194 198 }
195 199
196 200 int action_dump_par( rtems_id queue_id )
197 201 {
198 202 /** This function dumps the LFR parameters by sending the appropriate TM packet to the dedicated RTEMS message queue.
199 203 *
200 204 * @param queue_id is the id of the queue which handles TM related to this execution step.
201 205 *
202 206 * @return RTEMS directive status codes:
203 207 * - RTEMS_SUCCESSFUL - message sent successfully
204 208 * - RTEMS_INVALID_ID - invalid queue id
205 209 * - RTEMS_INVALID_SIZE - invalid message size
206 210 * - RTEMS_INVALID_ADDRESS - buffer is NULL
207 211 * - RTEMS_UNSATISFIED - out of message buffers
208 212 * - RTEMS_TOO_MANY - queue s limit has been reached
209 213 *
210 214 */
211 215
212 216 int status;
213 217
214 218 // UPDATE TIME
215 219 increment_seq_counter( parameter_dump_packet.packetSequenceControl );
216 220 parameter_dump_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
217 221 parameter_dump_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
218 222 parameter_dump_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
219 223 parameter_dump_packet.time[3] = (unsigned char) (time_management_regs->coarse_time);
220 224 parameter_dump_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
221 225 parameter_dump_packet.time[5] = (unsigned char) (time_management_regs->fine_time);
222 226 // SEND DATA
223 227 status = rtems_message_queue_send( queue_id, &parameter_dump_packet,
224 228 PACKET_LENGTH_PARAMETER_DUMP + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES);
225 229 if (status != RTEMS_SUCCESSFUL) {
226 230 PRINTF1("in action_dump *** ERR sending packet, code %d", status)
227 231 }
228 232
229 233 return status;
230 234 }
231 235
232 236 //***********************
233 237 // NORMAL MODE PARAMETERS
234 238
235 239 int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
236 240 {
237 241 /** This function sets the number of points of a snapshot (sy_lfr_n_swf_l).
238 242 *
239 243 * @param TC points to the TeleCommand packet that is being processed
240 244 * @param queue_id is the id of the queue which handles TM related to this execution step
241 245 *
242 246 */
243 247
244 248 unsigned int tmp;
245 249 int result;
246 250 unsigned char msb;
247 251 unsigned char lsb;
252 rtems_status_code status;
248 253
249 254 msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_L ];
250 255 lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_L+1 ];
251 256
252 257 tmp = ( unsigned int ) floor(
253 258 ( ( msb*256 ) + lsb ) / 16
254 259 ) * 16;
255 260
256 261 if ( (tmp < 16) || (tmp > 2048) ) // the snapshot period is a multiple of 16
257 262 { // 2048 is the maximum limit due to the size of the buffers
258 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_L+10, lsb, time );
263 status = send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_L+10, lsb, time );
259 264 result = WRONG_APP_DATA;
260 265 }
261 266 else if (tmp != 2048)
262 267 {
263 send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time );
268 status = send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time );
264 269 result = FUNCT_NOT_IMPL;
265 270 }
266 271 else
267 272 {
268 273 parameter_dump_packet.sy_lfr_n_swf_l[0] = (unsigned char) (tmp >> 8);
269 274 parameter_dump_packet.sy_lfr_n_swf_l[1] = (unsigned char) (tmp );
270 275 result = LFR_SUCCESSFUL;
271 276 }
272 277
273 278 return result;
274 279 }
275 280
276 281 int set_sy_lfr_n_swf_p(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time)
277 282 {
278 283 /** This function sets the time between two snapshots, in s (sy_lfr_n_swf_p).
279 284 *
280 285 * @param TC points to the TeleCommand packet that is being processed
281 286 * @param queue_id is the id of the queue which handles TM related to this execution step
282 287 *
283 288 */
284 289
285 290 unsigned int tmp;
286 291 int result;
287 292 unsigned char msb;
288 293 unsigned char lsb;
294 rtems_status_code status;
289 295
290 296 msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_P ];
291 297 lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_P+1 ];
292 298
293 299 tmp = ( unsigned int ) floor(
294 300 ( ( msb*256 ) + lsb ) / 8
295 301 ) * 8;
296 302
297 303 if ( (tmp < 16) || (tmp > 65528) )
298 304 {
299 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_P+10, lsb, time );
305 status = send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_P+10, lsb, time );
300 306 result = WRONG_APP_DATA;
301 307 }
302 308 else
303 309 {
304 310 parameter_dump_packet.sy_lfr_n_swf_p[0] = (unsigned char) (tmp >> 8);
305 311 parameter_dump_packet.sy_lfr_n_swf_p[1] = (unsigned char) (tmp );
306 312 result = LFR_SUCCESSFUL;
307 313 }
308 314
309 315 return result;
310 316 }
311 317
312 318 int set_sy_lfr_n_asm_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id )
313 319 {
314 320 /** This function sets the time between two full spectral matrices transmission, in s (SY_LFR_N_ASM_P).
315 321 *
316 322 * @param TC points to the TeleCommand packet that is being processed
317 323 * @param queue_id is the id of the queue which handles TM related to this execution step
318 324 *
319 325 */
320 326
321 327 int result;
322 328 unsigned char msb;
323 329 unsigned char lsb;
324 330
325 331 msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_ASM_P ];
326 332 lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_ASM_P+1 ];
327 333
328 334 parameter_dump_packet.sy_lfr_n_asm_p[0] = msb;
329 335 parameter_dump_packet.sy_lfr_n_asm_p[1] = lsb;
330 336 result = LFR_SUCCESSFUL;
331 337
332 338 return result;
333 339 }
334 340
335 341 int set_sy_lfr_n_bp_p0( ccsdsTelecommandPacket_t *TC, rtems_id queue_id )
336 342 {
337 343 /** This function sets the time between two basic parameter sets, in s (SY_LFR_N_BP_P0).
338 344 *
339 345 * @param TC points to the TeleCommand packet that is being processed
340 346 * @param queue_id is the id of the queue which handles TM related to this execution step
341 347 *
342 348 */
343 349
344 350 int status;
345 351
346 352 status = LFR_SUCCESSFUL;
347 353
348 354 parameter_dump_packet.sy_lfr_n_bp_p0 = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_BP_P0 ];
349 355
350 356 return status;
351 357 }
352 358
353 359 int set_sy_lfr_n_bp_p1(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
354 360 {
355 361 /** This function sets the time between two basic parameter sets (autocorrelation + crosscorrelation), in s (sy_lfr_n_bp_p1).
356 362 *
357 363 * @param TC points to the TeleCommand packet that is being processed
358 364 * @param queue_id is the id of the queue which handles TM related to this execution step
359 365 *
360 366 */
361 367
362 368 int status;
363 369
364 370 status = LFR_SUCCESSFUL;
365 371
366 372 parameter_dump_packet.sy_lfr_n_bp_p1 = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_BP_P1 ];
367 373
368 374 return status;
369 375 }
370 376
371 377 //**********************
372 378 // BURST MODE PARAMETERS
373 379
374 380 //*********************
375 381 // SBM1 MODE PARAMETERS
376 382
377 383 //*********************
378 384 // SBM2 MODE PARAMETERS
379 385
380 386 //**********
381 387 // init dump
382 388
383 389 void init_parameter_dump( void )
384 390 {
385 391 /** This function initialize the parameter_dump_packet global variable with default values.
386 392 *
387 393 */
388 394
389 395 parameter_dump_packet.targetLogicalAddress = CCSDS_DESTINATION_ID;
390 396 parameter_dump_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID;
391 397 parameter_dump_packet.reserved = CCSDS_RESERVED;
392 398 parameter_dump_packet.userApplication = CCSDS_USER_APP;
393 399 parameter_dump_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_PARAMETER_DUMP >> 8);
394 400 parameter_dump_packet.packetID[1] = (unsigned char) TM_PACKET_ID_PARAMETER_DUMP;
395 401 parameter_dump_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE;
396 402 parameter_dump_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
397 403 parameter_dump_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_PARAMETER_DUMP >> 8);
398 404 parameter_dump_packet.packetLength[1] = (unsigned char) PACKET_LENGTH_PARAMETER_DUMP;
399 405 // DATA FIELD HEADER
400 406 parameter_dump_packet.spare1_pusVersion_spare2 = SPARE1_PUSVERSION_SPARE2;
401 407 parameter_dump_packet.serviceType = TM_TYPE_PARAMETER_DUMP;
402 408 parameter_dump_packet.serviceSubType = TM_SUBTYPE_PARAMETER_DUMP;
403 409 parameter_dump_packet.destinationID = TM_DESTINATION_ID_GROUND;
404 410 parameter_dump_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
405 411 parameter_dump_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
406 412 parameter_dump_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
407 413 parameter_dump_packet.time[3] = (unsigned char) (time_management_regs->coarse_time);
408 414 parameter_dump_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
409 415 parameter_dump_packet.time[5] = (unsigned char) (time_management_regs->fine_time);
410 416 parameter_dump_packet.sid = SID_PARAMETER_DUMP;
411 417
412 418 //******************
413 419 // COMMON PARAMETERS
414 420 parameter_dump_packet.unused0 = DEFAULT_SY_LFR_COMMON0;
415 421 parameter_dump_packet.bw_sp0_sp1_r0_r1 = DEFAULT_SY_LFR_COMMON1;
416 422
417 423 //******************
418 424 // NORMAL PARAMETERS
419 425 parameter_dump_packet.sy_lfr_n_swf_l[0] = (unsigned char) (SY_LFR_N_SWF_L >> 8);
420 426 parameter_dump_packet.sy_lfr_n_swf_l[1] = (unsigned char) (SY_LFR_N_SWF_L );
421 427 parameter_dump_packet.sy_lfr_n_swf_p[0] = (unsigned char) (SY_LFR_N_SWF_P >> 8);
422 428 parameter_dump_packet.sy_lfr_n_swf_p[1] = (unsigned char) (SY_LFR_N_SWF_P );
423 429 parameter_dump_packet.sy_lfr_n_asm_p[0] = (unsigned char) (SY_LFR_N_ASM_P >> 8);
424 430 parameter_dump_packet.sy_lfr_n_asm_p[1] = (unsigned char) (SY_LFR_N_ASM_P );
425 431 parameter_dump_packet.sy_lfr_n_bp_p0 = (unsigned char) SY_LFR_N_BP_P0;
426 432 parameter_dump_packet.sy_lfr_n_bp_p1 = (unsigned char) SY_LFR_N_BP_P1;
427 433
428 434 //*****************
429 435 // BURST PARAMETERS
430 436 parameter_dump_packet.sy_lfr_b_bp_p0 = (unsigned char) DEFAULT_SY_LFR_B_BP_P0;
431 437 parameter_dump_packet.sy_lfr_b_bp_p1 = (unsigned char) DEFAULT_SY_LFR_B_BP_P1;
432 438
433 439 //****************
434 440 // SBM1 PARAMETERS
435 441 parameter_dump_packet.sy_lfr_s1_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P0; // min value is 0.25 s for the period
436 442 parameter_dump_packet.sy_lfr_s1_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P1;
437 443
438 444 //****************
439 445 // SBM2 PARAMETERS
440 446 parameter_dump_packet.sy_lfr_s2_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P0;
441 447 parameter_dump_packet.sy_lfr_s2_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P1;
442 448 }
443 449
444 450
445 451
446 452
447 453
448 454
449 455
General Comments 0
You need to be logged in to leave comments. Login now