@@ -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: T |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 7 08:03:44 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 |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -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.1, 2013-11-0 |
|
3 | <!-- Written by QtCreator 2.8.1, 2013-11-08T07:03:44. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -121,7 +121,6 | |||||
121 | #define CCSDS_TM_VALID 7 |
|
121 | #define CCSDS_TM_VALID 7 | |
122 |
|
122 | |||
123 | // TC SID |
|
123 | // TC SID | |
124 | #define SID_TC_DEFAULT 0 // the default SID for TC sent to the LFR |
|
|||
125 | #define SID_TC_GROUND 0 |
|
124 | #define SID_TC_GROUND 0 | |
126 | #define SID_TC_MISSION_TIMELINE 110 |
|
125 | #define SID_TC_MISSION_TIMELINE 110 | |
127 | #define SID_TC_TC_SEQUENCES 111 |
|
126 | #define SID_TC_TC_SEQUENCES 111 | |
@@ -135,6 +134,25 | |||||
135 | #define SID_TC_AOCS 11 |
|
134 | #define SID_TC_AOCS 11 | |
136 | #define SID_TC_RPW_INTERNAL 254 |
|
135 | #define SID_TC_RPW_INTERNAL 254 | |
137 |
|
136 | |||
|
137 | enum apid_destid{ | |||
|
138 | GROUND, | |||
|
139 | MISSION_TIMELINE, | |||
|
140 | TC_SEQUENCES, | |||
|
141 | RECOVERY_ACTION_CMD, | |||
|
142 | BACKUP_MISSION_TIMELINE, | |||
|
143 | DIRECT_CMD, | |||
|
144 | SPARE_GRD_SRC1, | |||
|
145 | SPARE_GRD_SRC2, | |||
|
146 | OBCP, | |||
|
147 | SYSTEM_CONTROL, | |||
|
148 | AOCS, | |||
|
149 | RPW_INTERNAL, | |||
|
150 | UNKNOWN | |||
|
151 | }; | |||
|
152 | // SEQUENCE COUNTERS | |||
|
153 | #define SEQ_CNT_MAX 16383 | |||
|
154 | #define SEQ_CNT_NB_DEST_ID 12 | |||
|
155 | ||||
138 | // TM SID |
|
156 | // TM SID | |
139 | #define SID_HK 1 |
|
157 | #define SID_HK 1 | |
140 | #define SID_PARAMETER_DUMP 10 |
|
158 | #define SID_PARAMETER_DUMP 10 | |
@@ -210,301 +228,301 enum TM_TYPE{ | |||||
210 |
|
228 | |||
211 | struct TMHeader_str |
|
229 | struct TMHeader_str | |
212 | { |
|
230 | { | |
213 |
|
|
231 | unsigned char targetLogicalAddress; | |
214 |
|
|
232 | unsigned char protocolIdentifier; | |
215 |
|
|
233 | unsigned char reserved; | |
216 |
|
|
234 | unsigned char userApplication; | |
217 |
|
|
235 | unsigned char packetID[2]; | |
218 |
|
|
236 | unsigned char packetSequenceControl[2]; | |
219 |
|
|
237 | unsigned char packetLength[2]; | |
220 | // DATA FIELD HEADER |
|
238 | // DATA FIELD HEADER | |
221 |
|
|
239 | unsigned char spare1_pusVersion_spare2; | |
222 |
|
|
240 | unsigned char serviceType; | |
223 |
|
|
241 | unsigned char serviceSubType; | |
224 |
|
|
242 | unsigned char destinationID; | |
225 |
|
|
243 | unsigned char time[6]; | |
226 | }; |
|
244 | }; | |
227 | typedef struct TMHeader_str TMHeader_t; |
|
245 | typedef struct TMHeader_str TMHeader_t; | |
228 |
|
246 | |||
229 | struct Packet_TM_LFR_TC_EXE_str |
|
247 | struct Packet_TM_LFR_TC_EXE_str | |
230 | { |
|
248 | { | |
231 |
|
|
249 | unsigned char targetLogicalAddress; | |
232 |
|
|
250 | unsigned char protocolIdentifier; | |
233 |
|
|
251 | unsigned char reserved; | |
234 |
|
|
252 | unsigned char userApplication; | |
235 |
|
|
253 | unsigned char packetID[2]; | |
236 |
|
|
254 | unsigned char packetSequenceControl[2]; | |
237 |
|
|
255 | unsigned char packetLength[2]; | |
238 | // DATA FIELD HEADER |
|
256 | // DATA FIELD HEADER | |
239 |
|
|
257 | unsigned char spare1_pusVersion_spare2; | |
240 |
|
|
258 | unsigned char serviceType; | |
241 |
|
|
259 | unsigned char serviceSubType; | |
242 |
|
|
260 | unsigned char destinationID; | |
243 |
|
|
261 | unsigned char time[6]; | |
244 |
|
|
262 | unsigned char data[LENGTH_TM_LFR_TC_EXE_MAX - 10 + 1]; | |
245 | }; |
|
263 | }; | |
246 | typedef struct Packet_TM_LFR_TC_EXE_str Packet_TM_LFR_TC_EXE_t; |
|
264 | typedef struct Packet_TM_LFR_TC_EXE_str Packet_TM_LFR_TC_EXE_t; | |
247 |
|
265 | |||
248 | struct Packet_TM_LFR_TC_EXE_SUCCESS_str |
|
266 | struct Packet_TM_LFR_TC_EXE_SUCCESS_str | |
249 | { |
|
267 | { | |
250 |
|
|
268 | unsigned char targetLogicalAddress; | |
251 |
|
|
269 | unsigned char protocolIdentifier; | |
252 |
|
|
270 | unsigned char reserved; | |
253 |
|
|
271 | unsigned char userApplication; | |
254 | // PACKET HEADER |
|
272 | // PACKET HEADER | |
255 |
|
|
273 | unsigned char packetID[2]; | |
256 |
|
|
274 | unsigned char packetSequenceControl[2]; | |
257 |
|
|
275 | unsigned char packetLength[2]; | |
258 | // DATA FIELD HEADER |
|
276 | // DATA FIELD HEADER | |
259 |
|
|
277 | unsigned char spare1_pusVersion_spare2; | |
260 |
|
|
278 | unsigned char serviceType; | |
261 |
|
|
279 | unsigned char serviceSubType; | |
262 |
|
|
280 | unsigned char destinationID; | |
263 |
|
|
281 | unsigned char time[6]; | |
264 | // |
|
282 | // | |
265 |
|
|
283 | unsigned char telecommand_pkt_id[2]; | |
266 |
|
|
284 | unsigned char pkt_seq_control[2]; | |
267 | }; |
|
285 | }; | |
268 | typedef struct Packet_TM_LFR_TC_EXE_SUCCESS_str Packet_TM_LFR_TC_EXE_SUCCESS_t; |
|
286 | typedef struct Packet_TM_LFR_TC_EXE_SUCCESS_str Packet_TM_LFR_TC_EXE_SUCCESS_t; | |
269 |
|
287 | |||
270 | struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str |
|
288 | struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str | |
271 | { |
|
289 | { | |
272 |
|
|
290 | unsigned char targetLogicalAddress; | |
273 |
|
|
291 | unsigned char protocolIdentifier; | |
274 |
|
|
292 | unsigned char reserved; | |
275 |
|
|
293 | unsigned char userApplication; | |
276 | // PACKET HEADER |
|
294 | // PACKET HEADER | |
277 |
|
|
295 | unsigned char packetID[2]; | |
278 |
|
|
296 | unsigned char packetSequenceControl[2]; | |
279 |
|
|
297 | unsigned char packetLength[2]; | |
280 | // DATA FIELD HEADER |
|
298 | // DATA FIELD HEADER | |
281 |
|
|
299 | unsigned char spare1_pusVersion_spare2; | |
282 |
|
|
300 | unsigned char serviceType; | |
283 |
|
|
301 | unsigned char serviceSubType; | |
284 |
|
|
302 | unsigned char destinationID; | |
285 |
|
|
303 | unsigned char time[6]; | |
286 | // |
|
304 | // | |
287 |
|
|
305 | unsigned char tc_failure_code[2]; | |
288 |
|
|
306 | unsigned char telecommand_pkt_id[2]; | |
289 |
|
|
307 | unsigned char pkt_seq_control[2]; | |
290 |
|
|
308 | unsigned char tc_service; | |
291 |
|
|
309 | unsigned char tc_subtype; | |
292 |
|
|
310 | unsigned char byte_position; | |
293 |
|
|
311 | unsigned char rcv_value; | |
294 | }; |
|
312 | }; | |
295 | typedef struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str Packet_TM_LFR_TC_EXE_INCONSISTENT_t; |
|
313 | typedef struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str Packet_TM_LFR_TC_EXE_INCONSISTENT_t; | |
296 |
|
314 | |||
297 | struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str |
|
315 | struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str | |
298 | { |
|
316 | { | |
299 |
|
|
317 | unsigned char targetLogicalAddress; | |
300 |
|
|
318 | unsigned char protocolIdentifier; | |
301 |
|
|
319 | unsigned char reserved; | |
302 |
|
|
320 | unsigned char userApplication; | |
303 | // PACKET HEADER |
|
321 | // PACKET HEADER | |
304 |
|
|
322 | unsigned char packetID[2]; | |
305 |
|
|
323 | unsigned char packetSequenceControl[2]; | |
306 |
|
|
324 | unsigned char packetLength[2]; | |
307 | // DATA FIELD HEADER |
|
325 | // DATA FIELD HEADER | |
308 |
|
|
326 | unsigned char spare1_pusVersion_spare2; | |
309 |
|
|
327 | unsigned char serviceType; | |
310 |
|
|
328 | unsigned char serviceSubType; | |
311 |
|
|
329 | unsigned char destinationID; | |
312 |
|
|
330 | unsigned char time[6]; | |
313 | // |
|
331 | // | |
314 |
|
|
332 | unsigned char tc_failure_code[2]; | |
315 |
|
|
333 | unsigned char telecommand_pkt_id[2]; | |
316 |
|
|
334 | unsigned char pkt_seq_control[2]; | |
317 |
|
|
335 | unsigned char tc_service; | |
318 |
|
|
336 | unsigned char tc_subtype; | |
319 |
|
|
337 | unsigned char lfr_status_word[2]; | |
320 | }; |
|
338 | }; | |
321 | typedef struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; |
|
339 | typedef struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; | |
322 |
|
340 | |||
323 | struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str |
|
341 | struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str | |
324 | { |
|
342 | { | |
325 |
|
|
343 | unsigned char targetLogicalAddress; | |
326 |
|
|
344 | unsigned char protocolIdentifier; | |
327 |
|
|
345 | unsigned char reserved; | |
328 |
|
|
346 | unsigned char userApplication; | |
329 | // PACKET HEADER |
|
347 | // PACKET HEADER | |
330 |
|
|
348 | unsigned char packetID[2]; | |
331 |
|
|
349 | unsigned char packetSequenceControl[2]; | |
332 |
|
|
350 | unsigned char packetLength[2]; | |
333 | // DATA FIELD HEADER |
|
351 | // DATA FIELD HEADER | |
334 |
|
|
352 | unsigned char spare1_pusVersion_spare2; | |
335 |
|
|
353 | unsigned char serviceType; | |
336 |
|
|
354 | unsigned char serviceSubType; | |
337 |
|
|
355 | unsigned char destinationID; | |
338 |
|
|
356 | unsigned char time[6]; | |
339 | // |
|
357 | // | |
340 |
|
|
358 | unsigned char tc_failure_code[2]; | |
341 |
|
|
359 | unsigned char telecommand_pkt_id[2]; | |
342 |
|
|
360 | unsigned char pkt_seq_control[2]; | |
343 |
|
|
361 | unsigned char tc_service; | |
344 |
|
|
362 | unsigned char tc_subtype; | |
345 | }; |
|
363 | }; | |
346 | typedef struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; |
|
364 | typedef struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; | |
347 |
|
365 | |||
348 | struct Packet_TM_LFR_TC_EXE_ERROR_str |
|
366 | struct Packet_TM_LFR_TC_EXE_ERROR_str | |
349 | { |
|
367 | { | |
350 |
|
|
368 | unsigned char targetLogicalAddress; | |
351 |
|
|
369 | unsigned char protocolIdentifier; | |
352 |
|
|
370 | unsigned char reserved; | |
353 |
|
|
371 | unsigned char userApplication; | |
354 | // PACKET HEADER |
|
372 | // PACKET HEADER | |
355 |
|
|
373 | unsigned char packetID[2]; | |
356 |
|
|
374 | unsigned char packetSequenceControl[2]; | |
357 |
|
|
375 | unsigned char packetLength[2]; | |
358 | // DATA FIELD HEADER |
|
376 | // DATA FIELD HEADER | |
359 |
|
|
377 | unsigned char spare1_pusVersion_spare2; | |
360 |
|
|
378 | unsigned char serviceType; | |
361 |
|
|
379 | unsigned char serviceSubType; | |
362 |
|
|
380 | unsigned char destinationID; | |
363 |
|
|
381 | unsigned char time[6]; | |
364 | // |
|
382 | // | |
365 |
|
|
383 | unsigned char tc_failure_code[2]; | |
366 |
|
|
384 | unsigned char telecommand_pkt_id[2]; | |
367 |
|
|
385 | unsigned char pkt_seq_control[2]; | |
368 |
|
|
386 | unsigned char tc_service; | |
369 |
|
|
387 | unsigned char tc_subtype; | |
370 | }; |
|
388 | }; | |
371 | typedef struct Packet_TM_LFR_TC_EXE_ERROR_str Packet_TM_LFR_TC_EXE_ERROR_t; |
|
389 | typedef struct Packet_TM_LFR_TC_EXE_ERROR_str Packet_TM_LFR_TC_EXE_ERROR_t; | |
372 |
|
390 | |||
373 | struct Packet_TM_LFR_TC_EXE_CORRUPTED_str |
|
391 | struct Packet_TM_LFR_TC_EXE_CORRUPTED_str | |
374 | { |
|
392 | { | |
375 |
|
|
393 | unsigned char targetLogicalAddress; | |
376 |
|
|
394 | unsigned char protocolIdentifier; | |
377 |
|
|
395 | unsigned char reserved; | |
378 |
|
|
396 | unsigned char userApplication; | |
379 | // PACKET HEADER |
|
397 | // PACKET HEADER | |
380 |
|
|
398 | unsigned char packetID[2]; | |
381 |
|
|
399 | unsigned char packetSequenceControl[2]; | |
382 |
|
|
400 | unsigned char packetLength[2]; | |
383 | // DATA FIELD HEADER |
|
401 | // DATA FIELD HEADER | |
384 |
|
|
402 | unsigned char spare1_pusVersion_spare2; | |
385 |
|
|
403 | unsigned char serviceType; | |
386 |
|
|
404 | unsigned char serviceSubType; | |
387 |
|
|
405 | unsigned char destinationID; | |
388 |
|
|
406 | unsigned char time[6]; | |
389 | // |
|
407 | // | |
390 |
|
|
408 | unsigned char tc_failure_code[2]; | |
391 |
|
|
409 | unsigned char telecommand_pkt_id[2]; | |
392 |
|
|
410 | unsigned char pkt_seq_control[2]; | |
393 |
|
|
411 | unsigned char tc_service; | |
394 |
|
|
412 | unsigned char tc_subtype; | |
395 |
|
|
413 | unsigned char pkt_len_rcv_value[2]; | |
396 |
|
|
414 | unsigned char pkt_datafieldsize_cnt[2]; | |
397 |
|
|
415 | unsigned char rcv_crc[2]; | |
398 |
|
|
416 | unsigned char computed_crc[2]; | |
399 | }; |
|
417 | }; | |
400 | typedef struct Packet_TM_LFR_TC_EXE_CORRUPTED_str Packet_TM_LFR_TC_EXE_CORRUPTED_t; |
|
418 | typedef struct Packet_TM_LFR_TC_EXE_CORRUPTED_str Packet_TM_LFR_TC_EXE_CORRUPTED_t; | |
401 |
|
419 | |||
402 | struct Header_TM_LFR_SCIENCE_SWF_str |
|
420 | struct Header_TM_LFR_SCIENCE_SWF_str | |
403 | { |
|
421 | { | |
404 |
|
|
422 | unsigned char targetLogicalAddress; | |
405 |
|
|
423 | unsigned char protocolIdentifier; | |
406 |
|
|
424 | unsigned char reserved; | |
407 |
|
|
425 | unsigned char userApplication; | |
408 |
|
|
426 | unsigned char packetID[2]; | |
409 |
|
|
427 | unsigned char packetSequenceControl[2]; | |
410 |
|
|
428 | unsigned char packetLength[2]; | |
411 | // DATA FIELD HEADER |
|
429 | // DATA FIELD HEADER | |
412 |
|
|
430 | unsigned char spare1_pusVersion_spare2; | |
413 |
|
|
431 | unsigned char serviceType; | |
414 |
|
|
432 | unsigned char serviceSubType; | |
415 |
|
|
433 | unsigned char destinationID; | |
416 |
|
|
434 | unsigned char time[6]; | |
417 | // AUXILIARY HEADER |
|
435 | // AUXILIARY HEADER | |
418 |
|
|
436 | unsigned char sid; | |
419 |
|
|
437 | unsigned char hkBIA; | |
420 |
|
|
438 | unsigned char pktCnt; | |
421 |
|
|
439 | unsigned char pktNr; | |
422 |
|
|
440 | unsigned char acquisitionTime[6]; | |
423 |
|
|
441 | unsigned char blkNr[2]; | |
424 | }; |
|
442 | }; | |
425 | typedef struct Header_TM_LFR_SCIENCE_SWF_str Header_TM_LFR_SCIENCE_SWF_t; |
|
443 | typedef struct Header_TM_LFR_SCIENCE_SWF_str Header_TM_LFR_SCIENCE_SWF_t; | |
426 |
|
444 | |||
427 | struct Header_TM_LFR_SCIENCE_CWF_str |
|
445 | struct Header_TM_LFR_SCIENCE_CWF_str | |
428 | { |
|
446 | { | |
429 |
|
|
447 | unsigned char targetLogicalAddress; | |
430 |
|
|
448 | unsigned char protocolIdentifier; | |
431 |
|
|
449 | unsigned char reserved; | |
432 |
|
|
450 | unsigned char userApplication; | |
433 |
|
|
451 | unsigned char packetID[2]; | |
434 |
|
|
452 | unsigned char packetSequenceControl[2]; | |
435 |
|
|
453 | unsigned char packetLength[2]; | |
436 | // DATA FIELD HEADER |
|
454 | // DATA FIELD HEADER | |
437 |
|
|
455 | unsigned char spare1_pusVersion_spare2; | |
438 |
|
|
456 | unsigned char serviceType; | |
439 |
|
|
457 | unsigned char serviceSubType; | |
440 |
|
|
458 | unsigned char destinationID; | |
441 |
|
|
459 | unsigned char time[6]; | |
442 | // AUXILIARY DATA HEADER |
|
460 | // AUXILIARY DATA HEADER | |
443 |
|
|
461 | unsigned char sid; | |
444 |
|
|
462 | unsigned char hkBIA; | |
445 |
|
|
463 | unsigned char acquisitionTime[6]; | |
446 |
|
|
464 | unsigned char blkNr[2]; | |
447 | }; |
|
465 | }; | |
448 | typedef struct Header_TM_LFR_SCIENCE_CWF_str Header_TM_LFR_SCIENCE_CWF_t; |
|
466 | typedef struct Header_TM_LFR_SCIENCE_CWF_str Header_TM_LFR_SCIENCE_CWF_t; | |
449 |
|
467 | |||
450 | struct Header_TM_LFR_SCIENCE_ASM_str |
|
468 | struct Header_TM_LFR_SCIENCE_ASM_str | |
451 | { |
|
469 | { | |
452 |
|
|
470 | unsigned char targetLogicalAddress; | |
453 |
|
|
471 | unsigned char protocolIdentifier; | |
454 |
|
|
472 | unsigned char reserved; | |
455 |
|
|
473 | unsigned char userApplication; | |
456 |
|
|
474 | unsigned char packetID[2]; | |
457 |
|
|
475 | unsigned char packetSequenceControl[2]; | |
458 |
|
|
476 | unsigned char packetLength[2]; | |
459 | // DATA FIELD HEADER |
|
477 | // DATA FIELD HEADER | |
460 |
|
|
478 | unsigned char spare1_pusVersion_spare2; | |
461 |
|
|
479 | unsigned char serviceType; | |
462 |
|
|
480 | unsigned char serviceSubType; | |
463 |
|
|
481 | unsigned char destinationID; | |
464 |
|
|
482 | unsigned char time[6]; | |
465 | // AUXILIARY HEADER |
|
483 | // AUXILIARY HEADER | |
466 |
|
|
484 | unsigned char sid; | |
467 |
|
|
485 | unsigned char biaStatusInfo; | |
468 |
|
|
486 | unsigned char cntASM; | |
469 |
|
|
487 | unsigned char nrASM; | |
470 |
|
|
488 | unsigned char acquisitionTime[6]; | |
471 |
|
|
489 | unsigned char blkNr[2]; | |
472 | }; |
|
490 | }; | |
473 | typedef struct Header_TM_LFR_SCIENCE_ASM_str Header_TM_LFR_SCIENCE_ASM_t; |
|
491 | typedef struct Header_TM_LFR_SCIENCE_ASM_str Header_TM_LFR_SCIENCE_ASM_t; | |
474 |
|
492 | |||
475 | struct ccsdsTelecommandPacket_str |
|
493 | struct ccsdsTelecommandPacket_str | |
476 | { |
|
494 | { | |
477 | //unsigned char targetLogicalAddress; // removed by the grspw module |
|
495 | //unsigned char targetLogicalAddress; // removed by the grspw module | |
478 |
|
|
496 | unsigned char protocolIdentifier; | |
479 |
|
|
497 | unsigned char reserved; | |
480 |
|
|
498 | unsigned char userApplication; | |
481 |
|
|
499 | unsigned char packetID[2]; | |
482 |
|
|
500 | unsigned char packetSequenceControl[2]; | |
483 |
|
|
501 | unsigned char packetLength[2]; | |
484 | // DATA FIELD HEADER |
|
502 | // DATA FIELD HEADER | |
485 |
|
|
503 | unsigned char headerFlag_pusVersion_Ack; | |
486 |
|
|
504 | unsigned char serviceType; | |
487 |
|
|
505 | unsigned char serviceSubType; | |
488 |
|
|
506 | unsigned char sourceID; | |
489 |
|
|
507 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; | |
490 | }; |
|
508 | }; | |
491 | typedef struct ccsdsTelecommandPacket_str ccsdsTelecommandPacket_t; |
|
509 | typedef struct ccsdsTelecommandPacket_str ccsdsTelecommandPacket_t; | |
492 |
|
510 | |||
493 | struct Packet_TM_LFR_HK_str |
|
511 | struct Packet_TM_LFR_HK_str | |
494 | { |
|
512 | { | |
495 |
|
|
513 | unsigned char targetLogicalAddress; | |
496 |
|
|
514 | unsigned char protocolIdentifier; | |
497 |
|
|
515 | unsigned char reserved; | |
498 |
|
|
516 | unsigned char userApplication; | |
499 |
|
|
517 | unsigned char packetID[2]; | |
500 |
|
|
518 | unsigned char packetSequenceControl[2]; | |
501 |
|
|
519 | unsigned char packetLength[2]; | |
502 |
|
|
520 | unsigned char spare1_pusVersion_spare2; | |
503 |
|
|
521 | unsigned char serviceType; | |
504 |
|
|
522 | unsigned char serviceSubType; | |
505 |
|
|
523 | unsigned char destinationID; | |
506 |
|
|
524 | unsigned char time[6]; | |
507 |
|
|
525 | unsigned char sid; | |
508 |
|
526 | |||
509 | //************** |
|
527 | //************** | |
510 | // HK PARAMETERS |
|
528 | // HK PARAMETERS | |
@@ -539,7 +557,7 struct Packet_TM_LFR_HK_str | |||||
539 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; |
|
557 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; | |
540 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; |
|
558 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; | |
541 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; |
|
559 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; | |
542 |
unsigned char hk_lfr_dpu_spw_last_tim |
|
560 | unsigned char hk_lfr_dpu_spw_last_time; | |
543 | // ahb error statistics |
|
561 | // ahb error statistics | |
544 | unsigned int hk_lfr_last_fail_addr; |
|
562 | unsigned int hk_lfr_last_fail_addr; | |
545 | // temperatures |
|
563 | // temperatures | |
@@ -594,48 +612,48 typedef struct Packet_TM_LFR_HK_str Pack | |||||
594 |
|
612 | |||
595 | struct Packet_TM_LFR_PARAMETER_DUMP_str |
|
613 | struct Packet_TM_LFR_PARAMETER_DUMP_str | |
596 | { |
|
614 | { | |
597 |
|
|
615 | unsigned char targetLogicalAddress; | |
598 |
|
|
616 | unsigned char protocolIdentifier; | |
599 |
|
|
617 | unsigned char reserved; | |
600 |
|
|
618 | unsigned char userApplication; | |
601 |
|
|
619 | unsigned char packetID[2]; | |
602 |
|
|
620 | unsigned char packetSequenceControl[2]; | |
603 |
|
|
621 | unsigned char packetLength[2]; | |
604 | // DATA FIELD HEADER |
|
622 | // DATA FIELD HEADER | |
605 |
|
|
623 | unsigned char spare1_pusVersion_spare2; | |
606 |
|
|
624 | unsigned char serviceType; | |
607 |
|
|
625 | unsigned char serviceSubType; | |
608 |
|
|
626 | unsigned char destinationID; | |
609 |
|
|
627 | unsigned char time[6]; | |
610 |
|
|
628 | unsigned char sid; | |
611 |
|
629 | |||
612 | //****************** |
|
630 | //****************** | |
613 | // COMMON PARAMETERS |
|
631 | // COMMON PARAMETERS | |
614 |
|
|
632 | unsigned char unused0; | |
615 |
|
|
633 | unsigned char bw_sp0_sp1_r0_r1; | |
616 |
|
634 | |||
617 | //****************** |
|
635 | //****************** | |
618 | // NORMAL PARAMETERS |
|
636 | // NORMAL PARAMETERS | |
619 |
|
|
637 | unsigned char sy_lfr_n_swf_l[2]; | |
620 |
|
|
638 | unsigned char sy_lfr_n_swf_p[2]; | |
621 |
|
|
639 | unsigned char sy_lfr_n_asm_p[2]; | |
622 |
|
|
640 | unsigned char sy_lfr_n_bp_p0; | |
623 |
|
|
641 | unsigned char sy_lfr_n_bp_p1; | |
624 |
|
642 | |||
625 | //***************** |
|
643 | //***************** | |
626 | // BURST PARAMETERS |
|
644 | // BURST PARAMETERS | |
627 |
|
|
645 | unsigned char sy_lfr_b_bp_p0; | |
628 |
|
|
646 | unsigned char sy_lfr_b_bp_p1; | |
629 |
|
647 | |||
630 | //**************** |
|
648 | //**************** | |
631 | // SBM1 PARAMETERS |
|
649 | // SBM1 PARAMETERS | |
632 |
|
|
650 | unsigned char sy_lfr_s1_bp_p0; | |
633 |
|
|
651 | unsigned char sy_lfr_s1_bp_p1; | |
634 |
|
652 | |||
635 | //**************** |
|
653 | //**************** | |
636 | // SBM2 PARAMETERS |
|
654 | // SBM2 PARAMETERS | |
637 |
|
|
655 | unsigned char sy_lfr_s2_bp_p0; | |
638 |
|
|
656 | unsigned char sy_lfr_s2_bp_p1; | |
639 | }; |
|
657 | }; | |
640 | typedef struct Packet_TM_LFR_PARAMETER_DUMP_str Packet_TM_LFR_PARAMETER_DUMP_t; |
|
658 | typedef struct Packet_TM_LFR_PARAMETER_DUMP_str Packet_TM_LFR_PARAMETER_DUMP_t; | |
641 |
|
659 |
@@ -24,16 +24,20 extern unsigned char lfrCurrentMode; | |||||
24 | // MODE PARAMETERS |
|
24 | // MODE PARAMETERS | |
25 | extern struct param_local_str param_local; |
|
25 | extern struct param_local_str param_local; | |
26 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
|
26 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | |
27 |
extern unsigned short sequenceCounters |
|
27 | extern unsigned short sequenceCounters_SCIENCE_NORMAL_BURST; | |
|
28 | extern unsigned short sequenceCounters_SCIENCE_SBM1_SBM2; | |||
|
29 | extern unsigned short sequenceCounters_TC_EXE[SEQ_CNT_NB_DEST_ID]; | |||
28 |
|
30 | |||
29 | // RTEMS TASKS |
|
31 | // RTEMS TASKS | |
30 | rtems_task Init( rtems_task_argument argument); |
|
32 | rtems_task Init( rtems_task_argument argument); | |
31 |
|
33 | |||
32 | // OTHER functions |
|
34 | // OTHER functions | |
33 | void create_names( void ); |
|
35 | void create_names( void ); | |
34 | rtems_status_code create_message_queues( void ); |
|
|||
35 | int create_all_tasks( void ); |
|
36 | int create_all_tasks( void ); | |
36 | int start_all_tasks( void ); |
|
37 | int start_all_tasks( void ); | |
|
38 | // | |||
|
39 | rtems_status_code create_message_queues( void ); | |||
|
40 | // | |||
37 | int start_recv_send_tasks( void ); |
|
41 | int start_recv_send_tasks( void ); | |
38 | // |
|
42 | // | |
39 | void init_local_mode_parameters( void ); |
|
43 | void init_local_mode_parameters( void ); |
@@ -32,4 +32,6 rtems_task dumb_task( rtems_task_argumen | |||||
32 |
|
32 | |||
33 | void init_housekeeping_parameters( void ); |
|
33 | void init_housekeeping_parameters( void ); | |
34 |
|
34 | |||
|
35 | void increment_seq_counter( unsigned char *packet_sequence_control); | |||
|
36 | ||||
35 | #endif // FSW_MISC_H_INCLUDED |
|
37 | #endif // FSW_MISC_H_INCLUDED |
@@ -148,6 +148,8 | |||||
148 | #define TASK_PRIORITY_STAT 200 |
|
148 | #define TASK_PRIORITY_STAT 200 | |
149 | #define TASK_PRIORITY_DUMB 200 |
|
149 | #define TASK_PRIORITY_DUMB 200 | |
150 |
|
150 | |||
|
151 | #define SEMQ_PRIORITY_CEILING 30 | |||
|
152 | ||||
151 | #define ACTION_MSG_QUEUE_COUNT 10 |
|
153 | #define ACTION_MSG_QUEUE_COUNT 10 | |
152 | #define ACTION_MSG_PKTS_COUNT 50 |
|
154 | #define ACTION_MSG_PKTS_COUNT 50 | |
153 | #define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES) |
|
155 | #define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES) | |
@@ -198,32 +200,6 | |||||
198 | #define NB_BYTES_CWF3_LIGHT_BLK 6 |
|
200 | #define NB_BYTES_CWF3_LIGHT_BLK 6 | |
199 | #define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8 |
|
201 | #define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8 | |
200 |
|
202 | |||
201 | //****************** |
|
|||
202 | // SEQUENCE COUNTERS |
|
|||
203 | #define SEQ_CNT_NB_PID 2 |
|
|||
204 | #define SEQ_CNT_NB_CAT 4 |
|
|||
205 | #define SEQ_CNT_NB_DEST_ID 11 |
|
|||
206 | // pid |
|
|||
207 | #define SEQ_CNT_PID_76 0 |
|
|||
208 | #define SEQ_CNT_PID_79 1 |
|
|||
209 | //cat |
|
|||
210 | #define SEQ_CNT_CAT_1 0 |
|
|||
211 | #define SEQ_CNT_CAT_4 1 |
|
|||
212 | #define SEQ_CNT_CAT_9 2 |
|
|||
213 | #define SEQ_CNT_CAT_12 3 |
|
|||
214 | // destination id |
|
|||
215 | #define SEQ_CNT_DST_ID_GROUND 0 |
|
|||
216 | #define SEQ_CNT_DST_ID_MISSION_TIMELINE 1 |
|
|||
217 | #define SEQ_CNT_DST_ID_TC_SEQUENCES 2 |
|
|||
218 | #define SEQ_CNT_DST_ID_RECOVERY_ACTION_CMD 3 |
|
|||
219 | #define SEQ_CNT_DST_ID_BACKUP_MISSION_TIMELINE 4 |
|
|||
220 | #define SEQ_CNT_DST_ID_DIRECT_CMD 5 |
|
|||
221 | #define SEQ_CNT_DST_ID_SPARE_GRD_SRC1 6 |
|
|||
222 | #define SEQ_CNT_DST_ID_SPARE_GRD_SRC2 7 |
|
|||
223 | #define SEQ_CNT_DST_ID_OBCP 8 |
|
|||
224 | #define SEQ_CNT_DST_ID_SYSTEM_CONTROL 9 |
|
|||
225 | #define SEQ_CNT_DST_ID_AOCS 10 |
|
|||
226 |
|
||||
227 | struct param_local_str{ |
|
203 | struct param_local_str{ | |
228 | unsigned int local_sbm1_nb_cwf_sent; |
|
204 | unsigned int local_sbm1_nb_cwf_sent; | |
229 | unsigned int local_sbm1_nb_cwf_max; |
|
205 | unsigned int local_sbm1_nb_cwf_max; |
@@ -6,8 +6,10 | |||||
6 | #include <math.h> |
|
6 | #include <math.h> | |
7 | #include <stdlib.h> // abs() is in the stdlib |
|
7 | #include <stdlib.h> // abs() is in the stdlib | |
8 | #include <stdio.h> // printf() |
|
8 | #include <stdio.h> // printf() | |
|
9 | #include <math.h> | |||
9 |
|
10 | |||
10 | #include "fsw_params.h" |
|
11 | #include "fsw_params.h" | |
|
12 | #include "fsw_spacewire.h" | |||
11 |
|
13 | |||
12 |
|
14 | |||
13 | extern volatile int spec_mat_f0_0[ ]; |
|
15 | extern volatile int spec_mat_f0_0[ ]; |
@@ -7,6 +7,7 | |||||
7 | #include "fsw_params.h" |
|
7 | #include "fsw_params.h" | |
8 | #include "wf_handler.h" |
|
8 | #include "wf_handler.h" | |
9 | #include "tm_lfr_tc_exe.h" |
|
9 | #include "tm_lfr_tc_exe.h" | |
|
10 | #include "fsw_misc.h" | |||
10 |
|
11 | |||
11 | extern int fdSPW; |
|
12 | extern int fdSPW; | |
12 | extern unsigned char lfrCurrentMode; |
|
13 | extern unsigned char lfrCurrentMode; |
@@ -5,9 +5,11 | |||||
5 | #include <stdio.h> |
|
5 | #include <stdio.h> | |
6 |
|
6 | |||
7 | #include "fsw_params.h" |
|
7 | #include "fsw_params.h" | |
|
8 | #include "fsw_spacewire.h" | |||
8 |
|
9 | |||
9 | extern time_management_regs_t *time_management_regs; |
|
10 | extern time_management_regs_t *time_management_regs; | |
10 | extern Packet_TM_LFR_HK_t housekeeping_packet; |
|
11 | extern Packet_TM_LFR_HK_t housekeeping_packet; | |
|
12 | extern unsigned short sequenceCounters_TC_EXE[]; | |||
11 |
|
13 | |||
12 | int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
14 | int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
13 | int send_tm_lfr_tc_exe_inconsistent(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
15 | int send_tm_lfr_tc_exe_inconsistent(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, | |
@@ -18,6 +20,8 int send_tm_lfr_tc_exe_error(ccsdsTeleco | |||||
18 | int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
20 | int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, | |
19 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV); |
|
21 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV); | |
20 |
|
22 | |||
|
23 | void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id ); | |||
|
24 | ||||
21 | #endif // TM_LFR_TC_EXE_H_INCLUDED |
|
25 | #endif // TM_LFR_TC_EXE_H_INCLUDED | |
22 |
|
26 | |||
23 |
|
27 |
@@ -7,6 +7,8 | |||||
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" | |||
|
11 | #include "fsw_misc.h" | |||
10 |
|
12 | |||
11 | #define pi 3.1415 |
|
13 | #define pi 3.1415 | |
12 |
|
14 | |||
@@ -31,6 +33,9 extern Packet_TM_LFR_HK_t housekeeping_p | |||||
31 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
|
33 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | |
32 | extern struct param_local_str param_local; |
|
34 | extern struct param_local_str param_local; | |
33 |
|
35 | |||
|
36 | extern unsigned short sequenceCounters_SCIENCE_NORMAL_BURST; | |||
|
37 | extern unsigned short sequenceCounters_SCIENCE_SBM1_SBM2; | |||
|
38 | ||||
34 | extern rtems_name misc_name[5]; |
|
39 | extern rtems_name misc_name[5]; | |
35 | extern rtems_name Task_name[20]; /* array of task ids */ |
|
40 | extern rtems_name Task_name[20]; /* array of task ids */ | |
36 | extern rtems_id Task_id[20]; /* array of task ids */ |
|
41 | extern rtems_id Task_id[20]; /* array of task ids */ | |
@@ -78,4 +83,6 void set_local_nb_interrupt_f0_MAX(); | |||||
78 | void reset_local_sbm1_nb_cwf_sent(); |
|
83 | void reset_local_sbm1_nb_cwf_sent(); | |
79 | void reset_local_sbm2_nb_cwf_sent(); |
|
84 | void reset_local_sbm2_nb_cwf_sent(); | |
80 |
|
85 | |||
|
86 | void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid ); | |||
|
87 | ||||
81 | #endif // WF_HANDLER_H_INCLUDED |
|
88 | #endif // WF_HANDLER_H_INCLUDED |
@@ -83,7 +83,9 struct param_local_str param_local; | |||||
83 | // HK PACKETS |
|
83 | // HK PACKETS | |
84 | Packet_TM_LFR_HK_t housekeeping_packet; |
|
84 | Packet_TM_LFR_HK_t housekeeping_packet; | |
85 | // sequence counters are incremented by APID (PID + CAT) and destination ID |
|
85 | // sequence counters are incremented by APID (PID + CAT) and destination ID | |
86 | unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID]; |
|
86 | unsigned short sequenceCounters_SCIENCE_NORMAL_BURST; | |
|
87 | unsigned short sequenceCounters_SCIENCE_SBM1_SBM2; | |||
|
88 | unsigned short sequenceCounters_TC_EXE[SEQ_CNT_NB_DEST_ID]; | |||
87 | spw_stats spacewire_stats; |
|
89 | spw_stats spacewire_stats; | |
88 | spw_stats spacewire_stats_backup; |
|
90 | spw_stats spacewire_stats_backup; | |
89 |
|
91 |
@@ -197,8 +197,6 void init_local_mode_parameters( void ) | |||||
197 | */ |
|
197 | */ | |
198 |
|
198 | |||
199 | unsigned int i; |
|
199 | unsigned int i; | |
200 | unsigned int j; |
|
|||
201 | unsigned int k; |
|
|||
202 |
|
200 | |||
203 | // LOCAL PARAMETERS |
|
201 | // LOCAL PARAMETERS | |
204 | set_local_sbm1_nb_cwf_max(); |
|
202 | set_local_sbm1_nb_cwf_max(); | |
@@ -213,16 +211,13 void init_local_mode_parameters( void ) | |||||
213 | reset_local_sbm2_nb_cwf_sent(); |
|
211 | reset_local_sbm2_nb_cwf_sent(); | |
214 |
|
212 | |||
215 | // init sequence counters |
|
213 | // init sequence counters | |
216 | for (i = 0; i<SEQ_CNT_NB_PID; i++) |
|
214 | ||
|
215 | for(i = 0; i<SEQ_CNT_NB_DEST_ID; i++) | |||
217 | { |
|
216 | { | |
218 | for(j = 0; j<SEQ_CNT_NB_CAT; j++) |
|
217 | sequenceCounters_TC_EXE[i] = 0x00; | |
219 | { |
|
|||
220 | for(k = 0; k<SEQ_CNT_NB_DEST_ID; k++) |
|
|||
221 | { |
|
|||
222 | sequenceCounters[i][j][k] = 0x00; |
|
|||
223 | } |
|
|||
224 | } |
|
|||
225 | } |
|
218 | } | |
|
219 | sequenceCounters_SCIENCE_NORMAL_BURST = 0x00; | |||
|
220 | sequenceCounters_SCIENCE_SBM1_SBM2 = 0x00; | |||
226 | } |
|
221 | } | |
227 |
|
222 | |||
228 | void create_names( void ) // create all names for tasks and queues |
|
223 | void create_names( void ) // create all names for tasks and queues | |
@@ -352,7 +347,7 int create_all_tasks( void ) // create a | |||||
352 | { |
|
347 | { | |
353 | status = rtems_task_create( |
|
348 | status = rtems_task_create( | |
354 | Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE, |
|
349 | Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE, | |
355 | RTEMS_DEFAULT_MODES, |
|
350 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
356 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS] |
|
351 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS] | |
357 | ); |
|
352 | ); | |
358 | } |
|
353 | } | |
@@ -589,4 +584,3 rtems_status_code create_message_queues( | |||||
589 |
|
584 | |||
590 | return ret; |
|
585 | return ret; | |
591 | } |
|
586 | } | |
592 |
|