##// END OF EJS Templates
sync
paul -
r21:f562608749cc default
parent child
Show More
@@ -1,203 +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 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 96 unsigned char crc[2];
97 97 } Packet_TC_LFR_UPDATE_INFO_t;
98 98
99 99 typedef struct
100 100 { // the CCSDS header is added by LPPMON
101 101 unsigned char packetID[2];
102 102 unsigned char packetSequenceControl[2];
103 103 unsigned char packetLength[2];
104 104 // DATA FIELD HEADER
105 105 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
106 106 unsigned char serviceType;
107 107 unsigned char serviceSubType;
108 108 unsigned char sourceID;
109 109 unsigned char crc[2];
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 unsigned char bw_sp0_sp1_r0_r1;
123 unsigned char bw_sp0_sp1_r0_r1_r2;
124 124 unsigned char crc[2];
125 125 } Packet_TC_LFR_LOAD_COMMON_PAR_t;
126 126
127 127 typedef struct
128 128 { // the CCSDS header is added by LPPMON
129 129 unsigned char packetID[2];
130 130 unsigned char packetSequenceControl[2];
131 131 unsigned char packetLength[2];
132 132 // DATA FIELD HEADER
133 133 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
134 134 unsigned char serviceType;
135 135 unsigned char serviceSubType;
136 136 unsigned char sourceID;
137 137 unsigned char sy_lfr_n_swf_l[2];
138 138 unsigned char sy_lfr_n_swf_p[2];
139 139 unsigned char sy_lfr_n_asm_p[2];
140 140 unsigned char sy_lfr_n_bp_p0;
141 141 unsigned char sy_lfr_n_bp_p1;
142 142 unsigned char sy_lfr_n_cwf_long_f3;
143 143 unsigned char lfr_normal_parameters_spare;
144 144 unsigned char crc[2];
145 145 } Packet_TC_LFR_LOAD_NORMAL_PAR_t;
146 146
147 147 typedef struct
148 148 { // the CCSDS header is added by LPPMON
149 149 unsigned char packetID[2];
150 150 unsigned char packetSequenceControl[2];
151 151 unsigned char packetLength[2];
152 152 // DATA FIELD HEADER
153 153 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
154 154 unsigned char serviceType;
155 155 unsigned char serviceSubType;
156 156 unsigned char sourceID;
157 157 unsigned char sy_lfr_bp_p0;
158 158 unsigned char sy_lfr_bp_p1;
159 159 unsigned char crc[2];
160 160 } Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_t;
161 161
162 162 typedef struct
163 163 { // the CCSDS header is added by LPPMON
164 164 unsigned char packetID[2];
165 165 unsigned char packetSequenceControl[2];
166 166 unsigned char packetLength[2];
167 167 // DATA FIELD HEADER
168 168 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
169 169 unsigned char serviceType;
170 170 unsigned char serviceSubType;
171 171 unsigned char sourceID;
172 172 unsigned char crc[2];
173 173 } Packet_TC_LFR_ENABLE_DISABLE_CALIBRATION_t;
174 174
175 175 typedef struct
176 176 { // the CCSDS header is added by LPPMON
177 177 unsigned char packetID[2];
178 178 unsigned char packetSequenceControl[2];
179 179 unsigned char packetLength[2];
180 180 // DATA FIELD HEADER
181 181 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
182 182 unsigned char serviceType;
183 183 unsigned char serviceSubType;
184 184 unsigned char sourceID;
185 185 unsigned char cp_rpw_time[6];
186 186 unsigned char crc[2];
187 187 } Packet_TC_LFR_UPDATE_TIME_t;
188 188
189 189 typedef struct
190 190 { // the CCSDS header is added by LPPMON
191 191 unsigned char packetID[2];
192 192 unsigned char packetSequenceControl[2];
193 193 unsigned char packetLength[2];
194 194 // DATA FIELD HEADER
195 195 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
196 196 unsigned char serviceType;
197 197 unsigned char serviceSubType;
198 198 unsigned char sourceID;
199 199 unsigned char crc[2];
200 200
201 201 } Packet_TC_LFR_DUMP_KCOEFFICIENTS_t;
202 202
203 203 #endif // TC_TYPES_H
General Comments 0
You need to be logged in to leave comments. Login now