@@ -1,808 +1,807 | |||||
1 | #ifndef CCSDS_TYPES_H_INCLUDED |
|
1 | #ifndef CCSDS_TYPES_H_INCLUDED | |
2 | #define CCSDS_TYPES_H_INCLUDED |
|
2 | #define CCSDS_TYPES_H_INCLUDED | |
3 |
|
3 | |||
4 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 |
|
4 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 | |
5 | #define CCSDS_TC_TM_PACKET_OFFSET 7 |
|
5 | #define CCSDS_TC_TM_PACKET_OFFSET 7 | |
6 | #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4 |
|
6 | #define CCSDS_TELEMETRY_HEADER_LENGTH (16+4) | |
7 | #define CCSDS_TM_PKT_MAX_SIZE 4412 |
|
7 | #define CCSDS_TM_PKT_MAX_SIZE 4412 | |
8 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 |
|
8 | #define CCSDS_TELECOMMAND_HEADER_LENGTH (10+4) | |
9 | //#define CCSDS_TC_PKT_MAX_SIZE 256 |
|
9 | #define CCSDS_TC_PKT_MAX_SIZE (228+3) // => 3 is for Prot ID, Reserved and User App bytes | |
10 | #define CCSDS_TC_PKT_MAX_SIZE 2048 |
|
|||
11 | #define CCSDS_TC_PKT_MIN_SIZE 16 |
|
10 | #define CCSDS_TC_PKT_MIN_SIZE 16 | |
12 | #define CCSDS_PROCESS_ID 76 |
|
11 | #define CCSDS_PROCESS_ID 76 | |
13 | #define CCSDS_PACKET_CATEGORY 12 |
|
12 | #define CCSDS_PACKET_CATEGORY 12 | |
14 | #define CCSDS_NODE_ADDRESS 0xfe |
|
13 | #define CCSDS_NODE_ADDRESS 0xfe | |
15 | #define CCSDS_USER_APP 0x00 |
|
14 | #define CCSDS_USER_APP 0x00 | |
16 |
|
15 | |||
17 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 |
|
16 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 | |
18 | #define DEFAULT_RESERVED 0x00 |
|
17 | #define DEFAULT_RESERVED 0x00 | |
19 | #define DEFAULT_HKBIA 0x1e // 0001 1110 |
|
18 | #define DEFAULT_HKBIA 0x1e // 0001 1110 | |
20 |
|
19 | |||
21 | // PACKET ID |
|
20 | // PACKET ID | |
22 | #define TM_PACKET_PID_DEFAULT 76 |
|
21 | #define TM_PACKET_PID_DEFAULT 76 | |
23 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 |
|
22 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 | |
24 | #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1 |
|
23 | #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1 | |
25 | #define APID_TM_HK 0x0cc4 // PID 76 CAT 4 |
|
24 | #define APID_TM_HK 0x0cc4 // PID 76 CAT 4 | |
26 | #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 |
|
25 | #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 | |
27 | #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 |
|
26 | #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 | |
28 | #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6 |
|
27 | #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6 | |
29 | #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6 |
|
28 | #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6 | |
30 | // PACKET CAT |
|
29 | // PACKET CAT | |
31 | #define TM_PACKET_CAT_TC_EXE 1 |
|
30 | #define TM_PACKET_CAT_TC_EXE 1 | |
32 | #define TM_PACKET_CAT_HK 4 |
|
31 | #define TM_PACKET_CAT_HK 4 | |
33 | #define TM_PACKET_CAT_SCIENCE 12 |
|
32 | #define TM_PACKET_CAT_SCIENCE 12 | |
34 | #define TM_PACKET_CAT_DUMP 6 |
|
33 | #define TM_PACKET_CAT_DUMP 6 | |
35 |
|
34 | |||
36 | // PACKET SEQUENCE CONTROL |
|
35 | // PACKET SEQUENCE CONTROL | |
37 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] |
|
36 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] | |
38 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] |
|
37 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] | |
39 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] |
|
38 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] | |
40 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] |
|
39 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] | |
41 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] |
|
40 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] | |
42 |
|
41 | |||
43 | // DESTINATION ID |
|
42 | // DESTINATION ID | |
44 | #define TM_DESTINATION_ID_GROUND 0 |
|
43 | #define TM_DESTINATION_ID_GROUND 0 | |
45 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 |
|
44 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 | |
46 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 |
|
45 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 | |
47 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 |
|
46 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 | |
48 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 |
|
47 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 | |
49 | #define TM_DESTINATION_ID_DIRECT_CMD 120 |
|
48 | #define TM_DESTINATION_ID_DIRECT_CMD 120 | |
50 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 |
|
49 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 | |
51 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 |
|
50 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 | |
52 | #define TM_DESTINATION_ID_OBCP 15 |
|
51 | #define TM_DESTINATION_ID_OBCP 15 | |
53 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 |
|
52 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 | |
54 | #define TM_DESTINATION_ID_AOCS 11 |
|
53 | #define TM_DESTINATION_ID_AOCS 11 | |
55 |
|
54 | |||
56 | //********************************************************* |
|
55 | //********************************************************* | |
57 | //*** /!\ change CCSDS_DESTINATION_ID before flight /!\ *** |
|
56 | //*** /!\ change CCSDS_DESTINATION_ID before flight /!\ *** | |
58 | //********************************************************* |
|
57 | //********************************************************* | |
59 | #ifdef LPP_DPU_DESTID |
|
58 | #ifdef LPP_DPU_DESTID | |
60 | #define CCSDS_DESTINATION_ID 32 |
|
59 | #define CCSDS_DESTINATION_ID 32 | |
61 | #else |
|
60 | #else | |
62 | #define CCSDS_DESTINATION_ID 0x01 |
|
61 | #define CCSDS_DESTINATION_ID 0x01 | |
63 | #endif |
|
62 | #endif | |
64 | #define CCSDS_PROTOCOLE_ID 0x02 |
|
63 | #define CCSDS_PROTOCOLE_ID 0x02 | |
65 | #define CCSDS_RESERVED 0x00 |
|
64 | #define CCSDS_RESERVED 0x00 | |
66 | #define CCSDS_USER_APP 0x00 |
|
65 | #define CCSDS_USER_APP 0x00 | |
67 |
|
66 | |||
68 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 |
|
67 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 | |
69 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 |
|
68 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 | |
70 | #define SIZE_HK_PARAMETERS 112 |
|
69 | #define SIZE_HK_PARAMETERS 112 | |
71 |
|
70 | |||
72 | // TC TYPES |
|
71 | // TC TYPES | |
73 | #define TC_TYPE_GEN 181 |
|
72 | #define TC_TYPE_GEN 181 | |
74 | #define TC_TYPE_TIME 9 |
|
73 | #define TC_TYPE_TIME 9 | |
75 |
|
74 | |||
76 | // TC SUBTYPES |
|
75 | // TC SUBTYPES | |
77 | #define TC_SUBTYPE_RESET 1 |
|
76 | #define TC_SUBTYPE_RESET 1 | |
78 | #define TC_SUBTYPE_LOAD_COMM 11 |
|
77 | #define TC_SUBTYPE_LOAD_COMM 11 | |
79 | #define TC_SUBTYPE_LOAD_NORM 13 |
|
78 | #define TC_SUBTYPE_LOAD_NORM 13 | |
80 | #define TC_SUBTYPE_LOAD_BURST 19 |
|
79 | #define TC_SUBTYPE_LOAD_BURST 19 | |
81 | #define TC_SUBTYPE_LOAD_SBM1 25 |
|
80 | #define TC_SUBTYPE_LOAD_SBM1 25 | |
82 | #define TC_SUBTYPE_LOAD_SBM2 27 |
|
81 | #define TC_SUBTYPE_LOAD_SBM2 27 | |
83 | #define TC_SUBTYPE_DUMP 31 |
|
82 | #define TC_SUBTYPE_DUMP 31 | |
84 | #define TC_SUBTYPE_ENTER 41 |
|
83 | #define TC_SUBTYPE_ENTER 41 | |
85 | #define TC_SUBTYPE_UPDT_INFO 51 |
|
84 | #define TC_SUBTYPE_UPDT_INFO 51 | |
86 | #define TC_SUBTYPE_EN_CAL 61 |
|
85 | #define TC_SUBTYPE_EN_CAL 61 | |
87 | #define TC_SUBTYPE_DIS_CAL 63 |
|
86 | #define TC_SUBTYPE_DIS_CAL 63 | |
88 | #define TC_SUBTYPE_LOAD_K 93 |
|
87 | #define TC_SUBTYPE_LOAD_K 93 | |
89 | #define TC_SUBTYPE_DUMP_K 95 |
|
88 | #define TC_SUBTYPE_DUMP_K 95 | |
90 | #define TC_SUBTYPE_LOAD_FBINS 91 |
|
89 | #define TC_SUBTYPE_LOAD_FBINS 91 | |
91 | #define TC_SUBTYPE_LOAD_FILTER_PAR 97 |
|
90 | #define TC_SUBTYPE_LOAD_FILTER_PAR 97 | |
92 | #define TC_SUBTYPE_UPDT_TIME 129 |
|
91 | #define TC_SUBTYPE_UPDT_TIME 129 | |
93 |
|
92 | |||
94 | // TC LEN |
|
93 | // TC LEN | |
95 | #define TC_LEN_RESET 12 |
|
94 | #define TC_LEN_RESET 12 | |
96 | #define TC_LEN_LOAD_COMM 14 |
|
95 | #define TC_LEN_LOAD_COMM 14 | |
97 | #define TC_LEN_LOAD_NORM 22 |
|
96 | #define TC_LEN_LOAD_NORM 22 | |
98 | #define TC_LEN_LOAD_BURST 14 |
|
97 | #define TC_LEN_LOAD_BURST 14 | |
99 | #define TC_LEN_LOAD_SBM1 14 |
|
98 | #define TC_LEN_LOAD_SBM1 14 | |
100 | #define TC_LEN_LOAD_SBM2 14 |
|
99 | #define TC_LEN_LOAD_SBM2 14 | |
101 | #define TC_LEN_DUMP 12 |
|
100 | #define TC_LEN_DUMP 12 | |
102 | #define TC_LEN_ENTER 20 |
|
101 | #define TC_LEN_ENTER 20 | |
103 | #define TC_LEN_UPDT_INFO 110 |
|
102 | #define TC_LEN_UPDT_INFO 110 | |
104 | #define TC_LEN_EN_CAL 12 |
|
103 | #define TC_LEN_EN_CAL 12 | |
105 | #define TC_LEN_DIS_CAL 12 |
|
104 | #define TC_LEN_DIS_CAL 12 | |
106 | #define TC_LEN_LOAD_K 142 |
|
105 | #define TC_LEN_LOAD_K 142 | |
107 | #define TC_LEN_DUMP_K 12 |
|
106 | #define TC_LEN_DUMP_K 12 | |
108 | #define TC_LEN_LOAD_FBINS 60 |
|
107 | #define TC_LEN_LOAD_FBINS 60 | |
109 | #define TC_LEN_LOAD_FILTER_PAR 28 |
|
108 | #define TC_LEN_LOAD_FILTER_PAR 28 | |
110 | #define TC_LEN_UPDT_TIME 18 |
|
109 | #define TC_LEN_UPDT_TIME 18 | |
111 |
|
110 | |||
112 | // PACKET CODES |
|
111 | // PACKET CODES | |
113 | #define TM_CODE_K_DUMP 0xb5600b00 // 181 (0xb5) ** 96 (0x60) ** 11 (0x0b) ** 0 (0x00) |
|
112 | #define TM_CODE_K_DUMP 0xb5600b00 // 181 (0xb5) ** 96 (0x60) ** 11 (0x0b) ** 0 (0x00) | |
114 |
|
113 | |||
115 | // TM TYPES |
|
114 | // TM TYPES | |
116 | #define TM_TYPE_TC_EXE 1 |
|
115 | #define TM_TYPE_TC_EXE 1 | |
117 | #define TM_TYPE_HK 3 |
|
116 | #define TM_TYPE_HK 3 | |
118 | #define TM_TYPE_LFR_SCIENCE 21 |
|
117 | #define TM_TYPE_LFR_SCIENCE 21 | |
119 | #define TM_TYPE_PARAMETER_DUMP 181 |
|
118 | #define TM_TYPE_PARAMETER_DUMP 181 | |
120 | #define TM_TYPE_K_DUMP 181 |
|
119 | #define TM_TYPE_K_DUMP 181 | |
121 |
|
120 | |||
122 | // TM SUBTYPES |
|
121 | // TM SUBTYPES | |
123 | #define TM_SUBTYPE_EXE_OK 7 |
|
122 | #define TM_SUBTYPE_EXE_OK 7 | |
124 | #define TM_SUBTYPE_EXE_NOK 8 |
|
123 | #define TM_SUBTYPE_EXE_NOK 8 | |
125 | #define TM_SUBTYPE_HK 25 |
|
124 | #define TM_SUBTYPE_HK 25 | |
126 | #define TM_SUBTYPE_LFR_SCIENCE_3 3 // TM packets with fixed size |
|
125 | #define TM_SUBTYPE_LFR_SCIENCE_3 3 // TM packets with fixed size | |
127 | #define TM_SUBTYPE_LFR_SCIENCE_6 6 // TM packets with variable size |
|
126 | #define TM_SUBTYPE_LFR_SCIENCE_6 6 // TM packets with variable size | |
128 | #define TM_SUBTYPE_PARAMETER_DUMP 32 |
|
127 | #define TM_SUBTYPE_PARAMETER_DUMP 32 | |
129 | #define TM_SUBTYPE_K_DUMP 96 |
|
128 | #define TM_SUBTYPE_K_DUMP 96 | |
130 |
|
129 | |||
131 | // FAILURE CODES |
|
130 | // FAILURE CODES | |
132 | #define ILLEGAL_APID 0 |
|
131 | #define ILLEGAL_APID 0 | |
133 | #define WRONG_LEN_PKT 1 |
|
132 | #define WRONG_LEN_PKT 1 | |
134 | #define INCOR_CHECKSUM 2 |
|
133 | #define INCOR_CHECKSUM 2 | |
135 | #define ILL_TYPE 3 |
|
134 | #define ILL_TYPE 3 | |
136 | #define ILL_SUBTYPE 4 |
|
135 | #define ILL_SUBTYPE 4 | |
137 | #define WRONG_APP_DATA 5 // 0x00 0x05 |
|
136 | #define WRONG_APP_DATA 5 // 0x00 0x05 | |
138 | #define TC_NOT_EXE 42000 // 0xa4 0x10 |
|
137 | #define TC_NOT_EXE 42000 // 0xa4 0x10 | |
139 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 |
|
138 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 | |
140 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 |
|
139 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 | |
141 | #define FAIL_DETECTED 42003 // 0xa4 0x13 |
|
140 | #define FAIL_DETECTED 42003 // 0xa4 0x13 | |
142 | #define NOT_ALLOWED 42004 // 0xa4 0x14 |
|
141 | #define NOT_ALLOWED 42004 // 0xa4 0x14 | |
143 | #define CORRUPTED 42005 // 0xa4 0x15 |
|
142 | #define CORRUPTED 42005 // 0xa4 0x15 | |
144 | #define CCSDS_TM_VALID 7 |
|
143 | #define CCSDS_TM_VALID 7 | |
145 |
|
144 | |||
146 | // HK_LFR_LAST_ER_RID |
|
145 | // HK_LFR_LAST_ER_RID | |
147 | #define RID_LE_LFR_TIME 42119 |
|
146 | #define RID_LE_LFR_TIME 42119 | |
148 | #define RID_LE_LFR_DPU_SPW 42128 |
|
147 | #define RID_LE_LFR_DPU_SPW 42128 | |
149 | #define RID_LE_LFR_TIMEC 42129 |
|
148 | #define RID_LE_LFR_TIMEC 42129 | |
150 | #define RID_ME_LFR_DPU_SPW 42338 |
|
149 | #define RID_ME_LFR_DPU_SPW 42338 | |
151 | // HK_LFR_LAST_ER_CODE |
|
150 | // HK_LFR_LAST_ER_CODE | |
152 | #define CODE_PARITY 1 |
|
151 | #define CODE_PARITY 1 | |
153 | #define CODE_DISCONNECT 2 |
|
152 | #define CODE_DISCONNECT 2 | |
154 | #define CODE_ESCAPE 3 |
|
153 | #define CODE_ESCAPE 3 | |
155 | #define CODE_CREDIT 4 |
|
154 | #define CODE_CREDIT 4 | |
156 | #define CODE_WRITE_SYNC 5 |
|
155 | #define CODE_WRITE_SYNC 5 | |
157 | #define CODE_EARLY_EOP_EEP 6 |
|
156 | #define CODE_EARLY_EOP_EEP 6 | |
158 | #define CODE_INVALID_ADDRESS 7 |
|
157 | #define CODE_INVALID_ADDRESS 7 | |
159 | #define CODE_EEP 8 |
|
158 | #define CODE_EEP 8 | |
160 | #define CODE_RX_TOO_BIG 9 |
|
159 | #define CODE_RX_TOO_BIG 9 | |
161 | #define CODE_HEADER_CRC 16 |
|
160 | #define CODE_HEADER_CRC 16 | |
162 | #define CODE_DATA_CRC 17 |
|
161 | #define CODE_DATA_CRC 17 | |
163 | #define CODE_ERRONEOUS 20 |
|
162 | #define CODE_ERRONEOUS 20 | |
164 | #define CODE_MISSING 21 |
|
163 | #define CODE_MISSING 21 | |
165 | #define CODE_INVALID 22 |
|
164 | #define CODE_INVALID 22 | |
166 | #define CODE_TIMECODE_IT 24 |
|
165 | #define CODE_TIMECODE_IT 24 | |
167 | #define CODE_NOT_SYNCHRO 25 |
|
166 | #define CODE_NOT_SYNCHRO 25 | |
168 | #define CODE_TIMECODE_CTR 26 |
|
167 | #define CODE_TIMECODE_CTR 26 | |
169 |
|
168 | |||
170 | // TC SID |
|
169 | // TC SID | |
171 | #define SID_TC_GROUND 0 |
|
170 | #define SID_TC_GROUND 0 | |
172 | #define SID_TC_MISSION_TIMELINE 110 |
|
171 | #define SID_TC_MISSION_TIMELINE 110 | |
173 | #define SID_TC_TC_SEQUENCES 111 |
|
172 | #define SID_TC_TC_SEQUENCES 111 | |
174 | #define SID_TC_RECOVERY_ACTION_CMD 112 |
|
173 | #define SID_TC_RECOVERY_ACTION_CMD 112 | |
175 | #define SID_TC_BACKUP_MISSION_TIMELINE 113 |
|
174 | #define SID_TC_BACKUP_MISSION_TIMELINE 113 | |
176 | #define SID_TC_DIRECT_CMD 120 |
|
175 | #define SID_TC_DIRECT_CMD 120 | |
177 | #define SID_TC_SPARE_GRD_SRC1 121 |
|
176 | #define SID_TC_SPARE_GRD_SRC1 121 | |
178 | #define SID_TC_SPARE_GRD_SRC2 122 |
|
177 | #define SID_TC_SPARE_GRD_SRC2 122 | |
179 | #define SID_TC_OBCP 15 |
|
178 | #define SID_TC_OBCP 15 | |
180 | #define SID_TC_SYSTEM_CONTROL 14 |
|
179 | #define SID_TC_SYSTEM_CONTROL 14 | |
181 | #define SID_TC_AOCS 11 |
|
180 | #define SID_TC_AOCS 11 | |
182 | #define SID_TC_RPW_INTERNAL 254 |
|
181 | #define SID_TC_RPW_INTERNAL 254 | |
183 |
|
182 | |||
184 | enum apid_destid{ |
|
183 | enum apid_destid{ | |
185 | GROUND, |
|
184 | GROUND, | |
186 | MISSION_TIMELINE, |
|
185 | MISSION_TIMELINE, | |
187 | TC_SEQUENCES, |
|
186 | TC_SEQUENCES, | |
188 | RECOVERY_ACTION_CMD, |
|
187 | RECOVERY_ACTION_CMD, | |
189 | BACKUP_MISSION_TIMELINE, |
|
188 | BACKUP_MISSION_TIMELINE, | |
190 | DIRECT_CMD, |
|
189 | DIRECT_CMD, | |
191 | SPARE_GRD_SRC1, |
|
190 | SPARE_GRD_SRC1, | |
192 | SPARE_GRD_SRC2, |
|
191 | SPARE_GRD_SRC2, | |
193 | OBCP, |
|
192 | OBCP, | |
194 | SYSTEM_CONTROL, |
|
193 | SYSTEM_CONTROL, | |
195 | AOCS, |
|
194 | AOCS, | |
196 | RPW_INTERNAL |
|
195 | RPW_INTERNAL | |
197 | }; |
|
196 | }; | |
198 | // SEQUENCE COUNTERS |
|
197 | // SEQUENCE COUNTERS | |
199 | #define SEQ_CNT_MAX 16383 |
|
198 | #define SEQ_CNT_MAX 16383 | |
200 | #define SEQ_CNT_NB_DEST_ID 12 |
|
199 | #define SEQ_CNT_NB_DEST_ID 12 | |
201 |
|
200 | |||
202 | // TM SID |
|
201 | // TM SID | |
203 | #define SID_HK 1 |
|
202 | #define SID_HK 1 | |
204 |
|
203 | |||
205 | #define SID_NORM_SWF_F0 3 |
|
204 | #define SID_NORM_SWF_F0 3 | |
206 | #define SID_NORM_SWF_F1 4 |
|
205 | #define SID_NORM_SWF_F1 4 | |
207 | #define SID_NORM_SWF_F2 5 |
|
206 | #define SID_NORM_SWF_F2 5 | |
208 | #define SID_NORM_CWF_F3 1 |
|
207 | #define SID_NORM_CWF_F3 1 | |
209 | #define SID_BURST_CWF_F2 2 |
|
208 | #define SID_BURST_CWF_F2 2 | |
210 | #define SID_SBM1_CWF_F1 24 |
|
209 | #define SID_SBM1_CWF_F1 24 | |
211 | #define SID_SBM2_CWF_F2 25 |
|
210 | #define SID_SBM2_CWF_F2 25 | |
212 | #define SID_NORM_ASM_F0 11 |
|
211 | #define SID_NORM_ASM_F0 11 | |
213 | #define SID_NORM_ASM_F1 12 |
|
212 | #define SID_NORM_ASM_F1 12 | |
214 | #define SID_NORM_ASM_F2 13 |
|
213 | #define SID_NORM_ASM_F2 13 | |
215 | #define SID_NORM_BP1_F0 14 |
|
214 | #define SID_NORM_BP1_F0 14 | |
216 | #define SID_NORM_BP1_F1 15 |
|
215 | #define SID_NORM_BP1_F1 15 | |
217 | #define SID_NORM_BP1_F2 16 |
|
216 | #define SID_NORM_BP1_F2 16 | |
218 | #define SID_NORM_BP2_F0 19 |
|
217 | #define SID_NORM_BP2_F0 19 | |
219 | #define SID_NORM_BP2_F1 20 |
|
218 | #define SID_NORM_BP2_F1 20 | |
220 | #define SID_NORM_BP2_F2 21 |
|
219 | #define SID_NORM_BP2_F2 21 | |
221 | #define SID_BURST_BP1_F0 17 |
|
220 | #define SID_BURST_BP1_F0 17 | |
222 | #define SID_BURST_BP2_F0 22 |
|
221 | #define SID_BURST_BP2_F0 22 | |
223 | #define SID_BURST_BP1_F1 18 |
|
222 | #define SID_BURST_BP1_F1 18 | |
224 | #define SID_BURST_BP2_F1 23 |
|
223 | #define SID_BURST_BP2_F1 23 | |
225 | #define SID_SBM1_BP1_F0 28 |
|
224 | #define SID_SBM1_BP1_F0 28 | |
226 | #define SID_SBM1_BP2_F0 31 |
|
225 | #define SID_SBM1_BP2_F0 31 | |
227 | #define SID_SBM2_BP1_F0 29 |
|
226 | #define SID_SBM2_BP1_F0 29 | |
228 | #define SID_SBM2_BP2_F0 32 |
|
227 | #define SID_SBM2_BP2_F0 32 | |
229 | #define SID_SBM2_BP1_F1 30 |
|
228 | #define SID_SBM2_BP1_F1 30 | |
230 | #define SID_SBM2_BP2_F1 33 |
|
229 | #define SID_SBM2_BP2_F1 33 | |
231 | #define SID_NORM_CWF_LONG_F3 34 |
|
230 | #define SID_NORM_CWF_LONG_F3 34 | |
232 |
|
231 | |||
233 | #define SID_PARAMETER_DUMP 10 |
|
232 | #define SID_PARAMETER_DUMP 10 | |
234 | #define SID_K_DUMP 11 |
|
233 | #define SID_K_DUMP 11 | |
235 |
|
234 | |||
236 | // HEADER_LENGTH |
|
235 | // HEADER_LENGTH | |
237 | //#define TM_HEADER_LEN 16 |
|
236 | //#define TM_HEADER_LEN 16 | |
238 | #define HEADER_LENGTH_TM_LFR_SCIENCE_CWF 32 |
|
237 | #define HEADER_LENGTH_TM_LFR_SCIENCE_CWF 32 | |
239 | #define HEADER_LENGTH_TM_LFR_SCIENCE_SWF 34 |
|
238 | #define HEADER_LENGTH_TM_LFR_SCIENCE_SWF 34 | |
240 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 34 |
|
239 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 34 | |
241 | // PACKET_LENGTH |
|
240 | // PACKET_LENGTH | |
242 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) |
|
241 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) | |
243 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
242 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
244 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
243 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
245 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
244 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
246 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
245 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
247 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) |
|
246 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) | |
248 | #define PACKET_LENGTH_HK (136 - CCSDS_TC_TM_PACKET_OFFSET) |
|
247 | #define PACKET_LENGTH_HK (136 - CCSDS_TC_TM_PACKET_OFFSET) | |
249 | #define PACKET_LENGTH_PARAMETER_DUMP (148 - CCSDS_TC_TM_PACKET_OFFSET) |
|
248 | #define PACKET_LENGTH_PARAMETER_DUMP (148 - CCSDS_TC_TM_PACKET_OFFSET) | |
250 | #define PACKET_LENGTH_K_DUMP (3920 - CCSDS_TC_TM_PACKET_OFFSET) |
|
249 | #define PACKET_LENGTH_K_DUMP (3920 - CCSDS_TC_TM_PACKET_OFFSET) | |
251 | // SCIENCE ASM |
|
250 | // SCIENCE ASM | |
252 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0_1 (3230 - CCSDS_TC_TM_PACKET_OFFSET) // 32 * 25 * 4 + 30 => 32 bins (32 + 32 + 24 ), 3 packets |
|
251 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0_1 (3230 - CCSDS_TC_TM_PACKET_OFFSET) // 32 * 25 * 4 + 30 => 32 bins (32 + 32 + 24 ), 3 packets | |
253 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0_2 (2430 - CCSDS_TC_TM_PACKET_OFFSET) // 24 * 25 * 4 + 30 => 24 bins (32 + 32 + 24 ), 3 packets |
|
252 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0_2 (2430 - CCSDS_TC_TM_PACKET_OFFSET) // 24 * 25 * 4 + 30 => 24 bins (32 + 32 + 24 ), 3 packets | |
254 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1_1 (3630 - CCSDS_TC_TM_PACKET_OFFSET) // 36 * 25 * 4 + 30 => 36 bins (36 + 36 + 32 ), 3 packets |
|
253 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1_1 (3630 - CCSDS_TC_TM_PACKET_OFFSET) // 36 * 25 * 4 + 30 => 36 bins (36 + 36 + 32 ), 3 packets | |
255 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1_2 (3230 - CCSDS_TC_TM_PACKET_OFFSET) // 32 * 25 * 4 + 30 => 32 bins (36 + 36 + 32 ), 3 packets |
|
254 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1_2 (3230 - CCSDS_TC_TM_PACKET_OFFSET) // 32 * 25 * 4 + 30 => 32 bins (36 + 36 + 32 ), 3 packets | |
256 | #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 |
|
255 | #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 | |
257 | // SCIENCE NORM |
|
256 | // SCIENCE NORM | |
258 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (150 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 11 + 29 (1 spare byte in the header) |
|
257 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (150 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 11 + 29 (1 spare byte in the header) | |
259 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (172 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 11 + 29 (1 spare byte in the header) |
|
258 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (172 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 11 + 29 (1 spare byte in the header) | |
260 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (160 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 11 + 28 |
|
259 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (160 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 11 + 28 | |
261 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (358 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 28 |
|
260 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (358 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 28 | |
262 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (418 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 28 |
|
261 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (418 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 28 | |
263 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (388 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 28 |
|
262 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (388 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 28 | |
264 | // SCIENCE SBM |
|
263 | // SCIENCE SBM | |
265 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (270 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 11 + 28 |
|
264 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (270 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 11 + 28 | |
266 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (688 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 28 |
|
265 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (688 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 28 | |
267 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (314 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 11 + 28 |
|
266 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (314 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 11 + 28 | |
268 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (808 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 28 |
|
267 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (808 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 28 | |
269 |
|
268 | |||
270 | #define PACKET_LENGTH_DELTA 11 // 7 + 4 |
|
269 | #define PACKET_LENGTH_DELTA 11 // 7 + 4 | |
271 |
|
270 | |||
272 | #define SPARE1_PUSVERSION_SPARE2 0x10 |
|
271 | #define SPARE1_PUSVERSION_SPARE2 0x10 | |
273 |
|
272 | |||
274 | // R3 |
|
273 | // R3 | |
275 | // one snapshot = 2048 samples = 6 packets * 304 + 224 |
|
274 | // one snapshot = 2048 samples = 6 packets * 304 + 224 | |
276 | #define TM_LEN_SCI_SWF_304 (3678 - CCSDS_TC_TM_PACKET_OFFSET) // 304 * 12 + 30 |
|
275 | #define TM_LEN_SCI_SWF_304 (3678 - CCSDS_TC_TM_PACKET_OFFSET) // 304 * 12 + 30 | |
277 | #define TM_LEN_SCI_SWF_224 (2718 - CCSDS_TC_TM_PACKET_OFFSET) // 224 * 12 + 30 |
|
276 | #define TM_LEN_SCI_SWF_224 (2718 - CCSDS_TC_TM_PACKET_OFFSET) // 224 * 12 + 30 | |
278 | // one continuous buffer = 2688 samples = 8 packets * 336 |
|
277 | // one continuous buffer = 2688 samples = 8 packets * 336 | |
279 | #define TM_LEN_SCI_CWF_336 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 336 * 12 + 28 |
|
278 | #define TM_LEN_SCI_CWF_336 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 336 * 12 + 28 | |
280 | #define TM_LEN_SCI_CWF_672 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 672 * 6 + 28 |
|
279 | #define TM_LEN_SCI_CWF_672 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 672 * 6 + 28 | |
281 | // |
|
280 | // | |
282 | #define DEFAULT_PKTCNT 0x07 |
|
281 | #define DEFAULT_PKTCNT 0x07 | |
283 | #define BLK_NR_304 0x0130 |
|
282 | #define BLK_NR_304 0x0130 | |
284 | #define BLK_NR_224 0x00e0 |
|
283 | #define BLK_NR_224 0x00e0 | |
285 | #define BLK_NR_CWF 0x0150 // 336 |
|
284 | #define BLK_NR_CWF 0x0150 // 336 | |
286 | #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672 |
|
285 | #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672 | |
287 |
|
286 | |||
288 | enum TM_TYPE{ |
|
287 | enum TM_TYPE{ | |
289 | TM_LFR_TC_EXE_OK, |
|
288 | TM_LFR_TC_EXE_OK, | |
290 | TM_LFR_TC_EXE_ERR, |
|
289 | TM_LFR_TC_EXE_ERR, | |
291 | TM_LFR_HK, |
|
290 | TM_LFR_HK, | |
292 | TM_LFR_SCI, |
|
291 | TM_LFR_SCI, | |
293 | TM_LFR_SCI_SBM, |
|
292 | TM_LFR_SCI_SBM, | |
294 | TM_LFR_PAR_DUMP |
|
293 | TM_LFR_PAR_DUMP | |
295 | }; |
|
294 | }; | |
296 |
|
295 | |||
297 | typedef struct { |
|
296 | typedef struct { | |
298 | unsigned char targetLogicalAddress; |
|
297 | unsigned char targetLogicalAddress; | |
299 | unsigned char protocolIdentifier; |
|
298 | unsigned char protocolIdentifier; | |
300 | unsigned char reserved; |
|
299 | unsigned char reserved; | |
301 | unsigned char userApplication; |
|
300 | unsigned char userApplication; | |
302 | // PACKET HEADER |
|
301 | // PACKET HEADER | |
303 | unsigned char packetID[2]; |
|
302 | unsigned char packetID[2]; | |
304 | unsigned char packetSequenceControl[2]; |
|
303 | unsigned char packetSequenceControl[2]; | |
305 | unsigned char packetLength[2]; |
|
304 | unsigned char packetLength[2]; | |
306 | // DATA FIELD HEADER |
|
305 | // DATA FIELD HEADER | |
307 | unsigned char spare1_pusVersion_spare2; |
|
306 | unsigned char spare1_pusVersion_spare2; | |
308 | unsigned char serviceType; |
|
307 | unsigned char serviceType; | |
309 | unsigned char serviceSubType; |
|
308 | unsigned char serviceSubType; | |
310 | unsigned char destinationID; |
|
309 | unsigned char destinationID; | |
311 | unsigned char time[6]; |
|
310 | unsigned char time[6]; | |
312 | // |
|
311 | // | |
313 | unsigned char telecommand_pkt_id[2]; |
|
312 | unsigned char telecommand_pkt_id[2]; | |
314 | unsigned char pkt_seq_control[2]; |
|
313 | unsigned char pkt_seq_control[2]; | |
315 | } Packet_TM_LFR_TC_EXE_SUCCESS_t; |
|
314 | } Packet_TM_LFR_TC_EXE_SUCCESS_t; | |
316 |
|
315 | |||
317 | typedef struct { |
|
316 | typedef struct { | |
318 | unsigned char targetLogicalAddress; |
|
317 | unsigned char targetLogicalAddress; | |
319 | unsigned char protocolIdentifier; |
|
318 | unsigned char protocolIdentifier; | |
320 | unsigned char reserved; |
|
319 | unsigned char reserved; | |
321 | unsigned char userApplication; |
|
320 | unsigned char userApplication; | |
322 | // PACKET HEADER |
|
321 | // PACKET HEADER | |
323 | unsigned char packetID[2]; |
|
322 | unsigned char packetID[2]; | |
324 | unsigned char packetSequenceControl[2]; |
|
323 | unsigned char packetSequenceControl[2]; | |
325 | unsigned char packetLength[2]; |
|
324 | unsigned char packetLength[2]; | |
326 | // DATA FIELD HEADER |
|
325 | // DATA FIELD HEADER | |
327 | unsigned char spare1_pusVersion_spare2; |
|
326 | unsigned char spare1_pusVersion_spare2; | |
328 | unsigned char serviceType; |
|
327 | unsigned char serviceType; | |
329 | unsigned char serviceSubType; |
|
328 | unsigned char serviceSubType; | |
330 | unsigned char destinationID; |
|
329 | unsigned char destinationID; | |
331 | unsigned char time[6]; |
|
330 | unsigned char time[6]; | |
332 | // |
|
331 | // | |
333 | unsigned char telecommand_pkt_id[2]; |
|
332 | unsigned char telecommand_pkt_id[2]; | |
334 | unsigned char pkt_seq_control[2]; |
|
333 | unsigned char pkt_seq_control[2]; | |
335 | unsigned char tc_failure_code[2]; |
|
334 | unsigned char tc_failure_code[2]; | |
336 | unsigned char tc_service; |
|
335 | unsigned char tc_service; | |
337 | unsigned char tc_subtype; |
|
336 | unsigned char tc_subtype; | |
338 | unsigned char byte_position; |
|
337 | unsigned char byte_position; | |
339 | unsigned char rcv_value; |
|
338 | unsigned char rcv_value; | |
340 | } Packet_TM_LFR_TC_EXE_INCONSISTENT_t; |
|
339 | } Packet_TM_LFR_TC_EXE_INCONSISTENT_t; | |
341 |
|
340 | |||
342 | typedef struct { |
|
341 | typedef struct { | |
343 | unsigned char targetLogicalAddress; |
|
342 | unsigned char targetLogicalAddress; | |
344 | unsigned char protocolIdentifier; |
|
343 | unsigned char protocolIdentifier; | |
345 | unsigned char reserved; |
|
344 | unsigned char reserved; | |
346 | unsigned char userApplication; |
|
345 | unsigned char userApplication; | |
347 | // PACKET HEADER |
|
346 | // PACKET HEADER | |
348 | unsigned char packetID[2]; |
|
347 | unsigned char packetID[2]; | |
349 | unsigned char packetSequenceControl[2]; |
|
348 | unsigned char packetSequenceControl[2]; | |
350 | unsigned char packetLength[2]; |
|
349 | unsigned char packetLength[2]; | |
351 | // DATA FIELD HEADER |
|
350 | // DATA FIELD HEADER | |
352 | unsigned char spare1_pusVersion_spare2; |
|
351 | unsigned char spare1_pusVersion_spare2; | |
353 | unsigned char serviceType; |
|
352 | unsigned char serviceType; | |
354 | unsigned char serviceSubType; |
|
353 | unsigned char serviceSubType; | |
355 | unsigned char destinationID; |
|
354 | unsigned char destinationID; | |
356 | unsigned char time[6]; |
|
355 | unsigned char time[6]; | |
357 | // |
|
356 | // | |
358 | unsigned char telecommand_pkt_id[2]; |
|
357 | unsigned char telecommand_pkt_id[2]; | |
359 | unsigned char pkt_seq_control[2]; |
|
358 | unsigned char pkt_seq_control[2]; | |
360 | unsigned char tc_failure_code[2]; |
|
359 | unsigned char tc_failure_code[2]; | |
361 | unsigned char tc_service; |
|
360 | unsigned char tc_service; | |
362 | unsigned char tc_subtype; |
|
361 | unsigned char tc_subtype; | |
363 | unsigned char lfr_status_word[2]; |
|
362 | unsigned char lfr_status_word[2]; | |
364 | } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; |
|
363 | } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; | |
365 |
|
364 | |||
366 | typedef struct { |
|
365 | typedef struct { | |
367 | unsigned char targetLogicalAddress; |
|
366 | unsigned char targetLogicalAddress; | |
368 | unsigned char protocolIdentifier; |
|
367 | unsigned char protocolIdentifier; | |
369 | unsigned char reserved; |
|
368 | unsigned char reserved; | |
370 | unsigned char userApplication; |
|
369 | unsigned char userApplication; | |
371 | // PACKET HEADER |
|
370 | // PACKET HEADER | |
372 | unsigned char packetID[2]; |
|
371 | unsigned char packetID[2]; | |
373 | unsigned char packetSequenceControl[2]; |
|
372 | unsigned char packetSequenceControl[2]; | |
374 | unsigned char packetLength[2]; |
|
373 | unsigned char packetLength[2]; | |
375 | // DATA FIELD HEADER |
|
374 | // DATA FIELD HEADER | |
376 | unsigned char spare1_pusVersion_spare2; |
|
375 | unsigned char spare1_pusVersion_spare2; | |
377 | unsigned char serviceType; |
|
376 | unsigned char serviceType; | |
378 | unsigned char serviceSubType; |
|
377 | unsigned char serviceSubType; | |
379 | unsigned char destinationID; |
|
378 | unsigned char destinationID; | |
380 | unsigned char time[6]; |
|
379 | unsigned char time[6]; | |
381 | // |
|
380 | // | |
382 | unsigned char telecommand_pkt_id[2]; |
|
381 | unsigned char telecommand_pkt_id[2]; | |
383 | unsigned char pkt_seq_control[2]; |
|
382 | unsigned char pkt_seq_control[2]; | |
384 | unsigned char tc_failure_code[2]; |
|
383 | unsigned char tc_failure_code[2]; | |
385 | unsigned char tc_service; |
|
384 | unsigned char tc_service; | |
386 | unsigned char tc_subtype; |
|
385 | unsigned char tc_subtype; | |
387 | } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; |
|
386 | } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; | |
388 |
|
387 | |||
389 | typedef struct { |
|
388 | typedef struct { | |
390 | unsigned char targetLogicalAddress; |
|
389 | unsigned char targetLogicalAddress; | |
391 | unsigned char protocolIdentifier; |
|
390 | unsigned char protocolIdentifier; | |
392 | unsigned char reserved; |
|
391 | unsigned char reserved; | |
393 | unsigned char userApplication; |
|
392 | unsigned char userApplication; | |
394 | // PACKET HEADER |
|
393 | // PACKET HEADER | |
395 | unsigned char packetID[2]; |
|
394 | unsigned char packetID[2]; | |
396 | unsigned char packetSequenceControl[2]; |
|
395 | unsigned char packetSequenceControl[2]; | |
397 | unsigned char packetLength[2]; |
|
396 | unsigned char packetLength[2]; | |
398 | // DATA FIELD HEADER |
|
397 | // DATA FIELD HEADER | |
399 | unsigned char spare1_pusVersion_spare2; |
|
398 | unsigned char spare1_pusVersion_spare2; | |
400 | unsigned char serviceType; |
|
399 | unsigned char serviceType; | |
401 | unsigned char serviceSubType; |
|
400 | unsigned char serviceSubType; | |
402 | unsigned char destinationID; |
|
401 | unsigned char destinationID; | |
403 | unsigned char time[6]; |
|
402 | unsigned char time[6]; | |
404 | // |
|
403 | // | |
405 | unsigned char telecommand_pkt_id[2]; |
|
404 | unsigned char telecommand_pkt_id[2]; | |
406 | unsigned char pkt_seq_control[2]; |
|
405 | unsigned char pkt_seq_control[2]; | |
407 | unsigned char tc_failure_code[2]; |
|
406 | unsigned char tc_failure_code[2]; | |
408 | unsigned char tc_service; |
|
407 | unsigned char tc_service; | |
409 | unsigned char tc_subtype; |
|
408 | unsigned char tc_subtype; | |
410 | } Packet_TM_LFR_TC_EXE_ERROR_t; |
|
409 | } Packet_TM_LFR_TC_EXE_ERROR_t; | |
411 |
|
410 | |||
412 | typedef struct { |
|
411 | typedef struct { | |
413 | unsigned char targetLogicalAddress; |
|
412 | unsigned char targetLogicalAddress; | |
414 | unsigned char protocolIdentifier; |
|
413 | unsigned char protocolIdentifier; | |
415 | unsigned char reserved; |
|
414 | unsigned char reserved; | |
416 | unsigned char userApplication; |
|
415 | unsigned char userApplication; | |
417 | // PACKET HEADER |
|
416 | // PACKET HEADER | |
418 | unsigned char packetID[2]; |
|
417 | unsigned char packetID[2]; | |
419 | unsigned char packetSequenceControl[2]; |
|
418 | unsigned char packetSequenceControl[2]; | |
420 | unsigned char packetLength[2]; |
|
419 | unsigned char packetLength[2]; | |
421 | // DATA FIELD HEADER |
|
420 | // DATA FIELD HEADER | |
422 | unsigned char spare1_pusVersion_spare2; |
|
421 | unsigned char spare1_pusVersion_spare2; | |
423 | unsigned char serviceType; |
|
422 | unsigned char serviceType; | |
424 | unsigned char serviceSubType; |
|
423 | unsigned char serviceSubType; | |
425 | unsigned char destinationID; |
|
424 | unsigned char destinationID; | |
426 | unsigned char time[6]; |
|
425 | unsigned char time[6]; | |
427 | // |
|
426 | // | |
428 | unsigned char telecommand_pkt_id[2]; |
|
427 | unsigned char telecommand_pkt_id[2]; | |
429 | unsigned char pkt_seq_control[2]; |
|
428 | unsigned char pkt_seq_control[2]; | |
430 | unsigned char tc_failure_code[2]; |
|
429 | unsigned char tc_failure_code[2]; | |
431 | unsigned char tc_service; |
|
430 | unsigned char tc_service; | |
432 | unsigned char tc_subtype; |
|
431 | unsigned char tc_subtype; | |
433 | unsigned char pkt_len_rcv_value[2]; |
|
432 | unsigned char pkt_len_rcv_value[2]; | |
434 | unsigned char pkt_datafieldsize_cnt[2]; |
|
433 | unsigned char pkt_datafieldsize_cnt[2]; | |
435 | unsigned char rcv_crc[2]; |
|
434 | unsigned char rcv_crc[2]; | |
436 | unsigned char computed_crc[2]; |
|
435 | unsigned char computed_crc[2]; | |
437 | } Packet_TM_LFR_TC_EXE_CORRUPTED_t; |
|
436 | } Packet_TM_LFR_TC_EXE_CORRUPTED_t; | |
438 |
|
437 | |||
439 | typedef struct { |
|
438 | typedef struct { | |
440 | unsigned char targetLogicalAddress; |
|
439 | unsigned char targetLogicalAddress; | |
441 | unsigned char protocolIdentifier; |
|
440 | unsigned char protocolIdentifier; | |
442 | unsigned char reserved; |
|
441 | unsigned char reserved; | |
443 | unsigned char userApplication; |
|
442 | unsigned char userApplication; | |
444 | unsigned char packetID[2]; |
|
443 | unsigned char packetID[2]; | |
445 | unsigned char packetSequenceControl[2]; |
|
444 | unsigned char packetSequenceControl[2]; | |
446 | unsigned char packetLength[2]; |
|
445 | unsigned char packetLength[2]; | |
447 | // DATA FIELD HEADER |
|
446 | // DATA FIELD HEADER | |
448 | unsigned char spare1_pusVersion_spare2; |
|
447 | unsigned char spare1_pusVersion_spare2; | |
449 | unsigned char serviceType; |
|
448 | unsigned char serviceType; | |
450 | unsigned char serviceSubType; |
|
449 | unsigned char serviceSubType; | |
451 | unsigned char destinationID; |
|
450 | unsigned char destinationID; | |
452 | unsigned char time[6]; |
|
451 | unsigned char time[6]; | |
453 | // AUXILIARY HEADER |
|
452 | // AUXILIARY HEADER | |
454 | unsigned char sid; |
|
453 | unsigned char sid; | |
455 | unsigned char pa_bia_status_info; |
|
454 | unsigned char pa_bia_status_info; | |
456 | unsigned char sy_lfr_common_parameters_spare; |
|
455 | unsigned char sy_lfr_common_parameters_spare; | |
457 | unsigned char sy_lfr_common_parameters; |
|
456 | unsigned char sy_lfr_common_parameters; | |
458 | unsigned char pktCnt; |
|
457 | unsigned char pktCnt; | |
459 | unsigned char pktNr; |
|
458 | unsigned char pktNr; | |
460 | unsigned char acquisitionTime[6]; |
|
459 | unsigned char acquisitionTime[6]; | |
461 | unsigned char blkNr[2]; |
|
460 | unsigned char blkNr[2]; | |
462 | } Header_TM_LFR_SCIENCE_SWF_t; |
|
461 | } Header_TM_LFR_SCIENCE_SWF_t; | |
463 |
|
462 | |||
464 | typedef struct { |
|
463 | typedef struct { | |
465 | unsigned char targetLogicalAddress; |
|
464 | unsigned char targetLogicalAddress; | |
466 | unsigned char protocolIdentifier; |
|
465 | unsigned char protocolIdentifier; | |
467 | unsigned char reserved; |
|
466 | unsigned char reserved; | |
468 | unsigned char userApplication; |
|
467 | unsigned char userApplication; | |
469 | unsigned char packetID[2]; |
|
468 | unsigned char packetID[2]; | |
470 | unsigned char packetSequenceControl[2]; |
|
469 | unsigned char packetSequenceControl[2]; | |
471 | unsigned char packetLength[2]; |
|
470 | unsigned char packetLength[2]; | |
472 | // DATA FIELD HEADER |
|
471 | // DATA FIELD HEADER | |
473 | unsigned char spare1_pusVersion_spare2; |
|
472 | unsigned char spare1_pusVersion_spare2; | |
474 | unsigned char serviceType; |
|
473 | unsigned char serviceType; | |
475 | unsigned char serviceSubType; |
|
474 | unsigned char serviceSubType; | |
476 | unsigned char destinationID; |
|
475 | unsigned char destinationID; | |
477 | unsigned char time[6]; |
|
476 | unsigned char time[6]; | |
478 | // AUXILIARY DATA HEADER |
|
477 | // AUXILIARY DATA HEADER | |
479 | unsigned char sid; |
|
478 | unsigned char sid; | |
480 | unsigned char pa_bia_status_info; |
|
479 | unsigned char pa_bia_status_info; | |
481 | unsigned char sy_lfr_common_parameters_spare; |
|
480 | unsigned char sy_lfr_common_parameters_spare; | |
482 | unsigned char sy_lfr_common_parameters; |
|
481 | unsigned char sy_lfr_common_parameters; | |
483 | unsigned char acquisitionTime[6]; |
|
482 | unsigned char acquisitionTime[6]; | |
484 | unsigned char blkNr[2]; |
|
483 | unsigned char blkNr[2]; | |
485 | } Header_TM_LFR_SCIENCE_CWF_t; |
|
484 | } Header_TM_LFR_SCIENCE_CWF_t; | |
486 |
|
485 | |||
487 | typedef struct { |
|
486 | typedef struct { | |
488 | unsigned char targetLogicalAddress; |
|
487 | unsigned char targetLogicalAddress; | |
489 | unsigned char protocolIdentifier; |
|
488 | unsigned char protocolIdentifier; | |
490 | unsigned char reserved; |
|
489 | unsigned char reserved; | |
491 | unsigned char userApplication; |
|
490 | unsigned char userApplication; | |
492 | unsigned char packetID[2]; |
|
491 | unsigned char packetID[2]; | |
493 | unsigned char packetSequenceControl[2]; |
|
492 | unsigned char packetSequenceControl[2]; | |
494 | unsigned char packetLength[2]; |
|
493 | unsigned char packetLength[2]; | |
495 | // DATA FIELD HEADER |
|
494 | // DATA FIELD HEADER | |
496 | unsigned char spare1_pusVersion_spare2; |
|
495 | unsigned char spare1_pusVersion_spare2; | |
497 | unsigned char serviceType; |
|
496 | unsigned char serviceType; | |
498 | unsigned char serviceSubType; |
|
497 | unsigned char serviceSubType; | |
499 | unsigned char destinationID; |
|
498 | unsigned char destinationID; | |
500 | unsigned char time[6]; |
|
499 | unsigned char time[6]; | |
501 | // AUXILIARY HEADER |
|
500 | // AUXILIARY HEADER | |
502 | unsigned char sid; |
|
501 | unsigned char sid; | |
503 | unsigned char pa_bia_status_info; |
|
502 | unsigned char pa_bia_status_info; | |
504 | unsigned char sy_lfr_common_parameters_spare; |
|
503 | unsigned char sy_lfr_common_parameters_spare; | |
505 | unsigned char sy_lfr_common_parameters; |
|
504 | unsigned char sy_lfr_common_parameters; | |
506 | unsigned char pa_lfr_pkt_cnt_asm; |
|
505 | unsigned char pa_lfr_pkt_cnt_asm; | |
507 | unsigned char pa_lfr_pkt_nr_asm; |
|
506 | unsigned char pa_lfr_pkt_nr_asm; | |
508 | unsigned char acquisitionTime[6]; |
|
507 | unsigned char acquisitionTime[6]; | |
509 | unsigned char pa_lfr_asm_blk_nr[2]; |
|
508 | unsigned char pa_lfr_asm_blk_nr[2]; | |
510 | } Header_TM_LFR_SCIENCE_ASM_t; |
|
509 | } Header_TM_LFR_SCIENCE_ASM_t; | |
511 |
|
510 | |||
512 | typedef struct { |
|
511 | typedef struct { | |
513 | unsigned char targetLogicalAddress; |
|
512 | unsigned char targetLogicalAddress; | |
514 | unsigned char protocolIdentifier; |
|
513 | unsigned char protocolIdentifier; | |
515 | unsigned char reserved; |
|
514 | unsigned char reserved; | |
516 | unsigned char userApplication; |
|
515 | unsigned char userApplication; | |
517 | unsigned char packetID[2]; |
|
516 | unsigned char packetID[2]; | |
518 | unsigned char packetSequenceControl[2]; |
|
517 | unsigned char packetSequenceControl[2]; | |
519 | unsigned char packetLength[2]; |
|
518 | unsigned char packetLength[2]; | |
520 | // DATA FIELD HEADER |
|
519 | // DATA FIELD HEADER | |
521 | unsigned char spare1_pusVersion_spare2; |
|
520 | unsigned char spare1_pusVersion_spare2; | |
522 | unsigned char serviceType; |
|
521 | unsigned char serviceType; | |
523 | unsigned char serviceSubType; |
|
522 | unsigned char serviceSubType; | |
524 | unsigned char destinationID; |
|
523 | unsigned char destinationID; | |
525 | unsigned char time[6]; |
|
524 | unsigned char time[6]; | |
526 | // AUXILIARY HEADER |
|
525 | // AUXILIARY HEADER | |
527 | unsigned char sid; |
|
526 | unsigned char sid; | |
528 | unsigned char pa_bia_status_info; |
|
527 | unsigned char pa_bia_status_info; | |
529 | unsigned char sy_lfr_common_parameters_spare; |
|
528 | unsigned char sy_lfr_common_parameters_spare; | |
530 | unsigned char sy_lfr_common_parameters; |
|
529 | unsigned char sy_lfr_common_parameters; | |
531 | unsigned char acquisitionTime[6]; |
|
530 | unsigned char acquisitionTime[6]; | |
532 | unsigned char source_data_spare; |
|
531 | unsigned char source_data_spare; | |
533 | unsigned char pa_lfr_bp_blk_nr[2]; |
|
532 | unsigned char pa_lfr_bp_blk_nr[2]; | |
534 | } Header_TM_LFR_SCIENCE_BP_with_spare_t; |
|
533 | } Header_TM_LFR_SCIENCE_BP_with_spare_t; | |
535 |
|
534 | |||
536 | typedef struct { |
|
535 | typedef struct { | |
537 | unsigned char targetLogicalAddress; |
|
536 | unsigned char targetLogicalAddress; | |
538 | unsigned char protocolIdentifier; |
|
537 | unsigned char protocolIdentifier; | |
539 | unsigned char reserved; |
|
538 | unsigned char reserved; | |
540 | unsigned char userApplication; |
|
539 | unsigned char userApplication; | |
541 | unsigned char packetID[2]; |
|
540 | unsigned char packetID[2]; | |
542 | unsigned char packetSequenceControl[2]; |
|
541 | unsigned char packetSequenceControl[2]; | |
543 | unsigned char packetLength[2]; |
|
542 | unsigned char packetLength[2]; | |
544 | // DATA FIELD HEADER |
|
543 | // DATA FIELD HEADER | |
545 | unsigned char spare1_pusVersion_spare2; |
|
544 | unsigned char spare1_pusVersion_spare2; | |
546 | unsigned char serviceType; |
|
545 | unsigned char serviceType; | |
547 | unsigned char serviceSubType; |
|
546 | unsigned char serviceSubType; | |
548 | unsigned char destinationID; |
|
547 | unsigned char destinationID; | |
549 | unsigned char time[6]; |
|
548 | unsigned char time[6]; | |
550 | // AUXILIARY HEADER |
|
549 | // AUXILIARY HEADER | |
551 | unsigned char sid; |
|
550 | unsigned char sid; | |
552 | unsigned char pa_bia_status_info; |
|
551 | unsigned char pa_bia_status_info; | |
553 | unsigned char sy_lfr_common_parameters_spare; |
|
552 | unsigned char sy_lfr_common_parameters_spare; | |
554 | unsigned char sy_lfr_common_parameters; |
|
553 | unsigned char sy_lfr_common_parameters; | |
555 | unsigned char acquisitionTime[6]; |
|
554 | unsigned char acquisitionTime[6]; | |
556 | unsigned char pa_lfr_bp_blk_nr[2]; |
|
555 | unsigned char pa_lfr_bp_blk_nr[2]; | |
557 | } Header_TM_LFR_SCIENCE_BP_t; |
|
556 | } Header_TM_LFR_SCIENCE_BP_t; | |
558 |
|
557 | |||
559 | typedef struct { |
|
558 | typedef struct { | |
560 | //targetLogicalAddress is removed by the grspw module |
|
559 | // TARGET LOGICAL ADDRESS (targetLogicalAddress) IS REMOVED BY THE GRSPW MODULE | |
561 | unsigned char protocolIdentifier; |
|
560 | unsigned char protocolIdentifier; | |
562 | unsigned char reserved; |
|
561 | unsigned char reserved; | |
563 | unsigned char userApplication; |
|
562 | unsigned char userApplication; | |
564 | unsigned char packetID[2]; |
|
563 | unsigned char packetID[2]; | |
565 | unsigned char packetSequenceControl[2]; |
|
564 | unsigned char packetSequenceControl[2]; | |
566 | unsigned char packetLength[2]; |
|
565 | unsigned char packetLength[2]; | |
567 | // DATA FIELD HEADER |
|
566 | // DATA FIELD HEADER | |
568 | unsigned char headerFlag_pusVersion_Ack; |
|
567 | unsigned char headerFlag_pusVersion_Ack; | |
569 | unsigned char serviceType; |
|
568 | unsigned char serviceType; | |
570 | unsigned char serviceSubType; |
|
569 | unsigned char serviceSubType; | |
571 | unsigned char sourceID; |
|
570 | unsigned char sourceID; | |
572 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; |
|
571 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; | |
573 | } ccsdsTelecommandPacket_t; |
|
572 | } ccsdsTelecommandPacket_t; | |
574 |
|
573 | |||
575 | typedef struct { |
|
574 | typedef struct { | |
576 | unsigned char targetLogicalAddress; |
|
575 | unsigned char targetLogicalAddress; | |
577 | unsigned char protocolIdentifier; |
|
576 | unsigned char protocolIdentifier; | |
578 | unsigned char reserved; |
|
577 | unsigned char reserved; | |
579 | unsigned char userApplication; |
|
578 | unsigned char userApplication; | |
580 | unsigned char packetID[2]; |
|
579 | unsigned char packetID[2]; | |
581 | unsigned char packetSequenceControl[2]; |
|
580 | unsigned char packetSequenceControl[2]; | |
582 | unsigned char packetLength[2]; |
|
581 | unsigned char packetLength[2]; | |
583 | unsigned char spare1_pusVersion_spare2; |
|
582 | unsigned char spare1_pusVersion_spare2; | |
584 | unsigned char serviceType; |
|
583 | unsigned char serviceType; | |
585 | unsigned char serviceSubType; |
|
584 | unsigned char serviceSubType; | |
586 | unsigned char destinationID; |
|
585 | unsigned char destinationID; | |
587 | unsigned char time[6]; |
|
586 | unsigned char time[6]; | |
588 | unsigned char sid; |
|
587 | unsigned char sid; | |
589 |
|
588 | |||
590 | //************** |
|
589 | //************** | |
591 | // HK PARAMETERS |
|
590 | // HK PARAMETERS | |
592 | unsigned char lfr_status_word[2]; |
|
591 | unsigned char lfr_status_word[2]; | |
593 | unsigned char lfr_sw_version[4]; |
|
592 | unsigned char lfr_sw_version[4]; | |
594 | unsigned char lfr_fpga_version[3]; |
|
593 | unsigned char lfr_fpga_version[3]; | |
595 | // ressource statistics |
|
594 | // ressource statistics | |
596 | unsigned char hk_lfr_cpu_load; |
|
595 | unsigned char hk_lfr_cpu_load; | |
597 | unsigned char hk_lfr_cpu_load_max; |
|
596 | unsigned char hk_lfr_cpu_load_max; | |
598 | unsigned char hk_lfr_cpu_load_aver; |
|
597 | unsigned char hk_lfr_cpu_load_aver; | |
599 | unsigned char hk_lfr_q_sd_fifo_size_max; |
|
598 | unsigned char hk_lfr_q_sd_fifo_size_max; | |
600 | unsigned char hk_lfr_q_sd_fifo_size; |
|
599 | unsigned char hk_lfr_q_sd_fifo_size; | |
601 | unsigned char hk_lfr_q_rv_fifo_size_max; |
|
600 | unsigned char hk_lfr_q_rv_fifo_size_max; | |
602 | unsigned char hk_lfr_q_rv_fifo_size; |
|
601 | unsigned char hk_lfr_q_rv_fifo_size; | |
603 | unsigned char hk_lfr_q_p0_fifo_size_max; |
|
602 | unsigned char hk_lfr_q_p0_fifo_size_max; | |
604 | unsigned char hk_lfr_q_p0_fifo_size; |
|
603 | unsigned char hk_lfr_q_p0_fifo_size; | |
605 | unsigned char hk_lfr_q_p1_fifo_size_max; |
|
604 | unsigned char hk_lfr_q_p1_fifo_size_max; | |
606 | unsigned char hk_lfr_q_p1_fifo_size; |
|
605 | unsigned char hk_lfr_q_p1_fifo_size; | |
607 | unsigned char hk_lfr_q_p2_fifo_size_max; |
|
606 | unsigned char hk_lfr_q_p2_fifo_size_max; | |
608 | unsigned char hk_lfr_q_p2_fifo_size; |
|
607 | unsigned char hk_lfr_q_p2_fifo_size; | |
609 | // tc statistics |
|
608 | // tc statistics | |
610 | unsigned char hk_lfr_update_info_tc_cnt[2]; |
|
609 | unsigned char hk_lfr_update_info_tc_cnt[2]; | |
611 | unsigned char hk_lfr_update_time_tc_cnt[2]; |
|
610 | unsigned char hk_lfr_update_time_tc_cnt[2]; | |
612 | unsigned char hk_lfr_exe_tc_cnt[2]; |
|
611 | unsigned char hk_lfr_exe_tc_cnt[2]; | |
613 | unsigned char hk_lfr_rej_tc_cnt[2]; |
|
612 | unsigned char hk_lfr_rej_tc_cnt[2]; | |
614 | unsigned char hk_lfr_last_exe_tc_id[2]; |
|
613 | unsigned char hk_lfr_last_exe_tc_id[2]; | |
615 | unsigned char hk_lfr_last_exe_tc_type[2]; |
|
614 | unsigned char hk_lfr_last_exe_tc_type[2]; | |
616 | unsigned char hk_lfr_last_exe_tc_subtype[2]; |
|
615 | unsigned char hk_lfr_last_exe_tc_subtype[2]; | |
617 | unsigned char hk_lfr_last_exe_tc_time[6]; |
|
616 | unsigned char hk_lfr_last_exe_tc_time[6]; | |
618 | unsigned char hk_lfr_last_rej_tc_id[2]; |
|
617 | unsigned char hk_lfr_last_rej_tc_id[2]; | |
619 | unsigned char hk_lfr_last_rej_tc_type[2]; |
|
618 | unsigned char hk_lfr_last_rej_tc_type[2]; | |
620 | unsigned char hk_lfr_last_rej_tc_subtype[2]; |
|
619 | unsigned char hk_lfr_last_rej_tc_subtype[2]; | |
621 | unsigned char hk_lfr_last_rej_tc_time[6]; |
|
620 | unsigned char hk_lfr_last_rej_tc_time[6]; | |
622 | // anomaly statistics |
|
621 | // anomaly statistics | |
623 | unsigned char hk_lfr_le_cnt[2]; |
|
622 | unsigned char hk_lfr_le_cnt[2]; | |
624 | unsigned char hk_lfr_me_cnt[2]; |
|
623 | unsigned char hk_lfr_me_cnt[2]; | |
625 | unsigned char hk_lfr_he_cnt[2]; |
|
624 | unsigned char hk_lfr_he_cnt[2]; | |
626 | unsigned char hk_lfr_last_er_rid[2]; |
|
625 | unsigned char hk_lfr_last_er_rid[2]; | |
627 | unsigned char hk_lfr_last_er_code; |
|
626 | unsigned char hk_lfr_last_er_code; | |
628 | unsigned char hk_lfr_last_er_time[6]; |
|
627 | unsigned char hk_lfr_last_er_time[6]; | |
629 | // vhdl_blk_status |
|
628 | // vhdl_blk_status | |
630 | unsigned char hk_lfr_vhdl_aa_sm; |
|
629 | unsigned char hk_lfr_vhdl_aa_sm; | |
631 | unsigned char hk_lfr_vhdl_fft_sr; |
|
630 | unsigned char hk_lfr_vhdl_fft_sr; | |
632 | unsigned char hk_lfr_vhdl_cic_hk; |
|
631 | unsigned char hk_lfr_vhdl_cic_hk; | |
633 | unsigned char hk_lfr_vhdl_iir_cal; |
|
632 | unsigned char hk_lfr_vhdl_iir_cal; | |
634 | // spacewire_if_statistics |
|
633 | // spacewire_if_statistics | |
635 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; |
|
634 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; | |
636 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; |
|
635 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; | |
637 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; |
|
636 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; | |
638 | unsigned char hk_lfr_dpu_spw_last_timc; |
|
637 | unsigned char hk_lfr_dpu_spw_last_timc; | |
639 | // ahb error statistics |
|
638 | // ahb error statistics | |
640 | unsigned char hk_lfr_last_fail_addr[4]; |
|
639 | unsigned char hk_lfr_last_fail_addr[4]; | |
641 | // temperatures |
|
640 | // temperatures | |
642 | unsigned char hk_lfr_temp_scm[2]; |
|
641 | unsigned char hk_lfr_temp_scm[2]; | |
643 | unsigned char hk_lfr_temp_pcb[2]; |
|
642 | unsigned char hk_lfr_temp_pcb[2]; | |
644 | unsigned char hk_lfr_temp_fpga[2]; |
|
643 | unsigned char hk_lfr_temp_fpga[2]; | |
645 | // spacecraft potential |
|
644 | // spacecraft potential | |
646 | unsigned char hk_lfr_sc_v_f3[2]; |
|
645 | unsigned char hk_lfr_sc_v_f3[2]; | |
647 | unsigned char hk_lfr_sc_e1_f3[2]; |
|
646 | unsigned char hk_lfr_sc_e1_f3[2]; | |
648 | unsigned char hk_lfr_sc_e2_f3[2]; |
|
647 | unsigned char hk_lfr_sc_e2_f3[2]; | |
649 | // lfr common parameters |
|
648 | // lfr common parameters | |
650 | unsigned char sy_lfr_common_parameters_spare; |
|
649 | unsigned char sy_lfr_common_parameters_spare; | |
651 | unsigned char sy_lfr_common_parameters; |
|
650 | unsigned char sy_lfr_common_parameters; | |
652 | // error counters |
|
651 | // error counters | |
653 | unsigned char hk_lfr_dpu_spw_parity; |
|
652 | unsigned char hk_lfr_dpu_spw_parity; | |
654 | unsigned char hk_lfr_dpu_spw_disconnect; |
|
653 | unsigned char hk_lfr_dpu_spw_disconnect; | |
655 | unsigned char hk_lfr_dpu_spw_escape; |
|
654 | unsigned char hk_lfr_dpu_spw_escape; | |
656 | unsigned char hk_lfr_dpu_spw_credit; |
|
655 | unsigned char hk_lfr_dpu_spw_credit; | |
657 | unsigned char hk_lfr_dpu_spw_write_sync; |
|
656 | unsigned char hk_lfr_dpu_spw_write_sync; | |
658 | unsigned char hk_lfr_dpu_spw_rx_ahb; |
|
657 | unsigned char hk_lfr_dpu_spw_rx_ahb; | |
659 | unsigned char hk_lfr_dpu_spw_tx_ahb; |
|
658 | unsigned char hk_lfr_dpu_spw_tx_ahb; | |
660 | unsigned char hk_lfr_dpu_spw_early_eop; |
|
659 | unsigned char hk_lfr_dpu_spw_early_eop; | |
661 | unsigned char hk_lfr_dpu_spw_invalid_addr; |
|
660 | unsigned char hk_lfr_dpu_spw_invalid_addr; | |
662 | unsigned char hk_lfr_dpu_spw_eep; |
|
661 | unsigned char hk_lfr_dpu_spw_eep; | |
663 | unsigned char hk_lfr_dpu_spw_rx_too_big; |
|
662 | unsigned char hk_lfr_dpu_spw_rx_too_big; | |
664 | // timecode |
|
663 | // timecode | |
665 | unsigned char hk_lfr_timecode_erroneous; |
|
664 | unsigned char hk_lfr_timecode_erroneous; | |
666 | unsigned char hk_lfr_timecode_missing; |
|
665 | unsigned char hk_lfr_timecode_missing; | |
667 | unsigned char hk_lfr_timecode_invalid; |
|
666 | unsigned char hk_lfr_timecode_invalid; | |
668 | // time |
|
667 | // time | |
669 | unsigned char hk_lfr_time_timecode_it; |
|
668 | unsigned char hk_lfr_time_timecode_it; | |
670 | unsigned char hk_lfr_time_not_synchro; |
|
669 | unsigned char hk_lfr_time_not_synchro; | |
671 | unsigned char hk_lfr_time_timecode_ctr; |
|
670 | unsigned char hk_lfr_time_timecode_ctr; | |
672 | // hk_lfr_buffer_dpu_ |
|
671 | // hk_lfr_buffer_dpu_ | |
673 | unsigned char hk_lfr_buffer_dpu_tc_fifo; |
|
672 | unsigned char hk_lfr_buffer_dpu_tc_fifo; | |
674 | unsigned char hk_lfr_buffer_dpu_tm_fifo; |
|
673 | unsigned char hk_lfr_buffer_dpu_tm_fifo; | |
675 | // hk_lfr_ahb_ |
|
674 | // hk_lfr_ahb_ | |
676 | unsigned char hk_lfr_ahb_correctable; |
|
675 | unsigned char hk_lfr_ahb_correctable; | |
677 | unsigned char hk_lfr_ahb_uncorrectable; |
|
676 | unsigned char hk_lfr_ahb_uncorrectable; | |
678 | // reaction wheel frequency |
|
677 | // reaction wheel frequency | |
679 | unsigned char hk_lfr_sc_rw_f_flags; |
|
678 | unsigned char hk_lfr_sc_rw_f_flags; | |
680 | } Packet_TM_LFR_HK_t; |
|
679 | } Packet_TM_LFR_HK_t; | |
681 |
|
680 | |||
682 | typedef struct { |
|
681 | typedef struct { | |
683 | unsigned char targetLogicalAddress; |
|
682 | unsigned char targetLogicalAddress; | |
684 | unsigned char protocolIdentifier; |
|
683 | unsigned char protocolIdentifier; | |
685 | unsigned char reserved; |
|
684 | unsigned char reserved; | |
686 | unsigned char userApplication; |
|
685 | unsigned char userApplication; | |
687 | unsigned char packetID[2]; |
|
686 | unsigned char packetID[2]; | |
688 | unsigned char packetSequenceControl[2]; |
|
687 | unsigned char packetSequenceControl[2]; | |
689 | unsigned char packetLength[2]; |
|
688 | unsigned char packetLength[2]; | |
690 | // DATA FIELD HEADER |
|
689 | // DATA FIELD HEADER | |
691 | unsigned char spare1_pusVersion_spare2; |
|
690 | unsigned char spare1_pusVersion_spare2; | |
692 | unsigned char serviceType; |
|
691 | unsigned char serviceType; | |
693 | unsigned char serviceSubType; |
|
692 | unsigned char serviceSubType; | |
694 | unsigned char destinationID; |
|
693 | unsigned char destinationID; | |
695 | unsigned char time[6]; |
|
694 | unsigned char time[6]; | |
696 | unsigned char sid; |
|
695 | unsigned char sid; | |
697 |
|
696 | |||
698 | //****************** |
|
697 | //****************** | |
699 | // COMMON PARAMETERS |
|
698 | // COMMON PARAMETERS | |
700 | unsigned char sy_lfr_common_parameters_spare; |
|
699 | unsigned char sy_lfr_common_parameters_spare; | |
701 | unsigned char sy_lfr_common_parameters; |
|
700 | unsigned char sy_lfr_common_parameters; | |
702 |
|
701 | |||
703 | //****************** |
|
702 | //****************** | |
704 | // NORMAL PARAMETERS |
|
703 | // NORMAL PARAMETERS | |
705 | unsigned char sy_lfr_n_swf_l[2]; |
|
704 | unsigned char sy_lfr_n_swf_l[2]; | |
706 | unsigned char sy_lfr_n_swf_p[2]; |
|
705 | unsigned char sy_lfr_n_swf_p[2]; | |
707 | unsigned char sy_lfr_n_asm_p[2]; |
|
706 | unsigned char sy_lfr_n_asm_p[2]; | |
708 | unsigned char sy_lfr_n_bp_p0; |
|
707 | unsigned char sy_lfr_n_bp_p0; | |
709 | unsigned char sy_lfr_n_bp_p1; |
|
708 | unsigned char sy_lfr_n_bp_p1; | |
710 | unsigned char sy_lfr_n_cwf_long_f3; |
|
709 | unsigned char sy_lfr_n_cwf_long_f3; | |
711 | unsigned char pa_rpw_spare8_1; |
|
710 | unsigned char pa_rpw_spare8_1; | |
712 |
|
711 | |||
713 | //***************** |
|
712 | //***************** | |
714 | // BURST PARAMETERS |
|
713 | // BURST PARAMETERS | |
715 | unsigned char sy_lfr_b_bp_p0; |
|
714 | unsigned char sy_lfr_b_bp_p0; | |
716 | unsigned char sy_lfr_b_bp_p1; |
|
715 | unsigned char sy_lfr_b_bp_p1; | |
717 |
|
716 | |||
718 | //**************** |
|
717 | //**************** | |
719 | // SBM1 PARAMETERS |
|
718 | // SBM1 PARAMETERS | |
720 | unsigned char sy_lfr_s1_bp_p0; |
|
719 | unsigned char sy_lfr_s1_bp_p0; | |
721 | unsigned char sy_lfr_s1_bp_p1; |
|
720 | unsigned char sy_lfr_s1_bp_p1; | |
722 |
|
721 | |||
723 | //**************** |
|
722 | //**************** | |
724 | // SBM2 PARAMETERS |
|
723 | // SBM2 PARAMETERS | |
725 | unsigned char sy_lfr_s2_bp_p0; |
|
724 | unsigned char sy_lfr_s2_bp_p0; | |
726 | unsigned char sy_lfr_s2_bp_p1; |
|
725 | unsigned char sy_lfr_s2_bp_p1; | |
727 |
|
726 | |||
728 | // mask F0 |
|
727 | // mask F0 | |
729 | union{ |
|
728 | union{ | |
730 | struct{ |
|
729 | struct{ | |
731 | unsigned char f0_word1[4]; |
|
730 | unsigned char f0_word1[4]; | |
732 | unsigned char f0_word2[4]; |
|
731 | unsigned char f0_word2[4]; | |
733 | unsigned char f0_word3[4]; |
|
732 | unsigned char f0_word3[4]; | |
734 | unsigned char f0_word4[4]; |
|
733 | unsigned char f0_word4[4]; | |
735 | // mask F1 |
|
734 | // mask F1 | |
736 | unsigned char f1_word1[4]; |
|
735 | unsigned char f1_word1[4]; | |
737 | unsigned char f1_word2[4]; |
|
736 | unsigned char f1_word2[4]; | |
738 | unsigned char f1_word3[4]; |
|
737 | unsigned char f1_word3[4]; | |
739 | unsigned char f1_word4[4]; |
|
738 | unsigned char f1_word4[4]; | |
740 | // mask F2 |
|
739 | // mask F2 | |
741 | unsigned char f2_word1[4]; |
|
740 | unsigned char f2_word1[4]; | |
742 | unsigned char f2_word2[4]; |
|
741 | unsigned char f2_word2[4]; | |
743 | unsigned char f2_word3[4]; |
|
742 | unsigned char f2_word3[4]; | |
744 | unsigned char f2_word4[4]; |
|
743 | unsigned char f2_word4[4]; | |
745 | } fx; |
|
744 | } fx; | |
746 | unsigned char raw[ 4 * 4 * 3 ]; |
|
745 | unsigned char raw[ 4 * 4 * 3 ]; | |
747 | } sy_lfr_fbins; |
|
746 | } sy_lfr_fbins; | |
748 |
|
747 | |||
749 | // PAS FILTER PARAMETERS |
|
748 | // PAS FILTER PARAMETERS | |
750 | unsigned char pa_rpw_spare8_2; |
|
749 | unsigned char pa_rpw_spare8_2; | |
751 | unsigned char spare_sy_lfr_pas_filter_enabled; |
|
750 | unsigned char spare_sy_lfr_pas_filter_enabled; | |
752 | unsigned char sy_lfr_pas_filter_modulus; |
|
751 | unsigned char sy_lfr_pas_filter_modulus; | |
753 | unsigned char sy_lfr_pas_filter_tbad[4]; |
|
752 | unsigned char sy_lfr_pas_filter_tbad[4]; | |
754 | unsigned char sy_lfr_pas_filter_offset; |
|
753 | unsigned char sy_lfr_pas_filter_offset; | |
755 | unsigned char sy_lfr_pas_filter_shift[4]; |
|
754 | unsigned char sy_lfr_pas_filter_shift[4]; | |
756 | unsigned char sy_lfr_sc_rw_delta_f[4]; |
|
755 | unsigned char sy_lfr_sc_rw_delta_f[4]; | |
757 |
|
756 | |||
758 | // LFR_RW_MASK |
|
757 | // LFR_RW_MASK | |
759 | union{ |
|
758 | union{ | |
760 | struct{ |
|
759 | struct{ | |
761 | unsigned char f0_word1[4]; |
|
760 | unsigned char f0_word1[4]; | |
762 | unsigned char f0_word2[4]; |
|
761 | unsigned char f0_word2[4]; | |
763 | unsigned char f0_word3[4]; |
|
762 | unsigned char f0_word3[4]; | |
764 | unsigned char f0_word4[4]; |
|
763 | unsigned char f0_word4[4]; | |
765 | // mask F1 |
|
764 | // mask F1 | |
766 | unsigned char f1_word1[4]; |
|
765 | unsigned char f1_word1[4]; | |
767 | unsigned char f1_word2[4]; |
|
766 | unsigned char f1_word2[4]; | |
768 | unsigned char f1_word3[4]; |
|
767 | unsigned char f1_word3[4]; | |
769 | unsigned char f1_word4[4]; |
|
768 | unsigned char f1_word4[4]; | |
770 | // mask F2 |
|
769 | // mask F2 | |
771 | unsigned char f2_word1[4]; |
|
770 | unsigned char f2_word1[4]; | |
772 | unsigned char f2_word2[4]; |
|
771 | unsigned char f2_word2[4]; | |
773 | unsigned char f2_word3[4]; |
|
772 | unsigned char f2_word3[4]; | |
774 | unsigned char f2_word4[4]; |
|
773 | unsigned char f2_word4[4]; | |
775 | } fx; |
|
774 | } fx; | |
776 | unsigned char raw[ 4 * 4 * 3 ]; |
|
775 | unsigned char raw[ 4 * 4 * 3 ]; | |
777 | } sy_lfr_rw_mask; |
|
776 | } sy_lfr_rw_mask; | |
778 |
|
777 | |||
779 | // SPARE |
|
778 | // SPARE | |
780 | unsigned char pa_rpw_spare8_3; |
|
779 | unsigned char pa_rpw_spare8_3; | |
781 | } Packet_TM_LFR_PARAMETER_DUMP_t; |
|
780 | } Packet_TM_LFR_PARAMETER_DUMP_t; | |
782 |
|
781 | |||
783 | typedef struct { |
|
782 | typedef struct { | |
784 | unsigned char targetLogicalAddress; |
|
783 | unsigned char targetLogicalAddress; | |
785 | unsigned char protocolIdentifier; |
|
784 | unsigned char protocolIdentifier; | |
786 | unsigned char reserved; |
|
785 | unsigned char reserved; | |
787 | unsigned char userApplication; |
|
786 | unsigned char userApplication; | |
788 | unsigned char packetID[2]; |
|
787 | unsigned char packetID[2]; | |
789 | unsigned char packetSequenceControl[2]; |
|
788 | unsigned char packetSequenceControl[2]; | |
790 | unsigned char packetLength[2]; |
|
789 | unsigned char packetLength[2]; | |
791 | // DATA FIELD HEADER |
|
790 | // DATA FIELD HEADER | |
792 | unsigned char spare1_pusVersion_spare2; |
|
791 | unsigned char spare1_pusVersion_spare2; | |
793 | unsigned char serviceType; |
|
792 | unsigned char serviceType; | |
794 | unsigned char serviceSubType; |
|
793 | unsigned char serviceSubType; | |
795 | unsigned char destinationID; |
|
794 | unsigned char destinationID; | |
796 | unsigned char time[6]; |
|
795 | unsigned char time[6]; | |
797 | unsigned char sid; |
|
796 | unsigned char sid; | |
798 | unsigned char pkt_cnt; |
|
797 | unsigned char pkt_cnt; | |
799 | unsigned char pkt_nr; |
|
798 | unsigned char pkt_nr; | |
800 | unsigned char blk_nr; |
|
799 | unsigned char blk_nr; | |
801 |
|
800 | |||
802 | //****************** |
|
801 | //****************** | |
803 | // SOURCE DATA repeated N times with N in [0 .. PA_LFR_KCOEFF_BLK_NR] |
|
802 | // SOURCE DATA repeated N times with N in [0 .. PA_LFR_KCOEFF_BLK_NR] | |
804 | unsigned char kcoeff_blks[3900]; // one blk is 2 + 4 * 32 = 130 bytes, 30 blks max in one packet (30 * 130 = 3900) |
|
803 | unsigned char kcoeff_blks[3900]; // one blk is 2 + 4 * 32 = 130 bytes, 30 blks max in one packet (30 * 130 = 3900) | |
805 |
|
804 | |||
806 | } Packet_TM_LFR_KCOEFFICIENTS_DUMP_t; |
|
805 | } Packet_TM_LFR_KCOEFFICIENTS_DUMP_t; | |
807 |
|
806 | |||
808 | #endif // CCSDS_TYPES_H_INCLUDED |
|
807 | #endif // CCSDS_TYPES_H_INCLUDED |
General Comments 0
You need to be logged in to leave comments.
Login now