##// END OF EJS Templates
TC_LFR_UPDATE_INFO updated
paul -
r24:c2455640a395 default
parent child
Show More
@@ -1,203 +1,235
1 #ifndef TC_TYPES_H
1 #ifndef TC_TYPES_H
2 #define TC_TYPES_H
2 #define TC_TYPES_H
3
3
4 #include <ccsds_types.h>
4 #include <ccsds_types.h>
5
5
6 #define PROTOCOLE_IDENTIFIER 0x02
6 #define PROTOCOLE_IDENTIFIER 0x02
7
7
8 // PACKET ID
8 // PACKET ID
9 #define TC_LFR_PACKET_ID 0x1ccc // PID 76 CAT 12
9 #define TC_LFR_PACKET_ID 0x1ccc // PID 76 CAT 12
10
10
11 #define PACKET_LENGTH_TC_LFR_RESET (12 - CCSDS_TC_TM_PACKET_OFFSET)
11 #define PACKET_LENGTH_TC_LFR_RESET (12 - CCSDS_TC_TM_PACKET_OFFSET)
12 #define PACKET_LENGTH_TC_LFR_LOAD_COMMON_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
12 #define PACKET_LENGTH_TC_LFR_LOAD_COMMON_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
13 #define PACKET_LENGTH_TC_LFR_LOAD_NORMAL_PAR (22 - CCSDS_TC_TM_PACKET_OFFSET)
13 #define PACKET_LENGTH_TC_LFR_LOAD_NORMAL_PAR (22 - CCSDS_TC_TM_PACKET_OFFSET)
14 #define PACKET_LENGTH_TC_LFR_LOAD_BURST_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
14 #define PACKET_LENGTH_TC_LFR_LOAD_BURST_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
15 #define PACKET_LENGTH_TC_LFR_LOAD_SBM1_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
15 #define PACKET_LENGTH_TC_LFR_LOAD_SBM1_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
16 #define PACKET_LENGTH_TC_LFR_LOAD_SBM2_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
16 #define PACKET_LENGTH_TC_LFR_LOAD_SBM2_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
17 #define PACKET_LENGTH_TC_LFR_DUMP_PAR (12 - CCSDS_TC_TM_PACKET_OFFSET)
17 #define PACKET_LENGTH_TC_LFR_DUMP_PAR (12 - CCSDS_TC_TM_PACKET_OFFSET)
18 #define PACKET_LENGTH_TC_LFR_ENTER_MODE (20 - CCSDS_TC_TM_PACKET_OFFSET)
18 #define PACKET_LENGTH_TC_LFR_ENTER_MODE (20 - CCSDS_TC_TM_PACKET_OFFSET)
19 #define PACKET_LENGTH_TC_LFR_UPDATE_INFO (46 - CCSDS_TC_TM_PACKET_OFFSET)
19 #define PACKET_LENGTH_TC_LFR_UPDATE_INFO (110- CCSDS_TC_TM_PACKET_OFFSET)
20 #define PACKET_LENGTH_TC_LFR_ENABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET)
20 #define PACKET_LENGTH_TC_LFR_ENABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET)
21 #define PACKET_LENGTH_TC_LFR_DISABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET)
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 #define PACKET_LENGTH_TC_LFR_DUMP_KCOEFFICIENTS (12 - CCSDS_TC_TM_PACKET_OFFSET)
23 #define PACKET_LENGTH_TC_LFR_UPDATE_TIME (18 - CCSDS_TC_TM_PACKET_OFFSET)
23 #define PACKET_LENGTH_TC_LFR_UPDATE_TIME (18 - CCSDS_TC_TM_PACKET_OFFSET)
24
24
25 // TC TYPES
25 // TC TYPES
26 #define TC_TYPE_DEFAULT 181
26 #define TC_TYPE_DEFAULT 181
27 #define TC_TYPE_LFR_UPDATE_TIME 9
27 #define TC_TYPE_LFR_UPDATE_TIME 9
28
28
29 // TC SUBTYPES
29 // TC SUBTYPES
30 #define TC_SUBTYPE_RESET 1
30 #define TC_SUBTYPE_RESET 1
31 #define TC_SUBTYPE_LOAD_COMMON_PAR 11
31 #define TC_SUBTYPE_LOAD_COMMON_PAR 11
32 #define TC_SUBTYPE_LOAD_NORMAL_PAR 13
32 #define TC_SUBTYPE_LOAD_NORMAL_PAR 13
33 #define TC_SUBTYPE_LOAD_BURST_PAR 19
33 #define TC_SUBTYPE_LOAD_BURST_PAR 19
34 #define TC_SUBTYPE_LOAD_SBM1_PAR 25
34 #define TC_SUBTYPE_LOAD_SBM1_PAR 25
35 #define TC_SUBTYPE_LOAD_SBM2_PAR 27
35 #define TC_SUBTYPE_LOAD_SBM2_PAR 27
36 #define TC_SUBTYPE_DUMP_PAR 31
36 #define TC_SUBTYPE_DUMP_PAR 31
37 #define TC_SUBTYPE_ENTER_MODE 41
37 #define TC_SUBTYPE_ENTER_MODE 41
38 #define TC_SUBTYPE_UPDATE_INFO 51
38 #define TC_SUBTYPE_UPDATE_INFO 51
39 #define TC_SUBTYPE_ENABLE_CALIBRATION 61
39 #define TC_SUBTYPE_ENABLE_CALIBRATION 61
40 #define TC_SUBTYPE_DISABLE_CALIBRATION 63
40 #define TC_SUBTYPE_DISABLE_CALIBRATION 63
41 #define TC_SUBTYPE_UPDATE_TIME 129
41 #define TC_SUBTYPE_UPDATE_TIME 129
42
42
43 // OTHER CONSTANTS
43 // OTHER CONSTANTS
44 #define TC_LFR_PACKET_SEQUENCE_CONTROL 0xc000 // PID 76 CAT 12
44 #define TC_LFR_PACKET_SEQUENCE_CONTROL 0xc000 // PID 76 CAT 12
45 #define TC_LFR_DATA_FIELD_HEADER0 0x19
45 #define TC_LFR_DATA_FIELD_HEADER0 0x19
46 #define TC_LFR_LOAD_COMMON_PAR_SPARE 0x00
46 #define TC_LFR_LOAD_COMMON_PAR_SPARE 0x00
47
47
48 typedef struct
48 typedef struct
49 { // the CCSDS header is added by LPPMON
49 { // the CCSDS header is added by LPPMON
50 unsigned char packetID[2];
50 unsigned char packetID[2];
51 unsigned char packetSequenceControl[2];
51 unsigned char packetSequenceControl[2];
52 unsigned char packetLength[2];
52 unsigned char packetLength[2];
53 // DATA FIELD HEADER
53 // DATA FIELD HEADER
54 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
54 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
55 unsigned char serviceType;
55 unsigned char serviceType;
56 unsigned char serviceSubType;
56 unsigned char serviceSubType;
57 unsigned char sourceID;
57 unsigned char sourceID;
58 unsigned char crc[2];
58 unsigned char crc[2];
59 } Packet_TC_LFR_RESET_t;
59 } Packet_TC_LFR_RESET_t;
60
60
61 typedef struct
61 typedef struct
62 { // the CCSDS header is added by LPPMON
62 { // the CCSDS header is added by LPPMON
63 unsigned char packetID[2];
63 unsigned char packetID[2];
64 unsigned char packetSequenceControl[2];
64 unsigned char packetSequenceControl[2];
65 unsigned char packetLength[2];
65 unsigned char packetLength[2];
66 // DATA FIELD HEADER
66 // DATA FIELD HEADER
67 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
67 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
68 unsigned char serviceType;
68 unsigned char serviceType;
69 unsigned char serviceSubType;
69 unsigned char serviceSubType;
70 unsigned char sourceID;
70 unsigned char sourceID;
71 unsigned char spare;
71 unsigned char spare;
72 unsigned char mode;
72 unsigned char mode;
73 unsigned char enterModeTime[6];
73 unsigned char enterModeTime[6];
74 unsigned char crc[2];
74 unsigned char crc[2];
75 } Packet_TC_LFR_ENTER_MODE_t;
75 } Packet_TC_LFR_ENTER_MODE_t;
76
76
77 typedef struct
77 typedef struct
78 { // the CCSDS header is added by LPPMON
78 { // the CCSDS header is added by LPPMON
79 unsigned char packetID[2];
79 unsigned char packetID[2];
80 unsigned char packetSequenceControl[2];
80 unsigned char packetSequenceControl[2];
81 unsigned char packetLength[2];
81 unsigned char packetLength[2];
82 // DATA FIELD HEADER
82 // DATA FIELD HEADER
83 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
83 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
84 unsigned char serviceType;
84 unsigned char serviceType;
85 unsigned char serviceSubType;
85 unsigned char serviceSubType;
86 unsigned char sourceID;
86 unsigned char sourceID;
87 unsigned char set1;
87 unsigned char set1;
88 unsigned char set2;
88 unsigned char set2;
89 unsigned char set3_bias_setting_set1[6];
89 unsigned char set3_bias_setting_set1[6];
90 unsigned char set3_bias_setting_set2[6];
90 unsigned char set3_bias_setting_set2[6];
91 unsigned char set3_bias_voltage[4];
91 unsigned char set3_bias_voltage[4];
92 unsigned char set4[8];
92 unsigned char set4[8];
93 unsigned char set5;
93 unsigned char set5;
94 unsigned char set6;
94 unsigned char set6;
95 unsigned char set7[8];
95 unsigned char set7[8];
96 unsigned char spare1[2];
97 unsigned char spare2[2];
98 unsigned char spare3[2];
99 unsigned char spare4[2];
100 unsigned char spare5[2];
101 unsigned char spare6[2];
102 unsigned char spare7[2];
103 unsigned char spare8[2];
104 unsigned char spare9[2];
105 unsigned char spare10[2];
106 unsigned char spare11[2];
107 unsigned char spare12[2];
108 unsigned char spare13[2];
109 unsigned char spare14[2];
110 unsigned char spare15[2];
111 unsigned char spare16[2];
112 unsigned char spare17[2];
113 unsigned char spare18[2];
114 unsigned char spare19[2];
115 unsigned char spare20[2];
116 unsigned char spare21[2];
117 unsigned char spare22[2];
118 unsigned char spare23[2];
119 unsigned char spare24[2];
120 unsigned char spare25[2];
121 unsigned char spare26[2];
122 unsigned char spare27[2];
123 unsigned char spare28[2];
124 unsigned char spare29[2];
125 unsigned char spare30[2];
126 unsigned char spare31[2];
127 unsigned char spare32[2];
96 unsigned char crc[2];
128 unsigned char crc[2];
97 } Packet_TC_LFR_UPDATE_INFO_t;
129 } Packet_TC_LFR_UPDATE_INFO_t;
98
130
99 typedef struct
131 typedef struct
100 { // the CCSDS header is added by LPPMON
132 { // the CCSDS header is added by LPPMON
101 unsigned char packetID[2];
133 unsigned char packetID[2];
102 unsigned char packetSequenceControl[2];
134 unsigned char packetSequenceControl[2];
103 unsigned char packetLength[2];
135 unsigned char packetLength[2];
104 // DATA FIELD HEADER
136 // DATA FIELD HEADER
105 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
137 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
106 unsigned char serviceType;
138 unsigned char serviceType;
107 unsigned char serviceSubType;
139 unsigned char serviceSubType;
108 unsigned char sourceID;
140 unsigned char sourceID;
109 unsigned char crc[2];
141 unsigned char crc[2];
110 } Packet_TC_LFR_DUMP_PAR_t;
142 } Packet_TC_LFR_DUMP_PAR_t;
111
143
112 typedef struct
144 typedef struct
113 { // the CCSDS header is added by LPPMON
145 { // the CCSDS header is added by LPPMON
114 unsigned char packetID[2];
146 unsigned char packetID[2];
115 unsigned char packetSequenceControl[2];
147 unsigned char packetSequenceControl[2];
116 unsigned char packetLength[2];
148 unsigned char packetLength[2];
117 // DATA FIELD HEADER
149 // DATA FIELD HEADER
118 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
150 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
119 unsigned char serviceType;
151 unsigned char serviceType;
120 unsigned char serviceSubType;
152 unsigned char serviceSubType;
121 unsigned char sourceID;
153 unsigned char sourceID;
122 unsigned char spare;
154 unsigned char spare;
123 unsigned char bw_sp0_sp1_r0_r1_r2;
155 unsigned char bw_sp0_sp1_r0_r1_r2;
124 unsigned char crc[2];
156 unsigned char crc[2];
125 } Packet_TC_LFR_LOAD_COMMON_PAR_t;
157 } Packet_TC_LFR_LOAD_COMMON_PAR_t;
126
158
127 typedef struct
159 typedef struct
128 { // the CCSDS header is added by LPPMON
160 { // the CCSDS header is added by LPPMON
129 unsigned char packetID[2];
161 unsigned char packetID[2];
130 unsigned char packetSequenceControl[2];
162 unsigned char packetSequenceControl[2];
131 unsigned char packetLength[2];
163 unsigned char packetLength[2];
132 // DATA FIELD HEADER
164 // DATA FIELD HEADER
133 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
165 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
134 unsigned char serviceType;
166 unsigned char serviceType;
135 unsigned char serviceSubType;
167 unsigned char serviceSubType;
136 unsigned char sourceID;
168 unsigned char sourceID;
137 unsigned char sy_lfr_n_swf_l[2];
169 unsigned char sy_lfr_n_swf_l[2];
138 unsigned char sy_lfr_n_swf_p[2];
170 unsigned char sy_lfr_n_swf_p[2];
139 unsigned char sy_lfr_n_asm_p[2];
171 unsigned char sy_lfr_n_asm_p[2];
140 unsigned char sy_lfr_n_bp_p0;
172 unsigned char sy_lfr_n_bp_p0;
141 unsigned char sy_lfr_n_bp_p1;
173 unsigned char sy_lfr_n_bp_p1;
142 unsigned char sy_lfr_n_cwf_long_f3;
174 unsigned char sy_lfr_n_cwf_long_f3;
143 unsigned char lfr_normal_parameters_spare;
175 unsigned char lfr_normal_parameters_spare;
144 unsigned char crc[2];
176 unsigned char crc[2];
145 } Packet_TC_LFR_LOAD_NORMAL_PAR_t;
177 } Packet_TC_LFR_LOAD_NORMAL_PAR_t;
146
178
147 typedef struct
179 typedef struct
148 { // the CCSDS header is added by LPPMON
180 { // the CCSDS header is added by LPPMON
149 unsigned char packetID[2];
181 unsigned char packetID[2];
150 unsigned char packetSequenceControl[2];
182 unsigned char packetSequenceControl[2];
151 unsigned char packetLength[2];
183 unsigned char packetLength[2];
152 // DATA FIELD HEADER
184 // DATA FIELD HEADER
153 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
185 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
154 unsigned char serviceType;
186 unsigned char serviceType;
155 unsigned char serviceSubType;
187 unsigned char serviceSubType;
156 unsigned char sourceID;
188 unsigned char sourceID;
157 unsigned char sy_lfr_bp_p0;
189 unsigned char sy_lfr_bp_p0;
158 unsigned char sy_lfr_bp_p1;
190 unsigned char sy_lfr_bp_p1;
159 unsigned char crc[2];
191 unsigned char crc[2];
160 } Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_t;
192 } Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_t;
161
193
162 typedef struct
194 typedef struct
163 { // the CCSDS header is added by LPPMON
195 { // the CCSDS header is added by LPPMON
164 unsigned char packetID[2];
196 unsigned char packetID[2];
165 unsigned char packetSequenceControl[2];
197 unsigned char packetSequenceControl[2];
166 unsigned char packetLength[2];
198 unsigned char packetLength[2];
167 // DATA FIELD HEADER
199 // DATA FIELD HEADER
168 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
200 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
169 unsigned char serviceType;
201 unsigned char serviceType;
170 unsigned char serviceSubType;
202 unsigned char serviceSubType;
171 unsigned char sourceID;
203 unsigned char sourceID;
172 unsigned char crc[2];
204 unsigned char crc[2];
173 } Packet_TC_LFR_ENABLE_DISABLE_CALIBRATION_t;
205 } Packet_TC_LFR_ENABLE_DISABLE_CALIBRATION_t;
174
206
175 typedef struct
207 typedef struct
176 { // the CCSDS header is added by LPPMON
208 { // the CCSDS header is added by LPPMON
177 unsigned char packetID[2];
209 unsigned char packetID[2];
178 unsigned char packetSequenceControl[2];
210 unsigned char packetSequenceControl[2];
179 unsigned char packetLength[2];
211 unsigned char packetLength[2];
180 // DATA FIELD HEADER
212 // DATA FIELD HEADER
181 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
213 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
182 unsigned char serviceType;
214 unsigned char serviceType;
183 unsigned char serviceSubType;
215 unsigned char serviceSubType;
184 unsigned char sourceID;
216 unsigned char sourceID;
185 unsigned char cp_rpw_time[6];
217 unsigned char cp_rpw_time[6];
186 unsigned char crc[2];
218 unsigned char crc[2];
187 } Packet_TC_LFR_UPDATE_TIME_t;
219 } Packet_TC_LFR_UPDATE_TIME_t;
188
220
189 typedef struct
221 typedef struct
190 { // the CCSDS header is added by LPPMON
222 { // the CCSDS header is added by LPPMON
191 unsigned char packetID[2];
223 unsigned char packetID[2];
192 unsigned char packetSequenceControl[2];
224 unsigned char packetSequenceControl[2];
193 unsigned char packetLength[2];
225 unsigned char packetLength[2];
194 // DATA FIELD HEADER
226 // DATA FIELD HEADER
195 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
227 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
196 unsigned char serviceType;
228 unsigned char serviceType;
197 unsigned char serviceSubType;
229 unsigned char serviceSubType;
198 unsigned char sourceID;
230 unsigned char sourceID;
199 unsigned char crc[2];
231 unsigned char crc[2];
200
232
201 } Packet_TC_LFR_DUMP_KCOEFFICIENTS_t;
233 } Packet_TC_LFR_DUMP_KCOEFFICIENTS_t;
202
234
203 #endif // TC_TYPES_H
235 #endif // TC_TYPES_H
General Comments 0
You need to be logged in to leave comments. Login now