@@ -0,0 +1,19 | |||||
|
1 | #ifndef TC_LOAD_DUMP_PARAMETERS_H | |||
|
2 | #define TC_LOAD_DUMP_PARAMETERS_H | |||
|
3 | ||||
|
4 | #include "tc_handler.h" | |||
|
5 | ||||
|
6 | int action_load_common_par( ccsdsTelecommandPacket_t *TC ); | |||
|
7 | int action_load_normal_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
8 | int action_load_burst_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
9 | int action_load_sbm1_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
10 | int action_load_sbm2_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
11 | int action_dump_par(rtems_id queue_id ); | |||
|
12 | ||||
|
13 | int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
14 | int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
15 | int set_sy_lfr_n_asm_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
16 | int set_sy_lfr_n_bp_p0( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
17 | int set_sy_lfr_n_bp_p1( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |||
|
18 | ||||
|
19 | #endif // TC_LOAD_DUMP_PARAMETERS_H |
@@ -0,0 +1,377 | |||||
|
1 | /** Functions to load and dump parameters in the LFR registers. | |||
|
2 | * | |||
|
3 | * @file | |||
|
4 | * @author P. LEROY | |||
|
5 | * | |||
|
6 | * A group of functions to handle TC related to parameter loading and dumping.\n | |||
|
7 | * TC_LFR_LOAD_COMMON_PAR\n | |||
|
8 | * TC_LFR_LOAD_NORMAL_PAR\n | |||
|
9 | * TC_LFR_LOAD_BURST_PAR\n | |||
|
10 | * TC_LFR_LOAD_SBM1_PAR\n | |||
|
11 | * TC_LFR_LOAD_SBM2_PAR\n | |||
|
12 | * | |||
|
13 | */ | |||
|
14 | ||||
|
15 | #include "tc_load_dump_parameters.h" | |||
|
16 | ||||
|
17 | int action_load_common_par(ccsdsTelecommandPacket_t *TC) | |||
|
18 | { | |||
|
19 | /** This function updates the LFR registers with the incoming common parameters. | |||
|
20 | * | |||
|
21 | * @param TC points to the TeleCommand packet that is being processed | |||
|
22 | * | |||
|
23 | * | |||
|
24 | */ | |||
|
25 | parameter_dump_packet.unused0 = TC->dataAndCRC[0]; | |||
|
26 | parameter_dump_packet.bw_sp0_sp1_r0_r1 = TC->dataAndCRC[1]; | |||
|
27 | set_wfp_data_shaping(parameter_dump_packet.bw_sp0_sp1_r0_r1); | |||
|
28 | return LFR_SUCCESSFUL; | |||
|
29 | } | |||
|
30 | ||||
|
31 | int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |||
|
32 | { | |||
|
33 | /** This function updates the LFR registers with the incoming normal parameters. | |||
|
34 | * | |||
|
35 | * @param TC points to the TeleCommand packet that is being processed | |||
|
36 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
37 | * | |||
|
38 | */ | |||
|
39 | int result; | |||
|
40 | int flag; | |||
|
41 | ||||
|
42 | flag = LFR_SUCCESSFUL; | |||
|
43 | result = LFR_SUCCESSFUL; | |||
|
44 | ||||
|
45 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { | |||
|
46 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |||
|
47 | flag = LFR_DEFAULT; | |||
|
48 | } | |||
|
49 | ||||
|
50 | //*************** | |||
|
51 | // sy_lfr_n_swf_l | |||
|
52 | if (flag == LFR_SUCCESSFUL) | |||
|
53 | { | |||
|
54 | result = set_sy_lfr_n_swf_l( TC, queue_id ); | |||
|
55 | if (result != LFR_SUCCESSFUL) | |||
|
56 | { | |||
|
57 | flag = LFR_DEFAULT; | |||
|
58 | } | |||
|
59 | } | |||
|
60 | ||||
|
61 | //*************** | |||
|
62 | // sy_lfr_n_swf_p | |||
|
63 | if (flag == LFR_SUCCESSFUL) | |||
|
64 | { | |||
|
65 | result = set_sy_lfr_n_swf_p( TC, queue_id ); | |||
|
66 | if (result != LFR_SUCCESSFUL) | |||
|
67 | { | |||
|
68 | flag = LFR_DEFAULT; | |||
|
69 | } | |||
|
70 | } | |||
|
71 | ||||
|
72 | //*************** | |||
|
73 | // sy_lfr_n_asm_p | |||
|
74 | if (flag == LFR_SUCCESSFUL) | |||
|
75 | { | |||
|
76 | result = set_sy_lfr_n_asm_p( TC, queue_id ); | |||
|
77 | if (result != LFR_SUCCESSFUL) | |||
|
78 | { | |||
|
79 | flag = LFR_DEFAULT; | |||
|
80 | } | |||
|
81 | } | |||
|
82 | ||||
|
83 | //*************** | |||
|
84 | // sy_lfr_n_bp_p0 | |||
|
85 | if (flag == LFR_SUCCESSFUL) | |||
|
86 | { | |||
|
87 | result = set_sy_lfr_n_bp_p0( TC, queue_id ); | |||
|
88 | if (result != LFR_SUCCESSFUL) | |||
|
89 | { | |||
|
90 | flag = LFR_DEFAULT; | |||
|
91 | } | |||
|
92 | } | |||
|
93 | ||||
|
94 | //*************** | |||
|
95 | // sy_lfr_n_bp_p1 | |||
|
96 | if (flag == LFR_SUCCESSFUL) | |||
|
97 | { | |||
|
98 | result = set_sy_lfr_n_bp_p1( TC, queue_id ); | |||
|
99 | if (result != LFR_SUCCESSFUL) | |||
|
100 | { | |||
|
101 | flag = LFR_DEFAULT; | |||
|
102 | } | |||
|
103 | } | |||
|
104 | ||||
|
105 | return result; | |||
|
106 | } | |||
|
107 | ||||
|
108 | int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |||
|
109 | { | |||
|
110 | /** This function updates the LFR registers with the incoming burst parameters. | |||
|
111 | * | |||
|
112 | * @param TC points to the TeleCommand packet that is being processed | |||
|
113 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
114 | * | |||
|
115 | */ | |||
|
116 | int result; | |||
|
117 | unsigned char lfrMode; | |||
|
118 | ||||
|
119 | result = LFR_DEFAULT; | |||
|
120 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |||
|
121 | ||||
|
122 | if ( lfrMode == LFR_MODE_BURST ) { | |||
|
123 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |||
|
124 | result = LFR_DEFAULT; | |||
|
125 | } | |||
|
126 | else { | |||
|
127 | parameter_dump_packet.sy_lfr_b_bp_p0 = TC->dataAndCRC[0]; | |||
|
128 | parameter_dump_packet.sy_lfr_b_bp_p1 = TC->dataAndCRC[1]; | |||
|
129 | ||||
|
130 | result = LFR_SUCCESSFUL; | |||
|
131 | } | |||
|
132 | ||||
|
133 | return result; | |||
|
134 | } | |||
|
135 | ||||
|
136 | int action_load_sbm1_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |||
|
137 | { | |||
|
138 | /** This function updates the LFR registers with the incoming sbm1 parameters. | |||
|
139 | * | |||
|
140 | * @param TC points to the TeleCommand packet that is being processed | |||
|
141 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
142 | * | |||
|
143 | */ | |||
|
144 | int result; | |||
|
145 | unsigned char lfrMode; | |||
|
146 | ||||
|
147 | result = LFR_DEFAULT; | |||
|
148 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |||
|
149 | ||||
|
150 | if ( lfrMode == LFR_MODE_SBM1 ) { | |||
|
151 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |||
|
152 | result = LFR_DEFAULT; | |||
|
153 | } | |||
|
154 | else { | |||
|
155 | parameter_dump_packet.sy_lfr_s1_bp_p0 = TC->dataAndCRC[0]; | |||
|
156 | parameter_dump_packet.sy_lfr_s1_bp_p1 = TC->dataAndCRC[1]; | |||
|
157 | ||||
|
158 | result = LFR_SUCCESSFUL; | |||
|
159 | } | |||
|
160 | ||||
|
161 | return result; | |||
|
162 | } | |||
|
163 | ||||
|
164 | int action_load_sbm2_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |||
|
165 | { | |||
|
166 | /** This function updates the LFR registers with the incoming sbm2 parameters. | |||
|
167 | * | |||
|
168 | * @param TC points to the TeleCommand packet that is being processed | |||
|
169 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
170 | * | |||
|
171 | */ | |||
|
172 | ||||
|
173 | int result; | |||
|
174 | unsigned char lfrMode; | |||
|
175 | ||||
|
176 | result = LFR_DEFAULT; | |||
|
177 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |||
|
178 | ||||
|
179 | if ( lfrMode == LFR_MODE_SBM2 ) { | |||
|
180 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |||
|
181 | result = LFR_DEFAULT; | |||
|
182 | } | |||
|
183 | else { | |||
|
184 | parameter_dump_packet.sy_lfr_s2_bp_p0 = TC->dataAndCRC[0]; | |||
|
185 | parameter_dump_packet.sy_lfr_s2_bp_p1 = TC->dataAndCRC[1]; | |||
|
186 | ||||
|
187 | result = LFR_SUCCESSFUL; | |||
|
188 | } | |||
|
189 | ||||
|
190 | return result; | |||
|
191 | } | |||
|
192 | ||||
|
193 | int action_dump_par( rtems_id queue_id ) | |||
|
194 | { | |||
|
195 | /** This function dumps the LFR parameters by sending the appropriate TM packet to the dedicated RTEMS message queue. | |||
|
196 | * | |||
|
197 | * @param queue_id is the id of the queue which handles TM related to this execution step. | |||
|
198 | * | |||
|
199 | * @return RTEMS directive status codes: | |||
|
200 | * - RTEMS_SUCCESSFUL - message sent successfully | |||
|
201 | * - RTEMS_INVALID_ID - invalid queue id | |||
|
202 | * - RTEMS_INVALID_SIZE - invalid message size | |||
|
203 | * - RTEMS_INVALID_ADDRESS - buffer is NULL | |||
|
204 | * - RTEMS_UNSATISFIED - out of message buffers | |||
|
205 | * - RTEMS_TOO_MANY - queue s limit has been reached | |||
|
206 | * | |||
|
207 | */ | |||
|
208 | ||||
|
209 | int status; | |||
|
210 | ||||
|
211 | // SEND DATA | |||
|
212 | status = rtems_message_queue_send( queue_id, ¶meter_dump_packet, | |||
|
213 | PACKET_LENGTH_PARAMETER_DUMP + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); | |||
|
214 | if (status != RTEMS_SUCCESSFUL) { | |||
|
215 | PRINTF1("in action_dump *** ERR sending packet, code %d", status) | |||
|
216 | } | |||
|
217 | ||||
|
218 | return status; | |||
|
219 | } | |||
|
220 | ||||
|
221 | //*********************** | |||
|
222 | // NORMAL MODE PARAMETERS | |||
|
223 | ||||
|
224 | int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |||
|
225 | { | |||
|
226 | /** This function sets the number of points of a snapshot (sy_lfr_n_swf_l). | |||
|
227 | * | |||
|
228 | * @param TC points to the TeleCommand packet that is being processed | |||
|
229 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
230 | * | |||
|
231 | */ | |||
|
232 | ||||
|
233 | unsigned int tmp; | |||
|
234 | int result; | |||
|
235 | unsigned char msb; | |||
|
236 | unsigned char lsb; | |||
|
237 | ||||
|
238 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_L ]; | |||
|
239 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_L+1 ]; | |||
|
240 | ||||
|
241 | tmp = ( unsigned int ) floor( | |||
|
242 | ( ( msb*256 ) + lsb ) / 16 | |||
|
243 | ) * 16; | |||
|
244 | ||||
|
245 | if ( (tmp < 16) || (tmp > 2048) ) // the snapshot period is a multiple of 16 | |||
|
246 | { // 2048 is the maximum limit due to thesize of the buffers | |||
|
247 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_L+10, lsb ); | |||
|
248 | result = WRONG_APP_DATA; | |||
|
249 | } | |||
|
250 | else if (tmp != 2048) | |||
|
251 | { | |||
|
252 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |||
|
253 | result = FUNCT_NOT_IMPL; | |||
|
254 | } | |||
|
255 | else | |||
|
256 | { | |||
|
257 | parameter_dump_packet.sy_lfr_n_swf_l[0] = (unsigned char) (tmp >> 8); | |||
|
258 | parameter_dump_packet.sy_lfr_n_swf_l[1] = (unsigned char) (tmp ); | |||
|
259 | result = LFR_SUCCESSFUL; | |||
|
260 | } | |||
|
261 | ||||
|
262 | return result; | |||
|
263 | } | |||
|
264 | ||||
|
265 | int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |||
|
266 | { | |||
|
267 | /** This function sets the time between two snapshots, in s (sy_lfr_n_swf_p). | |||
|
268 | * | |||
|
269 | * @param TC points to the TeleCommand packet that is being processed | |||
|
270 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
271 | * | |||
|
272 | */ | |||
|
273 | ||||
|
274 | unsigned int tmp; | |||
|
275 | int result; | |||
|
276 | unsigned char msb; | |||
|
277 | unsigned char lsb; | |||
|
278 | ||||
|
279 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_P ]; | |||
|
280 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_P+1 ]; | |||
|
281 | ||||
|
282 | tmp = ( unsigned int ) floor( | |||
|
283 | ( ( msb*256 ) + lsb ) / 8 | |||
|
284 | ) * 8; | |||
|
285 | ||||
|
286 | if ( (tmp < 16) || (tmp > 65528) ) | |||
|
287 | { | |||
|
288 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_P+10, lsb ); | |||
|
289 | result = WRONG_APP_DATA; | |||
|
290 | } | |||
|
291 | else | |||
|
292 | { | |||
|
293 | parameter_dump_packet.sy_lfr_n_swf_p[0] = (unsigned char) (tmp >> 8); | |||
|
294 | parameter_dump_packet.sy_lfr_n_swf_p[1] = (unsigned char) (tmp ); | |||
|
295 | result = LFR_SUCCESSFUL; | |||
|
296 | } | |||
|
297 | ||||
|
298 | return result; | |||
|
299 | } | |||
|
300 | ||||
|
301 | int set_sy_lfr_n_asm_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |||
|
302 | { | |||
|
303 | /** This function sets the time between two full spectral matrices transmission, in s (sy_lfr_n_asm_p). | |||
|
304 | * | |||
|
305 | * @param TC points to the TeleCommand packet that is being processed | |||
|
306 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
307 | * | |||
|
308 | */ | |||
|
309 | ||||
|
310 | int result; | |||
|
311 | unsigned char msb; | |||
|
312 | unsigned char lsb; | |||
|
313 | ||||
|
314 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_ASM_P ]; | |||
|
315 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_ASM_P+1 ]; | |||
|
316 | ||||
|
317 | parameter_dump_packet.sy_lfr_n_asm_p[0] = msb; | |||
|
318 | parameter_dump_packet.sy_lfr_n_asm_p[1] = lsb; | |||
|
319 | result = LFR_SUCCESSFUL; | |||
|
320 | ||||
|
321 | return result; | |||
|
322 | } | |||
|
323 | ||||
|
324 | int set_sy_lfr_n_bp_p0( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |||
|
325 | { | |||
|
326 | /** This function sets the time between two basic parameter sets, in s (sy_lfr_n_bp_p0). | |||
|
327 | * | |||
|
328 | * @param TC points to the TeleCommand packet that is being processed | |||
|
329 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
330 | * | |||
|
331 | */ | |||
|
332 | ||||
|
333 | int status; | |||
|
334 | ||||
|
335 | status = LFR_SUCCESSFUL; | |||
|
336 | ||||
|
337 | parameter_dump_packet.sy_lfr_n_bp_p0 = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_BP_P0 ]; | |||
|
338 | ||||
|
339 | return status; | |||
|
340 | } | |||
|
341 | ||||
|
342 | int set_sy_lfr_n_bp_p1(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |||
|
343 | { | |||
|
344 | /** This function sets the time between two basic parameter sets (autocorrelation + crosscorrelation), in s (sy_lfr_n_bp_p1). | |||
|
345 | * | |||
|
346 | * @param TC points to the TeleCommand packet that is being processed | |||
|
347 | * @param queue_id is the id of the queue which handles TM related to this execution step | |||
|
348 | * | |||
|
349 | */ | |||
|
350 | ||||
|
351 | int status; | |||
|
352 | ||||
|
353 | status = LFR_SUCCESSFUL; | |||
|
354 | ||||
|
355 | parameter_dump_packet.sy_lfr_n_bp_p1 = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_BP_P1 ]; | |||
|
356 | ||||
|
357 | return status; | |||
|
358 | } | |||
|
359 | ||||
|
360 | //********************** | |||
|
361 | // BURST MODE PARAMETERS | |||
|
362 | ||||
|
363 | //********************* | |||
|
364 | // SBM1 MODE PARAMETERS | |||
|
365 | ||||
|
366 | //********************* | |||
|
367 | // SBM2 MODE PARAMETERS | |||
|
368 | ||||
|
369 | ||||
|
370 | ||||
|
371 | ||||
|
372 | ||||
|
373 | ||||
|
374 | ||||
|
375 | ||||
|
376 | ||||
|
377 |
@@ -1,6 +1,6 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Oct 17 10:12:11 2013 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
@@ -49,14 +49,18 SOURCES = ../src/wf_handler.c \ | |||||
49 | ../src/fsw_misc.c \ |
|
49 | ../src/fsw_misc.c \ | |
50 | ../src/fsw_init.c \ |
|
50 | ../src/fsw_init.c \ | |
51 | ../src/fsw_globals.c \ |
|
51 | ../src/fsw_globals.c \ | |
52 | ../src/fsw_spacewire.c |
|
52 | ../src/fsw_spacewire.c \ | |
|
53 | ../src/tc_load_dump_parameters.c \ | |||
|
54 | ../src/tm_lfr_tc_exe.c | |||
53 | OBJECTS = obj/wf_handler.o \ |
|
55 | OBJECTS = obj/wf_handler.o \ | |
54 | obj/tc_handler.o \ |
|
56 | obj/tc_handler.o \ | |
55 | obj/fsw_processing.o \ |
|
57 | obj/fsw_processing.o \ | |
56 | obj/fsw_misc.o \ |
|
58 | obj/fsw_misc.o \ | |
57 | obj/fsw_init.o \ |
|
59 | obj/fsw_init.o \ | |
58 | obj/fsw_globals.o \ |
|
60 | obj/fsw_globals.o \ | |
59 | obj/fsw_spacewire.o |
|
61 | obj/fsw_spacewire.o \ | |
|
62 | obj/tc_load_dump_parameters.o \ | |||
|
63 | obj/tm_lfr_tc_exe.o | |||
60 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
64 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
61 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
65 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
62 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
66 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
@@ -214,7 +218,7 obj/fsw_processing.o: ../src/fsw_process | |||||
214 | obj/fsw_misc.o: ../src/fsw_misc.c |
|
218 | obj/fsw_misc.o: ../src/fsw_misc.c | |
215 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c |
|
219 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c | |
216 |
|
220 | |||
217 | obj/fsw_init.o: ../src/fsw_init.c |
|
221 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c | |
218 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c |
|
222 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c | |
219 |
|
223 | |||
220 | obj/fsw_globals.o: ../src/fsw_globals.c |
|
224 | obj/fsw_globals.o: ../src/fsw_globals.c | |
@@ -223,6 +227,12 obj/fsw_globals.o: ../src/fsw_globals.c | |||||
223 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c |
|
227 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c | |
224 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c |
|
228 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c | |
225 |
|
229 | |||
|
230 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c | |||
|
231 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c | |||
|
232 | ||||
|
233 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c | |||
|
234 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c | |||
|
235 | ||||
226 | ####### Install |
|
236 | ####### Install | |
227 |
|
237 | |||
228 | install: FORCE |
|
238 | install: FORCE |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -29,6 +29,10 contains( CONFIG, boot_messages ) { | |||||
29 | DEFINES += BOOT_MESSAGES |
|
29 | DEFINES += BOOT_MESSAGES | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
|
32 | #doxygen.target = doxygen | |||
|
33 | #doxygen.commands = doxygen ../doc/Doxyfile | |||
|
34 | #QMAKE_EXTRA_TARGETS += doxygen | |||
|
35 | ||||
32 | TARGET = fsw |
|
36 | TARGET = fsw | |
33 | contains( CONFIG, gsa ) { |
|
37 | contains( CONFIG, gsa ) { | |
34 | DEFINES += GSA |
|
38 | DEFINES += GSA | |
@@ -46,7 +50,9 SOURCES += \ | |||||
46 | ../src/fsw_misc.c \ |
|
50 | ../src/fsw_misc.c \ | |
47 | ../src/fsw_init.c \ |
|
51 | ../src/fsw_init.c \ | |
48 | ../src/fsw_globals.c \ |
|
52 | ../src/fsw_globals.c \ | |
49 | ../src/fsw_spacewire.c |
|
53 | ../src/fsw_spacewire.c \ | |
|
54 | ../src/tc_load_dump_parameters.c \ | |||
|
55 | ../src/tm_lfr_tc_exe.c | |||
50 |
|
56 | |||
51 | HEADERS += \ |
|
57 | HEADERS += \ | |
52 | ../header/wf_handler.h \ |
|
58 | ../header/wf_handler.h \ | |
@@ -59,5 +65,7 HEADERS += \ | |||||
59 | ../header/ccsds_types.h \ |
|
65 | ../header/ccsds_types.h \ | |
60 | ../header/fsw_params_processing.h \ |
|
66 | ../header/fsw_params_processing.h \ | |
61 | ../header/fsw_spacewire.h \ |
|
67 | ../header/fsw_spacewire.h \ | |
62 | ../header/tm_byte_positions.h |
|
68 | ../header/tm_byte_positions.h \ | |
|
69 | ../header/tc_load_dump_parameters.h \ | |||
|
70 | ../header/tm_lfr_tc_exe | |||
63 |
|
71 |
@@ -1,6 +1,6 | |||||
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 2.8.0, 2013-10-1 |
|
3 | <!-- Written by QtCreator 2.8.0, 2013-10-17T08:46:24. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
@@ -56,7 +56,7 | |||||
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</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"> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
@@ -79,7 +79,7 | |||||
79 | <value type="QString">-r</value> |
|
79 | <value type="QString">-r</value> | |
80 | </valuelist> |
|
80 | </valuelist> | |
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> |
|
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w -j 4</value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
84 | </valuemap> |
|
84 | </valuemap> | |
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
@@ -239,7 +239,55 | |||||
239 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
239 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
240 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
240 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
241 | </valuemap> |
|
241 | </valuemap> | |
242 |
<value type="int" key="ProjectExplorer.Target.RunConfiguration |
|
242 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> | |
|
243 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |||
|
244 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |||
|
245 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |||
|
246 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |||
|
247 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |||
|
248 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |||
|
249 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |||
|
250 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |||
|
251 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |||
|
252 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |||
|
253 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |||
|
254 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |||
|
255 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |||
|
256 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |||
|
257 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |||
|
258 | <value type="int">0</value> | |||
|
259 | <value type="int">1</value> | |||
|
260 | <value type="int">2</value> | |||
|
261 | <value type="int">3</value> | |||
|
262 | <value type="int">4</value> | |||
|
263 | <value type="int">5</value> | |||
|
264 | <value type="int">6</value> | |||
|
265 | <value type="int">7</value> | |||
|
266 | <value type="int">8</value> | |||
|
267 | <value type="int">9</value> | |||
|
268 | <value type="int">10</value> | |||
|
269 | <value type="int">11</value> | |||
|
270 | <value type="int">12</value> | |||
|
271 | <value type="int">13</value> | |||
|
272 | <value type="int">14</value> | |||
|
273 | </valuelist> | |||
|
274 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |||
|
275 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |||
|
276 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> | |||
|
277 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value> | |||
|
278 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value> | |||
|
279 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value> | |||
|
280 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value> | |||
|
281 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |||
|
282 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> | |||
|
283 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |||
|
284 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |||
|
285 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |||
|
286 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |||
|
287 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |||
|
288 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |||
|
289 | </valuemap> | |||
|
290 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value> | |||
243 | </valuemap> |
|
291 | </valuemap> | |
244 | </data> |
|
292 | </data> | |
245 | <data> |
|
293 | <data> |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -106,28 +106,20 | |||||
106 | #define TM_SUBTYPE_LFR_SCIENCE 3 |
|
106 | #define TM_SUBTYPE_LFR_SCIENCE 3 | |
107 |
|
107 | |||
108 | // FAILURE CODES |
|
108 | // FAILURE CODES | |
109 | #define ILLEGAL_APID 0 |
|
109 | #define ILLEGAL_APID 0 | |
110 | #define WRONG_LEN_PACKET 1 |
|
110 | #define WRONG_LEN_PACKET 1 | |
111 | #define INCOR_CHECKSUM 2 |
|
111 | #define INCOR_CHECKSUM 2 | |
112 | #define ILL_TYPE 3 |
|
112 | #define ILL_TYPE 3 | |
113 | #define ILL_SUBTYPE 4 |
|
113 | #define ILL_SUBTYPE 4 | |
114 | #define WRONG_APP_DATA 5 |
|
114 | #define WRONG_APP_DATA 5 // 0x00 0x05 | |
115 | // |
|
115 | // | |
116 | #define WRONG_CMD_CODE 6 |
|
116 | #define CCSDS_TM_VALID 7 | |
117 | #define CCSDS_TM_VALID 7 |
|
117 | #define TC_NOT_EXE 42000 // 0xa4 0x10 | |
118 | #define FAILURE_CODE_INCONSISTENT 5 // 0x00 0x05 |
|
118 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 | |
119 |
#define FAIL |
|
119 | #define FAIL_DETECTED 42003 // 0xa4 0x13 | |
120 |
#define |
|
120 | #define CORRUPTED 42005 // 0xa4 0x15 | |
121 | #define FAILURE_CODE_ERROR 42003 // 0xa4 0x13 |
|
|||
122 | #define FAILURE_CODE_CORRUPTED 42005 // 0xa4 0x15 |
|
|||
123 |
|
121 | |||
124 | // TM SID |
|
122 | // TM SID | |
125 | #define SID_DEFAULT 0 |
|
|||
126 | #define SID_EXE_INC 5 |
|
|||
127 | #define SID_NOT_EXE 42000 // 0xa4 0x10 |
|
|||
128 | #define SID_NOT_IMP 42002 // 0xa4 0x12 |
|
|||
129 | #define SID_EXE_ERR 42003 // 0xa4 0x13 |
|
|||
130 | #define SID_EXE_CORR 42005 // 0xa4 0x15 |
|
|||
131 | #define SID_HK 1 |
|
123 | #define SID_HK 1 | |
132 | #define SID_PARAMETER_DUMP 10 |
|
124 | #define SID_PARAMETER_DUMP 10 | |
133 |
|
125 |
@@ -5,18 +5,19 | |||||
5 | #include <fcntl.h> |
|
5 | #include <fcntl.h> | |
6 | #include <stdio.h> |
|
6 | #include <stdio.h> | |
7 | #include <stdlib.h> |
|
7 | #include <stdlib.h> | |
|
8 | #include <unistd.h> // for the read call | |||
|
9 | #include <sys/ioctl.h> // for the ioctl call | |||
8 |
|
10 | |||
|
11 | #include <rtems.h> | |||
9 | #include <grspw.h> |
|
12 | #include <grspw.h> | |
10 | #include <apbuart.h> |
|
13 | #include <apbuart.h> | |
|
14 | #include <leon.h> | |||
11 |
|
15 | |||
12 | #include "fsw_params.h" |
|
16 | #include "fsw_params.h" | |
13 | #include "fsw_misc.h" |
|
17 | #include "fsw_misc.h" | |
14 | #include "tm_byte_positions.h" |
|
|||
15 | #include "fsw_processing.h" |
|
18 | #include "fsw_processing.h" | |
16 | #include "tc_handler.h" |
|
19 | #include "tc_handler.h" | |
17 | #include "wf_handler.h" |
|
20 | #include "wf_handler.h" | |
18 | #include "grlib_regs.h" |
|
|||
19 | #include "ccsds_types.h" |
|
|||
20 |
|
21 | |||
21 | #include "fsw_spacewire.h" |
|
22 | #include "fsw_spacewire.h" | |
22 |
|
23 | |||
@@ -35,10 +36,7 extern Packet_TM_LFR_PARAMETER_DUMP_t pa | |||||
35 | extern unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID]; |
|
36 | extern unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID]; | |
36 |
|
37 | |||
37 | // RTEMS TASKS |
|
38 | // RTEMS TASKS | |
38 |
rtems_task Init( rtems_task_argument argument); |
|
39 | rtems_task Init( rtems_task_argument argument); | |
39 | rtems_task recv_task(rtems_task_argument argument); |
|
|||
40 | rtems_task stat_task(rtems_task_argument argument); |
|
|||
41 | rtems_task wfrm_task(rtems_task_argument argument); |
|
|||
42 |
|
40 | |||
43 | // OTHER functions |
|
41 | // OTHER functions | |
44 | int create_names( void ); |
|
42 | int create_names( void ); |
@@ -1,15 +1,7 | |||||
1 | #ifndef FSW_MISC_H_INCLUDED |
|
1 | #ifndef FSW_MISC_H_INCLUDED | |
2 | #define FSW_MISC_H_INCLUDED |
|
2 | #define FSW_MISC_H_INCLUDED | |
3 |
|
3 | |||
4 | #include <rtems.h> |
|
|||
5 | #include <stdio.h> |
|
|||
6 |
|
||||
7 | #include <grspw.h> |
|
|||
8 |
|
||||
9 | #include "fsw_init.h" |
|
4 | #include "fsw_init.h" | |
10 | #include "fsw_params.h" |
|
|||
11 | #include "grlib_regs.h" |
|
|||
12 | #include "ccsds_types.h" |
|
|||
13 |
|
5 | |||
14 | rtems_name HK_name; // name of the HK rate monotonic |
|
6 | rtems_name HK_name; // name of the HK rate monotonic | |
15 | rtems_id HK_id; // id of the HK rate monotonic period |
|
7 | rtems_id HK_id; // id of the HK rate monotonic period | |
@@ -24,7 +16,7 void update_spacewire_statistics(); | |||||
24 |
|
16 | |||
25 | // SERIAL LINK |
|
17 | // SERIAL LINK | |
26 | int send_console_outputs_on_apbuart_port( void ); |
|
18 | int send_console_outputs_on_apbuart_port( void ); | |
27 |
|
|
19 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value); | |
28 |
|
20 | |||
29 | // RTEMS TASKS |
|
21 | // RTEMS TASKS | |
30 | rtems_task stat_task(rtems_task_argument argument); |
|
22 | rtems_task stat_task(rtems_task_argument argument); |
@@ -1,7 +1,9 | |||||
1 | #ifndef FSW_RTEMS_CONFIG_H_INCLUDED |
|
1 | #ifndef FSW_RTEMS_CONFIG_H_INCLUDED | |
2 | #define FSW_RTEMS_CONFIG_H_INCLUDED |
|
2 | #define FSW_RTEMS_CONFIG_H_INCLUDED | |
3 |
|
3 | |||
|
4 | #include "grlib_regs.h" | |||
4 | #include "fsw_params_processing.h" |
|
5 | #include "fsw_params_processing.h" | |
|
6 | #include "tm_byte_positions.h" | |||
5 | #include "ccsds_types.h" |
|
7 | #include "ccsds_types.h" | |
6 |
|
8 | |||
7 | #define GRSPW_DEVICE_NAME "/dev/grspw0" |
|
9 | #define GRSPW_DEVICE_NAME "/dev/grspw0" | |
@@ -138,7 +140,7 | |||||
138 |
|
140 | |||
139 | #define ACTION_MSG_QUEUE_COUNT 10 |
|
141 | #define ACTION_MSG_QUEUE_COUNT 10 | |
140 | #define ACTION_MSG_PKTS_COUNT 50 |
|
142 | #define ACTION_MSG_PKTS_COUNT 50 | |
141 |
#define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_ |
|
143 | #define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_PARAMETER_DUMP + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES) | |
142 | #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options |
|
144 | #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options | |
143 |
|
145 | |||
144 | #define QUEUE_QUEU 0 |
|
146 | #define QUEUE_QUEU 0 |
@@ -1,17 +1,7 | |||||
1 | #ifndef FSW_RTEMS_PROCESSING_H_INCLUDED |
|
1 | #ifndef FSW_RTEMS_PROCESSING_H_INCLUDED | |
2 | #define FSW_RTEMS_PROCESSING_H_INCLUDED |
|
2 | #define FSW_RTEMS_PROCESSING_H_INCLUDED | |
3 |
|
3 | |||
4 |
#include |
|
4 | #include "fsw_init.h" | |
5 | #include <grspw.h> |
|
|||
6 | #include <leon.h> |
|
|||
7 |
|
||||
8 | #include <fsw_init.h> |
|
|||
9 | #include <fsw_params.h> |
|
|||
10 | #include <grlib_regs.h> |
|
|||
11 | #include <ccsds_types.h> |
|
|||
12 |
|
||||
13 | #include <stdio.h> |
|
|||
14 | #include <stdlib.h> |
|
|||
15 |
|
5 | |||
16 | extern volatile int spec_mat_f0_0[ ]; |
|
6 | extern volatile int spec_mat_f0_0[ ]; | |
17 | extern volatile int spec_mat_f0_1[ ]; |
|
7 | extern volatile int spec_mat_f0_1[ ]; | |
@@ -50,9 +40,6 rtems_task bpf0_task(rtems_task_argument | |||||
50 | rtems_task smiq_task(rtems_task_argument argument); // added to test the spectral matrix simulator |
|
40 | rtems_task smiq_task(rtems_task_argument argument); // added to test the spectral matrix simulator | |
51 | rtems_task matr_task(rtems_task_argument argument); |
|
41 | rtems_task matr_task(rtems_task_argument argument); | |
52 |
|
42 | |||
53 | rtems_task spw_bppr_task_rate_monotonic(rtems_task_argument argument); |
|
|||
54 |
|
||||
55 | void matrix_average(volatile int *spec_mat, volatile float *averaged_spec_mat); |
|
|||
56 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat); |
|
43 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat); | |
57 | void matrix_reset(volatile float *averaged_spec_mat); |
|
44 | void matrix_reset(volatile float *averaged_spec_mat); | |
58 | void BP1_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1); |
|
45 | void BP1_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1); | |
@@ -62,7 +49,7 void init_header_asm( Header_TM_LFR_SCIE | |||||
62 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, |
|
49 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, | |
63 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id); |
|
50 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id); | |
64 | void convert_averaged_spectral_matrix(volatile float *input_matrix, char *output_matrix); |
|
51 | void convert_averaged_spectral_matrix(volatile float *input_matrix, char *output_matrix); | |
65 | void fill_averaged_spectral_matrix(); |
|
52 | void fill_averaged_spectral_matrix( void ); | |
66 | void reset_spectral_matrix_regs(); |
|
53 | void reset_spectral_matrix_regs(); | |
67 |
|
54 | |||
68 | #endif // FSW_RTEMS_PROCESSING_H_INCLUDED |
|
55 | #endif // FSW_RTEMS_PROCESSING_H_INCLUDED |
@@ -1,17 +1,7 | |||||
1 | #ifndef FSW_SPACEWIRE_H_INCLUDED |
|
1 | #ifndef FSW_SPACEWIRE_H_INCLUDED | |
2 | #define FSW_SPACEWIRE_H_INCLUDED |
|
2 | #define FSW_SPACEWIRE_H_INCLUDED | |
3 |
|
3 | |||
4 |
#include |
|
4 | #include "fsw_init.h" | |
5 |
|
||||
6 | #include <grspw.h> |
|
|||
7 |
|
||||
8 | #include <stdio.h> |
|
|||
9 | #include <stdlib.h> |
|
|||
10 | #include <fcntl.h> |
|
|||
11 |
|
||||
12 | #include "fsw_params.h" |
|
|||
13 | #include "ccsds_types.h" |
|
|||
14 | #include "fsw_misc.h" |
|
|||
15 |
|
5 | |||
16 | extern spw_stats spacewire_stats; |
|
6 | extern spw_stats spacewire_stats; | |
17 | extern spw_stats spacewire_stats_backup; |
|
7 | extern spw_stats spacewire_stats_backup; | |
@@ -23,7 +13,7 int spacewire_configure_link( void ); | |||||
23 | int spacewire_wait_for_link(void); |
|
13 | int spacewire_wait_for_link(void); | |
24 | void spacewire_set_NP(unsigned char val, unsigned int regAddr); // No Port force |
|
14 | void spacewire_set_NP(unsigned char val, unsigned int regAddr); // No Port force | |
25 | void spacewire_set_RE(unsigned char val, unsigned int regAddr); // RMAP Enable |
|
15 | void spacewire_set_RE(unsigned char val, unsigned int regAddr); // RMAP Enable | |
26 | void spacewire_compute_stats_offsets(); |
|
16 | void spacewire_compute_stats_offsets(void); | |
27 |
|
17 | |||
28 | void timecode_irq_handler(void *pDev, void *regs, int minor, unsigned int tc); |
|
18 | void timecode_irq_handler(void *pDev, void *regs, int minor, unsigned int tc); | |
29 |
|
19 |