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