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