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