##// END OF EJS Templates
the following TC have been updted:...
paul -
r27:bb9afa759d57 default
parent child
Show More
@@ -1,746 +1,746
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 76 #define TC_SUBTYPE_RESET 1
77 77 #define TC_SUBTYPE_LOAD_COMM 11
78 78 #define TC_SUBTYPE_LOAD_NORM 13
79 79 #define TC_SUBTYPE_LOAD_BURST 19
80 80 #define TC_SUBTYPE_LOAD_SBM1 25
81 81 #define TC_SUBTYPE_LOAD_SBM2 27
82 82 #define TC_SUBTYPE_DUMP 31
83 83 #define TC_SUBTYPE_ENTER 41
84 84 #define TC_SUBTYPE_UPDT_INFO 51
85 85 #define TC_SUBTYPE_EN_CAL 61
86 86 #define TC_SUBTYPE_DIS_CAL 63
87 87 #define TC_SUBTYPE_LOAD_K 93
88 88 #define TC_SUBTYPE_DUMP_K 95
89 89 #define TC_SUBTYPE_LOAD_FBINS 91
90 90 #define TC_SUBTYPE_UPDT_TIME 129
91 91
92 92 // TC LEN
93 93 #define TC_LEN_RESET 12
94 94 #define TC_LEN_LOAD_COMM 14
95 95 #define TC_LEN_LOAD_NORM 22
96 96 #define TC_LEN_LOAD_BURST 14
97 97 #define TC_LEN_LOAD_SBM1 14
98 98 #define TC_LEN_LOAD_SBM2 14
99 99 #define TC_LEN_DUMP 12
100 100 #define TC_LEN_ENTER 20
101 101 #define TC_LEN_UPDT_INFO 110
102 102 #define TC_LEN_EN_CAL 12
103 103 #define TC_LEN_DIS_CAL 12
104 104 #define TC_LEN_LOAD_K 142
105 105 #define TC_LEN_DUMP_K 12
106 106 #define TC_LEN_LOAD_FBINS 60
107 107 #define TC_LEN_UPDT_TIME 18
108 108
109 109 // PACKET CODES
110 110 #define TM_CODE_K_DUMP 0xb5600b00 // 181 (0xb5) ** 96 (0x60) ** 11 (0x0b) ** 0 (0x00)
111 111
112 112 // TM TYPES
113 113 #define TM_TYPE_TC_EXE 1
114 114 #define TM_TYPE_HK 3
115 115 #define TM_TYPE_LFR_SCIENCE 21
116 116 #define TM_TYPE_PARAMETER_DUMP 181
117 117 #define TM_TYPE_K_DUMP 181
118 118
119 119 // TM SUBTYPES
120 120 #define TM_SUBTYPE_EXE_OK 7
121 121 #define TM_SUBTYPE_EXE_NOK 8
122 122 #define TM_SUBTYPE_HK 25
123 123 #define TM_SUBTYPE_LFR_SCIENCE_3 3 // TM packets with fixed size
124 124 #define TM_SUBTYPE_LFR_SCIENCE_6 6 // TM packets with variable size
125 125 #define TM_SUBTYPE_PARAMETER_DUMP 32
126 126 #define TM_SUBTYPE_K_DUMP 96
127 127
128 128 // FAILURE CODES
129 129 #define ILLEGAL_APID 0
130 130 #define WRONG_LEN_PKT 1
131 131 #define INCOR_CHECKSUM 2
132 132 #define ILL_TYPE 3
133 133 #define ILL_SUBTYPE 4
134 134 #define WRONG_APP_DATA 5 // 0x00 0x05
135 135 #define TC_NOT_EXE 42000 // 0xa4 0x10
136 136 #define WRONG_SRC_ID 42001 // 0xa4 0x11
137 137 #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12
138 138 #define FAIL_DETECTED 42003 // 0xa4 0x13
139 139 #define NOT_ALLOWED 42004 // 0xa4 0x14
140 140 #define CORRUPTED 42005 // 0xa4 0x15
141 141 #define CCSDS_TM_VALID 7
142 142
143 143 // TC SID
144 144 #define SID_TC_GROUND 0
145 145 #define SID_TC_MISSION_TIMELINE 110
146 146 #define SID_TC_TC_SEQUENCES 111
147 147 #define SID_TC_RECOVERY_ACTION_CMD 112
148 148 #define SID_TC_BACKUP_MISSION_TIMELINE 113
149 149 #define SID_TC_DIRECT_CMD 120
150 150 #define SID_TC_SPARE_GRD_SRC1 121
151 151 #define SID_TC_SPARE_GRD_SRC2 122
152 152 #define SID_TC_OBCP 15
153 153 #define SID_TC_SYSTEM_CONTROL 14
154 154 #define SID_TC_AOCS 11
155 155 #define SID_TC_RPW_INTERNAL 254
156 156
157 157 enum apid_destid{
158 158 GROUND,
159 159 MISSION_TIMELINE,
160 160 TC_SEQUENCES,
161 161 RECOVERY_ACTION_CMD,
162 162 BACKUP_MISSION_TIMELINE,
163 163 DIRECT_CMD,
164 164 SPARE_GRD_SRC1,
165 165 SPARE_GRD_SRC2,
166 166 OBCP,
167 167 SYSTEM_CONTROL,
168 168 AOCS,
169 169 RPW_INTERNAL
170 170 };
171 171 // SEQUENCE COUNTERS
172 172 #define SEQ_CNT_MAX 16383
173 173 #define SEQ_CNT_NB_DEST_ID 12
174 174
175 175 // TM SID
176 176 #define SID_HK 1
177 177
178 178 #define SID_NORM_SWF_F0 3
179 179 #define SID_NORM_SWF_F1 4
180 180 #define SID_NORM_SWF_F2 5
181 181 #define SID_NORM_CWF_F3 1
182 182 #define SID_BURST_CWF_F2 2
183 183 #define SID_SBM1_CWF_F1 24
184 184 #define SID_SBM2_CWF_F2 25
185 185 #define SID_NORM_ASM_F0 11
186 186 #define SID_NORM_ASM_F1 12
187 187 #define SID_NORM_ASM_F2 13
188 188 #define SID_NORM_BP1_F0 14
189 189 #define SID_NORM_BP1_F1 15
190 190 #define SID_NORM_BP1_F2 16
191 191 #define SID_NORM_BP2_F0 19
192 192 #define SID_NORM_BP2_F1 20
193 193 #define SID_NORM_BP2_F2 21
194 194 #define SID_BURST_BP1_F0 17
195 195 #define SID_BURST_BP2_F0 22
196 196 #define SID_BURST_BP1_F1 18
197 197 #define SID_BURST_BP2_F1 23
198 198 #define SID_SBM1_BP1_F0 28
199 199 #define SID_SBM1_BP2_F0 31
200 200 #define SID_SBM2_BP1_F0 29
201 201 #define SID_SBM2_BP2_F0 32
202 202 #define SID_SBM2_BP1_F1 30
203 203 #define SID_SBM2_BP2_F1 33
204 204 #define SID_NORM_CWF_LONG_F3 34
205 205
206 206 #define SID_PARAMETER_DUMP 10
207 207 #define SID_K_DUMP 11
208 208
209 209 // HEADER_LENGTH
210 210 //#define TM_HEADER_LEN 16
211 211 #define HEADER_LENGTH_TM_LFR_SCIENCE_CWF 32
212 212 #define HEADER_LENGTH_TM_LFR_SCIENCE_SWF 34
213 213 #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 34
214 214 // PACKET_LENGTH
215 215 #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET)
216 216 #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET)
217 217 #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET)
218 218 #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET)
219 219 #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET)
220 220 #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET)
221 221 #define PACKET_LENGTH_HK (136 - CCSDS_TC_TM_PACKET_OFFSET)
222 222 #define PACKET_LENGTH_PARAMETER_DUMP (84 - CCSDS_TC_TM_PACKET_OFFSET)
223 223 #define PACKET_LENGTH_K_DUMP (3920 - CCSDS_TC_TM_PACKET_OFFSET)
224 224 // SCIENCE ASM
225 225 #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
226 226 #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
227 227 #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
228 228 #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
229 229 #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
230 230 // SCIENCE NORM
231 231 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (150 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 11 + 29 (1 spare byte in the header)
232 232 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (172 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 11 + 29 (1 spare byte in the header)
233 233 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (160 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 11 + 28
234 234 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (358 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 28
235 235 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (418 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 28
236 236 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (388 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 28
237 237 // SCIENCE SBM
238 238 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (270 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 11 + 28
239 239 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (688 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 28
240 240 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (314 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 11 + 28
241 241 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (808 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 28
242 242
243 243 #define PACKET_LENGTH_DELTA 11 // 7 + 4
244 244
245 245 #define SPARE1_PUSVERSION_SPARE2 0x10
246 246
247 247 // R3
248 248 // one snapshot = 2048 samples = 6 packets * 304 + 224
249 249 #define TM_LEN_SCI_SWF_304 (3678 - CCSDS_TC_TM_PACKET_OFFSET) // 304 * 12 + 30
250 250 #define TM_LEN_SCI_SWF_224 (2718 - CCSDS_TC_TM_PACKET_OFFSET) // 224 * 12 + 30
251 251 // one continuous buffer = 2688 samples = 8 packets * 336
252 252 #define TM_LEN_SCI_CWF_336 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 336 * 12 + 28
253 253 #define TM_LEN_SCI_CWF_672 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 672 * 6 + 28
254 254 //
255 255 #define DEFAULT_PKTCNT 0x07
256 256 #define BLK_NR_304 0x0130
257 257 #define BLK_NR_224 0x00e0
258 258 #define BLK_NR_CWF 0x0150 // 336
259 259 #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672
260 260
261 261 enum TM_TYPE{
262 262 TM_LFR_TC_EXE_OK,
263 263 TM_LFR_TC_EXE_ERR,
264 264 TM_LFR_HK,
265 265 TM_LFR_SCI,
266 266 TM_LFR_SCI_SBM,
267 267 TM_LFR_PAR_DUMP
268 268 };
269 269
270 270 typedef struct {
271 271 unsigned char targetLogicalAddress;
272 272 unsigned char protocolIdentifier;
273 273 unsigned char reserved;
274 274 unsigned char userApplication;
275 275 // PACKET HEADER
276 276 unsigned char packetID[2];
277 277 unsigned char packetSequenceControl[2];
278 278 unsigned char packetLength[2];
279 279 // DATA FIELD HEADER
280 280 unsigned char spare1_pusVersion_spare2;
281 281 unsigned char serviceType;
282 282 unsigned char serviceSubType;
283 283 unsigned char destinationID;
284 284 unsigned char time[6];
285 285 //
286 286 unsigned char telecommand_pkt_id[2];
287 287 unsigned char pkt_seq_control[2];
288 288 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
289 289
290 290 typedef struct {
291 291 unsigned char targetLogicalAddress;
292 292 unsigned char protocolIdentifier;
293 293 unsigned char reserved;
294 294 unsigned char userApplication;
295 295 // PACKET HEADER
296 296 unsigned char packetID[2];
297 297 unsigned char packetSequenceControl[2];
298 298 unsigned char packetLength[2];
299 299 // DATA FIELD HEADER
300 300 unsigned char spare1_pusVersion_spare2;
301 301 unsigned char serviceType;
302 302 unsigned char serviceSubType;
303 303 unsigned char destinationID;
304 304 unsigned char time[6];
305 305 //
306 unsigned char tc_failure_code[2];
307 306 unsigned char telecommand_pkt_id[2];
308 307 unsigned char pkt_seq_control[2];
308 unsigned char tc_failure_code[2];
309 309 unsigned char tc_service;
310 310 unsigned char tc_subtype;
311 311 unsigned char byte_position;
312 312 unsigned char rcv_value;
313 313 } Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
314 314
315 315 typedef struct {
316 316 unsigned char targetLogicalAddress;
317 317 unsigned char protocolIdentifier;
318 318 unsigned char reserved;
319 319 unsigned char userApplication;
320 320 // PACKET HEADER
321 321 unsigned char packetID[2];
322 322 unsigned char packetSequenceControl[2];
323 323 unsigned char packetLength[2];
324 324 // DATA FIELD HEADER
325 325 unsigned char spare1_pusVersion_spare2;
326 326 unsigned char serviceType;
327 327 unsigned char serviceSubType;
328 328 unsigned char destinationID;
329 329 unsigned char time[6];
330 330 //
331 unsigned char tc_failure_code[2];
332 331 unsigned char telecommand_pkt_id[2];
333 332 unsigned char pkt_seq_control[2];
333 unsigned char tc_failure_code[2];
334 334 unsigned char tc_service;
335 335 unsigned char tc_subtype;
336 336 unsigned char lfr_status_word[2];
337 337 } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
338 338
339 339 typedef struct {
340 340 unsigned char targetLogicalAddress;
341 341 unsigned char protocolIdentifier;
342 342 unsigned char reserved;
343 343 unsigned char userApplication;
344 344 // PACKET HEADER
345 345 unsigned char packetID[2];
346 346 unsigned char packetSequenceControl[2];
347 347 unsigned char packetLength[2];
348 348 // DATA FIELD HEADER
349 349 unsigned char spare1_pusVersion_spare2;
350 350 unsigned char serviceType;
351 351 unsigned char serviceSubType;
352 352 unsigned char destinationID;
353 353 unsigned char time[6];
354 354 //
355 unsigned char tc_failure_code[2];
356 355 unsigned char telecommand_pkt_id[2];
357 356 unsigned char pkt_seq_control[2];
357 unsigned char tc_failure_code[2];
358 358 unsigned char tc_service;
359 359 unsigned char tc_subtype;
360 360 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
361 361
362 362 typedef struct {
363 363 unsigned char targetLogicalAddress;
364 364 unsigned char protocolIdentifier;
365 365 unsigned char reserved;
366 366 unsigned char userApplication;
367 367 // PACKET HEADER
368 368 unsigned char packetID[2];
369 369 unsigned char packetSequenceControl[2];
370 370 unsigned char packetLength[2];
371 371 // DATA FIELD HEADER
372 372 unsigned char spare1_pusVersion_spare2;
373 373 unsigned char serviceType;
374 374 unsigned char serviceSubType;
375 375 unsigned char destinationID;
376 376 unsigned char time[6];
377 377 //
378 unsigned char tc_failure_code[2];
379 378 unsigned char telecommand_pkt_id[2];
380 379 unsigned char pkt_seq_control[2];
380 unsigned char tc_failure_code[2];
381 381 unsigned char tc_service;
382 382 unsigned char tc_subtype;
383 383 } Packet_TM_LFR_TC_EXE_ERROR_t;
384 384
385 385 typedef struct {
386 386 unsigned char targetLogicalAddress;
387 387 unsigned char protocolIdentifier;
388 388 unsigned char reserved;
389 389 unsigned char userApplication;
390 390 // PACKET HEADER
391 391 unsigned char packetID[2];
392 392 unsigned char packetSequenceControl[2];
393 393 unsigned char packetLength[2];
394 394 // DATA FIELD HEADER
395 395 unsigned char spare1_pusVersion_spare2;
396 396 unsigned char serviceType;
397 397 unsigned char serviceSubType;
398 398 unsigned char destinationID;
399 399 unsigned char time[6];
400 400 //
401 unsigned char tc_failure_code[2];
402 401 unsigned char telecommand_pkt_id[2];
403 402 unsigned char pkt_seq_control[2];
403 unsigned char tc_failure_code[2];
404 404 unsigned char tc_service;
405 405 unsigned char tc_subtype;
406 406 unsigned char pkt_len_rcv_value[2];
407 407 unsigned char pkt_datafieldsize_cnt[2];
408 408 unsigned char rcv_crc[2];
409 409 unsigned char computed_crc[2];
410 410 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
411 411
412 412 typedef struct {
413 413 unsigned char targetLogicalAddress;
414 414 unsigned char protocolIdentifier;
415 415 unsigned char reserved;
416 416 unsigned char userApplication;
417 417 unsigned char packetID[2];
418 418 unsigned char packetSequenceControl[2];
419 419 unsigned char packetLength[2];
420 420 // DATA FIELD HEADER
421 421 unsigned char spare1_pusVersion_spare2;
422 422 unsigned char serviceType;
423 423 unsigned char serviceSubType;
424 424 unsigned char destinationID;
425 425 unsigned char time[6];
426 426 // AUXILIARY HEADER
427 427 unsigned char sid;
428 428 unsigned char hkBIA;
429 429 unsigned char sy_lfr_common_parameters_spare;
430 430 unsigned char sy_lfr_common_parameters;
431 431 unsigned char pktCnt;
432 432 unsigned char pktNr;
433 433 unsigned char acquisitionTime[6];
434 434 unsigned char blkNr[2];
435 435 } Header_TM_LFR_SCIENCE_SWF_t;
436 436
437 437 typedef struct {
438 438 unsigned char targetLogicalAddress;
439 439 unsigned char protocolIdentifier;
440 440 unsigned char reserved;
441 441 unsigned char userApplication;
442 442 unsigned char packetID[2];
443 443 unsigned char packetSequenceControl[2];
444 444 unsigned char packetLength[2];
445 445 // DATA FIELD HEADER
446 446 unsigned char spare1_pusVersion_spare2;
447 447 unsigned char serviceType;
448 448 unsigned char serviceSubType;
449 449 unsigned char destinationID;
450 450 unsigned char time[6];
451 451 // AUXILIARY DATA HEADER
452 452 unsigned char sid;
453 453 unsigned char hkBIA;
454 454 unsigned char sy_lfr_common_parameters_spare;
455 455 unsigned char sy_lfr_common_parameters;
456 456 unsigned char acquisitionTime[6];
457 457 unsigned char blkNr[2];
458 458 } Header_TM_LFR_SCIENCE_CWF_t;
459 459
460 460 typedef struct {
461 461 unsigned char targetLogicalAddress;
462 462 unsigned char protocolIdentifier;
463 463 unsigned char reserved;
464 464 unsigned char userApplication;
465 465 unsigned char packetID[2];
466 466 unsigned char packetSequenceControl[2];
467 467 unsigned char packetLength[2];
468 468 // DATA FIELD HEADER
469 469 unsigned char spare1_pusVersion_spare2;
470 470 unsigned char serviceType;
471 471 unsigned char serviceSubType;
472 472 unsigned char destinationID;
473 473 unsigned char time[6];
474 474 // AUXILIARY HEADER
475 475 unsigned char sid;
476 476 unsigned char biaStatusInfo;
477 477 unsigned char sy_lfr_common_parameters_spare;
478 478 unsigned char sy_lfr_common_parameters;
479 479 unsigned char pa_lfr_pkt_cnt_asm;
480 480 unsigned char pa_lfr_pkt_nr_asm;
481 481 unsigned char acquisitionTime[6];
482 482 unsigned char pa_lfr_asm_blk_nr[2];
483 483 } Header_TM_LFR_SCIENCE_ASM_t;
484 484
485 485 typedef struct {
486 486 unsigned char targetLogicalAddress;
487 487 unsigned char protocolIdentifier;
488 488 unsigned char reserved;
489 489 unsigned char userApplication;
490 490 unsigned char packetID[2];
491 491 unsigned char packetSequenceControl[2];
492 492 unsigned char packetLength[2];
493 493 // DATA FIELD HEADER
494 494 unsigned char spare1_pusVersion_spare2;
495 495 unsigned char serviceType;
496 496 unsigned char serviceSubType;
497 497 unsigned char destinationID;
498 498 unsigned char time[6];
499 499 // AUXILIARY HEADER
500 500 unsigned char sid;
501 501 unsigned char biaStatusInfo;
502 502 unsigned char sy_lfr_common_parameters_spare;
503 503 unsigned char sy_lfr_common_parameters;
504 504 unsigned char acquisitionTime[6];
505 505 unsigned char source_data_spare;
506 506 unsigned char pa_lfr_bp_blk_nr[2];
507 507 } Header_TM_LFR_SCIENCE_BP_with_spare_t;
508 508
509 509 typedef struct {
510 510 unsigned char targetLogicalAddress;
511 511 unsigned char protocolIdentifier;
512 512 unsigned char reserved;
513 513 unsigned char userApplication;
514 514 unsigned char packetID[2];
515 515 unsigned char packetSequenceControl[2];
516 516 unsigned char packetLength[2];
517 517 // DATA FIELD HEADER
518 518 unsigned char spare1_pusVersion_spare2;
519 519 unsigned char serviceType;
520 520 unsigned char serviceSubType;
521 521 unsigned char destinationID;
522 522 unsigned char time[6];
523 523 // AUXILIARY HEADER
524 524 unsigned char sid;
525 525 unsigned char biaStatusInfo;
526 526 unsigned char sy_lfr_common_parameters_spare;
527 527 unsigned char sy_lfr_common_parameters;
528 528 unsigned char acquisitionTime[6];
529 529 unsigned char pa_lfr_bp_blk_nr[2];
530 530 } Header_TM_LFR_SCIENCE_BP_t;
531 531
532 532 typedef struct {
533 533 //targetLogicalAddress is removed by the grspw module
534 534 unsigned char protocolIdentifier;
535 535 unsigned char reserved;
536 536 unsigned char userApplication;
537 537 unsigned char packetID[2];
538 538 unsigned char packetSequenceControl[2];
539 539 unsigned char packetLength[2];
540 540 // DATA FIELD HEADER
541 541 unsigned char headerFlag_pusVersion_Ack;
542 542 unsigned char serviceType;
543 543 unsigned char serviceSubType;
544 544 unsigned char sourceID;
545 545 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
546 546 } ccsdsTelecommandPacket_t;
547 547
548 548 typedef struct {
549 549 unsigned char targetLogicalAddress;
550 550 unsigned char protocolIdentifier;
551 551 unsigned char reserved;
552 552 unsigned char userApplication;
553 553 unsigned char packetID[2];
554 554 unsigned char packetSequenceControl[2];
555 555 unsigned char packetLength[2];
556 556 unsigned char spare1_pusVersion_spare2;
557 557 unsigned char serviceType;
558 558 unsigned char serviceSubType;
559 559 unsigned char destinationID;
560 560 unsigned char time[6];
561 561 unsigned char sid;
562 562
563 563 //**************
564 564 // HK PARAMETERS
565 565 unsigned char lfr_status_word[2];
566 566 unsigned char lfr_sw_version[4];
567 567 unsigned char lfr_fpga_version[3];
568 568 // ressource statistics
569 569 unsigned char hk_lfr_cpu_load;
570 570 unsigned char hk_lfr_cpu_load_max;
571 571 unsigned char hk_lfr_cpu_load_aver;
572 572 unsigned char hk_lfr_q_sd_fifo_size_max;
573 573 unsigned char hk_lfr_q_sd_fifo_size;
574 574 unsigned char hk_lfr_q_rv_fifo_size_max;
575 575 unsigned char hk_lfr_q_rv_fifo_size;
576 576 unsigned char hk_lfr_q_p0_fifo_size_max;
577 577 unsigned char hk_lfr_q_p0_fifo_size;
578 578 unsigned char hk_lfr_q_p1_fifo_size_max;
579 579 unsigned char hk_lfr_q_p1_fifo_size;
580 580 unsigned char hk_lfr_q_p2_fifo_size_max;
581 581 unsigned char hk_lfr_q_p2_fifo_size;
582 582 // tc statistics
583 583 unsigned char hk_lfr_update_info_tc_cnt[2];
584 584 unsigned char hk_lfr_update_time_tc_cnt[2];
585 585 unsigned char hk_lfr_exe_tc_cnt[2];
586 586 unsigned char hk_lfr_rej_tc_cnt[2];
587 587 unsigned char hk_lfr_last_exe_tc_id[2];
588 588 unsigned char hk_lfr_last_exe_tc_type[2];
589 589 unsigned char hk_lfr_last_exe_tc_subtype[2];
590 590 unsigned char hk_lfr_last_exe_tc_time[6];
591 591 unsigned char hk_lfr_last_rej_tc_id[2];
592 592 unsigned char hk_lfr_last_rej_tc_type[2];
593 593 unsigned char hk_lfr_last_rej_tc_subtype[2];
594 594 unsigned char hk_lfr_last_rej_tc_time[6];
595 595 // anomaly statistics
596 596 unsigned char hk_lfr_le_cnt[2];
597 597 unsigned char hk_lfr_me_cnt[2];
598 598 unsigned char hk_lfr_he_cnt[2];
599 599 unsigned char hk_lfr_last_er_rid[2];
600 600 unsigned char hk_lfr_last_er_code;
601 601 unsigned char hk_lfr_last_er_time[6];
602 602 // vhdl_blk_status
603 603 unsigned char hk_lfr_vhdl_aa_sm;
604 604 unsigned char hk_lfr_vhdl_fft_sr;
605 605 unsigned char hk_lfr_vhdl_cic_hk;
606 606 unsigned char hk_lfr_vhdl_iir_cal;
607 607 // spacewire_if_statistics
608 608 unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2];
609 609 unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2];
610 610 unsigned char hk_lfr_dpu_spw_tick_out_cnt;
611 611 unsigned char hk_lfr_dpu_spw_last_timc;
612 612 // ahb error statistics
613 613 unsigned char hk_lfr_last_fail_addr[4];
614 614 // temperatures
615 615 unsigned char hk_lfr_temp_scm[2];
616 616 unsigned char hk_lfr_temp_pcb[2];
617 617 unsigned char hk_lfr_temp_fpga[2];
618 618 // spacecraft potential
619 619 unsigned char hk_lfr_sc_v_f3[2];
620 620 unsigned char hk_lfr_sc_e1_f3[2];
621 621 unsigned char hk_lfr_sc_e2_f3[2];
622 622 // lfr common parameters
623 623 unsigned char sy_lfr_common_parameters_spare;
624 624 unsigned char sy_lfr_common_parameters;
625 625 // error counters
626 626 unsigned char hk_lfr_dpu_spw_parity;
627 627 unsigned char hk_lfr_dpu_spw_disconnect;
628 628 unsigned char hk_lfr_dpu_spw_escape;
629 629 unsigned char hk_lfr_dpu_spw_credit;
630 630 unsigned char hk_lfr_dpu_spw_write_sync;
631 631 unsigned char hk_lfr_dpu_spw_rx_ahb;
632 632 unsigned char hk_lfr_dpu_spw_tx_ahb;
633 633 unsigned char hk_lfr_dpu_spw_early_eop;
634 634 unsigned char hk_lfr_dpu_spw_invalid_addr;
635 635 unsigned char hk_lfr_dpu_spw_eep;
636 636 unsigned char hk_lfr_dpu_spw_rx_too_big;
637 637 // timecode
638 638 unsigned char hk_lfr_timecode_erroneous;
639 639 unsigned char hk_lfr_timecode_missing;
640 640 unsigned char hk_lfr_timecode_invalid;
641 641 // time
642 642 unsigned char hk_lfr_time_timecode_it;
643 643 unsigned char hk_lfr_time_not_synchro;
644 644 unsigned char hk_lfr_time_timecode_ctr;
645 645 // hk_lfr_buffer_dpu_
646 646 unsigned char hk_lfr_buffer_dpu_tc_fifo;
647 647 unsigned char hk_lfr_buffer_dpu_tm_fifo;
648 648 // hk_lfr_ahb_
649 649 unsigned char hk_lfr_ahb_correctable;
650 650 unsigned char hk_lfr_ahb_uncorrectable;
651 651 // spare
652 652 unsigned char parameters_spare;
653 653 } Packet_TM_LFR_HK_t;
654 654
655 655 typedef struct {
656 656 unsigned char targetLogicalAddress;
657 657 unsigned char protocolIdentifier;
658 658 unsigned char reserved;
659 659 unsigned char userApplication;
660 660 unsigned char packetID[2];
661 661 unsigned char packetSequenceControl[2];
662 662 unsigned char packetLength[2];
663 663 // DATA FIELD HEADER
664 664 unsigned char spare1_pusVersion_spare2;
665 665 unsigned char serviceType;
666 666 unsigned char serviceSubType;
667 667 unsigned char destinationID;
668 668 unsigned char time[6];
669 669 unsigned char sid;
670 670
671 671 //******************
672 672 // COMMON PARAMETERS
673 673 unsigned char sy_lfr_common_parameters_spare;
674 674 unsigned char sy_lfr_common_parameters;
675 675
676 676 //******************
677 677 // NORMAL PARAMETERS
678 678 unsigned char sy_lfr_n_swf_l[2];
679 679 unsigned char sy_lfr_n_swf_p[2];
680 680 unsigned char sy_lfr_n_asm_p[2];
681 681 unsigned char sy_lfr_n_bp_p0;
682 682 unsigned char sy_lfr_n_bp_p1;
683 683 unsigned char sy_lfr_n_cwf_long_f3;
684 684 unsigned char lfr_normal_parameters_spare;
685 685
686 686 //*****************
687 687 // BURST PARAMETERS
688 688 unsigned char sy_lfr_b_bp_p0;
689 689 unsigned char sy_lfr_b_bp_p1;
690 690
691 691 //****************
692 692 // SBM1 PARAMETERS
693 693 unsigned char sy_lfr_s1_bp_p0;
694 694 unsigned char sy_lfr_s1_bp_p1;
695 695
696 696 //****************
697 697 // SBM2 PARAMETERS
698 698 unsigned char sy_lfr_s2_bp_p0;
699 699 unsigned char sy_lfr_s2_bp_p1;
700 700
701 701 // mask F0
702 702 unsigned char sy_lfr_fbins_f0_word1[4];
703 703 unsigned char sy_lfr_fbins_f0_word2[4];
704 704 unsigned char sy_lfr_fbins_f0_word3[4];
705 705 unsigned char sy_lfr_fbins_f0_word4[4];
706 706 // mask F1
707 707 unsigned char sy_lfr_fbins_f1_word1[4];
708 708 unsigned char sy_lfr_fbins_f1_word2[4];
709 709 unsigned char sy_lfr_fbins_f1_word3[4];
710 710 unsigned char sy_lfr_fbins_f1_word4[4];
711 711 // mask F2
712 712 unsigned char sy_lfr_fbins_f2_word1[4];
713 713 unsigned char sy_lfr_fbins_f2_word2[4];
714 714 unsigned char sy_lfr_fbins_f2_word3[4];
715 715 unsigned char sy_lfr_fbins_f2_word4[4];
716 716
717 717 // SPARE
718 718 unsigned char source_data_spare;
719 719 } Packet_TM_LFR_PARAMETER_DUMP_t;
720 720
721 721 typedef struct {
722 722 unsigned char targetLogicalAddress;
723 723 unsigned char protocolIdentifier;
724 724 unsigned char reserved;
725 725 unsigned char userApplication;
726 726 unsigned char packetID[2];
727 727 unsigned char packetSequenceControl[2];
728 728 unsigned char packetLength[2];
729 729 // DATA FIELD HEADER
730 730 unsigned char spare1_pusVersion_spare2;
731 731 unsigned char serviceType;
732 732 unsigned char serviceSubType;
733 733 unsigned char destinationID;
734 734 unsigned char time[6];
735 735 unsigned char sid;
736 736 unsigned char pkt_cnt;
737 737 unsigned char pkt_nr;
738 738 unsigned char blk_nr;
739 739
740 740 //******************
741 741 // SOURCE DATA repeated N times with N in [0 .. PA_LFR_KCOEFF_BLK_NR]
742 742 unsigned char kcoeff_blks[3900]; // one blk is 2 + 4 * 32 = 130 bytes, 30 blks max in one packet (30 * 130 = 3900)
743 743
744 744 } Packet_TM_LFR_KCOEFFICIENTS_DUMP_t;
745 745
746 746 #endif // CCSDS_TYPES_H_INCLUDED
General Comments 0
You need to be logged in to leave comments. Login now