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