##// END OF EJS Templates
Updates for the compliance with the ICD 3.7....
paul -
r13:d700fe1774be default
parent child
Show More
@@ -20,16 +20,10
20 20 // PACKET ID
21 21 #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1
22 22 #define APID_TM_HK 0x0cc4 // PID 76 CAT 4
23 #define APID_TM_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9
24 23 #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12
25 24 #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
26 #define TM_PACKET_PID_DEFAULT 76
27 #define TM_PACKET_PID_BURST_SBM1_SBM2 79
28 #define TM_PACKET_CAT_TC_EXE 1
29 #define TM_PACKET_CAT_HK 4
30 #define TM_PACKET_CAT_PARAMETER_DUMP 9
31 #define TM_PACKET_CAT_SCIENCE 12
32 #define TC_PACKET_CAT 12
25 #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6
26 #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6
33 27
34 28 // PACKET SEQUENCE CONTROL
35 29 #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000]
@@ -51,7 +45,9
51 45 #define TM_DESTINATION_ID_SYSTEM_CONTROL 14
52 46 #define TM_DESTINATION_ID_AOCS 11
53 47
54
48 //*********************************************************
49 //*** /!\ change CCSDS_DESTINATION_ID before flight /!\ ***
50 //*********************************************************
55 51 #ifdef LPP_DPU_DESTID
56 52 #define CCSDS_DESTINATION_ID 32
57 53 #else
@@ -81,6 +77,9
81 77 #define TC_SUBTYPE_UPDT_INFO 51
82 78 #define TC_SUBTYPE_EN_CAL 61
83 79 #define TC_SUBTYPE_DIS_CAL 63
80 #define TC_SUBTYPE_LOAD_K 93
81 #define TC_SUBTYPE_DUMP_K 95
82 #define TC_SUBTYPE_LOAD_FBINS 91
84 83 #define TC_SUBTYPE_UPDT_TIME 129
85 84
86 85 // TC LEN
@@ -95,21 +94,26
95 94 #define TC_LEN_UPDT_INFO 46
96 95 #define TC_LEN_EN_CAL 12
97 96 #define TC_LEN_DIS_CAL 12
97 #define TC_LEN_LOAD_K 142
98 #define TC_LEN_DUMP_K 12
99 #define TC_LEN_LOAD_FBINS 60
98 100 #define TC_LEN_UPDT_TIME 18
99 101
100 102 // TM TYPES
101 103 #define TM_TYPE_TC_EXE 1
102 104 #define TM_TYPE_HK 3
103 #define TM_TYPE_PARAMETER_DUMP 3
104 105 #define TM_TYPE_LFR_SCIENCE 21
106 #define TM_TYPE_PARAMETER_DUMP 181
107 #define TM_TYPE_KCOEFFICIENTD_DUMP 181
105 108
106 109 // TM SUBTYPES
107 110 #define TM_SUBTYPE_EXE_OK 7
108 111 #define TM_SUBTYPE_EXE_NOK 8
109 112 #define TM_SUBTYPE_HK 25
110 #define TM_SUBTYPE_PARAMETER_DUMP 25
111 #define TM_SUBTYPE_SCIENCE 3
112 #define TM_SUBTYPE_LFR_SCIENCE 3
113 #define TM_SUBTYPE_LFR_SCIENCE_3 3 // TM packets with fixed size
114 #define TM_SUBTYPE_LFR_SCIENCE_6 6 // TM packets with variable size
115 #define TM_SUBTYPE_PARAMETER_DUMP 32
116 #define TM_SUBTYPE_K_DUMP 96
113 117
114 118 // FAILURE CODES
115 119 #define ILLEGAL_APID 0
@@ -160,7 +164,6 enum apid_destid{
160 164
161 165 // TM SID
162 166 #define SID_HK 1
163 #define SID_PARAMETER_DUMP 10
164 167
165 168 #define SID_NORM_SWF_F0 3
166 169 #define SID_NORM_SWF_F1 4
@@ -190,9 +193,8 enum apid_destid{
190 193 #define SID_SBM2_BP2_F1 33
191 194 #define SID_NORM_CWF_LONG_F3 34
192 195
193 // LENGTH (BYTES)
194 #define LENGTH_TM_LFR_TC_EXE_MAX 32
195 #define LENGTH_TM_LFR_HK 126
196 #define SID_PARAMETER_DUMP 10
197 #define SID_K_DUMP 11
196 198
197 199 // HEADER_LENGTH
198 200 #define TM_HEADER_LEN 16
@@ -204,38 +206,37 enum apid_destid{
204 206 #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET)
205 207 #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET)
206 208 #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET)
207 #define PACKET_LENGTH_HK (124 - CCSDS_TC_TM_PACKET_OFFSET)
208 #define PACKET_LENGTH_PARAMETER_DUMP (36 - CCSDS_TC_TM_PACKET_OFFSET)
209 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0 (2228 - CCSDS_TC_TM_PACKET_OFFSET) // 44 * 25 * 2 + 28
210 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1 (2628 - CCSDS_TC_TM_PACKET_OFFSET) // 52 * 25 * 2 + 28
211 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F2 (2428 - CCSDS_TC_TM_PACKET_OFFSET) // 48 * 25 * 2 + 28
212 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (126 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 9 + 27 (1 spare bit in the header)
213 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (356 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 26
214 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (144 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 9 + 27 (1 spare bit in the header)
215 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (416 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 26
216 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (134 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 9 + 26
217 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (386 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 26
218 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (224 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 9 + 26
219 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (686 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 26
220 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (260 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 9 + 26
221 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (806 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 26
209 #define PACKET_LENGTH_HK (136 - CCSDS_TC_TM_PACKET_OFFSET)
210 #define PACKET_LENGTH_PARAMETER_DUMP (84 - CCSDS_TC_TM_PACKET_OFFSET)
211 #define PACKET_LENGTH_K_DUMP (3920 - CCSDS_TC_TM_PACKET_OFFSET)
212 // SCIENCE ASM
213 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0 (3230 - CCSDS_TC_TM_PACKET_OFFSET) // 32 * 25 * 4 + 30 => 88 bins (32 + 32 + 24 ), 3 packets
214 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1 (3630 - CCSDS_TC_TM_PACKET_OFFSET) // 52 * 25 * 2 + 30 => 104 bins (36 + 36 + 32 ), 3 packets
215 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F2 (3230 - CCSDS_TC_TM_PACKET_OFFSET) // 32 * 25 * 4 + 30 => 96 bins (32 + 32 + 32 ), 3 packets
216 // SCIENCE NORM
217 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (150 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 11 + 29 (1 spare byte in the header)
218 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (172 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 11 + 29 (1 spare byte in the header)
219 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (160 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 11 + 28
220 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (358 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 28
221 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (418 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 28
222 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (388 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 28
223 // SCIENCE SBM
224 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (270 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 11 + 28
225 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (688 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 28
226 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (314 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 11 + 28
227 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (808 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 28
222 228
223 229 #define PACKET_LENGTH_DELTA 11 // 7 + 4
224 230
225 231 #define SPARE1_PUSVERSION_SPARE2 0x10
226 232
227 // R1
228 #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1
229 #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1
230 #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1
231 #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1
232 #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1
233 #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1
234 // R2
235 #define TM_LEN_SCI_SWF_304 3669 // 304 * 12 + 10 + 12 - 1
236 #define TM_LEN_SCI_SWF_224 2709 // 224 * 12 + 10 + 12 - 1
237 #define TM_LEN_SCI_CWF_336 4051 // 336 * 12 + 10 + 10 - 1
238 #define TM_LEN_SCI_CWF_672 4051 // 672 * 6 + 10 + 10 - 1
233 // R3
234 // one snapshot = 2048 samples = 6 packets * 304 + 224
235 #define TM_LEN_SCI_SWF_304 (3678 - CCSDS_TC_TM_PACKET_OFFSET) // 304 * 12 + 30
236 #define TM_LEN_SCI_SWF_224 (2718 - CCSDS_TC_TM_PACKET_OFFSET) // 224 * 12 + 30
237 // one continuous buffer = 2688 samples = 8 packets * 336
238 #define TM_LEN_SCI_CWF_336 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 336 * 12 + 28
239 #define TM_LEN_SCI_CWF_672 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 672 * 6 + 28
239 240 //
240 241 #define DEFAULT_PKTCNT 0x07
241 242 #define BLK_NR_304 0x0130
@@ -411,6 +412,8 typedef struct {
411 412 // AUXILIARY HEADER
412 413 unsigned char sid;
413 414 unsigned char hkBIA;
415 unsigned char sy_lfr_common_parameters_spare;
416 unsigned char sy_lfr_common_parameters;
414 417 unsigned char pktCnt;
415 418 unsigned char pktNr;
416 419 unsigned char acquisitionTime[6];
@@ -434,6 +437,8 typedef struct {
434 437 // AUXILIARY DATA HEADER
435 438 unsigned char sid;
436 439 unsigned char hkBIA;
440 unsigned char sy_lfr_common_parameters_spare;
441 unsigned char sy_lfr_common_parameters;
437 442 unsigned char acquisitionTime[6];
438 443 unsigned char blkNr[2];
439 444 } Header_TM_LFR_SCIENCE_CWF_t;
@@ -455,6 +460,8 typedef struct {
455 460 // AUXILIARY HEADER
456 461 unsigned char sid;
457 462 unsigned char biaStatusInfo;
463 unsigned char sy_lfr_common_parameters_spare;
464 unsigned char sy_lfr_common_parameters;
458 465 unsigned char pa_lfr_pkt_cnt_asm;
459 466 unsigned char pa_lfr_pkt_nr_asm;
460 467 unsigned char acquisitionTime[6];
@@ -478,6 +485,8 typedef struct {
478 485 // AUXILIARY HEADER
479 486 unsigned char sid;
480 487 unsigned char biaStatusInfo;
488 unsigned char sy_lfr_common_parameters_spare;
489 unsigned char sy_lfr_common_parameters;
481 490 unsigned char acquisitionTime[6];
482 491 unsigned char source_data_spare;
483 492 unsigned char pa_lfr_bp_blk_nr[2];
@@ -500,6 +509,8 typedef struct {
500 509 // AUXILIARY HEADER
501 510 unsigned char sid;
502 511 unsigned char biaStatusInfo;
512 unsigned char sy_lfr_common_parameters_spare;
513 unsigned char sy_lfr_common_parameters;
503 514 unsigned char acquisitionTime[6];
504 515 unsigned char pa_lfr_bp_blk_nr[2];
505 516 } Header_TM_LFR_SCIENCE_BP_t;
@@ -544,6 +555,16 typedef struct {
544 555 unsigned char hk_lfr_cpu_load;
545 556 unsigned char hk_lfr_cpu_load_max;
546 557 unsigned char hk_lfr_cpu_load_aver;
558 unsigned char hk_lfr_q_sd_fifo_size_max;
559 unsigned char hk_lfr_q_sd_fifo_size;
560 unsigned char hk_lfr_q_rv_fifo_size_max;
561 unsigned char hk_lfr_q_rv_fifo_size;
562 unsigned char hk_lfr_q_p0_fifo_size_max;
563 unsigned char hk_lfr_q_p0_fifo_size;
564 unsigned char hk_lfr_q_p1_fifo_size_max;
565 unsigned char hk_lfr_q_p1_fifo_size;
566 unsigned char hk_lfr_q_p2_fifo_size_max;
567 unsigned char hk_lfr_q_p2_fifo_size;
547 568 // tc statistics
548 569 unsigned char hk_lfr_update_info_tc_cnt[2];
549 570 unsigned char hk_lfr_update_time_tc_cnt[2];
@@ -584,6 +605,9 typedef struct {
584 605 unsigned char hk_lfr_sc_v_f3[2];
585 606 unsigned char hk_lfr_sc_e1_f3[2];
586 607 unsigned char hk_lfr_sc_e2_f3[2];
608 // lfr common parameters
609 unsigned char sy_lfr_common_parameters_spare;
610 unsigned char sy_lfr_common_parameters;
587 611 // error counters
588 612 unsigned char hk_lfr_dpu_spw_parity;
589 613 unsigned char hk_lfr_dpu_spw_disconnect;
@@ -633,7 +657,7 typedef struct {
633 657 //******************
634 658 // COMMON PARAMETERS
635 659 unsigned char unused0;
636 unsigned char bw_sp0_sp1_r0_r1;
660 unsigned char sy_lfr_common_parameters;
637 661
638 662 //******************
639 663 // NORMAL PARAMETERS
@@ -660,6 +684,22 typedef struct {
660 684 unsigned char sy_lfr_s2_bp_p0;
661 685 unsigned char sy_lfr_s2_bp_p1;
662 686
687 // mask F0
688 unsigned int sy_lfr_fbins_f0_word1;
689 unsigned int sy_lfr_fbins_f0_word2;
690 unsigned int sy_lfr_fbins_f0_word3;
691 unsigned int sy_lfr_fbins_f0_word4;
692 // mask F1
693 unsigned int sy_lfr_fbins_f1_word1;
694 unsigned int sy_lfr_fbins_f1_word2;
695 unsigned int sy_lfr_fbins_f1_word3;
696 unsigned int sy_lfr_fbins_f1_word4;
697 // mask F2
698 unsigned int sy_lfr_fbins_f2_word1;
699 unsigned int sy_lfr_fbins_f2_word2;
700 unsigned int sy_lfr_fbins_f2_word3;
701 unsigned int sy_lfr_fbins_f2_word4;
702
663 703 // SPARE
664 704 unsigned char source_data_spare;
665 705 } Packet_TM_LFR_PARAMETER_DUMP_t;
General Comments 0
You need to be logged in to leave comments. Login now