@@ -19,6 +19,7 | |||
|
19 | 19 | #define PACKET_LENGTH_TC_LFR_UPDATE_INFO (46 - CCSDS_TC_TM_PACKET_OFFSET) |
|
20 | 20 | #define PACKET_LENGTH_TC_LFR_ENABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET) |
|
21 | 21 | #define PACKET_LENGTH_TC_LFR_DISABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET) |
|
22 | #define PACKET_LENGTH_TC_LFR_DUMP_KCOEFFICIENTS (12 - CCSDS_TC_TM_PACKET_OFFSET) | |
|
22 | 23 | #define PACKET_LENGTH_TC_LFR_UPDATE_TIME (18 - CCSDS_TC_TM_PACKET_OFFSET) |
|
23 | 24 | |
|
24 | 25 | // TC TYPES |
@@ -106,7 +107,6 typedef struct | |||
|
106 | 107 | unsigned char serviceSubType; |
|
107 | 108 | unsigned char sourceID; |
|
108 | 109 | unsigned char crc[2]; |
|
109 | ||
|
110 | 110 | } Packet_TC_LFR_DUMP_PAR_t; |
|
111 | 111 | |
|
112 | 112 | typedef struct |
@@ -122,7 +122,6 typedef struct | |||
|
122 | 122 | unsigned char spare; |
|
123 | 123 | unsigned char bw_sp0_sp1_r0_r1; |
|
124 | 124 | unsigned char crc[2]; |
|
125 | ||
|
126 | 125 | } Packet_TC_LFR_LOAD_COMMON_PAR_t; |
|
127 | 126 | |
|
128 | 127 | typedef struct |
@@ -183,10 +182,9 typedef struct | |||
|
183 | 182 | unsigned char serviceType; |
|
184 | 183 | unsigned char serviceSubType; |
|
185 | 184 | unsigned char sourceID; |
|
186 |
unsigned char |
|
|
187 | unsigned char bw_sp0_sp1_r0_r1; | |
|
185 | unsigned char cp_rpw_time[6]; | |
|
188 | 186 | unsigned char crc[2]; |
|
189 |
} Packet_TC_LFR_ |
|
|
187 | } Packet_TC_LFR_UPDATE_TIME_t; | |
|
190 | 188 | |
|
191 | 189 | typedef struct |
|
192 | 190 | { // the CCSDS header is added by LPPMON |
@@ -198,8 +196,8 typedef struct | |||
|
198 | 196 | unsigned char serviceType; |
|
199 | 197 | unsigned char serviceSubType; |
|
200 | 198 | unsigned char sourceID; |
|
201 | unsigned char cp_rpw_time[6]; | |
|
202 | 199 | unsigned char crc[2]; |
|
203 | } Packet_TC_LFR_UPDATE_TIME_t; | |
|
200 | ||
|
201 | } Packet_TC_LFR_DUMP_KCOEFFICIENTS_t; | |
|
204 | 202 | |
|
205 | 203 | #endif // TC_TYPES_H |
@@ -18,12 +18,19 | |||
|
18 | 18 | #define DEFAULT_HKBIA 0x1e // 0001 1110 |
|
19 | 19 | |
|
20 | 20 | // PACKET ID |
|
21 | #define TM_PACKET_PID_DEFAULT 76 | |
|
22 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 | |
|
21 | 23 | #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1 |
|
22 | 24 | #define APID_TM_HK 0x0cc4 // PID 76 CAT 4 |
|
23 | 25 | #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 |
|
24 | 26 | #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 |
|
25 | 27 | #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6 |
|
26 | 28 | #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6 |
|
29 | // PACKET CAT | |
|
30 | #define TM_PACKET_CAT_TC_EXE 1 | |
|
31 | #define TM_PACKET_CAT_HK 4 | |
|
32 | #define TM_PACKET_CAT_SCIENCE 12 | |
|
33 | #define TM_PACKET_CAT_DUMP 6 | |
|
27 | 34 | |
|
28 | 35 | // PACKET SEQUENCE CONTROL |
|
29 | 36 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] |
@@ -99,15 +106,12 | |||
|
99 | 106 | #define TC_LEN_LOAD_FBINS 60 |
|
100 | 107 | #define TC_LEN_UPDT_TIME 18 |
|
101 | 108 | |
|
102 | // PACKET CODES | |
|
103 | #define TM_CODE_K_DUMP 0xb5600b00 // 181 (0xb5) ** 96 (0x60) ** 11 (0x0b) ** 0 (0x00) | |
|
104 | ||
|
105 | 109 | // TM TYPES |
|
106 | 110 | #define TM_TYPE_TC_EXE 1 |
|
107 | 111 | #define TM_TYPE_HK 3 |
|
108 | 112 | #define TM_TYPE_LFR_SCIENCE 21 |
|
109 | 113 | #define TM_TYPE_PARAMETER_DUMP 181 |
|
110 |
#define TM_TYPE_K_DUMP |
|
|
114 | #define TM_TYPE_KCOEFFICIENT_DUMP 181 | |
|
111 | 115 | |
|
112 | 116 | // TM SUBTYPES |
|
113 | 117 | #define TM_SUBTYPE_EXE_OK 7 |
@@ -687,51 +691,25 typedef struct { | |||
|
687 | 691 | unsigned char sy_lfr_s2_bp_p0; |
|
688 | 692 | unsigned char sy_lfr_s2_bp_p1; |
|
689 | 693 | |
|
690 | //************ | |
|
691 | // FBINS MASKS | |
|
692 | 694 | // mask F0 |
|
693 |
unsigned |
|
|
694 |
unsigned |
|
|
695 |
unsigned |
|
|
696 |
unsigned |
|
|
695 | unsigned int sy_lfr_fbins_f0_word1; | |
|
696 | unsigned int sy_lfr_fbins_f0_word2; | |
|
697 | unsigned int sy_lfr_fbins_f0_word3; | |
|
698 | unsigned int sy_lfr_fbins_f0_word4; | |
|
697 | 699 | // mask F1 |
|
698 |
unsigned |
|
|
699 |
unsigned |
|
|
700 |
unsigned |
|
|
701 |
unsigned |
|
|
700 | unsigned int sy_lfr_fbins_f1_word1; | |
|
701 | unsigned int sy_lfr_fbins_f1_word2; | |
|
702 | unsigned int sy_lfr_fbins_f1_word3; | |
|
703 | unsigned int sy_lfr_fbins_f1_word4; | |
|
702 | 704 | // mask F2 |
|
703 |
unsigned |
|
|
704 |
unsigned |
|
|
705 |
unsigned |
|
|
706 |
unsigned |
|
|
705 | unsigned int sy_lfr_fbins_f2_word1; | |
|
706 | unsigned int sy_lfr_fbins_f2_word2; | |
|
707 | unsigned int sy_lfr_fbins_f2_word3; | |
|
708 | unsigned int sy_lfr_fbins_f2_word4; | |
|
707 | 709 | |
|
708 | 710 | // SPARE |
|
709 | 711 | unsigned char source_data_spare; |
|
710 | 712 | } Packet_TM_LFR_PARAMETER_DUMP_t; |
|
711 | 713 | |
|
712 | typedef struct { | |
|
713 | unsigned char targetLogicalAddress; | |
|
714 | unsigned char protocolIdentifier; | |
|
715 | unsigned char reserved; | |
|
716 | unsigned char userApplication; | |
|
717 | unsigned char packetID[2]; | |
|
718 | unsigned char packetSequenceControl[2]; | |
|
719 | unsigned char packetLength[2]; | |
|
720 | // DATA FIELD HEADER | |
|
721 | unsigned char spare1_pusVersion_spare2; | |
|
722 | unsigned char serviceType; | |
|
723 | unsigned char serviceSubType; | |
|
724 | unsigned char destinationID; | |
|
725 | unsigned char time[6]; | |
|
726 | unsigned char sid; | |
|
727 | unsigned char pkt_cnt; | |
|
728 | unsigned char pkt_nr; | |
|
729 | unsigned char blk_nr; | |
|
730 | ||
|
731 | //****************** | |
|
732 | // SOURCE DATA repeated N times with N in [0 .. PA_LFR_KCOEFF_BLK_NR] | |
|
733 | unsigned char kcoeff_blks[3900]; // one blk is 2 + 4 * 32 = 130 bytes, 30 blks max in one packet (30 * 130 = 3900) | |
|
734 | ||
|
735 | } Packet_TM_LFR_KCOEFFICIENTS_DUMP_t; | |
|
736 | 714 | |
|
737 | 715 | #endif // CCSDS_TYPES_H_INCLUDED |
General Comments 0
You need to be logged in to leave comments.
Login now