##// END OF EJS Templates
Many corrections, mainly related to 807 Don_Enumeration
paul -
r56:6bab694410c6 default
parent child
Show More
@@ -1,8 +1,23
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 TXBDCNT 50
5 #define RXBDCNT 10
6 #define TXDATASIZE 4096
7 #define TXHDRSIZE 34
8 #define RXPKTSIZE 200
9
10 #define SPW_RXSIZE 228
11 #define SPW_TXDSIZE 4096
12 #define SPW_TXHSIZE 34
13
14 #define BITS_PID_0 0x07
15 #define BITS_PID_1 0x0f
16 #define BITS_CAT 0x0f
17
4 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
18 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
5 #define CCSDS_TC_TM_PACKET_OFFSET 7
19 #define CCSDS_TC_TM_PACKET_OFFSET 7
20 #define PROTID_RES_APP 3
6 #define CCSDS_TELEMETRY_HEADER_LENGTH (16+4)
21 #define CCSDS_TELEMETRY_HEADER_LENGTH (16+4)
7 #define CCSDS_TM_PKT_MAX_SIZE 4412
22 #define CCSDS_TM_PKT_MAX_SIZE 4412
8 #define CCSDS_TELECOMMAND_HEADER_LENGTH (10+4)
23 #define CCSDS_TELECOMMAND_HEADER_LENGTH (10+4)
@@ -26,6 +41,7
26 #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
41 #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
27 #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6
42 #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6
28 #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6
43 #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6
44
29 // PACKET CAT
45 // PACKET CAT
30 #define TM_PACKET_CAT_TC_EXE 1
46 #define TM_PACKET_CAT_TC_EXE 1
31 #define TM_PACKET_CAT_HK 4
47 #define TM_PACKET_CAT_HK 4
@@ -37,7 +53,11
37 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
53 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
38 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
54 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
39 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
55 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
40 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
56 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
57 #define TM_PACKET_SEQ_SHIFT 8
58 #define SEQ_CNT_MAX 16383
59 #define SEQ_CNT_NB_DEST_ID 12
60 #define SEQ_CNT_MASK 0x3fff // [0011 1111 1111 1111]
41
61
42 // DESTINATION ID
62 // DESTINATION ID
43 #define TM_DESTINATION_ID_GROUND 0
63 #define TM_DESTINATION_ID_GROUND 0
@@ -194,9 +214,6 enum apid_destid{
194 AOCS,
214 AOCS,
195 RPW_INTERNAL
215 RPW_INTERNAL
196 };
216 };
197 // SEQUENCE COUNTERS
198 #define SEQ_CNT_MAX 16383
199 #define SEQ_CNT_NB_DEST_ID 12
200
217
201 // TM SID
218 // TM SID
202 #define SID_HK 1
219 #define SID_HK 1
@@ -278,7 +295,8 enum apid_destid{
278 #define TM_LEN_SCI_CWF_336 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 336 * 12 + 28
295 #define TM_LEN_SCI_CWF_336 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 336 * 12 + 28
279 #define TM_LEN_SCI_CWF_672 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 672 * 6 + 28
296 #define TM_LEN_SCI_CWF_672 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 672 * 6 + 28
280 //
297 //
281 #define DEFAULT_PKTCNT 0x07
298 #define PKTCNT_SWF 0x07
299 #define PKTCNT_ASM 3
282 #define BLK_NR_304 0x0130
300 #define BLK_NR_304 0x0130
283 #define BLK_NR_224 0x00e0
301 #define BLK_NR_224 0x00e0
284 #define BLK_NR_CWF 0x0150 // 336
302 #define BLK_NR_CWF 0x0150 // 336
@@ -293,24 +311,48 enum TM_TYPE{
293 TM_LFR_PAR_DUMP
311 TM_LFR_PAR_DUMP
294 };
312 };
295
313
314 #define BYTES_PER_PACKETID 2
315 #define BYTES_PER_SEQ_CTRL 2
316 #define BYTES_PER_PKT_LEN 2
317 #define BYTES_PER_TIME 6
318 #define BYTES_PER_ERR_CODE 2
319 #define BYTES_PER_STA_WRD 2
320 #define BYTES_PER_CRC 2
321 #define BYTES_PER_BLKNR 2
322 #define BYTES_PER_SW_VER 4
323 #define BYTES_PER_VHD_VER 3
324 #define COUNTER_2_BYTES 2
325 #define BYTES_PER_TYPE 2
326 #define BYTES_PER_SUBTYPE 2
327 #define BYTES_PER_ADDR 4
328 #define BYTES_PER_TEMP 2
329 #define BYTES_PER_V 2
330 #define BYTES_PER_WORD 4
331 #define BYTES_PER_MASK 16
332 #define BYTES_PER_MASKS_SET 48 // 4 * 4 * 3
333
334 #define COUNTER_2_BYTES 2
335 #define PARAM_2_BYTES 2
336 #define PARAM_4_BYTES 4
337
296 typedef struct {
338 typedef struct {
297 unsigned char targetLogicalAddress;
339 unsigned char targetLogicalAddress;
298 unsigned char protocolIdentifier;
340 unsigned char protocolIdentifier;
299 unsigned char reserved;
341 unsigned char reserved;
300 unsigned char userApplication;
342 unsigned char userApplication;
301 // PACKET HEADER
343 // PACKET HEADER
302 unsigned char packetID[2];
344 unsigned char packetID[BYTES_PER_PACKETID];
303 unsigned char packetSequenceControl[2];
345 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
304 unsigned char packetLength[2];
346 unsigned char packetLength[BYTES_PER_PKT_LEN];
305 // DATA FIELD HEADER
347 // DATA FIELD HEADER
306 unsigned char spare1_pusVersion_spare2;
348 unsigned char spare1_pusVersion_spare2;
307 unsigned char serviceType;
349 unsigned char serviceType;
308 unsigned char serviceSubType;
350 unsigned char serviceSubType;
309 unsigned char destinationID;
351 unsigned char destinationID;
310 unsigned char time[6];
352 unsigned char time[BYTES_PER_TIME];
311 //
353 //
312 unsigned char telecommand_pkt_id[2];
354 unsigned char telecommand_pkt_id[BYTES_PER_PACKETID];
313 unsigned char pkt_seq_control[2];
355 unsigned char pkt_seq_control[BYTES_PER_SEQ_CTRL];
314 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
356 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
315
357
316 typedef struct {
358 typedef struct {
@@ -319,19 +361,19 typedef struct {
319 unsigned char reserved;
361 unsigned char reserved;
320 unsigned char userApplication;
362 unsigned char userApplication;
321 // PACKET HEADER
363 // PACKET HEADER
322 unsigned char packetID[2];
364 unsigned char packetID[BYTES_PER_PACKETID];
323 unsigned char packetSequenceControl[2];
365 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
324 unsigned char packetLength[2];
366 unsigned char packetLength[BYTES_PER_PKT_LEN];
325 // DATA FIELD HEADER
367 // DATA FIELD HEADER
326 unsigned char spare1_pusVersion_spare2;
368 unsigned char spare1_pusVersion_spare2;
327 unsigned char serviceType;
369 unsigned char serviceType;
328 unsigned char serviceSubType;
370 unsigned char serviceSubType;
329 unsigned char destinationID;
371 unsigned char destinationID;
330 unsigned char time[6];
372 unsigned char time[BYTES_PER_TIME];
331 //
373 //
332 unsigned char telecommand_pkt_id[2];
374 unsigned char telecommand_pkt_id[BYTES_PER_PACKETID];
333 unsigned char pkt_seq_control[2];
375 unsigned char pkt_seq_control[BYTES_PER_SEQ_CTRL];
334 unsigned char tc_failure_code[2];
376 unsigned char tc_failure_code[BYTES_PER_ERR_CODE];
335 unsigned char tc_service;
377 unsigned char tc_service;
336 unsigned char tc_subtype;
378 unsigned char tc_subtype;
337 unsigned char byte_position;
379 unsigned char byte_position;
@@ -344,19 +386,19 typedef struct {
344 unsigned char reserved;
386 unsigned char reserved;
345 unsigned char userApplication;
387 unsigned char userApplication;
346 // PACKET HEADER
388 // PACKET HEADER
347 unsigned char packetID[2];
389 unsigned char packetID[BYTES_PER_PACKETID];
348 unsigned char packetSequenceControl[2];
390 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
349 unsigned char packetLength[2];
391 unsigned char packetLength[BYTES_PER_PKT_LEN];
350 // DATA FIELD HEADER
392 // DATA FIELD HEADER
351 unsigned char spare1_pusVersion_spare2;
393 unsigned char spare1_pusVersion_spare2;
352 unsigned char serviceType;
394 unsigned char serviceType;
353 unsigned char serviceSubType;
395 unsigned char serviceSubType;
354 unsigned char destinationID;
396 unsigned char destinationID;
355 unsigned char time[6];
397 unsigned char time[BYTES_PER_TIME];
356 //
398 //
357 unsigned char telecommand_pkt_id[2];
399 unsigned char telecommand_pkt_id[BYTES_PER_PACKETID];
358 unsigned char pkt_seq_control[2];
400 unsigned char pkt_seq_control[BYTES_PER_SEQ_CTRL];
359 unsigned char tc_failure_code[2];
401 unsigned char tc_failure_code[BYTES_PER_ERR_CODE];
360 unsigned char tc_service;
402 unsigned char tc_service;
361 unsigned char tc_subtype;
403 unsigned char tc_subtype;
362 unsigned char lfr_status_word[2];
404 unsigned char lfr_status_word[2];
@@ -368,19 +410,19 typedef struct {
368 unsigned char reserved;
410 unsigned char reserved;
369 unsigned char userApplication;
411 unsigned char userApplication;
370 // PACKET HEADER
412 // PACKET HEADER
371 unsigned char packetID[2];
413 unsigned char packetID[BYTES_PER_PACKETID];
372 unsigned char packetSequenceControl[2];
414 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
373 unsigned char packetLength[2];
415 unsigned char packetLength[BYTES_PER_PKT_LEN];
374 // DATA FIELD HEADER
416 // DATA FIELD HEADER
375 unsigned char spare1_pusVersion_spare2;
417 unsigned char spare1_pusVersion_spare2;
376 unsigned char serviceType;
418 unsigned char serviceType;
377 unsigned char serviceSubType;
419 unsigned char serviceSubType;
378 unsigned char destinationID;
420 unsigned char destinationID;
379 unsigned char time[6];
421 unsigned char time[BYTES_PER_TIME];
380 //
422 //
381 unsigned char telecommand_pkt_id[2];
423 unsigned char telecommand_pkt_id[BYTES_PER_PACKETID];
382 unsigned char pkt_seq_control[2];
424 unsigned char pkt_seq_control[BYTES_PER_SEQ_CTRL];
383 unsigned char tc_failure_code[2];
425 unsigned char tc_failure_code[BYTES_PER_ERR_CODE];
384 unsigned char tc_service;
426 unsigned char tc_service;
385 unsigned char tc_subtype;
427 unsigned char tc_subtype;
386 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
428 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
@@ -391,19 +433,19 typedef struct {
391 unsigned char reserved;
433 unsigned char reserved;
392 unsigned char userApplication;
434 unsigned char userApplication;
393 // PACKET HEADER
435 // PACKET HEADER
394 unsigned char packetID[2];
436 unsigned char packetID[BYTES_PER_PACKETID];
395 unsigned char packetSequenceControl[2];
437 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
396 unsigned char packetLength[2];
438 unsigned char packetLength[BYTES_PER_PKT_LEN];
397 // DATA FIELD HEADER
439 // DATA FIELD HEADER
398 unsigned char spare1_pusVersion_spare2;
440 unsigned char spare1_pusVersion_spare2;
399 unsigned char serviceType;
441 unsigned char serviceType;
400 unsigned char serviceSubType;
442 unsigned char serviceSubType;
401 unsigned char destinationID;
443 unsigned char destinationID;
402 unsigned char time[6];
444 unsigned char time[BYTES_PER_TIME];
403 //
445 //
404 unsigned char telecommand_pkt_id[2];
446 unsigned char telecommand_pkt_id[BYTES_PER_PACKETID];
405 unsigned char pkt_seq_control[2];
447 unsigned char pkt_seq_control[BYTES_PER_SEQ_CTRL];
406 unsigned char tc_failure_code[2];
448 unsigned char tc_failure_code[BYTES_PER_ERR_CODE];
407 unsigned char tc_service;
449 unsigned char tc_service;
408 unsigned char tc_subtype;
450 unsigned char tc_subtype;
409 } Packet_TM_LFR_TC_EXE_ERROR_t;
451 } Packet_TM_LFR_TC_EXE_ERROR_t;
@@ -414,25 +456,25 typedef struct {
414 unsigned char reserved;
456 unsigned char reserved;
415 unsigned char userApplication;
457 unsigned char userApplication;
416 // PACKET HEADER
458 // PACKET HEADER
417 unsigned char packetID[2];
459 unsigned char packetID[BYTES_PER_PACKETID];
418 unsigned char packetSequenceControl[2];
460 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
419 unsigned char packetLength[2];
461 unsigned char packetLength[BYTES_PER_PKT_LEN];
420 // DATA FIELD HEADER
462 // DATA FIELD HEADER
421 unsigned char spare1_pusVersion_spare2;
463 unsigned char spare1_pusVersion_spare2;
422 unsigned char serviceType;
464 unsigned char serviceType;
423 unsigned char serviceSubType;
465 unsigned char serviceSubType;
424 unsigned char destinationID;
466 unsigned char destinationID;
425 unsigned char time[6];
467 unsigned char time[BYTES_PER_TIME];
426 //
468 //
427 unsigned char telecommand_pkt_id[2];
469 unsigned char telecommand_pkt_id[BYTES_PER_PACKETID];
428 unsigned char pkt_seq_control[2];
470 unsigned char pkt_seq_control[BYTES_PER_SEQ_CTRL];
429 unsigned char tc_failure_code[2];
471 unsigned char tc_failure_code[BYTES_PER_ERR_CODE];
430 unsigned char tc_service;
472 unsigned char tc_service;
431 unsigned char tc_subtype;
473 unsigned char tc_subtype;
432 unsigned char pkt_len_rcv_value[2];
474 unsigned char pkt_len_rcv_value[BYTES_PER_PKT_LEN];
433 unsigned char pkt_datafieldsize_cnt[2];
475 unsigned char pkt_datafieldsize_cnt[BYTES_PER_PKT_LEN];
434 unsigned char rcv_crc[2];
476 unsigned char rcv_crc[BYTES_PER_CRC];
435 unsigned char computed_crc[2];
477 unsigned char computed_crc[BYTES_PER_CRC];
436 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
478 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
437
479
438 typedef struct {
480 typedef struct {
@@ -440,15 +482,15 typedef struct {
440 unsigned char protocolIdentifier;
482 unsigned char protocolIdentifier;
441 unsigned char reserved;
483 unsigned char reserved;
442 unsigned char userApplication;
484 unsigned char userApplication;
443 unsigned char packetID[2];
485 unsigned char packetID[BYTES_PER_PACKETID];
444 unsigned char packetSequenceControl[2];
486 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
445 unsigned char packetLength[2];
487 unsigned char packetLength[BYTES_PER_PKT_LEN];
446 // DATA FIELD HEADER
488 // DATA FIELD HEADER
447 unsigned char spare1_pusVersion_spare2;
489 unsigned char spare1_pusVersion_spare2;
448 unsigned char serviceType;
490 unsigned char serviceType;
449 unsigned char serviceSubType;
491 unsigned char serviceSubType;
450 unsigned char destinationID;
492 unsigned char destinationID;
451 unsigned char time[6];
493 unsigned char time[BYTES_PER_TIME];
452 // AUXILIARY HEADER
494 // AUXILIARY HEADER
453 unsigned char sid;
495 unsigned char sid;
454 unsigned char pa_bia_status_info;
496 unsigned char pa_bia_status_info;
@@ -456,31 +498,36 typedef struct {
456 unsigned char sy_lfr_common_parameters;
498 unsigned char sy_lfr_common_parameters;
457 unsigned char pktCnt;
499 unsigned char pktCnt;
458 unsigned char pktNr;
500 unsigned char pktNr;
459 unsigned char acquisitionTime[6];
501 unsigned char acquisitionTime[BYTES_PER_TIME];
460 unsigned char blkNr[2];
502 unsigned char blkNr[BYTES_PER_BLKNR];
461 } Header_TM_LFR_SCIENCE_SWF_t;
503 } Header_TM_LFR_SCIENCE_SWF_t;
462
504
505 //*******************
506 // TM_LFR_SCIENCE_CWF
507
508 #define CWF_BLK_SIZE 6
509
463 typedef struct {
510 typedef struct {
464 unsigned char targetLogicalAddress;
511 unsigned char targetLogicalAddress;
465 unsigned char protocolIdentifier;
512 unsigned char protocolIdentifier;
466 unsigned char reserved;
513 unsigned char reserved;
467 unsigned char userApplication;
514 unsigned char userApplication;
468 unsigned char packetID[2];
515 unsigned char packetID[BYTES_PER_PACKETID];
469 unsigned char packetSequenceControl[2];
516 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
470 unsigned char packetLength[2];
517 unsigned char packetLength[BYTES_PER_PKT_LEN];
471 // DATA FIELD HEADER
518 // DATA FIELD HEADER
472 unsigned char spare1_pusVersion_spare2;
519 unsigned char spare1_pusVersion_spare2;
473 unsigned char serviceType;
520 unsigned char serviceType;
474 unsigned char serviceSubType;
521 unsigned char serviceSubType;
475 unsigned char destinationID;
522 unsigned char destinationID;
476 unsigned char time[6];
523 unsigned char time[BYTES_PER_TIME];
477 // AUXILIARY DATA HEADER
524 // AUXILIARY DATA HEADER
478 unsigned char sid;
525 unsigned char sid;
479 unsigned char pa_bia_status_info;
526 unsigned char pa_bia_status_info;
480 unsigned char sy_lfr_common_parameters_spare;
527 unsigned char sy_lfr_common_parameters_spare;
481 unsigned char sy_lfr_common_parameters;
528 unsigned char sy_lfr_common_parameters;
482 unsigned char acquisitionTime[6];
529 unsigned char acquisitionTime[BYTES_PER_TIME];
483 unsigned char blkNr[2];
530 unsigned char blkNr[BYTES_PER_BLKNR];
484 } Header_TM_LFR_SCIENCE_CWF_t;
531 } Header_TM_LFR_SCIENCE_CWF_t;
485
532
486 typedef struct {
533 typedef struct {
@@ -488,15 +535,15 typedef struct {
488 unsigned char protocolIdentifier;
535 unsigned char protocolIdentifier;
489 unsigned char reserved;
536 unsigned char reserved;
490 unsigned char userApplication;
537 unsigned char userApplication;
491 unsigned char packetID[2];
538 unsigned char packetID[BYTES_PER_PACKETID];
492 unsigned char packetSequenceControl[2];
539 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
493 unsigned char packetLength[2];
540 unsigned char packetLength[BYTES_PER_PKT_LEN];
494 // DATA FIELD HEADER
541 // DATA FIELD HEADER
495 unsigned char spare1_pusVersion_spare2;
542 unsigned char spare1_pusVersion_spare2;
496 unsigned char serviceType;
543 unsigned char serviceType;
497 unsigned char serviceSubType;
544 unsigned char serviceSubType;
498 unsigned char destinationID;
545 unsigned char destinationID;
499 unsigned char time[6];
546 unsigned char time[BYTES_PER_TIME];
500 // AUXILIARY HEADER
547 // AUXILIARY HEADER
501 unsigned char sid;
548 unsigned char sid;
502 unsigned char pa_bia_status_info;
549 unsigned char pa_bia_status_info;
@@ -504,8 +551,8 typedef struct {
504 unsigned char sy_lfr_common_parameters;
551 unsigned char sy_lfr_common_parameters;
505 unsigned char pa_lfr_pkt_cnt_asm;
552 unsigned char pa_lfr_pkt_cnt_asm;
506 unsigned char pa_lfr_pkt_nr_asm;
553 unsigned char pa_lfr_pkt_nr_asm;
507 unsigned char acquisitionTime[6];
554 unsigned char acquisitionTime[BYTES_PER_TIME];
508 unsigned char pa_lfr_asm_blk_nr[2];
555 unsigned char pa_lfr_asm_blk_nr[BYTES_PER_BLKNR];
509 } Header_TM_LFR_SCIENCE_ASM_t;
556 } Header_TM_LFR_SCIENCE_ASM_t;
510
557
511 typedef struct {
558 typedef struct {
@@ -513,23 +560,23 typedef struct {
513 unsigned char protocolIdentifier;
560 unsigned char protocolIdentifier;
514 unsigned char reserved;
561 unsigned char reserved;
515 unsigned char userApplication;
562 unsigned char userApplication;
516 unsigned char packetID[2];
563 unsigned char packetID[BYTES_PER_PACKETID];
517 unsigned char packetSequenceControl[2];
564 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
518 unsigned char packetLength[2];
565 unsigned char packetLength[BYTES_PER_PKT_LEN];
519 // DATA FIELD HEADER
566 // DATA FIELD HEADER
520 unsigned char spare1_pusVersion_spare2;
567 unsigned char spare1_pusVersion_spare2;
521 unsigned char serviceType;
568 unsigned char serviceType;
522 unsigned char serviceSubType;
569 unsigned char serviceSubType;
523 unsigned char destinationID;
570 unsigned char destinationID;
524 unsigned char time[6];
571 unsigned char time[BYTES_PER_TIME];
525 // AUXILIARY HEADER
572 // AUXILIARY HEADER
526 unsigned char sid;
573 unsigned char sid;
527 unsigned char pa_bia_status_info;
574 unsigned char pa_bia_status_info;
528 unsigned char sy_lfr_common_parameters_spare;
575 unsigned char sy_lfr_common_parameters_spare;
529 unsigned char sy_lfr_common_parameters;
576 unsigned char sy_lfr_common_parameters;
530 unsigned char acquisitionTime[6];
577 unsigned char acquisitionTime[BYTES_PER_TIME];
531 unsigned char source_data_spare;
578 unsigned char source_data_spare;
532 unsigned char pa_lfr_bp_blk_nr[2];
579 unsigned char pa_lfr_bp_blk_nr[BYTES_PER_BLKNR];
533 } Header_TM_LFR_SCIENCE_BP_with_spare_t;
580 } Header_TM_LFR_SCIENCE_BP_with_spare_t;
534
581
535 typedef struct {
582 typedef struct {
@@ -537,22 +584,22 typedef struct {
537 unsigned char protocolIdentifier;
584 unsigned char protocolIdentifier;
538 unsigned char reserved;
585 unsigned char reserved;
539 unsigned char userApplication;
586 unsigned char userApplication;
540 unsigned char packetID[2];
587 unsigned char packetID[BYTES_PER_PACKETID];
541 unsigned char packetSequenceControl[2];
588 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
542 unsigned char packetLength[2];
589 unsigned char packetLength[BYTES_PER_PKT_LEN];
543 // DATA FIELD HEADER
590 // DATA FIELD HEADER
544 unsigned char spare1_pusVersion_spare2;
591 unsigned char spare1_pusVersion_spare2;
545 unsigned char serviceType;
592 unsigned char serviceType;
546 unsigned char serviceSubType;
593 unsigned char serviceSubType;
547 unsigned char destinationID;
594 unsigned char destinationID;
548 unsigned char time[6];
595 unsigned char time[BYTES_PER_TIME];
549 // AUXILIARY HEADER
596 // AUXILIARY HEADER
550 unsigned char sid;
597 unsigned char sid;
551 unsigned char pa_bia_status_info;
598 unsigned char pa_bia_status_info;
552 unsigned char sy_lfr_common_parameters_spare;
599 unsigned char sy_lfr_common_parameters_spare;
553 unsigned char sy_lfr_common_parameters;
600 unsigned char sy_lfr_common_parameters;
554 unsigned char acquisitionTime[6];
601 unsigned char acquisitionTime[BYTES_PER_TIME];
555 unsigned char pa_lfr_bp_blk_nr[2];
602 unsigned char pa_lfr_bp_blk_nr[BYTES_PER_BLKNR];
556 } Header_TM_LFR_SCIENCE_BP_t;
603 } Header_TM_LFR_SCIENCE_BP_t;
557
604
558 typedef struct {
605 typedef struct {
@@ -560,9 +607,9 typedef struct {
560 unsigned char protocolIdentifier;
607 unsigned char protocolIdentifier;
561 unsigned char reserved;
608 unsigned char reserved;
562 unsigned char userApplication;
609 unsigned char userApplication;
563 unsigned char packetID[2];
610 unsigned char packetID[BYTES_PER_PACKETID];
564 unsigned char packetSequenceControl[2];
611 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
565 unsigned char packetLength[2];
612 unsigned char packetLength[BYTES_PER_PKT_LEN];
566 // DATA FIELD HEADER
613 // DATA FIELD HEADER
567 unsigned char headerFlag_pusVersion_Ack;
614 unsigned char headerFlag_pusVersion_Ack;
568 unsigned char serviceType;
615 unsigned char serviceType;
@@ -571,26 +618,47 typedef struct {
571 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
618 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
572 } ccsdsTelecommandPacket_t;
619 } ccsdsTelecommandPacket_t;
573
620
621 //**********
622 //**********
623 // TM_LFR_HK
624
625 #define STATUS_WORD_SC_POTENTIAL_FLAG_BIT 0x40 // [0100 0000]
626 #define STATUS_WORD_SC_POTENTIAL_FLAG_MASK 0xbf // [1011 1111]
627 #define STATUS_WORD_PAS_FILTER_ENABLED_BIT 0x20 // [0010 0000]
628 #define STATUS_WORD_PAS_FILTER_ENABLED_MASK 0xdf // [1101 1111]
629 #define STATUS_WORD_WATCHDOG_BIT 0x10 // [0001 0000]
630 #define STATUS_WORD_WATCHDOG_MASK 0xef // [1110 1111]
631 #define STATUS_WORD_CALIB_BIT 0x08 // [0000 1000]
632 #define STATUS_WORD_CALIB_MASK 0xf7 // [1111 0111]
633 #define STATUS_WORD_RESET_CAUSE_BITS 0x07 // [0000 0111]
634 #define STATUS_WORD_RESET_CAUSE_MASK 0xf8 // [1111 1000]
635 #define STATUS_WORD_LINK_STATE_BITS 0x03 // [0000 0111]
636 #define STATUS_WORD_LINK_STATE_MASK 0xf8 // [1111 1000]
637 #define STATUS_WORD_LFR_MODE_SHIFT 4
638 #define STATUS_WORD_LFR_MODE_BITS 0xf0 // [1111 0000]
639 #define STATUS_WORD_LFR_MODE_MASK 0x0f // [0000 1111]
640 #define STATUS_WORD_0_DEFAULT 0x0d // [0000 1101]
641
574 typedef struct {
642 typedef struct {
575 unsigned char targetLogicalAddress;
643 unsigned char targetLogicalAddress;
576 unsigned char protocolIdentifier;
644 unsigned char protocolIdentifier;
577 unsigned char reserved;
645 unsigned char reserved;
578 unsigned char userApplication;
646 unsigned char userApplication;
579 unsigned char packetID[2];
647 unsigned char packetID[BYTES_PER_PACKETID];
580 unsigned char packetSequenceControl[2];
648 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
581 unsigned char packetLength[2];
649 unsigned char packetLength[BYTES_PER_PKT_LEN];
582 unsigned char spare1_pusVersion_spare2;
650 unsigned char spare1_pusVersion_spare2;
583 unsigned char serviceType;
651 unsigned char serviceType;
584 unsigned char serviceSubType;
652 unsigned char serviceSubType;
585 unsigned char destinationID;
653 unsigned char destinationID;
586 unsigned char time[6];
654 unsigned char time[BYTES_PER_TIME];
587 unsigned char sid;
655 unsigned char sid;
588
656
589 //**************
657 //**************
590 // HK PARAMETERS
658 // HK PARAMETERS
591 unsigned char lfr_status_word[2];
659 unsigned char lfr_status_word[BYTES_PER_STA_WRD];
592 unsigned char lfr_sw_version[4];
660 unsigned char lfr_sw_version[BYTES_PER_SW_VER];
593 unsigned char lfr_fpga_version[3];
661 unsigned char lfr_fpga_version[BYTES_PER_VHD_VER];
594 // ressource statistics
662 // ressource statistics
595 unsigned char hk_lfr_cpu_load;
663 unsigned char hk_lfr_cpu_load;
596 unsigned char hk_lfr_cpu_load_max;
664 unsigned char hk_lfr_cpu_load_max;
@@ -606,45 +674,45 typedef struct {
606 unsigned char hk_lfr_q_p2_fifo_size_max;
674 unsigned char hk_lfr_q_p2_fifo_size_max;
607 unsigned char hk_lfr_q_p2_fifo_size;
675 unsigned char hk_lfr_q_p2_fifo_size;
608 // tc statistics
676 // tc statistics
609 unsigned char hk_lfr_update_info_tc_cnt[2];
677 unsigned char hk_lfr_update_info_tc_cnt[COUNTER_2_BYTES];
610 unsigned char hk_lfr_update_time_tc_cnt[2];
678 unsigned char hk_lfr_update_time_tc_cnt[COUNTER_2_BYTES];
611 unsigned char hk_lfr_exe_tc_cnt[2];
679 unsigned char hk_lfr_exe_tc_cnt[COUNTER_2_BYTES];
612 unsigned char hk_lfr_rej_tc_cnt[2];
680 unsigned char hk_lfr_rej_tc_cnt[COUNTER_2_BYTES];
613 unsigned char hk_lfr_last_exe_tc_id[2];
681 unsigned char hk_lfr_last_exe_tc_id[BYTES_PER_PACKETID];
614 unsigned char hk_lfr_last_exe_tc_type[2];
682 unsigned char hk_lfr_last_exe_tc_type[BYTES_PER_TYPE];
615 unsigned char hk_lfr_last_exe_tc_subtype[2];
683 unsigned char hk_lfr_last_exe_tc_subtype[BYTES_PER_SUBTYPE];
616 unsigned char hk_lfr_last_exe_tc_time[6];
684 unsigned char hk_lfr_last_exe_tc_time[BYTES_PER_TIME];
617 unsigned char hk_lfr_last_rej_tc_id[2];
685 unsigned char hk_lfr_last_rej_tc_id[BYTES_PER_PACKETID];
618 unsigned char hk_lfr_last_rej_tc_type[2];
686 unsigned char hk_lfr_last_rej_tc_type[BYTES_PER_TYPE];
619 unsigned char hk_lfr_last_rej_tc_subtype[2];
687 unsigned char hk_lfr_last_rej_tc_subtype[BYTES_PER_SUBTYPE];
620 unsigned char hk_lfr_last_rej_tc_time[6];
688 unsigned char hk_lfr_last_rej_tc_time[BYTES_PER_TIME];
621 // anomaly statistics
689 // anomaly statistics
622 unsigned char hk_lfr_le_cnt[2];
690 unsigned char hk_lfr_le_cnt[COUNTER_2_BYTES];
623 unsigned char hk_lfr_me_cnt[2];
691 unsigned char hk_lfr_me_cnt[COUNTER_2_BYTES];
624 unsigned char hk_lfr_he_cnt[2];
692 unsigned char hk_lfr_he_cnt[COUNTER_2_BYTES];
625 unsigned char hk_lfr_last_er_rid[2];
693 unsigned char hk_lfr_last_er_rid[COUNTER_2_BYTES];
626 unsigned char hk_lfr_last_er_code;
694 unsigned char hk_lfr_last_er_code;
627 unsigned char hk_lfr_last_er_time[6];
695 unsigned char hk_lfr_last_er_time[BYTES_PER_TIME];
628 // vhdl_blk_status
696 // vhdl_blk_status
629 unsigned char hk_lfr_vhdl_aa_sm;
697 unsigned char hk_lfr_vhdl_aa_sm;
630 unsigned char hk_lfr_vhdl_fft_sr;
698 unsigned char hk_lfr_vhdl_fft_sr;
631 unsigned char hk_lfr_vhdl_cic_hk;
699 unsigned char hk_lfr_vhdl_cic_hk;
632 unsigned char hk_lfr_vhdl_iir_cal;
700 unsigned char hk_lfr_vhdl_iir_cal;
633 // spacewire_if_statistics
701 // spacewire_if_statistics
634 unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2];
702 unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[COUNTER_2_BYTES];
635 unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2];
703 unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[COUNTER_2_BYTES];
636 unsigned char hk_lfr_dpu_spw_tick_out_cnt;
704 unsigned char hk_lfr_dpu_spw_tick_out_cnt;
637 unsigned char hk_lfr_dpu_spw_last_timc;
705 unsigned char hk_lfr_dpu_spw_last_timc;
638 // ahb error statistics
706 // ahb error statistics
639 unsigned char hk_lfr_last_fail_addr[4];
707 unsigned char hk_lfr_last_fail_addr[BYTES_PER_ADDR];
640 // temperatures
708 // temperatures
641 unsigned char hk_lfr_temp_scm[2];
709 unsigned char hk_lfr_temp_scm[BYTES_PER_TEMP];
642 unsigned char hk_lfr_temp_pcb[2];
710 unsigned char hk_lfr_temp_pcb[BYTES_PER_TEMP];
643 unsigned char hk_lfr_temp_fpga[2];
711 unsigned char hk_lfr_temp_fpga[BYTES_PER_TEMP];
644 // spacecraft potential
712 // spacecraft potential
645 unsigned char hk_lfr_sc_v_f3[2];
713 unsigned char hk_lfr_sc_v_f3[BYTES_PER_V];
646 unsigned char hk_lfr_sc_e1_f3[2];
714 unsigned char hk_lfr_sc_e1_f3[BYTES_PER_V];
647 unsigned char hk_lfr_sc_e2_f3[2];
715 unsigned char hk_lfr_sc_e2_f3[BYTES_PER_V];
648 // lfr common parameters
716 // lfr common parameters
649 unsigned char sy_lfr_common_parameters_spare;
717 unsigned char sy_lfr_common_parameters_spare;
650 unsigned char sy_lfr_common_parameters;
718 unsigned char sy_lfr_common_parameters;
@@ -678,20 +746,27 typedef struct {
678 unsigned char hk_lfr_sc_rw_f_flags;
746 unsigned char hk_lfr_sc_rw_f_flags;
679 } Packet_TM_LFR_HK_t;
747 } Packet_TM_LFR_HK_t;
680
748
749 //***************
750 //***************
751 // PARAMETER_DUMP
752
753 #define BIT_PAS_FILTER_ENABLED 0x01
754 #define BIT_CWF_LONG_F3 0x01
755
681 typedef struct {
756 typedef struct {
682 unsigned char targetLogicalAddress;
757 unsigned char targetLogicalAddress;
683 unsigned char protocolIdentifier;
758 unsigned char protocolIdentifier;
684 unsigned char reserved;
759 unsigned char reserved;
685 unsigned char userApplication;
760 unsigned char userApplication;
686 unsigned char packetID[2];
761 unsigned char packetID[BYTES_PER_PACKETID];
687 unsigned char packetSequenceControl[2];
762 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
688 unsigned char packetLength[2];
763 unsigned char packetLength[BYTES_PER_PKT_LEN];
689 // DATA FIELD HEADER
764 // DATA FIELD HEADER
690 unsigned char spare1_pusVersion_spare2;
765 unsigned char spare1_pusVersion_spare2;
691 unsigned char serviceType;
766 unsigned char serviceType;
692 unsigned char serviceSubType;
767 unsigned char serviceSubType;
693 unsigned char destinationID;
768 unsigned char destinationID;
694 unsigned char time[6];
769 unsigned char time[BYTES_PER_TIME];
695 unsigned char sid;
770 unsigned char sid;
696
771
697 //******************
772 //******************
@@ -701,9 +776,9 typedef struct {
701
776
702 //******************
777 //******************
703 // NORMAL PARAMETERS
778 // NORMAL PARAMETERS
704 unsigned char sy_lfr_n_swf_l[2];
779 unsigned char sy_lfr_n_swf_l[PARAM_2_BYTES];
705 unsigned char sy_lfr_n_swf_p[2];
780 unsigned char sy_lfr_n_swf_p[PARAM_2_BYTES];
706 unsigned char sy_lfr_n_asm_p[2];
781 unsigned char sy_lfr_n_asm_p[PARAM_2_BYTES];
707 unsigned char sy_lfr_n_bp_p0;
782 unsigned char sy_lfr_n_bp_p0;
708 unsigned char sy_lfr_n_bp_p1;
783 unsigned char sy_lfr_n_bp_p1;
709 unsigned char sy_lfr_n_cwf_long_f3;
784 unsigned char sy_lfr_n_cwf_long_f3;
@@ -727,72 +802,83 typedef struct {
727 // mask F0
802 // mask F0
728 union{
803 union{
729 struct{
804 struct{
730 unsigned char f0_word1[4];
805 unsigned char f0_word1[BYTES_PER_WORD];
731 unsigned char f0_word2[4];
806 unsigned char f0_word2[BYTES_PER_WORD];
732 unsigned char f0_word3[4];
807 unsigned char f0_word3[BYTES_PER_WORD];
733 unsigned char f0_word4[4];
808 unsigned char f0_word4[BYTES_PER_WORD];
734 // mask F1
809 // mask F1
735 unsigned char f1_word1[4];
810 unsigned char f1_word1[BYTES_PER_WORD];
736 unsigned char f1_word2[4];
811 unsigned char f1_word2[BYTES_PER_WORD];
737 unsigned char f1_word3[4];
812 unsigned char f1_word3[BYTES_PER_WORD];
738 unsigned char f1_word4[4];
813 unsigned char f1_word4[BYTES_PER_WORD];
739 // mask F2
814 // mask F2
740 unsigned char f2_word1[4];
815 unsigned char f2_word1[BYTES_PER_WORD];
741 unsigned char f2_word2[4];
816 unsigned char f2_word2[BYTES_PER_WORD];
742 unsigned char f2_word3[4];
817 unsigned char f2_word3[BYTES_PER_WORD];
743 unsigned char f2_word4[4];
818 unsigned char f2_word4[BYTES_PER_WORD];
744 } fx;
819 } fx;
745 unsigned char raw[ 4 * 4 * 3 ];
820 unsigned char raw[ BYTES_PER_MASKS_SET ];
746 } sy_lfr_fbins;
821 } sy_lfr_fbins;
747
822
748 // PAS FILTER PARAMETERS
823 // PAS FILTER PARAMETERS
749 unsigned char pa_rpw_spare8_2;
824 unsigned char pa_rpw_spare8_2;
750 unsigned char spare_sy_lfr_pas_filter_enabled;
825 unsigned char spare_sy_lfr_pas_filter_enabled;
751 unsigned char sy_lfr_pas_filter_modulus;
826 unsigned char sy_lfr_pas_filter_modulus;
752 unsigned char sy_lfr_pas_filter_tbad[4];
827 unsigned char sy_lfr_pas_filter_tbad[PARAM_4_BYTES];
753 unsigned char sy_lfr_pas_filter_offset;
828 unsigned char sy_lfr_pas_filter_offset;
754 unsigned char sy_lfr_pas_filter_shift[4];
829 unsigned char sy_lfr_pas_filter_shift[PARAM_4_BYTES];
755 unsigned char sy_lfr_sc_rw_delta_f[4];
830 unsigned char sy_lfr_sc_rw_delta_f[PARAM_4_BYTES];
756
831
757 // LFR_RW_MASK
832 // LFR_RW_MASK
758 union{
833 union{
759 struct{
834 struct{
760 unsigned char f0_word1[4];
835 unsigned char f0_word1[BYTES_PER_WORD];
761 unsigned char f0_word2[4];
836 unsigned char f0_word2[BYTES_PER_WORD];
762 unsigned char f0_word3[4];
837 unsigned char f0_word3[BYTES_PER_WORD];
763 unsigned char f0_word4[4];
838 unsigned char f0_word4[BYTES_PER_WORD];
764 // mask F1
839 // mask F1
765 unsigned char f1_word1[4];
840 unsigned char f1_word1[BYTES_PER_WORD];
766 unsigned char f1_word2[4];
841 unsigned char f1_word2[BYTES_PER_WORD];
767 unsigned char f1_word3[4];
842 unsigned char f1_word3[BYTES_PER_WORD];
768 unsigned char f1_word4[4];
843 unsigned char f1_word4[BYTES_PER_WORD];
769 // mask F2
844 // mask F2
770 unsigned char f2_word1[4];
845 unsigned char f2_word1[BYTES_PER_WORD];
771 unsigned char f2_word2[4];
846 unsigned char f2_word2[BYTES_PER_WORD];
772 unsigned char f2_word3[4];
847 unsigned char f2_word3[BYTES_PER_WORD];
773 unsigned char f2_word4[4];
848 unsigned char f2_word4[BYTES_PER_WORD];
774 } fx;
849 } fx;
775 unsigned char raw[ 4 * 4 * 3 ];
850 unsigned char raw[ BYTES_PER_MASKS_SET ];
776 } sy_lfr_rw_mask;
851 } sy_lfr_rw_mask;
777
852
778 // SPARE
853 // SPARE
779 unsigned char pa_rpw_spare8_3;
854 unsigned char pa_rpw_spare8_3;
780 } Packet_TM_LFR_PARAMETER_DUMP_t;
855 } Packet_TM_LFR_PARAMETER_DUMP_t;
781
856
857 //**************************
858 //**************************
859 // TM_LFR_KCOEFFICIENTS_DUMP
860
861 #define KCOEFF_BLK_NR_PKT1 30
862 #define KCOEFF_BLK_NR_PKT2 6
863 #define KCOEFF_BLK_SIZE 130
864 #define KCOEFF_PKTCNT 2
865 #define PKTNR_1 1
866 #define PKTNR_2 2
867
782 typedef struct {
868 typedef struct {
783 unsigned char targetLogicalAddress;
869 unsigned char targetLogicalAddress;
784 unsigned char protocolIdentifier;
870 unsigned char protocolIdentifier;
785 unsigned char reserved;
871 unsigned char reserved;
786 unsigned char userApplication;
872 unsigned char userApplication;
787 unsigned char packetID[2];
873 unsigned char packetID[BYTES_PER_PACKETID];
788 unsigned char packetSequenceControl[2];
874 unsigned char packetSequenceControl[BYTES_PER_SEQ_CTRL];
789 unsigned char packetLength[2];
875 unsigned char packetLength[BYTES_PER_PKT_LEN];
790 // DATA FIELD HEADER
876 // DATA FIELD HEADER
791 unsigned char spare1_pusVersion_spare2;
877 unsigned char spare1_pusVersion_spare2;
792 unsigned char serviceType;
878 unsigned char serviceType;
793 unsigned char serviceSubType;
879 unsigned char serviceSubType;
794 unsigned char destinationID;
880 unsigned char destinationID;
795 unsigned char time[6];
881 unsigned char time[BYTES_PER_TIME];
796 unsigned char sid;
882 unsigned char sid;
797 unsigned char pkt_cnt;
883 unsigned char pkt_cnt;
798 unsigned char pkt_nr;
884 unsigned char pkt_nr;
@@ -9,6 +9,76
9 #define GRSPW_DEVICE_NAME "/dev/grspw0"
9 #define GRSPW_DEVICE_NAME "/dev/grspw0"
10 #define UART_DEVICE_NAME "/dev/console"
10 #define UART_DEVICE_NAME "/dev/console"
11
11
12 //*******
13 // MACROS
14 #ifdef PRINT_MESSAGES_ON_CONSOLE
15 #define PRINTF(x) printf(x);
16 #define PRINTF1(x,y) printf(x,y);
17 #define PRINTF2(x,y,z) printf(x,y,z);
18 #else
19 #define PRINTF(x) ;
20 #define PRINTF1(x,y) ;
21 #define PRINTF2(x,y,z) ;
22 #endif
23
24 #ifdef BOOT_MESSAGES
25 #define BOOT_PRINTF(x) printf(x);
26 #define BOOT_PRINTF1(x,y) printf(x,y);
27 #define BOOT_PRINTF2(x,y,z) printf(x,y,z);
28 #else
29 #define BOOT_PRINTF(x) ;
30 #define BOOT_PRINTF1(x,y) ;
31 #define BOOT_PRINTF2(x,y,z) ;
32 #endif
33
34 #ifdef DEBUG_MESSAGES
35 #define DEBUG_PRINTF(x) printf(x);
36 #define DEBUG_PRINTF1(x,y) printf(x,y);
37 #define DEBUG_PRINTF2(x,y,z) printf(x,y,z);
38 #else
39 #define DEBUG_PRINTF(x) ;
40 #define DEBUG_PRINTF1(x,y) ;
41 #define DEBUG_PRINTF2(x,y,z) ;
42 #endif
43
44 #define CONST_65536 65536 // 2^16
45 #define CONST_2048 2048 // 2^11
46 #define CONST_512 512 // 2^9
47 #define CONST_256 256 // 2^8
48 #define CONST_128 128 // 2^7
49 #define UINT8_MAX 255
50
51 #define FLOAT_MSBYTE 0
52 #define FLOAT_LSBYTE 3
53 #define BITS_PER_BYTE 8
54 #define INIT_FLOAT 0.
55 #define INIT_CHAR 0x00
56 #define INT8_ALL_F 0xff
57 #define INT16_ALL_F 0xffff
58 #define INT32_ALL_F 0xffffffff
59 #define INT32_ALL_0 0x00000000
60 #define SHIFT_1_BYTE 8
61 #define SHIFT_2_BYTES 16
62 #define SHIFT_3_BYTES 24
63 #define SHIFT_4_BYTES 32
64 #define SHIFT_5_BYTES 40
65 #define SHIFT_2_BITS 2
66 #define SHIFT_3_BITS 3
67 #define SHIFT_4_BITS 4
68 #define SHIFT_5_BITS 5
69 #define SHIFT_6_BITS 6
70 #define SHIFT_7_BITS 7
71 #define BYTE_0 0
72 #define BYTE_1 1
73 #define BYTE_2 2
74 #define BYTE_3 3
75 #define BYTE_4 4
76 #define BYTE_5 5
77 #define BYTE_6 6
78 #define BYTE_7 7
79 #define BYTE0_MASK 0xff00
80 #define BYTE1_MASK 0x00ff
81
12 enum lfr_transition_type_t{
82 enum lfr_transition_type_t{
13 TRANSITION_NOT_SPECIFIC,
83 TRANSITION_NOT_SPECIFIC,
14 TRANSITION_NORM_TO_S1,
84 TRANSITION_NORM_TO_S1,
@@ -93,35 +163,56 typedef struct ring_node
93 #define RTEMS_EVENT_BURST_BP2_F1 RTEMS_EVENT_22
163 #define RTEMS_EVENT_BURST_BP2_F1 RTEMS_EVENT_22
94 #define RTEMS_EVENT_SWF_RESYNCH RTEMS_EVENT_23
164 #define RTEMS_EVENT_SWF_RESYNCH RTEMS_EVENT_23
95
165
96 //****************************
166 //********************************************
97 // LFR DEFAULT MODE PARAMETERS
167 //********************************************
168 // LFR PARAMETERS: DEFAULT, MIN AND MAX VALUES
169