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