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