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