##// END OF EJS Templates
f_bins and rw_mask types changed in the strutures related to TC packets
paul -
r54:57edc38eadba default
parent child
Show More
@@ -1,796 +1,808
1 #ifndef CCSDS_TYPES_H_INCLUDED
1 #ifndef CCSDS_TYPES_H_INCLUDED
2 #define CCSDS_TYPES_H_INCLUDED
2 #define CCSDS_TYPES_H_INCLUDED
3
3
4 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
4 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
5 #define CCSDS_TC_TM_PACKET_OFFSET 7
5 #define CCSDS_TC_TM_PACKET_OFFSET 7
6 #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4
6 #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4
7 #define CCSDS_TM_PKT_MAX_SIZE 4412
7 #define CCSDS_TM_PKT_MAX_SIZE 4412
8 #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4
8 #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4
9 //#define CCSDS_TC_PKT_MAX_SIZE 256
9 //#define CCSDS_TC_PKT_MAX_SIZE 256
10 #define CCSDS_TC_PKT_MAX_SIZE 2048
10 #define CCSDS_TC_PKT_MAX_SIZE 2048
11 #define CCSDS_TC_PKT_MIN_SIZE 16
11 #define CCSDS_TC_PKT_MIN_SIZE 16
12 #define CCSDS_PROCESS_ID 76
12 #define CCSDS_PROCESS_ID 76
13 #define CCSDS_PACKET_CATEGORY 12
13 #define CCSDS_PACKET_CATEGORY 12
14 #define CCSDS_NODE_ADDRESS 0xfe
14 #define CCSDS_NODE_ADDRESS 0xfe
15 #define CCSDS_USER_APP 0x00
15 #define CCSDS_USER_APP 0x00
16
16
17 #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10
17 #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10
18 #define DEFAULT_RESERVED 0x00
18 #define DEFAULT_RESERVED 0x00
19 #define DEFAULT_HKBIA 0x1e // 0001 1110
19 #define DEFAULT_HKBIA 0x1e // 0001 1110
20
20
21 // PACKET ID
21 // PACKET ID
22 #define TM_PACKET_PID_DEFAULT 76
22 #define TM_PACKET_PID_DEFAULT 76
23 #define TM_PACKET_PID_BURST_SBM1_SBM2 79
23 #define TM_PACKET_PID_BURST_SBM1_SBM2 79
24 #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1
24 #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1
25 #define APID_TM_HK 0x0cc4 // PID 76 CAT 4
25 #define APID_TM_HK 0x0cc4 // PID 76 CAT 4
26 #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12
26 #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12
27 #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
27 #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
28 #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6
28 #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6
29 #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6
29 #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6
30 // PACKET CAT
30 // PACKET CAT
31 #define TM_PACKET_CAT_TC_EXE 1
31 #define TM_PACKET_CAT_TC_EXE 1
32 #define TM_PACKET_CAT_HK 4
32 #define TM_PACKET_CAT_HK 4
33 #define TM_PACKET_CAT_SCIENCE 12
33 #define TM_PACKET_CAT_SCIENCE 12
34 #define TM_PACKET_CAT_DUMP 6
34 #define TM_PACKET_CAT_DUMP 6
35
35
36 // PACKET SEQUENCE CONTROL
36 // PACKET SEQUENCE CONTROL
37 #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000]
37 #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000]
38 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
38 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
39 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
39 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
40 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
40 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
41 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
41 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
42
42
43 // DESTINATION ID
43 // DESTINATION ID
44 #define TM_DESTINATION_ID_GROUND 0
44 #define TM_DESTINATION_ID_GROUND 0
45 #define TM_DESTINATION_ID_MISSION_TIMELINE 110
45 #define TM_DESTINATION_ID_MISSION_TIMELINE 110
46 #define TM_DESTINATION_ID_TC_SEQUENCES 111
46 #define TM_DESTINATION_ID_TC_SEQUENCES 111
47 #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112
47 #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112
48 #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113
48 #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113
49 #define TM_DESTINATION_ID_DIRECT_CMD 120
49 #define TM_DESTINATION_ID_DIRECT_CMD 120
50 #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121
50 #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121
51 #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122
51 #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122
52 #define TM_DESTINATION_ID_OBCP 15
52 #define TM_DESTINATION_ID_OBCP 15
53 #define TM_DESTINATION_ID_SYSTEM_CONTROL 14
53 #define TM_DESTINATION_ID_SYSTEM_CONTROL 14
54 #define TM_DESTINATION_ID_AOCS 11
54 #define TM_DESTINATION_ID_AOCS 11
55
55
56 //*********************************************************
56 //*********************************************************
57 //*** /!\ change CCSDS_DESTINATION_ID before flight /!\ ***
57 //*** /!\ change CCSDS_DESTINATION_ID before flight /!\ ***
58 //*********************************************************
58 //*********************************************************
59 #ifdef LPP_DPU_DESTID
59 #ifdef LPP_DPU_DESTID
60 #define CCSDS_DESTINATION_ID 32
60 #define CCSDS_DESTINATION_ID 32
61 #else
61 #else
62 #define CCSDS_DESTINATION_ID 0x01
62 #define CCSDS_DESTINATION_ID 0x01
63 #endif
63 #endif
64 #define CCSDS_PROTOCOLE_ID 0x02
64 #define CCSDS_PROTOCOLE_ID 0x02
65 #define CCSDS_RESERVED 0x00
65 #define CCSDS_RESERVED 0x00
66 #define CCSDS_USER_APP 0x00
66 #define CCSDS_USER_APP 0x00
67
67
68 #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24
68 #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24
69 #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32
69 #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32
70 #define SIZE_HK_PARAMETERS 112
70 #define SIZE_HK_PARAMETERS 112
71
71
72 // TC TYPES
72 // TC TYPES
73 #define TC_TYPE_GEN 181
73 #define TC_TYPE_GEN 181
74 #define TC_TYPE_TIME 9
74 #define TC_TYPE_TIME 9
75
75
76 // TC SUBTYPES
76 // TC SUBTYPES
77 #define TC_SUBTYPE_RESET 1
77 #define TC_SUBTYPE_RESET 1
78 #define TC_SUBTYPE_LOAD_COMM 11
78 #define TC_SUBTYPE_LOAD_COMM 11
79 #define TC_SUBTYPE_LOAD_NORM 13
79 #define TC_SUBTYPE_LOAD_NORM 13
80 #define TC_SUBTYPE_LOAD_BURST 19
80 #define TC_SUBTYPE_LOAD_BURST 19
81 #define TC_SUBTYPE_LOAD_SBM1 25
81 #define TC_SUBTYPE_LOAD_SBM1 25
82 #define TC_SUBTYPE_LOAD_SBM2 27
82 #define TC_SUBTYPE_LOAD_SBM2 27
83 #define TC_SUBTYPE_DUMP 31
83 #define TC_SUBTYPE_DUMP 31
84 #define TC_SUBTYPE_ENTER 41
84 #define TC_SUBTYPE_ENTER 41
85 #define TC_SUBTYPE_UPDT_INFO 51
85 #define TC_SUBTYPE_UPDT_INFO 51
86 #define TC_SUBTYPE_EN_CAL 61
86 #define TC_SUBTYPE_EN_CAL 61
87 #define TC_SUBTYPE_DIS_CAL 63
87 #define TC_SUBTYPE_DIS_CAL 63
88 #define TC_SUBTYPE_LOAD_K 93
88 #define TC_SUBTYPE_LOAD_K 93
89 #define TC_SUBTYPE_DUMP_K 95
89 #define TC_SUBTYPE_DUMP_K 95
90 #define TC_SUBTYPE_LOAD_FBINS 91
90 #define TC_SUBTYPE_LOAD_FBINS 91
91 #define TC_SUBTYPE_LOAD_FILTER_PAR 97
91 #define TC_SUBTYPE_LOAD_FILTER_PAR 97
92 #define TC_SUBTYPE_UPDT_TIME 129
92 #define TC_SUBTYPE_UPDT_TIME 129
93
93
94 // TC LEN
94 // TC LEN
95 #define TC_LEN_RESET 12
95 #define TC_LEN_RESET 12
96 #define TC_LEN_LOAD_COMM 14
96 #define TC_LEN_LOAD_COMM 14
97 #define TC_LEN_LOAD_NORM 22
97 #define TC_LEN_LOAD_NORM 22
98 #define TC_LEN_LOAD_BURST 14
98 #define TC_LEN_LOAD_BURST 14
99 #define TC_LEN_LOAD_SBM1 14
99 #define TC_LEN_LOAD_SBM1 14
100 #define TC_LEN_LOAD_SBM2 14
100 #define TC_LEN_LOAD_SBM2 14
101 #define TC_LEN_DUMP 12
101 #define TC_LEN_DUMP 12
102 #define TC_LEN_ENTER 20
102 #define TC_LEN_ENTER 20
103 #define TC_LEN_UPDT_INFO 110
103 #define TC_LEN_UPDT_INFO 110
104 #define TC_LEN_EN_CAL 12
104 #define TC_LEN_EN_CAL 12
105 #define TC_LEN_DIS_CAL 12
105 #define TC_LEN_DIS_CAL 12
106 #define TC_LEN_LOAD_K 142
106 #define TC_LEN_LOAD_K 142
107 #define TC_LEN_DUMP_K 12
107 #define TC_LEN_DUMP_K 12
108 #define TC_LEN_LOAD_FBINS 60
108 #define TC_LEN_LOAD_FBINS 60
109 #define TC_LEN_LOAD_FILTER_PAR 28
109 #define TC_LEN_LOAD_FILTER_PAR 28
110 #define TC_LEN_UPDT_TIME 18
110 #define TC_LEN_UPDT_TIME 18
111
111
112 // PACKET CODES
112 // PACKET CODES
113 #define TM_CODE_K_DUMP 0xb5600b00 // 181 (0xb5) ** 96 (0x60) ** 11 (0x0b) ** 0 (0x00)
113 #define TM_CODE_K_DUMP 0xb5600b00 // 181 (0xb5) ** 96 (0x60) ** 11 (0x0b) ** 0 (0x00)
114
114
115 // TM TYPES
115 // TM TYPES
116 #define TM_TYPE_TC_EXE 1
116 #define TM_TYPE_TC_EXE 1
117 #define TM_TYPE_HK 3
117 #define TM_TYPE_HK 3
118 #define TM_TYPE_LFR_SCIENCE 21
118 #define TM_TYPE_LFR_SCIENCE 21
119 #define TM_TYPE_PARAMETER_DUMP 181
119 #define TM_TYPE_PARAMETER_DUMP 181
120 #define TM_TYPE_K_DUMP 181
120 #define TM_TYPE_K_DUMP 181
121
121
122 // TM SUBTYPES
122 // TM SUBTYPES
123 #define TM_SUBTYPE_EXE_OK 7
123 #define TM_SUBTYPE_EXE_OK 7
124 #define TM_SUBTYPE_EXE_NOK 8
124 #define TM_SUBTYPE_EXE_NOK 8
125 #define TM_SUBTYPE_HK 25
125 #define TM_SUBTYPE_HK 25
126 #define TM_SUBTYPE_LFR_SCIENCE_3 3 // TM packets with fixed size
126 #define TM_SUBTYPE_LFR_SCIENCE_3 3 // TM packets with fixed size
127 #define TM_SUBTYPE_LFR_SCIENCE_6 6 // TM packets with variable size
127 #define TM_SUBTYPE_LFR_SCIENCE_6 6 // TM packets with variable size
128 #define TM_SUBTYPE_PARAMETER_DUMP 32
128 #define TM_SUBTYPE_PARAMETER_DUMP 32
129 #define TM_SUBTYPE_K_DUMP 96
129 #define TM_SUBTYPE_K_DUMP 96
130
130
131 // FAILURE CODES
131 // FAILURE CODES
132 #define ILLEGAL_APID 0
132 #define ILLEGAL_APID 0
133 #define WRONG_LEN_PKT 1
133 #define WRONG_LEN_PKT 1
134 #define INCOR_CHECKSUM 2
134 #define INCOR_CHECKSUM 2
135 #define ILL_TYPE 3
135 #define ILL_TYPE 3
136 #define ILL_SUBTYPE 4
136 #define ILL_SUBTYPE 4
137 #define WRONG_APP_DATA 5 // 0x00 0x05
137 #define WRONG_APP_DATA 5 // 0x00 0x05
138 #define TC_NOT_EXE 42000 // 0xa4 0x10
138 #define TC_NOT_EXE 42000 // 0xa4 0x10
139 #define WRONG_SRC_ID 42001 // 0xa4 0x11
139 #define WRONG_SRC_ID 42001 // 0xa4 0x11
140 #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12
140 #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12
141 #define FAIL_DETECTED 42003 // 0xa4 0x13
141 #define FAIL_DETECTED 42003 // 0xa4 0x13
142 #define NOT_ALLOWED 42004 // 0xa4 0x14
142 #define NOT_ALLOWED 42004 // 0xa4 0x14
143 #define CORRUPTED 42005 // 0xa4 0x15
143 #define CORRUPTED 42005 // 0xa4 0x15
144 #define CCSDS_TM_VALID 7
144 #define CCSDS_TM_VALID 7
145
145
146 // HK_LFR_LAST_ER_RID
146 // HK_LFR_LAST_ER_RID
147 #define RID_LE_LFR_TIME 42119
147 #define RID_LE_LFR_TIME 42119
148 #define RID_LE_LFR_DPU_SPW 42128
148 #define RID_LE_LFR_DPU_SPW 42128
149 #define RID_LE_LFR_TIMEC 42129
149 #define RID_LE_LFR_TIMEC 42129
150 #define RID_ME_LFR_DPU_SPW 42338
150 #define RID_ME_LFR_DPU_SPW 42338
151 // HK_LFR_LAST_ER_CODE
151 // HK_LFR_LAST_ER_CODE
152 #define CODE_PARITY 1
152 #define CODE_PARITY 1
153 #define CODE_DISCONNECT 2
153 #define CODE_DISCONNECT 2
154 #define CODE_ESCAPE 3
154 #define CODE_ESCAPE 3
155 #define CODE_CREDIT 4
155 #define CODE_CREDIT 4
156 #define CODE_WRITE_SYNC 5
156 #define CODE_WRITE_SYNC 5
157 #define CODE_EARLY_EOP_EEP 6
157 #define CODE_EARLY_EOP_EEP 6
158 #define CODE_INVALID_ADDRESS 7
158 #define CODE_INVALID_ADDRESS 7
159 #define CODE_EEP 8
159 #define CODE_EEP 8
160 #define CODE_RX_TOO_BIG 9
160 #define CODE_RX_TOO_BIG 9
161 #define CODE_HEADER_CRC 16
161 #define CODE_HEADER_CRC 16
162 #define CODE_DATA_CRC 17
162 #define CODE_DATA_CRC 17
163 #define CODE_ERRONEOUS 20
163 #define CODE_ERRONEOUS 20
164 #define CODE_MISSING 21
164 #define CODE_MISSING 21
165 #define CODE_INVALID 22
165 #define CODE_INVALID 22
166 #define CODE_TIMECODE_IT 24
166 #define CODE_TIMECODE_IT 24
167 #define CODE_NOT_SYNCHRO 25
167 #define CODE_NOT_SYNCHRO 25
168 #define CODE_TIMECODE_CTR 26
168 #define CODE_TIMECODE_CTR 26
169
169
170 // TC SID
170 // TC SID
171 #define SID_TC_GROUND 0
171 #define SID_TC_GROUND 0
172 #define SID_TC_MISSION_TIMELINE 110
172 #define SID_TC_MISSION_TIMELINE 110
173 #define SID_TC_TC_SEQUENCES 111
173 #define SID_TC_TC_SEQUENCES 111
174 #define SID_TC_RECOVERY_ACTION_CMD 112
174 #define SID_TC_RECOVERY_ACTION_CMD 112
175 #define SID_TC_BACKUP_MISSION_TIMELINE 113
175 #define SID_TC_BACKUP_MISSION_TIMELINE 113
176 #define SID_TC_DIRECT_CMD 120
176 #define SID_TC_DIRECT_CMD 120
177 #define SID_TC_SPARE_GRD_SRC1 121
177 #define SID_TC_SPARE_GRD_SRC1 121
178 #define SID_TC_SPARE_GRD_SRC2 122
178 #define SID_TC_SPARE_GRD_SRC2 122
179 #define SID_TC_OBCP 15
179 #define SID_TC_OBCP 15
180 #define SID_TC_SYSTEM_CONTROL 14
180 #define SID_TC_SYSTEM_CONTROL 14
181 #define SID_TC_AOCS 11
181 #define SID_TC_AOCS 11
182 #define SID_TC_RPW_INTERNAL 254
182 #define SID_TC_RPW_INTERNAL 254
183
183
184 enum apid_destid{
184 enum apid_destid{
185 GROUND,
185 GROUND,
186 MISSION_TIMELINE,
186 MISSION_TIMELINE,
187 TC_SEQUENCES,
187 TC_SEQUENCES,
188 RECOVERY_ACTION_CMD,
188 RECOVERY_ACTION_CMD,
189 BACKUP_MISSION_TIMELINE,
189 BACKUP_MISSION_TIMELINE,
190 DIRECT_CMD,
190 DIRECT_CMD,
191 SPARE_GRD_SRC1,
191 SPARE_GRD_SRC1,
192 SPARE_GRD_SRC2,
192 SPARE_GRD_SRC2,
193 OBCP,
193 OBCP,
194 SYSTEM_CONTROL,
194 SYSTEM_CONTROL,
195 AOCS,
195 AOCS,
196 RPW_INTERNAL
196 RPW_INTERNAL
197 };
197 };
198 // SEQUENCE COUNTERS
198 // SEQUENCE COUNTERS
199 #define SEQ_CNT_MAX 16383
199 #define SEQ_CNT_MAX 16383
200 #define SEQ_CNT_NB_DEST_ID 12
200 #define SEQ_CNT_NB_DEST_ID 12
201
201
202 // TM SID
202 // TM SID
203 #define SID_HK 1
203 #define SID_HK 1
204
204
205 #define SID_NORM_SWF_F0 3
205 #define SID_NORM_SWF_F0 3
206 #define SID_NORM_SWF_F1 4
206 #define SID_NORM_SWF_F1 4
207 #define SID_NORM_SWF_F2 5
207 #define SID_NORM_SWF_F2 5
208 #define SID_NORM_CWF_F3 1
208 #define SID_NORM_CWF_F3 1
209 #define SID_BURST_CWF_F2 2
209 #define SID_BURST_CWF_F2 2
210 #define SID_SBM1_CWF_F1 24
210 #define SID_SBM1_CWF_F1 24
211 #define SID_SBM2_CWF_F2 25
211 #define SID_SBM2_CWF_F2 25
212 #define SID_NORM_ASM_F0 11
212 #define SID_NORM_ASM_F0 11
213 #define SID_NORM_ASM_F1 12
213 #define SID_NORM_ASM_F1 12
214 #define SID_NORM_ASM_F2 13
214 #define SID_NORM_ASM_F2 13
215 #define SID_NORM_BP1_F0 14
215 #define SID_NORM_BP1_F0 14
216 #define SID_NORM_BP1_F1 15
216 #define SID_NORM_BP1_F1 15
217 #define SID_NORM_BP1_F2 16
217 #define SID_NORM_BP1_F2 16
218 #define SID_NORM_BP2_F0 19
218 #define SID_NORM_BP2_F0 19
219 #define SID_NORM_BP2_F1 20
219 #define SID_NORM_BP2_F1 20
220 #define SID_NORM_BP2_F2 21
220 #define SID_NORM_BP2_F2 21
221 #define SID_BURST_BP1_F0 17
221 #define SID_BURST_BP1_F0 17
222 #define SID_BURST_BP2_F0 22
222 #define SID_BURST_BP2_F0 22
223 #define SID_BURST_BP1_F1 18
223 #define SID_BURST_BP1_F1 18
224 #define SID_BURST_BP2_F1 23
224 #define SID_BURST_BP2_F1 23
225 #define SID_SBM1_BP1_F0 28
225 #define SID_SBM1_BP1_F0 28
226 #define SID_SBM1_BP2_F0 31
226 #define SID_SBM1_BP2_F0 31
227 #define SID_SBM2_BP1_F0 29
227 #define SID_SBM2_BP1_F0 29
228 #define SID_SBM2_BP2_F0 32
228 #define SID_SBM2_BP2_F0 32
229 #define SID_SBM2_BP1_F1 30
229 #define SID_SBM2_BP1_F1 30
230 #define SID_SBM2_BP2_F1 33
230 #define SID_SBM2_BP2_F1 33
231 #define SID_NORM_CWF_LONG_F3 34
231 #define SID_NORM_CWF_LONG_F3 34
232
232
233 #define SID_PARAMETER_DUMP 10
233 #define SID_PARAMETER_DUMP 10
234 #define SID_K_DUMP 11
234 #define SID_K_DUMP 11
235
235
236 // HEADER_LENGTH
236 // HEADER_LENGTH
237 //#define TM_HEADER_LEN 16
237 //#define TM_HEADER_LEN 16
238 #define HEADER_LENGTH_TM_LFR_SCIENCE_CWF 32
238 #define HEADER_LENGTH_TM_LFR_SCIENCE_CWF 32
239 #define HEADER_LENGTH_TM_LFR_SCIENCE_SWF 34
239 #define HEADER_LENGTH_TM_LFR_SCIENCE_SWF 34
240 #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 34
240 #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 34
241 // PACKET_LENGTH
241 // PACKET_LENGTH
242 #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET)
242 #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET)
243 #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET)
243 #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET)
244 #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET)
244 #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET)
245 #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET)
245 #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET)
246 #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET)
246 #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET)
247 #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET)
247 #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET)
248 #define PACKET_LENGTH_HK (136 - CCSDS_TC_TM_PACKET_OFFSET)
248 #define PACKET_LENGTH_HK (136 - CCSDS_TC_TM_PACKET_OFFSET)
249 #define PACKET_LENGTH_PARAMETER_DUMP (148 - CCSDS_TC_TM_PACKET_OFFSET)
249 #define PACKET_LENGTH_PARAMETER_DUMP (148 - CCSDS_TC_TM_PACKET_OFFSET)
250 #define PACKET_LENGTH_K_DUMP (3920 - CCSDS_TC_TM_PACKET_OFFSET)
250 #define PACKET_LENGTH_K_DUMP (3920 - CCSDS_TC_TM_PACKET_OFFSET)
251 // SCIENCE ASM
251 // SCIENCE ASM
252 #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
252 #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
253 #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
253 #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
254 #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
254 #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
255 #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
255 #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
256 #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
256 #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
257 // SCIENCE NORM
257 // SCIENCE NORM
258 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (150 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 11 + 29 (1 spare byte in the header)
258 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (150 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 11 + 29 (1 spare byte in the header)
259 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (172 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 11 + 29 (1 spare byte in the header)
259 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (172 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 11 + 29 (1 spare byte in the header)
260 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (160 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 11 + 28
260 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (160 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 11 + 28
261 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (358 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 28
261 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (358 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 28
262 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (418 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 28
262 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (418 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 28
263 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (388 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 28
263 #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (388 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 28
264 // SCIENCE SBM
264 // SCIENCE SBM
265 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (270 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 11 + 28
265 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (270 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 11 + 28
266 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (688 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 28
266 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (688 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 28
267 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (314 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 11 + 28
267 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (314 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 11 + 28
268 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (808 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 28
268 #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (808 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 28
269
269
270 #define PACKET_LENGTH_DELTA 11 // 7 + 4
270 #define PACKET_LENGTH_DELTA 11 // 7 + 4
271
271
272 #define SPARE1_PUSVERSION_SPARE2 0x10
272 #define SPARE1_PUSVERSION_SPARE2 0x10
273
273
274 // R3
274 // R3
275 // one snapshot = 2048 samples = 6 packets * 304 + 224
275 // one snapshot = 2048 samples = 6 packets * 304 + 224
276 #define TM_LEN_SCI_SWF_304 (3678 - CCSDS_TC_TM_PACKET_OFFSET) // 304 * 12 + 30
276 #define TM_LEN_SCI_SWF_304 (3678 - CCSDS_TC_TM_PACKET_OFFSET) // 304 * 12 + 30
277 #define TM_LEN_SCI_SWF_224 (2718 - CCSDS_TC_TM_PACKET_OFFSET) // 224 * 12 + 30
277 #define TM_LEN_SCI_SWF_224 (2718 - CCSDS_TC_TM_PACKET_OFFSET) // 224 * 12 + 30
278 // one continuous buffer = 2688 samples = 8 packets * 336
278 // one continuous buffer = 2688 samples = 8 packets * 336
279 #define TM_LEN_SCI_CWF_336 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 336 * 12 + 28
279 #define TM_LEN_SCI_CWF_336 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 336 * 12 + 28
280 #define TM_LEN_SCI_CWF_672 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 672 * 6 + 28
280 #define TM_LEN_SCI_CWF_672 (4060 - CCSDS_TC_TM_PACKET_OFFSET) // 672 * 6 + 28
281 //
281 //
282 #define DEFAULT_PKTCNT 0x07
282 #define DEFAULT_PKTCNT 0x07
283 #define BLK_NR_304 0x0130
283 #define BLK_NR_304 0x0130
284 #define BLK_NR_224 0x00e0
284 #define BLK_NR_224 0x00e0
285 #define BLK_NR_CWF 0x0150 // 336
285 #define BLK_NR_CWF 0x0150 // 336
286 #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672
286 #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672
287
287
288 enum TM_TYPE{
288 enum TM_TYPE{
289 TM_LFR_TC_EXE_OK,
289 TM_LFR_TC_EXE_OK,
290 TM_LFR_TC_EXE_ERR,
290 TM_LFR_TC_EXE_ERR,
291 TM_LFR_HK,
291 TM_LFR_HK,
292 TM_LFR_SCI,
292 TM_LFR_SCI,
293 TM_LFR_SCI_SBM,
293 TM_LFR_SCI_SBM,
294 TM_LFR_PAR_DUMP
294 TM_LFR_PAR_DUMP
295 };
295 };
296
296
297 typedef struct {
297 typedef struct {
298 unsigned char targetLogicalAddress;
298 unsigned char targetLogicalAddress;
299 unsigned char protocolIdentifier;
299 unsigned char protocolIdentifier;
300 unsigned char reserved;
300 unsigned char reserved;
301 unsigned char userApplication;
301 unsigned char userApplication;
302 // PACKET HEADER
302 // PACKET HEADER
303 unsigned char packetID[2];
303 unsigned char packetID[2];
304 unsigned char packetSequenceControl[2];
304 unsigned char packetSequenceControl[2];
305 unsigned char packetLength[2];
305 unsigned char packetLength[2];
306 // DATA FIELD HEADER
306 // DATA FIELD HEADER
307 unsigned char spare1_pusVersion_spare2;
307 unsigned char spare1_pusVersion_spare2;
308 unsigned char serviceType;
308 unsigned char serviceType;
309 unsigned char serviceSubType;
309 unsigned char serviceSubType;
310 unsigned char destinationID;
310 unsigned char destinationID;
311 unsigned char time[6];
311 unsigned char time[6];
312 //
312 //
313 unsigned char telecommand_pkt_id[2];
313 unsigned char telecommand_pkt_id[2];
314 unsigned char pkt_seq_control[2];
314 unsigned char pkt_seq_control[2];
315 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
315 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
316
316
317 typedef struct {
317 typedef struct {
318 unsigned char targetLogicalAddress;
318 unsigned char targetLogicalAddress;
319 unsigned char protocolIdentifier;
319 unsigned char protocolIdentifier;
320 unsigned char reserved;
320 unsigned char reserved;
321 unsigned char userApplication;
321 unsigned char userApplication;
322 // PACKET HEADER
322 // PACKET HEADER
323 unsigned char packetID[2];
323 unsigned char packetID[2];
324 unsigned char packetSequenceControl[2];
324 unsigned char packetSequenceControl[2];
325 unsigned char packetLength[2];
325 unsigned char packetLength[2];
326 // DATA FIELD HEADER
326 // DATA FIELD HEADER
327 unsigned char spare1_pusVersion_spare2;
327 unsigned char spare1_pusVersion_spare2;
328 unsigned char serviceType;
328 unsigned char serviceType;
329 unsigned char serviceSubType;
329 unsigned char serviceSubType;
330 unsigned char destinationID;
330 unsigned char destinationID;
331 unsigned char time[6];
331 unsigned char time[6];
332 //
332 //
333 unsigned char telecommand_pkt_id[2];
333 unsigned char telecommand_pkt_id[2];
334 unsigned char pkt_seq_control[2];
334 unsigned char pkt_seq_control[2];
335 unsigned char tc_failure_code[2];
335 unsigned char tc_failure_code[2];
336 unsigned char tc_service;
336 unsigned char tc_service;
337 unsigned char tc_subtype;
337 unsigned char tc_subtype;
338 unsigned char byte_position;
338 unsigned char byte_position;
339 unsigned char rcv_value;
339 unsigned char rcv_value;
340 } Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
340 } Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
341
341
342 typedef struct {
342 typedef struct {
343 unsigned char targetLogicalAddress;
343 unsigned char targetLogicalAddress;
344 unsigned char protocolIdentifier;
344 unsigned char protocolIdentifier;
345 unsigned char reserved;
345 unsigned char reserved;
346 unsigned char userApplication;
346 unsigned char userApplication;
347 // PACKET HEADER
347 // PACKET HEADER
348 unsigned char packetID[2];
348 unsigned char packetID[2];
349 unsigned char packetSequenceControl[2];
349 unsigned char packetSequenceControl[2];
350 unsigned char packetLength[2];
350 unsigned char packetLength[2];
351 // DATA FIELD HEADER
351 // DATA FIELD HEADER
352 unsigned char spare1_pusVersion_spare2;
352 unsigned char spare1_pusVersion_spare2;
353 unsigned char serviceType;
353 unsigned char serviceType;
354 unsigned char serviceSubType;
354 unsigned char serviceSubType;
355 unsigned char destinationID;
355 unsigned char destinationID;
356 unsigned char time[6];
356 unsigned char time[6];
357 //
357 //
358 unsigned char telecommand_pkt_id[2];
358 unsigned char telecommand_pkt_id[2];
359 unsigned char pkt_seq_control[2];
359 unsigned char pkt_seq_control[2];
360 unsigned char tc_failure_code[2];
360 unsigned char tc_failure_code[2];
361 unsigned char tc_service;
361 unsigned char tc_service;
362 unsigned char tc_subtype;
362 unsigned char tc_subtype;
363 unsigned char lfr_status_word[2];
363 unsigned char lfr_status_word[2];
364 } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
364 } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
365
365
366 typedef struct {
366 typedef struct {
367 unsigned char targetLogicalAddress;
367 unsigned char targetLogicalAddress;
368 unsigned char protocolIdentifier;
368 unsigned char protocolIdentifier;
369 unsigned char reserved;
369 unsigned char reserved;
370 unsigned char userApplication;
370 unsigned char userApplication;
371 // PACKET HEADER
371 // PACKET HEADER
372 unsigned char packetID[2];
372 unsigned char packetID[2];
373 unsigned char packetSequenceControl[2];
373 unsigned char packetSequenceControl[2];
374 unsigned char packetLength[2];
374 unsigned char packetLength[2];
375 // DATA FIELD HEADER
375 // DATA FIELD HEADER
376 unsigned char spare1_pusVersion_spare2;
376 unsigned char spare1_pusVersion_spare2;
377 unsigned char serviceType;
377 unsigned char serviceType;
378 unsigned char serviceSubType;
378 unsigned char serviceSubType;
379 unsigned char destinationID;
379 unsigned char destinationID;
380 unsigned char time[6];
380 unsigned char time[6];
381 //
381 //
382 unsigned char telecommand_pkt_id[2];
382 unsigned char telecommand_pkt_id[2];
383 unsigned char pkt_seq_control[2];
383 unsigned char pkt_seq_control[2];
384 unsigned char tc_failure_code[2];
384 unsigned char tc_failure_code[2];
385 unsigned char tc_service;
385 unsigned char tc_service;
386 unsigned char tc_subtype;
386 unsigned char tc_subtype;
387 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
387 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
388
388
389 typedef struct {
389 typedef struct {
390 unsigned char targetLogicalAddress;
390 unsigned char targetLogicalAddress;
391 unsigned char protocolIdentifier;
391 unsigned char protocolIdentifier;
392 unsigned char reserved;
392 unsigned char reserved;
393 unsigned char userApplication;
393 unsigned char userApplication;
394 // PACKET HEADER
394 // PACKET HEADER
395 unsigned char packetID[2];
395 unsigned char packetID[2];
396 unsigned char packetSequenceControl[2];
396 unsigned char packetSequenceControl[2];
397 unsigned char packetLength[2];
397 unsigned char packetLength[2];
398 // DATA FIELD HEADER
398 // DATA FIELD HEADER
399 unsigned char spare1_pusVersion_spare2;
399 unsigned char spare1_pusVersion_spare2;
400 unsigned char serviceType;
400 unsigned char serviceType;
401 unsigned char serviceSubType;
401 unsigned char serviceSubType;
402 unsigned char destinationID;
402 unsigned char destinationID;
403 unsigned char time[6];
403 unsigned char time[6];
404 //
404 //
405 unsigned char telecommand_pkt_id[2];
405 unsigned char telecommand_pkt_id[2];
406 unsigned char pkt_seq_control[2];
406 unsigned char pkt_seq_control[2];
407 unsigned char tc_failure_code[2];
407 unsigned char tc_failure_code[2];
408 unsigned char tc_service;
408 unsigned char tc_service;
409 unsigned char tc_subtype;
409 unsigned char tc_subtype;
410 } Packet_TM_LFR_TC_EXE_ERROR_t;
410 } Packet_TM_LFR_TC_EXE_ERROR_t;
411
411
412 typedef struct {
412 typedef struct {
413 unsigned char targetLogicalAddress;
413 unsigned char targetLogicalAddress;
414 unsigned char protocolIdentifier;
414 unsigned char protocolIdentifier;
415 unsigned char reserved;
415 unsigned char reserved;
416 unsigned char userApplication;
416 unsigned char userApplication;
417 // PACKET HEADER
417 // PACKET HEADER
418 unsigned char packetID[2];
418 unsigned char packetID[2];
419 unsigned char packetSequenceControl[2];
419 unsigned char packetSequenceControl[2];
420 unsigned char packetLength[2];
420 unsigned char packetLength[2];
421 // DATA FIELD HEADER
421 // DATA FIELD HEADER
422 unsigned char spare1_pusVersion_spare2;
422 unsigned char spare1_pusVersion_spare2;
423 unsigned char serviceType;
423 unsigned char serviceType;
424 unsigned char serviceSubType;
424 unsigned char serviceSubType;
425 unsigned char destinationID;
425 unsigned char destinationID;
426 unsigned char time[6];
426 unsigned char time[6];
427 //
427 //
428 unsigned char telecommand_pkt_id[2];
428 unsigned char telecommand_pkt_id[2];
429 unsigned char pkt_seq_control[2];
429 unsigned char pkt_seq_control[2];
430 unsigned char tc_failure_code[2];
430 unsigned char tc_failure_code[2];
431 unsigned char tc_service;
431 unsigned char tc_service;
432 unsigned char tc_subtype;
432 unsigned char tc_subtype;
433 unsigned char pkt_len_rcv_value[2];
433 unsigned char pkt_len_rcv_value[2];
434 unsigned char pkt_datafieldsize_cnt[2];
434 unsigned char pkt_datafieldsize_cnt[2];
435 unsigned char rcv_crc[2];
435 unsigned char rcv_crc[2];
436 unsigned char computed_crc[2];
436 unsigned char computed_crc[2];
437 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
437 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
438
438
439 typedef struct {
439 typedef struct {
440 unsigned char targetLogicalAddress;
440 unsigned char targetLogicalAddress;
441 unsigned char protocolIdentifier;
441 unsigned char protocolIdentifier;
442 unsigned char reserved;
442 unsigned char reserved;
443 unsigned char userApplication;
443 unsigned char userApplication;
444 unsigned char packetID[2];
444 unsigned char packetID[2];
445 unsigned char packetSequenceControl[2];
445 unsigned char packetSequenceControl[2];
446 unsigned char packetLength[2];
446 unsigned char packetLength[2];
447 // DATA FIELD HEADER
447 // DATA FIELD HEADER
448 unsigned char spare1_pusVersion_spare2;
448 unsigned char spare1_pusVersion_spare2;
449 unsigned char serviceType;
449 unsigned char serviceType;
450 unsigned char serviceSubType;
450 unsigned char serviceSubType;
451 unsigned char destinationID;
451 unsigned char destinationID;
452 unsigned char time[6];
452 unsigned char time[6];
453 // AUXILIARY HEADER
453 // AUXILIARY HEADER
454 unsigned char sid;
454 unsigned char sid;
455 unsigned char pa_bia_status_info;
455 unsigned char pa_bia_status_info;
456 unsigned char sy_lfr_common_parameters_spare;
456 unsigned char sy_lfr_common_parameters_spare;
457 unsigned char sy_lfr_common_parameters;
457 unsigned char sy_lfr_common_parameters;
458 unsigned char pktCnt;
458 unsigned char pktCnt;
459 unsigned char pktNr;
459 unsigned char pktNr;
460 unsigned char acquisitionTime[6];
460 unsigned char acquisitionTime[6];
461 unsigned char blkNr[2];
461 unsigned char blkNr[2];
462 } Header_TM_LFR_SCIENCE_SWF_t;
462 } Header_TM_LFR_SCIENCE_SWF_t;
463
463
464 typedef struct {
464 typedef struct {
465 unsigned char targetLogicalAddress;
465 unsigned char targetLogicalAddress;
466 unsigned char protocolIdentifier;
466 unsigned char protocolIdentifier;
467 unsigned char reserved;
467 unsigned char reserved;
468 unsigned char userApplication;
468 unsigned char userApplication;
469 unsigned char packetID[2];
469 unsigned char packetID[2];
470 unsigned char packetSequenceControl[2];
470 unsigned char packetSequenceControl[2];
471 unsigned char packetLength[2];
471 unsigned char packetLength[2];
472 // DATA FIELD HEADER
472 // DATA FIELD HEADER
473 unsigned char spare1_pusVersion_spare2;
473 unsigned char spare1_pusVersion_spare2;
474 unsigned char serviceType;
474 unsigned char serviceType;
475 unsigned char serviceSubType;
475 unsigned char serviceSubType;
476 unsigned char destinationID;
476 unsigned char destinationID;
477 unsigned char time[6];
477 unsigned char time[6];
478 // AUXILIARY DATA HEADER
478 // AUXILIARY DATA HEADER
479 unsigned char sid;
479 unsigned char sid;
480 unsigned char pa_bia_status_info;
480 unsigned char pa_bia_status_info;
481 unsigned char sy_lfr_common_parameters_spare;
481 unsigned char sy_lfr_common_parameters_spare;
482 unsigned char sy_lfr_common_parameters;
482 unsigned char sy_lfr_common_parameters;
483 unsigned char acquisitionTime[6];
483 unsigned char acquisitionTime[6];
484 unsigned char blkNr[2];
484 unsigned char blkNr[2];
485 } Header_TM_LFR_SCIENCE_CWF_t;
485 } Header_TM_LFR_SCIENCE_CWF_t;
486
486
487 typedef struct {
487 typedef struct {
488 unsigned char targetLogicalAddress;
488 unsigned char targetLogicalAddress;
489 unsigned char protocolIdentifier;
489 unsigned char protocolIdentifier;
490 unsigned char reserved;
490 unsigned char reserved;
491 unsigned char userApplication;
491 unsigned char userApplication;
492 unsigned char packetID[2];
492 unsigned char packetID[2];
493 unsigned char packetSequenceControl[2];
493 unsigned char packetSequenceControl[2];
494 unsigned char packetLength[2];
494 unsigned char packetLength[2];
495 // DATA FIELD HEADER
495 // DATA FIELD HEADER
496 unsigned char spare1_pusVersion_spare2;
496 unsigned char spare1_pusVersion_spare2;
497 unsigned char serviceType;
497 unsigned char serviceType;
498 unsigned char serviceSubType;
498 unsigned char serviceSubType;
499 unsigned char destinationID;
499 unsigned char destinationID;
500 unsigned char time[6];
500 unsigned char time[6];
501 // AUXILIARY HEADER
501 // AUXILIARY HEADER
502 unsigned char sid;
502 unsigned char sid;
503 unsigned char pa_bia_status_info;
503 unsigned char pa_bia_status_info;
504 unsigned char sy_lfr_common_parameters_spare;
504 unsigned char sy_lfr_common_parameters_spare;
505 unsigned char sy_lfr_common_parameters;
505 unsigned char sy_lfr_common_parameters;
506 unsigned char pa_lfr_pkt_cnt_asm;
506 unsigned char pa_lfr_pkt_cnt_asm;
507 unsigned char pa_lfr_pkt_nr_asm;
507 unsigned char pa_lfr_pkt_nr_asm;
508 unsigned char acquisitionTime[6];
508 unsigned char acquisitionTime[6];
509 unsigned char pa_lfr_asm_blk_nr[2];
509 unsigned char pa_lfr_asm_blk_nr[2];
510 } Header_TM_LFR_SCIENCE_ASM_t;
510 } Header_TM_LFR_SCIENCE_ASM_t;
511
511
512 typedef struct {
512 typedef struct {
513 unsigned char targetLogicalAddress;
513 unsigned char targetLogicalAddress;
514 unsigned char protocolIdentifier;
514 unsigned char protocolIdentifier;
515 unsigned char reserved;
515 unsigned char reserved;
516 unsigned char userApplication;
516 unsigned char userApplication;
517 unsigned char packetID[2];
517 unsigned char packetID[2];
518 unsigned char packetSequenceControl[2];
518 unsigned char packetSequenceControl[2];
519 unsigned char packetLength[2];
519 unsigned char packetLength[2];
520 // DATA FIELD HEADER
520 // DATA FIELD HEADER
521 unsigned char spare1_pusVersion_spare2;
521 unsigned char spare1_pusVersion_spare2;
522 unsigned char serviceType;
522 unsigned char serviceType;
523 unsigned char serviceSubType;
523 unsigned char serviceSubType;
524 unsigned char destinationID;
524 unsigned char destinationID;
525 unsigned char time[6];
525 unsigned char time[6];
526 // AUXILIARY HEADER
526 // AUXILIARY HEADER
527 unsigned char sid;
527 unsigned char sid;
528 unsigned char pa_bia_status_info;
528 unsigned char pa_bia_status_info;
529 unsigned char sy_lfr_common_parameters_spare;
529 unsigned char sy_lfr_common_parameters_spare;
530 unsigned char sy_lfr_common_parameters;
530 unsigned char sy_lfr_common_parameters;
531 unsigned char acquisitionTime[6];
531 unsigned char acquisitionTime[6];
532 unsigned char source_data_spare;
532 unsigned char source_data_spare;
533 unsigned char pa_lfr_bp_blk_nr[2];
533 unsigned char pa_lfr_bp_blk_nr[2];
534 } Header_TM_LFR_SCIENCE_BP_with_spare_t;
534 } Header_TM_LFR_SCIENCE_BP_with_spare_t;
535
535
536 typedef struct {
536 typedef struct {
537 unsigned char targetLogicalAddress;
537 unsigned char targetLogicalAddress;
538 unsigned char protocolIdentifier;
538 unsigned char protocolIdentifier;
539 unsigned char reserved;
539 unsigned char reserved;
540 unsigned char userApplication;
540 unsigned char userApplication;
541 unsigned char packetID[2];
541 unsigned char packetID[2];
542 unsigned char packetSequenceControl[2];
542 unsigned char packetSequenceControl[2];
543 unsigned char packetLength[2];
543 unsigned char packetLength[2];
544 // DATA FIELD HEADER
544 // DATA FIELD HEADER
545 unsigned char spare1_pusVersion_spare2;
545 unsigned char spare1_pusVersion_spare2;
546 unsigned char serviceType;
546 unsigned char serviceType;
547 unsigned char serviceSubType;
547 unsigned char serviceSubType;
548 unsigned char destinationID;
548 unsigned char destinationID;
549 unsigned char time[6];
549 unsigned char time[6];
550 // AUXILIARY HEADER
550 // AUXILIARY HEADER
551 unsigned char sid;
551 unsigned char sid;
552 unsigned char pa_bia_status_info;
552 unsigned char pa_bia_status_info;
553 unsigned char sy_lfr_common_parameters_spare;
553 unsigned char sy_lfr_common_parameters_spare;
554 unsigned char sy_lfr_common_parameters;
554 unsigned char sy_lfr_common_parameters;
555 unsigned char acquisitionTime[6];
555 unsigned char acquisitionTime[6];
556 unsigned char pa_lfr_bp_blk_nr[2];
556 unsigned char pa_lfr_bp_blk_nr[2];
557 } Header_TM_LFR_SCIENCE_BP_t;
557 } Header_TM_LFR_SCIENCE_BP_t;
558
558
559 typedef struct {
559 typedef struct {
560 //targetLogicalAddress is removed by the grspw module
560 //targetLogicalAddress is removed by the grspw module
561 unsigned char protocolIdentifier;
561 unsigned char protocolIdentifier;
562 unsigned char reserved;
562 unsigned char reserved;
563 unsigned char userApplication;
563 unsigned char userApplication;
564 unsigned char packetID[2];
564 unsigned char packetID[2];
565 unsigned char packetSequenceControl[2];
565 unsigned char packetSequenceControl[2];
566 unsigned char packetLength[2];
566 unsigned char packetLength[2];
567 // DATA FIELD HEADER
567 // DATA FIELD HEADER
568 unsigned char headerFlag_pusVersion_Ack;
568 unsigned char headerFlag_pusVersion_Ack;
569 unsigned char serviceType;
569 unsigned char serviceType;
570 unsigned char serviceSubType;
570 unsigned char serviceSubType;
571 unsigned char sourceID;
571 unsigned char sourceID;
572 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
572 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
573 } ccsdsTelecommandPacket_t;
573 } ccsdsTelecommandPacket_t;
574
574
575 typedef struct {
575 typedef struct {
576 unsigned char targetLogicalAddress;
576 unsigned char targetLogicalAddress;
577 unsigned char protocolIdentifier;
577 unsigned char protocolIdentifier;
578 unsigned char reserved;
578 unsigned char reserved;
579 unsigned char userApplication;
579 unsigned char userApplication;
580 unsigned char packetID[2];
580 unsigned char packetID[2];
581 unsigned char packetSequenceControl[2];
581 unsigned char packetSequenceControl[2];
582 unsigned char packetLength[2];
582 unsigned char packetLength[2];
583 unsigned char spare1_pusVersion_spare2;
583 unsigned char spare1_pusVersion_spare2;
584 unsigned char serviceType;
584 unsigned char serviceType;
585 unsigned char serviceSubType;
585 unsigned char serviceSubType;
586 unsigned char destinationID;
586 unsigned char destinationID;
587 unsigned char time[6];
587 unsigned char time[6];
588 unsigned char sid;
588 unsigned char sid;
589
589
590 //**************
590 //**************
591 // HK PARAMETERS
591 // HK PARAMETERS
592 unsigned char lfr_status_word[2];
592 unsigned char lfr_status_word[2];
593 unsigned char lfr_sw_version[4];
593 unsigned char lfr_sw_version[4];
594 unsigned char lfr_fpga_version[3];
594 unsigned char lfr_fpga_version[3];
595 // ressource statistics
595 // ressource statistics
596 unsigned char hk_lfr_cpu_load;
596 unsigned char hk_lfr_cpu_load;
597 unsigned char hk_lfr_cpu_load_max;
597 unsigned char hk_lfr_cpu_load_max;
598 unsigned char hk_lfr_cpu_load_aver;
598 unsigned char hk_lfr_cpu_load_aver;
599 unsigned char hk_lfr_q_sd_fifo_size_max;
599 unsigned char hk_lfr_q_sd_fifo_size_max;
600 unsigned char hk_lfr_q_sd_fifo_size;
600 unsigned char hk_lfr_q_sd_fifo_size;
601 unsigned char hk_lfr_q_rv_fifo_size_max;
601 unsigned char hk_lfr_q_rv_fifo_size_max;
602 unsigned char hk_lfr_q_rv_fifo_size;
602 unsigned char hk_lfr_q_rv_fifo_size;
603 unsigned char hk_lfr_q_p0_fifo_size_max;
603 unsigned char hk_lfr_q_p0_fifo_size_max;
604 unsigned char hk_lfr_q_p0_fifo_size;
604 unsigned char hk_lfr_q_p0_fifo_size;
605 unsigned char hk_lfr_q_p1_fifo_size_max;
605 unsigned char hk_lfr_q_p1_fifo_size_max;
606 unsigned char hk_lfr_q_p1_fifo_size;
606 unsigned char hk_lfr_q_p1_fifo_size;
607 unsigned char hk_lfr_q_p2_fifo_size_max;
607 unsigned char hk_lfr_q_p2_fifo_size_max;
608 unsigned char hk_lfr_q_p2_fifo_size;
608 unsigned char hk_lfr_q_p2_fifo_size;
609 // tc statistics
609 // tc statistics
610 unsigned char hk_lfr_update_info_tc_cnt[2];
610 unsigned char hk_lfr_update_info_tc_cnt[2];
611 unsigned char hk_lfr_update_time_tc_cnt[2];
611 unsigned char hk_lfr_update_time_tc_cnt[2];
612 unsigned char hk_lfr_exe_tc_cnt[2];
612 unsigned char hk_lfr_exe_tc_cnt[2];
613 unsigned char hk_lfr_rej_tc_cnt[2];
613 unsigned char hk_lfr_rej_tc_cnt[2];
614 unsigned char hk_lfr_last_exe_tc_id[2];
614 unsigned char hk_lfr_last_exe_tc_id[2];
615 unsigned char hk_lfr_last_exe_tc_type[2];
615 unsigned char hk_lfr_last_exe_tc_type[2];
616 unsigned char hk_lfr_last_exe_tc_subtype[2];
616 unsigned char hk_lfr_last_exe_tc_subtype[2];
617 unsigned char hk_lfr_last_exe_tc_time[6];
617 unsigned char hk_lfr_last_exe_tc_time[6];
618 unsigned char hk_lfr_last_rej_tc_id[2];
618 unsigned char hk_lfr_last_rej_tc_id[2];
619 unsigned char hk_lfr_last_rej_tc_type[2];
619 unsigned char hk_lfr_last_rej_tc_type[2];
620 unsigned char hk_lfr_last_rej_tc_subtype[2];
620 unsigned char hk_lfr_last_rej_tc_subtype[2];
621 unsigned char hk_lfr_last_rej_tc_time[6];
621 unsigned char hk_lfr_last_rej_tc_time[6];
622 // anomaly statistics
622 // anomaly statistics
623 unsigned char hk_lfr_le_cnt[2];
623 unsigned char hk_lfr_le_cnt[2];
624 unsigned char hk_lfr_me_cnt[2];
624 unsigned char hk_lfr_me_cnt[2];
625 unsigned char hk_lfr_he_cnt[2];
625 unsigned char hk_lfr_he_cnt[2];
626 unsigned char hk_lfr_last_er_rid[2];
626 unsigned char hk_lfr_last_er_rid[2];
627 unsigned char hk_lfr_last_er_code;
627 unsigned char hk_lfr_last_er_code;
628 unsigned char hk_lfr_last_er_time[6];
628 unsigned char hk_lfr_last_er_time[6];
629 // vhdl_blk_status
629 // vhdl_blk_status
630 unsigned char hk_lfr_vhdl_aa_sm;