@@ -0,0 +1,24 | |||||
|
1 | #ifndef TC_ACCEPTANCE_H_INCLUDED | |||
|
2 | #define TC_ACCEPTANCE_H_INCLUDED | |||
|
3 | ||||
|
4 | //#include "tm_lfr_tc_exe.h" | |||
|
5 | #include "fsw_params.h" | |||
|
6 | ||||
|
7 | //********************** | |||
|
8 | // GENERAL USE FUNCTIONS | |||
|
9 | unsigned int Crc_opt( unsigned char D, unsigned int Chk); | |||
|
10 | void initLookUpTableForCRC( void ); | |||
|
11 | void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData); | |||
|
12 | ||||
|
13 | //********************* | |||
|
14 | // ACCEPTANCE FUNCTIONS | |||
|
15 | int tc_parser(ccsdsTelecommandPacket_t * TCPacket, unsigned int TC_LEN_RCV, unsigned char *computed_CRC); | |||
|
16 | int tc_check_type( unsigned char packetType ); | |||
|
17 | int tc_check_subtype( unsigned char packetType ); | |||
|
18 | int tc_check_length( unsigned char packetType, unsigned int length ); | |||
|
19 | int tc_check_crc(ccsdsTelecommandPacket_t * TCPacket, unsigned int length , unsigned char *computed_CRC); | |||
|
20 | ||||
|
21 | #endif // TC_ACCEPTANCE_H_INCLUDED | |||
|
22 | ||||
|
23 | ||||
|
24 |
@@ -0,0 +1,374 | |||||
|
1 | /** Functions related to TeleCommand acceptance. | |||
|
2 | * | |||
|
3 | * @file | |||
|
4 | * @author P. LEROY | |||
|
5 | * | |||
|
6 | * A group of functions to handle TeleCommands parsing.\n | |||
|
7 | * | |||
|
8 | */ | |||
|
9 | ||||
|
10 | #include "tc_acceptance.h" | |||
|
11 | ||||
|
12 | unsigned int lookUpTableForCRC[256]; | |||
|
13 | ||||
|
14 | //********************** | |||
|
15 | // GENERAL USE FUNCTIONS | |||
|
16 | unsigned int Crc_opt( unsigned char D, unsigned int Chk) | |||
|
17 | { | |||
|
18 | /** This function generate the CRC for one byte and returns the value of the new syndrome. | |||
|
19 | * | |||
|
20 | * @param D is the current byte of data. | |||
|
21 | * @param Chk is the current syndrom value. | |||
|
22 | * @return the value of the new syndrome on two bytes. | |||
|
23 | * | |||
|
24 | */ | |||
|
25 | ||||
|
26 | return(((Chk << 8) & 0xff00)^lookUpTableForCRC [(((Chk >> 8)^D) & 0x00ff)]); | |||
|
27 | } | |||
|
28 | ||||
|
29 | void initLookUpTableForCRC( void ) | |||
|
30 | { | |||
|
31 | /** This function is used to initiates the look-up table for fast CRC computation. | |||
|
32 | * | |||
|
33 | * The global table lookUpTableForCRC[256] is initiated. | |||
|
34 | * | |||
|
35 | */ | |||
|
36 | ||||
|
37 | unsigned int i; | |||
|
38 | unsigned int tmp; | |||
|
39 | ||||
|
40 | for (i=0; i<256; i++) | |||
|
41 | { | |||
|
42 | tmp = 0; | |||
|
43 | if((i & 1) != 0) { | |||
|
44 | tmp = tmp ^ 0x1021; | |||
|
45 | } | |||
|
46 | if((i & 2) != 0) { | |||
|
47 | tmp = tmp ^ 0x2042; | |||
|
48 | } | |||
|
49 | if((i & 4) != 0) { | |||
|
50 | tmp = tmp ^ 0x4084; | |||
|
51 | } | |||
|
52 | if((i & 8) != 0) { | |||
|
53 | tmp = tmp ^ 0x8108; | |||
|
54 | } | |||
|
55 | if((i & 16) != 0) { | |||
|
56 | tmp = tmp ^ 0x1231; | |||
|
57 | } | |||
|
58 | if((i & 32) != 0) { | |||
|
59 | tmp = tmp ^ 0x2462; | |||
|
60 | } | |||
|
61 | if((i & 64) != 0) { | |||
|
62 | tmp = tmp ^ 0x48c4; | |||
|
63 | } | |||
|
64 | if((i & 128) != 0) { | |||
|
65 | tmp = tmp ^ 0x9188; | |||
|
66 | } | |||
|
67 | lookUpTableForCRC[i] = tmp; | |||
|
68 | } | |||
|
69 | } | |||
|
70 | ||||
|
71 | void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData) | |||
|
72 | { | |||
|
73 | /** This function calculates a two bytes Cyclic Redundancy Code. | |||
|
74 | * | |||
|
75 | * @param data points to a buffer containing the data on which to compute the CRC. | |||
|
76 | * @param crcAsTwoBytes points points to a two bytes buffer in which the CRC is stored. | |||
|
77 | * @param sizeOfData is the number of bytes of *data* used to compute the CRC. | |||
|
78 | * | |||
|
79 | * The specification of the Cyclic Redundancy Code is described in the following document: ECSS-E-70-41-A. | |||
|
80 | * | |||
|
81 | */ | |||
|
82 | ||||
|
83 | unsigned int Chk; | |||
|
84 | int j; | |||
|
85 | Chk = 0xffff; // reset the syndrom to all ones | |||
|
86 | for (j=0; j<sizeOfData; j++) { | |||
|
87 | Chk = Crc_opt(data[j], Chk); | |||
|
88 | } | |||
|
89 | crcAsTwoBytes[0] = (unsigned char) (Chk >> 8); | |||
|
90 | crcAsTwoBytes[1] = (unsigned char) (Chk & 0x00ff); | |||
|
91 | } | |||
|
92 | ||||
|
93 | //********************* | |||
|
94 | // ACCEPTANCE FUNCTIONS | |||
|
95 | int tc_parser(ccsdsTelecommandPacket_t * TCPacket, unsigned int TC_LEN_RCV, unsigned char *computed_CRC) | |||
|
96 | { | |||
|
97 | /** This function parses TeleCommands. | |||
|
98 | * | |||
|
99 | * @param TC points to the TeleCommand that will be parsed. | |||
|
100 | * @param TC_LEN_RCV is the received packet length. | |||
|
101 | * @return Status code of the parsing. | |||
|
102 | * | |||
|
103 | * The parsing checks: | |||
|
104 | * - process id | |||
|
105 | * - category | |||
|
106 | * - length: a global check is performed and a per subtype check also | |||
|
107 | * - type | |||
|
108 | * - subtype | |||
|
109 | * - crc | |||
|
110 | * | |||
|
111 | */ | |||
|
112 | ||||
|
113 | int status; | |||
|
114 | unsigned char pid; | |||
|
115 | unsigned char category; | |||
|
116 | unsigned int length; | |||
|
117 | unsigned char packetType; | |||
|
118 | unsigned char packetSubtype; | |||
|
119 | ||||
|
120 | status = CCSDS_TM_VALID; | |||
|
121 | ||||
|
122 | // APID check *** APID on 2 bytes | |||
|
123 | pid = ((TCPacket->packetID[0] & 0x07)<<4) + ( (TCPacket->packetID[1]>>4) & 0x0f ); // PID = 11 *** 7 bits xxxxx210 7654xxxx | |||
|
124 | category = (TCPacket->packetID[1] & 0x0f); // PACKET_CATEGORY = 12 *** 4 bits xxxxxxxx xxxx3210 | |||
|
125 | length = (TCPacket->packetLength[0] * 256) + TCPacket->packetLength[1]; | |||
|
126 | packetType = TCPacket->serviceType; | |||
|
127 | packetSubtype = TCPacket->serviceSubType; | |||
|
128 | ||||
|
129 | if ( pid != CCSDS_PROCESS_ID ) // CHECK THE PROCESS ID | |||
|
130 | { | |||
|
131 | status = ILLEGAL_APID; | |||
|
132 | } | |||
|
133 | if (status == CCSDS_TM_VALID) // CHECK THE CATEGORY | |||
|
134 | { | |||
|
135 | if ( category != CCSDS_PACKET_CATEGORY ) | |||
|
136 | { | |||
|
137 | status = ILLEGAL_APID; | |||
|
138 | } | |||
|
139 | } | |||
|
140 | if (status == CCSDS_TM_VALID) // CHECK THE PACKET LENGTH FIELD AND THE ACTUAL LENGTH COMPLIANCE | |||
|
141 | { | |||
|
142 | if (length != TC_LEN_RCV ) { | |||
|
143 | status = WRONG_LEN_PACKET; | |||
|
144 | } | |||
|
145 | } | |||
|
146 | if (status == CCSDS_TM_VALID) // CHECK THAT THE PACKET DOES NOT EXCEED THE MAX SIZE | |||
|
147 | { | |||
|
148 | if ( length >= CCSDS_TC_PKT_MAX_SIZE ) { | |||
|
149 | status = WRONG_LEN_PACKET; | |||
|
150 | } | |||
|
151 | } | |||
|
152 | if (status == CCSDS_TM_VALID) // CHECK THE TYPE | |||
|
153 | { | |||
|
154 | status = tc_check_type( packetType ); | |||
|
155 | } | |||
|
156 | if (status == CCSDS_TM_VALID) // CHECK THE SUBTYPE | |||
|
157 | { | |||
|
158 | status = tc_check_subtype( packetSubtype ); | |||
|
159 | } | |||
|
160 | if (status == CCSDS_TM_VALID) // CHECK THE SUBTYPE AND LENGTH COMPLIANCE | |||
|
161 | { | |||
|
162 | status = tc_check_length( packetSubtype, length ); | |||
|
163 | } | |||
|
164 | if (status == CCSDS_TM_VALID ) // CHECK CRC | |||
|
165 | { | |||
|
166 | status = tc_check_crc( TCPacket, length, computed_CRC ); | |||
|
167 | } | |||
|
168 | ||||
|
169 | return status; | |||
|
170 | } | |||
|
171 | ||||
|
172 | int tc_check_type( unsigned char packetType ) | |||
|
173 | { | |||
|
174 | /** This function checks that the type of a TeleCommand is valid. | |||
|
175 | * | |||
|
176 | * @param packetType is the type to check. | |||
|
177 | * @return Status code CCSDS_TM_VALID or ILL_TYPE. | |||
|
178 | * | |||
|
179 | */ | |||
|
180 | ||||
|
181 | int status; | |||
|
182 | ||||
|
183 | if ( (packetType == TC_TYPE_GEN) || (packetType == TC_TYPE_TIME)) | |||
|
184 | { | |||
|
185 | status = CCSDS_TM_VALID; | |||
|
186 | } | |||
|
187 | else | |||
|
188 | { | |||
|
189 | status = ILL_TYPE; | |||
|
190 | } | |||
|
191 | ||||
|
192 | return status; | |||
|
193 | } | |||
|
194 | ||||
|
195 | int tc_check_subtype( unsigned char packetSubType ) | |||
|
196 | { | |||
|
197 | /** This function checks that the subtype of a TeleCommand is valid. | |||
|
198 | * | |||
|
199 | * @param packetSubType is the subtype to check. | |||
|
200 | * @return Status code CCSDS_TM_VALID or ILL_SUBTYPE. | |||
|
201 | * | |||
|
202 | */ | |||
|
203 | ||||
|
204 | int status; | |||
|
205 | ||||
|
206 | if ( (packetSubType == TC_SUBTYPE_RESET) | |||
|
207 | || (packetSubType == TC_SUBTYPE_LOAD_COMM) | |||
|
208 | || (packetSubType == TC_SUBTYPE_LOAD_NORM) || (packetSubType == TC_SUBTYPE_LOAD_BURST) | |||
|
209 | || (packetSubType == TC_SUBTYPE_LOAD_SBM1) || (packetSubType == TC_SUBTYPE_LOAD_SBM2) | |||
|
210 | || (packetSubType == TC_SUBTYPE_DUMP) | |||
|
211 | || (packetSubType == TC_SUBTYPE_ENTER) | |||
|
212 | || (packetSubType == TC_SUBTYPE_UPDT_INFO) || (packetSubType == TC_SUBTYPE_UPDT_TIME) | |||
|
213 | || (packetSubType == TC_SUBTYPE_EN_CAL) || (packetSubType == TC_SUBTYPE_DIS_CAL) ) | |||
|
214 | { | |||
|
215 | status = CCSDS_TM_VALID; | |||
|
216 | } | |||
|
217 | else | |||
|
218 | { | |||
|
219 | status = ILL_TYPE; | |||
|
220 | } | |||
|
221 | ||||
|
222 | return status; | |||
|
223 | } | |||
|
224 | ||||
|
225 | int tc_check_length( unsigned char packetSubType, unsigned int length ) | |||
|
226 | { | |||
|
227 | /** This function checks that the subtype and the length are compliant. | |||
|
228 | * | |||
|
229 | * @param packetSubType is the subtype to check. | |||
|
230 | * @param length is the length to check. | |||
|
231 | * @return Status code CCSDS_TM_VALID or ILL_TYPE. | |||
|
232 | * | |||
|
233 | */ | |||
|
234 | ||||
|
235 | int status; | |||
|
236 | ||||
|
237 | status = LFR_SUCCESSFUL; | |||
|
238 | ||||
|
239 | switch(packetSubType) | |||
|
240 | { | |||
|
241 | case TC_SUBTYPE_RESET: | |||
|
242 | if (length!=(TC_LEN_RESET-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
243 | status = WRONG_LEN_PACKET; | |||
|
244 | } | |||
|
245 | else { | |||
|
246 | status = CCSDS_TM_VALID; | |||
|
247 | } | |||
|
248 | break; | |||
|
249 | case TC_SUBTYPE_LOAD_COMM: | |||
|
250 | if (length!=(TC_LEN_LOAD_COMM-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
251 | status = WRONG_LEN_PACKET; | |||
|
252 | } | |||
|
253 | else { | |||
|
254 | status = CCSDS_TM_VALID; | |||
|
255 | } | |||
|
256 | break; | |||
|
257 | case TC_SUBTYPE_LOAD_NORM: | |||
|
258 | if (length!=(TC_LEN_LOAD_NORM-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
259 | status = WRONG_LEN_PACKET; | |||
|
260 | } | |||
|
261 | else { | |||
|
262 | status = CCSDS_TM_VALID; | |||
|
263 | } | |||
|
264 | break; | |||
|
265 | case TC_SUBTYPE_LOAD_BURST: | |||
|
266 | if (length!=(TC_LEN_LOAD_BURST-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
267 | status = WRONG_LEN_PACKET; | |||
|
268 | } | |||
|
269 | else { | |||
|
270 | status = CCSDS_TM_VALID; | |||
|
271 | } | |||
|
272 | break; | |||
|
273 | case TC_SUBTYPE_LOAD_SBM1: | |||
|
274 | if (length!=(TC_LEN_LOAD_SBM1-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
275 | status = WRONG_LEN_PACKET; | |||
|
276 | } | |||
|
277 | else { | |||
|
278 | status = CCSDS_TM_VALID; | |||
|
279 | } | |||
|
280 | break; | |||
|
281 | case TC_SUBTYPE_LOAD_SBM2: | |||
|
282 | if (length!=(TC_LEN_LOAD_SBM2-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
283 | status = WRONG_LEN_PACKET; | |||
|
284 | } | |||
|
285 | else { | |||
|
286 | status = CCSDS_TM_VALID; | |||
|
287 | } | |||
|
288 | break; | |||
|
289 | case TC_SUBTYPE_DUMP: | |||
|
290 | if (length!=(TC_LEN_DUMP-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
291 | status = WRONG_LEN_PACKET; | |||
|
292 | } | |||
|
293 | else { | |||
|
294 | status = CCSDS_TM_VALID; | |||
|
295 | } | |||
|
296 | break; | |||
|
297 | case TC_SUBTYPE_ENTER: | |||
|
298 | if (length!=(TC_LEN_ENTER-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
299 | status = WRONG_LEN_PACKET; | |||
|
300 | } | |||
|
301 | else { | |||
|
302 | status = CCSDS_TM_VALID; | |||
|
303 | } | |||
|
304 | break; | |||
|
305 | case TC_SUBTYPE_UPDT_INFO: | |||
|
306 | if (length!=(TC_LEN_UPDT_INFO-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
307 | status = WRONG_LEN_PACKET; | |||
|
308 | } | |||
|
309 | else { | |||
|
310 | status = CCSDS_TM_VALID; | |||
|
311 | } | |||
|
312 | break; | |||
|
313 | case TC_SUBTYPE_EN_CAL: | |||
|
314 | if (length!=(TC_LEN_EN_CAL-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
315 | status = WRONG_LEN_PACKET; | |||
|
316 | } | |||
|
317 | else { | |||
|
318 | status = CCSDS_TM_VALID; | |||
|
319 | } | |||
|
320 | break; | |||
|
321 | case TC_SUBTYPE_DIS_CAL: | |||
|
322 | if (length!=(TC_LEN_DIS_CAL-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
323 | status = WRONG_LEN_PACKET; | |||
|
324 | } | |||
|
325 | else { | |||
|
326 | status = CCSDS_TM_VALID; | |||
|
327 | } | |||
|
328 | break; | |||
|
329 | case TC_SUBTYPE_UPDT_TIME: | |||
|
330 | if (length!=(TC_LEN_UPDT_TIME-CCSDS_TC_TM_PACKET_OFFSET)) { | |||
|
331 | status = WRONG_LEN_PACKET; | |||
|
332 | } | |||
|
333 | else { | |||
|
334 | status = CCSDS_TM_VALID; | |||
|
335 | } | |||
|
336 | break; | |||
|
337 | default: // if the subtype is not a legal value, return ILL_SUBTYPE | |||
|
338 | status = ILL_SUBTYPE; | |||
|
339 | break ; | |||
|
340 | } | |||
|
341 | ||||
|
342 | return status; | |||
|
343 | } | |||
|
344 | ||||
|
345 | int tc_check_crc( ccsdsTelecommandPacket_t * TCPacket, unsigned int length, unsigned char *computed_CRC ) | |||
|
346 | { | |||
|
347 | /** This function checks the CRC validity of the corresponding TeleCommand packet. | |||
|
348 | * | |||
|
349 | * @param TCPacket points to the TeleCommand packet to check. | |||
|
350 | * @param length is the length of the TC packet. | |||
|
351 | * @return Status code CCSDS_TM_VALID or INCOR_CHECKSUM. | |||
|
352 | * | |||
|
353 | */ | |||
|
354 | ||||
|
355 | int status; | |||
|
356 | unsigned char * CCSDSContent; | |||
|
357 | ||||
|
358 | CCSDSContent = (unsigned char*) TCPacket->packetID; | |||
|
359 | GetCRCAsTwoBytes(CCSDSContent, computed_CRC, length + CCSDS_TC_TM_PACKET_OFFSET - 2); // 2 CRC bytes removed from the calculation of the CRC | |||
|
360 | if (computed_CRC[0] != CCSDSContent[length + CCSDS_TC_TM_PACKET_OFFSET -2]) { | |||
|
361 | status = INCOR_CHECKSUM; | |||
|
362 | } | |||
|
363 | else if (computed_CRC[1] != CCSDSContent[length + CCSDS_TC_TM_PACKET_OFFSET -1]) { | |||
|
364 | status = INCOR_CHECKSUM; | |||
|
365 | } | |||
|
366 | else { | |||
|
367 | status = CCSDS_TM_VALID; | |||
|
368 | } | |||
|
369 | ||||
|
370 | return status; | |||
|
371 | } | |||
|
372 | ||||
|
373 | ||||
|
374 |
@@ -1,243 +1,248 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Oct 18 15:44:51 2013 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | ####### Compiler, tools and options |
|
9 | ####### Compiler, tools and options | |
10 |
|
10 | |||
11 | CC = sparc-rtems-gcc |
|
11 | CC = sparc-rtems-gcc | |
12 | CXX = sparc-rtems-g++ |
|
12 | CXX = sparc-rtems-g++ | |
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=16 -DPRINT_MESSAGES_ON_CONSOLE |
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=16 -DPRINT_MESSAGES_ON_CONSOLE | |
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header | |
17 | LINK = sparc-rtems-g++ |
|
17 | LINK = sparc-rtems-g++ | |
18 | LFLAGS = |
|
18 | LFLAGS = | |
19 | LIBS = $(SUBLIBS) |
|
19 | LIBS = $(SUBLIBS) | |
20 | AR = sparc-rtems-ar rcs |
|
20 | AR = sparc-rtems-ar rcs | |
21 | RANLIB = |
|
21 | RANLIB = | |
22 | QMAKE = /usr/bin/qmake-qt4 |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
23 | TAR = tar -cf |
|
23 | TAR = tar -cf | |
24 | COMPRESS = gzip -9f |
|
24 | COMPRESS = gzip -9f | |
25 | COPY = cp -f |
|
25 | COPY = cp -f | |
26 | SED = sed |
|
26 | SED = sed | |
27 | COPY_FILE = $(COPY) |
|
27 | COPY_FILE = $(COPY) | |
28 | COPY_DIR = $(COPY) -r |
|
28 | COPY_DIR = $(COPY) -r | |
29 | STRIP = sparc-rtems-strip |
|
29 | STRIP = sparc-rtems-strip | |
30 | INSTALL_FILE = install -m 644 -p |
|
30 | INSTALL_FILE = install -m 644 -p | |
31 | INSTALL_DIR = $(COPY_DIR) |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
32 | INSTALL_PROGRAM = install -m 755 -p |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
33 | DEL_FILE = rm -f |
|
33 | DEL_FILE = rm -f | |
34 | SYMLINK = ln -f -s |
|
34 | SYMLINK = ln -f -s | |
35 | DEL_DIR = rmdir |
|
35 | DEL_DIR = rmdir | |
36 | MOVE = mv -f |
|
36 | MOVE = mv -f | |
37 | CHK_DIR_EXISTS= test -d |
|
37 | CHK_DIR_EXISTS= test -d | |
38 | MKDIR = mkdir -p |
|
38 | MKDIR = mkdir -p | |
39 |
|
39 | |||
40 | ####### Output directory |
|
40 | ####### Output directory | |
41 |
|
41 | |||
42 | OBJECTS_DIR = obj/ |
|
42 | OBJECTS_DIR = obj/ | |
43 |
|
43 | |||
44 | ####### Files |
|
44 | ####### Files | |
45 |
|
45 | |||
46 | SOURCES = ../src/wf_handler.c \ |
|
46 | SOURCES = ../src/wf_handler.c \ | |
47 | ../src/tc_handler.c \ |
|
47 | ../src/tc_handler.c \ | |
48 | ../src/fsw_processing.c \ |
|
48 | ../src/fsw_processing.c \ | |
49 | ../src/fsw_misc.c \ |
|
49 | ../src/fsw_misc.c \ | |
50 | ../src/fsw_init.c \ |
|
50 | ../src/fsw_init.c \ | |
51 | ../src/fsw_globals.c \ |
|
51 | ../src/fsw_globals.c \ | |
52 | ../src/fsw_spacewire.c \ |
|
52 | ../src/fsw_spacewire.c \ | |
53 | ../src/tc_load_dump_parameters.c \ |
|
53 | ../src/tc_load_dump_parameters.c \ | |
54 | ../src/tm_lfr_tc_exe.c |
|
54 | ../src/tm_lfr_tc_exe.c \ | |
|
55 | ../src/tc_acceptance.c | |||
55 | OBJECTS = obj/wf_handler.o \ |
|
56 | OBJECTS = obj/wf_handler.o \ | |
56 | obj/tc_handler.o \ |
|
57 | obj/tc_handler.o \ | |
57 | obj/fsw_processing.o \ |
|
58 | obj/fsw_processing.o \ | |
58 | obj/fsw_misc.o \ |
|
59 | obj/fsw_misc.o \ | |
59 | obj/fsw_init.o \ |
|
60 | obj/fsw_init.o \ | |
60 | obj/fsw_globals.o \ |
|
61 | obj/fsw_globals.o \ | |
61 | obj/fsw_spacewire.o \ |
|
62 | obj/fsw_spacewire.o \ | |
62 | obj/tc_load_dump_parameters.o \ |
|
63 | obj/tc_load_dump_parameters.o \ | |
63 | obj/tm_lfr_tc_exe.o |
|
64 | obj/tm_lfr_tc_exe.o \ | |
|
65 | obj/tc_acceptance.o | |||
64 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
66 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
65 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
67 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
66 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
68 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
67 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
69 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
68 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
70 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
69 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
71 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
70 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
72 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
71 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
73 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
72 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
74 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
73 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
75 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
74 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
76 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
75 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
77 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
76 | sparc.pri \ |
|
78 | sparc.pri \ | |
77 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
79 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
78 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
79 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
81 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
80 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
82 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
81 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
83 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
82 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
83 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
84 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
86 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
86 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
88 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
87 | fsw-qt.pro |
|
89 | fsw-qt.pro | |
88 | QMAKE_TARGET = fsw |
|
90 | QMAKE_TARGET = fsw | |
89 | DESTDIR = bin/ |
|
91 | DESTDIR = bin/ | |
90 | TARGET = bin/fsw |
|
92 | TARGET = bin/fsw | |
91 |
|
93 | |||
92 | first: all |
|
94 | first: all | |
93 | ####### Implicit rules |
|
95 | ####### Implicit rules | |
94 |
|
96 | |||
95 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
97 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
96 |
|
98 | |||
97 | .cpp.o: |
|
99 | .cpp.o: | |
98 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
100 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
99 |
|
101 | |||
100 | .cc.o: |
|
102 | .cc.o: | |
101 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
103 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
102 |
|
104 | |||
103 | .cxx.o: |
|
105 | .cxx.o: | |
104 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
106 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
105 |
|
107 | |||
106 | .C.o: |
|
108 | .C.o: | |
107 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
109 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
108 |
|
110 | |||
109 | .c.o: |
|
111 | .c.o: | |
110 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
112 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
111 |
|
113 | |||
112 | ####### Build rules |
|
114 | ####### Build rules | |
113 |
|
115 | |||
114 | all: Makefile $(TARGET) |
|
116 | all: Makefile $(TARGET) | |
115 |
|
117 | |||
116 | $(TARGET): $(OBJECTS) |
|
118 | $(TARGET): $(OBJECTS) | |
117 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
119 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
118 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
120 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
119 |
|
121 | |||
120 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
122 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
121 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
123 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
122 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
124 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
123 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
125 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
124 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
126 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
125 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
127 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
126 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
128 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
127 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
129 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
128 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
130 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
129 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
131 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
130 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
132 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
131 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
133 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
132 | sparc.pri \ |
|
134 | sparc.pri \ | |
133 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
135 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
134 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
136 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
135 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
137 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
136 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
138 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
137 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
139 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
138 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
140 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
139 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
141 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
140 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
142 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
141 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
143 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
142 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
144 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
143 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
145 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
144 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
146 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
145 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
147 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
146 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
148 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
147 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
149 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
148 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
150 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
149 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
151 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
150 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
152 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
151 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
153 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
152 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
154 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
153 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
155 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
154 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
156 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
155 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
157 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
156 | sparc.pri: |
|
158 | sparc.pri: | |
157 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
159 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
158 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
160 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
159 | /usr/lib64/qt4/mkspecs/features/shared.prf: |
|
161 | /usr/lib64/qt4/mkspecs/features/shared.prf: | |
160 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
162 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
161 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
163 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
162 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
164 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
163 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
165 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
164 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
166 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
165 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
167 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
166 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
168 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
167 | qmake: FORCE |
|
169 | qmake: FORCE | |
168 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
170 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
169 |
|
171 | |||
170 | dist: |
|
172 | dist: | |
171 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
|
173 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 | |
172 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 |
|
174 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 | |
173 |
|
175 | |||
174 |
|
176 | |||
175 | clean:compiler_clean |
|
177 | clean:compiler_clean | |
176 | -$(DEL_FILE) $(OBJECTS) |
|
178 | -$(DEL_FILE) $(OBJECTS) | |
177 | -$(DEL_FILE) *~ core *.core |
|
179 | -$(DEL_FILE) *~ core *.core | |
178 |
|
180 | |||
179 |
|
181 | |||
180 | ####### Sub-libraries |
|
182 | ####### Sub-libraries | |
181 |
|
183 | |||
182 | distclean: clean |
|
184 | distclean: clean | |
183 | -$(DEL_FILE) $(TARGET) |
|
185 | -$(DEL_FILE) $(TARGET) | |
184 | -$(DEL_FILE) Makefile |
|
186 | -$(DEL_FILE) Makefile | |
185 |
|
187 | |||
186 |
|
188 | |||
187 | grmon: |
|
189 | grmon: | |
188 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u |
|
190 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u | |
189 |
|
191 | |||
190 | check: first |
|
192 | check: first | |
191 |
|
193 | |||
192 | compiler_rcc_make_all: |
|
194 | compiler_rcc_make_all: | |
193 | compiler_rcc_clean: |
|
195 | compiler_rcc_clean: | |
194 | compiler_uic_make_all: |
|
196 | compiler_uic_make_all: | |
195 | compiler_uic_clean: |
|
197 | compiler_uic_clean: | |
196 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
198 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
197 | compiler_image_collection_clean: |
|
199 | compiler_image_collection_clean: | |
198 | -$(DEL_FILE) qmake_image_collection.cpp |
|
200 | -$(DEL_FILE) qmake_image_collection.cpp | |
199 | compiler_yacc_decl_make_all: |
|
201 | compiler_yacc_decl_make_all: | |
200 | compiler_yacc_decl_clean: |
|
202 | compiler_yacc_decl_clean: | |
201 | compiler_yacc_impl_make_all: |
|
203 | compiler_yacc_impl_make_all: | |
202 | compiler_yacc_impl_clean: |
|
204 | compiler_yacc_impl_clean: | |
203 | compiler_lex_make_all: |
|
205 | compiler_lex_make_all: | |
204 | compiler_lex_clean: |
|
206 | compiler_lex_clean: | |
205 | compiler_clean: |
|
207 | compiler_clean: | |
206 |
|
208 | |||
207 | ####### Compile |
|
209 | ####### Compile | |
208 |
|
210 | |||
209 | obj/wf_handler.o: ../src/wf_handler.c |
|
211 | obj/wf_handler.o: ../src/wf_handler.c | |
210 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c |
|
212 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c | |
211 |
|
213 | |||
212 | obj/tc_handler.o: ../src/tc_handler.c |
|
214 | obj/tc_handler.o: ../src/tc_handler.c | |
213 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c |
|
215 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c | |
214 |
|
216 | |||
215 | obj/fsw_processing.o: ../src/fsw_processing.c |
|
217 | obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c | |
216 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c |
|
218 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c | |
217 |
|
219 | |||
218 | obj/fsw_misc.o: ../src/fsw_misc.c |
|
220 | obj/fsw_misc.o: ../src/fsw_misc.c | |
219 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c |
|
221 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c | |
220 |
|
222 | |||
221 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c |
|
223 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c | |
222 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c |
|
224 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c | |
223 |
|
225 | |||
224 | obj/fsw_globals.o: ../src/fsw_globals.c |
|
226 | obj/fsw_globals.o: ../src/fsw_globals.c | |
225 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c |
|
227 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c | |
226 |
|
228 | |||
227 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c |
|
229 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c | |
228 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c |
|
230 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c | |
229 |
|
231 | |||
230 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c |
|
232 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c | |
231 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c |
|
233 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c | |
232 |
|
234 | |||
233 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c |
|
235 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c | |
234 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c |
|
236 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c | |
235 |
|
237 | |||
|
238 | obj/tc_acceptance.o: ../src/tc_acceptance.c | |||
|
239 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c | |||
|
240 | ||||
236 | ####### Install |
|
241 | ####### Install | |
237 |
|
242 | |||
238 | install: FORCE |
|
243 | install: FORCE | |
239 |
|
244 | |||
240 | uninstall: FORCE |
|
245 | uninstall: FORCE | |
241 |
|
246 | |||
242 | FORCE: |
|
247 | FORCE: | |
243 |
|
248 |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -1,71 +1,74 | |||||
1 | TEMPLATE = app |
|
1 | TEMPLATE = app | |
2 | # CONFIG += console v8 sim |
|
2 | # CONFIG += console v8 sim | |
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa | |
4 | CONFIG += console verbose |
|
4 | CONFIG += console verbose | |
5 | CONFIG -= qt |
|
5 | CONFIG -= qt | |
6 |
|
6 | |||
7 | include(./sparc.pri) |
|
7 | include(./sparc.pri) | |
8 |
|
8 | |||
9 | # flight software version |
|
9 | # flight software version | |
10 | SWVERSION=-0-16 |
|
10 | SWVERSION=-0-16 | |
11 | DEFINES += SW_VERSION_N1=0 |
|
11 | DEFINES += SW_VERSION_N1=0 | |
12 | DEFINES += SW_VERSION_N2=0 |
|
12 | DEFINES += SW_VERSION_N2=0 | |
13 | DEFINES += SW_VERSION_N3=0 |
|
13 | DEFINES += SW_VERSION_N3=0 | |
14 | DEFINES += SW_VERSION_N4=16 |
|
14 | DEFINES += SW_VERSION_N4=16 | |
15 |
|
15 | |||
16 | contains( CONFIG, verbose ) { |
|
16 | contains( CONFIG, verbose ) { | |
17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
|
17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE | |
18 | } |
|
18 | } | |
19 |
|
19 | |||
20 | contains( CONFIG, cpu_usage_report ) { |
|
20 | contains( CONFIG, cpu_usage_report ) { | |
21 | DEFINES += PRINT_TASK_STATISTICS |
|
21 | DEFINES += PRINT_TASK_STATISTICS | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | contains( CONFIG, stack_report ) { |
|
24 | contains( CONFIG, stack_report ) { | |
25 | DEFINES += PRINT_STACK_REPORT |
|
25 | DEFINES += PRINT_STACK_REPORT | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | contains( CONFIG, boot_messages ) { |
|
28 | contains( CONFIG, boot_messages ) { | |
29 | DEFINES += BOOT_MESSAGES |
|
29 | DEFINES += BOOT_MESSAGES | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
32 | #doxygen.target = doxygen |
|
32 | #doxygen.target = doxygen | |
33 | #doxygen.commands = doxygen ../doc/Doxyfile |
|
33 | #doxygen.commands = doxygen ../doc/Doxyfile | |
34 | #QMAKE_EXTRA_TARGETS += doxygen |
|
34 | #QMAKE_EXTRA_TARGETS += doxygen | |
35 |
|
35 | |||
36 | TARGET = fsw |
|
36 | TARGET = fsw | |
37 | contains( CONFIG, gsa ) { |
|
37 | contains( CONFIG, gsa ) { | |
38 | DEFINES += GSA |
|
38 | DEFINES += GSA | |
39 | TARGET = fsw-gsa |
|
39 | TARGET = fsw-gsa | |
40 | } |
|
40 | } | |
41 |
|
41 | |||
42 | INCLUDEPATH += \ |
|
42 | INCLUDEPATH += \ | |
43 | ../src \ |
|
43 | ../src \ | |
44 | ../header |
|
44 | ../header | |
45 |
|
45 | |||
46 | SOURCES += \ |
|
46 | SOURCES += \ | |
47 | ../src/wf_handler.c \ |
|
47 | ../src/wf_handler.c \ | |
48 | ../src/tc_handler.c \ |
|
48 | ../src/tc_handler.c \ | |
49 | ../src/fsw_processing.c \ |
|
49 | ../src/fsw_processing.c \ | |
50 | ../src/fsw_misc.c \ |
|
50 | ../src/fsw_misc.c \ | |
51 | ../src/fsw_init.c \ |
|
51 | ../src/fsw_init.c \ | |
52 | ../src/fsw_globals.c \ |
|
52 | ../src/fsw_globals.c \ | |
53 | ../src/fsw_spacewire.c \ |
|
53 | ../src/fsw_spacewire.c \ | |
54 | ../src/tc_load_dump_parameters.c \ |
|
54 | ../src/tc_load_dump_parameters.c \ | |
55 | ../src/tm_lfr_tc_exe.c |
|
55 | ../src/tm_lfr_tc_exe.c \ | |
|
56 | ../src/tc_acceptance.c | |||
|
57 | ||||
56 |
|
58 | |||
57 | HEADERS += \ |
|
59 | HEADERS += \ | |
58 | ../header/wf_handler.h \ |
|
60 | ../header/wf_handler.h \ | |
59 | ../header/tc_handler.h \ |
|
61 | ../header/tc_handler.h \ | |
60 | ../header/grlib_regs.h \ |
|
62 | ../header/grlib_regs.h \ | |
61 | ../header/fsw_processing.h \ |
|
63 | ../header/fsw_processing.h \ | |
62 | ../header/fsw_params.h \ |
|
64 | ../header/fsw_params.h \ | |
63 | ../header/fsw_misc.h \ |
|
65 | ../header/fsw_misc.h \ | |
64 | ../header/fsw_init.h \ |
|
66 | ../header/fsw_init.h \ | |
65 | ../header/ccsds_types.h \ |
|
67 | ../header/ccsds_types.h \ | |
66 | ../header/fsw_params_processing.h \ |
|
68 | ../header/fsw_params_processing.h \ | |
67 | ../header/fsw_spacewire.h \ |
|
69 | ../header/fsw_spacewire.h \ | |
68 | ../header/tm_byte_positions.h \ |
|
70 | ../header/tm_byte_positions.h \ | |
69 | ../header/tc_load_dump_parameters.h \ |
|
71 | ../header/tc_load_dump_parameters.h \ | |
70 | ../header/tm_lfr_tc_exe.h |
|
72 | ../header/tm_lfr_tc_exe.h \ | |
|
73 | ../header/tc_acceptance.h | |||
71 |
|
74 |
@@ -1,305 +1,305 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 2.8.0, 2013-10-1 |
|
3 | <!-- Written by QtCreator 2.8.0, 2013-10-18T15:44:56. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">0</value> |
|
7 | <value type="int">0</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | |
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
16 | <value type="QString" key="language">Cpp</value> |
|
16 | <value type="QString" key="language">Cpp</value> | |
17 | <valuemap type="QVariantMap" key="value"> |
|
17 | <valuemap type="QVariantMap" key="value"> | |
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | </valuemap> |
|
20 | </valuemap> | |
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
22 | <value type="QString" key="language">QmlJS</value> |
|
22 | <value type="QString" key="language">QmlJS</value> | |
23 | <valuemap type="QVariantMap" key="value"> |
|
23 | <valuemap type="QVariantMap" key="value"> | |
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | </valuemap> |
|
26 | </valuemap> | |
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
|
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | |
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
45 | </valuemap> |
|
45 | </valuemap> | |
46 | </data> |
|
46 | </data> | |
47 | <data> |
|
47 | <data> | |
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
49 | <valuemap type="QVariantMap"/> |
|
49 | <valuemap type="QVariantMap"/> | |
50 | </data> |
|
50 | </data> | |
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
71 | </valuemap> |
|
71 | </valuemap> | |
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
78 | <value type="QString">-w</value> |
|
78 | <value type="QString">-w</value> | |
79 | <value type="QString">-r</value> |
|
79 | <value type="QString">-r</value> | |
80 | </valuelist> |
|
80 | </valuelist> | |
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w -j 4</value> |
|
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w -j 4</value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
84 | </valuemap> |
|
84 | </valuemap> | |
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
89 | </valuemap> |
|
89 | </valuemap> | |
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
97 | <value type="QString">-w</value> |
|
97 | <value type="QString">-w</value> | |
98 | <value type="QString">-r</value> |
|
98 | <value type="QString">-r</value> | |
99 | </valuelist> |
|
99 | </valuelist> | |
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> |
|
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
103 | </valuemap> |
|
103 | </valuemap> | |
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
108 | </valuemap> |
|
108 | </valuemap> | |
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> |
|
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> |
|
119 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
122 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
122 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
126 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
126 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
127 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
127 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
128 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
128 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
129 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
129 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
130 | </valuemap> |
|
130 | </valuemap> | |
131 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
131 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
132 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
132 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
133 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
133 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
134 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
134 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
136 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
136 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
137 | <value type="QString">-w</value> |
|
137 | <value type="QString">-w</value> | |
138 | <value type="QString">-r</value> |
|
138 | <value type="QString">-r</value> | |
139 | </valuelist> |
|
139 | </valuelist> | |
140 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
140 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
141 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> |
|
141 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> | |
142 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
142 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
143 | </valuemap> |
|
143 | </valuemap> | |
144 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
144 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
146 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
146 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
147 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
147 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
148 | </valuemap> |
|
148 | </valuemap> | |
149 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
149 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
150 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
150 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
151 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
151 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
153 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
153 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
154 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
154 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
155 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
155 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
156 | <value type="QString">-w</value> |
|
156 | <value type="QString">-w</value> | |
157 | <value type="QString">-r</value> |
|
157 | <value type="QString">-r</value> | |
158 | </valuelist> |
|
158 | </valuelist> | |
159 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
159 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
160 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> |
|
160 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> | |
161 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
161 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
162 | </valuemap> |
|
162 | </valuemap> | |
163 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
163 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
165 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
165 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
166 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
166 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
167 | </valuemap> |
|
167 | </valuemap> | |
168 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
168 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
169 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
169 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
170 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
170 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> |
|
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> | |
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
174 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> |
|
174 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | |
175 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> |
|
175 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> | |
176 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
176 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
177 | </valuemap> |
|
177 | </valuemap> | |
178 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> |
|
178 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> | |
179 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
179 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
180 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
180 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
181 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
181 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
182 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
182 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
183 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
183 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
184 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
184 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
185 | </valuemap> |
|
185 | </valuemap> | |
186 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
186 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
187 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
187 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
188 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
188 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
189 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
189 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
190 | </valuemap> |
|
190 | </valuemap> | |
191 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
191 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
192 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
192 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
193 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
193 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
194 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
194 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
196 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
196 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
197 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
197 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
198 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
198 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
199 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
199 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
200 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
200 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
201 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
201 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
202 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
202 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
203 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
203 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
204 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
204 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
205 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
205 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
206 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
206 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
207 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
207 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
208 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
208 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
209 | <value type="int">0</value> |
|
209 | <value type="int">0</value> | |
210 | <value type="int">1</value> |
|
210 | <value type="int">1</value> | |
211 | <value type="int">2</value> |
|
211 | <value type="int">2</value> | |
212 | <value type="int">3</value> |
|
212 | <value type="int">3</value> | |
213 | <value type="int">4</value> |
|
213 | <value type="int">4</value> | |
214 | <value type="int">5</value> |
|
214 | <value type="int">5</value> | |
215 | <value type="int">6</value> |
|
215 | <value type="int">6</value> | |
216 | <value type="int">7</value> |
|
216 | <value type="int">7</value> | |
217 | <value type="int">8</value> |
|
217 | <value type="int">8</value> | |
218 | <value type="int">9</value> |
|
218 | <value type="int">9</value> | |
219 | <value type="int">10</value> |
|
219 | <value type="int">10</value> | |
220 | <value type="int">11</value> |
|
220 | <value type="int">11</value> | |
221 | <value type="int">12</value> |
|
221 | <value type="int">12</value> | |
222 | <value type="int">13</value> |
|
222 | <value type="int">13</value> | |
223 | <value type="int">14</value> |
|
223 | <value type="int">14</value> | |
224 | </valuelist> |
|
224 | </valuelist> | |
225 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
225 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
226 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
226 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> | |
228 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
228 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
229 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
229 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
230 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
230 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
231 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
231 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
232 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
232 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
233 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
233 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
234 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
234 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
235 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
235 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
236 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
236 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
237 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
237 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
238 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
238 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
239 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
239 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
240 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
240 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
241 | </valuemap> |
|
241 | </valuemap> | |
242 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> |
|
242 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> | |
243 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
243 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
244 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
244 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
245 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
245 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
246 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
246 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
247 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
247 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
248 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
248 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
249 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
249 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
250 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
250 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
251 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
251 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
252 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
252 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
253 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
253 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
254 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
254 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
255 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
255 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
256 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
256 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
257 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
257 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
258 | <value type="int">0</value> |
|
258 | <value type="int">0</value> | |
259 | <value type="int">1</value> |
|
259 | <value type="int">1</value> | |
260 | <value type="int">2</value> |
|
260 | <value type="int">2</value> | |
261 | <value type="int">3</value> |
|
261 | <value type="int">3</value> | |
262 | <value type="int">4</value> |
|
262 | <value type="int">4</value> | |
263 | <value type="int">5</value> |
|
263 | <value type="int">5</value> | |
264 | <value type="int">6</value> |
|
264 | <value type="int">6</value> | |
265 | <value type="int">7</value> |
|
265 | <value type="int">7</value> | |
266 | <value type="int">8</value> |
|
266 | <value type="int">8</value> | |
267 | <value type="int">9</value> |
|
267 | <value type="int">9</value> | |
268 | <value type="int">10</value> |
|
268 | <value type="int">10</value> | |
269 | <value type="int">11</value> |
|
269 | <value type="int">11</value> | |
270 | <value type="int">12</value> |
|
270 | <value type="int">12</value> | |
271 | <value type="int">13</value> |
|
271 | <value type="int">13</value> | |
272 | <value type="int">14</value> |
|
272 | <value type="int">14</value> | |
273 | </valuelist> |
|
273 | </valuelist> | |
274 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
274 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
275 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
275 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
276 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
276 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> | |
277 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value> |
|
277 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value> | |
278 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value> |
|
278 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value> | |
279 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value> |
|
279 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value> | |
280 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value> |
|
280 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value> | |
281 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
281 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
282 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> |
|
282 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> | |
283 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
283 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
284 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
284 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
285 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
285 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
286 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
286 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
287 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
287 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
288 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
288 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
289 | </valuemap> |
|
289 | </valuemap> | |
290 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value> |
|
290 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value> | |
291 | </valuemap> |
|
291 | </valuemap> | |
292 | </data> |
|
292 | </data> | |
293 | <data> |
|
293 | <data> | |
294 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
294 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
295 | <value type="int">1</value> |
|
295 | <value type="int">1</value> | |
296 | </data> |
|
296 | </data> | |
297 | <data> |
|
297 | <data> | |
298 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
298 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
299 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
299 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
300 | </data> |
|
300 | </data> | |
301 | <data> |
|
301 | <data> | |
302 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
302 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
303 | <value type="int">14</value> |
|
303 | <value type="int">14</value> | |
304 | </data> |
|
304 | </data> | |
305 | </qtcreator> |
|
305 | </qtcreator> |
@@ -1,1902 +1,1902 | |||||
1 | # Doxyfile 1.8.3.1 |
|
1 | # Doxyfile 1.8.3.1 | |
2 |
|
2 | |||
3 | # This file describes the settings to be used by the documentation system |
|
3 | # This file describes the settings to be used by the documentation system | |
4 | # doxygen (www.doxygen.org) for a project |
|
4 | # doxygen (www.doxygen.org) for a project | |
5 | # |
|
5 | # | |
6 | # All text after a hash (#) is considered a comment and will be ignored |
|
6 | # All text after a hash (#) is considered a comment and will be ignored | |
7 | # The format is: |
|
7 | # The format is: | |
8 | # TAG = value [value, ...] |
|
8 | # TAG = value [value, ...] | |
9 | # For lists items can also be appended using: |
|
9 | # For lists items can also be appended using: | |
10 | # TAG += value [value, ...] |
|
10 | # TAG += value [value, ...] | |
11 | # Values that contain spaces should be placed between quotes (" ") |
|
11 | # Values that contain spaces should be placed between quotes (" ") | |
12 |
|
12 | |||
13 | #--------------------------------------------------------------------------- |
|
13 | #--------------------------------------------------------------------------- | |
14 | # Project related configuration options |
|
14 | # Project related configuration options | |
15 | #--------------------------------------------------------------------------- |
|
15 | #--------------------------------------------------------------------------- | |
16 |
|
16 | |||
17 | # This tag specifies the encoding used for all characters in the config file |
|
17 | # This tag specifies the encoding used for all characters in the config file | |
18 | # that follow. The default is UTF-8 which is also the encoding used for all |
|
18 | # that follow. The default is UTF-8 which is also the encoding used for all | |
19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the |
|
19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the | |
20 | # iconv built into libc) for the transcoding. See |
|
20 | # iconv built into libc) for the transcoding. See | |
21 | # http://www.gnu.org/software/libiconv for the list of possible encodings. |
|
21 | # http://www.gnu.org/software/libiconv for the list of possible encodings. | |
22 |
|
22 | |||
23 | DOXYFILE_ENCODING = UTF-8 |
|
23 | DOXYFILE_ENCODING = UTF-8 | |
24 |
|
24 | |||
25 | # The PROJECT_NAME tag is a single word (or sequence of words) that should |
|
25 | # The PROJECT_NAME tag is a single word (or sequence of words) that should | |
26 | # identify the project. Note that if you do not use Doxywizard you need |
|
26 | # identify the project. Note that if you do not use Doxywizard you need | |
27 | # to put quotes around the project name if it contains spaces. |
|
27 | # to put quotes around the project name if it contains spaces. | |
28 |
|
28 | |||
29 | PROJECT_NAME = DEV_PLE |
|
29 | PROJECT_NAME = DEV_PLE | |
30 |
|
30 | |||
31 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. |
|
31 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. | |
32 | # This could be handy for archiving the generated documentation or |
|
32 | # This could be handy for archiving the generated documentation or | |
33 | # if some version control system is used. |
|
33 | # if some version control system is used. | |
34 |
|
34 | |||
35 | PROJECT_NUMBER = |
|
35 | PROJECT_NUMBER = | |
36 |
|
36 | |||
37 | # Using the PROJECT_BRIEF tag one can provide an optional one line description |
|
37 | # Using the PROJECT_BRIEF tag one can provide an optional one line description | |
38 | # for a project that appears at the top of each page and should give viewer |
|
38 | # for a project that appears at the top of each page and should give viewer | |
39 | # a quick idea about the purpose of the project. Keep the description short. |
|
39 | # a quick idea about the purpose of the project. Keep the description short. | |
40 |
|
40 | |||
41 | PROJECT_BRIEF = |
|
41 | PROJECT_BRIEF = | |
42 |
|
42 | |||
43 | # With the PROJECT_LOGO tag one can specify an logo or icon that is |
|
43 | # With the PROJECT_LOGO tag one can specify an logo or icon that is | |
44 | # included in the documentation. The maximum height of the logo should not |
|
44 | # included in the documentation. The maximum height of the logo should not | |
45 | # exceed 55 pixels and the maximum width should not exceed 200 pixels. |
|
45 | # exceed 55 pixels and the maximum width should not exceed 200 pixels. | |
46 | # Doxygen will copy the logo to the output directory. |
|
46 | # Doxygen will copy the logo to the output directory. | |
47 |
|
47 | |||
48 | PROJECT_LOGO = |
|
48 | PROJECT_LOGO = | |
49 |
|
49 | |||
50 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) |
|
50 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) | |
51 | # base path where the generated documentation will be put. |
|
51 | # base path where the generated documentation will be put. | |
52 | # If a relative path is entered, it will be relative to the location |
|
52 | # If a relative path is entered, it will be relative to the location | |
53 | # where doxygen was started. If left blank the current directory will be used. |
|
53 | # where doxygen was started. If left blank the current directory will be used. | |
54 |
|
54 | |||
55 | OUTPUT_DIRECTORY = /opt/DEV_PLE/doc |
|
55 | OUTPUT_DIRECTORY = /opt/DEV_PLE/doc | |
56 |
|
56 | |||
57 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create |
|
57 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create | |
58 | # 4096 sub-directories (in 2 levels) under the output directory of each output |
|
58 | # 4096 sub-directories (in 2 levels) under the output directory of each output | |
59 | # format and will distribute the generated files over these directories. |
|
59 | # format and will distribute the generated files over these directories. | |
60 | # Enabling this option can be useful when feeding doxygen a huge amount of |
|
60 | # Enabling this option can be useful when feeding doxygen a huge amount of | |
61 | # source files, where putting all generated files in the same directory would |
|
61 | # source files, where putting all generated files in the same directory would | |
62 | # otherwise cause performance problems for the file system. |
|
62 | # otherwise cause performance problems for the file system. | |
63 |
|
63 | |||
64 | CREATE_SUBDIRS = NO |
|
64 | CREATE_SUBDIRS = NO | |
65 |
|
65 | |||
66 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all |
|
66 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all | |
67 | # documentation generated by doxygen is written. Doxygen will use this |
|
67 | # documentation generated by doxygen is written. Doxygen will use this | |
68 | # information to generate all constant output in the proper language. |
|
68 | # information to generate all constant output in the proper language. | |
69 | # The default language is English, other supported languages are: |
|
69 | # The default language is English, other supported languages are: | |
70 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, |
|
70 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, | |
71 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, |
|
71 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, | |
72 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English |
|
72 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English | |
73 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, |
|
73 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, | |
74 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, |
|
74 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, | |
75 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. |
|
75 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. | |
76 |
|
76 | |||
77 | OUTPUT_LANGUAGE = English |
|
77 | OUTPUT_LANGUAGE = English | |
78 |
|
78 | |||
79 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will |
|
79 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will | |
80 | # include brief member descriptions after the members that are listed in |
|
80 | # include brief member descriptions after the members that are listed in | |
81 | # the file and class documentation (similar to JavaDoc). |
|
81 | # the file and class documentation (similar to JavaDoc). | |
82 | # Set to NO to disable this. |
|
82 | # Set to NO to disable this. | |
83 |
|
83 | |||
84 | BRIEF_MEMBER_DESC = YES |
|
84 | BRIEF_MEMBER_DESC = YES | |
85 |
|
85 | |||
86 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend |
|
86 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend | |
87 | # the brief description of a member or function before the detailed description. |
|
87 | # the brief description of a member or function before the detailed description. | |
88 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the |
|
88 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the | |
89 | # brief descriptions will be completely suppressed. |
|
89 | # brief descriptions will be completely suppressed. | |
90 |
|
90 | |||
91 | REPEAT_BRIEF = YES |
|
91 | REPEAT_BRIEF = YES | |
92 |
|
92 | |||
93 | # This tag implements a quasi-intelligent brief description abbreviator |
|
93 | # This tag implements a quasi-intelligent brief description abbreviator | |
94 | # that is used to form the text in various listings. Each string |
|
94 | # that is used to form the text in various listings. Each string | |
95 | # in this list, if found as the leading text of the brief description, will be |
|
95 | # in this list, if found as the leading text of the brief description, will be | |
96 | # stripped from the text and the result after processing the whole list, is |
|
96 | # stripped from the text and the result after processing the whole list, is | |
97 | # used as the annotated text. Otherwise, the brief description is used as-is. |
|
97 | # used as the annotated text. Otherwise, the brief description is used as-is. | |
98 | # If left blank, the following values are used ("$name" is automatically |
|
98 | # If left blank, the following values are used ("$name" is automatically | |
99 | # replaced with the name of the entity): "The $name class" "The $name widget" |
|
99 | # replaced with the name of the entity): "The $name class" "The $name widget" | |
100 | # "The $name file" "is" "provides" "specifies" "contains" |
|
100 | # "The $name file" "is" "provides" "specifies" "contains" | |
101 | # "represents" "a" "an" "the" |
|
101 | # "represents" "a" "an" "the" | |
102 |
|
102 | |||
103 | ABBREVIATE_BRIEF = "The $name class" \ |
|
103 | ABBREVIATE_BRIEF = "The $name class" \ | |
104 | "The $name widget" \ |
|
104 | "The $name widget" \ | |
105 | "The $name file" \ |
|
105 | "The $name file" \ | |
106 | is \ |
|
106 | is \ | |
107 | provides \ |
|
107 | provides \ | |
108 | specifies \ |
|
108 | specifies \ | |
109 | contains \ |
|
109 | contains \ | |
110 | represents \ |
|
110 | represents \ | |
111 | a \ |
|
111 | a \ | |
112 | an \ |
|
112 | an \ | |
113 | the |
|
113 | the | |
114 |
|
114 | |||
115 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then |
|
115 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then | |
116 | # Doxygen will generate a detailed section even if there is only a brief |
|
116 | # Doxygen will generate a detailed section even if there is only a brief | |
117 | # description. |
|
117 | # description. | |
118 |
|
118 | |||
119 | ALWAYS_DETAILED_SEC = NO |
|
119 | ALWAYS_DETAILED_SEC = NO | |
120 |
|
120 | |||
121 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all |
|
121 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all | |
122 | # inherited members of a class in the documentation of that class as if those |
|
122 | # inherited members of a class in the documentation of that class as if those | |
123 | # members were ordinary class members. Constructors, destructors and assignment |
|
123 | # members were ordinary class members. Constructors, destructors and assignment | |
124 | # operators of the base classes will not be shown. |
|
124 | # operators of the base classes will not be shown. | |
125 |
|
125 | |||
126 | INLINE_INHERITED_MEMB = NO |
|
126 | INLINE_INHERITED_MEMB = NO | |
127 |
|
127 | |||
128 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full |
|
128 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full | |
129 | # path before files name in the file list and in the header files. If set |
|
129 | # path before files name in the file list and in the header files. If set | |
130 | # to NO the shortest path that makes the file name unique will be used. |
|
130 | # to NO the shortest path that makes the file name unique will be used. | |
131 |
|
131 | |||
132 | FULL_PATH_NAMES = YES |
|
132 | FULL_PATH_NAMES = YES | |
133 |
|
133 | |||
134 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag |
|
134 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag | |
135 | # can be used to strip a user-defined part of the path. Stripping is |
|
135 | # can be used to strip a user-defined part of the path. Stripping is | |
136 | # only done if one of the specified strings matches the left-hand part of |
|
136 | # only done if one of the specified strings matches the left-hand part of | |
137 | # the path. The tag can be used to show relative paths in the file list. |
|
137 | # the path. The tag can be used to show relative paths in the file list. | |
138 | # If left blank the directory from which doxygen is run is used as the |
|
138 | # If left blank the directory from which doxygen is run is used as the | |
139 | # path to strip. Note that you specify absolute paths here, but also |
|
139 | # path to strip. Note that you specify absolute paths here, but also | |
140 | # relative paths, which will be relative from the directory where doxygen is |
|
140 | # relative paths, which will be relative from the directory where doxygen is | |
141 | # started. |
|
141 | # started. | |
142 |
|
142 | |||
143 | STRIP_FROM_PATH = |
|
143 | STRIP_FROM_PATH = | |
144 |
|
144 | |||
145 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of |
|
145 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of | |
146 | # the path mentioned in the documentation of a class, which tells |
|
146 | # the path mentioned in the documentation of a class, which tells | |
147 | # the reader which header file to include in order to use a class. |
|
147 | # the reader which header file to include in order to use a class. | |
148 | # If left blank only the name of the header file containing the class |
|
148 | # If left blank only the name of the header file containing the class | |
149 | # definition is used. Otherwise one should specify the include paths that |
|
149 | # definition is used. Otherwise one should specify the include paths that | |
150 | # are normally passed to the compiler using the -I flag. |
|
150 | # are normally passed to the compiler using the -I flag. | |
151 |
|
151 | |||
152 | STRIP_FROM_INC_PATH = |
|
152 | STRIP_FROM_INC_PATH = | |
153 |
|
153 | |||
154 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter |
|
154 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter | |
155 | # (but less readable) file names. This can be useful if your file system |
|
155 | # (but less readable) file names. This can be useful if your file system | |
156 | # doesn't support long names like on DOS, Mac, or CD-ROM. |
|
156 | # doesn't support long names like on DOS, Mac, or CD-ROM. | |
157 |
|
157 | |||
158 | SHORT_NAMES = NO |
|
158 | SHORT_NAMES = NO | |
159 |
|
159 | |||
160 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen |
|
160 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen | |
161 | # will interpret the first line (until the first dot) of a JavaDoc-style |
|
161 | # will interpret the first line (until the first dot) of a JavaDoc-style | |
162 | # comment as the brief description. If set to NO, the JavaDoc |
|
162 | # comment as the brief description. If set to NO, the JavaDoc | |
163 | # comments will behave just like regular Qt-style comments |
|
163 | # comments will behave just like regular Qt-style comments | |
164 | # (thus requiring an explicit @brief command for a brief description.) |
|
164 | # (thus requiring an explicit @brief command for a brief description.) | |
165 |
|
165 | |||
166 | JAVADOC_AUTOBRIEF = YES |
|
166 | JAVADOC_AUTOBRIEF = YES | |
167 |
|
167 | |||
168 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will |
|
168 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will | |
169 | # interpret the first line (until the first dot) of a Qt-style |
|
169 | # interpret the first line (until the first dot) of a Qt-style | |
170 | # comment as the brief description. If set to NO, the comments |
|
170 | # comment as the brief description. If set to NO, the comments | |
171 | # will behave just like regular Qt-style comments (thus requiring |
|
171 | # will behave just like regular Qt-style comments (thus requiring | |
172 | # an explicit \brief command for a brief description.) |
|
172 | # an explicit \brief command for a brief description.) | |
173 |
|
173 | |||
174 | QT_AUTOBRIEF = NO |
|
174 | QT_AUTOBRIEF = NO | |
175 |
|
175 | |||
176 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen |
|
176 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen | |
177 | # treat a multi-line C++ special comment block (i.e. a block of //! or /// |
|
177 | # treat a multi-line C++ special comment block (i.e. a block of //! or /// | |
178 | # comments) as a brief description. This used to be the default behaviour. |
|
178 | # comments) as a brief description. This used to be the default behaviour. | |
179 | # The new default is to treat a multi-line C++ comment block as a detailed |
|
179 | # The new default is to treat a multi-line C++ comment block as a detailed | |
180 | # description. Set this tag to YES if you prefer the old behaviour instead. |
|
180 | # description. Set this tag to YES if you prefer the old behaviour instead. | |
181 |
|
181 | |||
182 | MULTILINE_CPP_IS_BRIEF = NO |
|
182 | MULTILINE_CPP_IS_BRIEF = NO | |
183 |
|
183 | |||
184 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented |
|
184 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented | |
185 | # member inherits the documentation from any documented member that it |
|
185 | # member inherits the documentation from any documented member that it | |
186 | # re-implements. |
|
186 | # re-implements. | |
187 |
|
187 | |||
188 | INHERIT_DOCS = YES |
|
188 | INHERIT_DOCS = YES | |
189 |
|
189 | |||
190 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce |
|
190 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce | |
191 | # a new page for each member. If set to NO, the documentation of a member will |
|
191 | # a new page for each member. If set to NO, the documentation of a member will | |
192 | # be part of the file/class/namespace that contains it. |
|
192 | # be part of the file/class/namespace that contains it. | |
193 |
|
193 | |||
194 | SEPARATE_MEMBER_PAGES = NO |
|
194 | SEPARATE_MEMBER_PAGES = NO | |
195 |
|
195 | |||
196 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. |
|
196 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. | |
197 | # Doxygen uses this value to replace tabs by spaces in code fragments. |
|
197 | # Doxygen uses this value to replace tabs by spaces in code fragments. | |
198 |
|
198 | |||
199 | TAB_SIZE = 4 |
|
199 | TAB_SIZE = 4 | |
200 |
|
200 | |||
201 | # This tag can be used to specify a number of aliases that acts |
|
201 | # This tag can be used to specify a number of aliases that acts | |
202 | # as commands in the documentation. An alias has the form "name=value". |
|
202 | # as commands in the documentation. An alias has the form "name=value". | |
203 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to |
|
203 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to | |
204 | # put the command \sideeffect (or @sideeffect) in the documentation, which |
|
204 | # put the command \sideeffect (or @sideeffect) in the documentation, which | |
205 | # will result in a user-defined paragraph with heading "Side Effects:". |
|
205 | # will result in a user-defined paragraph with heading "Side Effects:". | |
206 | # You can put \n's in the value part of an alias to insert newlines. |
|
206 | # You can put \n's in the value part of an alias to insert newlines. | |
207 |
|
207 | |||
208 | ALIASES = |
|
208 | ALIASES = | |
209 |
|
209 | |||
210 | # This tag can be used to specify a number of word-keyword mappings (TCL only). |
|
210 | # This tag can be used to specify a number of word-keyword mappings (TCL only). | |
211 | # A mapping has the form "name=value". For example adding |
|
211 | # A mapping has the form "name=value". For example adding | |
212 | # "class=itcl::class" will allow you to use the command class in the |
|
212 | # "class=itcl::class" will allow you to use the command class in the | |
213 | # itcl::class meaning. |
|
213 | # itcl::class meaning. | |
214 |
|
214 | |||
215 | TCL_SUBST = |
|
215 | TCL_SUBST = | |
216 |
|
216 | |||
217 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C |
|
217 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C | |
218 | # sources only. Doxygen will then generate output that is more tailored for C. |
|
218 | # sources only. Doxygen will then generate output that is more tailored for C. | |
219 | # For instance, some of the names that are used will be different. The list |
|
219 | # For instance, some of the names that are used will be different. The list | |
220 | # of all members will be omitted, etc. |
|
220 | # of all members will be omitted, etc. | |
221 |
|
221 | |||
222 | OPTIMIZE_OUTPUT_FOR_C = YES |
|
222 | OPTIMIZE_OUTPUT_FOR_C = YES | |
223 |
|
223 | |||
224 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java |
|
224 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java | |
225 | # sources only. Doxygen will then generate output that is more tailored for |
|
225 | # sources only. Doxygen will then generate output that is more tailored for | |
226 | # Java. For instance, namespaces will be presented as packages, qualified |
|
226 | # Java. For instance, namespaces will be presented as packages, qualified | |
227 | # scopes will look different, etc. |
|
227 | # scopes will look different, etc. | |
228 |
|
228 | |||
229 | OPTIMIZE_OUTPUT_JAVA = NO |
|
229 | OPTIMIZE_OUTPUT_JAVA = NO | |
230 |
|
230 | |||
231 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran |
|
231 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran | |
232 | # sources only. Doxygen will then generate output that is more tailored for |
|
232 | # sources only. Doxygen will then generate output that is more tailored for | |
233 | # Fortran. |
|
233 | # Fortran. | |
234 |
|
234 | |||
235 | OPTIMIZE_FOR_FORTRAN = NO |
|
235 | OPTIMIZE_FOR_FORTRAN = NO | |
236 |
|
236 | |||
237 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL |
|
237 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL | |
238 | # sources. Doxygen will then generate output that is tailored for |
|
238 | # sources. Doxygen will then generate output that is tailored for | |
239 | # VHDL. |
|
239 | # VHDL. | |
240 |
|
240 | |||
241 | OPTIMIZE_OUTPUT_VHDL = NO |
|
241 | OPTIMIZE_OUTPUT_VHDL = NO | |
242 |
|
242 | |||
243 | # Doxygen selects the parser to use depending on the extension of the files it |
|
243 | # Doxygen selects the parser to use depending on the extension of the files it | |
244 | # parses. With this tag you can assign which parser to use for a given |
|
244 | # parses. With this tag you can assign which parser to use for a given | |
245 | # extension. Doxygen has a built-in mapping, but you can override or extend it |
|
245 | # extension. Doxygen has a built-in mapping, but you can override or extend it | |
246 | # using this tag. The format is ext=language, where ext is a file extension, |
|
246 | # using this tag. The format is ext=language, where ext is a file extension, | |
247 | # and language is one of the parsers supported by doxygen: IDL, Java, |
|
247 | # and language is one of the parsers supported by doxygen: IDL, Java, | |
248 | # Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, |
|
248 | # Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, | |
249 | # C++. For instance to make doxygen treat .inc files as Fortran files (default |
|
249 | # C++. For instance to make doxygen treat .inc files as Fortran files (default | |
250 | # is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note |
|
250 | # is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note | |
251 | # that for custom extensions you also need to set FILE_PATTERNS otherwise the |
|
251 | # that for custom extensions you also need to set FILE_PATTERNS otherwise the | |
252 | # files are not read by doxygen. |
|
252 | # files are not read by doxygen. | |
253 |
|
253 | |||
254 | EXTENSION_MAPPING = |
|
254 | EXTENSION_MAPPING = | |
255 |
|
255 | |||
256 | # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all |
|
256 | # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all | |
257 | # comments according to the Markdown format, which allows for more readable |
|
257 | # comments according to the Markdown format, which allows for more readable | |
258 | # documentation. See http://daringfireball.net/projects/markdown/ for details. |
|
258 | # documentation. See http://daringfireball.net/projects/markdown/ for details. | |
259 | # The output of markdown processing is further processed by doxygen, so you |
|
259 | # The output of markdown processing is further processed by doxygen, so you | |
260 | # can mix doxygen, HTML, and XML commands with Markdown formatting. |
|
260 | # can mix doxygen, HTML, and XML commands with Markdown formatting. | |
261 | # Disable only in case of backward compatibilities issues. |
|
261 | # Disable only in case of backward compatibilities issues. | |
262 |
|
262 | |||
263 | MARKDOWN_SUPPORT = YES |
|
263 | MARKDOWN_SUPPORT = YES | |
264 |
|
264 | |||
265 | # When enabled doxygen tries to link words that correspond to documented classes, |
|
265 | # When enabled doxygen tries to link words that correspond to documented classes, | |
266 | # or namespaces to their corresponding documentation. Such a link can be |
|
266 | # or namespaces to their corresponding documentation. Such a link can be | |
267 | # prevented in individual cases by by putting a % sign in front of the word or |
|
267 | # prevented in individual cases by by putting a % sign in front of the word or | |
268 | # globally by setting AUTOLINK_SUPPORT to NO. |
|
268 | # globally by setting AUTOLINK_SUPPORT to NO. | |
269 |
|
269 | |||
270 | AUTOLINK_SUPPORT = YES |
|
270 | AUTOLINK_SUPPORT = YES | |
271 |
|
271 | |||
272 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want |
|
272 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want | |
273 | # to include (a tag file for) the STL sources as input, then you should |
|
273 | # to include (a tag file for) the STL sources as input, then you should | |
274 | # set this tag to YES in order to let doxygen match functions declarations and |
|
274 | # set this tag to YES in order to let doxygen match functions declarations and | |
275 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. |
|
275 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. | |
276 | # func(std::string) {}). This also makes the inheritance and collaboration |
|
276 | # func(std::string) {}). This also makes the inheritance and collaboration | |
277 | # diagrams that involve STL classes more complete and accurate. |
|
277 | # diagrams that involve STL classes more complete and accurate. | |
278 |
|
278 | |||
279 | BUILTIN_STL_SUPPORT = NO |
|
279 | BUILTIN_STL_SUPPORT = NO | |
280 |
|
280 | |||
281 | # If you use Microsoft's C++/CLI language, you should set this option to YES to |
|
281 | # If you use Microsoft's C++/CLI language, you should set this option to YES to | |
282 | # enable parsing support. |
|
282 | # enable parsing support. | |
283 |
|
283 | |||
284 | CPP_CLI_SUPPORT = NO |
|
284 | CPP_CLI_SUPPORT = NO | |
285 |
|
285 | |||
286 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. |
|
286 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. | |
287 | # Doxygen will parse them like normal C++ but will assume all classes use public |
|
287 | # Doxygen will parse them like normal C++ but will assume all classes use public | |
288 | # instead of private inheritance when no explicit protection keyword is present. |
|
288 | # instead of private inheritance when no explicit protection keyword is present. | |
289 |
|
289 | |||
290 | SIP_SUPPORT = NO |
|
290 | SIP_SUPPORT = NO | |
291 |
|
291 | |||
292 | # For Microsoft's IDL there are propget and propput attributes to indicate |
|
292 | # For Microsoft's IDL there are propget and propput attributes to indicate | |
293 | # getter and setter methods for a property. Setting this option to YES (the |
|
293 | # getter and setter methods for a property. Setting this option to YES (the | |
294 | # default) will make doxygen replace the get and set methods by a property in |
|
294 | # default) will make doxygen replace the get and set methods by a property in | |
295 | # the documentation. This will only work if the methods are indeed getting or |
|
295 | # the documentation. This will only work if the methods are indeed getting or | |
296 | # setting a simple type. If this is not the case, or you want to show the |
|
296 | # setting a simple type. If this is not the case, or you want to show the | |
297 | # methods anyway, you should set this option to NO. |
|
297 | # methods anyway, you should set this option to NO. | |
298 |
|
298 | |||
299 | IDL_PROPERTY_SUPPORT = YES |
|
299 | IDL_PROPERTY_SUPPORT = YES | |
300 |
|
300 | |||
301 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC |
|
301 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC | |
302 | # tag is set to YES, then doxygen will reuse the documentation of the first |
|
302 | # tag is set to YES, then doxygen will reuse the documentation of the first | |
303 | # member in the group (if any) for the other members of the group. By default |
|
303 | # member in the group (if any) for the other members of the group. By default | |
304 | # all members of a group must be documented explicitly. |
|
304 | # all members of a group must be documented explicitly. | |
305 |
|
305 | |||
306 | DISTRIBUTE_GROUP_DOC = NO |
|
306 | DISTRIBUTE_GROUP_DOC = NO | |
307 |
|
307 | |||
308 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of |
|
308 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of | |
309 | # the same type (for instance a group of public functions) to be put as a |
|
309 | # the same type (for instance a group of public functions) to be put as a | |
310 | # subgroup of that type (e.g. under the Public Functions section). Set it to |
|
310 | # subgroup of that type (e.g. under the Public Functions section). Set it to | |
311 | # NO to prevent subgrouping. Alternatively, this can be done per class using |
|
311 | # NO to prevent subgrouping. Alternatively, this can be done per class using | |
312 | # the \nosubgrouping command. |
|
312 | # the \nosubgrouping command. | |
313 |
|
313 | |||
314 | SUBGROUPING = YES |
|
314 | SUBGROUPING = YES | |
315 |
|
315 | |||
316 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and |
|
316 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and | |
317 | # unions are shown inside the group in which they are included (e.g. using |
|
317 | # unions are shown inside the group in which they are included (e.g. using | |
318 | # @ingroup) instead of on a separate page (for HTML and Man pages) or |
|
318 | # @ingroup) instead of on a separate page (for HTML and Man pages) or | |
319 | # section (for LaTeX and RTF). |
|
319 | # section (for LaTeX and RTF). | |
320 |
|
320 | |||
321 | INLINE_GROUPED_CLASSES = NO |
|
321 | INLINE_GROUPED_CLASSES = NO | |
322 |
|
322 | |||
323 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and |
|
323 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and | |
324 | # unions with only public data fields will be shown inline in the documentation |
|
324 | # unions with only public data fields will be shown inline in the documentation | |
325 | # of the scope in which they are defined (i.e. file, namespace, or group |
|
325 | # of the scope in which they are defined (i.e. file, namespace, or group | |
326 | # documentation), provided this scope is documented. If set to NO (the default), |
|
326 | # documentation), provided this scope is documented. If set to NO (the default), | |
327 | # structs, classes, and unions are shown on a separate page (for HTML and Man |
|
327 | # structs, classes, and unions are shown on a separate page (for HTML and Man | |
328 | # pages) or section (for LaTeX and RTF). |
|
328 | # pages) or section (for LaTeX and RTF). | |
329 |
|
329 | |||
330 | INLINE_SIMPLE_STRUCTS = NO |
|
330 | INLINE_SIMPLE_STRUCTS = NO | |
331 |
|
331 | |||
332 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum |
|
332 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum | |
333 | # is documented as struct, union, or enum with the name of the typedef. So |
|
333 | # is documented as struct, union, or enum with the name of the typedef. So | |
334 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct |
|
334 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct | |
335 | # with name TypeT. When disabled the typedef will appear as a member of a file, |
|
335 | # with name TypeT. When disabled the typedef will appear as a member of a file, | |
336 | # namespace, or class. And the struct will be named TypeS. This can typically |
|
336 | # namespace, or class. And the struct will be named TypeS. This can typically | |
337 | # be useful for C code in case the coding convention dictates that all compound |
|
337 | # be useful for C code in case the coding convention dictates that all compound | |
338 | # types are typedef'ed and only the typedef is referenced, never the tag name. |
|
338 | # types are typedef'ed and only the typedef is referenced, never the tag name. | |
339 |
|
339 | |||
340 | TYPEDEF_HIDES_STRUCT = NO |
|
340 | TYPEDEF_HIDES_STRUCT = NO | |
341 |
|
341 | |||
342 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to |
|
342 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to | |
343 | # determine which symbols to keep in memory and which to flush to disk. |
|
343 | # determine which symbols to keep in memory and which to flush to disk. | |
344 | # When the cache is full, less often used symbols will be written to disk. |
|
344 | # When the cache is full, less often used symbols will be written to disk. | |
345 | # For small to medium size projects (<1000 input files) the default value is |
|
345 | # For small to medium size projects (<1000 input files) the default value is | |
346 | # probably good enough. For larger projects a too small cache size can cause |
|
346 | # probably good enough. For larger projects a too small cache size can cause | |
347 | # doxygen to be busy swapping symbols to and from disk most of the time |
|
347 | # doxygen to be busy swapping symbols to and from disk most of the time | |
348 | # causing a significant performance penalty. |
|
348 | # causing a significant performance penalty. | |
349 | # If the system has enough physical memory increasing the cache will improve the |
|
349 | # If the system has enough physical memory increasing the cache will improve the | |
350 | # performance by keeping more symbols in memory. Note that the value works on |
|
350 | # performance by keeping more symbols in memory. Note that the value works on | |
351 | # a logarithmic scale so increasing the size by one will roughly double the |
|
351 | # a logarithmic scale so increasing the size by one will roughly double the | |
352 | # memory usage. The cache size is given by this formula: |
|
352 | # memory usage. The cache size is given by this formula: | |
353 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, |
|
353 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, | |
354 | # corresponding to a cache size of 2^16 = 65536 symbols. |
|
354 | # corresponding to a cache size of 2^16 = 65536 symbols. | |
355 |
|
355 | |||
356 | SYMBOL_CACHE_SIZE = 0 |
|
356 | SYMBOL_CACHE_SIZE = 0 | |
357 |
|
357 | |||
358 | # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be |
|
358 | # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be | |
359 | # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given |
|
359 | # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given | |
360 | # their name and scope. Since this can be an expensive process and often the |
|
360 | # their name and scope. Since this can be an expensive process and often the | |
361 | # same symbol appear multiple times in the code, doxygen keeps a cache of |
|
361 | # same symbol appear multiple times in the code, doxygen keeps a cache of | |
362 | # pre-resolved symbols. If the cache is too small doxygen will become slower. |
|
362 | # pre-resolved symbols. If the cache is too small doxygen will become slower. | |
363 | # If the cache is too large, memory is wasted. The cache size is given by this |
|
363 | # If the cache is too large, memory is wasted. The cache size is given by this | |
364 | # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, |
|
364 | # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, | |
365 | # corresponding to a cache size of 2^16 = 65536 symbols. |
|
365 | # corresponding to a cache size of 2^16 = 65536 symbols. | |
366 |
|
366 | |||
367 | LOOKUP_CACHE_SIZE = 0 |
|
367 | LOOKUP_CACHE_SIZE = 0 | |
368 |
|
368 | |||
369 | #--------------------------------------------------------------------------- |
|
369 | #--------------------------------------------------------------------------- | |
370 | # Build related configuration options |
|
370 | # Build related configuration options | |
371 | #--------------------------------------------------------------------------- |
|
371 | #--------------------------------------------------------------------------- | |
372 |
|
372 | |||
373 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in |
|
373 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in | |
374 | # documentation are documented, even if no documentation was available. |
|
374 | # documentation are documented, even if no documentation was available. | |
375 | # Private class members and static file members will be hidden unless |
|
375 | # Private class members and static file members will be hidden unless | |
376 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES |
|
376 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES | |
377 |
|
377 | |||
378 | EXTRACT_ALL = YES |
|
378 | EXTRACT_ALL = YES | |
379 |
|
379 | |||
380 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class |
|
380 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class | |
381 | # will be included in the documentation. |
|
381 | # will be included in the documentation. | |
382 |
|
382 | |||
383 | EXTRACT_PRIVATE = NO |
|
383 | EXTRACT_PRIVATE = NO | |
384 |
|
384 | |||
385 | # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal |
|
385 | # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal | |
386 | # scope will be included in the documentation. |
|
386 | # scope will be included in the documentation. | |
387 |
|
387 | |||
388 | EXTRACT_PACKAGE = NO |
|
388 | EXTRACT_PACKAGE = NO | |
389 |
|
389 | |||
390 | # If the EXTRACT_STATIC tag is set to YES all static members of a file |
|
390 | # If the EXTRACT_STATIC tag is set to YES all static members of a file | |
391 | # will be included in the documentation. |
|
391 | # will be included in the documentation. | |
392 |
|
392 | |||
393 | EXTRACT_STATIC = NO |
|
393 | EXTRACT_STATIC = NO | |
394 |
|
394 | |||
395 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) |
|
395 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) | |
396 | # defined locally in source files will be included in the documentation. |
|
396 | # defined locally in source files will be included in the documentation. | |
397 | # If set to NO only classes defined in header files are included. |
|
397 | # If set to NO only classes defined in header files are included. | |
398 |
|
398 | |||
399 | EXTRACT_LOCAL_CLASSES = YES |
|
399 | EXTRACT_LOCAL_CLASSES = YES | |
400 |
|
400 | |||
401 | # This flag is only useful for Objective-C code. When set to YES local |
|
401 | # This flag is only useful for Objective-C code. When set to YES local | |
402 | # methods, which are defined in the implementation section but not in |
|
402 | # methods, which are defined in the implementation section but not in | |
403 | # the interface are included in the documentation. |
|
403 | # the interface are included in the documentation. | |
404 | # If set to NO (the default) only methods in the interface are included. |
|
404 | # If set to NO (the default) only methods in the interface are included. | |
405 |
|
405 | |||
406 | EXTRACT_LOCAL_METHODS = NO |
|
406 | EXTRACT_LOCAL_METHODS = NO | |
407 |
|
407 | |||
408 | # If this flag is set to YES, the members of anonymous namespaces will be |
|
408 | # If this flag is set to YES, the members of anonymous namespaces will be | |
409 | # extracted and appear in the documentation as a namespace called |
|
409 | # extracted and appear in the documentation as a namespace called | |
410 | # 'anonymous_namespace{file}', where file will be replaced with the base |
|
410 | # 'anonymous_namespace{file}', where file will be replaced with the base | |
411 | # name of the file that contains the anonymous namespace. By default |
|
411 | # name of the file that contains the anonymous namespace. By default | |
412 | # anonymous namespaces are hidden. |
|
412 | # anonymous namespaces are hidden. | |
413 |
|
413 | |||
414 | EXTRACT_ANON_NSPACES = NO |
|
414 | EXTRACT_ANON_NSPACES = NO | |
415 |
|
415 | |||
416 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all |
|
416 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all | |
417 | # undocumented members of documented classes, files or namespaces. |
|
417 | # undocumented members of documented classes, files or namespaces. | |
418 | # If set to NO (the default) these members will be included in the |
|
418 | # If set to NO (the default) these members will be included in the | |
419 | # various overviews, but no documentation section is generated. |
|
419 | # various overviews, but no documentation section is generated. | |
420 | # This option has no effect if EXTRACT_ALL is enabled. |
|
420 | # This option has no effect if EXTRACT_ALL is enabled. | |
421 |
|
421 | |||
422 | HIDE_UNDOC_MEMBERS = NO |
|
422 | HIDE_UNDOC_MEMBERS = NO | |
423 |
|
423 | |||
424 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all |
|
424 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all | |
425 | # undocumented classes that are normally visible in the class hierarchy. |
|
425 | # undocumented classes that are normally visible in the class hierarchy. | |
426 | # If set to NO (the default) these classes will be included in the various |
|
426 | # If set to NO (the default) these classes will be included in the various | |
427 | # overviews. This option has no effect if EXTRACT_ALL is enabled. |
|
427 | # overviews. This option has no effect if EXTRACT_ALL is enabled. | |
428 |
|
428 | |||
429 | HIDE_UNDOC_CLASSES = NO |
|
429 | HIDE_UNDOC_CLASSES = NO | |
430 |
|
430 | |||
431 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all |
|
431 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all | |
432 | # friend (class|struct|union) declarations. |
|
432 | # friend (class|struct|union) declarations. | |
433 | # If set to NO (the default) these declarations will be included in the |
|
433 | # If set to NO (the default) these declarations will be included in the | |
434 | # documentation. |
|
434 | # documentation. | |
435 |
|
435 | |||
436 | HIDE_FRIEND_COMPOUNDS = NO |
|
436 | HIDE_FRIEND_COMPOUNDS = NO | |
437 |
|
437 | |||
438 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any |
|
438 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any | |
439 | # documentation blocks found inside the body of a function. |
|
439 | # documentation blocks found inside the body of a function. | |
440 | # If set to NO (the default) these blocks will be appended to the |
|
440 | # If set to NO (the default) these blocks will be appended to the | |
441 | # function's detailed documentation block. |
|
441 | # function's detailed documentation block. | |
442 |
|
442 | |||
443 | HIDE_IN_BODY_DOCS = NO |
|
443 | HIDE_IN_BODY_DOCS = NO | |
444 |
|
444 | |||
445 | # The INTERNAL_DOCS tag determines if documentation |
|
445 | # The INTERNAL_DOCS tag determines if documentation | |
446 | # that is typed after a \internal command is included. If the tag is set |
|
446 | # that is typed after a \internal command is included. If the tag is set | |
447 | # to NO (the default) then the documentation will be excluded. |
|
447 | # to NO (the default) then the documentation will be excluded. | |
448 | # Set it to YES to include the internal documentation. |
|
448 | # Set it to YES to include the internal documentation. | |
449 |
|
449 | |||
450 | INTERNAL_DOCS = NO |
|
450 | INTERNAL_DOCS = NO | |
451 |
|
451 | |||
452 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate |
|
452 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate | |
453 | # file names in lower-case letters. If set to YES upper-case letters are also |
|
453 | # file names in lower-case letters. If set to YES upper-case letters are also | |
454 | # allowed. This is useful if you have classes or files whose names only differ |
|
454 | # allowed. This is useful if you have classes or files whose names only differ | |
455 | # in case and if your file system supports case sensitive file names. Windows |
|
455 | # in case and if your file system supports case sensitive file names. Windows | |
456 | # and Mac users are advised to set this option to NO. |
|
456 | # and Mac users are advised to set this option to NO. | |
457 |
|
457 | |||
458 | CASE_SENSE_NAMES = NO |
|
458 | CASE_SENSE_NAMES = NO | |
459 |
|
459 | |||
460 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen |
|
460 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen | |
461 | # will show members with their full class and namespace scopes in the |
|
461 | # will show members with their full class and namespace scopes in the | |
462 | # documentation. If set to YES the scope will be hidden. |
|
462 | # documentation. If set to YES the scope will be hidden. | |
463 |
|
463 | |||
464 | HIDE_SCOPE_NAMES = YES |
|
464 | HIDE_SCOPE_NAMES = YES | |
465 |
|
465 | |||
466 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen |
|
466 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen | |
467 | # will put a list of the files that are included by a file in the documentation |
|
467 | # will put a list of the files that are included by a file in the documentation | |
468 | # of that file. |
|
468 | # of that file. | |
469 |
|
469 | |||
470 | SHOW_INCLUDE_FILES = YES |
|
470 | SHOW_INCLUDE_FILES = YES | |
471 |
|
471 | |||
472 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen |
|
472 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen | |
473 | # will list include files with double quotes in the documentation |
|
473 | # will list include files with double quotes in the documentation | |
474 | # rather than with sharp brackets. |
|
474 | # rather than with sharp brackets. | |
475 |
|
475 | |||
476 | FORCE_LOCAL_INCLUDES = NO |
|
476 | FORCE_LOCAL_INCLUDES = NO | |
477 |
|
477 | |||
478 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] |
|
478 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] | |
479 | # is inserted in the documentation for inline members. |
|
479 | # is inserted in the documentation for inline members. | |
480 |
|
480 | |||
481 | INLINE_INFO = YES |
|
481 | INLINE_INFO = YES | |
482 |
|
482 | |||
483 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen |
|
483 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen | |
484 | # will sort the (detailed) documentation of file and class members |
|
484 | # will sort the (detailed) documentation of file and class members | |
485 | # alphabetically by member name. If set to NO the members will appear in |
|
485 | # alphabetically by member name. If set to NO the members will appear in | |
486 | # declaration order. |
|
486 | # declaration order. | |
487 |
|
487 | |||
488 | SORT_MEMBER_DOCS = YES |
|
488 | SORT_MEMBER_DOCS = YES | |
489 |
|
489 | |||
490 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the |
|
490 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the | |
491 | # brief documentation of file, namespace and class members alphabetically |
|
491 | # brief documentation of file, namespace and class members alphabetically | |
492 | # by member name. If set to NO (the default) the members will appear in |
|
492 | # by member name. If set to NO (the default) the members will appear in | |
493 | # declaration order. |
|
493 | # declaration order. | |
494 |
|
494 | |||
495 | SORT_BRIEF_DOCS = NO |
|
495 | SORT_BRIEF_DOCS = NO | |
496 |
|
496 | |||
497 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen |
|
497 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen | |
498 | # will sort the (brief and detailed) documentation of class members so that |
|
498 | # will sort the (brief and detailed) documentation of class members so that | |
499 | # constructors and destructors are listed first. If set to NO (the default) |
|
499 | # constructors and destructors are listed first. If set to NO (the default) | |
500 | # the constructors will appear in the respective orders defined by |
|
500 | # the constructors will appear in the respective orders defined by | |
501 | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. |
|
501 | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. | |
502 | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO |
|
502 | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO | |
503 | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. |
|
503 | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. | |
504 |
|
504 | |||
505 | SORT_MEMBERS_CTORS_1ST = NO |
|
505 | SORT_MEMBERS_CTORS_1ST = NO | |
506 |
|
506 | |||
507 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the |
|
507 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the | |
508 | # hierarchy of group names into alphabetical order. If set to NO (the default) |
|
508 | # hierarchy of group names into alphabetical order. If set to NO (the default) | |
509 | # the group names will appear in their defined order. |
|
509 | # the group names will appear in their defined order. | |
510 |
|
510 | |||
511 | SORT_GROUP_NAMES = NO |
|
511 | SORT_GROUP_NAMES = NO | |
512 |
|
512 | |||
513 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be |
|
513 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be | |
514 | # sorted by fully-qualified names, including namespaces. If set to |
|
514 | # sorted by fully-qualified names, including namespaces. If set to | |
515 | # NO (the default), the class list will be sorted only by class name, |
|
515 | # NO (the default), the class list will be sorted only by class name, | |
516 | # not including the namespace part. |
|
516 | # not including the namespace part. | |
517 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. |
|
517 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. | |
518 | # Note: This option applies only to the class list, not to the |
|
518 | # Note: This option applies only to the class list, not to the | |
519 | # alphabetical list. |
|
519 | # alphabetical list. | |
520 |
|
520 | |||
521 | SORT_BY_SCOPE_NAME = NO |
|
521 | SORT_BY_SCOPE_NAME = NO | |
522 |
|
522 | |||
523 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to |
|
523 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to | |
524 | # do proper type resolution of all parameters of a function it will reject a |
|
524 | # do proper type resolution of all parameters of a function it will reject a | |
525 | # match between the prototype and the implementation of a member function even |
|
525 | # match between the prototype and the implementation of a member function even | |
526 | # if there is only one candidate or it is obvious which candidate to choose |
|
526 | # if there is only one candidate or it is obvious which candidate to choose | |
527 | # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen |
|
527 | # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen | |
528 | # will still accept a match between prototype and implementation in such cases. |
|
528 | # will still accept a match between prototype and implementation in such cases. | |
529 |
|
529 | |||
530 | STRICT_PROTO_MATCHING = NO |
|
530 | STRICT_PROTO_MATCHING = NO | |
531 |
|
531 | |||
532 | # The GENERATE_TODOLIST tag can be used to enable (YES) or |
|
532 | # The GENERATE_TODOLIST tag can be used to enable (YES) or | |
533 | # disable (NO) the todo list. This list is created by putting \todo |
|
533 | # disable (NO) the todo list. This list is created by putting \todo | |
534 | # commands in the documentation. |
|
534 | # commands in the documentation. | |
535 |
|
535 | |||
536 | GENERATE_TODOLIST = YES |
|
536 | GENERATE_TODOLIST = YES | |
537 |
|
537 | |||
538 | # The GENERATE_TESTLIST tag can be used to enable (YES) or |
|
538 | # The GENERATE_TESTLIST tag can be used to enable (YES) or | |
539 | # disable (NO) the test list. This list is created by putting \test |
|
539 | # disable (NO) the test list. This list is created by putting \test | |
540 | # commands in the documentation. |
|
540 | # commands in the documentation. | |
541 |
|
541 | |||
542 | GENERATE_TESTLIST = YES |
|
542 | GENERATE_TESTLIST = YES | |
543 |
|
543 | |||
544 | # The GENERATE_BUGLIST tag can be used to enable (YES) or |
|
544 | # The GENERATE_BUGLIST tag can be used to enable (YES) or | |
545 | # disable (NO) the bug list. This list is created by putting \bug |
|
545 | # disable (NO) the bug list. This list is created by putting \bug | |
546 | # commands in the documentation. |
|
546 | # commands in the documentation. | |
547 |
|
547 | |||
548 | GENERATE_BUGLIST = YES |
|
548 | GENERATE_BUGLIST = YES | |
549 |
|
549 | |||
550 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or |
|
550 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or | |
551 | # disable (NO) the deprecated list. This list is created by putting |
|
551 | # disable (NO) the deprecated list. This list is created by putting | |
552 | # \deprecated commands in the documentation. |
|
552 | # \deprecated commands in the documentation. | |
553 |
|
553 | |||
554 | GENERATE_DEPRECATEDLIST= YES |
|
554 | GENERATE_DEPRECATEDLIST= YES | |
555 |
|
555 | |||
556 | # The ENABLED_SECTIONS tag can be used to enable conditional |
|
556 | # The ENABLED_SECTIONS tag can be used to enable conditional | |
557 | # documentation sections, marked by \if section-label ... \endif |
|
557 | # documentation sections, marked by \if section-label ... \endif | |
558 | # and \cond section-label ... \endcond blocks. |
|
558 | # and \cond section-label ... \endcond blocks. | |
559 |
|
559 | |||
560 | ENABLED_SECTIONS = |
|
560 | ENABLED_SECTIONS = | |
561 |
|
561 | |||
562 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines |
|
562 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines | |
563 | # the initial value of a variable or macro consists of for it to appear in |
|
563 | # the initial value of a variable or macro consists of for it to appear in | |
564 | # the documentation. If the initializer consists of more lines than specified |
|
564 | # the documentation. If the initializer consists of more lines than specified | |
565 | # here it will be hidden. Use a value of 0 to hide initializers completely. |
|
565 | # here it will be hidden. Use a value of 0 to hide initializers completely. | |
566 | # The appearance of the initializer of individual variables and macros in the |
|
566 | # The appearance of the initializer of individual variables and macros in the | |
567 | # documentation can be controlled using \showinitializer or \hideinitializer |
|
567 | # documentation can be controlled using \showinitializer or \hideinitializer | |
568 | # command in the documentation regardless of this setting. |
|
568 | # command in the documentation regardless of this setting. | |
569 |
|
569 | |||
570 | MAX_INITIALIZER_LINES = 30 |
|
570 | MAX_INITIALIZER_LINES = 30 | |
571 |
|
571 | |||
572 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated |
|
572 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated | |
573 | # at the bottom of the documentation of classes and structs. If set to YES the |
|
573 | # at the bottom of the documentation of classes and structs. If set to YES the | |
574 | # list will mention the files that were used to generate the documentation. |
|
574 | # list will mention the files that were used to generate the documentation. | |
575 |
|
575 | |||
576 | SHOW_USED_FILES = YES |
|
576 | SHOW_USED_FILES = YES | |
577 |
|
577 | |||
578 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. |
|
578 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. | |
579 | # This will remove the Files entry from the Quick Index and from the |
|
579 | # This will remove the Files entry from the Quick Index and from the | |
580 | # Folder Tree View (if specified). The default is YES. |
|
580 | # Folder Tree View (if specified). The default is YES. | |
581 |
|
581 | |||
582 | SHOW_FILES = YES |
|
582 | SHOW_FILES = YES | |
583 |
|
583 | |||
584 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the |
|
584 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the | |
585 | # Namespaces page. This will remove the Namespaces entry from the Quick Index |
|
585 | # Namespaces page. This will remove the Namespaces entry from the Quick Index | |
586 | # and from the Folder Tree View (if specified). The default is YES. |
|
586 | # and from the Folder Tree View (if specified). The default is YES. | |
587 |
|
587 | |||
588 | SHOW_NAMESPACES = YES |
|
588 | SHOW_NAMESPACES = YES | |
589 |
|
589 | |||
590 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that |
|
590 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that | |
591 | # doxygen should invoke to get the current version for each file (typically from |
|
591 | # doxygen should invoke to get the current version for each file (typically from | |
592 | # the version control system). Doxygen will invoke the program by executing (via |
|
592 | # the version control system). Doxygen will invoke the program by executing (via | |
593 | # popen()) the command <command> <input-file>, where <command> is the value of |
|
593 | # popen()) the command <command> <input-file>, where <command> is the value of | |
594 | # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file |
|
594 | # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file | |
595 | # provided by doxygen. Whatever the program writes to standard output |
|
595 | # provided by doxygen. Whatever the program writes to standard output | |
596 | # is used as the file version. See the manual for examples. |
|
596 | # is used as the file version. See the manual for examples. | |
597 |
|
597 | |||
598 | FILE_VERSION_FILTER = |
|
598 | FILE_VERSION_FILTER = | |
599 |
|
599 | |||
600 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed |
|
600 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed | |
601 | # by doxygen. The layout file controls the global structure of the generated |
|
601 | # by doxygen. The layout file controls the global structure of the generated | |
602 | # output files in an output format independent way. To create the layout file |
|
602 | # output files in an output format independent way. To create the layout file | |
603 | # that represents doxygen's defaults, run doxygen with the -l option. |
|
603 | # that represents doxygen's defaults, run doxygen with the -l option. | |
604 | # You can optionally specify a file name after the option, if omitted |
|
604 | # You can optionally specify a file name after the option, if omitted | |
605 | # DoxygenLayout.xml will be used as the name of the layout file. |
|
605 | # DoxygenLayout.xml will be used as the name of the layout file. | |
606 |
|
606 | |||
607 | LAYOUT_FILE = |
|
607 | LAYOUT_FILE = | |
608 |
|
608 | |||
609 | # The CITE_BIB_FILES tag can be used to specify one or more bib files |
|
609 | # The CITE_BIB_FILES tag can be used to specify one or more bib files | |
610 | # containing the references data. This must be a list of .bib files. The |
|
610 | # containing the references data. This must be a list of .bib files. The | |
611 | # .bib extension is automatically appended if omitted. Using this command |
|
611 | # .bib extension is automatically appended if omitted. Using this command | |
612 | # requires the bibtex tool to be installed. See also |
|
612 | # requires the bibtex tool to be installed. See also | |
613 | # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style |
|
613 | # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style | |
614 | # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this |
|
614 | # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this | |
615 | # feature you need bibtex and perl available in the search path. Do not use |
|
615 | # feature you need bibtex and perl available in the search path. Do not use | |
616 | # file names with spaces, bibtex cannot handle them. |
|
616 | # file names with spaces, bibtex cannot handle them. | |
617 |
|
617 | |||
618 | CITE_BIB_FILES = |
|
618 | CITE_BIB_FILES = | |
619 |
|
619 | |||
620 | #--------------------------------------------------------------------------- |
|
620 | #--------------------------------------------------------------------------- | |
621 | # configuration options related to warning and progress messages |
|
621 | # configuration options related to warning and progress messages | |
622 | #--------------------------------------------------------------------------- |
|
622 | #--------------------------------------------------------------------------- | |
623 |
|
623 | |||
624 | # The QUIET tag can be used to turn on/off the messages that are generated |
|
624 | # The QUIET tag can be used to turn on/off the messages that are generated | |
625 | # by doxygen. Possible values are YES and NO. If left blank NO is used. |
|
625 | # by doxygen. Possible values are YES and NO. If left blank NO is used. | |
626 |
|
626 | |||
627 | QUIET = NO |
|
627 | QUIET = NO | |
628 |
|
628 | |||
629 | # The WARNINGS tag can be used to turn on/off the warning messages that are |
|
629 | # The WARNINGS tag can be used to turn on/off the warning messages that are | |
630 | # generated by doxygen. Possible values are YES and NO. If left blank |
|
630 | # generated by doxygen. Possible values are YES and NO. If left blank | |
631 | # NO is used. |
|
631 | # NO is used. | |
632 |
|
632 | |||
633 | WARNINGS = YES |
|
633 | WARNINGS = YES | |
634 |
|
634 | |||
635 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings |
|
635 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings | |
636 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will |
|
636 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will | |
637 | # automatically be disabled. |
|
637 | # automatically be disabled. | |
638 |
|
638 | |||
639 | WARN_IF_UNDOCUMENTED = YES |
|
639 | WARN_IF_UNDOCUMENTED = YES | |
640 |
|
640 | |||
641 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for |
|
641 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for | |
642 | # potential errors in the documentation, such as not documenting some |
|
642 | # potential errors in the documentation, such as not documenting some | |
643 | # parameters in a documented function, or documenting parameters that |
|
643 | # parameters in a documented function, or documenting parameters that | |
644 | # don't exist or using markup commands wrongly. |
|
644 | # don't exist or using markup commands wrongly. | |
645 |
|
645 | |||
646 | WARN_IF_DOC_ERROR = YES |
|
646 | WARN_IF_DOC_ERROR = YES | |
647 |
|
647 | |||
648 | # The WARN_NO_PARAMDOC option can be enabled to get warnings for |
|
648 | # The WARN_NO_PARAMDOC option can be enabled to get warnings for | |
649 | # functions that are documented, but have no documentation for their parameters |
|
649 | # functions that are documented, but have no documentation for their parameters | |
650 | # or return value. If set to NO (the default) doxygen will only warn about |
|
650 | # or return value. If set to NO (the default) doxygen will only warn about | |
651 | # wrong or incomplete parameter documentation, but not about the absence of |
|
651 | # wrong or incomplete parameter documentation, but not about the absence of | |
652 | # documentation. |
|
652 | # documentation. | |
653 |
|
653 | |||
654 | WARN_NO_PARAMDOC = NO |
|
654 | WARN_NO_PARAMDOC = NO | |
655 |
|
655 | |||
656 | # The WARN_FORMAT tag determines the format of the warning messages that |
|
656 | # The WARN_FORMAT tag determines the format of the warning messages that | |
657 | # doxygen can produce. The string should contain the $file, $line, and $text |
|
657 | # doxygen can produce. The string should contain the $file, $line, and $text | |
658 | # tags, which will be replaced by the file and line number from which the |
|
658 | # tags, which will be replaced by the file and line number from which the | |
659 | # warning originated and the warning text. Optionally the format may contain |
|
659 | # warning originated and the warning text. Optionally the format may contain | |
660 | # $version, which will be replaced by the version of the file (if it could |
|
660 | # $version, which will be replaced by the version of the file (if it could | |
661 | # be obtained via FILE_VERSION_FILTER) |
|
661 | # be obtained via FILE_VERSION_FILTER) | |
662 |
|
662 | |||
663 | WARN_FORMAT = "$file:$line: $text" |
|
663 | WARN_FORMAT = "$file:$line: $text" | |
664 |
|
664 | |||
665 | # The WARN_LOGFILE tag can be used to specify a file to which warning |
|
665 | # The WARN_LOGFILE tag can be used to specify a file to which warning | |
666 | # and error messages should be written. If left blank the output is written |
|
666 | # and error messages should be written. If left blank the output is written | |
667 | # to stderr. |
|
667 | # to stderr. | |
668 |
|
668 | |||
669 | WARN_LOGFILE = |
|
669 | WARN_LOGFILE = | |
670 |
|
670 | |||
671 | #--------------------------------------------------------------------------- |
|
671 | #--------------------------------------------------------------------------- | |
672 | # configuration options related to the input files |
|
672 | # configuration options related to the input files | |
673 | #--------------------------------------------------------------------------- |
|
673 | #--------------------------------------------------------------------------- | |
674 |
|
674 | |||
675 | # The INPUT tag can be used to specify the files and/or directories that contain |
|
675 | # The INPUT tag can be used to specify the files and/or directories that contain | |
676 | # documented source files. You may enter file names like "myfile.cpp" or |
|
676 | # documented source files. You may enter file names like "myfile.cpp" or | |
677 | # directories like "/usr/src/myproject". Separate the files or directories |
|
677 | # directories like "/usr/src/myproject". Separate the files or directories | |
678 | # with spaces. |
|
678 | # with spaces. | |
679 |
|
679 | |||
680 | INPUT = ../ |
|
680 | INPUT = ../ | |
681 |
|
681 | |||
682 | # This tag can be used to specify the character encoding of the source files |
|
682 | # This tag can be used to specify the character encoding of the source files | |
683 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is |
|
683 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is | |
684 | # also the default input encoding. Doxygen uses libiconv (or the iconv built |
|
684 | # also the default input encoding. Doxygen uses libiconv (or the iconv built | |
685 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for |
|
685 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for | |
686 | # the list of possible encodings. |
|
686 | # the list of possible encodings. | |
687 |
|
687 | |||
688 | INPUT_ENCODING = UTF-8 |
|
688 | INPUT_ENCODING = UTF-8 | |
689 |
|
689 | |||
690 | # If the value of the INPUT tag contains directories, you can use the |
|
690 | # If the value of the INPUT tag contains directories, you can use the | |
691 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
|
691 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp | |
692 | # and *.h) to filter out the source-files in the directories. If left |
|
692 | # and *.h) to filter out the source-files in the directories. If left | |
693 | # blank the following patterns are tested: |
|
693 | # blank the following patterns are tested: | |
694 | # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh |
|
694 | # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh | |
695 | # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py |
|
695 | # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py | |
696 | # *.f90 *.f *.for *.vhd *.vhdl |
|
696 | # *.f90 *.f *.for *.vhd *.vhdl | |
697 |
|
697 | |||
698 | FILE_PATTERNS = *.c \ |
|
698 | FILE_PATTERNS = *.c \ | |
699 | *.cc \ |
|
699 | *.cc \ | |
700 | *.cxx \ |
|
700 | *.cxx \ | |
701 | *.cpp \ |
|
701 | *.cpp \ | |
702 | *.c++ \ |
|
702 | *.c++ \ | |
703 | *.d \ |
|
703 | *.d \ | |
704 | *.java \ |
|
704 | *.java \ | |
705 | *.ii \ |
|
705 | *.ii \ | |
706 | *.ixx \ |
|
706 | *.ixx \ | |
707 | *.ipp \ |
|
707 | *.ipp \ | |
708 | *.i++ \ |
|
708 | *.i++ \ | |
709 | *.inl \ |
|
709 | *.inl \ | |
710 | *.h \ |
|
710 | *.h \ | |
711 | *.hh \ |
|
711 | *.hh \ | |
712 | *.hxx \ |
|
712 | *.hxx \ | |
713 | *.hpp \ |
|
713 | *.hpp \ | |
714 | *.h++ \ |
|
714 | *.h++ \ | |
715 | *.idl \ |
|
715 | *.idl \ | |
716 | *.odl \ |
|
716 | *.odl \ | |
717 | *.cs \ |
|
717 | *.cs \ | |
718 | *.php \ |
|
718 | *.php \ | |
719 | *.php3 \ |
|
719 | *.php3 \ | |
720 | *.inc \ |
|
720 | *.inc \ | |
721 | *.m \ |
|
721 | *.m \ | |
722 | *.markdown \ |
|
722 | *.markdown \ | |
723 | *.md \ |
|
723 | *.md \ | |
724 | *.mm \ |
|
724 | *.mm \ | |
725 | *.dox \ |
|
725 | *.dox \ | |
726 | *.py \ |
|
726 | *.py \ | |
727 | *.f90 \ |
|
727 | *.f90 \ | |
728 | *.f \ |
|
728 | *.f \ | |
729 | *.for \ |
|
729 | *.for \ | |
730 | *.vhd \ |
|
730 | *.vhd \ | |
731 | *.vhdl |
|
731 | *.vhdl | |
732 |
|
732 | |||
733 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories |
|
733 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories | |
734 | # should be searched for input files as well. Possible values are YES and NO. |
|
734 | # should be searched for input files as well. Possible values are YES and NO. | |
735 | # If left blank NO is used. |
|
735 | # If left blank NO is used. | |
736 |
|
736 | |||
737 | RECURSIVE = YES |
|
737 | RECURSIVE = YES | |
738 |
|
738 | |||
739 | # The EXCLUDE tag can be used to specify files and/or directories that should be |
|
739 | # The EXCLUDE tag can be used to specify files and/or directories that should be | |
740 | # excluded from the INPUT source files. This way you can easily exclude a |
|
740 | # excluded from the INPUT source files. This way you can easily exclude a | |
741 | # subdirectory from a directory tree whose root is specified with the INPUT tag. |
|
741 | # subdirectory from a directory tree whose root is specified with the INPUT tag. | |
742 | # Note that relative paths are relative to the directory from which doxygen is |
|
742 | # Note that relative paths are relative to the directory from which doxygen is | |
743 | # run. |
|
743 | # run. | |
744 |
|
744 | |||
745 | EXCLUDE = |
|
745 | EXCLUDE = | |
746 |
|
746 | |||
747 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or |
|
747 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or | |
748 | # directories that are symbolic links (a Unix file system feature) are excluded |
|
748 | # directories that are symbolic links (a Unix file system feature) are excluded | |
749 | # from the input. |
|
749 | # from the input. | |
750 |
|
750 | |||
751 | EXCLUDE_SYMLINKS = NO |
|
751 | EXCLUDE_SYMLINKS = NO | |
752 |
|
752 | |||
753 | # If the value of the INPUT tag contains directories, you can use the |
|
753 | # If the value of the INPUT tag contains directories, you can use the | |
754 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude |
|
754 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude | |
755 | # certain files from those directories. Note that the wildcards are matched |
|
755 | # certain files from those directories. Note that the wildcards are matched | |
756 | # against the file with absolute path, so to exclude all test directories |
|
756 | # against the file with absolute path, so to exclude all test directories | |
757 | # for example use the pattern */test/* |
|
757 | # for example use the pattern */test/* | |
758 |
|
758 | |||
759 | EXCLUDE_PATTERNS = |
|
759 | EXCLUDE_PATTERNS = | |
760 |
|
760 | |||
761 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names |
|
761 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names | |
762 | # (namespaces, classes, functions, etc.) that should be excluded from the |
|
762 | # (namespaces, classes, functions, etc.) that should be excluded from the | |
763 | # output. The symbol name can be a fully qualified name, a word, or if the |
|
763 | # output. The symbol name can be a fully qualified name, a word, or if the | |
764 | # wildcard * is used, a substring. Examples: ANamespace, AClass, |
|
764 | # wildcard * is used, a substring. Examples: ANamespace, AClass, | |
765 | # AClass::ANamespace, ANamespace::*Test |
|
765 | # AClass::ANamespace, ANamespace::*Test | |
766 |
|
766 | |||
767 | EXCLUDE_SYMBOLS = |
|
767 | EXCLUDE_SYMBOLS = | |
768 |
|
768 | |||
769 | # The EXAMPLE_PATH tag can be used to specify one or more files or |
|
769 | # The EXAMPLE_PATH tag can be used to specify one or more files or | |
770 | # directories that contain example code fragments that are included (see |
|
770 | # directories that contain example code fragments that are included (see | |
771 | # the \include command). |
|
771 | # the \include command). | |
772 |
|
772 | |||
773 | EXAMPLE_PATH = |
|
773 | EXAMPLE_PATH = | |
774 |
|
774 | |||
775 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the |
|
775 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the | |
776 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
|
776 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp | |
777 | # and *.h) to filter out the source-files in the directories. If left |
|
777 | # and *.h) to filter out the source-files in the directories. If left | |
778 | # blank all files are included. |
|
778 | # blank all files are included. | |
779 |
|
779 | |||
780 | EXAMPLE_PATTERNS = * |
|
780 | EXAMPLE_PATTERNS = * | |
781 |
|
781 | |||
782 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be |
|
782 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be | |
783 | # searched for input files to be used with the \include or \dontinclude |
|
783 | # searched for input files to be used with the \include or \dontinclude | |
784 | # commands irrespective of the value of the RECURSIVE tag. |
|
784 | # commands irrespective of the value of the RECURSIVE tag. | |
785 | # Possible values are YES and NO. If left blank NO is used. |
|
785 | # Possible values are YES and NO. If left blank NO is used. | |
786 |
|
786 | |||
787 | EXAMPLE_RECURSIVE = NO |
|
787 | EXAMPLE_RECURSIVE = NO | |
788 |
|
788 | |||
789 | # The IMAGE_PATH tag can be used to specify one or more files or |
|
789 | # The IMAGE_PATH tag can be used to specify one or more files or | |
790 | # directories that contain image that are included in the documentation (see |
|
790 | # directories that contain image that are included in the documentation (see | |
791 | # the \image command). |
|
791 | # the \image command). | |
792 |
|
792 | |||
793 | IMAGE_PATH = |
|
793 | IMAGE_PATH = | |
794 |
|
794 | |||
795 | # The INPUT_FILTER tag can be used to specify a program that doxygen should |
|
795 | # The INPUT_FILTER tag can be used to specify a program that doxygen should | |
796 | # invoke to filter for each input file. Doxygen will invoke the filter program |
|
796 | # invoke to filter for each input file. Doxygen will invoke the filter program | |
797 | # by executing (via popen()) the command <filter> <input-file>, where <filter> |
|
797 | # by executing (via popen()) the command <filter> <input-file>, where <filter> | |
798 | # is the value of the INPUT_FILTER tag, and <input-file> is the name of an |
|
798 | # is the value of the INPUT_FILTER tag, and <input-file> is the name of an | |
799 | # input file. Doxygen will then use the output that the filter program writes |
|
799 | # input file. Doxygen will then use the output that the filter program writes | |
800 | # to standard output. If FILTER_PATTERNS is specified, this tag will be |
|
800 | # to standard output. If FILTER_PATTERNS is specified, this tag will be | |
801 | # ignored. |
|
801 | # ignored. | |
802 |
|
802 | |||
803 | INPUT_FILTER = |
|
803 | INPUT_FILTER = | |
804 |
|
804 | |||
805 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern |
|
805 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern | |
806 | # basis. Doxygen will compare the file name with each pattern and apply the |
|
806 | # basis. Doxygen will compare the file name with each pattern and apply the | |
807 | # filter if there is a match. The filters are a list of the form: |
|
807 | # filter if there is a match. The filters are a list of the form: | |
808 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further |
|
808 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further | |
809 | # info on how filters are used. If FILTER_PATTERNS is empty or if |
|
809 | # info on how filters are used. If FILTER_PATTERNS is empty or if | |
810 | # non of the patterns match the file name, INPUT_FILTER is applied. |
|
810 | # non of the patterns match the file name, INPUT_FILTER is applied. | |
811 |
|
811 | |||
812 | FILTER_PATTERNS = |
|
812 | FILTER_PATTERNS = | |
813 |
|
813 | |||
814 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using |
|
814 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using | |
815 | # INPUT_FILTER) will be used to filter the input files when producing source |
|
815 | # INPUT_FILTER) will be used to filter the input files when producing source | |
816 | # files to browse (i.e. when SOURCE_BROWSER is set to YES). |
|
816 | # files to browse (i.e. when SOURCE_BROWSER is set to YES). | |
817 |
|
817 | |||
818 | FILTER_SOURCE_FILES = NO |
|
818 | FILTER_SOURCE_FILES = NO | |
819 |
|
819 | |||
820 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file |
|
820 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file | |
821 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) |
|
821 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) | |
822 | # and it is also possible to disable source filtering for a specific pattern |
|
822 | # and it is also possible to disable source filtering for a specific pattern | |
823 | # using *.ext= (so without naming a filter). This option only has effect when |
|
823 | # using *.ext= (so without naming a filter). This option only has effect when | |
824 | # FILTER_SOURCE_FILES is enabled. |
|
824 | # FILTER_SOURCE_FILES is enabled. | |
825 |
|
825 | |||
826 | FILTER_SOURCE_PATTERNS = |
|
826 | FILTER_SOURCE_PATTERNS = | |
827 |
|
827 | |||
828 | # If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that |
|
828 | # If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that | |
829 | # is part of the input, its contents will be placed on the main page (index.html). |
|
829 | # is part of the input, its contents will be placed on the main page (index.html). | |
830 | # This can be useful if you have a project on for instance GitHub and want reuse |
|
830 | # This can be useful if you have a project on for instance GitHub and want reuse | |
831 | # the introduction page also for the doxygen output. |
|
831 | # the introduction page also for the doxygen output. | |
832 |
|
832 | |||
833 | USE_MDFILE_AS_MAINPAGE = |
|
833 | USE_MDFILE_AS_MAINPAGE = | |
834 |
|
834 | |||
835 | #--------------------------------------------------------------------------- |
|
835 | #--------------------------------------------------------------------------- | |
836 | # configuration options related to source browsing |
|
836 | # configuration options related to source browsing | |
837 | #--------------------------------------------------------------------------- |
|
837 | #--------------------------------------------------------------------------- | |
838 |
|
838 | |||
839 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will |
|
839 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will | |
840 | # be generated. Documented entities will be cross-referenced with these sources. |
|
840 | # be generated. Documented entities will be cross-referenced with these sources. | |
841 | # Note: To get rid of all source code in the generated output, make sure also |
|
841 | # Note: To get rid of all source code in the generated output, make sure also | |
842 | # VERBATIM_HEADERS is set to NO. |
|
842 | # VERBATIM_HEADERS is set to NO. | |
843 |
|
843 | |||
844 | SOURCE_BROWSER = YES |
|
844 | SOURCE_BROWSER = YES | |
845 |
|
845 | |||
846 | # Setting the INLINE_SOURCES tag to YES will include the body |
|
846 | # Setting the INLINE_SOURCES tag to YES will include the body | |
847 | # of functions and classes directly in the documentation. |
|
847 | # of functions and classes directly in the documentation. | |
848 |
|
848 | |||
849 | INLINE_SOURCES = NO |
|
849 | INLINE_SOURCES = NO | |
850 |
|
850 | |||
851 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct |
|
851 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct | |
852 | # doxygen to hide any special comment blocks from generated source code |
|
852 | # doxygen to hide any special comment blocks from generated source code | |
853 | # fragments. Normal C, C++ and Fortran comments will always remain visible. |
|
853 | # fragments. Normal C, C++ and Fortran comments will always remain visible. | |
854 |
|
854 | |||
855 | STRIP_CODE_COMMENTS = YES |
|
855 | STRIP_CODE_COMMENTS = YES | |
856 |
|
856 | |||
857 | # If the REFERENCED_BY_RELATION tag is set to YES |
|
857 | # If the REFERENCED_BY_RELATION tag is set to YES | |
858 | # then for each documented function all documented |
|
858 | # then for each documented function all documented | |
859 | # functions referencing it will be listed. |
|
859 | # functions referencing it will be listed. | |
860 |
|
860 | |||
861 | REFERENCED_BY_RELATION = NO |
|
861 | REFERENCED_BY_RELATION = NO | |
862 |
|
862 | |||
863 | # If the REFERENCES_RELATION tag is set to YES |
|
863 | # If the REFERENCES_RELATION tag is set to YES | |
864 | # then for each documented function all documented entities |
|
864 | # then for each documented function all documented entities | |
865 | # called/used by that function will be listed. |
|
865 | # called/used by that function will be listed. | |
866 |
|
866 | |||
867 | REFERENCES_RELATION = NO |
|
867 | REFERENCES_RELATION = NO | |
868 |
|
868 | |||
869 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) |
|
869 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) | |
870 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from |
|
870 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from | |
871 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will |
|
871 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will | |
872 | # link to the source code. Otherwise they will link to the documentation. |
|
872 | # link to the source code. Otherwise they will link to the documentation. | |
873 |
|
873 | |||
874 | REFERENCES_LINK_SOURCE = YES |
|
874 | REFERENCES_LINK_SOURCE = YES | |
875 |
|
875 | |||
876 | # If the USE_HTAGS tag is set to YES then the references to source code |
|
876 | # If the USE_HTAGS tag is set to YES then the references to source code | |
877 | # will point to the HTML generated by the htags(1) tool instead of doxygen |
|
877 | # will point to the HTML generated by the htags(1) tool instead of doxygen | |
878 | # built-in source browser. The htags tool is part of GNU's global source |
|
878 | # built-in source browser. The htags tool is part of GNU's global source | |
879 | # tagging system (see http://www.gnu.org/software/global/global.html). You |
|
879 | # tagging system (see http://www.gnu.org/software/global/global.html). You | |
880 | # will need version 4.8.6 or higher. |
|
880 | # will need version 4.8.6 or higher. | |
881 |
|
881 | |||
882 | USE_HTAGS = NO |
|
882 | USE_HTAGS = NO | |
883 |
|
883 | |||
884 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen |
|
884 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen | |
885 | # will generate a verbatim copy of the header file for each class for |
|
885 | # will generate a verbatim copy of the header file for each class for | |
886 | # which an include is specified. Set to NO to disable this. |
|
886 | # which an include is specified. Set to NO to disable this. | |
887 |
|
887 | |||
888 | VERBATIM_HEADERS = YES |
|
888 | VERBATIM_HEADERS = YES | |
889 |
|
889 | |||
890 | #--------------------------------------------------------------------------- |
|
890 | #--------------------------------------------------------------------------- | |
891 | # configuration options related to the alphabetical class index |
|
891 | # configuration options related to the alphabetical class index | |
892 | #--------------------------------------------------------------------------- |
|
892 | #--------------------------------------------------------------------------- | |
893 |
|
893 | |||
894 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index |
|
894 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index | |
895 | # of all compounds will be generated. Enable this if the project |
|
895 | # of all compounds will be generated. Enable this if the project | |
896 | # contains a lot of classes, structs, unions or interfaces. |
|
896 | # contains a lot of classes, structs, unions or interfaces. | |
897 |
|
897 | |||
898 | ALPHABETICAL_INDEX = YES |
|
898 | ALPHABETICAL_INDEX = YES | |
899 |
|
899 | |||
900 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then |
|
900 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then | |
901 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns |
|
901 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns | |
902 | # in which this list will be split (can be a number in the range [1..20]) |
|
902 | # in which this list will be split (can be a number in the range [1..20]) | |
903 |
|
903 | |||
904 | COLS_IN_ALPHA_INDEX = 5 |
|
904 | COLS_IN_ALPHA_INDEX = 5 | |
905 |
|
905 | |||
906 | # In case all classes in a project start with a common prefix, all |
|
906 | # In case all classes in a project start with a common prefix, all | |
907 | # classes will be put under the same header in the alphabetical index. |
|
907 | # classes will be put under the same header in the alphabetical index. | |
908 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that |
|
908 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that | |
909 | # should be ignored while generating the index headers. |
|
909 | # should be ignored while generating the index headers. | |
910 |
|
910 | |||
911 | IGNORE_PREFIX = |
|
911 | IGNORE_PREFIX = | |
912 |
|
912 | |||
913 | #--------------------------------------------------------------------------- |
|
913 | #--------------------------------------------------------------------------- | |
914 | # configuration options related to the HTML output |
|
914 | # configuration options related to the HTML output | |
915 | #--------------------------------------------------------------------------- |
|
915 | #--------------------------------------------------------------------------- | |
916 |
|
916 | |||
917 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will |
|
917 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will | |
918 | # generate HTML output. |
|
918 | # generate HTML output. | |
919 |
|
919 | |||
920 | GENERATE_HTML = YES |
|
920 | GENERATE_HTML = YES | |
921 |
|
921 | |||
922 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. |
|
922 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. | |
923 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
|
923 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be | |
924 | # put in front of it. If left blank `html' will be used as the default path. |
|
924 | # put in front of it. If left blank `html' will be used as the default path. | |
925 |
|
925 | |||
926 | HTML_OUTPUT = html |
|
926 | HTML_OUTPUT = html | |
927 |
|
927 | |||
928 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for |
|
928 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for | |
929 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank |
|
929 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank | |
930 | # doxygen will generate files with .html extension. |
|
930 | # doxygen will generate files with .html extension. | |
931 |
|
931 | |||
932 | HTML_FILE_EXTENSION = .html |
|
932 | HTML_FILE_EXTENSION = .html | |
933 |
|
933 | |||
934 | # The HTML_HEADER tag can be used to specify a personal HTML header for |
|
934 | # The HTML_HEADER tag can be used to specify a personal HTML header for | |
935 | # each generated HTML page. If it is left blank doxygen will generate a |
|
935 | # each generated HTML page. If it is left blank doxygen will generate a | |
936 | # standard header. Note that when using a custom header you are responsible |
|
936 | # standard header. Note that when using a custom header you are responsible | |
937 | # for the proper inclusion of any scripts and style sheets that doxygen |
|
937 | # for the proper inclusion of any scripts and style sheets that doxygen | |
938 | # needs, which is dependent on the configuration options used. |
|
938 | # needs, which is dependent on the configuration options used. | |
939 | # It is advised to generate a default header using "doxygen -w html |
|
939 | # It is advised to generate a default header using "doxygen -w html | |
940 | # header.html footer.html stylesheet.css YourConfigFile" and then modify |
|
940 | # header.html footer.html stylesheet.css YourConfigFile" and then modify | |
941 | # that header. Note that the header is subject to change so you typically |
|
941 | # that header. Note that the header is subject to change so you typically | |
942 | # have to redo this when upgrading to a newer version of doxygen or when |
|
942 | # have to redo this when upgrading to a newer version of doxygen or when | |
943 | # changing the value of configuration settings such as GENERATE_TREEVIEW! |
|
943 | # changing the value of configuration settings such as GENERATE_TREEVIEW! | |
944 |
|
944 | |||
945 | HTML_HEADER = |
|
945 | HTML_HEADER = | |
946 |
|
946 | |||
947 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for |
|
947 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for | |
948 | # each generated HTML page. If it is left blank doxygen will generate a |
|
948 | # each generated HTML page. If it is left blank doxygen will generate a | |
949 | # standard footer. |
|
949 | # standard footer. | |
950 |
|
950 | |||
951 | HTML_FOOTER = |
|
951 | HTML_FOOTER = | |
952 |
|
952 | |||
953 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading |
|
953 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading | |
954 | # style sheet that is used by each HTML page. It can be used to |
|
954 | # style sheet that is used by each HTML page. It can be used to | |
955 | # fine-tune the look of the HTML output. If left blank doxygen will |
|
955 | # fine-tune the look of the HTML output. If left blank doxygen will | |
956 | # generate a default style sheet. Note that it is recommended to use |
|
956 | # generate a default style sheet. Note that it is recommended to use | |
957 | # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this |
|
957 | # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this | |
958 | # tag will in the future become obsolete. |
|
958 | # tag will in the future become obsolete. | |
959 |
|
959 | |||
960 | HTML_STYLESHEET = |
|
960 | HTML_STYLESHEET = | |
961 |
|
961 | |||
962 | # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional |
|
962 | # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional | |
963 | # user-defined cascading style sheet that is included after the standard |
|
963 | # user-defined cascading style sheet that is included after the standard | |
964 | # style sheets created by doxygen. Using this option one can overrule |
|
964 | # style sheets created by doxygen. Using this option one can overrule | |
965 | # certain style aspects. This is preferred over using HTML_STYLESHEET |
|
965 | # certain style aspects. This is preferred over using HTML_STYLESHEET | |
966 | # since it does not replace the standard style sheet and is therefor more |
|
966 | # since it does not replace the standard style sheet and is therefor more | |
967 | # robust against future updates. Doxygen will copy the style sheet file to |
|
967 | # robust against future updates. Doxygen will copy the style sheet file to | |
968 | # the output directory. |
|
968 | # the output directory. | |
969 |
|
969 | |||
970 | HTML_EXTRA_STYLESHEET = |
|
970 | HTML_EXTRA_STYLESHEET = | |
971 |
|
971 | |||
972 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or |
|
972 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or | |
973 | # other source files which should be copied to the HTML output directory. Note |
|
973 | # other source files which should be copied to the HTML output directory. Note | |
974 | # that these files will be copied to the base HTML output directory. Use the |
|
974 | # that these files will be copied to the base HTML output directory. Use the | |
975 | # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these |
|
975 | # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these | |
976 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that |
|
976 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that | |
977 | # the files will be copied as-is; there are no commands or markers available. |
|
977 | # the files will be copied as-is; there are no commands or markers available. | |
978 |
|
978 | |||
979 | HTML_EXTRA_FILES = |
|
979 | HTML_EXTRA_FILES = | |
980 |
|
980 | |||
981 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. |
|
981 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. | |
982 | # Doxygen will adjust the colors in the style sheet and background images |
|
982 | # Doxygen will adjust the colors in the style sheet and background images | |
983 | # according to this color. Hue is specified as an angle on a colorwheel, |
|
983 | # according to this color. Hue is specified as an angle on a colorwheel, | |
984 | # see http://en.wikipedia.org/wiki/Hue for more information. |
|
984 | # see http://en.wikipedia.org/wiki/Hue for more information. | |
985 | # For instance the value 0 represents red, 60 is yellow, 120 is green, |
|
985 | # For instance the value 0 represents red, 60 is yellow, 120 is green, | |
986 | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. |
|
986 | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. | |
987 | # The allowed range is 0 to 359. |
|
987 | # The allowed range is 0 to 359. | |
988 |
|
988 | |||
989 | HTML_COLORSTYLE_HUE = 220 |
|
989 | HTML_COLORSTYLE_HUE = 220 | |
990 |
|
990 | |||
991 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of |
|
991 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of | |
992 | # the colors in the HTML output. For a value of 0 the output will use |
|
992 | # the colors in the HTML output. For a value of 0 the output will use | |
993 | # grayscales only. A value of 255 will produce the most vivid colors. |
|
993 | # grayscales only. A value of 255 will produce the most vivid colors. | |
994 |
|
994 | |||
995 | HTML_COLORSTYLE_SAT = 100 |
|
995 | HTML_COLORSTYLE_SAT = 100 | |
996 |
|
996 | |||
997 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to |
|
997 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to | |
998 | # the luminance component of the colors in the HTML output. Values below |
|
998 | # the luminance component of the colors in the HTML output. Values below | |
999 | # 100 gradually make the output lighter, whereas values above 100 make |
|
999 | # 100 gradually make the output lighter, whereas values above 100 make | |
1000 | # the output darker. The value divided by 100 is the actual gamma applied, |
|
1000 | # the output darker. The value divided by 100 is the actual gamma applied, | |
1001 | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, |
|
1001 | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, | |
1002 | # and 100 does not change the gamma. |
|
1002 | # and 100 does not change the gamma. | |
1003 |
|
1003 | |||
1004 | HTML_COLORSTYLE_GAMMA = 80 |
|
1004 | HTML_COLORSTYLE_GAMMA = 80 | |
1005 |
|
1005 | |||
1006 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML |
|
1006 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML | |
1007 | # page will contain the date and time when the page was generated. Setting |
|
1007 | # page will contain the date and time when the page was generated. Setting | |
1008 | # this to NO can help when comparing the output of multiple runs. |
|
1008 | # this to NO can help when comparing the output of multiple runs. | |
1009 |
|
1009 | |||
1010 | HTML_TIMESTAMP = YES |
|
1010 | HTML_TIMESTAMP = YES | |
1011 |
|
1011 | |||
1012 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML |
|
1012 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML | |
1013 | # documentation will contain sections that can be hidden and shown after the |
|
1013 | # documentation will contain sections that can be hidden and shown after the | |
1014 | # page has loaded. |
|
1014 | # page has loaded. | |
1015 |
|
1015 | |||
1016 | HTML_DYNAMIC_SECTIONS = NO |
|
1016 | HTML_DYNAMIC_SECTIONS = NO | |
1017 |
|
1017 | |||
1018 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of |
|
1018 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of | |
1019 | # entries shown in the various tree structured indices initially; the user |
|
1019 | # entries shown in the various tree structured indices initially; the user | |
1020 | # can expand and collapse entries dynamically later on. Doxygen will expand |
|
1020 | # can expand and collapse entries dynamically later on. Doxygen will expand | |
1021 | # the tree to such a level that at most the specified number of entries are |
|
1021 | # the tree to such a level that at most the specified number of entries are | |
1022 | # visible (unless a fully collapsed tree already exceeds this amount). |
|
1022 | # visible (unless a fully collapsed tree already exceeds this amount). | |
1023 | # So setting the number of entries 1 will produce a full collapsed tree by |
|
1023 | # So setting the number of entries 1 will produce a full collapsed tree by | |
1024 | # default. 0 is a special value representing an infinite number of entries |
|
1024 | # default. 0 is a special value representing an infinite number of entries | |
1025 | # and will result in a full expanded tree by default. |
|
1025 | # and will result in a full expanded tree by default. | |
1026 |
|
1026 | |||
1027 | HTML_INDEX_NUM_ENTRIES = 100 |
|
1027 | HTML_INDEX_NUM_ENTRIES = 100 | |
1028 |
|
1028 | |||
1029 | # If the GENERATE_DOCSET tag is set to YES, additional index files |
|
1029 | # If the GENERATE_DOCSET tag is set to YES, additional index files | |
1030 | # will be generated that can be used as input for Apple's Xcode 3 |
|
1030 | # will be generated that can be used as input for Apple's Xcode 3 | |
1031 | # integrated development environment, introduced with OSX 10.5 (Leopard). |
|
1031 | # integrated development environment, introduced with OSX 10.5 (Leopard). | |
1032 | # To create a documentation set, doxygen will generate a Makefile in the |
|
1032 | # To create a documentation set, doxygen will generate a Makefile in the | |
1033 | # HTML output directory. Running make will produce the docset in that |
|
1033 | # HTML output directory. Running make will produce the docset in that | |
1034 | # directory and running "make install" will install the docset in |
|
1034 | # directory and running "make install" will install the docset in | |
1035 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find |
|
1035 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find | |
1036 | # it at startup. |
|
1036 | # it at startup. | |
1037 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html |
|
1037 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html | |
1038 | # for more information. |
|
1038 | # for more information. | |
1039 |
|
1039 | |||
1040 | GENERATE_DOCSET = NO |
|
1040 | GENERATE_DOCSET = NO | |
1041 |
|
1041 | |||
1042 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the |
|
1042 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the | |
1043 | # feed. A documentation feed provides an umbrella under which multiple |
|
1043 | # feed. A documentation feed provides an umbrella under which multiple | |
1044 | # documentation sets from a single provider (such as a company or product suite) |
|
1044 | # documentation sets from a single provider (such as a company or product suite) | |
1045 | # can be grouped. |
|
1045 | # can be grouped. | |
1046 |
|
1046 | |||
1047 | DOCSET_FEEDNAME = "Doxygen generated docs" |
|
1047 | DOCSET_FEEDNAME = "Doxygen generated docs" | |
1048 |
|
1048 | |||
1049 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that |
|
1049 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that | |
1050 | # should uniquely identify the documentation set bundle. This should be a |
|
1050 | # should uniquely identify the documentation set bundle. This should be a | |
1051 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen |
|
1051 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen | |
1052 | # will append .docset to the name. |
|
1052 | # will append .docset to the name. | |
1053 |
|
1053 | |||
1054 | DOCSET_BUNDLE_ID = org.doxygen.Project |
|
1054 | DOCSET_BUNDLE_ID = org.doxygen.Project | |
1055 |
|
1055 | |||
1056 | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely |
|
1056 | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely | |
1057 | # identify the documentation publisher. This should be a reverse domain-name |
|
1057 | # identify the documentation publisher. This should be a reverse domain-name | |
1058 | # style string, e.g. com.mycompany.MyDocSet.documentation. |
|
1058 | # style string, e.g. com.mycompany.MyDocSet.documentation. | |
1059 |
|
1059 | |||
1060 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher |
|
1060 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher | |
1061 |
|
1061 | |||
1062 | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. |
|
1062 | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. | |
1063 |
|
1063 | |||
1064 | DOCSET_PUBLISHER_NAME = Publisher |
|
1064 | DOCSET_PUBLISHER_NAME = Publisher | |
1065 |
|
1065 | |||
1066 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files |
|
1066 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files | |
1067 | # will be generated that can be used as input for tools like the |
|
1067 | # will be generated that can be used as input for tools like the | |
1068 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) |
|
1068 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) | |
1069 | # of the generated HTML documentation. |
|
1069 | # of the generated HTML documentation. | |
1070 |
|
1070 | |||
1071 | GENERATE_HTMLHELP = NO |
|
1071 | GENERATE_HTMLHELP = NO | |
1072 |
|
1072 | |||
1073 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can |
|
1073 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can | |
1074 | # be used to specify the file name of the resulting .chm file. You |
|
1074 | # be used to specify the file name of the resulting .chm file. You | |
1075 | # can add a path in front of the file if the result should not be |
|
1075 | # can add a path in front of the file if the result should not be | |
1076 | # written to the html output directory. |
|
1076 | # written to the html output directory. | |
1077 |
|
1077 | |||
1078 | CHM_FILE = |
|
1078 | CHM_FILE = | |
1079 |
|
1079 | |||
1080 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can |
|
1080 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can | |
1081 | # be used to specify the location (absolute path including file name) of |
|
1081 | # be used to specify the location (absolute path including file name) of | |
1082 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run |
|
1082 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run | |
1083 | # the HTML help compiler on the generated index.hhp. |
|
1083 | # the HTML help compiler on the generated index.hhp. | |
1084 |
|
1084 | |||
1085 | HHC_LOCATION = |
|
1085 | HHC_LOCATION = | |
1086 |
|
1086 | |||
1087 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag |
|
1087 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag | |
1088 | # controls if a separate .chi index file is generated (YES) or that |
|
1088 | # controls if a separate .chi index file is generated (YES) or that | |
1089 | # it should be included in the master .chm file (NO). |
|
1089 | # it should be included in the master .chm file (NO). | |
1090 |
|
1090 | |||
1091 | GENERATE_CHI = NO |
|
1091 | GENERATE_CHI = NO | |
1092 |
|
1092 | |||
1093 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING |
|
1093 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING | |
1094 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file |
|
1094 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file | |
1095 | # content. |
|
1095 | # content. | |
1096 |
|
1096 | |||
1097 | CHM_INDEX_ENCODING = |
|
1097 | CHM_INDEX_ENCODING = | |
1098 |
|
1098 | |||
1099 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag |
|
1099 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag | |
1100 | # controls whether a binary table of contents is generated (YES) or a |
|
1100 | # controls whether a binary table of contents is generated (YES) or a | |
1101 | # normal table of contents (NO) in the .chm file. |
|
1101 | # normal table of contents (NO) in the .chm file. | |
1102 |
|
1102 | |||
1103 | BINARY_TOC = NO |
|
1103 | BINARY_TOC = NO | |
1104 |
|
1104 | |||
1105 | # The TOC_EXPAND flag can be set to YES to add extra items for group members |
|
1105 | # The TOC_EXPAND flag can be set to YES to add extra items for group members | |
1106 | # to the contents of the HTML help documentation and to the tree view. |
|
1106 | # to the contents of the HTML help documentation and to the tree view. | |
1107 |
|
1107 | |||
1108 | TOC_EXPAND = NO |
|
1108 | TOC_EXPAND = NO | |
1109 |
|
1109 | |||
1110 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and |
|
1110 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and | |
1111 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated |
|
1111 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated | |
1112 | # that can be used as input for Qt's qhelpgenerator to generate a |
|
1112 | # that can be used as input for Qt's qhelpgenerator to generate a | |
1113 | # Qt Compressed Help (.qch) of the generated HTML documentation. |
|
1113 | # Qt Compressed Help (.qch) of the generated HTML documentation. | |
1114 |
|
1114 | |||
1115 | GENERATE_QHP = NO |
|
1115 | GENERATE_QHP = NO | |
1116 |
|
1116 | |||
1117 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can |
|
1117 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can | |
1118 | # be used to specify the file name of the resulting .qch file. |
|
1118 | # be used to specify the file name of the resulting .qch file. | |
1119 | # The path specified is relative to the HTML output folder. |
|
1119 | # The path specified is relative to the HTML output folder. | |
1120 |
|
1120 | |||
1121 | QCH_FILE = |
|
1121 | QCH_FILE = | |
1122 |
|
1122 | |||
1123 | # The QHP_NAMESPACE tag specifies the namespace to use when generating |
|
1123 | # The QHP_NAMESPACE tag specifies the namespace to use when generating | |
1124 | # Qt Help Project output. For more information please see |
|
1124 | # Qt Help Project output. For more information please see | |
1125 | # http://doc.trolltech.com/qthelpproject.html#namespace |
|
1125 | # http://doc.trolltech.com/qthelpproject.html#namespace | |
1126 |
|
1126 | |||
1127 | QHP_NAMESPACE = org.doxygen.Project |
|
1127 | QHP_NAMESPACE = org.doxygen.Project | |
1128 |
|
1128 | |||
1129 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating |
|
1129 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating | |
1130 | # Qt Help Project output. For more information please see |
|
1130 | # Qt Help Project output. For more information please see | |
1131 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders |
|
1131 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders | |
1132 |
|
1132 | |||
1133 | QHP_VIRTUAL_FOLDER = doc |
|
1133 | QHP_VIRTUAL_FOLDER = doc | |
1134 |
|
1134 | |||
1135 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to |
|
1135 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to | |
1136 | # add. For more information please see |
|
1136 | # add. For more information please see | |
1137 | # http://doc.trolltech.com/qthelpproject.html#custom-filters |
|
1137 | # http://doc.trolltech.com/qthelpproject.html#custom-filters | |
1138 |
|
1138 | |||
1139 | QHP_CUST_FILTER_NAME = |
|
1139 | QHP_CUST_FILTER_NAME = | |
1140 |
|
1140 | |||
1141 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the |
|
1141 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the | |
1142 | # custom filter to add. For more information please see |
|
1142 | # custom filter to add. For more information please see | |
1143 | # <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> |
|
1143 | # <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> | |
1144 | # Qt Help Project / Custom Filters</a>. |
|
1144 | # Qt Help Project / Custom Filters</a>. | |
1145 |
|
1145 | |||
1146 | QHP_CUST_FILTER_ATTRS = |
|
1146 | QHP_CUST_FILTER_ATTRS = | |
1147 |
|
1147 | |||
1148 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this |
|
1148 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this | |
1149 | # project's |
|
1149 | # project's | |
1150 | # filter section matches. |
|
1150 | # filter section matches. | |
1151 | # <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> |
|
1151 | # <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> | |
1152 | # Qt Help Project / Filter Attributes</a>. |
|
1152 | # Qt Help Project / Filter Attributes</a>. | |
1153 |
|
1153 | |||
1154 | QHP_SECT_FILTER_ATTRS = |
|
1154 | QHP_SECT_FILTER_ATTRS = | |
1155 |
|
1155 | |||
1156 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can |
|
1156 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can | |
1157 | # be used to specify the location of Qt's qhelpgenerator. |
|
1157 | # be used to specify the location of Qt's qhelpgenerator. | |
1158 | # If non-empty doxygen will try to run qhelpgenerator on the generated |
|
1158 | # If non-empty doxygen will try to run qhelpgenerator on the generated | |
1159 | # .qhp file. |
|
1159 | # .qhp file. | |
1160 |
|
1160 | |||
1161 | QHG_LOCATION = |
|
1161 | QHG_LOCATION = | |
1162 |
|
1162 | |||
1163 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files |
|
1163 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files | |
1164 | # will be generated, which together with the HTML files, form an Eclipse help |
|
1164 | # will be generated, which together with the HTML files, form an Eclipse help | |
1165 | # plugin. To install this plugin and make it available under the help contents |
|
1165 | # plugin. To install this plugin and make it available under the help contents | |
1166 | # menu in Eclipse, the contents of the directory containing the HTML and XML |
|
1166 | # menu in Eclipse, the contents of the directory containing the HTML and XML | |
1167 | # files needs to be copied into the plugins directory of eclipse. The name of |
|
1167 | # files needs to be copied into the plugins directory of eclipse. The name of | |
1168 | # the directory within the plugins directory should be the same as |
|
1168 | # the directory within the plugins directory should be the same as | |
1169 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before |
|
1169 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before | |
1170 | # the help appears. |
|
1170 | # the help appears. | |
1171 |
|
1171 | |||
1172 | GENERATE_ECLIPSEHELP = NO |
|
1172 | GENERATE_ECLIPSEHELP = NO | |
1173 |
|
1173 | |||
1174 | # A unique identifier for the eclipse help plugin. When installing the plugin |
|
1174 | # A unique identifier for the eclipse help plugin. When installing the plugin | |
1175 | # the directory name containing the HTML and XML files should also have |
|
1175 | # the directory name containing the HTML and XML files should also have | |
1176 | # this name. |
|
1176 | # this name. | |
1177 |
|
1177 | |||
1178 | ECLIPSE_DOC_ID = org.doxygen.Project |
|
1178 | ECLIPSE_DOC_ID = org.doxygen.Project | |
1179 |
|
1179 | |||
1180 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) |
|
1180 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) | |
1181 | # at top of each HTML page. The value NO (the default) enables the index and |
|
1181 | # at top of each HTML page. The value NO (the default) enables the index and | |
1182 | # the value YES disables it. Since the tabs have the same information as the |
|
1182 | # the value YES disables it. Since the tabs have the same information as the | |
1183 | # navigation tree you can set this option to NO if you already set |
|
1183 | # navigation tree you can set this option to NO if you already set | |
1184 | # GENERATE_TREEVIEW to YES. |
|
1184 | # GENERATE_TREEVIEW to YES. | |
1185 |
|
1185 | |||
1186 | DISABLE_INDEX = NO |
|
1186 | DISABLE_INDEX = NO | |
1187 |
|
1187 | |||
1188 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index |
|
1188 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index | |
1189 | # structure should be generated to display hierarchical information. |
|
1189 | # structure should be generated to display hierarchical information. | |
1190 | # If the tag value is set to YES, a side panel will be generated |
|
1190 | # If the tag value is set to YES, a side panel will be generated | |
1191 | # containing a tree-like index structure (just like the one that |
|
1191 | # containing a tree-like index structure (just like the one that | |
1192 | # is generated for HTML Help). For this to work a browser that supports |
|
1192 | # is generated for HTML Help). For this to work a browser that supports | |
1193 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). |
|
1193 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). | |
1194 | # Windows users are probably better off using the HTML help feature. |
|
1194 | # Windows users are probably better off using the HTML help feature. | |
1195 | # Since the tree basically has the same information as the tab index you |
|
1195 | # Since the tree basically has the same information as the tab index you | |
1196 | # could consider to set DISABLE_INDEX to NO when enabling this option. |
|
1196 | # could consider to set DISABLE_INDEX to NO when enabling this option. | |
1197 |
|
1197 | |||
1198 | GENERATE_TREEVIEW = NO |
|
1198 | GENERATE_TREEVIEW = NO | |
1199 |
|
1199 | |||
1200 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values |
|
1200 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values | |
1201 | # (range [0,1..20]) that doxygen will group on one line in the generated HTML |
|
1201 | # (range [0,1..20]) that doxygen will group on one line in the generated HTML | |
1202 | # documentation. Note that a value of 0 will completely suppress the enum |
|
1202 | # documentation. Note that a value of 0 will completely suppress the enum | |
1203 | # values from appearing in the overview section. |
|
1203 | # values from appearing in the overview section. | |
1204 |
|
1204 | |||
1205 | ENUM_VALUES_PER_LINE = 4 |
|
1205 | ENUM_VALUES_PER_LINE = 4 | |
1206 |
|
1206 | |||
1207 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be |
|
1207 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be | |
1208 | # used to set the initial width (in pixels) of the frame in which the tree |
|
1208 | # used to set the initial width (in pixels) of the frame in which the tree | |
1209 | # is shown. |
|
1209 | # is shown. | |
1210 |
|
1210 | |||
1211 | TREEVIEW_WIDTH = 250 |
|
1211 | TREEVIEW_WIDTH = 250 | |
1212 |
|
1212 | |||
1213 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open |
|
1213 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open | |
1214 | # links to external symbols imported via tag files in a separate window. |
|
1214 | # links to external symbols imported via tag files in a separate window. | |
1215 |
|
1215 | |||
1216 | EXT_LINKS_IN_WINDOW = NO |
|
1216 | EXT_LINKS_IN_WINDOW = NO | |
1217 |
|
1217 | |||
1218 | # Use this tag to change the font size of Latex formulas included |
|
1218 | # Use this tag to change the font size of Latex formulas included | |
1219 | # as images in the HTML documentation. The default is 10. Note that |
|
1219 | # as images in the HTML documentation. The default is 10. Note that | |
1220 | # when you change the font size after a successful doxygen run you need |
|
1220 | # when you change the font size after a successful doxygen run you need | |
1221 | # to manually remove any form_*.png images from the HTML output directory |
|
1221 | # to manually remove any form_*.png images from the HTML output directory | |
1222 | # to force them to be regenerated. |
|
1222 | # to force them to be regenerated. | |
1223 |
|
1223 | |||
1224 | FORMULA_FONTSIZE = 10 |
|
1224 | FORMULA_FONTSIZE = 10 | |
1225 |
|
1225 | |||
1226 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images |
|
1226 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images | |
1227 | # generated for formulas are transparent PNGs. Transparent PNGs are |
|
1227 | # generated for formulas are transparent PNGs. Transparent PNGs are | |
1228 | # not supported properly for IE 6.0, but are supported on all modern browsers. |
|
1228 | # not supported properly for IE 6.0, but are supported on all modern browsers. | |
1229 | # Note that when changing this option you need to delete any form_*.png files |
|
1229 | # Note that when changing this option you need to delete any form_*.png files | |
1230 | # in the HTML output before the changes have effect. |
|
1230 | # in the HTML output before the changes have effect. | |
1231 |
|
1231 | |||
1232 | FORMULA_TRANSPARENT = YES |
|
1232 | FORMULA_TRANSPARENT = YES | |
1233 |
|
1233 | |||
1234 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax |
|
1234 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax | |
1235 | # (see http://www.mathjax.org) which uses client side Javascript for the |
|
1235 | # (see http://www.mathjax.org) which uses client side Javascript for the | |
1236 | # rendering instead of using prerendered bitmaps. Use this if you do not |
|
1236 | # rendering instead of using prerendered bitmaps. Use this if you do not | |
1237 | # have LaTeX installed or if you want to formulas look prettier in the HTML |
|
1237 | # have LaTeX installed or if you want to formulas look prettier in the HTML | |
1238 | # output. When enabled you may also need to install MathJax separately and |
|
1238 | # output. When enabled you may also need to install MathJax separately and | |
1239 | # configure the path to it using the MATHJAX_RELPATH option. |
|
1239 | # configure the path to it using the MATHJAX_RELPATH option. | |
1240 |
|
1240 | |||
1241 | USE_MATHJAX = NO |
|
1241 | USE_MATHJAX = NO | |
1242 |
|
1242 | |||
1243 | # When MathJax is enabled you can set the default output format to be used for |
|
1243 | # When MathJax is enabled you can set the default output format to be used for | |
1244 | # thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and |
|
1244 | # thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and | |
1245 | # SVG. The default value is HTML-CSS, which is slower, but has the best |
|
1245 | # SVG. The default value is HTML-CSS, which is slower, but has the best | |
1246 | # compatibility. |
|
1246 | # compatibility. | |
1247 |
|
1247 | |||
1248 | MATHJAX_FORMAT = HTML-CSS |
|
1248 | MATHJAX_FORMAT = HTML-CSS | |
1249 |
|
1249 | |||
1250 | # When MathJax is enabled you need to specify the location relative to the |
|
1250 | # When MathJax is enabled you need to specify the location relative to the | |
1251 | # HTML output directory using the MATHJAX_RELPATH option. The destination |
|
1251 | # HTML output directory using the MATHJAX_RELPATH option. The destination | |
1252 | # directory should contain the MathJax.js script. For instance, if the mathjax |
|
1252 | # directory should contain the MathJax.js script. For instance, if the mathjax | |
1253 | # directory is located at the same level as the HTML output directory, then |
|
1253 | # directory is located at the same level as the HTML output directory, then | |
1254 | # MATHJAX_RELPATH should be ../mathjax. The default value points to |
|
1254 | # MATHJAX_RELPATH should be ../mathjax. The default value points to | |
1255 | # the MathJax Content Delivery Network so you can quickly see the result without |
|
1255 | # the MathJax Content Delivery Network so you can quickly see the result without | |
1256 | # installing MathJax. However, it is strongly recommended to install a local |
|
1256 | # installing MathJax. However, it is strongly recommended to install a local | |
1257 | # copy of MathJax from http://www.mathjax.org before deployment. |
|
1257 | # copy of MathJax from http://www.mathjax.org before deployment. | |
1258 |
|
1258 | |||
1259 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest |
|
1259 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest | |
1260 |
|
1260 | |||
1261 | # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension |
|
1261 | # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension | |
1262 | # names that should be enabled during MathJax rendering. |
|
1262 | # names that should be enabled during MathJax rendering. | |
1263 |
|
1263 | |||
1264 | MATHJAX_EXTENSIONS = |
|
1264 | MATHJAX_EXTENSIONS = | |
1265 |
|
1265 | |||
1266 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box |
|
1266 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box | |
1267 | # for the HTML output. The underlying search engine uses javascript |
|
1267 | # for the HTML output. The underlying search engine uses javascript | |
1268 | # and DHTML and should work on any modern browser. Note that when using |
|
1268 | # and DHTML and should work on any modern browser. Note that when using | |
1269 | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets |
|
1269 | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets | |
1270 | # (GENERATE_DOCSET) there is already a search function so this one should |
|
1270 | # (GENERATE_DOCSET) there is already a search function so this one should | |
1271 | # typically be disabled. For large projects the javascript based search engine |
|
1271 | # typically be disabled. For large projects the javascript based search engine | |
1272 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. |
|
1272 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. | |
1273 |
|
1273 | |||
1274 | SEARCHENGINE = YES |
|
1274 | SEARCHENGINE = YES | |
1275 |
|
1275 | |||
1276 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be |
|
1276 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be | |
1277 | # implemented using a web server instead of a web client using Javascript. |
|
1277 | # implemented using a web server instead of a web client using Javascript. | |
1278 | # There are two flavours of web server based search depending on the |
|
1278 | # There are two flavours of web server based search depending on the | |
1279 | # EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for |
|
1279 | # EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for | |
1280 | # searching and an index file used by the script. When EXTERNAL_SEARCH is |
|
1280 | # searching and an index file used by the script. When EXTERNAL_SEARCH is | |
1281 | # enabled the indexing and searching needs to be provided by external tools. |
|
1281 | # enabled the indexing and searching needs to be provided by external tools. | |
1282 | # See the manual for details. |
|
1282 | # See the manual for details. | |
1283 |
|
1283 | |||
1284 | SERVER_BASED_SEARCH = NO |
|
1284 | SERVER_BASED_SEARCH = NO | |
1285 |
|
1285 | |||
1286 | # When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP |
|
1286 | # When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP | |
1287 | # script for searching. Instead the search results are written to an XML file |
|
1287 | # script for searching. Instead the search results are written to an XML file | |
1288 | # which needs to be processed by an external indexer. Doxygen will invoke an |
|
1288 | # which needs to be processed by an external indexer. Doxygen will invoke an | |
1289 | # external search engine pointed to by the SEARCHENGINE_URL option to obtain |
|
1289 | # external search engine pointed to by the SEARCHENGINE_URL option to obtain | |
1290 | # the search results. Doxygen ships with an example indexer (doxyindexer) and |
|
1290 | # the search results. Doxygen ships with an example indexer (doxyindexer) and | |
1291 | # search engine (doxysearch.cgi) which are based on the open source search engine |
|
1291 | # search engine (doxysearch.cgi) which are based on the open source search engine | |
1292 | # library Xapian. See the manual for configuration details. |
|
1292 | # library Xapian. See the manual for configuration details. | |
1293 |
|
1293 | |||
1294 | EXTERNAL_SEARCH = NO |
|
1294 | EXTERNAL_SEARCH = NO | |
1295 |
|
1295 | |||
1296 | # The SEARCHENGINE_URL should point to a search engine hosted by a web server |
|
1296 | # The SEARCHENGINE_URL should point to a search engine hosted by a web server | |
1297 | # which will returned the search results when EXTERNAL_SEARCH is enabled. |
|
1297 | # which will returned the search results when EXTERNAL_SEARCH is enabled. | |
1298 | # Doxygen ships with an example search engine (doxysearch) which is based on |
|
1298 | # Doxygen ships with an example search engine (doxysearch) which is based on | |
1299 | # the open source search engine library Xapian. See the manual for configuration |
|
1299 | # the open source search engine library Xapian. See the manual for configuration | |
1300 | # details. |
|
1300 | # details. | |
1301 |
|
1301 | |||
1302 | SEARCHENGINE_URL = |
|
1302 | SEARCHENGINE_URL = | |
1303 |
|
1303 | |||
1304 | # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed |
|
1304 | # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed | |
1305 | # search data is written to a file for indexing by an external tool. With the |
|
1305 | # search data is written to a file for indexing by an external tool. With the | |
1306 | # SEARCHDATA_FILE tag the name of this file can be specified. |
|
1306 | # SEARCHDATA_FILE tag the name of this file can be specified. | |
1307 |
|
1307 | |||
1308 | SEARCHDATA_FILE = searchdata.xml |
|
1308 | SEARCHDATA_FILE = searchdata.xml | |
1309 |
|
1309 | |||
1310 | # When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the |
|
1310 | # When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the | |
1311 | # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is |
|
1311 | # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is | |
1312 | # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple |
|
1312 | # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple | |
1313 | # projects and redirect the results back to the right project. |
|
1313 | # projects and redirect the results back to the right project. | |
1314 |
|
1314 | |||
1315 | EXTERNAL_SEARCH_ID = |
|
1315 | EXTERNAL_SEARCH_ID = | |
1316 |
|
1316 | |||
1317 | # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen |
|
1317 | # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen | |
1318 | # projects other than the one defined by this configuration file, but that are |
|
1318 | # projects other than the one defined by this configuration file, but that are | |
1319 | # all added to the same external search index. Each project needs to have a |
|
1319 | # all added to the same external search index. Each project needs to have a | |
1320 | # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id |
|
1320 | # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id | |
1321 | # of to a relative location where the documentation can be found. |
|
1321 | # of to a relative location where the documentation can be found. | |
1322 | # The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... |
|
1322 | # The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... | |
1323 |
|
1323 | |||
1324 | EXTRA_SEARCH_MAPPINGS = |
|
1324 | EXTRA_SEARCH_MAPPINGS = | |
1325 |
|
1325 | |||
1326 | #--------------------------------------------------------------------------- |
|
1326 | #--------------------------------------------------------------------------- | |
1327 | # configuration options related to the LaTeX output |
|
1327 | # configuration options related to the LaTeX output | |
1328 | #--------------------------------------------------------------------------- |
|
1328 | #--------------------------------------------------------------------------- | |
1329 |
|
1329 | |||
1330 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will |
|
1330 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will | |
1331 | # generate Latex output. |
|
1331 | # generate Latex output. | |
1332 |
|
1332 | |||
1333 | GENERATE_LATEX = NO |
|
1333 | GENERATE_LATEX = NO | |
1334 |
|
1334 | |||
1335 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. |
|
1335 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. | |
1336 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
|
1336 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be | |
1337 | # put in front of it. If left blank `latex' will be used as the default path. |
|
1337 | # put in front of it. If left blank `latex' will be used as the default path. | |
1338 |
|
1338 | |||
1339 | LATEX_OUTPUT = latex |
|
1339 | LATEX_OUTPUT = latex | |
1340 |
|
1340 | |||
1341 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be |
|
1341 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be | |
1342 | # invoked. If left blank `latex' will be used as the default command name. |
|
1342 | # invoked. If left blank `latex' will be used as the default command name. | |
1343 | # Note that when enabling USE_PDFLATEX this option is only used for |
|
1343 | # Note that when enabling USE_PDFLATEX this option is only used for | |
1344 | # generating bitmaps for formulas in the HTML output, but not in the |
|
1344 | # generating bitmaps for formulas in the HTML output, but not in the | |
1345 | # Makefile that is written to the output directory. |
|
1345 | # Makefile that is written to the output directory. | |
1346 |
|
1346 | |||
1347 | LATEX_CMD_NAME = latex |
|
1347 | LATEX_CMD_NAME = latex | |
1348 |
|
1348 | |||
1349 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to |
|
1349 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to | |
1350 | # generate index for LaTeX. If left blank `makeindex' will be used as the |
|
1350 | # generate index for LaTeX. If left blank `makeindex' will be used as the | |
1351 | # default command name. |
|
1351 | # default command name. | |
1352 |
|
1352 | |||
1353 | MAKEINDEX_CMD_NAME = makeindex |
|
1353 | MAKEINDEX_CMD_NAME = makeindex | |
1354 |
|
1354 | |||
1355 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact |
|
1355 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact | |
1356 | # LaTeX documents. This may be useful for small projects and may help to |
|
1356 | # LaTeX documents. This may be useful for small projects and may help to | |
1357 | # save some trees in general. |
|
1357 | # save some trees in general. | |
1358 |
|
1358 | |||
1359 | COMPACT_LATEX = NO |
|
1359 | COMPACT_LATEX = NO | |
1360 |
|
1360 | |||
1361 | # The PAPER_TYPE tag can be used to set the paper type that is used |
|
1361 | # The PAPER_TYPE tag can be used to set the paper type that is used | |
1362 | # by the printer. Possible values are: a4, letter, legal and |
|
1362 | # by the printer. Possible values are: a4, letter, legal and | |
1363 | # executive. If left blank a4wide will be used. |
|
1363 | # executive. If left blank a4wide will be used. | |
1364 |
|
1364 | |||
1365 | PAPER_TYPE = a4 |
|
1365 | PAPER_TYPE = a4 | |
1366 |
|
1366 | |||
1367 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX |
|
1367 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX | |
1368 | # packages that should be included in the LaTeX output. |
|
1368 | # packages that should be included in the LaTeX output. | |
1369 |
|
1369 | |||
1370 | EXTRA_PACKAGES = |
|
1370 | EXTRA_PACKAGES = | |
1371 |
|
1371 | |||
1372 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for |
|
1372 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for | |
1373 | # the generated latex document. The header should contain everything until |
|
1373 | # the generated latex document. The header should contain everything until | |
1374 | # the first chapter. If it is left blank doxygen will generate a |
|
1374 | # the first chapter. If it is left blank doxygen will generate a | |
1375 | # standard header. Notice: only use this tag if you know what you are doing! |
|
1375 | # standard header. Notice: only use this tag if you know what you are doing! | |
1376 |
|
1376 | |||
1377 | LATEX_HEADER = |
|
1377 | LATEX_HEADER = | |
1378 |
|
1378 | |||
1379 | # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for |
|
1379 | # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for | |
1380 | # the generated latex document. The footer should contain everything after |
|
1380 | # the generated latex document. The footer should contain everything after | |
1381 | # the last chapter. If it is left blank doxygen will generate a |
|
1381 | # the last chapter. If it is left blank doxygen will generate a | |
1382 | # standard footer. Notice: only use this tag if you know what you are doing! |
|
1382 | # standard footer. Notice: only use this tag if you know what you are doing! | |
1383 |
|
1383 | |||
1384 | LATEX_FOOTER = |
|
1384 | LATEX_FOOTER = | |
1385 |
|
1385 | |||
1386 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated |
|
1386 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated | |
1387 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will |
|
1387 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will | |
1388 | # contain links (just like the HTML output) instead of page references |
|
1388 | # contain links (just like the HTML output) instead of page references | |
1389 | # This makes the output suitable for online browsing using a pdf viewer. |
|
1389 | # This makes the output suitable for online browsing using a pdf viewer. | |
1390 |
|
1390 | |||
1391 | PDF_HYPERLINKS = YES |
|
1391 | PDF_HYPERLINKS = YES | |
1392 |
|
1392 | |||
1393 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of |
|
1393 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of | |
1394 | # plain latex in the generated Makefile. Set this option to YES to get a |
|
1394 | # plain latex in the generated Makefile. Set this option to YES to get a | |
1395 | # higher quality PDF documentation. |
|
1395 | # higher quality PDF documentation. | |
1396 |
|
1396 | |||
1397 | USE_PDFLATEX = YES |
|
1397 | USE_PDFLATEX = YES | |
1398 |
|
1398 | |||
1399 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. |
|
1399 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. | |
1400 | # command to the generated LaTeX files. This will instruct LaTeX to keep |
|
1400 | # command to the generated LaTeX files. This will instruct LaTeX to keep | |
1401 | # running if errors occur, instead of asking the user for help. |
|
1401 | # running if errors occur, instead of asking the user for help. | |
1402 | # This option is also used when generating formulas in HTML. |
|
1402 | # This option is also used when generating formulas in HTML. | |
1403 |
|
1403 | |||
1404 | LATEX_BATCHMODE = NO |
|
1404 | LATEX_BATCHMODE = NO | |
1405 |
|
1405 | |||
1406 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not |
|
1406 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not | |
1407 | # include the index chapters (such as File Index, Compound Index, etc.) |
|
1407 | # include the index chapters (such as File Index, Compound Index, etc.) | |
1408 | # in the output. |
|
1408 | # in the output. | |
1409 |
|
1409 | |||
1410 | LATEX_HIDE_INDICES = NO |
|
1410 | LATEX_HIDE_INDICES = NO | |
1411 |
|
1411 | |||
1412 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include |
|
1412 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include | |
1413 | # source code with syntax highlighting in the LaTeX output. |
|
1413 | # source code with syntax highlighting in the LaTeX output. | |
1414 | # Note that which sources are shown also depends on other settings |
|
1414 | # Note that which sources are shown also depends on other settings | |
1415 | # such as SOURCE_BROWSER. |
|
1415 | # such as SOURCE_BROWSER. | |
1416 |
|
1416 | |||
1417 | LATEX_SOURCE_CODE = NO |
|
1417 | LATEX_SOURCE_CODE = NO | |
1418 |
|
1418 | |||
1419 | # The LATEX_BIB_STYLE tag can be used to specify the style to use for the |
|
1419 | # The LATEX_BIB_STYLE tag can be used to specify the style to use for the | |
1420 | # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See |
|
1420 | # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See | |
1421 | # http://en.wikipedia.org/wiki/BibTeX for more info. |
|
1421 | # http://en.wikipedia.org/wiki/BibTeX for more info. | |
1422 |
|
1422 | |||
1423 | LATEX_BIB_STYLE = plain |
|
1423 | LATEX_BIB_STYLE = plain | |
1424 |
|
1424 | |||
1425 | #--------------------------------------------------------------------------- |
|
1425 | #--------------------------------------------------------------------------- | |
1426 | # configuration options related to the RTF output |
|
1426 | # configuration options related to the RTF output | |
1427 | #--------------------------------------------------------------------------- |
|
1427 | #--------------------------------------------------------------------------- | |
1428 |
|
1428 | |||
1429 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output |
|
1429 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output | |
1430 | # The RTF output is optimized for Word 97 and may not look very pretty with |
|
1430 | # The RTF output is optimized for Word 97 and may not look very pretty with | |
1431 | # other RTF readers or editors. |
|
1431 | # other RTF readers or editors. | |
1432 |
|
1432 | |||
1433 | GENERATE_RTF = NO |
|
1433 | GENERATE_RTF = NO | |
1434 |
|
1434 | |||
1435 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. |
|
1435 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. | |
1436 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
|
1436 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be | |
1437 | # put in front of it. If left blank `rtf' will be used as the default path. |
|
1437 | # put in front of it. If left blank `rtf' will be used as the default path. | |
1438 |
|
1438 | |||
1439 | RTF_OUTPUT = rtf |
|
1439 | RTF_OUTPUT = rtf | |
1440 |
|
1440 | |||
1441 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact |
|
1441 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact | |
1442 | # RTF documents. This may be useful for small projects and may help to |
|
1442 | # RTF documents. This may be useful for small projects and may help to | |
1443 | # save some trees in general. |
|
1443 | # save some trees in general. | |
1444 |
|
1444 | |||
1445 | COMPACT_RTF = NO |
|
1445 | COMPACT_RTF = NO | |
1446 |
|
1446 | |||
1447 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated |
|
1447 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated | |
1448 | # will contain hyperlink fields. The RTF file will |
|
1448 | # will contain hyperlink fields. The RTF file will | |
1449 | # contain links (just like the HTML output) instead of page references. |
|
1449 | # contain links (just like the HTML output) instead of page references. | |
1450 | # This makes the output suitable for online browsing using WORD or other |
|
1450 | # This makes the output suitable for online browsing using WORD or other | |
1451 | # programs which support those fields. |
|
1451 | # programs which support those fields. | |
1452 | # Note: wordpad (write) and others do not support links. |
|
1452 | # Note: wordpad (write) and others do not support links. | |
1453 |
|
1453 | |||
1454 | RTF_HYPERLINKS = NO |
|
1454 | RTF_HYPERLINKS = NO | |
1455 |
|
1455 | |||
1456 | # Load style sheet definitions from file. Syntax is similar to doxygen's |
|
1456 | # Load style sheet definitions from file. Syntax is similar to doxygen's | |
1457 | # config file, i.e. a series of assignments. You only have to provide |
|
1457 | # config file, i.e. a series of assignments. You only have to provide | |
1458 | # replacements, missing definitions are set to their default value. |
|
1458 | # replacements, missing definitions are set to their default value. | |
1459 |
|
1459 | |||
1460 | RTF_STYLESHEET_FILE = |
|
1460 | RTF_STYLESHEET_FILE = | |
1461 |
|
1461 | |||
1462 | # Set optional variables used in the generation of an rtf document. |
|
1462 | # Set optional variables used in the generation of an rtf document. | |
1463 | # Syntax is similar to doxygen's config file. |
|
1463 | # Syntax is similar to doxygen's config file. | |
1464 |
|
1464 | |||
1465 | RTF_EXTENSIONS_FILE = |
|
1465 | RTF_EXTENSIONS_FILE = | |
1466 |
|
1466 | |||
1467 | #--------------------------------------------------------------------------- |
|
1467 | #--------------------------------------------------------------------------- | |
1468 | # configuration options related to the man page output |
|
1468 | # configuration options related to the man page output | |
1469 | #--------------------------------------------------------------------------- |
|
1469 | #--------------------------------------------------------------------------- | |
1470 |
|
1470 | |||
1471 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will |
|
1471 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will | |
1472 | # generate man pages |
|
1472 | # generate man pages | |
1473 |
|
1473 | |||
1474 | GENERATE_MAN = NO |
|
1474 | GENERATE_MAN = NO | |
1475 |
|
1475 | |||
1476 | # The MAN_OUTPUT tag is used to specify where the man pages will be put. |
|
1476 | # The MAN_OUTPUT tag is used to specify where the man pages will be put. | |
1477 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
|
1477 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be | |
1478 | # put in front of it. If left blank `man' will be used as the default path. |
|
1478 | # put in front of it. If left blank `man' will be used as the default path. | |
1479 |
|
1479 | |||
1480 | MAN_OUTPUT = man |
|
1480 | MAN_OUTPUT = man | |
1481 |
|
1481 | |||
1482 | # The MAN_EXTENSION tag determines the extension that is added to |
|
1482 | # The MAN_EXTENSION tag determines the extension that is added to | |
1483 | # the generated man pages (default is the subroutine's section .3) |
|
1483 | # the generated man pages (default is the subroutine's section .3) | |
1484 |
|
1484 | |||
1485 | MAN_EXTENSION = .3 |
|
1485 | MAN_EXTENSION = .3 | |
1486 |
|
1486 | |||
1487 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output, |
|
1487 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output, | |
1488 | # then it will generate one additional man file for each entity |
|
1488 | # then it will generate one additional man file for each entity | |
1489 | # documented in the real man page(s). These additional files |
|
1489 | # documented in the real man page(s). These additional files | |
1490 | # only source the real man page, but without them the man command |
|
1490 | # only source the real man page, but without them the man command | |
1491 | # would be unable to find the correct page. The default is NO. |
|
1491 | # would be unable to find the correct page. The default is NO. | |
1492 |
|
1492 | |||
1493 | MAN_LINKS = NO |
|
1493 | MAN_LINKS = NO | |
1494 |
|
1494 | |||
1495 | #--------------------------------------------------------------------------- |
|
1495 | #--------------------------------------------------------------------------- | |
1496 | # configuration options related to the XML output |
|
1496 | # configuration options related to the XML output | |
1497 | #--------------------------------------------------------------------------- |
|
1497 | #--------------------------------------------------------------------------- | |
1498 |
|
1498 | |||
1499 | # If the GENERATE_XML tag is set to YES Doxygen will |
|
1499 | # If the GENERATE_XML tag is set to YES Doxygen will | |
1500 | # generate an XML file that captures the structure of |
|
1500 | # generate an XML file that captures the structure of | |
1501 | # the code including all documentation. |
|
1501 | # the code including all documentation. | |
1502 |
|
1502 | |||
1503 | GENERATE_XML = NO |
|
1503 | GENERATE_XML = NO | |
1504 |
|
1504 | |||
1505 | # The XML_OUTPUT tag is used to specify where the XML pages will be put. |
|
1505 | # The XML_OUTPUT tag is used to specify where the XML pages will be put. | |
1506 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
|
1506 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be | |
1507 | # put in front of it. If left blank `xml' will be used as the default path. |
|
1507 | # put in front of it. If left blank `xml' will be used as the default path. | |
1508 |
|
1508 | |||
1509 | XML_OUTPUT = xml |
|
1509 | XML_OUTPUT = xml | |
1510 |
|
1510 | |||
1511 | # The XML_SCHEMA tag can be used to specify an XML schema, |
|
1511 | # The XML_SCHEMA tag can be used to specify an XML schema, | |
1512 | # which can be used by a validating XML parser to check the |
|
1512 | # which can be used by a validating XML parser to check the | |
1513 | # syntax of the XML files. |
|
1513 | # syntax of the XML files. | |
1514 |
|
1514 | |||
1515 | XML_SCHEMA = |
|
1515 | XML_SCHEMA = | |
1516 |
|
1516 | |||
1517 | # The XML_DTD tag can be used to specify an XML DTD, |
|
1517 | # The XML_DTD tag can be used to specify an XML DTD, | |
1518 | # which can be used by a validating XML parser to check the |
|
1518 | # which can be used by a validating XML parser to check the | |
1519 | # syntax of the XML files. |
|
1519 | # syntax of the XML files. | |
1520 |
|
1520 | |||
1521 | XML_DTD = |
|
1521 | XML_DTD = | |
1522 |
|
1522 | |||
1523 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will |
|
1523 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will | |
1524 | # dump the program listings (including syntax highlighting |
|
1524 | # dump the program listings (including syntax highlighting | |
1525 | # and cross-referencing information) to the XML output. Note that |
|
1525 | # and cross-referencing information) to the XML output. Note that | |
1526 | # enabling this will significantly increase the size of the XML output. |
|
1526 | # enabling this will significantly increase the size of the XML output. | |
1527 |
|
1527 | |||
1528 | XML_PROGRAMLISTING = YES |
|
1528 | XML_PROGRAMLISTING = YES | |
1529 |
|
1529 | |||
1530 | #--------------------------------------------------------------------------- |
|
1530 | #--------------------------------------------------------------------------- | |
1531 | # configuration options for the AutoGen Definitions output |
|
1531 | # configuration options for the AutoGen Definitions output | |
1532 | #--------------------------------------------------------------------------- |
|
1532 | #--------------------------------------------------------------------------- | |
1533 |
|
1533 | |||
1534 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will |
|
1534 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will | |
1535 | # generate an AutoGen Definitions (see autogen.sf.net) file |
|
1535 | # generate an AutoGen Definitions (see autogen.sf.net) file | |
1536 | # that captures the structure of the code including all |
|
1536 | # that captures the structure of the code including all | |
1537 | # documentation. Note that this feature is still experimental |
|
1537 | # documentation. Note that this feature is still experimental | |
1538 | # and incomplete at the moment. |
|
1538 | # and incomplete at the moment. | |
1539 |
|
1539 | |||
1540 | GENERATE_AUTOGEN_DEF = NO |
|
1540 | GENERATE_AUTOGEN_DEF = NO | |
1541 |
|
1541 | |||
1542 | #--------------------------------------------------------------------------- |
|
1542 | #--------------------------------------------------------------------------- | |
1543 | # configuration options related to the Perl module output |
|
1543 | # configuration options related to the Perl module output | |
1544 | #--------------------------------------------------------------------------- |
|
1544 | #--------------------------------------------------------------------------- | |
1545 |
|
1545 | |||
1546 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will |
|
1546 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will | |
1547 | # generate a Perl module file that captures the structure of |
|
1547 | # generate a Perl module file that captures the structure of | |
1548 | # the code including all documentation. Note that this |
|
1548 | # the code including all documentation. Note that this | |
1549 | # feature is still experimental and incomplete at the |
|
1549 | # feature is still experimental and incomplete at the | |
1550 | # moment. |
|
1550 | # moment. | |
1551 |
|
1551 | |||
1552 | GENERATE_PERLMOD = NO |
|
1552 | GENERATE_PERLMOD = NO | |
1553 |
|
1553 | |||
1554 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate |
|
1554 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate | |
1555 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able |
|
1555 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able | |
1556 | # to generate PDF and DVI output from the Perl module output. |
|
1556 | # to generate PDF and DVI output from the Perl module output. | |
1557 |
|
1557 | |||
1558 | PERLMOD_LATEX = NO |
|
1558 | PERLMOD_LATEX = NO | |
1559 |
|
1559 | |||
1560 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be |
|
1560 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be | |
1561 | # nicely formatted so it can be parsed by a human reader. This is useful |
|
1561 | # nicely formatted so it can be parsed by a human reader. This is useful | |
1562 | # if you want to understand what is going on. On the other hand, if this |
|
1562 | # if you want to understand what is going on. On the other hand, if this | |
1563 | # tag is set to NO the size of the Perl module output will be much smaller |
|
1563 | # tag is set to NO the size of the Perl module output will be much smaller | |
1564 | # and Perl will parse it just the same. |
|
1564 | # and Perl will parse it just the same. | |
1565 |
|
1565 | |||
1566 | PERLMOD_PRETTY = YES |
|
1566 | PERLMOD_PRETTY = YES | |
1567 |
|
1567 | |||
1568 | # The names of the make variables in the generated doxyrules.make file |
|
1568 | # The names of the make variables in the generated doxyrules.make file | |
1569 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. |
|
1569 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. | |
1570 | # This is useful so different doxyrules.make files included by the same |
|
1570 | # This is useful so different doxyrules.make files included by the same | |
1571 | # Makefile don't overwrite each other's variables. |
|
1571 | # Makefile don't overwrite each other's variables. | |
1572 |
|
1572 | |||
1573 | PERLMOD_MAKEVAR_PREFIX = |
|
1573 | PERLMOD_MAKEVAR_PREFIX = | |
1574 |
|
1574 | |||
1575 | #--------------------------------------------------------------------------- |
|
1575 | #--------------------------------------------------------------------------- | |
1576 | # Configuration options related to the preprocessor |
|
1576 | # Configuration options related to the preprocessor | |
1577 | #--------------------------------------------------------------------------- |
|
1577 | #--------------------------------------------------------------------------- | |
1578 |
|
1578 | |||
1579 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will |
|
1579 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will | |
1580 | # evaluate all C-preprocessor directives found in the sources and include |
|
1580 | # evaluate all C-preprocessor directives found in the sources and include | |
1581 | # files. |
|
1581 | # files. | |
1582 |
|
1582 | |||
1583 | ENABLE_PREPROCESSING = YES |
|
1583 | ENABLE_PREPROCESSING = YES | |
1584 |
|
1584 | |||
1585 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro |
|
1585 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro | |
1586 | # names in the source code. If set to NO (the default) only conditional |
|
1586 | # names in the source code. If set to NO (the default) only conditional | |
1587 | # compilation will be performed. Macro expansion can be done in a controlled |
|
1587 | # compilation will be performed. Macro expansion can be done in a controlled | |
1588 | # way by setting EXPAND_ONLY_PREDEF to YES. |
|
1588 | # way by setting EXPAND_ONLY_PREDEF to YES. | |
1589 |
|
1589 | |||
1590 | MACRO_EXPANSION = NO |
|
1590 | MACRO_EXPANSION = NO | |
1591 |
|
1591 | |||
1592 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES |
|
1592 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES | |
1593 | # then the macro expansion is limited to the macros specified with the |
|
1593 | # then the macro expansion is limited to the macros specified with the | |
1594 | # PREDEFINED and EXPAND_AS_DEFINED tags. |
|
1594 | # PREDEFINED and EXPAND_AS_DEFINED tags. | |
1595 |
|
1595 | |||
1596 | EXPAND_ONLY_PREDEF = NO |
|
1596 | EXPAND_ONLY_PREDEF = NO | |
1597 |
|
1597 | |||
1598 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files |
|
1598 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files | |
1599 | # pointed to by INCLUDE_PATH will be searched when a #include is found. |
|
1599 | # pointed to by INCLUDE_PATH will be searched when a #include is found. | |
1600 |
|
1600 | |||
1601 | SEARCH_INCLUDES = YES |
|
1601 | SEARCH_INCLUDES = YES | |
1602 |
|
1602 | |||
1603 | # The INCLUDE_PATH tag can be used to specify one or more directories that |
|
1603 | # The INCLUDE_PATH tag can be used to specify one or more directories that | |
1604 | # contain include files that are not input files but should be processed by |
|
1604 | # contain include files that are not input files but should be processed by | |
1605 | # the preprocessor. |
|
1605 | # the preprocessor. | |
1606 |
|
1606 | |||
1607 | INCLUDE_PATH = |
|
1607 | INCLUDE_PATH = | |
1608 |
|
1608 | |||
1609 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard |
|
1609 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard | |
1610 | # patterns (like *.h and *.hpp) to filter out the header-files in the |
|
1610 | # patterns (like *.h and *.hpp) to filter out the header-files in the | |
1611 | # directories. If left blank, the patterns specified with FILE_PATTERNS will |
|
1611 | # directories. If left blank, the patterns specified with FILE_PATTERNS will | |
1612 | # be used. |
|
1612 | # be used. | |
1613 |
|
1613 | |||
1614 | INCLUDE_FILE_PATTERNS = |
|
1614 | INCLUDE_FILE_PATTERNS = | |
1615 |
|
1615 | |||
1616 | # The PREDEFINED tag can be used to specify one or more macro names that |
|
1616 | # The PREDEFINED tag can be used to specify one or more macro names that | |
1617 | # are defined before the preprocessor is started (similar to the -D option of |
|
1617 | # are defined before the preprocessor is started (similar to the -D option of | |
1618 | # gcc). The argument of the tag is a list of macros of the form: name |
|
1618 | # gcc). The argument of the tag is a list of macros of the form: name | |
1619 | # or name=definition (no spaces). If the definition and the = are |
|
1619 | # or name=definition (no spaces). If the definition and the = are | |
1620 | # omitted =1 is assumed. To prevent a macro definition from being |
|
1620 | # omitted =1 is assumed. To prevent a macro definition from being | |
1621 | # undefined via #undef or recursively expanded use the := operator |
|
1621 | # undefined via #undef or recursively expanded use the := operator | |
1622 | # instead of the = operator. |
|
1622 | # instead of the = operator. | |
1623 |
|
1623 | |||
1624 | PREDEFINED = |
|
1624 | PREDEFINED = | |
1625 |
|
1625 | |||
1626 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then |
|
1626 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then | |
1627 | # this tag can be used to specify a list of macro names that should be expanded. |
|
1627 | # this tag can be used to specify a list of macro names that should be expanded. | |
1628 | # The macro definition that is found in the sources will be used. |
|
1628 | # The macro definition that is found in the sources will be used. | |
1629 | # Use the PREDEFINED tag if you want to use a different macro definition that |
|
1629 | # Use the PREDEFINED tag if you want to use a different macro definition that | |
1630 | # overrules the definition found in the source code. |
|
1630 | # overrules the definition found in the source code. | |
1631 |
|
1631 | |||
1632 | EXPAND_AS_DEFINED = |
|
1632 | EXPAND_AS_DEFINED = | |
1633 |
|
1633 | |||
1634 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then |
|
1634 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then | |
1635 | # doxygen's preprocessor will remove all references to function-like macros |
|
1635 | # doxygen's preprocessor will remove all references to function-like macros | |
1636 | # that are alone on a line, have an all uppercase name, and do not end with a |
|
1636 | # that are alone on a line, have an all uppercase name, and do not end with a | |
1637 | # semicolon, because these will confuse the parser if not removed. |
|
1637 | # semicolon, because these will confuse the parser if not removed. | |
1638 |
|
1638 | |||
1639 | SKIP_FUNCTION_MACROS = YES |
|
1639 | SKIP_FUNCTION_MACROS = YES | |
1640 |
|
1640 | |||
1641 | #--------------------------------------------------------------------------- |
|
1641 | #--------------------------------------------------------------------------- | |
1642 | # Configuration::additions related to external references |
|
1642 | # Configuration::additions related to external references | |
1643 | #--------------------------------------------------------------------------- |
|
1643 | #--------------------------------------------------------------------------- | |
1644 |
|
1644 | |||
1645 | # The TAGFILES option can be used to specify one or more tagfiles. For each |
|
1645 | # The TAGFILES option can be used to specify one or more tagfiles. For each | |
1646 | # tag file the location of the external documentation should be added. The |
|
1646 | # tag file the location of the external documentation should be added. The | |
1647 | # format of a tag file without this location is as follows: |
|
1647 | # format of a tag file without this location is as follows: | |
1648 | # TAGFILES = file1 file2 ... |
|
1648 | # TAGFILES = file1 file2 ... | |
1649 | # Adding location for the tag files is done as follows: |
|
1649 | # Adding location for the tag files is done as follows: | |
1650 | # TAGFILES = file1=loc1 "file2 = loc2" ... |
|
1650 | # TAGFILES = file1=loc1 "file2 = loc2" ... | |
1651 | # where "loc1" and "loc2" can be relative or absolute paths |
|
1651 | # where "loc1" and "loc2" can be relative or absolute paths | |
1652 | # or URLs. Note that each tag file must have a unique name (where the name does |
|
1652 | # or URLs. Note that each tag file must have a unique name (where the name does | |
1653 | # NOT include the path). If a tag file is not located in the directory in which |
|
1653 | # NOT include the path). If a tag file is not located in the directory in which | |
1654 | # doxygen is run, you must also specify the path to the tagfile here. |
|
1654 | # doxygen is run, you must also specify the path to the tagfile here. | |
1655 |
|
1655 | |||
1656 | TAGFILES = |
|
1656 | TAGFILES = | |
1657 |
|
1657 | |||
1658 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create |
|
1658 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create | |
1659 | # a tag file that is based on the input files it reads. |
|
1659 | # a tag file that is based on the input files it reads. | |
1660 |
|
1660 | |||
1661 | GENERATE_TAGFILE = |
|
1661 | GENERATE_TAGFILE = | |
1662 |
|
1662 | |||
1663 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed |
|
1663 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed | |
1664 | # in the class index. If set to NO only the inherited external classes |
|
1664 | # in the class index. If set to NO only the inherited external classes | |
1665 | # will be listed. |
|
1665 | # will be listed. | |
1666 |
|
1666 | |||
1667 | ALLEXTERNALS = NO |
|
1667 | ALLEXTERNALS = NO | |
1668 |
|
1668 | |||
1669 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed |
|
1669 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed | |
1670 | # in the modules index. If set to NO, only the current project's groups will |
|
1670 | # in the modules index. If set to NO, only the current project's groups will | |
1671 | # be listed. |
|
1671 | # be listed. | |
1672 |
|
1672 | |||
1673 | EXTERNAL_GROUPS = YES |
|
1673 | EXTERNAL_GROUPS = YES | |
1674 |
|
1674 | |||
1675 | # The PERL_PATH should be the absolute path and name of the perl script |
|
1675 | # The PERL_PATH should be the absolute path and name of the perl script | |
1676 | # interpreter (i.e. the result of `which perl'). |
|
1676 | # interpreter (i.e. the result of `which perl'). | |
1677 |
|
1677 | |||
1678 | PERL_PATH = /usr/bin/perl |
|
1678 | PERL_PATH = /usr/bin/perl | |
1679 |
|
1679 | |||
1680 | #--------------------------------------------------------------------------- |
|
1680 | #--------------------------------------------------------------------------- | |
1681 | # Configuration options related to the dot tool |
|
1681 | # Configuration options related to the dot tool | |
1682 | #--------------------------------------------------------------------------- |
|
1682 | #--------------------------------------------------------------------------- | |
1683 |
|
1683 | |||
1684 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will |
|
1684 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will | |
1685 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base |
|
1685 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base | |
1686 | # or super classes. Setting the tag to NO turns the diagrams off. Note that |
|
1686 | # or super classes. Setting the tag to NO turns the diagrams off. Note that | |
1687 | # this option also works with HAVE_DOT disabled, but it is recommended to |
|
1687 | # this option also works with HAVE_DOT disabled, but it is recommended to | |
1688 | # install and use dot, since it yields more powerful graphs. |
|
1688 | # install and use dot, since it yields more powerful graphs. | |
1689 |
|
1689 | |||
1690 | CLASS_DIAGRAMS = NO |
|
1690 | CLASS_DIAGRAMS = NO | |
1691 |
|
1691 | |||
1692 | # You can define message sequence charts within doxygen comments using the \msc |
|
1692 | # You can define message sequence charts within doxygen comments using the \msc | |
1693 | # command. Doxygen will then run the mscgen tool (see |
|
1693 | # command. Doxygen will then run the mscgen tool (see | |
1694 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the |
|
1694 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the | |
1695 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where |
|
1695 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where | |
1696 | # the mscgen tool resides. If left empty the tool is assumed to be found in the |
|
1696 | # the mscgen tool resides. If left empty the tool is assumed to be found in the | |
1697 | # default search path. |
|
1697 | # default search path. | |
1698 |
|
1698 | |||
1699 | MSCGEN_PATH = |
|
1699 | MSCGEN_PATH = | |
1700 |
|
1700 | |||
1701 | # If set to YES, the inheritance and collaboration graphs will hide |
|
1701 | # If set to YES, the inheritance and collaboration graphs will hide | |
1702 | # inheritance and usage relations if the target is undocumented |
|
1702 | # inheritance and usage relations if the target is undocumented | |
1703 | # or is not a class. |
|
1703 | # or is not a class. | |
1704 |
|
1704 | |||
1705 | HIDE_UNDOC_RELATIONS = YES |
|
1705 | HIDE_UNDOC_RELATIONS = YES | |
1706 |
|
1706 | |||
1707 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is |
|
1707 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is | |
1708 | # available from the path. This tool is part of Graphviz, a graph visualization |
|
1708 | # available from the path. This tool is part of Graphviz, a graph visualization | |
1709 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section |
|
1709 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section | |
1710 | # have no effect if this option is set to NO (the default) |
|
1710 | # have no effect if this option is set to NO (the default) | |
1711 |
|
1711 | |||
1712 | HAVE_DOT = YES |
|
1712 | HAVE_DOT = YES | |
1713 |
|
1713 | |||
1714 | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is |
|
1714 | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is | |
1715 | # allowed to run in parallel. When set to 0 (the default) doxygen will |
|
1715 | # allowed to run in parallel. When set to 0 (the default) doxygen will | |
1716 | # base this on the number of processors available in the system. You can set it |
|
1716 | # base this on the number of processors available in the system. You can set it | |
1717 | # explicitly to a value larger than 0 to get control over the balance |
|
1717 | # explicitly to a value larger than 0 to get control over the balance | |
1718 | # between CPU load and processing speed. |
|
1718 | # between CPU load and processing speed. | |
1719 |
|
1719 | |||
1720 | DOT_NUM_THREADS = 4 |
|
1720 | DOT_NUM_THREADS = 4 | |
1721 |
|
1721 | |||
1722 | # By default doxygen will use the Helvetica font for all dot files that |
|
1722 | # By default doxygen will use the Helvetica font for all dot files that | |
1723 | # doxygen generates. When you want a differently looking font you can specify |
|
1723 | # doxygen generates. When you want a differently looking font you can specify | |
1724 | # the font name using DOT_FONTNAME. You need to make sure dot is able to find |
|
1724 | # the font name using DOT_FONTNAME. You need to make sure dot is able to find | |
1725 | # the font, which can be done by putting it in a standard location or by setting |
|
1725 | # the font, which can be done by putting it in a standard location or by setting | |
1726 | # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the |
|
1726 | # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the | |
1727 | # directory containing the font. |
|
1727 | # directory containing the font. | |
1728 |
|
1728 | |||
1729 | DOT_FONTNAME = Helvetica |
|
1729 | DOT_FONTNAME = Helvetica | |
1730 |
|
1730 | |||
1731 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. |
|
1731 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. | |
1732 | # The default size is 10pt. |
|
1732 | # The default size is 10pt. | |
1733 |
|
1733 | |||
1734 | DOT_FONTSIZE = 10 |
|
1734 | DOT_FONTSIZE = 10 | |
1735 |
|
1735 | |||
1736 | # By default doxygen will tell dot to use the Helvetica font. |
|
1736 | # By default doxygen will tell dot to use the Helvetica font. | |
1737 | # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to |
|
1737 | # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to | |
1738 | # set the path where dot can find it. |
|
1738 | # set the path where dot can find it. | |
1739 |
|
1739 | |||
1740 | DOT_FONTPATH = |
|
1740 | DOT_FONTPATH = | |
1741 |
|
1741 | |||
1742 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen |
|
1742 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen | |
1743 | # will generate a graph for each documented class showing the direct and |
|
1743 | # will generate a graph for each documented class showing the direct and | |
1744 | # indirect inheritance relations. Setting this tag to YES will force the |
|
1744 | # indirect inheritance relations. Setting this tag to YES will force the | |
1745 | # CLASS_DIAGRAMS tag to NO. |
|
1745 | # CLASS_DIAGRAMS tag to NO. | |
1746 |
|
1746 | |||
1747 | CLASS_GRAPH = NO |
|
1747 | CLASS_GRAPH = NO | |
1748 |
|
1748 | |||
1749 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen |
|
1749 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen | |
1750 | # will generate a graph for each documented class showing the direct and |
|
1750 | # will generate a graph for each documented class showing the direct and | |
1751 | # indirect implementation dependencies (inheritance, containment, and |
|
1751 | # indirect implementation dependencies (inheritance, containment, and | |
1752 | # class references variables) of the class with other documented classes. |
|
1752 | # class references variables) of the class with other documented classes. | |
1753 |
|
1753 | |||
1754 | COLLABORATION_GRAPH = YES |
|
1754 | COLLABORATION_GRAPH = YES | |
1755 |
|
1755 | |||
1756 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen |
|
1756 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen | |
1757 | # will generate a graph for groups, showing the direct groups dependencies |
|
1757 | # will generate a graph for groups, showing the direct groups dependencies | |
1758 |
|
1758 | |||
1759 | GROUP_GRAPHS = YES |
|
1759 | GROUP_GRAPHS = YES | |
1760 |
|
1760 | |||
1761 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and |
|
1761 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and | |
1762 | # collaboration diagrams in a style similar to the OMG's Unified Modeling |
|
1762 | # collaboration diagrams in a style similar to the OMG's Unified Modeling | |
1763 | # Language. |
|
1763 | # Language. | |
1764 |
|
1764 | |||
1765 | UML_LOOK = NO |
|
1765 | UML_LOOK = NO | |
1766 |
|
1766 | |||
1767 | # If the UML_LOOK tag is enabled, the fields and methods are shown inside |
|
1767 | # If the UML_LOOK tag is enabled, the fields and methods are shown inside | |
1768 | # the class node. If there are many fields or methods and many nodes the |
|
1768 | # the class node. If there are many fields or methods and many nodes the | |
1769 | # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS |
|
1769 | # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS | |
1770 | # threshold limits the number of items for each type to make the size more |
|
1770 | # threshold limits the number of items for each type to make the size more | |
1771 | # managable. Set this to 0 for no limit. Note that the threshold may be |
|
1771 | # managable. Set this to 0 for no limit. Note that the threshold may be | |
1772 | # exceeded by 50% before the limit is enforced. |
|
1772 | # exceeded by 50% before the limit is enforced. | |
1773 |
|
1773 | |||
1774 | UML_LIMIT_NUM_FIELDS = 10 |
|
1774 | UML_LIMIT_NUM_FIELDS = 10 | |
1775 |
|
1775 | |||
1776 | # If set to YES, the inheritance and collaboration graphs will show the |
|
1776 | # If set to YES, the inheritance and collaboration graphs will show the | |
1777 | # relations between templates and their instances. |
|
1777 | # relations between templates and their instances. | |
1778 |
|
1778 | |||
1779 | TEMPLATE_RELATIONS = NO |
|
1779 | TEMPLATE_RELATIONS = NO | |
1780 |
|
1780 | |||
1781 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT |
|
1781 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT | |
1782 | # tags are set to YES then doxygen will generate a graph for each documented |
|
1782 | # tags are set to YES then doxygen will generate a graph for each documented | |
1783 | # file showing the direct and indirect include dependencies of the file with |
|
1783 | # file showing the direct and indirect include dependencies of the file with | |
1784 | # other documented files. |
|
1784 | # other documented files. | |
1785 |
|
1785 | |||
1786 | INCLUDE_GRAPH = YES |
|
1786 | INCLUDE_GRAPH = YES | |
1787 |
|
1787 | |||
1788 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and |
|
1788 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and | |
1789 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each |
|
1789 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each | |
1790 | # documented header file showing the documented files that directly or |
|
1790 | # documented header file showing the documented files that directly or | |
1791 | # indirectly include this file. |
|
1791 | # indirectly include this file. | |
1792 |
|
1792 | |||
1793 | INCLUDED_BY_GRAPH = YES |
|
1793 | INCLUDED_BY_GRAPH = YES | |
1794 |
|
1794 | |||
1795 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then |
|
1795 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then | |
1796 | # doxygen will generate a call dependency graph for every global function |
|
1796 | # doxygen will generate a call dependency graph for every global function | |
1797 | # or class method. Note that enabling this option will significantly increase |
|
1797 | # or class method. Note that enabling this option will significantly increase | |
1798 | # the time of a run. So in most cases it will be better to enable call graphs |
|
1798 | # the time of a run. So in most cases it will be better to enable call graphs | |
1799 | # for selected functions only using the \callgraph command. |
|
1799 | # for selected functions only using the \callgraph command. | |
1800 |
|
1800 | |||
1801 | CALL_GRAPH = YES |
|
1801 | CALL_GRAPH = YES | |
1802 |
|
1802 | |||
1803 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then |
|
1803 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then | |
1804 | # doxygen will generate a caller dependency graph for every global function |
|
1804 | # doxygen will generate a caller dependency graph for every global function | |
1805 | # or class method. Note that enabling this option will significantly increase |
|
1805 | # or class method. Note that enabling this option will significantly increase | |
1806 | # the time of a run. So in most cases it will be better to enable caller |
|
1806 | # the time of a run. So in most cases it will be better to enable caller | |
1807 | # graphs for selected functions only using the \callergraph command. |
|
1807 | # graphs for selected functions only using the \callergraph command. | |
1808 |
|
1808 | |||
1809 |
CALLER_GRAPH = |
|
1809 | CALLER_GRAPH = YES | |
1810 |
|
1810 | |||
1811 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen |
|
1811 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen | |
1812 | # will generate a graphical hierarchy of all classes instead of a textual one. |
|
1812 | # will generate a graphical hierarchy of all classes instead of a textual one. | |
1813 |
|
1813 | |||
1814 | GRAPHICAL_HIERARCHY = YES |
|
1814 | GRAPHICAL_HIERARCHY = YES | |
1815 |
|
1815 | |||
1816 | # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES |
|
1816 | # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES | |
1817 | # then doxygen will show the dependencies a directory has on other directories |
|
1817 | # then doxygen will show the dependencies a directory has on other directories | |
1818 | # in a graphical way. The dependency relations are determined by the #include |
|
1818 | # in a graphical way. The dependency relations are determined by the #include | |
1819 | # relations between the files in the directories. |
|
1819 | # relations between the files in the directories. | |
1820 |
|
1820 | |||
1821 | DIRECTORY_GRAPH = YES |
|
1821 | DIRECTORY_GRAPH = YES | |
1822 |
|
1822 | |||
1823 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images |
|
1823 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images | |
1824 | # generated by dot. Possible values are svg, png, jpg, or gif. |
|
1824 | # generated by dot. Possible values are svg, png, jpg, or gif. | |
1825 | # If left blank png will be used. If you choose svg you need to set |
|
1825 | # If left blank png will be used. If you choose svg you need to set | |
1826 | # HTML_FILE_EXTENSION to xhtml in order to make the SVG files |
|
1826 | # HTML_FILE_EXTENSION to xhtml in order to make the SVG files | |
1827 | # visible in IE 9+ (other browsers do not have this requirement). |
|
1827 | # visible in IE 9+ (other browsers do not have this requirement). | |
1828 |
|
1828 | |||
1829 | DOT_IMAGE_FORMAT = png |
|
1829 | DOT_IMAGE_FORMAT = png | |
1830 |
|
1830 | |||
1831 | # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to |
|
1831 | # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to | |
1832 | # enable generation of interactive SVG images that allow zooming and panning. |
|
1832 | # enable generation of interactive SVG images that allow zooming and panning. | |
1833 | # Note that this requires a modern browser other than Internet Explorer. |
|
1833 | # Note that this requires a modern browser other than Internet Explorer. | |
1834 | # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you |
|
1834 | # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you | |
1835 | # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files |
|
1835 | # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files | |
1836 | # visible. Older versions of IE do not have SVG support. |
|
1836 | # visible. Older versions of IE do not have SVG support. | |
1837 |
|
1837 | |||
1838 | INTERACTIVE_SVG = YES |
|
1838 | INTERACTIVE_SVG = YES | |
1839 |
|
1839 | |||
1840 | # The tag DOT_PATH can be used to specify the path where the dot tool can be |
|
1840 | # The tag DOT_PATH can be used to specify the path where the dot tool can be | |
1841 | # found. If left blank, it is assumed the dot tool can be found in the path. |
|
1841 | # found. If left blank, it is assumed the dot tool can be found in the path. | |
1842 |
|
1842 | |||
1843 | DOT_PATH = |
|
1843 | DOT_PATH = | |
1844 |
|
1844 | |||
1845 | # The DOTFILE_DIRS tag can be used to specify one or more directories that |
|
1845 | # The DOTFILE_DIRS tag can be used to specify one or more directories that | |
1846 | # contain dot files that are included in the documentation (see the |
|
1846 | # contain dot files that are included in the documentation (see the | |
1847 | # \dotfile command). |
|
1847 | # \dotfile command). | |
1848 |
|
1848 | |||
1849 | DOTFILE_DIRS = |
|
1849 | DOTFILE_DIRS = | |
1850 |
|
1850 | |||
1851 | # The MSCFILE_DIRS tag can be used to specify one or more directories that |
|
1851 | # The MSCFILE_DIRS tag can be used to specify one or more directories that | |
1852 | # contain msc files that are included in the documentation (see the |
|
1852 | # contain msc files that are included in the documentation (see the | |
1853 | # \mscfile command). |
|
1853 | # \mscfile command). | |
1854 |
|
1854 | |||
1855 | MSCFILE_DIRS = |
|
1855 | MSCFILE_DIRS = | |
1856 |
|
1856 | |||
1857 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of |
|
1857 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of | |
1858 | # nodes that will be shown in the graph. If the number of nodes in a graph |
|
1858 | # nodes that will be shown in the graph. If the number of nodes in a graph | |
1859 | # becomes larger than this value, doxygen will truncate the graph, which is |
|
1859 | # becomes larger than this value, doxygen will truncate the graph, which is | |
1860 | # visualized by representing a node as a red box. Note that doxygen if the |
|
1860 | # visualized by representing a node as a red box. Note that doxygen if the | |
1861 | # number of direct children of the root node in a graph is already larger than |
|
1861 | # number of direct children of the root node in a graph is already larger than | |
1862 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note |
|
1862 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note | |
1863 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. |
|
1863 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. | |
1864 |
|
1864 | |||
1865 | DOT_GRAPH_MAX_NODES = 50 |
|
1865 | DOT_GRAPH_MAX_NODES = 50 | |
1866 |
|
1866 | |||
1867 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the |
|
1867 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the | |
1868 | # graphs generated by dot. A depth value of 3 means that only nodes reachable |
|
1868 | # graphs generated by dot. A depth value of 3 means that only nodes reachable | |
1869 | # from the root by following a path via at most 3 edges will be shown. Nodes |
|
1869 | # from the root by following a path via at most 3 edges will be shown. Nodes | |
1870 | # that lay further from the root node will be omitted. Note that setting this |
|
1870 | # that lay further from the root node will be omitted. Note that setting this | |
1871 | # option to 1 or 2 may greatly reduce the computation time needed for large |
|
1871 | # option to 1 or 2 may greatly reduce the computation time needed for large | |
1872 | # code bases. Also note that the size of a graph can be further restricted by |
|
1872 | # code bases. Also note that the size of a graph can be further restricted by | |
1873 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. |
|
1873 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. | |
1874 |
|
1874 | |||
1875 | MAX_DOT_GRAPH_DEPTH = 0 |
|
1875 | MAX_DOT_GRAPH_DEPTH = 0 | |
1876 |
|
1876 | |||
1877 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent |
|
1877 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent | |
1878 | # background. This is disabled by default, because dot on Windows does not |
|
1878 | # background. This is disabled by default, because dot on Windows does not | |
1879 | # seem to support this out of the box. Warning: Depending on the platform used, |
|
1879 | # seem to support this out of the box. Warning: Depending on the platform used, | |
1880 | # enabling this option may lead to badly anti-aliased labels on the edges of |
|
1880 | # enabling this option may lead to badly anti-aliased labels on the edges of | |
1881 | # a graph (i.e. they become hard to read). |
|
1881 | # a graph (i.e. they become hard to read). | |
1882 |
|
1882 | |||
1883 | DOT_TRANSPARENT = NO |
|
1883 | DOT_TRANSPARENT = NO | |
1884 |
|
1884 | |||
1885 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output |
|
1885 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output | |
1886 | # files in one run (i.e. multiple -o and -T options on the command line). This |
|
1886 | # files in one run (i.e. multiple -o and -T options on the command line). This | |
1887 | # makes dot run faster, but since only newer versions of dot (>1.8.10) |
|
1887 | # makes dot run faster, but since only newer versions of dot (>1.8.10) | |
1888 | # support this, this feature is disabled by default. |
|
1888 | # support this, this feature is disabled by default. | |
1889 |
|
1889 | |||
1890 | DOT_MULTI_TARGETS = NO |
|
1890 | DOT_MULTI_TARGETS = NO | |
1891 |
|
1891 | |||
1892 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will |
|
1892 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will | |
1893 | # generate a legend page explaining the meaning of the various boxes and |
|
1893 | # generate a legend page explaining the meaning of the various boxes and | |
1894 | # arrows in the dot generated graphs. |
|
1894 | # arrows in the dot generated graphs. | |
1895 |
|
1895 | |||
1896 | GENERATE_LEGEND = YES |
|
1896 | GENERATE_LEGEND = YES | |
1897 |
|
1897 | |||
1898 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will |
|
1898 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will | |
1899 | # remove the intermediate dot files that are used to generate |
|
1899 | # remove the intermediate dot files that are used to generate | |
1900 | # the various graphs. |
|
1900 | # the various graphs. | |
1901 |
|
1901 | |||
1902 | DOT_CLEANUP = YES |
|
1902 | DOT_CLEANUP = YES |
@@ -1,627 +1,627 | |||||
1 | #ifndef CCSDS_H_INCLUDED |
|
1 | #ifndef CCSDS_TYPES_H_INCLUDED | |
2 | #define CCSDS_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_TELEMETRY_HEADER_LENGTH 16+4 |
|
5 | #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4 | |
6 | #define CCSDS_TM_PKT_MAX_SIZE 4412 |
|
6 | #define CCSDS_TM_PKT_MAX_SIZE 4412 | |
7 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 |
|
7 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 | |
8 | #define CCSDS_TC_PKT_MAX_SIZE 256 |
|
8 | #define CCSDS_TC_PKT_MAX_SIZE 256 | |
9 | #define CCSDS_TC_PKT_MIN_SIZE 16 |
|
9 | #define CCSDS_TC_PKT_MIN_SIZE 16 | |
10 | #define CCSDS_TC_TM_PACKET_OFFSET 7 |
|
10 | #define CCSDS_TC_TM_PACKET_OFFSET 7 | |
11 | #define CCSDS_PROCESS_ID 76 |
|
11 | #define CCSDS_PROCESS_ID 76 | |
12 | #define CCSDS_PACKET_CATEGORY 12 |
|
12 | #define CCSDS_PACKET_CATEGORY 12 | |
13 | #define CCSDS_NODE_ADDRESS 0xfe |
|
13 | #define CCSDS_NODE_ADDRESS 0xfe | |
14 | #define CCSDS_USER_APP 0x00 |
|
14 | #define CCSDS_USER_APP 0x00 | |
15 |
|
15 | |||
16 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 |
|
16 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 | |
17 | #define DEFAULT_RESERVED 0x00 |
|
17 | #define DEFAULT_RESERVED 0x00 | |
18 | #define DEFAULT_HKBIA 0x1e // 0001 1110 |
|
18 | #define DEFAULT_HKBIA 0x1e // 0001 1110 | |
19 |
|
19 | |||
20 | // PACKET ID |
|
20 | // PACKET ID | |
21 | #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1 |
|
21 | #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1 | |
22 | #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4 |
|
22 | #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4 | |
23 | #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9 |
|
23 | #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9 | |
24 | #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 |
|
24 | #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 | |
25 | #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 |
|
25 | #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 | |
26 | #define TM_PACKET_PID_DEFAULT 76 |
|
26 | #define TM_PACKET_PID_DEFAULT 76 | |
27 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 |
|
27 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 | |
28 | #define TM_PACKET_CAT_TC_EXE 1 |
|
28 | #define TM_PACKET_CAT_TC_EXE 1 | |
29 | #define TM_PACKET_CAT_HK 4 |
|
29 | #define TM_PACKET_CAT_HK 4 | |
30 | #define TM_PACKET_CAT_PARAMETER_DUMP 9 |
|
30 | #define TM_PACKET_CAT_PARAMETER_DUMP 9 | |
31 | #define TM_PACKET_CAT_SCIENCE 12 |
|
31 | #define TM_PACKET_CAT_SCIENCE 12 | |
32 |
|
32 | |||
33 | // PACKET SEQUENCE CONTROL |
|
33 | // PACKET SEQUENCE CONTROL | |
34 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] |
|
34 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] | |
35 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] |
|
35 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] | |
36 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] |
|
36 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] | |
37 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] |
|
37 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] | |
38 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] |
|
38 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] | |
39 |
|
39 | |||
40 | // DESTINATION ID |
|
40 | // DESTINATION ID | |
41 | #define TM_DESTINATION_ID_GROUND 0 |
|
41 | #define TM_DESTINATION_ID_GROUND 0 | |
42 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 |
|
42 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 | |
43 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 |
|
43 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 | |
44 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 |
|
44 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 | |
45 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 |
|
45 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 | |
46 | #define TM_DESTINATION_ID_DIRECT_CMD 120 |
|
46 | #define TM_DESTINATION_ID_DIRECT_CMD 120 | |
47 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 |
|
47 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 | |
48 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 |
|
48 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 | |
49 | #define TM_DESTINATION_ID_OBCP 15 |
|
49 | #define TM_DESTINATION_ID_OBCP 15 | |
50 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 |
|
50 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 | |
51 | #define TM_DESTINATION_ID_AOCS 11 |
|
51 | #define TM_DESTINATION_ID_AOCS 11 | |
52 |
|
52 | |||
53 | #define CCSDS_DESTINATION_ID 0x01 |
|
53 | #define CCSDS_DESTINATION_ID 0x01 | |
54 | #define CCSDS_PROTOCOLE_ID 0x02 |
|
54 | #define CCSDS_PROTOCOLE_ID 0x02 | |
55 | #define CCSDS_RESERVED 0x00 |
|
55 | #define CCSDS_RESERVED 0x00 | |
56 | #define CCSDS_USER_APP 0x00 |
|
56 | #define CCSDS_USER_APP 0x00 | |
57 |
|
57 | |||
58 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 |
|
58 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 | |
59 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 |
|
59 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 | |
60 | #define SIZE_HK_PARAMETERS 112 |
|
60 | #define SIZE_HK_PARAMETERS 112 | |
61 |
|
61 | |||
62 | // TC TYPES |
|
62 | // TC TYPES | |
63 | #define TC_TYPE_GEN 181 |
|
63 | #define TC_TYPE_GEN 181 | |
64 | #define TC_TYPE_TIME 9 |
|
64 | #define TC_TYPE_TIME 9 | |
65 |
|
65 | |||
66 | // TC SUBTYPES |
|
66 | // TC SUBTYPES | |
67 | #define TC_SUBTYPE_RESET 1 |
|
67 | #define TC_SUBTYPE_RESET 1 | |
68 | #define TC_SUBTYPE_LOAD_COMM 11 |
|
68 | #define TC_SUBTYPE_LOAD_COMM 11 | |
69 | #define TC_SUBTYPE_LOAD_NORM 13 |
|
69 | #define TC_SUBTYPE_LOAD_NORM 13 | |
70 | #define TC_SUBTYPE_LOAD_BURST 19 |
|
70 | #define TC_SUBTYPE_LOAD_BURST 19 | |
71 | #define TC_SUBTYPE_LOAD_SBM1 25 |
|
71 | #define TC_SUBTYPE_LOAD_SBM1 25 | |
72 | #define TC_SUBTYPE_LOAD_SBM2 27 |
|
72 | #define TC_SUBTYPE_LOAD_SBM2 27 | |
73 | #define TC_SUBTYPE_DUMP 31 |
|
73 | #define TC_SUBTYPE_DUMP 31 | |
74 | #define TC_SUBTYPE_ENTER 41 |
|
74 | #define TC_SUBTYPE_ENTER 41 | |
75 | #define TC_SUBTYPE_UPDT_INFO 51 |
|
75 | #define TC_SUBTYPE_UPDT_INFO 51 | |
76 | #define TC_SUBTYPE_EN_CAL 61 |
|
76 | #define TC_SUBTYPE_EN_CAL 61 | |
77 | #define TC_SUBTYPE_DIS_CAL 63 |
|
77 | #define TC_SUBTYPE_DIS_CAL 63 | |
78 | #define TC_SUBTYPE_UPDT_TIME 129 |
|
78 | #define TC_SUBTYPE_UPDT_TIME 129 | |
79 |
|
79 | |||
80 | // TC LEN |
|
80 | // TC LEN | |
81 | #define TC_LEN_RESET 12 |
|
81 | #define TC_LEN_RESET 12 | |
82 | #define TC_LEN_LOAD_COMM 14 |
|
82 | #define TC_LEN_LOAD_COMM 14 | |
83 | #define TC_LEN_LOAD_NORM 20 |
|
83 | #define TC_LEN_LOAD_NORM 20 | |
84 | #define TC_LEN_LOAD_BURST 14 |
|
84 | #define TC_LEN_LOAD_BURST 14 | |
85 | #define TC_LEN_LOAD_SBM1 14 |
|
85 | #define TC_LEN_LOAD_SBM1 14 | |
86 | #define TC_LEN_LOAD_SBM2 14 |
|
86 | #define TC_LEN_LOAD_SBM2 14 | |
87 | #define TC_LEN_DUMP 12 |
|
87 | #define TC_LEN_DUMP 12 | |
88 | #define TC_LEN_ENTER 20 |
|
88 | #define TC_LEN_ENTER 20 | |
89 | #define TC_LEN_UPDT_INFO 48 |
|
89 | #define TC_LEN_UPDT_INFO 48 | |
90 | #define TC_LEN_EN_CAL 12 |
|
90 | #define TC_LEN_EN_CAL 12 | |
91 | #define TC_LEN_DIS_CAL 12 |
|
91 | #define TC_LEN_DIS_CAL 12 | |
92 | #define TC_LEN_UPDT_TIME 18 |
|
92 | #define TC_LEN_UPDT_TIME 18 | |
93 |
|
93 | |||
94 | // TM TYPES |
|
94 | // TM TYPES | |
95 | #define TM_TYPE_TC_EXE 1 |
|
95 | #define TM_TYPE_TC_EXE 1 | |
96 | #define TM_TYPE_HK 3 |
|
96 | #define TM_TYPE_HK 3 | |
97 | #define TM_TYPE_PARAMETER_DUMP 3 |
|
97 | #define TM_TYPE_PARAMETER_DUMP 3 | |
98 | #define TM_TYPE_LFR_SCIENCE 21 |
|
98 | #define TM_TYPE_LFR_SCIENCE 21 | |
99 |
|
99 | |||
100 | // TM SUBTYPES |
|
100 | // TM SUBTYPES | |
101 | #define TM_SUBTYPE_EXE_OK 7 |
|
101 | #define TM_SUBTYPE_EXE_OK 7 | |
102 | #define TM_SUBTYPE_EXE_NOK 8 |
|
102 | #define TM_SUBTYPE_EXE_NOK 8 | |
103 | #define TM_SUBTYPE_HK 25 |
|
103 | #define TM_SUBTYPE_HK 25 | |
104 | #define TM_SUBTYPE_PARAMETER_DUMP 25 |
|
104 | #define TM_SUBTYPE_PARAMETER_DUMP 25 | |
105 | #define TM_SUBTYPE_SCIENCE 3 |
|
105 | #define TM_SUBTYPE_SCIENCE 3 | |
106 | #define TM_SUBTYPE_LFR_SCIENCE 3 |
|
106 | #define TM_SUBTYPE_LFR_SCIENCE 3 | |
107 |
|
107 | |||
108 | // FAILURE CODES |
|
108 | // FAILURE CODES | |
109 | #define ILLEGAL_APID 0 |
|
109 | #define ILLEGAL_APID 0 | |
110 | #define WRONG_LEN_PACKET 1 |
|
110 | #define WRONG_LEN_PACKET 1 | |
111 | #define INCOR_CHECKSUM 2 |
|
111 | #define INCOR_CHECKSUM 2 | |
112 | #define ILL_TYPE 3 |
|
112 | #define ILL_TYPE 3 | |
113 | #define ILL_SUBTYPE 4 |
|
113 | #define ILL_SUBTYPE 4 | |
114 | #define WRONG_APP_DATA 5 // 0x00 0x05 |
|
114 | #define WRONG_APP_DATA 5 // 0x00 0x05 | |
115 | // |
|
115 | // | |
116 | #define CCSDS_TM_VALID 7 |
|
116 | #define CCSDS_TM_VALID 7 | |
117 | #define TC_NOT_EXE 42000 // 0xa4 0x10 |
|
117 | #define TC_NOT_EXE 42000 // 0xa4 0x10 | |
118 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 |
|
118 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 | |
119 | #define FAIL_DETECTED 42003 // 0xa4 0x13 |
|
119 | #define FAIL_DETECTED 42003 // 0xa4 0x13 | |
120 | #define CORRUPTED 42005 // 0xa4 0x15 |
|
120 | #define CORRUPTED 42005 // 0xa4 0x15 | |
121 |
|
121 | |||
122 | // TM SID |
|
122 | // TM SID | |
123 | #define SID_HK 1 |
|
123 | #define SID_HK 1 | |
124 | #define SID_PARAMETER_DUMP 10 |
|
124 | #define SID_PARAMETER_DUMP 10 | |
125 |
|
125 | |||
126 | #define SID_NORM_SWF_F0 3 |
|
126 | #define SID_NORM_SWF_F0 3 | |
127 | #define SID_NORM_SWF_F1 4 |
|
127 | #define SID_NORM_SWF_F1 4 | |
128 | #define SID_NORM_SWF_F2 5 |
|
128 | #define SID_NORM_SWF_F2 5 | |
129 | #define SID_NORM_CWF_F3 1 |
|
129 | #define SID_NORM_CWF_F3 1 | |
130 | #define SID_BURST_CWF_F2 2 |
|
130 | #define SID_BURST_CWF_F2 2 | |
131 | #define SID_SBM1_CWF_F1 24 |
|
131 | #define SID_SBM1_CWF_F1 24 | |
132 | #define SID_SBM2_CWF_F2 25 |
|
132 | #define SID_SBM2_CWF_F2 25 | |
133 | #define SID_NORM_ASM_F0 11 |
|
133 | #define SID_NORM_ASM_F0 11 | |
134 | #define SID_NORM_ASM_F1 12 |
|
134 | #define SID_NORM_ASM_F1 12 | |
135 | #define SID_NORM_ASM_F2 13 |
|
135 | #define SID_NORM_ASM_F2 13 | |
136 | #define SID_NORM_BP1_F0 14 |
|
136 | #define SID_NORM_BP1_F0 14 | |
137 | #define SID_NORM_BP1_F1 15 |
|
137 | #define SID_NORM_BP1_F1 15 | |
138 | #define SID_NORM_BP1_F2 16 |
|
138 | #define SID_NORM_BP1_F2 16 | |
139 | #define SID_NORM_BP2_F0 19 |
|
139 | #define SID_NORM_BP2_F0 19 | |
140 | #define SID_NORM_BP2_F1 20 |
|
140 | #define SID_NORM_BP2_F1 20 | |
141 | #define SID_NORM_BP2_F2 21 |
|
141 | #define SID_NORM_BP2_F2 21 | |
142 | #define SID_BURST_BP1_F0 17 |
|
142 | #define SID_BURST_BP1_F0 17 | |
143 | #define SID_BURST_BP2_F0 22 |
|
143 | #define SID_BURST_BP2_F0 22 | |
144 | #define SID_BURST_BP1_F1 18 |
|
144 | #define SID_BURST_BP1_F1 18 | |
145 | #define SID_BURST_BP2_F1 23 |
|
145 | #define SID_BURST_BP2_F1 23 | |
146 | #define SID_SBM1_BP1_F0 28 |
|
146 | #define SID_SBM1_BP1_F0 28 | |
147 | #define SID_SBM1_BP2_F0 31 |
|
147 | #define SID_SBM1_BP2_F0 31 | |
148 | #define SID_SBM2_BP1_F0 29 |
|
148 | #define SID_SBM2_BP1_F0 29 | |
149 | #define SID_SBM2_BP2_F0 32 |
|
149 | #define SID_SBM2_BP2_F0 32 | |
150 | #define SID_SBM2_BP1_F1 30 |
|
150 | #define SID_SBM2_BP1_F1 30 | |
151 | #define SID_SBM2_BP2_F1 33 |
|
151 | #define SID_SBM2_BP2_F1 33 | |
152 |
|
152 | |||
153 | // LENGTH (BYTES) |
|
153 | // LENGTH (BYTES) | |
154 | #define LENGTH_TM_LFR_TC_EXE_MAX 32 |
|
154 | #define LENGTH_TM_LFR_TC_EXE_MAX 32 | |
155 | #define LENGTH_TM_LFR_HK 126 |
|
155 | #define LENGTH_TM_LFR_HK 126 | |
156 |
|
156 | |||
157 | // HEADER_LENGTH |
|
157 | // HEADER_LENGTH | |
158 | #define TM_HEADER_LEN 16 |
|
158 | #define TM_HEADER_LEN 16 | |
159 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28 |
|
159 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28 | |
160 | // PACKET_LENGTH |
|
160 | // PACKET_LENGTH | |
161 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) |
|
161 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) | |
162 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
162 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
163 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
163 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
164 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
164 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
165 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
165 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
166 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) |
|
166 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) | |
167 | #define PACKET_LENGTH_HK (126 - CCSDS_TC_TM_PACKET_OFFSET) |
|
167 | #define PACKET_LENGTH_HK (126 - CCSDS_TC_TM_PACKET_OFFSET) | |
168 | #define PACKET_LENGTH_PARAMETER_DUMP (34 - CCSDS_TC_TM_PACKET_OFFSET) |
|
168 | #define PACKET_LENGTH_PARAMETER_DUMP (34 - CCSDS_TC_TM_PACKET_OFFSET) | |
169 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM (TOTAL_SIZE_SM + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET) |
|
169 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM (TOTAL_SIZE_SM + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET) | |
170 |
|
170 | |||
171 | #define SPARE1_PUSVERSION_SPARE2 0x10 |
|
171 | #define SPARE1_PUSVERSION_SPARE2 0x10 | |
172 |
|
172 | |||
173 | #define LEN_TM_LFR_HK 130 // 126 + 4 |
|
173 | #define LEN_TM_LFR_HK 130 // 126 + 4 | |
174 | #define LEN_TM_LFR_TC_EXE_NOT_IMP 28 // 24 + 4 |
|
174 | #define LEN_TM_LFR_TC_EXE_NOT_IMP 28 // 24 + 4 | |
175 |
|
175 | |||
176 | #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1 |
|
176 | #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1 | |
177 | #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1 |
|
177 | #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1 | |
178 | #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1 |
|
178 | #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1 | |
179 | #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1 |
|
179 | #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1 | |
180 | #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1 |
|
180 | #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1 | |
181 | #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1 |
|
181 | #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1 | |
182 | #define DEFAULT_PKTCNT 0x07 |
|
182 | #define DEFAULT_PKTCNT 0x07 | |
183 | #define BLK_NR_340 0x0154 |
|
183 | #define BLK_NR_340 0x0154 | |
184 | #define BLK_NR_8 0x0008 |
|
184 | #define BLK_NR_8 0x0008 | |
185 |
|
185 | |||
186 | enum TM_TYPE{ |
|
186 | enum TM_TYPE{ | |
187 | TM_LFR_TC_EXE_OK, |
|
187 | TM_LFR_TC_EXE_OK, | |
188 | TM_LFR_TC_EXE_ERR, |
|
188 | TM_LFR_TC_EXE_ERR, | |
189 | TM_LFR_HK, |
|
189 | TM_LFR_HK, | |
190 | TM_LFR_SCI, |
|
190 | TM_LFR_SCI, | |
191 | TM_LFR_SCI_SBM, |
|
191 | TM_LFR_SCI_SBM, | |
192 | TM_LFR_PAR_DUMP |
|
192 | TM_LFR_PAR_DUMP | |
193 | }; |
|
193 | }; | |
194 |
|
194 | |||
195 | struct TMHeader_str |
|
195 | struct TMHeader_str | |
196 | { |
|
196 | { | |
197 | volatile unsigned char targetLogicalAddress; |
|
197 | volatile unsigned char targetLogicalAddress; | |
198 | volatile unsigned char protocolIdentifier; |
|
198 | volatile unsigned char protocolIdentifier; | |
199 | volatile unsigned char reserved; |
|
199 | volatile unsigned char reserved; | |
200 | volatile unsigned char userApplication; |
|
200 | volatile unsigned char userApplication; | |
201 | volatile unsigned char packetID[2]; |
|
201 | volatile unsigned char packetID[2]; | |
202 | volatile unsigned char packetSequenceControl[2]; |
|
202 | volatile unsigned char packetSequenceControl[2]; | |
203 | volatile unsigned char packetLength[2]; |
|
203 | volatile unsigned char packetLength[2]; | |
204 | // DATA FIELD HEADER |
|
204 | // DATA FIELD HEADER | |
205 | volatile unsigned char spare1_pusVersion_spare2; |
|
205 | volatile unsigned char spare1_pusVersion_spare2; | |
206 | volatile unsigned char serviceType; |
|
206 | volatile unsigned char serviceType; | |
207 | volatile unsigned char serviceSubType; |
|
207 | volatile unsigned char serviceSubType; | |
208 | volatile unsigned char destinationID; |
|
208 | volatile unsigned char destinationID; | |
209 | volatile unsigned char time[6]; |
|
209 | volatile unsigned char time[6]; | |
210 | }; |
|
210 | }; | |
211 | typedef struct TMHeader_str TMHeader_t; |
|
211 | typedef struct TMHeader_str TMHeader_t; | |
212 |
|
212 | |||
213 | struct Packet_TM_LFR_TC_EXE_str |
|
213 | struct Packet_TM_LFR_TC_EXE_str | |
214 | { |
|
214 | { | |
215 | volatile unsigned char targetLogicalAddress; |
|
215 | volatile unsigned char targetLogicalAddress; | |
216 | volatile unsigned char protocolIdentifier; |
|
216 | volatile unsigned char protocolIdentifier; | |
217 | volatile unsigned char reserved; |
|
217 | volatile unsigned char reserved; | |
218 | volatile unsigned char userApplication; |
|
218 | volatile unsigned char userApplication; | |
219 | volatile unsigned char packetID[2]; |
|
219 | volatile unsigned char packetID[2]; | |
220 | volatile unsigned char packetSequenceControl[2]; |
|
220 | volatile unsigned char packetSequenceControl[2]; | |
221 | volatile unsigned char packetLength[2]; |
|
221 | volatile unsigned char packetLength[2]; | |
222 | // DATA FIELD HEADER |
|
222 | // DATA FIELD HEADER | |
223 | volatile unsigned char spare1_pusVersion_spare2; |
|
223 | volatile unsigned char spare1_pusVersion_spare2; | |
224 | volatile unsigned char serviceType; |
|
224 | volatile unsigned char serviceType; | |
225 | volatile unsigned char serviceSubType; |
|
225 | volatile unsigned char serviceSubType; | |
226 | volatile unsigned char destinationID; |
|
226 | volatile unsigned char destinationID; | |
227 | volatile unsigned char time[6]; |
|
227 | volatile unsigned char time[6]; | |
228 | volatile unsigned char data[LENGTH_TM_LFR_TC_EXE_MAX - 10 + 1]; |
|
228 | volatile unsigned char data[LENGTH_TM_LFR_TC_EXE_MAX - 10 + 1]; | |
229 | }; |
|
229 | }; | |
230 | typedef struct Packet_TM_LFR_TC_EXE_str Packet_TM_LFR_TC_EXE_t; |
|
230 | typedef struct Packet_TM_LFR_TC_EXE_str Packet_TM_LFR_TC_EXE_t; | |
231 |
|
231 | |||
232 | struct Packet_TM_LFR_TC_EXE_SUCCESS_str |
|
232 | struct Packet_TM_LFR_TC_EXE_SUCCESS_str | |
233 | { |
|
233 | { | |
234 | volatile unsigned char targetLogicalAddress; |
|
234 | volatile unsigned char targetLogicalAddress; | |
235 | volatile unsigned char protocolIdentifier; |
|
235 | volatile unsigned char protocolIdentifier; | |
236 | volatile unsigned char reserved; |
|
236 | volatile unsigned char reserved; | |
237 | volatile unsigned char userApplication; |
|
237 | volatile unsigned char userApplication; | |
238 | // PACKET HEADER |
|
238 | // PACKET HEADER | |
239 | volatile unsigned char packetID[2]; |
|
239 | volatile unsigned char packetID[2]; | |
240 | volatile unsigned char packetSequenceControl[2]; |
|
240 | volatile unsigned char packetSequenceControl[2]; | |
241 | volatile unsigned char packetLength[2]; |
|
241 | volatile unsigned char packetLength[2]; | |
242 | // DATA FIELD HEADER |
|
242 | // DATA FIELD HEADER | |
243 | volatile unsigned char spare1_pusVersion_spare2; |
|
243 | volatile unsigned char spare1_pusVersion_spare2; | |
244 | volatile unsigned char serviceType; |
|
244 | volatile unsigned char serviceType; | |
245 | volatile unsigned char serviceSubType; |
|
245 | volatile unsigned char serviceSubType; | |
246 | volatile unsigned char destinationID; |
|
246 | volatile unsigned char destinationID; | |
247 | volatile unsigned char time[6]; |
|
247 | volatile unsigned char time[6]; | |
248 | // |
|
248 | // | |
249 | volatile unsigned char telecommand_pkt_id[2]; |
|
249 | volatile unsigned char telecommand_pkt_id[2]; | |
250 | volatile unsigned char pkt_seq_control[2]; |
|
250 | volatile unsigned char pkt_seq_control[2]; | |
251 | }; |
|
251 | }; | |
252 | typedef struct Packet_TM_LFR_TC_EXE_SUCCESS_str Packet_TM_LFR_TC_EXE_SUCCESS_t; |
|
252 | typedef struct Packet_TM_LFR_TC_EXE_SUCCESS_str Packet_TM_LFR_TC_EXE_SUCCESS_t; | |
253 |
|
253 | |||
254 | struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str |
|
254 | struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str | |
255 | { |
|
255 | { | |
256 | volatile unsigned char targetLogicalAddress; |
|
256 | volatile unsigned char targetLogicalAddress; | |
257 | volatile unsigned char protocolIdentifier; |
|
257 | volatile unsigned char protocolIdentifier; | |
258 | volatile unsigned char reserved; |
|
258 | volatile unsigned char reserved; | |
259 | volatile unsigned char userApplication; |
|
259 | volatile unsigned char userApplication; | |
260 | // PACKET HEADER |
|
260 | // PACKET HEADER | |
261 | volatile unsigned char packetID[2]; |
|
261 | volatile unsigned char packetID[2]; | |
262 | volatile unsigned char packetSequenceControl[2]; |
|
262 | volatile unsigned char packetSequenceControl[2]; | |
263 | volatile unsigned char packetLength[2]; |
|
263 | volatile unsigned char packetLength[2]; | |
264 | // DATA FIELD HEADER |
|
264 | // DATA FIELD HEADER | |
265 | volatile unsigned char spare1_pusVersion_spare2; |
|
265 | volatile unsigned char spare1_pusVersion_spare2; | |
266 | volatile unsigned char serviceType; |
|
266 | volatile unsigned char serviceType; | |
267 | volatile unsigned char serviceSubType; |
|
267 | volatile unsigned char serviceSubType; | |
268 | volatile unsigned char destinationID; |
|
268 | volatile unsigned char destinationID; | |
269 | volatile unsigned char time[6]; |
|
269 | volatile unsigned char time[6]; | |
270 | // |
|
270 | // | |
271 | volatile unsigned char tc_failure_code[2]; |
|
271 | volatile unsigned char tc_failure_code[2]; | |
272 | volatile unsigned char telecommand_pkt_id[2]; |
|
272 | volatile unsigned char telecommand_pkt_id[2]; | |
273 | volatile unsigned char pkt_seq_control[2]; |
|
273 | volatile unsigned char pkt_seq_control[2]; | |
274 | volatile unsigned char tc_service; |
|
274 | volatile unsigned char tc_service; | |
275 | volatile unsigned char tc_subtype; |
|
275 | volatile unsigned char tc_subtype; | |
276 | volatile unsigned char byte_position; |
|
276 | volatile unsigned char byte_position; | |
277 | volatile unsigned char rcv_value; |
|
277 | volatile unsigned char rcv_value; | |
278 | }; |
|
278 | }; | |
279 | typedef struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str Packet_TM_LFR_TC_EXE_INCONSISTENT_t; |
|
279 | typedef struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str Packet_TM_LFR_TC_EXE_INCONSISTENT_t; | |
280 |
|
280 | |||
281 | struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str |
|
281 | struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str | |
282 | { |
|
282 | { | |
283 | volatile unsigned char targetLogicalAddress; |
|
283 | volatile unsigned char targetLogicalAddress; | |
284 | volatile unsigned char protocolIdentifier; |
|
284 | volatile unsigned char protocolIdentifier; | |
285 | volatile unsigned char reserved; |
|
285 | volatile unsigned char reserved; | |
286 | volatile unsigned char userApplication; |
|
286 | volatile unsigned char userApplication; | |
287 | // PACKET HEADER |
|
287 | // PACKET HEADER | |
288 | volatile unsigned char packetID[2]; |
|
288 | volatile unsigned char packetID[2]; | |
289 | volatile unsigned char packetSequenceControl[2]; |
|
289 | volatile unsigned char packetSequenceControl[2]; | |
290 | volatile unsigned char packetLength[2]; |
|
290 | volatile unsigned char packetLength[2]; | |
291 | // DATA FIELD HEADER |
|
291 | // DATA FIELD HEADER | |
292 | volatile unsigned char spare1_pusVersion_spare2; |
|
292 | volatile unsigned char spare1_pusVersion_spare2; | |
293 | volatile unsigned char serviceType; |
|
293 | volatile unsigned char serviceType; | |
294 | volatile unsigned char serviceSubType; |
|
294 | volatile unsigned char serviceSubType; | |
295 | volatile unsigned char destinationID; |
|
295 | volatile unsigned char destinationID; | |
296 | volatile unsigned char time[6]; |
|
296 | volatile unsigned char time[6]; | |
297 | // |
|
297 | // | |
298 | volatile unsigned char tc_failure_code[2]; |
|
298 | volatile unsigned char tc_failure_code[2]; | |
299 | volatile unsigned char telecommand_pkt_id[2]; |
|
299 | volatile unsigned char telecommand_pkt_id[2]; | |
300 | volatile unsigned char pkt_seq_control[2]; |
|
300 | volatile unsigned char pkt_seq_control[2]; | |
301 | volatile unsigned char tc_service; |
|
301 | volatile unsigned char tc_service; | |
302 | volatile unsigned char tc_subtype; |
|
302 | volatile unsigned char tc_subtype; | |
303 | volatile unsigned char lfr_status_word[2]; |
|
303 | volatile unsigned char lfr_status_word[2]; | |
304 | }; |
|
304 | }; | |
305 | typedef struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; |
|
305 | typedef struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; | |
306 |
|
306 | |||
307 | struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str |
|
307 | struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str | |
308 | { |
|
308 | { | |
309 | volatile unsigned char targetLogicalAddress; |
|
309 | volatile unsigned char targetLogicalAddress; | |
310 | volatile unsigned char protocolIdentifier; |
|
310 | volatile unsigned char protocolIdentifier; | |
311 | volatile unsigned char reserved; |
|
311 | volatile unsigned char reserved; | |
312 | volatile unsigned char userApplication; |
|
312 | volatile unsigned char userApplication; | |
313 | // PACKET HEADER |
|
313 | // PACKET HEADER | |
314 | volatile unsigned char packetID[2]; |
|
314 | volatile unsigned char packetID[2]; | |
315 | volatile unsigned char packetSequenceControl[2]; |
|
315 | volatile unsigned char packetSequenceControl[2]; | |
316 | volatile unsigned char packetLength[2]; |
|
316 | volatile unsigned char packetLength[2]; | |
317 | // DATA FIELD HEADER |
|
317 | // DATA FIELD HEADER | |
318 | volatile unsigned char spare1_pusVersion_spare2; |
|
318 | volatile unsigned char spare1_pusVersion_spare2; | |
319 | volatile unsigned char serviceType; |
|
319 | volatile unsigned char serviceType; | |
320 | volatile unsigned char serviceSubType; |
|
320 | volatile unsigned char serviceSubType; | |
321 | volatile unsigned char destinationID; |
|
321 | volatile unsigned char destinationID; | |
322 | volatile unsigned char time[6]; |
|
322 | volatile unsigned char time[6]; | |
323 | // |
|
323 | // | |
324 | volatile unsigned char tc_failure_code[2]; |
|
324 | volatile unsigned char tc_failure_code[2]; | |
325 | volatile unsigned char telecommand_pkt_id[2]; |
|
325 | volatile unsigned char telecommand_pkt_id[2]; | |
326 | volatile unsigned char pkt_seq_control[2]; |
|
326 | volatile unsigned char pkt_seq_control[2]; | |
327 | volatile unsigned char tc_service; |
|
327 | volatile unsigned char tc_service; | |
328 | volatile unsigned char tc_subtype; |
|
328 | volatile unsigned char tc_subtype; | |
329 | }; |
|
329 | }; | |
330 | typedef struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; |
|
330 | typedef struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; | |
331 |
|
331 | |||
332 | struct Packet_TM_LFR_TC_EXE_ERROR_str |
|
332 | struct Packet_TM_LFR_TC_EXE_ERROR_str | |
333 | { |
|
333 | { | |
334 | volatile unsigned char targetLogicalAddress; |
|
334 | volatile unsigned char targetLogicalAddress; | |
335 | volatile unsigned char protocolIdentifier; |
|
335 | volatile unsigned char protocolIdentifier; | |
336 | volatile unsigned char reserved; |
|
336 | volatile unsigned char reserved; | |
337 | volatile unsigned char userApplication; |
|
337 | volatile unsigned char userApplication; | |
338 | // PACKET HEADER |
|
338 | // PACKET HEADER | |
339 | volatile unsigned char packetID[2]; |
|
339 | volatile unsigned char packetID[2]; | |
340 | volatile unsigned char packetSequenceControl[2]; |
|
340 | volatile unsigned char packetSequenceControl[2]; | |
341 | volatile unsigned char packetLength[2]; |
|
341 | volatile unsigned char packetLength[2]; | |
342 | // DATA FIELD HEADER |
|
342 | // DATA FIELD HEADER | |
343 | volatile unsigned char spare1_pusVersion_spare2; |
|
343 | volatile unsigned char spare1_pusVersion_spare2; | |
344 | volatile unsigned char serviceType; |
|
344 | volatile unsigned char serviceType; | |
345 | volatile unsigned char serviceSubType; |
|
345 | volatile unsigned char serviceSubType; | |
346 | volatile unsigned char destinationID; |
|
346 | volatile unsigned char destinationID; | |
347 | volatile unsigned char time[6]; |
|
347 | volatile unsigned char time[6]; | |
348 | // |
|
348 | // | |
349 | volatile unsigned char tc_failure_code[2]; |
|
349 | volatile unsigned char tc_failure_code[2]; | |
350 | volatile unsigned char telecommand_pkt_id[2]; |
|
350 | volatile unsigned char telecommand_pkt_id[2]; | |
351 | volatile unsigned char pkt_seq_control[2]; |
|
351 | volatile unsigned char pkt_seq_control[2]; | |
352 | volatile unsigned char tc_service; |
|
352 | volatile unsigned char tc_service; | |
353 | volatile unsigned char tc_subtype; |
|
353 | volatile unsigned char tc_subtype; | |
354 | }; |
|
354 | }; | |
355 | typedef struct Packet_TM_LFR_TC_EXE_ERROR_str Packet_TM_LFR_TC_EXE_ERROR_t; |
|
355 | typedef struct Packet_TM_LFR_TC_EXE_ERROR_str Packet_TM_LFR_TC_EXE_ERROR_t; | |
356 |
|
356 | |||
357 | struct Packet_TM_LFR_TC_EXE_CORRUPTED_str |
|
357 | struct Packet_TM_LFR_TC_EXE_CORRUPTED_str | |
358 | { |
|
358 | { | |
359 | volatile unsigned char targetLogicalAddress; |
|
359 | volatile unsigned char targetLogicalAddress; | |
360 | volatile unsigned char protocolIdentifier; |
|
360 | volatile unsigned char protocolIdentifier; | |
361 | volatile unsigned char reserved; |
|
361 | volatile unsigned char reserved; | |
362 | volatile unsigned char userApplication; |
|
362 | volatile unsigned char userApplication; | |
363 | // PACKET HEADER |
|
363 | // PACKET HEADER | |
364 | volatile unsigned char packetID[2]; |
|
364 | volatile unsigned char packetID[2]; | |
365 | volatile unsigned char packetSequenceControl[2]; |
|
365 | volatile unsigned char packetSequenceControl[2]; | |
366 | volatile unsigned char packetLength[2]; |
|
366 | volatile unsigned char packetLength[2]; | |
367 | // DATA FIELD HEADER |
|
367 | // DATA FIELD HEADER | |
368 | volatile unsigned char spare1_pusVersion_spare2; |
|
368 | volatile unsigned char spare1_pusVersion_spare2; | |
369 | volatile unsigned char serviceType; |
|
369 | volatile unsigned char serviceType; | |
370 | volatile unsigned char serviceSubType; |
|
370 | volatile unsigned char serviceSubType; | |
371 | volatile unsigned char destinationID; |
|
371 | volatile unsigned char destinationID; | |
372 | volatile unsigned char time[6]; |
|
372 | volatile unsigned char time[6]; | |
373 | // |
|
373 | // | |
374 | volatile unsigned char tc_failure_code[2]; |
|
374 | volatile unsigned char tc_failure_code[2]; | |
375 | volatile unsigned char telecommand_pkt_id[2]; |
|
375 | volatile unsigned char telecommand_pkt_id[2]; | |
376 | volatile unsigned char pkt_seq_control[2]; |
|
376 | volatile unsigned char pkt_seq_control[2]; | |
377 | volatile unsigned char tc_service; |
|
377 | volatile unsigned char tc_service; | |
378 | volatile unsigned char tc_subtype; |
|
378 | volatile unsigned char tc_subtype; | |
379 | volatile unsigned char pkt_len_rcv_value[2]; |
|
379 | volatile unsigned char pkt_len_rcv_value[2]; | |
380 | volatile unsigned char pkt_datafieldsize_cnt[2]; |
|
380 | volatile unsigned char pkt_datafieldsize_cnt[2]; | |
381 | volatile unsigned char rcv_crc[2]; |
|
381 | volatile unsigned char rcv_crc[2]; | |
382 | volatile unsigned char computed_crc[2]; |
|
382 | volatile unsigned char computed_crc[2]; | |
383 | }; |
|
383 | }; | |
384 | typedef struct Packet_TM_LFR_TC_EXE_CORRUPTED_str Packet_TM_LFR_TC_EXE_CORRUPTED_t; |
|
384 | typedef struct Packet_TM_LFR_TC_EXE_CORRUPTED_str Packet_TM_LFR_TC_EXE_CORRUPTED_t; | |
385 |
|
385 | |||
386 | struct Header_TM_LFR_SCIENCE_SWF_str |
|
386 | struct Header_TM_LFR_SCIENCE_SWF_str | |
387 | { |
|
387 | { | |
388 | volatile unsigned char targetLogicalAddress; |
|
388 | volatile unsigned char targetLogicalAddress; | |
389 | volatile unsigned char protocolIdentifier; |
|
389 | volatile unsigned char protocolIdentifier; | |
390 | volatile unsigned char reserved; |
|
390 | volatile unsigned char reserved; | |
391 | volatile unsigned char userApplication; |
|
391 | volatile unsigned char userApplication; | |
392 | volatile unsigned char packetID[2]; |
|
392 | volatile unsigned char packetID[2]; | |
393 | volatile unsigned char packetSequenceControl[2]; |
|
393 | volatile unsigned char packetSequenceControl[2]; | |
394 | volatile unsigned char packetLength[2]; |
|
394 | volatile unsigned char packetLength[2]; | |
395 | // DATA FIELD HEADER |
|
395 | // DATA FIELD HEADER | |
396 | volatile unsigned char spare1_pusVersion_spare2; |
|
396 | volatile unsigned char spare1_pusVersion_spare2; | |
397 | volatile unsigned char serviceType; |
|
397 | volatile unsigned char serviceType; | |
398 | volatile unsigned char serviceSubType; |
|
398 | volatile unsigned char serviceSubType; | |
399 | volatile unsigned char destinationID; |
|
399 | volatile unsigned char destinationID; | |
400 | volatile unsigned char time[6]; |
|
400 | volatile unsigned char time[6]; | |
401 | // AUXILIARY HEADER |
|
401 | // AUXILIARY HEADER | |
402 | volatile unsigned char sid; |
|
402 | volatile unsigned char sid; | |
403 | volatile unsigned char hkBIA; |
|
403 | volatile unsigned char hkBIA; | |
404 | volatile unsigned char pktCnt; |
|
404 | volatile unsigned char pktCnt; | |
405 | volatile unsigned char pktNr; |
|
405 | volatile unsigned char pktNr; | |
406 | volatile unsigned char acquisitionTime[6]; |
|
406 | volatile unsigned char acquisitionTime[6]; | |
407 | volatile unsigned char blkNr[2]; |
|
407 | volatile unsigned char blkNr[2]; | |
408 | }; |
|
408 | }; | |
409 | typedef struct Header_TM_LFR_SCIENCE_SWF_str Header_TM_LFR_SCIENCE_SWF_t; |
|
409 | typedef struct Header_TM_LFR_SCIENCE_SWF_str Header_TM_LFR_SCIENCE_SWF_t; | |
410 |
|
410 | |||
411 | struct Header_TM_LFR_SCIENCE_CWF_str |
|
411 | struct Header_TM_LFR_SCIENCE_CWF_str | |
412 | { |
|
412 | { | |
413 | volatile unsigned char targetLogicalAddress; |
|
413 | volatile unsigned char targetLogicalAddress; | |
414 | volatile unsigned char protocolIdentifier; |
|
414 | volatile unsigned char protocolIdentifier; | |
415 | volatile unsigned char reserved; |
|
415 | volatile unsigned char reserved; | |
416 | volatile unsigned char userApplication; |
|
416 | volatile unsigned char userApplication; | |
417 | volatile unsigned char packetID[2]; |
|
417 | volatile unsigned char packetID[2]; | |
418 | volatile unsigned char packetSequenceControl[2]; |
|
418 | volatile unsigned char packetSequenceControl[2]; | |
419 | volatile unsigned char packetLength[2]; |
|
419 | volatile unsigned char packetLength[2]; | |
420 | // DATA FIELD HEADER |
|
420 | // DATA FIELD HEADER | |
421 | volatile unsigned char spare1_pusVersion_spare2; |
|
421 | volatile unsigned char spare1_pusVersion_spare2; | |
422 | volatile unsigned char serviceType; |
|
422 | volatile unsigned char serviceType; | |
423 | volatile unsigned char serviceSubType; |
|
423 | volatile unsigned char serviceSubType; | |
424 | volatile unsigned char destinationID; |
|
424 | volatile unsigned char destinationID; | |
425 | volatile unsigned char time[6]; |
|
425 | volatile unsigned char time[6]; | |
426 | // AUXILIARY DATA HEADER |
|
426 | // AUXILIARY DATA HEADER | |
427 | volatile unsigned char sid; |
|
427 | volatile unsigned char sid; | |
428 | volatile unsigned char hkBIA; |
|
428 | volatile unsigned char hkBIA; | |
429 | volatile unsigned char acquisitionTime[6]; |
|
429 | volatile unsigned char acquisitionTime[6]; | |
430 | volatile unsigned char blkNr[2]; |
|
430 | volatile unsigned char blkNr[2]; | |
431 | }; |
|
431 | }; | |
432 | typedef struct Header_TM_LFR_SCIENCE_CWF_str Header_TM_LFR_SCIENCE_CWF_t; |
|
432 | typedef struct Header_TM_LFR_SCIENCE_CWF_str Header_TM_LFR_SCIENCE_CWF_t; | |
433 |
|
433 | |||
434 | struct Header_TM_LFR_SCIENCE_ASM_str |
|
434 | struct Header_TM_LFR_SCIENCE_ASM_str | |
435 | { |
|
435 | { | |
436 | volatile unsigned char targetLogicalAddress; |
|
436 | volatile unsigned char targetLogicalAddress; | |
437 | volatile unsigned char protocolIdentifier; |
|
437 | volatile unsigned char protocolIdentifier; | |
438 | volatile unsigned char reserved; |
|
438 | volatile unsigned char reserved; | |
439 | volatile unsigned char userApplication; |
|
439 | volatile unsigned char userApplication; | |
440 | volatile unsigned char packetID[2]; |
|
440 | volatile unsigned char packetID[2]; | |
441 | volatile unsigned char packetSequenceControl[2]; |
|
441 | volatile unsigned char packetSequenceControl[2]; | |
442 | volatile unsigned char packetLength[2]; |
|
442 | volatile unsigned char packetLength[2]; | |
443 | // DATA FIELD HEADER |
|
443 | // DATA FIELD HEADER | |
444 | volatile unsigned char spare1_pusVersion_spare2; |
|
444 | volatile unsigned char spare1_pusVersion_spare2; | |
445 | volatile unsigned char serviceType; |
|
445 | volatile unsigned char serviceType; | |
446 | volatile unsigned char serviceSubType; |
|
446 | volatile unsigned char serviceSubType; | |
447 | volatile unsigned char destinationID; |
|
447 | volatile unsigned char destinationID; | |
448 | volatile unsigned char time[6]; |
|
448 | volatile unsigned char time[6]; | |
449 | // AUXILIARY HEADER |
|
449 | // AUXILIARY HEADER | |
450 | volatile unsigned char sid; |
|
450 | volatile unsigned char sid; | |
451 | volatile unsigned char biaStatusInfo; |
|
451 | volatile unsigned char biaStatusInfo; | |
452 | volatile unsigned char cntASM; |
|
452 | volatile unsigned char cntASM; | |
453 | volatile unsigned char nrASM; |
|
453 | volatile unsigned char nrASM; | |
454 | volatile unsigned char acquisitionTime[6]; |
|
454 | volatile unsigned char acquisitionTime[6]; | |
455 | volatile unsigned char blkNr[2]; |
|
455 | volatile unsigned char blkNr[2]; | |
456 | }; |
|
456 | }; | |
457 | typedef struct Header_TM_LFR_SCIENCE_ASM_str Header_TM_LFR_SCIENCE_ASM_t; |
|
457 | typedef struct Header_TM_LFR_SCIENCE_ASM_str Header_TM_LFR_SCIENCE_ASM_t; | |
458 |
|
458 | |||
459 | struct ccsdsTelecommandPacket_str |
|
459 | struct ccsdsTelecommandPacket_str | |
460 | { |
|
460 | { | |
461 | //unsigned char targetLogicalAddress; // removed by the grspw module |
|
461 | //unsigned char targetLogicalAddress; // removed by the grspw module | |
462 | volatile unsigned char protocolIdentifier; |
|
462 | volatile unsigned char protocolIdentifier; | |
463 | volatile unsigned char reserved; |
|
463 | volatile unsigned char reserved; | |
464 | volatile unsigned char userApplication; |
|
464 | volatile unsigned char userApplication; | |
465 | volatile unsigned char packetID[2]; |
|
465 | volatile unsigned char packetID[2]; | |
466 | volatile unsigned char packetSequenceControl[2]; |
|
466 | volatile unsigned char packetSequenceControl[2]; | |
467 | volatile unsigned char packetLength[2]; |
|
467 | volatile unsigned char packetLength[2]; | |
468 | // DATA FIELD HEADER |
|
468 | // DATA FIELD HEADER | |
469 | volatile unsigned char headerFlag_pusVersion_Ack; |
|
469 | volatile unsigned char headerFlag_pusVersion_Ack; | |
470 | volatile unsigned char serviceType; |
|
470 | volatile unsigned char serviceType; | |
471 | volatile unsigned char serviceSubType; |
|
471 | volatile unsigned char serviceSubType; | |
472 | volatile unsigned char sourceID; |
|
472 | volatile unsigned char sourceID; | |
473 | volatile unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; |
|
473 | volatile unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; | |
474 | }; |
|
474 | }; | |
475 | typedef struct ccsdsTelecommandPacket_str ccsdsTelecommandPacket_t; |
|
475 | typedef struct ccsdsTelecommandPacket_str ccsdsTelecommandPacket_t; | |
476 |
|
476 | |||
477 | struct Packet_TM_LFR_HK_str |
|
477 | struct Packet_TM_LFR_HK_str | |
478 | { |
|
478 | { | |
479 | volatile unsigned char targetLogicalAddress; |
|
479 | volatile unsigned char targetLogicalAddress; | |
480 | volatile unsigned char protocolIdentifier; |
|
480 | volatile unsigned char protocolIdentifier; | |
481 | volatile unsigned char reserved; |
|
481 | volatile unsigned char reserved; | |
482 | volatile unsigned char userApplication; |
|
482 | volatile unsigned char userApplication; | |
483 | volatile unsigned char packetID[2]; |
|
483 | volatile unsigned char packetID[2]; | |
484 | volatile unsigned char packetSequenceControl[2]; |
|
484 | volatile unsigned char packetSequenceControl[2]; | |
485 | volatile unsigned char packetLength[2]; |
|
485 | volatile unsigned char packetLength[2]; | |
486 | volatile unsigned char spare1_pusVersion_spare2; |
|
486 | volatile unsigned char spare1_pusVersion_spare2; | |
487 | volatile unsigned char serviceType; |
|
487 | volatile unsigned char serviceType; | |
488 | volatile unsigned char serviceSubType; |
|
488 | volatile unsigned char serviceSubType; | |
489 | volatile unsigned char destinationID; |
|
489 | volatile unsigned char destinationID; | |
490 | volatile unsigned char time[6]; |
|
490 | volatile unsigned char time[6]; | |
491 | volatile unsigned char sid; |
|
491 | volatile unsigned char sid; | |
492 |
|
492 | |||
493 | //************** |
|
493 | //************** | |
494 | // HK PARAMETERS |
|
494 | // HK PARAMETERS | |
495 | unsigned char lfr_status_word[2]; |
|
495 | unsigned char lfr_status_word[2]; | |
496 | unsigned char lfr_sw_version[4]; |
|
496 | unsigned char lfr_sw_version[4]; | |
497 | // tc statistics |
|
497 | // tc statistics | |
498 | unsigned char hk_lfr_update_info_tc_cnt[2]; |
|
498 | unsigned char hk_lfr_update_info_tc_cnt[2]; | |
499 | unsigned char hk_lfr_update_time_tc_cnt[2]; |
|
499 | unsigned char hk_lfr_update_time_tc_cnt[2]; | |
500 | unsigned char hk_dpu_exe_tc_lfr_cnt[2]; |
|
500 | unsigned char hk_dpu_exe_tc_lfr_cnt[2]; | |
501 | unsigned char hk_dpu_rej_tc_lfr_cnt[2]; |
|
501 | unsigned char hk_dpu_rej_tc_lfr_cnt[2]; | |
502 | unsigned char hk_lfr_last_exe_tc_id[2]; |
|
502 | unsigned char hk_lfr_last_exe_tc_id[2]; | |
503 | unsigned char hk_lfr_last_exe_tc_type[2]; |
|
503 | unsigned char hk_lfr_last_exe_tc_type[2]; | |
504 | unsigned char hk_lfr_last_exe_tc_subtype[2]; |
|
504 | unsigned char hk_lfr_last_exe_tc_subtype[2]; | |
505 | unsigned char hk_lfr_last_exe_tc_time[6]; |
|
505 | unsigned char hk_lfr_last_exe_tc_time[6]; | |
506 | unsigned char hk_lfr_last_rej_tc_id[2]; |
|
506 | unsigned char hk_lfr_last_rej_tc_id[2]; | |
507 | unsigned char hk_lfr_last_rej_tc_type[2]; |
|
507 | unsigned char hk_lfr_last_rej_tc_type[2]; | |
508 | unsigned char hk_lfr_last_rej_tc_subtype[2]; |
|
508 | unsigned char hk_lfr_last_rej_tc_subtype[2]; | |
509 | unsigned char hk_lfr_last_rej_tc_time[6]; |
|
509 | unsigned char hk_lfr_last_rej_tc_time[6]; | |
510 | // anomaly statistics |
|
510 | // anomaly statistics | |
511 | unsigned char hk_lfr_le_cnt[2]; |
|
511 | unsigned char hk_lfr_le_cnt[2]; | |
512 | unsigned char hk_lfr_me_cnt[2]; |
|
512 | unsigned char hk_lfr_me_cnt[2]; | |
513 | unsigned char hk_lfr_he_cnt[2]; |
|
513 | unsigned char hk_lfr_he_cnt[2]; | |
514 | unsigned char hk_lfr_last_er_rid[2]; |
|
514 | unsigned char hk_lfr_last_er_rid[2]; | |
515 | unsigned char hk_lfr_last_er_code; |
|
515 | unsigned char hk_lfr_last_er_code; | |
516 | unsigned char hk_lfr_last_er_time[6]; |
|
516 | unsigned char hk_lfr_last_er_time[6]; | |
517 | // vhdl_blk_status |
|
517 | // vhdl_blk_status | |
518 | unsigned char hk_lfr_vhdl_aa_sm; |
|
518 | unsigned char hk_lfr_vhdl_aa_sm; | |
519 | unsigned char hk_lfr_vhdl_fft_sr; |
|
519 | unsigned char hk_lfr_vhdl_fft_sr; | |
520 | unsigned char hk_lfr_vhdl_cic_hk; |
|
520 | unsigned char hk_lfr_vhdl_cic_hk; | |
521 | unsigned char hk_lfr_vhdl_iir_cal; |
|
521 | unsigned char hk_lfr_vhdl_iir_cal; | |
522 | // spacewire_if_statistics |
|
522 | // spacewire_if_statistics | |
523 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; |
|
523 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; | |
524 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; |
|
524 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; | |
525 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; |
|
525 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; | |
526 | unsigned char hk_lfr_dpu_spw_last_timc; |
|
526 | unsigned char hk_lfr_dpu_spw_last_timc; | |
527 | // ahb error statistics |
|
527 | // ahb error statistics | |
528 | unsigned int hk_lfr_last_fail_addr; |
|
528 | unsigned int hk_lfr_last_fail_addr; | |
529 | // temperatures |
|
529 | // temperatures | |
530 | unsigned char hk_lfr_temp_scm[2]; |
|
530 | unsigned char hk_lfr_temp_scm[2]; | |
531 | unsigned char hk_lfr_temp_pcb[2]; |
|
531 | unsigned char hk_lfr_temp_pcb[2]; | |
532 | unsigned char hk_lfr_temp_fpga[2]; |
|
532 | unsigned char hk_lfr_temp_fpga[2]; | |
533 | // error counters |
|
533 | // error counters | |
534 | unsigned char hk_lfr_dpu_spw_parity; |
|
534 | unsigned char hk_lfr_dpu_spw_parity; | |
535 | unsigned char hk_lfr_dpu_spw_disconnect; |
|
535 | unsigned char hk_lfr_dpu_spw_disconnect; | |
536 | unsigned char hk_lfr_dpu_spw_escape; |
|
536 | unsigned char hk_lfr_dpu_spw_escape; | |
537 | unsigned char hk_lfr_dpu_spw_credit; |
|
537 | unsigned char hk_lfr_dpu_spw_credit; | |
538 | unsigned char hk_lfr_dpu_spw_write_sync; |
|
538 | unsigned char hk_lfr_dpu_spw_write_sync; | |
539 | unsigned char hk_lfr_dpu_spw_rx_ahb; |
|
539 | unsigned char hk_lfr_dpu_spw_rx_ahb; | |
540 | unsigned char hk_lfr_dpu_spw_tx_ahb; |
|
540 | unsigned char hk_lfr_dpu_spw_tx_ahb; | |
541 | unsigned char hk_lfr_dpu_spw_header_crc; |
|
541 | unsigned char hk_lfr_dpu_spw_header_crc; | |
542 | unsigned char hk_lfr_dpu_spw_data_crc; |
|
542 | unsigned char hk_lfr_dpu_spw_data_crc; | |
543 | unsigned char hk_lfr_dpu_spw_early_eop; |
|
543 | unsigned char hk_lfr_dpu_spw_early_eop; | |
544 | unsigned char hk_lfr_dpu_spw_invalid_addr; |
|
544 | unsigned char hk_lfr_dpu_spw_invalid_addr; | |
545 | unsigned char hk_lfr_dpu_spw_eep; |
|
545 | unsigned char hk_lfr_dpu_spw_eep; | |
546 | unsigned char hk_lfr_dpu_spw_rx_too_big; |
|
546 | unsigned char hk_lfr_dpu_spw_rx_too_big; | |
547 | // timecode |
|
547 | // timecode | |
548 | unsigned char hk_lfr_timecode_erroneous; |
|
548 | unsigned char hk_lfr_timecode_erroneous; | |
549 | unsigned char hk_lfr_timecode_missing; |
|
549 | unsigned char hk_lfr_timecode_missing; | |
550 | unsigned char hk_lfr_timecode_invalid; |
|
550 | unsigned char hk_lfr_timecode_invalid; | |
551 | // time |
|
551 | // time | |
552 | unsigned char hk_lfr_time_timecode_it; |
|
552 | unsigned char hk_lfr_time_timecode_it; | |
553 | unsigned char hk_lfr_time_not_synchro; |
|
553 | unsigned char hk_lfr_time_not_synchro; | |
554 | unsigned char hk_lfr_time_timecode_ctr; |
|
554 | unsigned char hk_lfr_time_timecode_ctr; | |
555 | // hk_lfr_buffer_dpu_ |
|
555 | // hk_lfr_buffer_dpu_ | |
556 | unsigned char hk_lfr_buffer_dpu_tc_fifo; |
|
556 | unsigned char hk_lfr_buffer_dpu_tc_fifo; | |
557 | unsigned char hk_lfr_buffer_dpu_tm_fifo; |
|
557 | unsigned char hk_lfr_buffer_dpu_tm_fifo; | |
558 | // hk_lfr_ahb_ |
|
558 | // hk_lfr_ahb_ | |
559 | unsigned char hk_lfr_ahb_correctable; |
|
559 | unsigned char hk_lfr_ahb_correctable; | |
560 | unsigned char hk_lfr_ahb_uncorrectable; |
|
560 | unsigned char hk_lfr_ahb_uncorrectable; | |
561 | unsigned char hk_lfr_ahb_fails_trans; |
|
561 | unsigned char hk_lfr_ahb_fails_trans; | |
562 | // hk_lfr_adc_ |
|
562 | // hk_lfr_adc_ | |
563 | unsigned char hk_lfr_adc_failure; |
|
563 | unsigned char hk_lfr_adc_failure; | |
564 | unsigned char hk_lfr_adc_timeout; |
|
564 | unsigned char hk_lfr_adc_timeout; | |
565 | unsigned char hk_lfr_toomany_err; |
|
565 | unsigned char hk_lfr_toomany_err; | |
566 | // hk_lfr_cpu_ |
|
566 | // hk_lfr_cpu_ | |
567 | unsigned char hk_lfr_cpu_write_err; |
|
567 | unsigned char hk_lfr_cpu_write_err; | |
568 | unsigned char hk_lfr_cpu_ins_access_err; |
|
568 | unsigned char hk_lfr_cpu_ins_access_err; | |
569 | unsigned char hk_lfr_cpu_illegal_ins; |
|
569 | unsigned char hk_lfr_cpu_illegal_ins; | |
570 | unsigned char hk_lfr_cpu_privilegied_ins; |
|
570 | unsigned char hk_lfr_cpu_privilegied_ins; | |
571 | unsigned char hk_lfr_cpu_register_hw; |
|
571 | unsigned char hk_lfr_cpu_register_hw; | |
572 | unsigned char hk_lfr_cpu_not_aligned; |
|
572 | unsigned char hk_lfr_cpu_not_aligned; | |
573 | unsigned char hk_lfr_cpu_data_exception; |
|
573 | unsigned char hk_lfr_cpu_data_exception; | |
574 | unsigned char hk_lfr_cpu_div_exception; |
|
574 | unsigned char hk_lfr_cpu_div_exception; | |
575 | unsigned char hk_lfr_cpu_arith_overflow; |
|
575 | unsigned char hk_lfr_cpu_arith_overflow; | |
576 | }; |
|
576 | }; | |
577 | typedef struct Packet_TM_LFR_HK_str Packet_TM_LFR_HK_t; |
|
577 | typedef struct Packet_TM_LFR_HK_str Packet_TM_LFR_HK_t; | |
578 |
|
578 | |||
579 | struct Packet_TM_LFR_PARAMETER_DUMP_str |
|
579 | struct Packet_TM_LFR_PARAMETER_DUMP_str | |
580 | { |
|
580 | { | |
581 | volatile unsigned char targetLogicalAddress; |
|
581 | volatile unsigned char targetLogicalAddress; | |
582 | volatile unsigned char protocolIdentifier; |
|
582 | volatile unsigned char protocolIdentifier; | |
583 | volatile unsigned char reserved; |
|
583 | volatile unsigned char reserved; | |
584 | volatile unsigned char userApplication; |
|
584 | volatile unsigned char userApplication; | |
585 | volatile unsigned char packetID[2]; |
|
585 | volatile unsigned char packetID[2]; | |
586 | volatile unsigned char packetSequenceControl[2]; |
|
586 | volatile unsigned char packetSequenceControl[2]; | |
587 | volatile unsigned char packetLength[2]; |
|
587 | volatile unsigned char packetLength[2]; | |
588 | // DATA FIELD HEADER |
|
588 | // DATA FIELD HEADER | |
589 | volatile unsigned char spare1_pusVersion_spare2; |
|
589 | volatile unsigned char spare1_pusVersion_spare2; | |
590 | volatile unsigned char serviceType; |
|
590 | volatile unsigned char serviceType; | |
591 | volatile unsigned char serviceSubType; |
|
591 | volatile unsigned char serviceSubType; | |
592 | volatile unsigned char destinationID; |
|
592 | volatile unsigned char destinationID; | |
593 | volatile unsigned char time[6]; |
|
593 | volatile unsigned char time[6]; | |
594 | volatile unsigned char sid; |
|
594 | volatile unsigned char sid; | |
595 |
|
595 | |||
596 | //****************** |
|
596 | //****************** | |
597 | // COMMON PARAMETERS |
|
597 | // COMMON PARAMETERS | |
598 | volatile unsigned char unused0; |
|
598 | volatile unsigned char unused0; | |
599 | volatile unsigned char bw_sp0_sp1_r0_r1; |
|
599 | volatile unsigned char bw_sp0_sp1_r0_r1; | |
600 |
|
600 | |||
601 | //****************** |
|
601 | //****************** | |
602 | // NORMAL PARAMETERS |
|
602 | // NORMAL PARAMETERS | |
603 | volatile unsigned char sy_lfr_n_swf_l[2]; |
|
603 | volatile unsigned char sy_lfr_n_swf_l[2]; | |
604 | volatile unsigned char sy_lfr_n_swf_p[2]; |
|
604 | volatile unsigned char sy_lfr_n_swf_p[2]; | |
605 | volatile unsigned char sy_lfr_n_asm_p[2]; |
|
605 | volatile unsigned char sy_lfr_n_asm_p[2]; | |
606 | volatile unsigned char sy_lfr_n_bp_p0; |
|
606 | volatile unsigned char sy_lfr_n_bp_p0; | |
607 | volatile unsigned char sy_lfr_n_bp_p1; |
|
607 | volatile unsigned char sy_lfr_n_bp_p1; | |
608 |
|
608 | |||
609 | //***************** |
|
609 | //***************** | |
610 | // BURST PARAMETERS |
|
610 | // BURST PARAMETERS | |
611 | volatile unsigned char sy_lfr_b_bp_p0; |
|
611 | volatile unsigned char sy_lfr_b_bp_p0; | |
612 | volatile unsigned char sy_lfr_b_bp_p1; |
|
612 | volatile unsigned char sy_lfr_b_bp_p1; | |
613 |
|
613 | |||
614 | //**************** |
|
614 | //**************** | |
615 | // SBM1 PARAMETERS |
|
615 | // SBM1 PARAMETERS | |
616 | volatile unsigned char sy_lfr_s1_bp_p0; |
|
616 | volatile unsigned char sy_lfr_s1_bp_p0; | |
617 | volatile unsigned char sy_lfr_s1_bp_p1; |
|
617 | volatile unsigned char sy_lfr_s1_bp_p1; | |
618 |
|
618 | |||
619 | //**************** |
|
619 | //**************** | |
620 | // SBM2 PARAMETERS |
|
620 | // SBM2 PARAMETERS | |
621 | volatile unsigned char sy_lfr_s2_bp_p0; |
|
621 | volatile unsigned char sy_lfr_s2_bp_p0; | |
622 | volatile unsigned char sy_lfr_s2_bp_p1; |
|
622 | volatile unsigned char sy_lfr_s2_bp_p1; | |
623 | }; |
|
623 | }; | |
624 | typedef struct Packet_TM_LFR_PARAMETER_DUMP_str Packet_TM_LFR_PARAMETER_DUMP_t; |
|
624 | typedef struct Packet_TM_LFR_PARAMETER_DUMP_str Packet_TM_LFR_PARAMETER_DUMP_t; | |
625 |
|
625 | |||
626 |
|
626 | |||
627 | #endif // CCSDS_H_INCLUDED |
|
627 | #endif // CCSDS_TYPES_H_INCLUDED |
@@ -1,58 +1,49 | |||||
1 |
#ifndef FSW_ |
|
1 | #ifndef FSW_INIT_H_INCLUDED | |
2 |
#define FSW_ |
|
2 | #define FSW_INIT_H_INCLUDED | |
3 |
|
||||
4 | #include <errno.h> |
|
|||
5 | #include <fcntl.h> |
|
|||
6 | #include <stdio.h> |
|
|||
7 | #include <stdlib.h> |
|
|||
8 | #include <unistd.h> // for the read call |
|
|||
9 | #include <sys/ioctl.h> // for the ioctl call |
|
|||
10 |
|
3 | |||
11 | #include <rtems.h> |
|
4 | #include <rtems.h> | |
12 | #include <grspw.h> |
|
|||
13 | #include <apbuart.h> |
|
|||
14 | #include <leon.h> |
|
5 | #include <leon.h> | |
15 |
|
6 | |||
16 | #include "fsw_params.h" |
|
7 | #include "fsw_params.h" | |
17 | #include "fsw_misc.h" |
|
8 | #include "fsw_misc.h" | |
18 | #include "fsw_processing.h" |
|
9 | #include "fsw_processing.h" | |
19 | #include "tc_handler.h" |
|
10 | #include "tc_handler.h" | |
20 | #include "wf_handler.h" |
|
11 | #include "wf_handler.h" | |
21 |
|
12 | |||
22 | #include "fsw_spacewire.h" |
|
13 | #include "fsw_spacewire.h" | |
23 |
|
14 | |||
24 | extern rtems_name misc_name[5]; |
|
15 | extern rtems_name misc_name[5]; | |
25 | extern rtems_id misc_id[5]; |
|
16 | extern rtems_id misc_id[5]; | |
26 | extern rtems_name Task_name[20]; /* array of task names */ |
|
17 | extern rtems_name Task_name[20]; /* array of task names */ | |
27 | extern rtems_id Task_id[20]; /* array of task ids */ |
|
18 | extern rtems_id Task_id[20]; /* array of task ids */ | |
28 | extern unsigned int maxCount; |
|
19 | extern unsigned int maxCount; | |
29 | extern int fdSPW; // grspw file descriptor |
|
20 | extern int fdSPW; // grspw file descriptor | |
30 | extern int fdUART; // uart file descriptor |
|
21 | extern int fdUART; // uart file descriptor | |
31 | extern unsigned char lfrCurrentMode; |
|
22 | extern unsigned char lfrCurrentMode; | |
32 |
|
23 | |||
33 | // MODE PARAMETERS |
|
24 | // MODE PARAMETERS | |
34 | extern struct param_local_str param_local; |
|
25 | extern struct param_local_str param_local; | |
35 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
|
26 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | |
36 | extern unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID]; |
|
27 | extern unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID]; | |
37 |
|
28 | |||
38 | // RTEMS TASKS |
|
29 | // RTEMS TASKS | |
39 | rtems_task Init( rtems_task_argument argument); |
|
30 | rtems_task Init( rtems_task_argument argument); | |
40 |
|
31 | |||
41 | // OTHER functions |
|
32 | // OTHER functions | |
42 | int create_names( void ); |
|
33 | int create_names( void ); | |
43 | int create_all_tasks( void ); |
|
34 | int create_all_tasks( void ); | |
44 | int start_all_tasks( void ); |
|
35 | int start_all_tasks( void ); | |
45 | rtems_status_code create_message_queues( void ); |
|
36 | rtems_status_code create_message_queues( void ); | |
46 | // |
|
37 | // | |
47 | void init_parameter_dump( void ); |
|
38 | void init_parameter_dump( void ); | |
48 | void init_local_mode_parameters( void ); |
|
39 | void init_local_mode_parameters( void ); | |
49 | void init_housekeeping_parameters( void ); |
|
40 | void init_housekeeping_parameters( void ); | |
50 |
|
41 | |||
51 | extern int rtems_cpu_usage_report( void ); |
|
42 | extern int rtems_cpu_usage_report( void ); | |
52 | extern int rtems_cpu_usage_reset( void ); |
|
43 | extern int rtems_cpu_usage_reset( void ); | |
53 | extern void rtems_stack_checker_report_usage( void ); |
|
44 | extern void rtems_stack_checker_report_usage( void ); | |
54 |
|
45 | |||
55 | extern int sched_yield( void ); |
|
46 | extern int sched_yield( void ); | |
56 | extern int errno; |
|
47 | extern int errno; | |
57 |
|
48 | |||
58 |
#endif // FSW_ |
|
49 | #endif // FSW_INIT_H_INCLUDED |
@@ -1,28 +1,33 | |||||
1 | #ifndef FSW_MISC_H_INCLUDED |
|
1 | #ifndef FSW_MISC_H_INCLUDED | |
2 | #define FSW_MISC_H_INCLUDED |
|
2 | #define FSW_MISC_H_INCLUDED | |
3 |
|
3 | |||
4 |
#include |
|
4 | #include <rtems.h> | |
|
5 | #include <stdio.h> | |||
|
6 | #include <grspw.h> | |||
|
7 | ||||
|
8 | #include "fsw_params.h" | |||
|
9 | #include "fsw_spacewire.h" | |||
5 |
|
10 | |||
6 | rtems_name HK_name; // name of the HK rate monotonic |
|
11 | rtems_name HK_name; // name of the HK rate monotonic | |
7 | rtems_id HK_id; // id of the HK rate monotonic period |
|
12 | rtems_id HK_id; // id of the HK rate monotonic period | |
|
13 | ||||
|
14 | extern rtems_name misc_name[5]; | |||
|
15 | time_management_regs_t *time_management_regs; | |||
8 | extern Packet_TM_LFR_HK_t housekeeping_packet; |
|
16 | extern Packet_TM_LFR_HK_t housekeeping_packet; | |
9 |
|
17 | |||
10 | int configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, |
|
18 | int configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, | |
11 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ); |
|
19 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ); | |
12 | int timer_start( gptimer_regs_t *gptimer_regs, unsigned char timer ); |
|
20 | int timer_start( gptimer_regs_t *gptimer_regs, unsigned char timer ); | |
13 | int timer_stop( gptimer_regs_t *gptimer_regs, unsigned char timer ); |
|
21 | int timer_stop( gptimer_regs_t *gptimer_regs, unsigned char timer ); | |
14 | int timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider); |
|
22 | int timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider); | |
15 | void update_spacewire_statistics(); |
|
|||
16 |
|
23 | |||
17 | // SERIAL LINK |
|
24 | // SERIAL LINK | |
18 | int send_console_outputs_on_apbuart_port( void ); |
|
25 | int send_console_outputs_on_apbuart_port( void ); | |
19 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value); |
|
26 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value); | |
20 |
|
27 | |||
21 | // RTEMS TASKS |
|
28 | // RTEMS TASKS | |
22 | rtems_task stat_task(rtems_task_argument argument); |
|
29 | rtems_task stat_task( rtems_task_argument argument ); | |
23 | rtems_task hous_task(rtems_task_argument argument); |
|
30 | rtems_task hous_task( rtems_task_argument argument ); | |
24 |
rtems_task |
|
31 | rtems_task dumb_task( rtems_task_argument unused ); | |
25 |
|
||||
26 | rtems_id get_pkts_queue_id( void ); |
|
|||
27 |
|
32 | |||
28 | #endif // FSW_MISC_H_INCLUDED |
|
33 | #endif // FSW_MISC_H_INCLUDED |
@@ -1,225 +1,225 | |||||
1 |
#ifndef FSW_ |
|
1 | #ifndef FSW_PARAMS_H_INCLUDED | |
2 |
#define FSW_ |
|
2 | #define FSW_PARAMS_H_INCLUDED | |
3 |
|
3 | |||
4 | #include "grlib_regs.h" |
|
4 | #include "grlib_regs.h" | |
5 | #include "fsw_params_processing.h" |
|
5 | #include "fsw_params_processing.h" | |
6 | #include "tm_byte_positions.h" |
|
6 | #include "tm_byte_positions.h" | |
7 | #include "ccsds_types.h" |
|
7 | #include "ccsds_types.h" | |
8 |
|
8 | |||
9 | #define GRSPW_DEVICE_NAME "/dev/grspw0" |
|
9 | #define GRSPW_DEVICE_NAME "/dev/grspw0" | |
10 | #define UART_DEVICE_NAME "/dev/console" |
|
10 | #define UART_DEVICE_NAME "/dev/console" | |
11 |
|
11 | |||
12 | //************************ |
|
12 | //************************ | |
13 | // flight software version |
|
13 | // flight software version | |
14 | // this parameters is handled by the Qt project options |
|
14 | // this parameters is handled by the Qt project options | |
15 |
|
15 | |||
16 | //********** |
|
16 | //********** | |
17 | // LFR MODES |
|
17 | // LFR MODES | |
18 | #define LFR_MODE_STANDBY 0 |
|
18 | #define LFR_MODE_STANDBY 0 | |
19 | #define LFR_MODE_NORMAL 1 |
|
19 | #define LFR_MODE_NORMAL 1 | |
20 | #define LFR_MODE_BURST 2 |
|
20 | #define LFR_MODE_BURST 2 | |
21 | #define LFR_MODE_SBM1 3 |
|
21 | #define LFR_MODE_SBM1 3 | |
22 | #define LFR_MODE_SBM2 4 |
|
22 | #define LFR_MODE_SBM2 4 | |
23 | #define LFR_MODE_NORMAL_CWF_F3 5 |
|
23 | #define LFR_MODE_NORMAL_CWF_F3 5 | |
24 |
|
24 | |||
25 | #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0 |
|
25 | #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0 | |
26 | #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1 |
|
26 | #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1 | |
27 | #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2 |
|
27 | #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2 | |
28 | #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3 |
|
28 | #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3 | |
29 | #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4 |
|
29 | #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4 | |
30 | #define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5 |
|
30 | #define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5 | |
31 |
|
31 | |||
32 | //**************************** |
|
32 | //**************************** | |
33 | // LFR DEFAULT MODE PARAMETERS |
|
33 | // LFR DEFAULT MODE PARAMETERS | |
34 | // COMMON |
|
34 | // COMMON | |
35 | #define DEFAULT_SY_LFR_COMMON0 0x00 |
|
35 | #define DEFAULT_SY_LFR_COMMON0 0x00 | |
36 | #define DEFAULT_SY_LFR_COMMON1 0x10 // default value 0 0 0 1 0 0 0 0 |
|
36 | #define DEFAULT_SY_LFR_COMMON1 0x10 // default value 0 0 0 1 0 0 0 0 | |
37 | // NORM |
|
37 | // NORM | |
38 | #define DEFAULT_SY_LFR_N_SWF_L 2048 // nb sample |
|
38 | #define DEFAULT_SY_LFR_N_SWF_L 2048 // nb sample | |
39 | #define DEFAULT_SY_LFR_N_SWF_P 16 // sec |
|
39 | #define DEFAULT_SY_LFR_N_SWF_P 16 // sec | |
40 | #define DEFAULT_SY_LFR_N_ASM_P 16 // sec |
|
40 | #define DEFAULT_SY_LFR_N_ASM_P 16 // sec | |
41 | #define DEFAULT_SY_LFR_N_BP_P0 4 // sec |
|
41 | #define DEFAULT_SY_LFR_N_BP_P0 4 // sec | |
42 | #define DEFAULT_SY_LFR_N_BP_P1 20 // sec |
|
42 | #define DEFAULT_SY_LFR_N_BP_P1 20 // sec | |
43 | #define MIN_DELTA_SNAPSHOT 16 // sec |
|
43 | #define MIN_DELTA_SNAPSHOT 16 // sec | |
44 | // BURST |
|
44 | // BURST | |
45 | #define DEFAULT_SY_LFR_B_BP_P0 1 // sec |
|
45 | #define DEFAULT_SY_LFR_B_BP_P0 1 // sec | |
46 | #define DEFAULT_SY_LFR_B_BP_P1 5 // sec |
|
46 | #define DEFAULT_SY_LFR_B_BP_P1 5 // sec | |
47 | // SBM1 |
|
47 | // SBM1 | |
48 | #define DEFAULT_SY_LFR_S1_BP_P0 1 // sec |
|
48 | #define DEFAULT_SY_LFR_S1_BP_P0 1 // sec | |
49 | #define DEFAULT_SY_LFR_S1_BP_P1 1 // sec |
|
49 | #define DEFAULT_SY_LFR_S1_BP_P1 1 // sec | |
50 | // SBM2 |
|
50 | // SBM2 | |
51 | #define DEFAULT_SY_LFR_S2_BP_P0 1 // sec |
|
51 | #define DEFAULT_SY_LFR_S2_BP_P0 1 // sec | |
52 | #define DEFAULT_SY_LFR_S2_BP_P1 5 // sec |
|
52 | #define DEFAULT_SY_LFR_S2_BP_P1 5 // sec | |
53 | // ADDITIONAL PARAMETERS |
|
53 | // ADDITIONAL PARAMETERS | |
54 | #define TIME_BETWEEN_TWO_SWF_PACKETS 30 // nb x 10 ms => 300 ms |
|
54 | #define TIME_BETWEEN_TWO_SWF_PACKETS 30 // nb x 10 ms => 300 ms | |
55 | #define TIME_BETWEEN_TWO_CWF3_PACKETS 1000 // nb x 10 ms => 10 s |
|
55 | #define TIME_BETWEEN_TWO_CWF3_PACKETS 1000 // nb x 10 ms => 10 s | |
56 | // |
|
56 | // | |
57 | //**************************** |
|
57 | //**************************** | |
58 |
|
58 | |||
59 | //***************************** |
|
59 | //***************************** | |
60 | // APB REGISTERS BASE ADDRESSES |
|
60 | // APB REGISTERS BASE ADDRESSES | |
61 | #define REGS_ADDR_APBUART 0x80000100 |
|
61 | #define REGS_ADDR_APBUART 0x80000100 | |
62 | #define REGS_ADDR_GPTIMER 0x80000300 |
|
62 | #define REGS_ADDR_GPTIMER 0x80000300 | |
63 | #define REGS_ADDR_GRSPW 0x80000500 |
|
63 | #define REGS_ADDR_GRSPW 0x80000500 | |
64 | #define REGS_ADDR_TIME_MANAGEMENT 0x80000600 |
|
64 | #define REGS_ADDR_TIME_MANAGEMENT 0x80000600 | |
65 | #define REGS_ADDR_SPECTRAL_MATRIX 0x80000f00 |
|
65 | #define REGS_ADDR_SPECTRAL_MATRIX 0x80000f00 | |
66 |
|
66 | |||
67 | #ifdef GSA |
|
67 | #ifdef GSA | |
68 | #else |
|
68 | #else | |
69 | #define REGS_ADDR_WAVEFORM_PICKER 0x80000f20 |
|
69 | #define REGS_ADDR_WAVEFORM_PICKER 0x80000f20 | |
70 | #endif |
|
70 | #endif | |
71 |
|
71 | |||
72 | #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff |
|
72 | #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff | |
73 | #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 (0x50) |
|
73 | #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 (0x50) | |
74 |
|
74 | |||
75 | //********** |
|
75 | //********** | |
76 | // IRQ LINES |
|
76 | // IRQ LINES | |
77 | #define IRQ_SM 9 |
|
77 | #define IRQ_SM 9 | |
78 | #define IRQ_SPARC_SM 0x19 // see sparcv8.pdf p.76 for interrupt levels |
|
78 | #define IRQ_SPARC_SM 0x19 // see sparcv8.pdf p.76 for interrupt levels | |
79 | #define IRQ_WF 10 |
|
79 | #define IRQ_WF 10 | |
80 | #define IRQ_SPARC_WF 0x1a // see sparcv8.pdf p.76 for interrupt levels |
|
80 | #define IRQ_SPARC_WF 0x1a // see sparcv8.pdf p.76 for interrupt levels | |
81 | #define IRQ_TIME1 12 |
|
81 | #define IRQ_TIME1 12 | |
82 | #define IRQ_SPARC_TIME1 0x1c // see sparcv8.pdf p.76 for interrupt levels |
|
82 | #define IRQ_SPARC_TIME1 0x1c // see sparcv8.pdf p.76 for interrupt levels | |
83 | #define IRQ_TIME2 13 |
|
83 | #define IRQ_TIME2 13 | |
84 | #define IRQ_SPARC_TIME2 0x1d // see sparcv8.pdf p.76 for interrupt levels |
|
84 | #define IRQ_SPARC_TIME2 0x1d // see sparcv8.pdf p.76 for interrupt levels | |
85 | #define IRQ_WAVEFORM_PICKER 14 |
|
85 | #define IRQ_WAVEFORM_PICKER 14 | |
86 | #define IRQ_SPARC_WAVEFORM_PICKER 0x1e // see sparcv8.pdf p.76 for interrupt levels |
|
86 | #define IRQ_SPARC_WAVEFORM_PICKER 0x1e // see sparcv8.pdf p.76 for interrupt levels | |
87 | #define IRQ_SPECTRAL_MATRIX 6 |
|
87 | #define IRQ_SPECTRAL_MATRIX 6 | |
88 | #define IRQ_SPARC_SPECTRAL_MATRIX 0x16 // see sparcv8.pdf p.76 for interrupt levels |
|
88 | #define IRQ_SPARC_SPECTRAL_MATRIX 0x16 // see sparcv8.pdf p.76 for interrupt levels | |
89 |
|
89 | |||
90 | //***** |
|
90 | //***** | |
91 | // TIME |
|
91 | // TIME | |
92 | #define CLKDIV_SM_SIMULATOR (10000 - 1) // 10 ms |
|
92 | #define CLKDIV_SM_SIMULATOR (10000 - 1) // 10 ms | |
93 | #define CLKDIV_WF_SIMULATOR (10000000 - 1) // 10 000 000 * 1 us = 10 s |
|
93 | #define CLKDIV_WF_SIMULATOR (10000000 - 1) // 10 000 000 * 1 us = 10 s | |
94 | #define TIMER_SM_SIMULATOR 1 |
|
94 | #define TIMER_SM_SIMULATOR 1 | |
95 | #define TIMER_WF_SIMULATOR 2 |
|
95 | #define TIMER_WF_SIMULATOR 2 | |
96 | #define HK_PERIOD 100 // 100 * 10ms => 1sec |
|
96 | #define HK_PERIOD 100 // 100 * 10ms => 1sec | |
97 |
|
97 | |||
98 | //********** |
|
98 | //********** | |
99 | // LPP CODES |
|
99 | // LPP CODES | |
100 | #define LFR_SUCCESSFUL 0 |
|
100 | #define LFR_SUCCESSFUL 0 | |
101 | #define LFR_DEFAULT 1 |
|
101 | #define LFR_DEFAULT 1 | |
102 |
|
102 | |||
103 | //****** |
|
103 | //****** | |
104 | // RTEMS |
|
104 | // RTEMS | |
105 | #define TASKID_RECV 1 |
|
105 | #define TASKID_RECV 1 | |
106 | #define TASKID_ACTN 2 |
|
106 | #define TASKID_ACTN 2 | |
107 | #define TASKID_SPIQ 3 |
|
107 | #define TASKID_SPIQ 3 | |
108 | #define TASKID_SMIQ 4 |
|
108 | #define TASKID_SMIQ 4 | |
109 | #define TASKID_STAT 5 |
|
109 | #define TASKID_STAT 5 | |
110 | #define TASKID_AVF0 6 |
|
110 | #define TASKID_AVF0 6 | |
111 | #define TASKID_BPF0 7 |
|
111 | #define TASKID_BPF0 7 | |
112 | #define TASKID_WFRM 8 |
|
112 | #define TASKID_WFRM 8 | |
113 | #define TASKID_DUMB 9 |
|
113 | #define TASKID_DUMB 9 | |
114 | #define TASKID_HOUS 10 |
|
114 | #define TASKID_HOUS 10 | |
115 | #define TASKID_MATR 11 |
|
115 | #define TASKID_MATR 11 | |
116 | #define TASKID_CWF3 12 |
|
116 | #define TASKID_CWF3 12 | |
117 | #define TASKID_CWF2 13 |
|
117 | #define TASKID_CWF2 13 | |
118 | #define TASKID_CWF1 14 |
|
118 | #define TASKID_CWF1 14 | |
119 | #define TASKID_SEND 15 |
|
119 | #define TASKID_SEND 15 | |
120 |
|
120 | |||
121 | #define TASK_PRIORITY_SPIQ 5 |
|
121 | #define TASK_PRIORITY_SPIQ 5 | |
122 | #define TASK_PRIORITY_SMIQ 10 |
|
122 | #define TASK_PRIORITY_SMIQ 10 | |
123 | // |
|
123 | // | |
124 | #define TASK_PRIORITY_RECV 20 |
|
124 | #define TASK_PRIORITY_RECV 20 | |
125 | #define TASK_PRIORITY_ACTN 30 |
|
125 | #define TASK_PRIORITY_ACTN 30 | |
126 | // |
|
126 | // | |
127 | #define TASK_PRIORITY_HOUS 40 |
|
127 | #define TASK_PRIORITY_HOUS 40 | |
128 | #define TASK_PRIORITY_CWF1 40 |
|
128 | #define TASK_PRIORITY_CWF1 40 | |
129 | #define TASK_PRIORITY_CWF2 40 |
|
129 | #define TASK_PRIORITY_CWF2 40 | |
130 | #define TASK_PRIORITY_WFRM 40 |
|
130 | #define TASK_PRIORITY_WFRM 40 | |
131 | #define TASK_PRIORITY_CWF3 40 |
|
131 | #define TASK_PRIORITY_CWF3 40 | |
132 | // |
|
132 | // | |
133 | #define TASK_PRIORITY_SEND 40 |
|
133 | #define TASK_PRIORITY_SEND 40 | |
134 | // |
|
134 | // | |
135 | #define TASK_PRIORITY_AVF0 60 |
|
135 | #define TASK_PRIORITY_AVF0 60 | |
136 | #define TASK_PRIORITY_BPF0 60 |
|
136 | #define TASK_PRIORITY_BPF0 60 | |
137 | #define TASK_PRIORITY_MATR 100 |
|
137 | #define TASK_PRIORITY_MATR 100 | |
138 | #define TASK_PRIORITY_STAT 200 |
|
138 | #define TASK_PRIORITY_STAT 200 | |
139 | #define TASK_PRIORITY_DUMB 200 |
|
139 | #define TASK_PRIORITY_DUMB 200 | |
140 |
|
140 | |||
141 | #define ACTION_MSG_QUEUE_COUNT 10 |
|
141 | #define ACTION_MSG_QUEUE_COUNT 10 | |
142 | #define ACTION_MSG_PKTS_COUNT 50 |
|
142 | #define ACTION_MSG_PKTS_COUNT 50 | |
143 | #define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_PARAMETER_DUMP + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES) |
|
143 | #define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_PARAMETER_DUMP + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES) | |
144 | #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options |
|
144 | #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options | |
145 |
|
145 | |||
146 | #define QUEUE_RECV 0 |
|
146 | #define QUEUE_RECV 0 | |
147 | #define QUEUE_SEND 1 |
|
147 | #define QUEUE_SEND 1 | |
148 |
|
148 | |||
149 | //******* |
|
149 | //******* | |
150 | // MACROS |
|
150 | // MACROS | |
151 | #ifdef PRINT_MESSAGES_ON_CONSOLE |
|
151 | #ifdef PRINT_MESSAGES_ON_CONSOLE | |
152 | #define PRINTF(x) printf(x); |
|
152 | #define PRINTF(x) printf(x); | |
153 | #define PRINTF1(x,y) printf(x,y); |
|
153 | #define PRINTF1(x,y) printf(x,y); | |
154 | #define PRINTF2(x,y,z) printf(x,y,z); |
|
154 | #define PRINTF2(x,y,z) printf(x,y,z); | |
155 | #else |
|
155 | #else | |
156 | #define PRINTF(x) ; |
|
156 | #define PRINTF(x) ; | |
157 | #define PRINTF1(x,y) ; |
|
157 | #define PRINTF1(x,y) ; | |
158 | #define PRINTF2(x,y,z) ; |
|
158 | #define PRINTF2(x,y,z) ; | |
159 | #endif |
|
159 | #endif | |
160 |
|
160 | |||
161 | #ifdef BOOT_MESSAGES |
|
161 | #ifdef BOOT_MESSAGES | |
162 | #define BOOT_PRINTF(x) printf(x); |
|
162 | #define BOOT_PRINTF(x) printf(x); | |
163 | #define BOOT_PRINTF1(x,y) printf(x,y); |
|
163 | #define BOOT_PRINTF1(x,y) printf(x,y); | |
164 | #define BOOT_PRINTF2(x,y,z) printf(x,y,z); |
|
164 | #define BOOT_PRINTF2(x,y,z) printf(x,y,z); | |
165 | #else |
|
165 | #else | |
166 | #define BOOT_PRINTF(x) ; |
|
166 | #define BOOT_PRINTF(x) ; | |
167 | #define BOOT_PRINTF1(x,y) ; |
|
167 | #define BOOT_PRINTF1(x,y) ; | |
168 | #define BOOT_PRINTF2(x,y,z) ; |
|
168 | #define BOOT_PRINTF2(x,y,z) ; | |
169 | #endif |
|
169 | #endif | |
170 |
|
170 | |||
171 | #ifdef DEBUG_MESSAGES |
|
171 | #ifdef DEBUG_MESSAGES | |
172 | #define DEBUG_PRINTF(x) printf(x); |
|
172 | #define DEBUG_PRINTF(x) printf(x); | |
173 | #define DEBUG_PRINTF1(x,y) printf(x,y); |
|
173 | #define DEBUG_PRINTF1(x,y) printf(x,y); | |
174 | #define DEBUG_PRINTF2(x,y,z) printf(x,y,z); |
|
174 | #define DEBUG_PRINTF2(x,y,z) printf(x,y,z); | |
175 | #else |
|
175 | #else | |
176 | #define DEBUG_PRINTF(x) ; |
|
176 | #define DEBUG_PRINTF(x) ; | |
177 | #define DEBUG_PRINTF1(x,y) ; |
|
177 | #define DEBUG_PRINTF1(x,y) ; | |
178 | #define DEBUG_PRINTF2(x,y,z) ; |
|
178 | #define DEBUG_PRINTF2(x,y,z) ; | |
179 | #endif |
|
179 | #endif | |
180 |
|
180 | |||
181 | #define CPU_USAGE_REPORT_PERIOD 6 // * 10 s = period |
|
181 | #define CPU_USAGE_REPORT_PERIOD 6 // * 10 s = period | |
182 |
|
182 | |||
183 | #define NB_SAMPLES_PER_SNAPSHOT 2048 |
|
183 | #define NB_SAMPLES_PER_SNAPSHOT 2048 | |
184 | #define TIME_OFFSET 2 |
|
184 | #define TIME_OFFSET 2 | |
185 | #define WAVEFORM_EXTENDED_HEADER_OFFSET 22 |
|
185 | #define WAVEFORM_EXTENDED_HEADER_OFFSET 22 | |
186 | #define NB_BYTES_SWF_BLK (2 * 6) |
|
186 | #define NB_BYTES_SWF_BLK (2 * 6) | |
187 | #define NB_WORDS_SWF_BLK 3 |
|
187 | #define NB_WORDS_SWF_BLK 3 | |
188 | #define NB_BYTES_CWF3_LIGHT_BLK 6 |
|
188 | #define NB_BYTES_CWF3_LIGHT_BLK 6 | |
189 | #define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8 |
|
189 | #define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8 | |
190 |
|
190 | |||
191 | //****************** |
|
191 | //****************** | |
192 | // SEQUENCE COUNTERS |
|
192 | // SEQUENCE COUNTERS | |
193 | #define SEQ_CNT_NB_PID 2 |
|
193 | #define SEQ_CNT_NB_PID 2 | |
194 | #define SEQ_CNT_NB_CAT 4 |
|
194 | #define SEQ_CNT_NB_CAT 4 | |
195 | #define SEQ_CNT_NB_DEST_ID 11 |
|
195 | #define SEQ_CNT_NB_DEST_ID 11 | |
196 | // pid |
|
196 | // pid | |
197 | #define SEQ_CNT_PID_76 0 |
|
197 | #define SEQ_CNT_PID_76 0 | |
198 | #define SEQ_CNT_PID_79 1 |
|
198 | #define SEQ_CNT_PID_79 1 | |
199 | //cat |
|
199 | //cat | |
200 | #define SEQ_CNT_CAT_1 0 |
|
200 | #define SEQ_CNT_CAT_1 0 | |
201 | #define SEQ_CNT_CAT_4 1 |
|
201 | #define SEQ_CNT_CAT_4 1 | |
202 | #define SEQ_CNT_CAT_9 2 |
|
202 | #define SEQ_CNT_CAT_9 2 | |
203 | #define SEQ_CNT_CAT_12 3 |
|
203 | #define SEQ_CNT_CAT_12 3 | |
204 | // destination id |
|
204 | // destination id | |
205 | #define SEQ_CNT_DST_ID_GROUND 0 |
|
205 | #define SEQ_CNT_DST_ID_GROUND 0 | |
206 | #define SEQ_CNT_DST_ID_MISSION_TIMELINE 1 |
|
206 | #define SEQ_CNT_DST_ID_MISSION_TIMELINE 1 | |
207 | #define SEQ_CNT_DST_ID_TC_SEQUENCES 2 |
|
207 | #define SEQ_CNT_DST_ID_TC_SEQUENCES 2 | |
208 | #define SEQ_CNT_DST_ID_RECOVERY_ACTION_CMD 3 |
|
208 | #define SEQ_CNT_DST_ID_RECOVERY_ACTION_CMD 3 | |
209 | #define SEQ_CNT_DST_ID_BACKUP_MISSION_TIMELINE 4 |
|
209 | #define SEQ_CNT_DST_ID_BACKUP_MISSION_TIMELINE 4 | |
210 | #define SEQ_CNT_DST_ID_DIRECT_CMD 5 |
|
210 | #define SEQ_CNT_DST_ID_DIRECT_CMD 5 | |
211 | #define SEQ_CNT_DST_ID_SPARE_GRD_SRC1 6 |
|
211 | #define SEQ_CNT_DST_ID_SPARE_GRD_SRC1 6 | |
212 | #define SEQ_CNT_DST_ID_SPARE_GRD_SRC2 7 |
|
212 | #define SEQ_CNT_DST_ID_SPARE_GRD_SRC2 7 | |
213 | #define SEQ_CNT_DST_ID_OBCP 8 |
|
213 | #define SEQ_CNT_DST_ID_OBCP 8 | |
214 | #define SEQ_CNT_DST_ID_SYSTEM_CONTROL 9 |
|
214 | #define SEQ_CNT_DST_ID_SYSTEM_CONTROL 9 | |
215 | #define SEQ_CNT_DST_ID_AOCS 10 |
|
215 | #define SEQ_CNT_DST_ID_AOCS 10 | |
216 |
|
216 | |||
217 | struct param_local_str{ |
|
217 | struct param_local_str{ | |
218 | unsigned int local_sbm1_nb_cwf_sent; |
|
218 | unsigned int local_sbm1_nb_cwf_sent; | |
219 | unsigned int local_sbm1_nb_cwf_max; |
|
219 | unsigned int local_sbm1_nb_cwf_max; | |
220 | unsigned int local_sbm2_nb_cwf_sent; |
|
220 | unsigned int local_sbm2_nb_cwf_sent; | |
221 | unsigned int local_sbm2_nb_cwf_max; |
|
221 | unsigned int local_sbm2_nb_cwf_max; | |
222 | unsigned int local_nb_interrupt_f0_MAX; |
|
222 | unsigned int local_nb_interrupt_f0_MAX; | |
223 | }; |
|
223 | }; | |
224 |
|
224 | |||
225 |
#endif // FSW_ |
|
225 | #endif // FSW_PARAMS_H_INCLUDED |
@@ -1,55 +1,65 | |||||
1 |
#ifndef FSW_ |
|
1 | #ifndef FSW_PROCESSING_H_INCLUDED | |
2 |
#define FSW_ |
|
2 | #define FSW_PROCESSING_H_INCLUDED | |
3 |
|
3 | |||
4 |
#include |
|
4 | #include <rtems.h> | |
|
5 | #include <grspw.h> | |||
|
6 | #include <math.h> | |||
|
7 | #include <stdlib.h> // abs() is in the stdlib | |||
|
8 | #include <stdio.h> // printf() | |||
|
9 | ||||
|
10 | #include "fsw_params.h" | |||
|
11 | ||||
5 |
|
12 | |||
6 | extern volatile int spec_mat_f0_0[ ]; |
|
13 | extern volatile int spec_mat_f0_0[ ]; | |
7 | extern volatile int spec_mat_f0_1[ ]; |
|
14 | extern volatile int spec_mat_f0_1[ ]; | |
8 | extern volatile int spec_mat_f0_a[ ]; |
|
15 | extern volatile int spec_mat_f0_a[ ]; | |
9 | extern volatile int spec_mat_f0_b[ ]; |
|
16 | extern volatile int spec_mat_f0_b[ ]; | |
10 | extern volatile int spec_mat_f0_c[ ]; |
|
17 | extern volatile int spec_mat_f0_c[ ]; | |
11 | extern volatile int spec_mat_f0_d[ ]; |
|
18 | extern volatile int spec_mat_f0_d[ ]; | |
12 | extern volatile int spec_mat_f0_e[ ]; |
|
19 | extern volatile int spec_mat_f0_e[ ]; | |
13 | extern volatile int spec_mat_f0_f[ ]; |
|
20 | extern volatile int spec_mat_f0_f[ ]; | |
14 | extern volatile int spec_mat_f0_g[ ]; |
|
21 | extern volatile int spec_mat_f0_g[ ]; | |
15 | extern volatile int spec_mat_f0_h[ ]; |
|
22 | extern volatile int spec_mat_f0_h[ ]; | |
16 |
|
23 | |||
17 | extern volatile int spec_mat_f1[ ]; |
|
24 | extern volatile int spec_mat_f1[ ]; | |
18 | extern volatile int spec_mat_f2[ ]; |
|
25 | extern volatile int spec_mat_f2[ ]; | |
19 |
|
26 | |||
20 | extern volatile int spec_mat_f1_bis[ ]; |
|
27 | extern volatile int spec_mat_f1_bis[ ]; | |
21 | extern volatile int spec_mat_f2_bis[ ]; |
|
28 | extern volatile int spec_mat_f2_bis[ ]; | |
22 | extern volatile int spec_mat_f0_0_bis[ ]; |
|
29 | extern volatile int spec_mat_f0_0_bis[ ]; | |
23 | extern volatile int spec_mat_f0_1_bis[ ]; |
|
30 | extern volatile int spec_mat_f0_1_bis[ ]; | |
24 |
|
31 | |||
25 | // parameters |
|
32 | // parameters | |
26 | extern struct param_local_str param_local; |
|
33 | extern struct param_local_str param_local; | |
27 |
|
34 | |||
28 | // registers |
|
35 | // registers | |
29 | extern time_management_regs_t *time_management_regs; |
|
36 | extern time_management_regs_t *time_management_regs; | |
30 | extern spectral_matrix_regs_t *spectral_matrix_regs; |
|
37 | extern spectral_matrix_regs_t *spectral_matrix_regs; | |
31 |
|
38 | |||
|
39 | extern rtems_name misc_name[5]; | |||
|
40 | extern rtems_id Task_id[20]; /* array of task ids */ | |||
|
41 | ||||
32 | // ISR |
|
42 | // ISR | |
33 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ); |
|
43 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ); | |
34 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ); |
|
44 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ); | |
35 |
|
45 | |||
36 | // RTEMS TASKS |
|
46 | // RTEMS TASKS | |
37 | rtems_task spw_bppr_task(rtems_task_argument argument); |
|
47 | rtems_task spw_bppr_task(rtems_task_argument argument); | |
38 | rtems_task avf0_task(rtems_task_argument argument); |
|
48 | rtems_task avf0_task(rtems_task_argument argument); | |
39 | rtems_task bpf0_task(rtems_task_argument argument); |
|
49 | rtems_task bpf0_task(rtems_task_argument argument); | |
40 | rtems_task smiq_task(rtems_task_argument argument); // added to test the spectral matrix simulator |
|
50 | rtems_task smiq_task(rtems_task_argument argument); // added to test the spectral matrix simulator | |
41 | rtems_task matr_task(rtems_task_argument argument); |
|
51 | rtems_task matr_task(rtems_task_argument argument); | |
42 |
|
52 | |||
43 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat); |
|
53 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat); | |
44 | void matrix_reset(volatile float *averaged_spec_mat); |
|
54 | void matrix_reset(volatile float *averaged_spec_mat); | |
45 | void BP1_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1); |
|
55 | void BP1_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1); | |
46 | void BP2_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat); |
|
56 | void BP2_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat); | |
47 | // |
|
57 | // | |
48 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header); |
|
58 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header); | |
49 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, |
|
59 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, | |
50 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id); |
|
60 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id); | |
51 | void convert_averaged_spectral_matrix(volatile float *input_matrix, char *output_matrix); |
|
61 | void convert_averaged_spectral_matrix(volatile float *input_matrix, char *output_matrix); | |
52 | void fill_averaged_spectral_matrix( void ); |
|
62 | void fill_averaged_spectral_matrix( void ); | |
53 | void reset_spectral_matrix_regs(); |
|
63 | void reset_spectral_matrix_regs(); | |
54 |
|
64 | |||
55 |
#endif // FSW_ |
|
65 | #endif // FSW_PROCESSING_H_INCLUDED |
@@ -1,22 +1,36 | |||||
1 | #ifndef FSW_SPACEWIRE_H_INCLUDED |
|
1 | #ifndef FSW_SPACEWIRE_H_INCLUDED | |
2 | #define FSW_SPACEWIRE_H_INCLUDED |
|
2 | #define FSW_SPACEWIRE_H_INCLUDED | |
3 |
|
3 | |||
4 |
#include |
|
4 | #include <rtems.h> | |
|
5 | #include <grspw.h> | |||
|
6 | ||||
|
7 | #include <fcntl.h> // for O_RDWR | |||
|
8 | #include <unistd.h> // for the read call | |||
|
9 | #include <sys/ioctl.h> // for the ioctl call | |||
|
10 | #include <errno.h> | |||
|
11 | ||||
|
12 | #include "fsw_params.h" | |||
|
13 | #include "tc_handler.h" | |||
5 |
|
14 | |||
6 | extern spw_stats spacewire_stats; |
|
15 | extern spw_stats spacewire_stats; | |
7 | extern spw_stats spacewire_stats_backup; |
|
16 | extern spw_stats spacewire_stats_backup; | |
|
17 | extern Packet_TM_LFR_HK_t housekeeping_packet; | |||
|
18 | extern rtems_id Task_id[20]; /* array of task ids */ | |||
8 |
|
19 | |||
9 | // RTEMS TASK |
|
20 | // RTEMS TASK | |
10 | rtems_task spiq_task(rtems_task_argument argument); |
|
21 | rtems_task spiq_task( rtems_task_argument argument ); | |
|
22 | rtems_task recv_task( rtems_task_argument unused ); | |||
|
23 | rtems_task send_task( rtems_task_argument argument ); | |||
11 |
|
24 | |||
12 | int spacewire_configure_link( void ); |
|
25 | int spacewire_configure_link( void ); | |
13 | int spacewire_wait_for_link(void); |
|
26 | int spacewire_wait_for_link( void ); | |
14 | void spacewire_set_NP(unsigned char val, unsigned int regAddr); // No Port force |
|
27 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ); // No Port force | |
15 | void spacewire_set_RE(unsigned char val, unsigned int regAddr); // RMAP Enable |
|
28 | void spacewire_set_RE( unsigned char val, unsigned int regAddr ); // RMAP Enable | |
16 | void spacewire_compute_stats_offsets(void); |
|
29 | void spacewire_compute_stats_offsets( void ); | |
|
30 | void spacewire_update_statistics( void ); | |||
17 |
|
31 | |||
18 | void timecode_irq_handler(void *pDev, void *regs, int minor, unsigned int tc); |
|
32 | void timecode_irq_handler( void *pDev, void *regs, int minor, unsigned int tc ); | |
19 |
|
33 | |||
20 | void (*grspw_timecode_callback) (void *pDev, void *regs, int minor, unsigned int tc); |
|
34 | void (*grspw_timecode_callback) ( void *pDev, void *regs, int minor, unsigned int tc ); | |
21 |
|
35 | |||
22 | #endif // FSW_SPACEWIRE_H_INCLUDED |
|
36 | #endif // FSW_SPACEWIRE_H_INCLUDED |
@@ -1,74 +1,74 | |||||
1 | #ifndef GRLIBREGS_H_INCLUDED |
|
1 | #ifndef GRLIB_REGS_H_INCLUDED | |
2 | #define GRLIBREGS_H_INCLUDED |
|
2 | #define GRLIB_REGS_H_INCLUDED | |
3 |
|
3 | |||
4 | #define NB_GPTIMER 3 |
|
4 | #define NB_GPTIMER 3 | |
5 |
|
5 | |||
6 | struct apbuart_regs_str{ |
|
6 | struct apbuart_regs_str{ | |
7 | volatile unsigned int data; |
|
7 | volatile unsigned int data; | |
8 | volatile unsigned int status; |
|
8 | volatile unsigned int status; | |
9 | volatile unsigned int ctrl; |
|
9 | volatile unsigned int ctrl; | |
10 | volatile unsigned int scaler; |
|
10 | volatile unsigned int scaler; | |
11 | volatile unsigned int fifoDebug; |
|
11 | volatile unsigned int fifoDebug; | |
12 | }; |
|
12 | }; | |
13 |
|
13 | |||
14 | struct ahbuart_regs_str{ |
|
14 | struct ahbuart_regs_str{ | |
15 | volatile unsigned int unused; |
|
15 | volatile unsigned int unused; | |
16 | volatile unsigned int status; |
|
16 | volatile unsigned int status; | |
17 | volatile unsigned int ctrl; |
|
17 | volatile unsigned int ctrl; | |
18 | volatile unsigned int scaler; |
|
18 | volatile unsigned int scaler; | |
19 | }; |
|
19 | }; | |
20 |
|
20 | |||
21 | struct timer_regs_str |
|
21 | struct timer_regs_str | |
22 | { |
|
22 | { | |
23 | volatile unsigned int counter; |
|
23 | volatile unsigned int counter; | |
24 | volatile unsigned int reload; |
|
24 | volatile unsigned int reload; | |
25 | volatile unsigned int ctrl; |
|
25 | volatile unsigned int ctrl; | |
26 | volatile unsigned int unused; |
|
26 | volatile unsigned int unused; | |
27 | }; |
|
27 | }; | |
28 | typedef struct timer_regs_str timer_regs_t; |
|
28 | typedef struct timer_regs_str timer_regs_t; | |
29 |
|
29 | |||
30 | struct gptimer_regs_str |
|
30 | struct gptimer_regs_str | |
31 | { |
|
31 | { | |
32 | volatile unsigned int scaler_value; |
|
32 | volatile unsigned int scaler_value; | |
33 | volatile unsigned int scaler_reload; |
|
33 | volatile unsigned int scaler_reload; | |
34 | volatile unsigned int conf; |
|
34 | volatile unsigned int conf; | |
35 | volatile unsigned int unused0; |
|
35 | volatile unsigned int unused0; | |
36 | timer_regs_t timer[NB_GPTIMER]; |
|
36 | timer_regs_t timer[NB_GPTIMER]; | |
37 | }; |
|
37 | }; | |
38 | typedef struct gptimer_regs_str gptimer_regs_t; |
|
38 | typedef struct gptimer_regs_str gptimer_regs_t; | |
39 |
|
39 | |||
40 | struct time_management_regs_str{ |
|
40 | struct time_management_regs_str{ | |
41 | volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time |
|
41 | volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time | |
42 | volatile int coarse_time_load; |
|
42 | volatile int coarse_time_load; | |
43 | volatile int coarse_time; |
|
43 | volatile int coarse_time; | |
44 | volatile int fine_time; |
|
44 | volatile int fine_time; | |
45 | }; |
|
45 | }; | |
46 | typedef struct time_management_regs_str time_management_regs_t; |
|
46 | typedef struct time_management_regs_str time_management_regs_t; | |
47 |
|
47 | |||
48 | struct waveform_picker_regs_str{ |
|
48 | struct waveform_picker_regs_str{ | |
49 | volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW |
|
49 | volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW | |
50 | volatile int burst_enable; // 0x04 01 *** burst f2, f1, f0 enable f3, f2, f1, f0 |
|
50 | volatile int burst_enable; // 0x04 01 *** burst f2, f1, f0 enable f3, f2, f1, f0 | |
51 | volatile int addr_data_f0; // 0x08 10 *** |
|
51 | volatile int addr_data_f0; // 0x08 10 *** | |
52 | volatile int addr_data_f1; // 0x0c 11 *** |
|
52 | volatile int addr_data_f1; // 0x0c 11 *** | |
53 | volatile int addr_data_f2; // 0x10 100 *** |
|
53 | volatile int addr_data_f2; // 0x10 100 *** | |
54 | volatile int addr_data_f3; // 0x14 101 *** |
|
54 | volatile int addr_data_f3; // 0x14 101 *** | |
55 | volatile int status; // 0x18 110 *** |
|
55 | volatile int status; // 0x18 110 *** | |
56 | volatile int delta_snapshot; // 0x1c 111 *** |
|
56 | volatile int delta_snapshot; // 0x1c 111 *** | |
57 | volatile int delta_f2_f1; // 0x20 0000 *** |
|
57 | volatile int delta_f2_f1; // 0x20 0000 *** | |
58 | volatile int delta_f2_f0; // 0x24 0001 *** |
|
58 | volatile int delta_f2_f0; // 0x24 0001 *** | |
59 | volatile int nb_burst_available;// 0x28 0010 *** |
|
59 | volatile int nb_burst_available;// 0x28 0010 *** | |
60 | volatile int nb_snapshot_param; // 0x2c 0011 *** |
|
60 | volatile int nb_snapshot_param; // 0x2c 0011 *** | |
61 | }; |
|
61 | }; | |
62 | typedef struct waveform_picker_regs_str waveform_picker_regs_t; |
|
62 | typedef struct waveform_picker_regs_str waveform_picker_regs_t; | |
63 |
|
63 | |||
64 | struct spectral_matrix_regs_str{ |
|
64 | struct spectral_matrix_regs_str{ | |
65 | volatile int config; |
|
65 | volatile int config; | |
66 | volatile int status; |
|
66 | volatile int status; | |
67 | volatile int matrixF0_Address0; |
|
67 | volatile int matrixF0_Address0; | |
68 | volatile int matrixFO_Address1; |
|
68 | volatile int matrixFO_Address1; | |
69 | volatile int matrixF1_Address; |
|
69 | volatile int matrixF1_Address; | |
70 | volatile int matrixF2_Address; |
|
70 | volatile int matrixF2_Address; | |
71 | }; |
|
71 | }; | |
72 | typedef struct spectral_matrix_regs_str spectral_matrix_regs_t; |
|
72 | typedef struct spectral_matrix_regs_str spectral_matrix_regs_t; | |
73 |
|
73 | |||
74 | #endif // GRLIBREGS_H_INCLUDED |
|
74 | #endif // GRLIB_REGS_H_INCLUDED |
@@ -1,71 +1,63 | |||||
1 | #ifndef TC_HANDLER_H_INCLUDED |
|
1 | #ifndef TC_HANDLER_H_INCLUDED | |
2 | #define TC_HANDLER_H_INCLUDED |
|
2 | #define TC_HANDLER_H_INCLUDED | |
3 |
|
3 | |||
4 |
#include |
|
4 | #include <rtems.h> | |
|
5 | #include <leon.h> | |||
|
6 | ||||
5 | #include "tc_load_dump_parameters.h" |
|
7 | #include "tc_load_dump_parameters.h" | |
|
8 | #include "tc_acceptance.h" | |||
6 | #include "tm_lfr_tc_exe.h" |
|
9 | #include "tm_lfr_tc_exe.h" | |
|
10 | #include "wf_handler.h" | |||
7 |
|
11 | |||
8 | // MODE PARAMETERS |
|
12 | // MODE PARAMETERS | |
9 | extern struct param_sbm1_str param_sbm1; |
|
13 | extern struct param_sbm1_str param_sbm1; | |
10 | extern struct param_sbm2_str param_sbm2; |
|
14 | extern struct param_sbm2_str param_sbm2; | |
11 | extern time_management_regs_t *time_management_regs; |
|
15 | extern time_management_regs_t *time_management_regs; | |
12 | extern waveform_picker_regs_t *waveform_picker_regs; |
|
16 | extern waveform_picker_regs_t *waveform_picker_regs; | |
13 | extern gptimer_regs_t *gptimer_regs; |
|
17 | extern gptimer_regs_t *gptimer_regs; | |
|
18 | extern rtems_name misc_name[5]; | |||
|
19 | extern rtems_id Task_id[20]; /* array of task ids */ | |||
|
20 | extern unsigned char lfrCurrentMode; | |||
|
21 | extern unsigned int maxCount; | |||
|
22 | ||||
14 |
|
23 | |||
15 | //**** |
|
24 | //**** | |
16 | // ISR |
|
25 | // ISR | |
17 | rtems_isr commutation_isr1( rtems_vector_number vector ); |
|
26 | rtems_isr commutation_isr1( rtems_vector_number vector ); | |
18 | rtems_isr commutation_isr2( rtems_vector_number vector ); |
|
27 | rtems_isr commutation_isr2( rtems_vector_number vector ); | |
19 |
|
28 | |||
20 | //********************** |
|
|||
21 | // GENERAL USE FUNCTIONS |
|
|||
22 | unsigned int Crc_opt( unsigned char D, unsigned int Chk); |
|
|||
23 | void initLookUpTableForCRC( void ); |
|
|||
24 | void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData); |
|
|||
25 | void updateLFRCurrentMode(); |
|
|||
26 |
|
||||
27 | //********************* |
|
|||
28 | // ACCEPTANCE FUNCTIONS |
|
|||
29 | int tc_acceptance(ccsdsTelecommandPacket_t *TC, unsigned int TC_LEN_RCV, rtems_id queue_recv_id, rtems_id queue_send_id); |
|
|||
30 | int tc_parser(ccsdsTelecommandPacket_t * TCPacket, unsigned int TC_LEN_RCV); |
|
|||
31 | int tc_check_type( unsigned char packetType ); |
|
|||
32 | int tc_check_subtype( unsigned char packetType ); |
|
|||
33 | int tc_check_length( unsigned char packetType, unsigned int length ); |
|
|||
34 | int tc_check_crc( ccsdsTelecommandPacket_t * TCPacket, unsigned int length ); |
|
|||
35 |
|
||||
36 | //*********** |
|
29 | //*********** | |
37 | // RTEMS TASK |
|
30 | // RTEMS TASK | |
38 | rtems_task recv_task( rtems_task_argument unused ); |
|
|||
39 | rtems_task actn_task( rtems_task_argument unused ); |
|
31 | rtems_task actn_task( rtems_task_argument unused ); | |
40 | rtems_task dumb_task( rtems_task_argument unused ); |
|
|||
41 |
|
32 | |||
42 | //*********** |
|
33 | //*********** | |
43 | // TC ACTIONS |
|
34 | // TC ACTIONS | |
44 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
35 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
45 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
36 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
46 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
37 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
47 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
38 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
48 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
39 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
49 | int action_update_time(ccsdsTelecommandPacket_t *TC); |
|
40 | int action_update_time(ccsdsTelecommandPacket_t *TC); | |
50 |
|
41 | |||
51 | // mode transition |
|
42 | // mode transition | |
52 | int transition_validation(unsigned char requestedMode); |
|
43 | int transition_validation(unsigned char requestedMode); | |
53 | int stop_current_mode(); |
|
44 | int stop_current_mode(); | |
54 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC); |
|
45 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC); | |
55 | int enter_standby_mode(); |
|
46 | int enter_standby_mode(); | |
56 | int enter_normal_mode(); |
|
47 | int enter_normal_mode(); | |
57 | int enter_burst_mode(); |
|
48 | int enter_burst_mode(); | |
58 | int enter_sbm1_mode(); |
|
49 | int enter_sbm1_mode(); | |
59 | int enter_sbm2_mode(); |
|
50 | int enter_sbm2_mode(); | |
60 | int restart_science_tasks(); |
|
51 | int restart_science_tasks(); | |
61 | int suspend_science_tasks(); |
|
52 | int suspend_science_tasks(); | |
62 |
|
53 | |||
63 | // other functions |
|
54 | // other functions | |
|
55 | void updateLFRCurrentMode(); | |||
64 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC); |
|
56 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC); | |
65 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC); |
|
57 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC); | |
66 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id); |
|
58 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id); | |
67 |
|
59 | |||
68 | #endif // TC_HANDLER_H_INCLUDED |
|
60 | #endif // TC_HANDLER_H_INCLUDED | |
69 |
|
61 | |||
70 |
|
62 | |||
71 |
|
63 |
@@ -1,19 +1,29 | |||||
1 | #ifndef TC_LOAD_DUMP_PARAMETERS_H |
|
1 | #ifndef TC_LOAD_DUMP_PARAMETERS_H | |
2 | #define TC_LOAD_DUMP_PARAMETERS_H |
|
2 | #define TC_LOAD_DUMP_PARAMETERS_H | |
3 |
|
3 | |||
4 |
#include |
|
4 | #include <rtems.h> | |
|
5 | #include <stdio.h> | |||
|
6 | ||||
|
7 | #include "fsw_params.h" | |||
|
8 | #include "wf_handler.h" | |||
|
9 | #include "tm_lfr_tc_exe.h" | |||
|
10 | ||||
|
11 | extern int fdSPW; | |||
|
12 | extern unsigned char lfrCurrentMode; | |||
|
13 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | |||
|
14 | extern Packet_TM_LFR_HK_t housekeeping_packet; | |||
5 |
|
15 | |||
6 | int action_load_common_par( ccsdsTelecommandPacket_t *TC ); |
|
16 | int action_load_common_par( ccsdsTelecommandPacket_t *TC ); | |
7 | int action_load_normal_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
17 | int action_load_normal_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
8 | int action_load_burst_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
18 | int action_load_burst_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
9 | int action_load_sbm1_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
19 | int action_load_sbm1_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
10 | int action_load_sbm2_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
20 | int action_load_sbm2_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
11 | int action_dump_par(rtems_id queue_id ); |
|
21 | int action_dump_par(rtems_id queue_id ); | |
12 |
|
22 | |||
13 | int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
23 | int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
14 | int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
24 | int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
15 | int set_sy_lfr_n_asm_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
25 | int set_sy_lfr_n_asm_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
16 | int set_sy_lfr_n_bp_p0( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
26 | int set_sy_lfr_n_bp_p0( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
17 | int set_sy_lfr_n_bp_p1( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
27 | int set_sy_lfr_n_bp_p1( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
18 |
|
28 | |||
19 | #endif // TC_LOAD_DUMP_PARAMETERS_H |
|
29 | #endif // TC_LOAD_DUMP_PARAMETERS_H |
@@ -1,65 +1,78 | |||||
1 | #ifndef WF_HANDLER_H_INCLUDED |
|
1 | #ifndef WF_HANDLER_H_INCLUDED | |
2 | #define WF_HANDLER_H_INCLUDED |
|
2 | #define WF_HANDLER_H_INCLUDED | |
3 |
|
3 | |||
4 |
#include |
|
4 | #include <rtems.h> | |
|
5 | #include <grspw.h> | |||
|
6 | #include <stdio.h> | |||
|
7 | #include <math.h> | |||
5 |
|
8 | |||
6 |
#include |
|
9 | #include "fsw_params.h" | |
7 |
|
10 | |||
8 | #define pi 3.1415 |
|
11 | #define pi 3.1415 | |
9 |
|
12 | |||
10 | extern int fdSPW; |
|
13 | extern int fdSPW; | |
11 | extern volatile int wf_snap_f0[ ]; |
|
14 | extern volatile int wf_snap_f0[ ]; | |
12 | // |
|
15 | // | |
13 | extern volatile int wf_snap_f1[ ]; |
|
16 | extern volatile int wf_snap_f1[ ]; | |
14 | extern volatile int wf_snap_f1_bis[ ]; |
|
17 | extern volatile int wf_snap_f1_bis[ ]; | |
15 | extern volatile int wf_snap_f1_norm[ ]; |
|
18 | extern volatile int wf_snap_f1_norm[ ]; | |
16 | // |
|
19 | // | |
17 | extern volatile int wf_snap_f2[ ]; |
|
20 | extern volatile int wf_snap_f2[ ]; | |
18 | extern volatile int wf_snap_f2_bis[ ]; |
|
21 | extern volatile int wf_snap_f2_bis[ ]; | |
19 | extern volatile int wf_snap_f2_norm[ ]; |
|
22 | extern volatile int wf_snap_f2_norm[ ]; | |
20 | // |
|
23 | // | |
21 | extern volatile int wf_cont_f3[ ]; |
|
24 | extern volatile int wf_cont_f3[ ]; | |
22 | extern volatile int wf_cont_f3_bis[ ]; |
|
25 | extern volatile int wf_cont_f3_bis[ ]; | |
23 | extern char wf_cont_f3_light[ ]; |
|
26 | extern char wf_cont_f3_light[ ]; | |
24 | extern waveform_picker_regs_t *waveform_picker_regs; |
|
27 | extern waveform_picker_regs_t *waveform_picker_regs; | |
|
28 | extern time_management_regs_t *time_management_regs; | |||
|
29 | extern Packet_TM_LFR_HK_t housekeeping_packet; | |||
|
30 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | |||
|
31 | extern struct param_local_str param_local; | |||
|
32 | ||||
|
33 | extern rtems_name misc_name[5]; | |||
|
34 | extern rtems_id Task_id[20]; /* array of task ids */ | |||
|
35 | extern unsigned char lfrCurrentMode; | |||
25 |
|
36 | |||
26 | rtems_isr waveforms_isr( rtems_vector_number vector ); |
|
37 | rtems_isr waveforms_isr( rtems_vector_number vector ); | |
27 | rtems_isr waveforms_simulator_isr( rtems_vector_number vector ); |
|
38 | rtems_isr waveforms_simulator_isr( rtems_vector_number vector ); | |
28 | rtems_task wfrm_task( rtems_task_argument argument ); |
|
39 | rtems_task wfrm_task( rtems_task_argument argument ); | |
29 | rtems_task cwf3_task( rtems_task_argument argument ); |
|
40 | rtems_task cwf3_task( rtems_task_argument argument ); | |
30 | rtems_task cwf2_task( rtems_task_argument argument ); |
|
41 | rtems_task cwf2_task( rtems_task_argument argument ); | |
31 | rtems_task cwf1_task( rtems_task_argument argument ); |
|
42 | rtems_task cwf1_task( rtems_task_argument argument ); | |
32 |
|
43 | |||
33 | //****************** |
|
44 | //****************** | |
34 | // general functions |
|
45 | // general functions | |
35 | void init_waveforms( void ); |
|
46 | void init_waveforms( void ); | |
36 | // |
|
47 | // | |
37 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF ); |
|
48 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF ); | |
38 | int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); |
|
49 | int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); | |
39 | int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); |
|
50 | int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ); | |
40 | // |
|
51 | // | |
41 | void reset_waveforms( void ); |
|
52 | void reset_waveforms( void ); | |
42 |
|
53 | // | ||
43 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ); |
|
54 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ); | |
44 | int send_waveform_CWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); |
|
55 | int send_waveform_CWF( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | |
45 | int send_waveform_CWF3( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); |
|
56 | int send_waveform_CWF3( volatile int *waveform, unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | |
46 | int send_waveform_CWF3_light( volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); |
|
57 | int send_waveform_CWF3_light( volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id ); | |
|
58 | // | |||
|
59 | rtems_id get_pkts_queue_id( void ); | |||
47 |
|
60 | |||
48 | //************** |
|
61 | //************** | |
49 | // wfp registers |
|
62 | // wfp registers | |
50 | void set_wfp_data_shaping(); |
|
63 | void set_wfp_data_shaping(); | |
51 | char set_wfp_delta_snapshot(); |
|
64 | char set_wfp_delta_snapshot(); | |
52 | void set_wfp_burst_enable_register( unsigned char mode); |
|
65 | void set_wfp_burst_enable_register( unsigned char mode); | |
53 | void reset_wfp_burst_enable(); |
|
66 | void reset_wfp_burst_enable(); | |
54 | void reset_wfp_status(); |
|
67 | void reset_wfp_status(); | |
55 | void reset_waveform_picker_regs(); |
|
68 | void reset_waveform_picker_regs(); | |
56 |
|
69 | |||
57 | //***************** |
|
70 | //***************** | |
58 | // local parameters |
|
71 | // local parameters | |
59 | void set_local_sbm1_nb_cwf_max(); |
|
72 | void set_local_sbm1_nb_cwf_max(); | |
60 | void set_local_sbm2_nb_cwf_max(); |
|
73 | void set_local_sbm2_nb_cwf_max(); | |
61 | void set_local_nb_interrupt_f0_MAX(); |
|
74 | void set_local_nb_interrupt_f0_MAX(); | |
62 | void reset_local_sbm1_nb_cwf_sent(); |
|
75 | void reset_local_sbm1_nb_cwf_sent(); | |
63 | void reset_local_sbm2_nb_cwf_sent(); |
|
76 | void reset_local_sbm2_nb_cwf_sent(); | |
64 |
|
77 | |||
65 | #endif // WF_HANDLER_H_INCLUDED |
|
78 | #endif // WF_HANDLER_H_INCLUDED |
@@ -1,73 +1,89 | |||||
1 | //#include <fsw_processing.h> |
|
1 | /** Global variables of the LFR flight software. | |
|
2 | * | |||
|
3 | * @file | |||
|
4 | * @author P. LEROY | |||
|
5 | * | |||
|
6 | * Among global variables, there are: | |||
|
7 | * - RTEMS names and id. | |||
|
8 | * - APB configuration registers. | |||
|
9 | * - waveforms global buffers, used by the waveform picker hardware module to store data. | |||
|
10 | * - spectral matrices buffesr, used by the hardware module to store data. | |||
|
11 | * - variable related to LFR modes parameters. | |||
|
12 | * - the global HK packet buffer. | |||
|
13 | * - the global dump parameter buffer. | |||
|
14 | * | |||
|
15 | */ | |||
|
16 | ||||
2 | #include <rtems.h> |
|
17 | #include <rtems.h> | |
3 | #include <grspw.h> |
|
18 | #include <grspw.h> | |
|
19 | ||||
4 | #include "ccsds_types.h" |
|
20 | #include "ccsds_types.h" | |
5 | #include "grlib_regs.h" |
|
21 | #include "grlib_regs.h" | |
6 | #include "fsw_params.h" |
|
22 | #include "fsw_params.h" | |
7 |
|
23 | |||
8 | // RTEMS GLOBAL VARIABLES |
|
24 | // RTEMS GLOBAL VARIABLES | |
9 | rtems_name misc_name[5]; |
|
25 | rtems_name misc_name[5]; | |
10 | rtems_id misc_id[5]; |
|
26 | rtems_id misc_id[5]; | |
11 | rtems_name Task_name[20]; /* array of task names */ |
|
27 | rtems_name Task_name[20]; /* array of task names */ | |
12 | rtems_id Task_id[20]; /* array of task ids */ |
|
28 | rtems_id Task_id[20]; /* array of task ids */ | |
13 | unsigned int maxCount; |
|
29 | unsigned int maxCount; | |
14 | int fdSPW = 0; |
|
30 | int fdSPW = 0; | |
15 | int fdUART = 0; |
|
31 | int fdUART = 0; | |
16 | unsigned char lfrCurrentMode; |
|
32 | unsigned char lfrCurrentMode; | |
17 |
|
33 | |||
18 | // APB CONFIGURATION REGISTERS |
|
34 | // APB CONFIGURATION REGISTERS | |
19 | time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT; |
|
35 | time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT; | |
20 | gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER; |
|
36 | gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER; | |
21 | #ifdef GSA |
|
37 | #ifdef GSA | |
22 | #else |
|
38 | #else | |
23 | waveform_picker_regs_t *waveform_picker_regs = (waveform_picker_regs_t*) REGS_ADDR_WAVEFORM_PICKER; |
|
39 | waveform_picker_regs_t *waveform_picker_regs = (waveform_picker_regs_t*) REGS_ADDR_WAVEFORM_PICKER; | |
24 | #endif |
|
40 | #endif | |
25 | spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX; |
|
41 | spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX; | |
26 |
|
42 | |||
27 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes |
|
43 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes | |
28 | volatile int wf_snap_f0[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
44 | volatile int wf_snap_f0[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
29 | // |
|
45 | // | |
30 | volatile int wf_snap_f1[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
46 | volatile int wf_snap_f1[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
31 | volatile int wf_snap_f1_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
47 | volatile int wf_snap_f1_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
32 | volatile int wf_snap_f1_norm[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
48 | volatile int wf_snap_f1_norm[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
33 | // |
|
49 | // | |
34 | volatile int wf_snap_f2[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
50 | volatile int wf_snap_f2[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
35 | volatile int wf_snap_f2_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
51 | volatile int wf_snap_f2_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
36 | volatile int wf_snap_f2_norm[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
52 | volatile int wf_snap_f2_norm[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
37 | // |
|
53 | // | |
38 | volatile int wf_cont_f3[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
54 | volatile int wf_cont_f3[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
39 | volatile int wf_cont_f3_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
55 | volatile int wf_cont_f3_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
40 | char wf_cont_f3_light[ NB_SAMPLES_PER_SNAPSHOT * NB_BYTES_CWF3_LIGHT_BLK ]; |
|
56 | char wf_cont_f3_light[ NB_SAMPLES_PER_SNAPSHOT * NB_BYTES_CWF3_LIGHT_BLK ]; | |
41 |
|
57 | |||
42 | // SPECTRAL MATRICES GLOBAL VARIABLES |
|
58 | // SPECTRAL MATRICES GLOBAL VARIABLES | |
43 | volatile int spec_mat_f0_0[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
59 | volatile int spec_mat_f0_0[ SM_HEADER + TOTAL_SIZE_SM ]; | |
44 | volatile int spec_mat_f0_1[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
60 | volatile int spec_mat_f0_1[ SM_HEADER + TOTAL_SIZE_SM ]; | |
45 | volatile int spec_mat_f0_a[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
61 | volatile int spec_mat_f0_a[ SM_HEADER + TOTAL_SIZE_SM ]; | |
46 | volatile int spec_mat_f0_b[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
62 | volatile int spec_mat_f0_b[ SM_HEADER + TOTAL_SIZE_SM ]; | |
47 | volatile int spec_mat_f0_c[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
63 | volatile int spec_mat_f0_c[ SM_HEADER + TOTAL_SIZE_SM ]; | |
48 | volatile int spec_mat_f0_d[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
64 | volatile int spec_mat_f0_d[ SM_HEADER + TOTAL_SIZE_SM ]; | |
49 | volatile int spec_mat_f0_e[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
65 | volatile int spec_mat_f0_e[ SM_HEADER + TOTAL_SIZE_SM ]; | |
50 | volatile int spec_mat_f0_f[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
66 | volatile int spec_mat_f0_f[ SM_HEADER + TOTAL_SIZE_SM ]; | |
51 | volatile int spec_mat_f0_g[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
67 | volatile int spec_mat_f0_g[ SM_HEADER + TOTAL_SIZE_SM ]; | |
52 | volatile int spec_mat_f0_h[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
68 | volatile int spec_mat_f0_h[ SM_HEADER + TOTAL_SIZE_SM ]; | |
53 | volatile int spec_mat_f0_0_bis[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
69 | volatile int spec_mat_f0_0_bis[ SM_HEADER + TOTAL_SIZE_SM ]; | |
54 | volatile int spec_mat_f0_1_bis[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
70 | volatile int spec_mat_f0_1_bis[ SM_HEADER + TOTAL_SIZE_SM ]; | |
55 | // |
|
71 | // | |
56 | volatile int spec_mat_f1[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
72 | volatile int spec_mat_f1[ SM_HEADER + TOTAL_SIZE_SM ]; | |
57 | volatile int spec_mat_f1_bis[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
73 | volatile int spec_mat_f1_bis[ SM_HEADER + TOTAL_SIZE_SM ]; | |
58 | // |
|
74 | // | |
59 | volatile int spec_mat_f2[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
75 | volatile int spec_mat_f2[ SM_HEADER + TOTAL_SIZE_SM ]; | |
60 | volatile int spec_mat_f2_bis[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
76 | volatile int spec_mat_f2_bis[ SM_HEADER + TOTAL_SIZE_SM ]; | |
61 |
|
77 | |||
62 | // MODE PARAMETERS |
|
78 | // MODE PARAMETERS | |
63 | Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
|
79 | Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; | |
64 | struct param_local_str param_local; |
|
80 | struct param_local_str param_local; | |
65 |
|
81 | |||
66 | // HK PACKETS |
|
82 | // HK PACKETS | |
67 | Packet_TM_LFR_HK_t housekeeping_packet; |
|
83 | Packet_TM_LFR_HK_t housekeeping_packet; | |
68 | // sequence counters are incremented by APID (PID + CAT) and destination ID |
|
84 | // sequence counters are incremented by APID (PID + CAT) and destination ID | |
69 | unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID]; |
|
85 | unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID]; | |
70 | spw_stats spacewire_stats; |
|
86 | spw_stats spacewire_stats; | |
71 | spw_stats spacewire_stats_backup; |
|
87 | spw_stats spacewire_stats_backup; | |
72 |
|
88 | |||
73 |
|
89 |
@@ -1,573 +1,605 | |||||
|
1 | /** This is the RTEMS initialization module. | |||
|
2 | * | |||
|
3 | * @file | |||
|
4 | * @author P. LEROY | |||
|
5 | * | |||
|
6 | * This module contains two very different information: | |||
|
7 | * - specific instructions to configure the compilation of the RTEMS executive | |||
|
8 | * - functions related to the fligth softwre initialization, especially the INIT RTEMS task | |||
|
9 | * | |||
|
10 | */ | |||
|
11 | ||||
1 | //************************* |
|
12 | //************************* | |
2 | // GPL reminder to be added |
|
13 | // GPL reminder to be added | |
3 | //************************* |
|
14 | //************************* | |
4 |
|
15 | |||
5 | #include <rtems.h> |
|
16 | #include <rtems.h> | |
6 |
|
17 | |||
7 | /* configuration information */ |
|
18 | /* configuration information */ | |
8 |
|
19 | |||
9 | #define CONFIGURE_INIT |
|
20 | #define CONFIGURE_INIT | |
10 |
|
21 | |||
11 | #include <bsp.h> /* for device driver prototypes */ |
|
22 | #include <bsp.h> /* for device driver prototypes */ | |
12 |
|
23 | |||
13 | /* configuration information */ |
|
24 | /* configuration information */ | |
14 |
|
25 | |||
15 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
|
26 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER | |
16 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
|
27 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER | |
17 |
|
28 | |||
18 | #define CONFIGURE_MAXIMUM_TASKS 20 |
|
29 | #define CONFIGURE_MAXIMUM_TASKS 20 | |
19 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
|
30 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE | |
20 | #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) |
|
31 | #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) | |
21 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 |
|
32 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 | |
22 | #define CONFIGURE_INIT_TASK_PRIORITY 1 // instead of 100 |
|
33 | #define CONFIGURE_INIT_TASK_PRIORITY 1 // instead of 100 | |
23 | #define CONFIGURE_INIT_TASK_MODE (RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT) |
|
34 | #define CONFIGURE_INIT_TASK_MODE (RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT) | |
24 | #define CONFIGURE_MAXIMUM_DRIVERS 16 |
|
35 | #define CONFIGURE_MAXIMUM_DRIVERS 16 | |
25 | #define CONFIGURE_MAXIMUM_PERIODS 5 |
|
36 | #define CONFIGURE_MAXIMUM_PERIODS 5 | |
26 | #define CONFIGURE_MAXIMUM_TIMERS 5 // STAT (1s), send SWF (0.3s), send CWF3 (1s) |
|
37 | #define CONFIGURE_MAXIMUM_TIMERS 5 // STAT (1s), send SWF (0.3s), send CWF3 (1s) | |
27 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 2 |
|
38 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 2 | |
28 | #ifdef PRINT_STACK_REPORT |
|
39 | #ifdef PRINT_STACK_REPORT | |
29 | #define CONFIGURE_STACK_CHECKER_ENABLED |
|
40 | #define CONFIGURE_STACK_CHECKER_ENABLED | |
30 | #endif |
|
41 | #endif | |
31 |
|
42 | |||
32 | #include <rtems/confdefs.h> |
|
43 | #include <rtems/confdefs.h> | |
33 |
|
44 | |||
34 | /* If --drvmgr was enabled during the configuration of the RTEMS kernel */ |
|
45 | /* If --drvmgr was enabled during the configuration of the RTEMS kernel */ | |
35 | #ifdef RTEMS_DRVMGR_STARTUP |
|
46 | #ifdef RTEMS_DRVMGR_STARTUP | |
36 | #ifdef LEON3 |
|
47 | #ifdef LEON3 | |
37 | /* Add Timer and UART Driver */ |
|
48 | /* Add Timer and UART Driver */ | |
38 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
|
49 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER | |
39 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER |
|
50 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER | |
40 | #endif |
|
51 | #endif | |
41 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
|
52 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER | |
42 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART |
|
53 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART | |
43 | #endif |
|
54 | #endif | |
44 | #endif |
|
55 | #endif | |
45 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */ |
|
56 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */ | |
46 | #include <drvmgr/drvmgr_confdefs.h> |
|
57 | #include <drvmgr/drvmgr_confdefs.h> | |
47 | #endif |
|
58 | #endif | |
48 |
|
59 | |||
49 | #include "fsw_init.h" |
|
60 | #include "fsw_init.h" | |
50 | #include "fsw_config.c" |
|
61 | #include "fsw_config.c" | |
51 |
|
62 | |||
52 | rtems_task Init( rtems_task_argument ignored ) |
|
63 | rtems_task Init( rtems_task_argument ignored ) | |
53 | { |
|
64 | { | |
|
65 | /** This is the RTEMS INIT taks, it the first task launched by the system. | |||
|
66 | * | |||
|
67 | * @param unused is the starting argument of the RTEMS task | |||
|
68 | * | |||
|
69 | * The INIT task create and run all other RTEMS tasks. | |||
|
70 | * | |||
|
71 | */ | |||
|
72 | ||||
|
73 | ||||
54 | rtems_status_code status; |
|
74 | rtems_status_code status; | |
55 | rtems_isr_entry old_isr_handler; |
|
75 | rtems_isr_entry old_isr_handler; | |
56 |
|
76 | |||
57 | BOOT_PRINTF("\n\n\n\n\n") |
|
77 | BOOT_PRINTF("\n\n\n\n\n") | |
58 | BOOT_PRINTF("***************************\n") |
|
78 | BOOT_PRINTF("***************************\n") | |
59 | BOOT_PRINTF("** START Flight Software **\n") |
|
79 | BOOT_PRINTF("** START Flight Software **\n") | |
60 | BOOT_PRINTF("***************************\n") |
|
80 | BOOT_PRINTF("***************************\n") | |
61 | BOOT_PRINTF("\n\n") |
|
81 | BOOT_PRINTF("\n\n") | |
62 |
|
82 | |||
63 | //send_console_outputs_on_apbuart_port(); |
|
83 | //send_console_outputs_on_apbuart_port(); | |
64 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); |
|
84 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); | |
65 |
|
85 | |||
66 | init_parameter_dump(); |
|
86 | init_parameter_dump(); | |
67 | init_local_mode_parameters(); |
|
87 | init_local_mode_parameters(); | |
68 | init_housekeeping_parameters(); |
|
88 | init_housekeeping_parameters(); | |
69 |
|
89 | |||
70 | create_names(); // create all names |
|
90 | create_names(); // create all names | |
71 |
|
91 | |||
72 | create_message_queues(); |
|
92 | create_message_queues(); | |
73 |
|
93 | |||
74 | status = create_all_tasks(); // create all tasks |
|
94 | status = create_all_tasks(); // create all tasks | |
75 | if (status != RTEMS_SUCCESSFUL) |
|
95 | if (status != RTEMS_SUCCESSFUL) | |
76 | { |
|
96 | { | |
77 | PRINTF1("in INIT *** ERR in create_all_tasks, code %d", status) |
|
97 | PRINTF1("in INIT *** ERR in create_all_tasks, code %d", status) | |
78 | } |
|
98 | } | |
79 |
|
99 | |||
80 | status = start_all_tasks(); // start all tasks |
|
100 | status = start_all_tasks(); // start all tasks | |
81 | if (status != RTEMS_SUCCESSFUL) |
|
101 | if (status != RTEMS_SUCCESSFUL) | |
82 | { |
|
102 | { | |
83 | PRINTF1("in INIT *** ERR in start_all_tasks, code %d", status) |
|
103 | PRINTF1("in INIT *** ERR in start_all_tasks, code %d", status) | |
84 | } |
|
104 | } | |
85 |
|
105 | |||
86 | status = stop_current_mode(); // go in STANDBY mode |
|
106 | status = stop_current_mode(); // go in STANDBY mode | |
87 | if (status != RTEMS_SUCCESSFUL) |
|
107 | if (status != RTEMS_SUCCESSFUL) | |
88 | { |
|
108 | { | |
89 | PRINTF1("in INIT *** ERR in stop_current_mode, code %d", status) |
|
109 | PRINTF1("in INIT *** ERR in stop_current_mode, code %d", status) | |
90 | } |
|
110 | } | |
91 |
|
111 | |||
92 | grspw_timecode_callback = &timecode_irq_handler; |
|
112 | grspw_timecode_callback = &timecode_irq_handler; | |
93 |
|
113 | |||
94 | spacewire_configure_link(); |
|
114 | spacewire_configure_link(); | |
95 |
|
115 | |||
96 | #ifdef GSA |
|
116 | #ifdef GSA | |
97 | // mask IRQ lines |
|
117 | // mask IRQ lines | |
98 | LEON_Mask_interrupt( IRQ_SM ); |
|
118 | LEON_Mask_interrupt( IRQ_SM ); | |
99 | LEON_Mask_interrupt( IRQ_WF ); |
|
119 | LEON_Mask_interrupt( IRQ_WF ); | |
100 | // Spectral Matrices simulator |
|
120 | // Spectral Matrices simulator | |
101 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR, |
|
121 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR, | |
102 | IRQ_SPARC_SM, spectral_matrices_isr ); |
|
122 | IRQ_SPARC_SM, spectral_matrices_isr ); | |
103 | // WaveForms |
|
123 | // WaveForms | |
104 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR, CLKDIV_WF_SIMULATOR, |
|
124 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR, CLKDIV_WF_SIMULATOR, | |
105 | IRQ_SPARC_WF, waveforms_simulator_isr ); |
|
125 | IRQ_SPARC_WF, waveforms_simulator_isr ); | |
106 | #else |
|
126 | #else | |
107 | // mask IRQ lines |
|
127 | // mask IRQ lines | |
108 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
128 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); | |
109 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); |
|
129 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); | |
110 | // reset configuration registers |
|
130 | // reset configuration registers | |
111 | reset_waveform_picker_regs(); |
|
131 | reset_waveform_picker_regs(); | |
112 | reset_spectral_matrix_regs(); |
|
132 | reset_spectral_matrix_regs(); | |
113 | // configure IRQ handling for the waveform picker unit |
|
133 | // configure IRQ handling for the waveform picker unit | |
114 | status = rtems_interrupt_catch( waveforms_isr, |
|
134 | status = rtems_interrupt_catch( waveforms_isr, | |
115 | IRQ_SPARC_WAVEFORM_PICKER, |
|
135 | IRQ_SPARC_WAVEFORM_PICKER, | |
116 | &old_isr_handler) ; |
|
136 | &old_isr_handler) ; | |
117 | // configure IRQ handling for the spectral matrix unit |
|
137 | // configure IRQ handling for the spectral matrix unit | |
118 | // status = rtems_interrupt_catch( spectral_matrices_isr, |
|
138 | // status = rtems_interrupt_catch( spectral_matrices_isr, | |
119 | // IRQ_SPARC_SPECTRAL_MATRIX, |
|
139 | // IRQ_SPARC_SPECTRAL_MATRIX, | |
120 | // &old_isr_handler) ; |
|
140 | // &old_isr_handler) ; | |
121 | // Spectral Matrices simulator |
|
141 | // Spectral Matrices simulator | |
122 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR, |
|
142 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR, | |
123 | IRQ_SPARC_SM, spectral_matrices_isr_simu ); |
|
143 | IRQ_SPARC_SM, spectral_matrices_isr_simu ); | |
124 | #endif |
|
144 | #endif | |
125 |
|
145 | |||
126 | BOOT_PRINTF("delete INIT\n") |
|
146 | BOOT_PRINTF("delete INIT\n") | |
127 |
|
147 | |||
128 | status = rtems_task_delete(RTEMS_SELF); |
|
148 | status = rtems_task_delete(RTEMS_SELF); | |
129 |
|
149 | |||
130 | } |
|
150 | } | |
131 |
|
151 | |||
132 | void init_parameter_dump( void ) |
|
152 | void init_parameter_dump( void ) | |
133 | { |
|
153 | { | |
|
154 | /** This function initialize the parameter_dump_packet global variable with default values. | |||
|
155 | * | |||
|
156 | */ | |||
|
157 | ||||
134 | parameter_dump_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
158 | parameter_dump_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
135 | parameter_dump_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
159 | parameter_dump_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
136 | parameter_dump_packet.reserved = CCSDS_RESERVED; |
|
160 | parameter_dump_packet.reserved = CCSDS_RESERVED; | |
137 | parameter_dump_packet.userApplication = CCSDS_USER_APP; |
|
161 | parameter_dump_packet.userApplication = CCSDS_USER_APP; | |
138 | parameter_dump_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_PARAMETER_DUMP >> 8); |
|
162 | parameter_dump_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_PARAMETER_DUMP >> 8); | |
139 | parameter_dump_packet.packetID[1] = (unsigned char) TM_PACKET_ID_PARAMETER_DUMP; |
|
163 | parameter_dump_packet.packetID[1] = (unsigned char) TM_PACKET_ID_PARAMETER_DUMP; | |
140 | parameter_dump_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; |
|
164 | parameter_dump_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; | |
141 | parameter_dump_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
165 | parameter_dump_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
142 | parameter_dump_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_PARAMETER_DUMP >> 8); |
|
166 | parameter_dump_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_PARAMETER_DUMP >> 8); | |
143 | parameter_dump_packet.packetLength[1] = (unsigned char) PACKET_LENGTH_PARAMETER_DUMP; |
|
167 | parameter_dump_packet.packetLength[1] = (unsigned char) PACKET_LENGTH_PARAMETER_DUMP; | |
144 | // DATA FIELD HEADER |
|
168 | // DATA FIELD HEADER | |
145 | parameter_dump_packet.spare1_pusVersion_spare2 = SPARE1_PUSVERSION_SPARE2; |
|
169 | parameter_dump_packet.spare1_pusVersion_spare2 = SPARE1_PUSVERSION_SPARE2; | |
146 | parameter_dump_packet.serviceType = TM_TYPE_PARAMETER_DUMP; |
|
170 | parameter_dump_packet.serviceType = TM_TYPE_PARAMETER_DUMP; | |
147 | parameter_dump_packet.serviceSubType = TM_SUBTYPE_PARAMETER_DUMP; |
|
171 | parameter_dump_packet.serviceSubType = TM_SUBTYPE_PARAMETER_DUMP; | |
148 | parameter_dump_packet.destinationID = TM_DESTINATION_ID_GROUND; |
|
172 | parameter_dump_packet.destinationID = TM_DESTINATION_ID_GROUND; | |
149 | parameter_dump_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
173 | parameter_dump_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
150 | parameter_dump_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
174 | parameter_dump_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
151 | parameter_dump_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
175 | parameter_dump_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
152 | parameter_dump_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
176 | parameter_dump_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
153 | parameter_dump_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
177 | parameter_dump_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
154 | parameter_dump_packet.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
178 | parameter_dump_packet.time[5] = (unsigned char) (time_management_regs->fine_time); | |
155 | parameter_dump_packet.sid = SID_PARAMETER_DUMP; |
|
179 | parameter_dump_packet.sid = SID_PARAMETER_DUMP; | |
156 |
|
180 | |||
157 | //****************** |
|
181 | //****************** | |
158 | // COMMON PARAMETERS |
|
182 | // COMMON PARAMETERS | |
159 | parameter_dump_packet.unused0 = DEFAULT_SY_LFR_COMMON0; |
|
183 | parameter_dump_packet.unused0 = DEFAULT_SY_LFR_COMMON0; | |
160 | parameter_dump_packet.bw_sp0_sp1_r0_r1 = DEFAULT_SY_LFR_COMMON1; |
|
184 | parameter_dump_packet.bw_sp0_sp1_r0_r1 = DEFAULT_SY_LFR_COMMON1; | |
161 |
|
185 | |||
162 | //****************** |
|
186 | //****************** | |
163 | // NORMAL PARAMETERS |
|
187 | // NORMAL PARAMETERS | |
164 | parameter_dump_packet.sy_lfr_n_swf_l[0] = (unsigned char) (DEFAULT_SY_LFR_N_SWF_L >> 8); |
|
188 | parameter_dump_packet.sy_lfr_n_swf_l[0] = (unsigned char) (DEFAULT_SY_LFR_N_SWF_L >> 8); | |
165 | parameter_dump_packet.sy_lfr_n_swf_l[1] = (unsigned char) (DEFAULT_SY_LFR_N_SWF_L ); |
|
189 | parameter_dump_packet.sy_lfr_n_swf_l[1] = (unsigned char) (DEFAULT_SY_LFR_N_SWF_L ); | |
166 | parameter_dump_packet.sy_lfr_n_swf_p[0] = (unsigned char) (DEFAULT_SY_LFR_N_SWF_P >> 8); |
|
190 | parameter_dump_packet.sy_lfr_n_swf_p[0] = (unsigned char) (DEFAULT_SY_LFR_N_SWF_P >> 8); | |
167 | parameter_dump_packet.sy_lfr_n_swf_p[1] = (unsigned char) (DEFAULT_SY_LFR_N_SWF_P ); |
|
191 | parameter_dump_packet.sy_lfr_n_swf_p[1] = (unsigned char) (DEFAULT_SY_LFR_N_SWF_P ); | |
168 | parameter_dump_packet.sy_lfr_n_asm_p[0] = (unsigned char) (DEFAULT_SY_LFR_N_ASM_P >> 8); |
|
192 | parameter_dump_packet.sy_lfr_n_asm_p[0] = (unsigned char) (DEFAULT_SY_LFR_N_ASM_P >> 8); | |
169 | parameter_dump_packet.sy_lfr_n_asm_p[1] = (unsigned char) (DEFAULT_SY_LFR_N_ASM_P ); |
|
193 | parameter_dump_packet.sy_lfr_n_asm_p[1] = (unsigned char) (DEFAULT_SY_LFR_N_ASM_P ); | |
170 | parameter_dump_packet.sy_lfr_n_bp_p0 = (unsigned char) DEFAULT_SY_LFR_N_BP_P0; |
|
194 | parameter_dump_packet.sy_lfr_n_bp_p0 = (unsigned char) DEFAULT_SY_LFR_N_BP_P0; | |
171 | parameter_dump_packet.sy_lfr_n_bp_p1 = (unsigned char) DEFAULT_SY_LFR_N_BP_P1; |
|
195 | parameter_dump_packet.sy_lfr_n_bp_p1 = (unsigned char) DEFAULT_SY_LFR_N_BP_P1; | |
172 |
|
196 | |||
173 | //***************** |
|
197 | //***************** | |
174 | // BURST PARAMETERS |
|
198 | // BURST PARAMETERS | |
175 | parameter_dump_packet.sy_lfr_b_bp_p0 = (unsigned char) DEFAULT_SY_LFR_B_BP_P0; |
|
199 | parameter_dump_packet.sy_lfr_b_bp_p0 = (unsigned char) DEFAULT_SY_LFR_B_BP_P0; | |
176 | parameter_dump_packet.sy_lfr_b_bp_p1 = (unsigned char) DEFAULT_SY_LFR_B_BP_P1; |
|
200 | parameter_dump_packet.sy_lfr_b_bp_p1 = (unsigned char) DEFAULT_SY_LFR_B_BP_P1; | |
177 |
|
201 | |||
178 | //**************** |
|
202 | //**************** | |
179 | // SBM1 PARAMETERS |
|
203 | // SBM1 PARAMETERS | |
180 | parameter_dump_packet.sy_lfr_s1_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P0; // min value is 0.25 s for the period |
|
204 | parameter_dump_packet.sy_lfr_s1_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P0; // min value is 0.25 s for the period | |
181 | parameter_dump_packet.sy_lfr_s1_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P1; |
|
205 | parameter_dump_packet.sy_lfr_s1_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P1; | |
182 |
|
206 | |||
183 | //**************** |
|
207 | //**************** | |
184 | // SBM2 PARAMETERS |
|
208 | // SBM2 PARAMETERS | |
185 | parameter_dump_packet.sy_lfr_s2_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P0; |
|
209 | parameter_dump_packet.sy_lfr_s2_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P0; | |
186 | parameter_dump_packet.sy_lfr_s2_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P1; |
|
210 | parameter_dump_packet.sy_lfr_s2_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P1; | |
187 | } |
|
211 | } | |
188 |
|
212 | |||
189 | void init_local_mode_parameters( void ) |
|
213 | void init_local_mode_parameters( void ) | |
190 | { |
|
214 | { | |
|
215 | /** This function initialize the param_local global variable with default values. | |||
|
216 | * | |||
|
217 | */ | |||
|
218 | ||||
191 | // LOCAL PARAMETERS |
|
219 | // LOCAL PARAMETERS | |
192 | set_local_sbm1_nb_cwf_max(); |
|
220 | set_local_sbm1_nb_cwf_max(); | |
193 | set_local_sbm2_nb_cwf_max(); |
|
221 | set_local_sbm2_nb_cwf_max(); | |
194 | set_local_nb_interrupt_f0_MAX(); |
|
222 | set_local_nb_interrupt_f0_MAX(); | |
195 |
|
223 | |||
196 | BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max) |
|
224 | BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max) | |
197 | BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max) |
|
225 | BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max) | |
198 | BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX) |
|
226 | BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX) | |
199 |
|
227 | |||
200 | reset_local_sbm1_nb_cwf_sent(); |
|
228 | reset_local_sbm1_nb_cwf_sent(); | |
201 | reset_local_sbm2_nb_cwf_sent(); |
|
229 | reset_local_sbm2_nb_cwf_sent(); | |
202 | } |
|
230 | } | |
203 |
|
231 | |||
204 | void init_housekeeping_parameters( void ) |
|
232 | void init_housekeeping_parameters( void ) | |
205 | { |
|
233 | { | |
|
234 | /** This function initialize the housekeeping_packet global variable with default values. | |||
|
235 | * | |||
|
236 | */ | |||
|
237 | ||||
206 | unsigned int i = 0; |
|
238 | unsigned int i = 0; | |
207 | unsigned int j = 0; |
|
239 | unsigned int j = 0; | |
208 | unsigned int k = 0; |
|
240 | unsigned int k = 0; | |
209 | char *parameters; |
|
241 | char *parameters; | |
210 |
|
242 | |||
211 | parameters = (char*) &housekeeping_packet.lfr_status_word; |
|
243 | parameters = (char*) &housekeeping_packet.lfr_status_word; | |
212 | for(i = 0; i< SIZE_HK_PARAMETERS; i++) |
|
244 | for(i = 0; i< SIZE_HK_PARAMETERS; i++) | |
213 | { |
|
245 | { | |
214 | parameters[i] = 0x00; |
|
246 | parameters[i] = 0x00; | |
215 | } |
|
247 | } | |
216 | // init status word |
|
248 | // init status word | |
217 | housekeeping_packet.lfr_status_word[0] = 0x00; |
|
249 | housekeeping_packet.lfr_status_word[0] = 0x00; | |
218 | housekeeping_packet.lfr_status_word[1] = 0x00; |
|
250 | housekeeping_packet.lfr_status_word[1] = 0x00; | |
219 | // init software version |
|
251 | // init software version | |
220 | housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1; |
|
252 | housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1; | |
221 | housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2; |
|
253 | housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2; | |
222 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; |
|
254 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; | |
223 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; |
|
255 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; | |
224 | // init sequence counters |
|
256 | // init sequence counters | |
225 | for (i = 0; i<SEQ_CNT_NB_PID; i++) |
|
257 | for (i = 0; i<SEQ_CNT_NB_PID; i++) | |
226 | { |
|
258 | { | |
227 | for(j = 0; j<SEQ_CNT_NB_CAT; j++) |
|
259 | for(j = 0; j<SEQ_CNT_NB_CAT; j++) | |
228 | { |
|
260 | { | |
229 | for(k = 0; k<SEQ_CNT_NB_DEST_ID; k++) |
|
261 | for(k = 0; k<SEQ_CNT_NB_DEST_ID; k++) | |
230 | { |
|
262 | { | |
231 | sequenceCounters[i][j][k] = 0x00; |
|
263 | sequenceCounters[i][j][k] = 0x00; | |
232 | } |
|
264 | } | |
233 | } |
|
265 | } | |
234 | } |
|
266 | } | |
235 | updateLFRCurrentMode(); |
|
267 | updateLFRCurrentMode(); | |
236 | } |
|
268 | } | |
237 |
|
269 | |||
238 | int create_names( void ) // create all names for tasks and queues |
|
270 | int create_names( void ) // create all names for tasks and queues | |
239 | { |
|
271 | { | |
240 | /** This function creates all RTEMS names used in the software for tasks and queues. |
|
272 | /** This function creates all RTEMS names used in the software for tasks and queues. | |
241 | * |
|
273 | * | |
242 | * @return RTEMS directive status codes: |
|
274 | * @return RTEMS directive status codes: | |
243 |
* - RTEMS_SUCCESSFUL - |
|
275 | * - RTEMS_SUCCESSFUL - successful completion | |
244 | * |
|
276 | * | |
245 | */ |
|
277 | */ | |
246 |
|
278 | |||
247 | // task names |
|
279 | // task names | |
248 | Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' ); |
|
280 | Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' ); | |
249 | Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' ); |
|
281 | Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' ); | |
250 | Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' ); |
|
282 | Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' ); | |
251 | Task_name[TASKID_SMIQ] = rtems_build_name( 'S', 'M', 'I', 'Q' ); |
|
283 | Task_name[TASKID_SMIQ] = rtems_build_name( 'S', 'M', 'I', 'Q' ); | |
252 | Task_name[TASKID_STAT] = rtems_build_name( 'S', 'T', 'A', 'T' ); |
|
284 | Task_name[TASKID_STAT] = rtems_build_name( 'S', 'T', 'A', 'T' ); | |
253 | Task_name[TASKID_AVF0] = rtems_build_name( 'A', 'V', 'F', '0' ); |
|
285 | Task_name[TASKID_AVF0] = rtems_build_name( 'A', 'V', 'F', '0' ); | |
254 | Task_name[TASKID_BPF0] = rtems_build_name( 'B', 'P', 'F', '0' ); |
|
286 | Task_name[TASKID_BPF0] = rtems_build_name( 'B', 'P', 'F', '0' ); | |
255 | Task_name[TASKID_WFRM] = rtems_build_name( 'W', 'F', 'R', 'M' ); |
|
287 | Task_name[TASKID_WFRM] = rtems_build_name( 'W', 'F', 'R', 'M' ); | |
256 | Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' ); |
|
288 | Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' ); | |
257 | Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' ); |
|
289 | Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' ); | |
258 | Task_name[TASKID_MATR] = rtems_build_name( 'M', 'A', 'T', 'R' ); |
|
290 | Task_name[TASKID_MATR] = rtems_build_name( 'M', 'A', 'T', 'R' ); | |
259 | Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' ); |
|
291 | Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' ); | |
260 | Task_name[TASKID_CWF2] = rtems_build_name( 'C', 'W', 'F', '2' ); |
|
292 | Task_name[TASKID_CWF2] = rtems_build_name( 'C', 'W', 'F', '2' ); | |
261 | Task_name[TASKID_CWF1] = rtems_build_name( 'C', 'W', 'F', '1' ); |
|
293 | Task_name[TASKID_CWF1] = rtems_build_name( 'C', 'W', 'F', '1' ); | |
262 | Task_name[TASKID_SEND] = rtems_build_name( 'S', 'E', 'N', 'D' ); |
|
294 | Task_name[TASKID_SEND] = rtems_build_name( 'S', 'E', 'N', 'D' ); | |
263 |
|
295 | |||
264 | // rate monotonic period name |
|
296 | // rate monotonic period name | |
265 | HK_name = rtems_build_name( 'H', 'O', 'U', 'S' ); |
|
297 | HK_name = rtems_build_name( 'H', 'O', 'U', 'S' ); | |
266 |
|
298 | |||
267 | misc_name[QUEUE_RECV] = rtems_build_name( 'Q', 'U', 'E', 'U' ); |
|
299 | misc_name[QUEUE_RECV] = rtems_build_name( 'Q', 'U', 'E', 'U' ); | |
268 | misc_name[QUEUE_SEND] = rtems_build_name( 'P', 'K', 'T', 'S' ); |
|
300 | misc_name[QUEUE_SEND] = rtems_build_name( 'P', 'K', 'T', 'S' ); | |
269 |
|
301 | |||
270 | return RTEMS_SUCCESSFUL; |
|
302 | return RTEMS_SUCCESSFUL; | |
271 | } |
|
303 | } | |
272 |
|
304 | |||
273 | int create_all_tasks( void ) // create all tasks which run in the software |
|
305 | int create_all_tasks( void ) // create all tasks which run in the software | |
274 | { |
|
306 | { | |
275 | /** This function creates all RTEMS tasks used in the software. |
|
307 | /** This function creates all RTEMS tasks used in the software. | |
276 | * |
|
308 | * | |
277 | * @return RTEMS directive status codes: |
|
309 | * @return RTEMS directive status codes: | |
278 | * - RTEMS_SUCCESSFUL - task created successfully |
|
310 | * - RTEMS_SUCCESSFUL - task created successfully | |
279 | * - RTEMS_INVALID_ADDRESS - id is NULL |
|
311 | * - RTEMS_INVALID_ADDRESS - id is NULL | |
280 | * - RTEMS_INVALID_NAME - invalid task name |
|
312 | * - RTEMS_INVALID_NAME - invalid task name | |
281 | * - RTEMS_INVALID_PRIORITY - invalid task priority |
|
313 | * - RTEMS_INVALID_PRIORITY - invalid task priority | |
282 | * - RTEMS_MP_NOT_CONFIGURED - multiprocessing not configured |
|
314 | * - RTEMS_MP_NOT_CONFIGURED - multiprocessing not configured | |
283 | * - RTEMS_TOO_MANY - too many tasks created |
|
315 | * - RTEMS_TOO_MANY - too many tasks created | |
284 | * - RTEMS_UNSATISFIED - not enough memory for stack/FP context |
|
316 | * - RTEMS_UNSATISFIED - not enough memory for stack/FP context | |
285 | * - RTEMS_TOO_MANY - too many global objects |
|
317 | * - RTEMS_TOO_MANY - too many global objects | |
286 | * |
|
318 | * | |
287 | */ |
|
319 | */ | |
288 |
|
320 | |||
289 | rtems_status_code status; |
|
321 | rtems_status_code status; | |
290 |
|
322 | |||
291 | // RECV |
|
323 | // RECV | |
292 | status = rtems_task_create( |
|
324 | status = rtems_task_create( | |
293 | Task_name[TASKID_RECV], TASK_PRIORITY_RECV, RTEMS_MINIMUM_STACK_SIZE, |
|
325 | Task_name[TASKID_RECV], TASK_PRIORITY_RECV, RTEMS_MINIMUM_STACK_SIZE, | |
294 | RTEMS_DEFAULT_MODES, |
|
326 | RTEMS_DEFAULT_MODES, | |
295 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_RECV] |
|
327 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_RECV] | |
296 | ); |
|
328 | ); | |
297 |
|
329 | |||
298 | if (status == RTEMS_SUCCESSFUL) // ACTN |
|
330 | if (status == RTEMS_SUCCESSFUL) // ACTN | |
299 | { |
|
331 | { | |
300 | status = rtems_task_create( |
|
332 | status = rtems_task_create( | |
301 | Task_name[TASKID_ACTN], TASK_PRIORITY_ACTN, RTEMS_MINIMUM_STACK_SIZE, |
|
333 | Task_name[TASKID_ACTN], TASK_PRIORITY_ACTN, RTEMS_MINIMUM_STACK_SIZE, | |
302 | RTEMS_DEFAULT_MODES, |
|
334 | RTEMS_DEFAULT_MODES, | |
303 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_ACTN] |
|
335 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_ACTN] | |
304 | ); |
|
336 | ); | |
305 | } |
|
337 | } | |
306 | if (status == RTEMS_SUCCESSFUL) // SPIQ |
|
338 | if (status == RTEMS_SUCCESSFUL) // SPIQ | |
307 | { |
|
339 | { | |
308 | status = rtems_task_create( |
|
340 | status = rtems_task_create( | |
309 | Task_name[TASKID_SPIQ], TASK_PRIORITY_SPIQ, RTEMS_MINIMUM_STACK_SIZE, |
|
341 | Task_name[TASKID_SPIQ], TASK_PRIORITY_SPIQ, RTEMS_MINIMUM_STACK_SIZE, | |
310 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
342 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
311 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SPIQ] |
|
343 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SPIQ] | |
312 | ); |
|
344 | ); | |
313 | } |
|
345 | } | |
314 | if (status == RTEMS_SUCCESSFUL) // SMIQ |
|
346 | if (status == RTEMS_SUCCESSFUL) // SMIQ | |
315 | { |
|
347 | { | |
316 | status = rtems_task_create( |
|
348 | status = rtems_task_create( | |
317 | Task_name[TASKID_SMIQ], TASK_PRIORITY_SMIQ, RTEMS_MINIMUM_STACK_SIZE, |
|
349 | Task_name[TASKID_SMIQ], TASK_PRIORITY_SMIQ, RTEMS_MINIMUM_STACK_SIZE, | |
318 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
350 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
319 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SMIQ] |
|
351 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SMIQ] | |
320 | ); |
|
352 | ); | |
321 | } |
|
353 | } | |
322 | if (status == RTEMS_SUCCESSFUL) // STAT |
|
354 | if (status == RTEMS_SUCCESSFUL) // STAT | |
323 | { |
|
355 | { | |
324 | status = rtems_task_create( |
|
356 | status = rtems_task_create( | |
325 | Task_name[TASKID_STAT], TASK_PRIORITY_STAT, RTEMS_MINIMUM_STACK_SIZE, |
|
357 | Task_name[TASKID_STAT], TASK_PRIORITY_STAT, RTEMS_MINIMUM_STACK_SIZE, | |
326 | RTEMS_DEFAULT_MODES, |
|
358 | RTEMS_DEFAULT_MODES, | |
327 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT] |
|
359 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT] | |
328 | ); |
|
360 | ); | |
329 | } |
|
361 | } | |
330 | if (status == RTEMS_SUCCESSFUL) // AVF0 |
|
362 | if (status == RTEMS_SUCCESSFUL) // AVF0 | |
331 | { |
|
363 | { | |
332 | status = rtems_task_create( |
|
364 | status = rtems_task_create( | |
333 | Task_name[TASKID_AVF0], TASK_PRIORITY_AVF0, RTEMS_MINIMUM_STACK_SIZE, |
|
365 | Task_name[TASKID_AVF0], TASK_PRIORITY_AVF0, RTEMS_MINIMUM_STACK_SIZE, | |
334 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
366 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
335 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF0] |
|
367 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF0] | |
336 | ); |
|
368 | ); | |
337 | } |
|
369 | } | |
338 | if (status == RTEMS_SUCCESSFUL) // BPF0 |
|
370 | if (status == RTEMS_SUCCESSFUL) // BPF0 | |
339 | { |
|
371 | { | |
340 | status = rtems_task_create( |
|
372 | status = rtems_task_create( | |
341 | Task_name[TASKID_BPF0], TASK_PRIORITY_BPF0, RTEMS_MINIMUM_STACK_SIZE, |
|
373 | Task_name[TASKID_BPF0], TASK_PRIORITY_BPF0, RTEMS_MINIMUM_STACK_SIZE, | |
342 | RTEMS_DEFAULT_MODES, |
|
374 | RTEMS_DEFAULT_MODES, | |
343 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_BPF0] |
|
375 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_BPF0] | |
344 | ); |
|
376 | ); | |
345 | } |
|
377 | } | |
346 | if (status == RTEMS_SUCCESSFUL) // WFRM |
|
378 | if (status == RTEMS_SUCCESSFUL) // WFRM | |
347 | { |
|
379 | { | |
348 | status = rtems_task_create( |
|
380 | status = rtems_task_create( | |
349 | Task_name[TASKID_WFRM], TASK_PRIORITY_WFRM, RTEMS_MINIMUM_STACK_SIZE, |
|
381 | Task_name[TASKID_WFRM], TASK_PRIORITY_WFRM, RTEMS_MINIMUM_STACK_SIZE, | |
350 | RTEMS_DEFAULT_MODES, |
|
382 | RTEMS_DEFAULT_MODES, | |
351 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_WFRM] |
|
383 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_WFRM] | |
352 | ); |
|
384 | ); | |
353 | } |
|
385 | } | |
354 | if (status == RTEMS_SUCCESSFUL) // DUMB |
|
386 | if (status == RTEMS_SUCCESSFUL) // DUMB | |
355 | { |
|
387 | { | |
356 | status = rtems_task_create( |
|
388 | status = rtems_task_create( | |
357 | Task_name[TASKID_DUMB], TASK_PRIORITY_DUMB, RTEMS_MINIMUM_STACK_SIZE, |
|
389 | Task_name[TASKID_DUMB], TASK_PRIORITY_DUMB, RTEMS_MINIMUM_STACK_SIZE, | |
358 | RTEMS_DEFAULT_MODES, |
|
390 | RTEMS_DEFAULT_MODES, | |
359 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB] |
|
391 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB] | |
360 | ); |
|
392 | ); | |
361 | } |
|
393 | } | |
362 | if (status == RTEMS_SUCCESSFUL) // HOUS |
|
394 | if (status == RTEMS_SUCCESSFUL) // HOUS | |
363 | { |
|
395 | { | |
364 | status = rtems_task_create( |
|
396 | status = rtems_task_create( | |
365 | Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE, |
|
397 | Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE, | |
366 | RTEMS_DEFAULT_MODES, |
|
398 | RTEMS_DEFAULT_MODES, | |
367 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS] |
|
399 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS] | |
368 | ); |
|
400 | ); | |
369 | } |
|
401 | } | |
370 | if (status == RTEMS_SUCCESSFUL) // MATR |
|
402 | if (status == RTEMS_SUCCESSFUL) // MATR | |
371 | { |
|
403 | { | |
372 | status = rtems_task_create( |
|
404 | status = rtems_task_create( | |
373 | Task_name[TASKID_MATR], TASK_PRIORITY_MATR, RTEMS_MINIMUM_STACK_SIZE, |
|
405 | Task_name[TASKID_MATR], TASK_PRIORITY_MATR, RTEMS_MINIMUM_STACK_SIZE, | |
374 | RTEMS_DEFAULT_MODES, |
|
406 | RTEMS_DEFAULT_MODES, | |
375 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_MATR] |
|
407 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_MATR] | |
376 | ); |
|
408 | ); | |
377 | } |
|
409 | } | |
378 | if (status == RTEMS_SUCCESSFUL) // CWF3 |
|
410 | if (status == RTEMS_SUCCESSFUL) // CWF3 | |
379 | { |
|
411 | { | |
380 | status = rtems_task_create( |
|
412 | status = rtems_task_create( | |
381 | Task_name[TASKID_CWF3], TASK_PRIORITY_CWF3, RTEMS_MINIMUM_STACK_SIZE, |
|
413 | Task_name[TASKID_CWF3], TASK_PRIORITY_CWF3, RTEMS_MINIMUM_STACK_SIZE, | |
382 | RTEMS_DEFAULT_MODES, |
|
414 | RTEMS_DEFAULT_MODES, | |
383 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF3] |
|
415 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF3] | |
384 | ); |
|
416 | ); | |
385 | } |
|
417 | } | |
386 | if (status == RTEMS_SUCCESSFUL) // CWF2 |
|
418 | if (status == RTEMS_SUCCESSFUL) // CWF2 | |
387 | { |
|
419 | { | |
388 | status = rtems_task_create( |
|
420 | status = rtems_task_create( | |
389 | Task_name[TASKID_CWF2], TASK_PRIORITY_CWF2, RTEMS_MINIMUM_STACK_SIZE, |
|
421 | Task_name[TASKID_CWF2], TASK_PRIORITY_CWF2, RTEMS_MINIMUM_STACK_SIZE, | |
390 | RTEMS_DEFAULT_MODES, |
|
422 | RTEMS_DEFAULT_MODES, | |
391 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF2] |
|
423 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF2] | |
392 | ); |
|
424 | ); | |
393 | } |
|
425 | } | |
394 | if (status == RTEMS_SUCCESSFUL) // CWF1 |
|
426 | if (status == RTEMS_SUCCESSFUL) // CWF1 | |
395 | { |
|
427 | { | |
396 | status = rtems_task_create( |
|
428 | status = rtems_task_create( | |
397 | Task_name[TASKID_CWF1], TASK_PRIORITY_CWF1, RTEMS_MINIMUM_STACK_SIZE, |
|
429 | Task_name[TASKID_CWF1], TASK_PRIORITY_CWF1, RTEMS_MINIMUM_STACK_SIZE, | |
398 | RTEMS_DEFAULT_MODES, |
|
430 | RTEMS_DEFAULT_MODES, | |
399 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF1] |
|
431 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF1] | |
400 | ); |
|
432 | ); | |
401 | } |
|
433 | } | |
402 | if (status == RTEMS_SUCCESSFUL) // SEND |
|
434 | if (status == RTEMS_SUCCESSFUL) // SEND | |
403 | { |
|
435 | { | |
404 | status = rtems_task_create( |
|
436 | status = rtems_task_create( | |
405 | Task_name[TASKID_SEND], TASK_PRIORITY_SEND, RTEMS_MINIMUM_STACK_SIZE, |
|
437 | Task_name[TASKID_SEND], TASK_PRIORITY_SEND, RTEMS_MINIMUM_STACK_SIZE, | |
406 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
438 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
407 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SEND] |
|
439 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SEND] | |
408 | ); |
|
440 | ); | |
409 | } |
|
441 | } | |
410 |
|
442 | |||
411 | return status; |
|
443 | return status; | |
412 | } |
|
444 | } | |
413 |
|
445 | |||
414 | int start_all_tasks( void ) |
|
446 | int start_all_tasks( void ) | |
415 | { |
|
447 | { | |
416 | /** This function starts all RTEMS tasks used in the software. |
|
448 | /** This function starts all RTEMS tasks used in the software. | |
417 | * |
|
449 | * | |
418 | * @return RTEMS directive status codes: |
|
450 | * @return RTEMS directive status codes: | |
419 | * - RTEMS_SUCCESSFUL - ask started successfully |
|
451 | * - RTEMS_SUCCESSFUL - ask started successfully | |
420 | * - RTEMS_INVALID_ADDRESS - invalid task entry point |
|
452 | * - RTEMS_INVALID_ADDRESS - invalid task entry point | |
421 | * - RTEMS_INVALID_ID - invalid task id |
|
453 | * - RTEMS_INVALID_ID - invalid task id | |
422 | * - RTEMS_INCORRECT_STATE - task not in the dormant state |
|
454 | * - RTEMS_INCORRECT_STATE - task not in the dormant state | |
423 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot start remote task |
|
455 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot start remote task | |
424 | * |
|
456 | * | |
425 | */ |
|
457 | */ | |
426 | // starts all the tasks fot eh flight software |
|
458 | // starts all the tasks fot eh flight software | |
427 |
|
459 | |||
428 | rtems_status_code status; |
|
460 | rtems_status_code status; | |
429 |
|
461 | |||
430 | status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 ); |
|
462 | status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 ); | |
431 | if (status!=RTEMS_SUCCESSFUL) { |
|
463 | if (status!=RTEMS_SUCCESSFUL) { | |
432 | BOOT_PRINTF("in INIT *** Error starting TASK_SPIQ\n") |
|
464 | BOOT_PRINTF("in INIT *** Error starting TASK_SPIQ\n") | |
433 | } |
|
465 | } | |
434 |
|
466 | |||
435 | if (status == RTEMS_SUCCESSFUL) // SMIQ |
|
467 | if (status == RTEMS_SUCCESSFUL) // SMIQ | |
436 | { |
|
468 | { | |
437 | status = rtems_task_start( Task_id[TASKID_SMIQ], smiq_task, 1 ); |
|
469 | status = rtems_task_start( Task_id[TASKID_SMIQ], smiq_task, 1 ); | |
438 | if (status!=RTEMS_SUCCESSFUL) { |
|
470 | if (status!=RTEMS_SUCCESSFUL) { | |
439 | BOOT_PRINTF("in INIT *** Error starting TASK_BPPR\n") |
|
471 | BOOT_PRINTF("in INIT *** Error starting TASK_BPPR\n") | |
440 | } |
|
472 | } | |
441 | } |
|
473 | } | |
442 |
|
474 | |||
443 | if (status == RTEMS_SUCCESSFUL) // RECV |
|
475 | if (status == RTEMS_SUCCESSFUL) // RECV | |
444 | { |
|
476 | { | |
445 | status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 ); |
|
477 | status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 ); | |
446 | if (status!=RTEMS_SUCCESSFUL) { |
|
478 | if (status!=RTEMS_SUCCESSFUL) { | |
447 | BOOT_PRINTF("in INIT *** Error starting TASK_RECV\n") |
|
479 | BOOT_PRINTF("in INIT *** Error starting TASK_RECV\n") | |
448 | } |
|
480 | } | |
449 | } |
|
481 | } | |
450 |
|
482 | |||
451 | if (status == RTEMS_SUCCESSFUL) // SEND |
|
483 | if (status == RTEMS_SUCCESSFUL) // SEND | |
452 | { |
|
484 | { | |
453 | status = rtems_task_start( Task_id[TASKID_SEND], send_task, 1 ); |
|
485 | status = rtems_task_start( Task_id[TASKID_SEND], send_task, 1 ); | |
454 | if (status!=RTEMS_SUCCESSFUL) { |
|
486 | if (status!=RTEMS_SUCCESSFUL) { | |
455 | BOOT_PRINTF("in INIT *** Error starting TASK_SEND\n") |
|
487 | BOOT_PRINTF("in INIT *** Error starting TASK_SEND\n") | |
456 | } |
|
488 | } | |
457 | } |
|
489 | } | |
458 |
|
490 | |||
459 | if (status == RTEMS_SUCCESSFUL) // ACTN |
|
491 | if (status == RTEMS_SUCCESSFUL) // ACTN | |
460 | { |
|
492 | { | |
461 | status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 ); |
|
493 | status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 ); | |
462 | if (status!=RTEMS_SUCCESSFUL) { |
|
494 | if (status!=RTEMS_SUCCESSFUL) { | |
463 | BOOT_PRINTF("in INIT *** Error starting TASK_ACTN\n") |
|
495 | BOOT_PRINTF("in INIT *** Error starting TASK_ACTN\n") | |
464 | } |
|
496 | } | |
465 | } |
|
497 | } | |
466 |
|
498 | |||
467 | if (status == RTEMS_SUCCESSFUL) // STAT |
|
499 | if (status == RTEMS_SUCCESSFUL) // STAT | |
468 | { |
|
500 | { | |
469 | status = rtems_task_start( Task_id[TASKID_STAT], stat_task, 1 ); |
|
501 | status = rtems_task_start( Task_id[TASKID_STAT], stat_task, 1 ); | |
470 | if (status!=RTEMS_SUCCESSFUL) { |
|
502 | if (status!=RTEMS_SUCCESSFUL) { | |
471 | BOOT_PRINTF("in INIT *** Error starting TASK_STAT\n") |
|
503 | BOOT_PRINTF("in INIT *** Error starting TASK_STAT\n") | |
472 | } |
|
504 | } | |
473 | } |
|
505 | } | |
474 |
|
506 | |||
475 | if (status == RTEMS_SUCCESSFUL) // AVF0 |
|
507 | if (status == RTEMS_SUCCESSFUL) // AVF0 | |
476 | { |
|
508 | { | |
477 | status = rtems_task_start( Task_id[TASKID_AVF0], avf0_task, 1 ); |
|
509 | status = rtems_task_start( Task_id[TASKID_AVF0], avf0_task, 1 ); | |
478 | if (status!=RTEMS_SUCCESSFUL) { |
|
510 | if (status!=RTEMS_SUCCESSFUL) { | |
479 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF0\n") |
|
511 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF0\n") | |
480 | } |
|
512 | } | |
481 | } |
|
513 | } | |
482 |
|
514 | |||
483 | if (status == RTEMS_SUCCESSFUL) // BPF0 |
|
515 | if (status == RTEMS_SUCCESSFUL) // BPF0 | |
484 | { |
|
516 | { | |
485 | status = rtems_task_start( Task_id[TASKID_BPF0], bpf0_task, 1 ); |
|
517 | status = rtems_task_start( Task_id[TASKID_BPF0], bpf0_task, 1 ); | |
486 | if (status!=RTEMS_SUCCESSFUL) { |
|
518 | if (status!=RTEMS_SUCCESSFUL) { | |
487 | BOOT_PRINTF("in INIT *** Error starting TASK_BPF0\n") |
|
519 | BOOT_PRINTF("in INIT *** Error starting TASK_BPF0\n") | |
488 | } |
|
520 | } | |
489 | } |
|
521 | } | |
490 |
|
522 | |||
491 | if (status == RTEMS_SUCCESSFUL) // WFRM |
|
523 | if (status == RTEMS_SUCCESSFUL) // WFRM | |
492 | { |
|
524 | { | |
493 | status = rtems_task_start( Task_id[TASKID_WFRM], wfrm_task, 1 ); |
|
525 | status = rtems_task_start( Task_id[TASKID_WFRM], wfrm_task, 1 ); | |
494 | if (status!=RTEMS_SUCCESSFUL) { |
|
526 | if (status!=RTEMS_SUCCESSFUL) { | |
495 | BOOT_PRINTF("in INIT *** Error starting TASK_WFRM\n") |
|
527 | BOOT_PRINTF("in INIT *** Error starting TASK_WFRM\n") | |
496 | } |
|
528 | } | |
497 | } |
|
529 | } | |
498 |
|
530 | |||
499 | if (status == RTEMS_SUCCESSFUL) // DUMB |
|
531 | if (status == RTEMS_SUCCESSFUL) // DUMB | |
500 | { |
|
532 | { | |
501 | status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 ); |
|
533 | status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 ); | |
502 | if (status!=RTEMS_SUCCESSFUL) { |
|
534 | if (status!=RTEMS_SUCCESSFUL) { | |
503 | BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n") |
|
535 | BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n") | |
504 | } |
|
536 | } | |
505 | } |
|
537 | } | |
506 |
|
538 | |||
507 | if (status == RTEMS_SUCCESSFUL) // HOUS |
|
539 | if (status == RTEMS_SUCCESSFUL) // HOUS | |
508 | { |
|
540 | { | |
509 | status = rtems_task_start( Task_id[TASKID_HOUS], hous_task, 1 ); |
|
541 | status = rtems_task_start( Task_id[TASKID_HOUS], hous_task, 1 ); | |
510 | if (status!=RTEMS_SUCCESSFUL) { |
|
542 | if (status!=RTEMS_SUCCESSFUL) { | |
511 | BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n") |
|
543 | BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n") | |
512 | } |
|
544 | } | |
513 | } |
|
545 | } | |
514 |
|
546 | |||
515 | if (status == RTEMS_SUCCESSFUL) // MATR |
|
547 | if (status == RTEMS_SUCCESSFUL) // MATR | |
516 | { |
|
548 | { | |
517 | status = rtems_task_start( Task_id[TASKID_MATR], matr_task, 1 ); |
|
549 | status = rtems_task_start( Task_id[TASKID_MATR], matr_task, 1 ); | |
518 | if (status!=RTEMS_SUCCESSFUL) { |
|
550 | if (status!=RTEMS_SUCCESSFUL) { | |
519 | BOOT_PRINTF("in INIT *** Error starting TASK_MATR\n") |
|
551 | BOOT_PRINTF("in INIT *** Error starting TASK_MATR\n") | |
520 | } |
|
552 | } | |
521 | } |
|
553 | } | |
522 |
|
554 | |||
523 | if (status == RTEMS_SUCCESSFUL) // CWF3 |
|
555 | if (status == RTEMS_SUCCESSFUL) // CWF3 | |
524 | { |
|
556 | { | |
525 | status = rtems_task_start( Task_id[TASKID_CWF3], cwf3_task, 1 ); |
|
557 | status = rtems_task_start( Task_id[TASKID_CWF3], cwf3_task, 1 ); | |
526 | if (status!=RTEMS_SUCCESSFUL) { |
|
558 | if (status!=RTEMS_SUCCESSFUL) { | |
527 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF3\n") |
|
559 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF3\n") | |
528 | } |
|
560 | } | |
529 | } |
|
561 | } | |
530 |
|
562 | |||
531 | if (status == RTEMS_SUCCESSFUL) // CWF2 |
|
563 | if (status == RTEMS_SUCCESSFUL) // CWF2 | |
532 | { |
|
564 | { | |
533 | status = rtems_task_start( Task_id[TASKID_CWF2], cwf2_task, 1 ); |
|
565 | status = rtems_task_start( Task_id[TASKID_CWF2], cwf2_task, 1 ); | |
534 | if (status!=RTEMS_SUCCESSFUL) { |
|
566 | if (status!=RTEMS_SUCCESSFUL) { | |
535 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF2\n") |
|
567 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF2\n") | |
536 | } |
|
568 | } | |
537 | } |
|
569 | } | |
538 |
|
570 | |||
539 | if (status == RTEMS_SUCCESSFUL) // CWF1 |
|
571 | if (status == RTEMS_SUCCESSFUL) // CWF1 | |
540 | { |
|
572 | { | |
541 | status = rtems_task_start( Task_id[TASKID_CWF1], cwf1_task, 1 ); |
|
573 | status = rtems_task_start( Task_id[TASKID_CWF1], cwf1_task, 1 ); | |
542 | if (status!=RTEMS_SUCCESSFUL) { |
|
574 | if (status!=RTEMS_SUCCESSFUL) { | |
543 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF1\n") |
|
575 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF1\n") | |
544 | } |
|
576 | } | |
545 | } |
|
577 | } | |
546 |
|
578 | |||
547 | return status; |
|
579 | return status; | |
548 | } |
|
580 | } | |
549 |
|
581 | |||
550 | rtems_status_code create_message_queues( void ) // create the two message queues used in the software |
|
582 | rtems_status_code create_message_queues( void ) // create the two message queues used in the software | |
551 | { |
|
583 | { | |
552 | rtems_status_code status; |
|
584 | rtems_status_code status; | |
553 | rtems_status_code ret; |
|
585 | rtems_status_code ret; | |
554 | rtems_id queue_id; |
|
586 | rtems_id queue_id; | |
555 |
|
587 | |||
556 | // create the queue for handling valid TCs |
|
588 | // create the queue for handling valid TCs | |
557 | status = rtems_message_queue_create( misc_name[QUEUE_RECV], ACTION_MSG_QUEUE_COUNT, CCSDS_TC_PKT_MAX_SIZE, |
|
589 | status = rtems_message_queue_create( misc_name[QUEUE_RECV], ACTION_MSG_QUEUE_COUNT, CCSDS_TC_PKT_MAX_SIZE, | |
558 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
590 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
559 | if (status != RTEMS_SUCCESSFUL) { |
|
591 | if (status != RTEMS_SUCCESSFUL) { | |
560 | ret = status; |
|
592 | ret = status; | |
561 | BOOT_PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", ret) |
|
593 | BOOT_PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", ret) | |
562 | } |
|
594 | } | |
563 |
|
595 | |||
564 | // create the queue for handling TM packet sending |
|
596 | // create the queue for handling TM packet sending | |
565 | ret = rtems_message_queue_create( misc_name[QUEUE_SEND], ACTION_MSG_PKTS_COUNT, |
|
597 | ret = rtems_message_queue_create( misc_name[QUEUE_SEND], ACTION_MSG_PKTS_COUNT, | |
566 | ACTION_MSG_PKTS_MAX_SIZE, |
|
598 | ACTION_MSG_PKTS_MAX_SIZE, | |
567 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
599 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
568 | if (ret != RTEMS_SUCCESSFUL) { |
|
600 | if (ret != RTEMS_SUCCESSFUL) { | |
569 | BOOT_PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", ret) |
|
601 | BOOT_PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", ret) | |
570 | } |
|
602 | } | |
571 |
|
603 | |||
572 | return ret; |
|
604 | return ret; | |
573 | } |
|
605 | } |
@@ -1,331 +1,274 | |||||
|
1 | /** General usage functions and RTEMS tasks. | |||
|
2 | * | |||
|
3 | * @file | |||
|
4 | * @author P. LEROY | |||
|
5 | * | |||
|
6 | */ | |||
|
7 | ||||
1 | #include "fsw_misc.h" |
|
8 | #include "fsw_misc.h" | |
2 |
|
9 | |||
|
10 | char *DumbMessages[6] = {"in DUMB *** default", // RTEMS_EVENT_0 | |||
|
11 | "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 | |||
|
12 | "in DUMB *** waveforms_isr", // RTEMS_EVENT_2 | |||
|
13 | "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 | |||
|
14 | "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 | |||
|
15 | "in DUMB *** waveforms_simulator_isr" // RTEMS_EVENT_5 | |||
|
16 | }; | |||
|
17 | ||||
3 | int configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, |
|
18 | int configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, | |
4 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) |
|
19 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) | |
5 | { // configure the timer for the waveforms simulation |
|
20 | { | |
|
21 | /** This function configures a GPTIMER timer instantiated in the VHDL design. | |||
|
22 | * | |||
|
23 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |||
|
24 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |||
|
25 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. | |||
|
26 | * @param interrupt_level is the interrupt level that the timer drives. | |||
|
27 | * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer. | |||
|
28 | * | |||
|
29 | * @return | |||
|
30 | * | |||
|
31 | * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76 | |||
|
32 | * | |||
|
33 | */ | |||
|
34 | ||||
6 | rtems_status_code status; |
|
35 | rtems_status_code status; | |
7 | rtems_isr_entry old_isr_handler; |
|
36 | rtems_isr_entry old_isr_handler; | |
8 |
|
37 | |||
9 | status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels |
|
38 | status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels | |
10 | if (status!=RTEMS_SUCCESSFUL) |
|
39 | if (status!=RTEMS_SUCCESSFUL) | |
11 | { |
|
40 | { | |
12 | PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n") |
|
41 | PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n") | |
13 | } |
|
42 | } | |
14 |
|
43 | |||
15 | timer_set_clock_divider( gptimer_regs, timer, clock_divider); |
|
44 | timer_set_clock_divider( gptimer_regs, timer, clock_divider); | |
16 |
|
45 | |||
17 | return 1; |
|
46 | return 1; | |
18 | } |
|
47 | } | |
19 |
|
48 | |||
20 | int timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer) |
|
49 | int timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer) | |
21 | { |
|
50 | { | |
|
51 | /** This function starts a GPTIMER timer. | |||
|
52 | * | |||
|
53 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |||
|
54 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |||
|
55 | * | |||
|
56 | * @return 1 | |||
|
57 | * | |||
|
58 | */ | |||
|
59 | ||||
22 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any |
|
60 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any | |
23 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register |
|
61 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register | |
24 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer |
|
62 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer | |
25 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart |
|
63 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart | |
26 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable |
|
64 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable | |
27 |
|
65 | |||
28 | return 1; |
|
66 | return 1; | |
29 | } |
|
67 | } | |
30 |
|
68 | |||
31 | int timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer) |
|
69 | int timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer) | |
32 | { |
|
70 | { | |
|
71 | /** This function stops a GPTIMER timer. | |||
|
72 | * | |||
|
73 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |||
|
74 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |||
|
75 | * | |||
|
76 | * @return 1 | |||
|
77 | * | |||
|
78 | */ | |||
|
79 | ||||
33 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer |
|
80 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer | |
34 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable |
|
81 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable | |
35 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any |
|
82 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any | |
36 |
|
83 | |||
37 | return 1; |
|
84 | return 1; | |
38 | } |
|
85 | } | |
39 |
|
86 | |||
40 | int timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider) |
|
87 | int timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider) | |
41 | { |
|
88 | { | |
|
89 | /** This function sets the clock divider of a GPTIMER timer. | |||
|
90 | * | |||
|
91 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |||
|
92 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |||
|
93 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. | |||
|
94 | * | |||
|
95 | * @return 1 | |||
|
96 | * | |||
|
97 | */ | |||
|
98 | ||||
42 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz |
|
99 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz | |
43 |
|
100 | |||
44 | return 1; |
|
101 | return 1; | |
45 | } |
|
102 | } | |
46 |
|
103 | |||
47 | void update_spacewire_statistics() |
|
|||
48 | { |
|
|||
49 | rtems_status_code status; |
|
|||
50 | spw_stats spacewire_stats_grspw; |
|
|||
51 |
|
||||
52 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, &spacewire_stats_grspw ); |
|
|||
53 |
|
||||
54 | spacewire_stats.packets_received = spacewire_stats_backup.packets_received |
|
|||
55 | + spacewire_stats_grspw.packets_received; |
|
|||
56 | spacewire_stats.packets_sent = spacewire_stats_backup.packets_sent |
|
|||
57 | + spacewire_stats_grspw.packets_sent; |
|
|||
58 | spacewire_stats.parity_err = spacewire_stats_backup.parity_err |
|
|||
59 | + spacewire_stats_grspw.parity_err; |
|
|||
60 | spacewire_stats.disconnect_err = spacewire_stats_backup.disconnect_err |
|
|||
61 | + spacewire_stats_grspw.disconnect_err; |
|
|||
62 | spacewire_stats.escape_err = spacewire_stats_backup.escape_err |
|
|||
63 | + spacewire_stats_grspw.escape_err; |
|
|||
64 | spacewire_stats.credit_err = spacewire_stats_backup.credit_err |
|
|||
65 | + spacewire_stats_grspw.credit_err; |
|
|||
66 | spacewire_stats.write_sync_err = spacewire_stats_backup.write_sync_err |
|
|||
67 | + spacewire_stats_grspw.write_sync_err; |
|
|||
68 | spacewire_stats.rx_rmap_header_crc_err = spacewire_stats_backup.rx_rmap_header_crc_err |
|
|||
69 | + spacewire_stats_grspw.rx_rmap_header_crc_err; |
|
|||
70 | spacewire_stats.rx_rmap_data_crc_err = spacewire_stats_backup.rx_rmap_data_crc_err |
|
|||
71 | + spacewire_stats_grspw.rx_rmap_data_crc_err; |
|
|||
72 | spacewire_stats.early_ep = spacewire_stats_backup.early_ep |
|
|||
73 | + spacewire_stats_grspw.early_ep; |
|
|||
74 | spacewire_stats.invalid_address = spacewire_stats_backup.invalid_address |
|
|||
75 | + spacewire_stats_grspw.invalid_address; |
|
|||
76 | spacewire_stats.rx_eep_err = spacewire_stats_backup.rx_eep_err |
|
|||
77 | + spacewire_stats_grspw.rx_eep_err; |
|
|||
78 | spacewire_stats.rx_truncated = spacewire_stats_backup.rx_truncated |
|
|||
79 | + spacewire_stats_grspw.rx_truncated; |
|
|||
80 | //spacewire_stats.tx_link_err; |
|
|||
81 |
|
||||
82 | //**************************** |
|
|||
83 | // DPU_SPACEWIRE_IF_STATISTICS |
|
|||
84 | housekeeping_packet.hk_lfr_dpu_spw_pkt_rcv_cnt[0] = (unsigned char) (spacewire_stats.packets_received >> 8); |
|
|||
85 | housekeeping_packet.hk_lfr_dpu_spw_pkt_rcv_cnt[1] = (unsigned char) (spacewire_stats.packets_received); |
|
|||
86 | housekeeping_packet.hk_lfr_dpu_spw_pkt_sent_cnt[0] = (unsigned char) (spacewire_stats.packets_sent >> 8); |
|
|||
87 | housekeeping_packet.hk_lfr_dpu_spw_pkt_sent_cnt[1] = (unsigned char) (spacewire_stats.packets_sent); |
|
|||
88 | //housekeeping_packet.hk_lfr_dpu_spw_tick_out_cnt; |
|
|||
89 | //housekeeping_packet.hk_lfr_dpu_spw_last_timc; |
|
|||
90 |
|
||||
91 | //****************************************** |
|
|||
92 | // ERROR COUNTERS / SPACEWIRE / LOW SEVERITY |
|
|||
93 | housekeeping_packet.hk_lfr_dpu_spw_parity = (unsigned char) spacewire_stats.parity_err; |
|
|||
94 | housekeeping_packet.hk_lfr_dpu_spw_disconnect = (unsigned char) spacewire_stats.disconnect_err; |
|
|||
95 | housekeeping_packet.hk_lfr_dpu_spw_escape = (unsigned char) spacewire_stats.escape_err; |
|
|||
96 | housekeeping_packet.hk_lfr_dpu_spw_credit = (unsigned char) spacewire_stats.credit_err; |
|
|||
97 | housekeeping_packet.hk_lfr_dpu_spw_write_sync = (unsigned char) spacewire_stats.write_sync_err; |
|
|||
98 | // housekeeping_packet.hk_lfr_dpu_spw_rx_ahb; |
|
|||
99 | // housekeeping_packet.hk_lfr_dpu_spw_tx_ahb; |
|
|||
100 | housekeeping_packet.hk_lfr_dpu_spw_header_crc = (unsigned char) spacewire_stats.rx_rmap_header_crc_err; |
|
|||
101 | housekeeping_packet.hk_lfr_dpu_spw_data_crc = (unsigned char) spacewire_stats.rx_rmap_data_crc_err; |
|
|||
102 |
|
||||
103 | //********************************************* |
|
|||
104 | // ERROR COUNTERS / SPACEWIRE / MEDIUM SEVERITY |
|
|||
105 | housekeeping_packet.hk_lfr_dpu_spw_early_eop = (unsigned char) spacewire_stats.early_ep; |
|
|||
106 | housekeeping_packet.hk_lfr_dpu_spw_invalid_addr = (unsigned char) spacewire_stats.invalid_address; |
|
|||
107 | housekeeping_packet.hk_lfr_dpu_spw_eep = (unsigned char) spacewire_stats.rx_eep_err; |
|
|||
108 | housekeeping_packet.hk_lfr_dpu_spw_rx_too_big = (unsigned char) spacewire_stats.rx_truncated; |
|
|||
109 |
|
||||
110 | } |
|
|||
111 |
|
||||
112 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port |
|
104 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port | |
113 | { |
|
105 | { | |
114 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
106 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |
115 |
|
107 | |||
116 | apbuart_regs->ctrl = apbuart_regs->ctrl & APBUART_CTRL_REG_MASK_DB; |
|
108 | apbuart_regs->ctrl = apbuart_regs->ctrl & APBUART_CTRL_REG_MASK_DB; | |
117 | PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n") |
|
109 | PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n") | |
118 |
|
110 | |||
119 | return 0; |
|
111 | return 0; | |
120 | } |
|
112 | } | |
121 |
|
113 | |||
122 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value) |
|
114 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value) | |
123 | { |
|
115 | { | |
124 | /** This function sets the scaler reload register of the apbuart module |
|
116 | /** This function sets the scaler reload register of the apbuart module | |
125 | * |
|
117 | * | |
126 | * @param regs is the address of the apbuart registers in memory |
|
118 | * @param regs is the address of the apbuart registers in memory | |
127 | * @param value is the value that will be stored in the scaler register |
|
119 | * @param value is the value that will be stored in the scaler register | |
128 | * |
|
120 | * | |
129 | * The value shall be set by the software to get data on the serial interface. |
|
121 | * The value shall be set by the software to get data on the serial interface. | |
130 | * |
|
122 | * | |
131 | */ |
|
123 | */ | |
132 |
|
124 | |||
133 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; |
|
125 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; | |
134 |
|
126 | |||
135 | apbuart_regs->scaler = value; |
|
127 | apbuart_regs->scaler = value; | |
136 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) |
|
128 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) | |
137 | } |
|
129 | } | |
138 |
|
130 | |||
139 | //************ |
|
131 | //************ | |
140 | // RTEMS TASKS |
|
132 | // RTEMS TASKS | |
141 |
|
133 | |||
142 | rtems_task stat_task(rtems_task_argument argument) |
|
134 | rtems_task stat_task(rtems_task_argument argument) | |
143 | { |
|
135 | { | |
144 | int i; |
|
136 | int i; | |
145 | int j; |
|
137 | int j; | |
146 | i = 0; |
|
138 | i = 0; | |
147 | j = 0; |
|
139 | j = 0; | |
148 | BOOT_PRINTF("in STAT *** \n") |
|
140 | BOOT_PRINTF("in STAT *** \n") | |
149 | while(1){ |
|
141 | while(1){ | |
150 | rtems_task_wake_after(1000); |
|
142 | rtems_task_wake_after(1000); | |
151 | PRINTF1("%d\n", j) |
|
143 | PRINTF1("%d\n", j) | |
152 | if (i == CPU_USAGE_REPORT_PERIOD) { |
|
144 | if (i == CPU_USAGE_REPORT_PERIOD) { | |
153 | // #ifdef PRINT_TASK_STATISTICS |
|
145 | // #ifdef PRINT_TASK_STATISTICS | |
154 | // rtems_cpu_usage_report(); |
|
146 | // rtems_cpu_usage_report(); | |
155 | // rtems_cpu_usage_reset(); |
|
147 | // rtems_cpu_usage_reset(); | |
156 | // #endif |
|
148 | // #endif | |
157 | i = 0; |
|
149 | i = 0; | |
158 | } |
|
150 | } | |
159 | else i++; |
|
151 | else i++; | |
160 | j++; |
|
152 | j++; | |
161 | } |
|
153 | } | |
162 | } |
|
154 | } | |
163 |
|
155 | |||
164 | rtems_task hous_task(rtems_task_argument argument) |
|
156 | rtems_task hous_task(rtems_task_argument argument) | |
165 | { |
|
157 | { | |
166 | rtems_status_code status; |
|
158 | rtems_status_code status; | |
167 | spw_ioctl_pkt_send spw_ioctl_send; |
|
159 | spw_ioctl_pkt_send spw_ioctl_send; | |
168 | rtems_id queue_id; |
|
160 | rtems_id queue_id; | |
169 |
|
161 | |||
170 | spw_ioctl_send.hlen = 0; |
|
162 | spw_ioctl_send.hlen = 0; | |
171 | spw_ioctl_send.hdr = NULL; |
|
163 | spw_ioctl_send.hdr = NULL; | |
172 | spw_ioctl_send.dlen = PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
164 | spw_ioctl_send.dlen = PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
173 | spw_ioctl_send.data = (char*) &housekeeping_packet; |
|
165 | spw_ioctl_send.data = (char*) &housekeeping_packet; | |
174 | spw_ioctl_send.options = 0; |
|
166 | spw_ioctl_send.options = 0; | |
175 |
|
167 | |||
176 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); |
|
168 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |
177 | if (status != RTEMS_SUCCESSFUL) |
|
169 | if (status != RTEMS_SUCCESSFUL) | |
178 | { |
|
170 | { | |
179 | PRINTF1("in HOUS *** ERR %d\n", status) |
|
171 | PRINTF1("in HOUS *** ERR %d\n", status) | |
180 | } |
|
172 | } | |
181 |
|
173 | |||
182 | BOOT_PRINTF("in HOUS ***\n") |
|
174 | BOOT_PRINTF("in HOUS ***\n") | |
183 |
|
175 | |||
184 | if (rtems_rate_monotonic_ident( HK_name, &HK_id) != RTEMS_SUCCESSFUL) { |
|
176 | if (rtems_rate_monotonic_ident( HK_name, &HK_id) != RTEMS_SUCCESSFUL) { | |
185 | status = rtems_rate_monotonic_create( HK_name, &HK_id ); |
|
177 | status = rtems_rate_monotonic_create( HK_name, &HK_id ); | |
186 | if( status != RTEMS_SUCCESSFUL ) { |
|
178 | if( status != RTEMS_SUCCESSFUL ) { | |
187 | PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status ) |
|
179 | PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status ) | |
188 | } |
|
180 | } | |
189 | } |
|
181 | } | |
190 |
|
182 | |||
191 | housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
183 | housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
192 | housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
184 | housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
193 | housekeeping_packet.reserved = DEFAULT_RESERVED; |
|
185 | housekeeping_packet.reserved = DEFAULT_RESERVED; | |
194 | housekeeping_packet.userApplication = CCSDS_USER_APP; |
|
186 | housekeeping_packet.userApplication = CCSDS_USER_APP; | |
195 | housekeeping_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_HK >> 8); |
|
187 | housekeeping_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_HK >> 8); | |
196 | housekeeping_packet.packetID[1] = (unsigned char) (TM_PACKET_ID_HK); |
|
188 | housekeeping_packet.packetID[1] = (unsigned char) (TM_PACKET_ID_HK); | |
197 | housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; |
|
189 | housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; | |
198 | housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
190 | housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
199 | housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); |
|
191 | housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); | |
200 | housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); |
|
192 | housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); | |
201 | housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
193 | housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
202 | housekeeping_packet.serviceType = TM_TYPE_HK; |
|
194 | housekeeping_packet.serviceType = TM_TYPE_HK; | |
203 | housekeeping_packet.serviceSubType = TM_SUBTYPE_HK; |
|
195 | housekeeping_packet.serviceSubType = TM_SUBTYPE_HK; | |
204 | housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND; |
|
196 | housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND; | |
205 |
|
197 | |||
206 | status = rtems_rate_monotonic_cancel(HK_id); |
|
198 | status = rtems_rate_monotonic_cancel(HK_id); | |
207 | if( status != RTEMS_SUCCESSFUL ) { |
|
199 | if( status != RTEMS_SUCCESSFUL ) { | |
208 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status ) |
|
200 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status ) | |
209 | } |
|
201 | } | |
210 | else { |
|
202 | else { | |
211 | DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n") |
|
203 | DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n") | |
212 | } |
|
204 | } | |
213 |
|
205 | |||
214 | while(1){ // launch the rate monotonic task |
|
206 | while(1){ // launch the rate monotonic task | |
215 | status = rtems_rate_monotonic_period( HK_id, HK_PERIOD ); |
|
207 | status = rtems_rate_monotonic_period( HK_id, HK_PERIOD ); | |
216 | if ( status != RTEMS_SUCCESSFUL ) { |
|
208 | if ( status != RTEMS_SUCCESSFUL ) { | |
217 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_period *** code %d\n", status); |
|
209 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_period *** code %d\n", status); | |
218 | } |
|
210 | } | |
219 | else { |
|
211 | else { | |
220 | housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
212 | housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
221 | housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
213 | housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
222 | housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
214 | housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
223 | housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
215 | housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
224 | housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
216 | housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
225 | housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
217 | housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time); | |
226 | housekeeping_packet.sid = SID_HK; |
|
218 | housekeeping_packet.sid = SID_HK; | |
227 |
|
219 | |||
228 |
|
|
220 | spacewire_update_statistics(); | |
229 |
|
221 | |||
230 | // SEND PACKET |
|
222 | // SEND PACKET | |
231 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send, ACTION_MSG_SPW_IOCTL_SEND_SIZE); |
|
223 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send, ACTION_MSG_SPW_IOCTL_SEND_SIZE); | |
232 | if (status != RTEMS_SUCCESSFUL) { |
|
224 | if (status != RTEMS_SUCCESSFUL) { | |
233 | PRINTF1("in HOUS *** ERR %d\n", status) |
|
225 | PRINTF1("in HOUS *** ERR %d\n", status) | |
234 | } |
|
226 | } | |
235 | } |
|
227 | } | |
236 | } |
|
228 | } | |
237 |
|
229 | |||
238 | PRINTF("in HOUS *** deleting task\n") |
|
230 | PRINTF("in HOUS *** deleting task\n") | |
239 |
|
231 | |||
240 | status = rtems_task_delete( RTEMS_SELF ); // should not return |
|
232 | status = rtems_task_delete( RTEMS_SELF ); // should not return | |
241 | printf( "rtems_task_delete returned with status of %d.\n", status ); |
|
233 | printf( "rtems_task_delete returned with status of %d.\n", status ); | |
242 | exit( 1 ); |
|
234 | return; | |
243 | } |
|
235 | } | |
244 |
|
236 | |||
245 |
rtems_task |
|
237 | rtems_task dumb_task( rtems_task_argument unused ) | |
246 | { |
|
238 | { | |
247 | rtems_status_code status; // RTEMS status code |
|
239 | /** This RTEMS taks is used to print messages without affecting the general behaviour of the software. | |
248 | char incomingData[ACTION_MSG_PKTS_MAX_SIZE]; // incoming data buffer |
|
240 | * | |
249 | spw_ioctl_pkt_send *spw_ioctl_send; |
|
241 | * @param unused is the starting argument of the RTEMS task | |
250 | size_t size; // size of the incoming TC packet |
|
242 | * | |
251 | u_int32_t count; |
|
243 | * The DUMB taks waits for RTEMS events and print messages depending on the incoming events. | |
252 | rtems_id queue_id; |
|
244 | * | |
253 |
|
245 | */ | ||
254 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); |
|
|||
255 | if (status != RTEMS_SUCCESSFUL) |
|
|||
256 | { |
|
|||
257 | PRINTF1("in SEND *** ERR getting queue id, %d\n", status) |
|
|||
258 | } |
|
|||
259 |
|
246 | |||
260 | BOOT_PRINTF("in SEND *** \n") |
|
247 | unsigned int i; | |
|
248 | unsigned int intEventOut; | |||
|
249 | unsigned int coarse_time = 0; | |||
|
250 | unsigned int fine_time = 0; | |||
|
251 | rtems_event_set event_out; | |||
261 |
|
252 | |||
262 | while(1) |
|
253 | BOOT_PRINTF("in DUMB *** \n") | |
263 | { |
|
|||
264 | status = rtems_message_queue_receive( queue_id, incomingData, &size, |
|
|||
265 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); |
|
|||
266 |
|
254 | |||
267 | if (status!=RTEMS_SUCCESSFUL) |
|
255 | while(1){ | |
|
256 | rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 | RTEMS_EVENT_4 | RTEMS_EVENT_5, | |||
|
257 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT | |||
|
258 | intEventOut = (unsigned int) event_out; | |||
|
259 | for ( i=0; i<32; i++) | |||
268 | { |
|
260 | { | |
269 | PRINTF1("in SEND *** (1) ERR = %d\n", status) |
|
261 | if ( ((intEventOut >> i) & 0x0001) != 0) | |
270 | } |
|
|||
271 | else |
|
|||
272 | { |
|
|||
273 | if ( incomingData[0] == CCSDS_DESTINATION_ID) // the incoming message is a ccsds packet |
|
|||
274 | { |
|
262 | { | |
275 | status = write( fdSPW, incomingData, size ); |
|
263 | coarse_time = time_management_regs->coarse_time; | |
276 | if (status == -1){ |
|
264 | fine_time = time_management_regs->fine_time; | |
277 | PRINTF2("in SEND *** (2.a) ERR = %d, size = %d\n", status, size) |
|
265 | printf("in DUMB *** time = coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); | |
278 | } |
|
|||
279 | } |
|
|||
280 | else // the incoming message is a spw_ioctl_pkt_send structure |
|
|||
281 | { |
|
|||
282 | spw_ioctl_send = (spw_ioctl_pkt_send*) incomingData; |
|
|||
283 | if (spw_ioctl_send->hlen == 0) |
|
|||
284 | { |
|
|||
285 | status = write( fdSPW, spw_ioctl_send->data, spw_ioctl_send->dlen ); |
|
|||
286 | if (status == -1){ |
|
|||
287 | PRINTF2("in SEND *** (2.b) ERR = %d, dlen = %d\n", status, spw_ioctl_send->dlen) |
|
|||
288 | } |
|
|||
289 | } |
|
|||
290 | else |
|
|||
291 | { |
|
|||
292 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_SEND, spw_ioctl_send ); |
|
|||
293 | if (status == -1){ |
|
|||
294 | PRINTF2("in SEND *** (2.c) ERR = %d, dlen = %d\n", status, spw_ioctl_send->dlen) |
|
|||
295 | PRINTF1(" hlen = %d\n", spw_ioctl_send->hlen) |
|
|||
296 | } |
|
|||
297 | } |
|
|||
298 | } |
|
|||
299 | } |
|
|||
300 |
|
||||
301 | status = rtems_message_queue_get_number_pending( queue_id, &count ); |
|
|||
302 | if (status != RTEMS_SUCCESSFUL) |
|
|||
303 | { |
|
|||
304 | PRINTF1("in SEND *** (3) ERR = %d\n", status) |
|
|||
305 | } |
|
|||
306 | else |
|
|||
307 | { |
|
|||
308 | if (count > maxCount) |
|
|||
309 | { |
|
|||
310 | maxCount = count; |
|
|||
311 | } |
|
266 | } | |
312 | } |
|
267 | } | |
313 | } |
|
268 | } | |
314 | } |
|
269 | } | |
315 |
|
270 | |||
316 | rtems_id get_pkts_queue_id( void ) |
|
|||
317 | { |
|
|||
318 | rtems_id queue_id; |
|
|||
319 | rtems_status_code status; |
|
|||
320 |
|
||||
321 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); |
|
|||
322 | if (status != RTEMS_SUCCESSFUL) |
|
|||
323 | { |
|
|||
324 | PRINTF1("in get_pkts_queue_id *** ERR %d\n", status) |
|
|||
325 | } |
|
|||
326 | return queue_id; |
|
|||
327 | } |
|
|||
328 |
|
271 | |||
329 |
|
272 | |||
330 |
|
273 | |||
331 |
|
274 |
@@ -1,669 +1,678 | |||||
|
1 | /** Functions related to data processing. | |||
|
2 | * | |||
|
3 | * @file | |||
|
4 | * @author P. LEROY | |||
|
5 | * | |||
|
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. | |||
|
7 | * | |||
|
8 | */ | |||
|
9 | ||||
1 | #include <fsw_processing.h> |
|
10 | #include <fsw_processing.h> | |
2 | #include <math.h> |
|
11 | #include <math.h> | |
3 |
|
12 | |||
4 |
#include |
|
13 | #include "fsw_processing_globals.c" | |
5 |
|
14 | |||
6 | unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_SM_F0 * 9 ]; |
|
15 | unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_SM_F0 * 9 ]; | |
7 | BP1_t data_BP1[ NB_BINS_COMPRESSED_SM_F0 ]; |
|
16 | BP1_t data_BP1[ NB_BINS_COMPRESSED_SM_F0 ]; | |
8 | float averaged_spec_mat_f0[ TOTAL_SIZE_SM ]; |
|
17 | float averaged_spec_mat_f0[ TOTAL_SIZE_SM ]; | |
9 | char averaged_spec_mat_f0_char[ TOTAL_SIZE_SM * 2 ]; |
|
18 | char averaged_spec_mat_f0_char[ TOTAL_SIZE_SM * 2 ]; | |
10 | float compressed_spec_mat_f0[ TOTAL_SIZE_COMPRESSED_MATRIX_f0 ]; |
|
19 | float compressed_spec_mat_f0[ TOTAL_SIZE_COMPRESSED_MATRIX_f0 ]; | |
11 |
|
20 | |||
12 | //*********************************************************** |
|
21 | //*********************************************************** | |
13 | // Interrupt Service Routine for spectral matrices processing |
|
22 | // Interrupt Service Routine for spectral matrices processing | |
14 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ) |
|
23 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ) | |
15 | { |
|
24 | { | |
16 | unsigned char status; |
|
25 | unsigned char status; | |
17 | unsigned char i; |
|
26 | unsigned char i; | |
18 |
|
27 | |||
19 | status = spectral_matrix_regs->status; //[f2 f1 f0_1 f0_0] |
|
28 | status = spectral_matrix_regs->status; //[f2 f1 f0_1 f0_0] | |
20 | for (i=0; i<4; i++) |
|
29 | for (i=0; i<4; i++) | |
21 | { |
|
30 | { | |
22 | if ( ( (status >> i) & 0x01) == 1) // (1) buffer rotation |
|
31 | if ( ( (status >> i) & 0x01) == 1) // (1) buffer rotation | |
23 | { |
|
32 | { | |
24 | switch(i) |
|
33 | switch(i) | |
25 | { |
|
34 | { | |
26 | case 0: |
|
35 | case 0: | |
27 | if (spectral_matrix_regs->matrixF0_Address0 == (int) spec_mat_f0_0) |
|
36 | if (spectral_matrix_regs->matrixF0_Address0 == (int) spec_mat_f0_0) | |
28 | { |
|
37 | { | |
29 | spectral_matrix_regs->matrixF0_Address0 = (int) spec_mat_f0_0_bis; |
|
38 | spectral_matrix_regs->matrixF0_Address0 = (int) spec_mat_f0_0_bis; | |
30 | } |
|
39 | } | |
31 | else |
|
40 | else | |
32 | { |
|
41 | { | |
33 | spectral_matrix_regs->matrixF0_Address0 = (int) spec_mat_f0_0; |
|
42 | spectral_matrix_regs->matrixF0_Address0 = (int) spec_mat_f0_0; | |
34 | } |
|
43 | } | |
35 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; |
|
44 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; | |
36 | break; |
|
45 | break; | |
37 | case 1: |
|
46 | case 1: | |
38 | if (spectral_matrix_regs->matrixFO_Address1 == (int) spec_mat_f0_1) |
|
47 | if (spectral_matrix_regs->matrixFO_Address1 == (int) spec_mat_f0_1) | |
39 | { |
|
48 | { | |
40 | spectral_matrix_regs->matrixFO_Address1 = (int) spec_mat_f0_1_bis; |
|
49 | spectral_matrix_regs->matrixFO_Address1 = (int) spec_mat_f0_1_bis; | |
41 | } |
|
50 | } | |
42 | else |
|
51 | else | |
43 | { |
|
52 | { | |
44 | spectral_matrix_regs->matrixFO_Address1 = (int) spec_mat_f0_1; |
|
53 | spectral_matrix_regs->matrixFO_Address1 = (int) spec_mat_f0_1; | |
45 | } |
|
54 | } | |
46 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffd; |
|
55 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffd; | |
47 | break; |
|
56 | break; | |
48 | case 2: |
|
57 | case 2: | |
49 | if (spectral_matrix_regs->matrixF1_Address == (int) spec_mat_f1) |
|
58 | if (spectral_matrix_regs->matrixF1_Address == (int) spec_mat_f1) | |
50 | { |
|
59 | { | |
51 | spectral_matrix_regs->matrixF1_Address = (int) spec_mat_f1_bis; |
|
60 | spectral_matrix_regs->matrixF1_Address = (int) spec_mat_f1_bis; | |
52 | } |
|
61 | } | |
53 | else |
|
62 | else | |
54 | { |
|
63 | { | |
55 | spectral_matrix_regs->matrixF1_Address = (int) spec_mat_f1; |
|
64 | spectral_matrix_regs->matrixF1_Address = (int) spec_mat_f1; | |
56 | } |
|
65 | } | |
57 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffb; |
|
66 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffb; | |
58 | break; |
|
67 | break; | |
59 | case 3: |
|
68 | case 3: | |
60 | if (spectral_matrix_regs->matrixF2_Address == (int) spec_mat_f2) |
|
69 | if (spectral_matrix_regs->matrixF2_Address == (int) spec_mat_f2) | |
61 | { |
|
70 | { | |
62 | spectral_matrix_regs->matrixF2_Address = (int) spec_mat_f2_bis; |
|
71 | spectral_matrix_regs->matrixF2_Address = (int) spec_mat_f2_bis; | |
63 | } |
|
72 | } | |
64 | else |
|
73 | else | |
65 | { |
|
74 | { | |
66 | spectral_matrix_regs->matrixF2_Address = (int) spec_mat_f2; |
|
75 | spectral_matrix_regs->matrixF2_Address = (int) spec_mat_f2; | |
67 | } |
|
76 | } | |
68 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffff7; |
|
77 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffff7; | |
69 | break; |
|
78 | break; | |
70 | default: |
|
79 | default: | |
71 | break; |
|
80 | break; | |
72 | } |
|
81 | } | |
73 | } |
|
82 | } | |
74 | } |
|
83 | } | |
75 |
|
84 | |||
76 | // reset error codes to 0 |
|
85 | // reset error codes to 0 | |
77 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xffffffcf; // [1100 1111] |
|
86 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xffffffcf; // [1100 1111] | |
78 |
|
87 | |||
79 | if (rtems_event_send( Task_id[TASKID_SMIQ], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
88 | if (rtems_event_send( Task_id[TASKID_SMIQ], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
80 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_4 ); |
|
89 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_4 ); | |
81 | } |
|
90 | } | |
82 | } |
|
91 | } | |
83 |
|
92 | |||
84 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ) |
|
93 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ) | |
85 | { |
|
94 | { | |
86 | if (rtems_event_send( Task_id[TASKID_SMIQ], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
95 | if (rtems_event_send( Task_id[TASKID_SMIQ], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
87 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_4 ); |
|
96 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_4 ); | |
88 | } |
|
97 | } | |
89 | } |
|
98 | } | |
90 |
|
99 | |||
91 | //************ |
|
100 | //************ | |
92 | // RTEMS TASKS |
|
101 | // RTEMS TASKS | |
93 |
|
102 | |||
94 | rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ |
|
103 | rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ | |
95 | { |
|
104 | { | |
96 | rtems_event_set event_out; |
|
105 | rtems_event_set event_out; | |
97 | unsigned int nb_interrupt_f0 = 0; |
|
106 | unsigned int nb_interrupt_f0 = 0; | |
98 |
|
107 | |||
99 | BOOT_PRINTF("in SMIQ *** \n") |
|
108 | BOOT_PRINTF("in SMIQ *** \n") | |
100 |
|
109 | |||
101 | while(1){ |
|
110 | while(1){ | |
102 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
111 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
103 | nb_interrupt_f0 = nb_interrupt_f0 + 1; |
|
112 | nb_interrupt_f0 = nb_interrupt_f0 + 1; | |
104 | if (nb_interrupt_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ){ |
|
113 | if (nb_interrupt_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ){ | |
105 | if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) |
|
114 | if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) | |
106 | { |
|
115 | { | |
107 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); |
|
116 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); | |
108 | } |
|
117 | } | |
109 | nb_interrupt_f0 = 0; |
|
118 | nb_interrupt_f0 = 0; | |
110 | } |
|
119 | } | |
111 | } |
|
120 | } | |
112 | } |
|
121 | } | |
113 |
|
122 | |||
114 | //rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ |
|
123 | //rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ | |
115 | //{ |
|
124 | //{ | |
116 | // rtems_event_set event_out; |
|
125 | // rtems_event_set event_out; | |
117 | // unsigned int nb_interrupt_f0 = 0; |
|
126 | // unsigned int nb_interrupt_f0 = 0; | |
118 |
|
127 | |||
119 | // PRINTF("in SMIQ *** \n") |
|
128 | // PRINTF("in SMIQ *** \n") | |
120 |
|
129 | |||
121 | // while(1){ |
|
130 | // while(1){ | |
122 | // rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
131 | // rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
123 | // nb_interrupt_f0 = nb_interrupt_f0 + 1; |
|
132 | // nb_interrupt_f0 = nb_interrupt_f0 + 1; | |
124 | // if (nb_interrupt_f0 == param_local.local_nb_interrupt_f0_MAX ){ |
|
133 | // if (nb_interrupt_f0 == param_local.local_nb_interrupt_f0_MAX ){ | |
125 | // if (rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) |
|
134 | // if (rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) | |
126 | // { |
|
135 | // { | |
127 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); |
|
136 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); | |
128 | // } |
|
137 | // } | |
129 | // nb_interrupt_f0 = 0; |
|
138 | // nb_interrupt_f0 = 0; | |
130 | // } |
|
139 | // } | |
131 | // } |
|
140 | // } | |
132 | //} |
|
141 | //} | |
133 |
|
142 | |||
134 | rtems_task spw_bppr_task(rtems_task_argument argument) |
|
143 | rtems_task spw_bppr_task(rtems_task_argument argument) | |
135 | { |
|
144 | { | |
136 | rtems_status_code status; |
|
145 | rtems_status_code status; | |
137 | rtems_event_set event_out; |
|
146 | rtems_event_set event_out; | |
138 |
|
147 | |||
139 | BOOT_PRINTF("in BPPR ***\n"); |
|
148 | BOOT_PRINTF("in BPPR ***\n"); | |
140 |
|
149 | |||
141 | while( true ){ // wait for an event to begin with the processing |
|
150 | while( true ){ // wait for an event to begin with the processing | |
142 | status = rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); |
|
151 | status = rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); | |
143 | } |
|
152 | } | |
144 | } |
|
153 | } | |
145 |
|
154 | |||
146 | rtems_task avf0_task(rtems_task_argument argument) |
|
155 | rtems_task avf0_task(rtems_task_argument argument) | |
147 | { |
|
156 | { | |
148 | int i; |
|
157 | int i; | |
149 | static int nb_average; |
|
158 | static int nb_average; | |
150 | rtems_event_set event_out; |
|
159 | rtems_event_set event_out; | |
151 | rtems_status_code status; |
|
160 | rtems_status_code status; | |
152 |
|
161 | |||
153 | nb_average = 0; |
|
162 | nb_average = 0; | |
154 |
|
163 | |||
155 | BOOT_PRINTF("in AVFO *** \n") |
|
164 | BOOT_PRINTF("in AVFO *** \n") | |
156 |
|
165 | |||
157 | while(1){ |
|
166 | while(1){ | |
158 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
167 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
159 | for(i=0; i<TOTAL_SIZE_SM; i++){ |
|
168 | for(i=0; i<TOTAL_SIZE_SM; i++){ | |
160 | averaged_spec_mat_f0[i] = averaged_spec_mat_f0[i] + spec_mat_f0_a[i] |
|
169 | averaged_spec_mat_f0[i] = averaged_spec_mat_f0[i] + spec_mat_f0_a[i] | |
161 | + spec_mat_f0_b[i] |
|
170 | + spec_mat_f0_b[i] | |
162 | + spec_mat_f0_c[i] |
|
171 | + spec_mat_f0_c[i] | |
163 | + spec_mat_f0_d[i] |
|
172 | + spec_mat_f0_d[i] | |
164 | + spec_mat_f0_e[i] |
|
173 | + spec_mat_f0_e[i] | |
165 | + spec_mat_f0_f[i] |
|
174 | + spec_mat_f0_f[i] | |
166 | + spec_mat_f0_g[i] |
|
175 | + spec_mat_f0_g[i] | |
167 | + spec_mat_f0_h[i]; |
|
176 | + spec_mat_f0_h[i]; | |
168 | } |
|
177 | } | |
169 | nb_average = nb_average + NB_SM_TO_RECEIVE_BEFORE_AVF0; |
|
178 | nb_average = nb_average + NB_SM_TO_RECEIVE_BEFORE_AVF0; | |
170 | if (nb_average == NB_AVERAGE_NORMAL_f0) { |
|
179 | if (nb_average == NB_AVERAGE_NORMAL_f0) { | |
171 | nb_average = 0; |
|
180 | nb_average = 0; | |
172 | status = rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ); // sending an event to the task 7, BPF0 |
|
181 | status = rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ); // sending an event to the task 7, BPF0 | |
173 | if (status != RTEMS_SUCCESSFUL) { |
|
182 | if (status != RTEMS_SUCCESSFUL) { | |
174 | printf("in AVF0 *** Error sending RTEMS_EVENT_0, code %d\n", status); |
|
183 | printf("in AVF0 *** Error sending RTEMS_EVENT_0, code %d\n", status); | |
175 | } |
|
184 | } | |
176 | } |
|
185 | } | |
177 | } |
|
186 | } | |
178 | } |
|
187 | } | |
179 |
|
188 | |||
180 | rtems_task bpf0_task(rtems_task_argument argument) |
|
189 | rtems_task bpf0_task(rtems_task_argument argument) | |
181 | { |
|
190 | { | |
182 | rtems_event_set event_out; |
|
191 | rtems_event_set event_out; | |
183 |
|
192 | |||
184 | BOOT_PRINTF("in BPFO *** \n") |
|
193 | BOOT_PRINTF("in BPFO *** \n") | |
185 |
|
194 | |||
186 | while(1){ |
|
195 | while(1){ | |
187 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
196 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
188 | matrix_compression(averaged_spec_mat_f0, 0, compressed_spec_mat_f0); |
|
197 | matrix_compression(averaged_spec_mat_f0, 0, compressed_spec_mat_f0); | |
189 | BP1_set(compressed_spec_mat_f0, NB_BINS_COMPRESSED_SM_F0, LFR_BP1_F0); |
|
198 | BP1_set(compressed_spec_mat_f0, NB_BINS_COMPRESSED_SM_F0, LFR_BP1_F0); | |
190 | //PRINTF("IN TASK BPF0 *** Matrix compressed, parameters calculated\n") |
|
199 | //PRINTF("IN TASK BPF0 *** Matrix compressed, parameters calculated\n") | |
191 | } |
|
200 | } | |
192 | } |
|
201 | } | |
193 |
|
202 | |||
194 | rtems_task matr_task(rtems_task_argument argument) |
|
203 | rtems_task matr_task(rtems_task_argument argument) | |
195 | { |
|
204 | { | |
196 | spw_ioctl_pkt_send spw_ioctl_send_ASM; |
|
205 | spw_ioctl_pkt_send spw_ioctl_send_ASM; | |
197 | rtems_event_set event_out; |
|
206 | rtems_event_set event_out; | |
198 | rtems_status_code status; |
|
207 | rtems_status_code status; | |
199 | rtems_id queue_id; |
|
208 | rtems_id queue_id; | |
200 | Header_TM_LFR_SCIENCE_ASM_t headerASM; |
|
209 | Header_TM_LFR_SCIENCE_ASM_t headerASM; | |
201 |
|
210 | |||
202 | init_header_asm( &headerASM ); |
|
211 | init_header_asm( &headerASM ); | |
203 |
|
212 | |||
204 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); |
|
213 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |
205 | if (status != RTEMS_SUCCESSFUL) |
|
214 | if (status != RTEMS_SUCCESSFUL) | |
206 | { |
|
215 | { | |
207 | PRINTF1("in MATR *** ERR getting queue id, %d\n", status) |
|
216 | PRINTF1("in MATR *** ERR getting queue id, %d\n", status) | |
208 | } |
|
217 | } | |
209 |
|
218 | |||
210 | BOOT_PRINTF("in MATR *** \n") |
|
219 | BOOT_PRINTF("in MATR *** \n") | |
211 |
|
220 | |||
212 | fill_averaged_spectral_matrix( ); |
|
221 | fill_averaged_spectral_matrix( ); | |
213 |
|
222 | |||
214 | while(1){ |
|
223 | while(1){ | |
215 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
224 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
216 |
|
225 | |||
217 | #ifdef GSA |
|
226 | #ifdef GSA | |
218 | #else |
|
227 | #else | |
219 | fill_averaged_spectral_matrix( ); |
|
228 | fill_averaged_spectral_matrix( ); | |
220 | #endif |
|
229 | #endif | |
221 | convert_averaged_spectral_matrix( averaged_spec_mat_f0, averaged_spec_mat_f0_char); |
|
230 | convert_averaged_spectral_matrix( averaged_spec_mat_f0, averaged_spec_mat_f0_char); | |
222 |
|
231 | |||
223 | send_spectral_matrix( &headerASM, averaged_spec_mat_f0_char, SID_NORM_ASM_F0, &spw_ioctl_send_ASM, queue_id); |
|
232 | send_spectral_matrix( &headerASM, averaged_spec_mat_f0_char, SID_NORM_ASM_F0, &spw_ioctl_send_ASM, queue_id); | |
224 | } |
|
233 | } | |
225 | } |
|
234 | } | |
226 |
|
235 | |||
227 | //***************************** |
|
236 | //***************************** | |
228 | // Spectral matrices processing |
|
237 | // Spectral matrices processing | |
229 |
|
238 | |||
230 | void matrix_reset(volatile float *averaged_spec_mat) |
|
239 | void matrix_reset(volatile float *averaged_spec_mat) | |
231 | { |
|
240 | { | |
232 | // int i; |
|
241 | // int i; | |
233 | // for(i=0; i<TOTAL_SIZE_SM; i++){ |
|
242 | // for(i=0; i<TOTAL_SIZE_SM; i++){ | |
234 | // averaged_spec_mat_f0[i] = 0; |
|
243 | // averaged_spec_mat_f0[i] = 0; | |
235 | // } |
|
244 | // } | |
236 | } |
|
245 | } | |
237 |
|
246 | |||
238 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat) |
|
247 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat) | |
239 | { |
|
248 | { | |
240 | int i; |
|
249 | int i; | |
241 | int j; |
|
250 | int j; | |
242 | switch (fChannel){ |
|
251 | switch (fChannel){ | |
243 | case 0: |
|
252 | case 0: | |
244 | for(i=0;i<NB_BINS_COMPRESSED_SM_F0;i++){ |
|
253 | for(i=0;i<NB_BINS_COMPRESSED_SM_F0;i++){ | |
245 | j = 17 + (i * 8); |
|
254 | j = 17 + (i * 8); | |
246 | compressed_spec_mat[i] = (averaged_spec_mat[j] |
|
255 | compressed_spec_mat[i] = (averaged_spec_mat[j] | |
247 | + averaged_spec_mat[j+1] |
|
256 | + averaged_spec_mat[j+1] | |
248 | + averaged_spec_mat[j+2] |
|
257 | + averaged_spec_mat[j+2] | |
249 | + averaged_spec_mat[j+3] |
|
258 | + averaged_spec_mat[j+3] | |
250 | + averaged_spec_mat[j+4] |
|
259 | + averaged_spec_mat[j+4] | |
251 | + averaged_spec_mat[j+5] |
|
260 | + averaged_spec_mat[j+5] | |
252 | + averaged_spec_mat[j+6] |
|
261 | + averaged_spec_mat[j+6] | |
253 | + averaged_spec_mat[j+7])/(8*NB_AVERAGE_NORMAL_f0); |
|
262 | + averaged_spec_mat[j+7])/(8*NB_AVERAGE_NORMAL_f0); | |
254 | } |
|
263 | } | |
255 | break; |
|
264 | break; | |
256 | case 1: |
|
265 | case 1: | |
257 | // case fChannel = f1 to be completed later |
|
266 | // case fChannel = f1 to be completed later | |
258 | break; |
|
267 | break; | |
259 | case 2: |
|
268 | case 2: | |
260 | // case fChannel = f1 to be completed later |
|
269 | // case fChannel = f1 to be completed later | |
261 | break; |
|
270 | break; | |
262 | default: |
|
271 | default: | |
263 | break; |
|
272 | break; | |
264 | } |
|
273 | } | |
265 | } |
|
274 | } | |
266 |
|
275 | |||
267 | void BP1_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1){ |
|
276 | void BP1_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1){ | |
268 | int i; |
|
277 | int i; | |
269 | int j; |
|
278 | int j; | |
270 | unsigned char tmp_u_char; |
|
279 | unsigned char tmp_u_char; | |
271 | unsigned char * pt_char = NULL; |
|
280 | unsigned char * pt_char = NULL; | |
272 | float PSDB, PSDE; |
|
281 | float PSDB, PSDE; | |
273 | float NVEC_V0; |
|
282 | float NVEC_V0; | |
274 | float NVEC_V1; |
|
283 | float NVEC_V1; | |
275 | float NVEC_V2; |
|
284 | float NVEC_V2; | |
276 | //float significand; |
|
285 | //float significand; | |
277 | //int exponent; |
|
286 | //int exponent; | |
278 | float aux; |
|
287 | float aux; | |
279 | float tr_SB_SB; |
|
288 | float tr_SB_SB; | |
280 | float tmp; |
|
289 | float tmp; | |
281 | float sx_re; |
|
290 | float sx_re; | |
282 | float sx_im; |
|
291 | float sx_im; | |
283 | float nebx_re = 0; |
|
292 | float nebx_re = 0; | |
284 | float nebx_im = 0; |
|
293 | float nebx_im = 0; | |
285 | float ny = 0; |
|
294 | float ny = 0; | |
286 | float nz = 0; |
|
295 | float nz = 0; | |
287 | float bx_bx_star = 0; |
|
296 | float bx_bx_star = 0; | |
288 | for(i=0; i<nb_bins_compressed_spec_mat; i++){ |
|
297 | for(i=0; i<nb_bins_compressed_spec_mat; i++){ | |
289 | //============================================== |
|
298 | //============================================== | |
290 | // BP1 PSD == B PAR_LFR_SC_BP1_PE_FL0 == 16 bits |
|
299 | // BP1 PSD == B PAR_LFR_SC_BP1_PE_FL0 == 16 bits | |
291 | PSDB = compressed_spec_mat[i*30] // S11 |
|
300 | PSDB = compressed_spec_mat[i*30] // S11 | |
292 | + compressed_spec_mat[(i*30) + 10] // S22 |
|
301 | + compressed_spec_mat[(i*30) + 10] // S22 | |
293 | + compressed_spec_mat[(i*30) + 18]; // S33 |
|
302 | + compressed_spec_mat[(i*30) + 18]; // S33 | |
294 | //significand = frexp(PSDB, &exponent); |
|
303 | //significand = frexp(PSDB, &exponent); | |
295 | pt_char = (unsigned char*) &PSDB; |
|
304 | pt_char = (unsigned char*) &PSDB; | |
296 | LFR_BP1[(i*9) + 2] = pt_char[0]; // bits 31 downto 24 of the float |
|
305 | LFR_BP1[(i*9) + 2] = pt_char[0]; // bits 31 downto 24 of the float | |
297 | LFR_BP1[(i*9) + 3] = pt_char[1]; // bits 23 downto 16 of the float |
|
306 | LFR_BP1[(i*9) + 3] = pt_char[1]; // bits 23 downto 16 of the float | |
298 | //============================================== |
|
307 | //============================================== | |
299 | // BP1 PSD == E PAR_LFR_SC_BP1_PB_FL0 == 16 bits |
|
308 | // BP1 PSD == E PAR_LFR_SC_BP1_PB_FL0 == 16 bits | |
300 | PSDE = compressed_spec_mat[(i*30) + 24] * K44_pe // S44 |
|
309 | PSDE = compressed_spec_mat[(i*30) + 24] * K44_pe // S44 | |
301 | + compressed_spec_mat[(i*30) + 28] * K55_pe // S55 |
|
310 | + compressed_spec_mat[(i*30) + 28] * K55_pe // S55 | |
302 | + compressed_spec_mat[(i*30) + 26] * K45_pe_re // S45 |
|
311 | + compressed_spec_mat[(i*30) + 26] * K45_pe_re // S45 | |
303 | - compressed_spec_mat[(i*30) + 27] * K45_pe_im; // S45 |
|
312 | - compressed_spec_mat[(i*30) + 27] * K45_pe_im; // S45 | |
304 | pt_char = (unsigned char*) &PSDE; |
|
313 | pt_char = (unsigned char*) &PSDE; | |
305 | LFR_BP1[(i*9) + 0] = pt_char[0]; // bits 31 downto 24 of the float |
|
314 | LFR_BP1[(i*9) + 0] = pt_char[0]; // bits 31 downto 24 of the float | |
306 | LFR_BP1[(i*9) + 1] = pt_char[1]; // bits 23 downto 16 of the float |
|
315 | LFR_BP1[(i*9) + 1] = pt_char[1]; // bits 23 downto 16 of the float | |
307 | //============================================================================== |
|
316 | //============================================================================== | |
308 | // BP1 normal wave vector == PAR_LFR_SC_BP1_NVEC_V0_F0 == 8 bits |
|
317 | // BP1 normal wave vector == PAR_LFR_SC_BP1_NVEC_V0_F0 == 8 bits | |
309 | // == PAR_LFR_SC_BP1_NVEC_V1_F0 == 8 bits |
|
318 | // == PAR_LFR_SC_BP1_NVEC_V1_F0 == 8 bits | |
310 | // == PAR_LFR_SC_BP1_NVEC_V2_F0 == 1 bits |
|
319 | // == PAR_LFR_SC_BP1_NVEC_V2_F0 == 1 bits | |
311 | tmp = sqrt( |
|
320 | tmp = sqrt( | |
312 | compressed_spec_mat[(i*30) + 3]*compressed_spec_mat[(i*30) + 3] //Im S12 |
|
321 | compressed_spec_mat[(i*30) + 3]*compressed_spec_mat[(i*30) + 3] //Im S12 | |
313 | +compressed_spec_mat[(i*30) + 5]*compressed_spec_mat[(i*30) + 5] //Im S13 |
|
322 | +compressed_spec_mat[(i*30) + 5]*compressed_spec_mat[(i*30) + 5] //Im S13 | |
314 | +compressed_spec_mat[(i*30) + 13]*compressed_spec_mat[(i*30) + 13] //Im S23 |
|
323 | +compressed_spec_mat[(i*30) + 13]*compressed_spec_mat[(i*30) + 13] //Im S23 | |
315 | ); |
|
324 | ); | |
316 | NVEC_V0 = compressed_spec_mat[(i*30) + 13] / tmp; // Im S23 |
|
325 | NVEC_V0 = compressed_spec_mat[(i*30) + 13] / tmp; // Im S23 | |
317 | NVEC_V1 = -compressed_spec_mat[(i*30) + 5] / tmp; // Im S13 |
|
326 | NVEC_V1 = -compressed_spec_mat[(i*30) + 5] / tmp; // Im S13 | |
318 | NVEC_V2 = compressed_spec_mat[(i*30) + 3] / tmp; // Im S12 |
|
327 | NVEC_V2 = compressed_spec_mat[(i*30) + 3] / tmp; // Im S12 | |
319 | LFR_BP1[(i*9) + 4] = (char) (NVEC_V0*127); |
|
328 | LFR_BP1[(i*9) + 4] = (char) (NVEC_V0*127); | |
320 | LFR_BP1[(i*9) + 5] = (char) (NVEC_V1*127); |
|
329 | LFR_BP1[(i*9) + 5] = (char) (NVEC_V1*127); | |
321 | pt_char = (unsigned char*) &NVEC_V2; |
|
330 | pt_char = (unsigned char*) &NVEC_V2; | |
322 | LFR_BP1[(i*9) + 6] = pt_char[0] & 0x80; // extract the sign of NVEC_V2 |
|
331 | LFR_BP1[(i*9) + 6] = pt_char[0] & 0x80; // extract the sign of NVEC_V2 | |
323 | //======================================================= |
|
332 | //======================================================= | |
324 | // BP1 ellipticity == PAR_LFR_SC_BP1_ELLIP_F0 == 4 bits |
|
333 | // BP1 ellipticity == PAR_LFR_SC_BP1_ELLIP_F0 == 4 bits | |
325 | aux = 2*tmp / PSDB; // compute the ellipticity |
|
334 | aux = 2*tmp / PSDB; // compute the ellipticity | |
326 | tmp_u_char = (unsigned char) (aux*(16-1)); // convert the ellipticity |
|
335 | tmp_u_char = (unsigned char) (aux*(16-1)); // convert the ellipticity | |
327 | LFR_BP1[i*9+6] = LFR_BP1[i*9+6] | ((tmp_u_char&0x0f)<<3); // keeps 4 bits of the resulting unsigned char |
|
336 | LFR_BP1[i*9+6] = LFR_BP1[i*9+6] | ((tmp_u_char&0x0f)<<3); // keeps 4 bits of the resulting unsigned char | |
328 | //============================================================== |
|
337 | //============================================================== | |
329 | // BP1 degree of polarization == PAR_LFR_SC_BP1_DOP_F0 == 3 bits |
|
338 | // BP1 degree of polarization == PAR_LFR_SC_BP1_DOP_F0 == 3 bits | |
330 | for(j = 0; j<NB_VALUES_PER_SM;j++){ |
|
339 | for(j = 0; j<NB_VALUES_PER_SM;j++){ | |
331 | tr_SB_SB = compressed_spec_mat[i*30] * compressed_spec_mat[i*30] |
|
340 | tr_SB_SB = compressed_spec_mat[i*30] * compressed_spec_mat[i*30] | |
332 | + compressed_spec_mat[(i*30) + 10] * compressed_spec_mat[(i*30) + 10] |
|
341 | + compressed_spec_mat[(i*30) + 10] * compressed_spec_mat[(i*30) + 10] | |
333 | + compressed_spec_mat[(i*30) + 18] * compressed_spec_mat[(i*30) + 18] |
|
342 | + compressed_spec_mat[(i*30) + 18] * compressed_spec_mat[(i*30) + 18] | |
334 | + 2 * compressed_spec_mat[(i*30) + 2] * compressed_spec_mat[(i*30) + 2] |
|
343 | + 2 * compressed_spec_mat[(i*30) + 2] * compressed_spec_mat[(i*30) + 2] | |
335 | + 2 * compressed_spec_mat[(i*30) + 3] * compressed_spec_mat[(i*30) + 3] |
|
344 | + 2 * compressed_spec_mat[(i*30) + 3] * compressed_spec_mat[(i*30) + 3] | |
336 | + 2 * compressed_spec_mat[(i*30) + 4] * compressed_spec_mat[(i*30) + 4] |
|
345 | + 2 * compressed_spec_mat[(i*30) + 4] * compressed_spec_mat[(i*30) + 4] | |
337 | + 2 * compressed_spec_mat[(i*30) + 5] * compressed_spec_mat[(i*30) + 5] |
|
346 | + 2 * compressed_spec_mat[(i*30) + 5] * compressed_spec_mat[(i*30) + 5] | |
338 | + 2 * compressed_spec_mat[(i*30) + 12] * compressed_spec_mat[(i*30) + 12] |
|
347 | + 2 * compressed_spec_mat[(i*30) + 12] * compressed_spec_mat[(i*30) + 12] | |
339 | + 2 * compressed_spec_mat[(i*30) + 13] * compressed_spec_mat[(i*30) + 13]; |
|
348 | + 2 * compressed_spec_mat[(i*30) + 13] * compressed_spec_mat[(i*30) + 13]; | |
340 | } |
|
349 | } | |
341 | aux = PSDB*PSDB; |
|
350 | aux = PSDB*PSDB; | |
342 | tmp = sqrt( abs( ( 3*tr_SB_SB - aux ) / ( 2 * aux ) ) ); |
|
351 | tmp = sqrt( abs( ( 3*tr_SB_SB - aux ) / ( 2 * aux ) ) ); | |
343 | tmp_u_char = (unsigned char) (NVEC_V0*(8-1)); |
|
352 | tmp_u_char = (unsigned char) (NVEC_V0*(8-1)); | |
344 | LFR_BP1[(i*9) + 6] = LFR_BP1[(i*9) + 6] | (tmp_u_char & 0x07); // keeps 3 bits of the resulting unsigned char |
|
353 | LFR_BP1[(i*9) + 6] = LFR_BP1[(i*9) + 6] | (tmp_u_char & 0x07); // keeps 3 bits of the resulting unsigned char | |
345 | //======================================================================================= |
|
354 | //======================================================================================= | |
346 | // BP1 x-component of the normalized Poynting flux == PAR_LFR_SC_BP1_SZ_F0 == 8 bits (7+1) |
|
355 | // BP1 x-component of the normalized Poynting flux == PAR_LFR_SC_BP1_SZ_F0 == 8 bits (7+1) | |
347 | sx_re = compressed_spec_mat[(i*30) + 20] * K34_sx_re |
|
356 | sx_re = compressed_spec_mat[(i*30) + 20] * K34_sx_re | |
348 | + compressed_spec_mat[(i*30) + 6] * K14_sx_re |
|
357 | + compressed_spec_mat[(i*30) + 6] * K14_sx_re | |
349 | + compressed_spec_mat[(i*30) + 8] * K15_sx_re |
|
358 | + compressed_spec_mat[(i*30) + 8] * K15_sx_re | |
350 | + compressed_spec_mat[(i*30) + 14] * K24_sx_re |
|
359 | + compressed_spec_mat[(i*30) + 14] * K24_sx_re | |
351 | + compressed_spec_mat[(i*30) + 16] * K25_sx_re |
|
360 | + compressed_spec_mat[(i*30) + 16] * K25_sx_re | |
352 | + compressed_spec_mat[(i*30) + 22] * K35_sx_re; |
|
361 | + compressed_spec_mat[(i*30) + 22] * K35_sx_re; | |
353 | sx_im = compressed_spec_mat[(i*30) + 21] * K34_sx_im |
|
362 | sx_im = compressed_spec_mat[(i*30) + 21] * K34_sx_im | |
354 | + compressed_spec_mat[(i*30) + 7] * K14_sx_im |
|
363 | + compressed_spec_mat[(i*30) + 7] * K14_sx_im | |
355 | + compressed_spec_mat[(i*30) + 9] * K15_sx_im |
|
364 | + compressed_spec_mat[(i*30) + 9] * K15_sx_im | |
356 | + compressed_spec_mat[(i*30) + 15] * K24_sx_im |
|
365 | + compressed_spec_mat[(i*30) + 15] * K24_sx_im | |
357 | + compressed_spec_mat[(i*30) + 17] * K25_sx_im |
|
366 | + compressed_spec_mat[(i*30) + 17] * K25_sx_im | |
358 | + compressed_spec_mat[(i*30) + 23] * K35_sx_im; |
|
367 | + compressed_spec_mat[(i*30) + 23] * K35_sx_im; | |
359 | LFR_BP1[(i*9) + 7] = ((unsigned char) (sx_re * 128)) & 0x7f; // cf DOC for the compression |
|
368 | LFR_BP1[(i*9) + 7] = ((unsigned char) (sx_re * 128)) & 0x7f; // cf DOC for the compression | |
360 | if ( abs(sx_re) > abs(sx_im) ) { |
|
369 | if ( abs(sx_re) > abs(sx_im) ) { | |
361 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] | (0x80); // extract the sector of sx |
|
370 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] | (0x80); // extract the sector of sx | |
362 | } |
|
371 | } | |
363 | else { |
|
372 | else { | |
364 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] & (0x7f); // extract the sector of sx |
|
373 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] & (0x7f); // extract the sector of sx | |
365 | } |
|
374 | } | |
366 | //====================================================================== |
|
375 | //====================================================================== | |
367 | // BP1 phase velocity estimator == PAR_LFR_SC_BP1_VPHI_F0 == 8 bits (7+1) |
|
376 | // BP1 phase velocity estimator == PAR_LFR_SC_BP1_VPHI_F0 == 8 bits (7+1) | |
368 | ny = sin(Alpha_M)*NVEC_V1 + cos(Alpha_M)*NVEC_V2; |
|
377 | ny = sin(Alpha_M)*NVEC_V1 + cos(Alpha_M)*NVEC_V2; | |
369 | nz = NVEC_V0; |
|
378 | nz = NVEC_V0; | |
370 | bx_bx_star = cos(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+10] // re S22 |
|
379 | bx_bx_star = cos(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+10] // re S22 | |
371 | + sin(Alpha_M) * sin(Alpha_M) * compressed_spec_mat[i*30+18] // re S33 |
|
380 | + sin(Alpha_M) * sin(Alpha_M) * compressed_spec_mat[i*30+18] // re S33 | |
372 | - 2 * sin(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+12]; // re S23 |
|
381 | - 2 * sin(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+12]; // re S23 | |
373 | nebx_re = ny * (compressed_spec_mat[(i*30) + 14] * K24_ny_re |
|
382 | nebx_re = ny * (compressed_spec_mat[(i*30) + 14] * K24_ny_re | |
374 | +compressed_spec_mat[(i*30) + 16] * K25_ny_re |
|
383 | +compressed_spec_mat[(i*30) + 16] * K25_ny_re | |
375 | +compressed_spec_mat[(i*30) + 20] * K34_ny_re |
|
384 | +compressed_spec_mat[(i*30) + 20] * K34_ny_re | |
376 | +compressed_spec_mat[(i*30) + 22] * K35_ny_re) |
|
385 | +compressed_spec_mat[(i*30) + 22] * K35_ny_re) | |
377 | + nz * (compressed_spec_mat[(i*30) + 14] * K24_nz_re |
|
386 | + nz * (compressed_spec_mat[(i*30) + 14] * K24_nz_re | |
378 | +compressed_spec_mat[(i*30) + 16] * K25_nz_re |
|
387 | +compressed_spec_mat[(i*30) + 16] * K25_nz_re | |
379 | +compressed_spec_mat[(i*30) + 20] * K34_nz_re |
|
388 | +compressed_spec_mat[(i*30) + 20] * K34_nz_re | |
380 | +compressed_spec_mat[(i*30) + 22] * K35_nz_re); |
|
389 | +compressed_spec_mat[(i*30) + 22] * K35_nz_re); | |
381 | nebx_im = ny * (compressed_spec_mat[(i*30) + 15]*K24_ny_re |
|
390 | nebx_im = ny * (compressed_spec_mat[(i*30) + 15]*K24_ny_re | |
382 | +compressed_spec_mat[(i*30) + 17] * K25_ny_re |
|
391 | +compressed_spec_mat[(i*30) + 17] * K25_ny_re | |
383 | +compressed_spec_mat[(i*30) + 21] * K34_ny_re |
|
392 | +compressed_spec_mat[(i*30) + 21] * K34_ny_re | |
384 | +compressed_spec_mat[(i*30) + 23] * K35_ny_re) |
|
393 | +compressed_spec_mat[(i*30) + 23] * K35_ny_re) | |
385 | + nz * (compressed_spec_mat[(i*30) + 15] * K24_nz_im |
|
394 | + nz * (compressed_spec_mat[(i*30) + 15] * K24_nz_im | |
386 | +compressed_spec_mat[(i*30) + 17] * K25_nz_im |
|
395 | +compressed_spec_mat[(i*30) + 17] * K25_nz_im | |
387 | +compressed_spec_mat[(i*30) + 21] * K34_nz_im |
|
396 | +compressed_spec_mat[(i*30) + 21] * K34_nz_im | |
388 | +compressed_spec_mat[(i*30) + 23] * K35_nz_im); |
|
397 | +compressed_spec_mat[(i*30) + 23] * K35_nz_im); | |
389 | tmp = nebx_re / bx_bx_star; |
|
398 | tmp = nebx_re / bx_bx_star; | |
390 | LFR_BP1[(i*9) + 8] = ((unsigned char) (tmp * 128)) & 0x7f; // cf DOC for the compression |
|
399 | LFR_BP1[(i*9) + 8] = ((unsigned char) (tmp * 128)) & 0x7f; // cf DOC for the compression | |
391 | if ( abs(nebx_re) > abs(nebx_im) ) { |
|
400 | if ( abs(nebx_re) > abs(nebx_im) ) { | |
392 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] | (0x80); // extract the sector of nebx |
|
401 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] | (0x80); // extract the sector of nebx | |
393 | } |
|
402 | } | |
394 | else { |
|
403 | else { | |
395 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] & (0x7f); // extract the sector of nebx |
|
404 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] & (0x7f); // extract the sector of nebx | |
396 | } |
|
405 | } | |
397 | } |
|
406 | } | |
398 |
|
407 | |||
399 | } |
|
408 | } | |
400 |
|
409 | |||
401 | void BP2_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat){ |
|
410 | void BP2_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat){ | |
402 | // BP2 autocorrelation |
|
411 | // BP2 autocorrelation | |
403 | int i; |
|
412 | int i; | |
404 | int aux = 0; |
|
413 | int aux = 0; | |
405 |
|
414 | |||
406 | for(i = 0; i<nb_bins_compressed_spec_mat; i++){ |
|
415 | for(i = 0; i<nb_bins_compressed_spec_mat; i++){ | |
407 | // S12 |
|
416 | // S12 | |
408 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 10]); |
|
417 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 10]); | |
409 | compressed_spec_mat[(i*30) + 2] = compressed_spec_mat[(i*30) + 2] / aux; |
|
418 | compressed_spec_mat[(i*30) + 2] = compressed_spec_mat[(i*30) + 2] / aux; | |
410 | compressed_spec_mat[(i*30) + 3] = compressed_spec_mat[(i*30) + 3] / aux; |
|
419 | compressed_spec_mat[(i*30) + 3] = compressed_spec_mat[(i*30) + 3] / aux; | |
411 | // S13 |
|
420 | // S13 | |
412 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 18]); |
|
421 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 18]); | |
413 | compressed_spec_mat[(i*30) + 4] = compressed_spec_mat[(i*30) + 4] / aux; |
|
422 | compressed_spec_mat[(i*30) + 4] = compressed_spec_mat[(i*30) + 4] / aux; | |
414 | compressed_spec_mat[(i*30) + 5] = compressed_spec_mat[(i*30) + 5] / aux; |
|
423 | compressed_spec_mat[(i*30) + 5] = compressed_spec_mat[(i*30) + 5] / aux; | |
415 | // S23 |
|
424 | // S23 | |
416 | aux = sqrt(compressed_spec_mat[i*30+12]*compressed_spec_mat[(i*30) + 18]); |
|
425 | aux = sqrt(compressed_spec_mat[i*30+12]*compressed_spec_mat[(i*30) + 18]); | |
417 | compressed_spec_mat[(i*30) + 12] = compressed_spec_mat[(i*30) + 12] / aux; |
|
426 | compressed_spec_mat[(i*30) + 12] = compressed_spec_mat[(i*30) + 12] / aux; | |
418 | compressed_spec_mat[(i*30) + 13] = compressed_spec_mat[(i*30) + 13] / aux; |
|
427 | compressed_spec_mat[(i*30) + 13] = compressed_spec_mat[(i*30) + 13] / aux; | |
419 | // S45 |
|
428 | // S45 | |
420 | aux = sqrt(compressed_spec_mat[i*30+24]*compressed_spec_mat[(i*30) + 28]); |
|
429 | aux = sqrt(compressed_spec_mat[i*30+24]*compressed_spec_mat[(i*30) + 28]); | |
421 | compressed_spec_mat[(i*30) + 26] = compressed_spec_mat[(i*30) + 26] / aux; |
|
430 | compressed_spec_mat[(i*30) + 26] = compressed_spec_mat[(i*30) + 26] / aux; | |
422 | compressed_spec_mat[(i*30) + 27] = compressed_spec_mat[(i*30) + 27] / aux; |
|
431 | compressed_spec_mat[(i*30) + 27] = compressed_spec_mat[(i*30) + 27] / aux; | |
423 | // S14 |
|
432 | // S14 | |
424 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) +24]); |
|
433 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) +24]); | |
425 | compressed_spec_mat[(i*30) + 6] = compressed_spec_mat[(i*30) + 6] / aux; |
|
434 | compressed_spec_mat[(i*30) + 6] = compressed_spec_mat[(i*30) + 6] / aux; | |
426 | compressed_spec_mat[(i*30) + 7] = compressed_spec_mat[(i*30) + 7] / aux; |
|
435 | compressed_spec_mat[(i*30) + 7] = compressed_spec_mat[(i*30) + 7] / aux; | |
427 | // S15 |
|
436 | // S15 | |
428 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 28]); |
|
437 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 28]); | |
429 | compressed_spec_mat[(i*30) + 8] = compressed_spec_mat[(i*30) + 8] / aux; |
|
438 | compressed_spec_mat[(i*30) + 8] = compressed_spec_mat[(i*30) + 8] / aux; | |
430 | compressed_spec_mat[(i*30) + 9] = compressed_spec_mat[(i*30) + 9] / aux; |
|
439 | compressed_spec_mat[(i*30) + 9] = compressed_spec_mat[(i*30) + 9] / aux; | |
431 | // S24 |
|
440 | // S24 | |
432 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 24]); |
|
441 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 24]); | |
433 | compressed_spec_mat[(i*30) + 14] = compressed_spec_mat[(i*30) + 14] / aux; |
|
442 | compressed_spec_mat[(i*30) + 14] = compressed_spec_mat[(i*30) + 14] / aux; | |
434 | compressed_spec_mat[(i*30) + 15] = compressed_spec_mat[(i*30) + 15] / aux; |
|
443 | compressed_spec_mat[(i*30) + 15] = compressed_spec_mat[(i*30) + 15] / aux; | |
435 | // S25 |
|
444 | // S25 | |
436 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 28]); |
|
445 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 28]); | |
437 | compressed_spec_mat[(i*30) + 16] = compressed_spec_mat[(i*30) + 16] / aux; |
|
446 | compressed_spec_mat[(i*30) + 16] = compressed_spec_mat[(i*30) + 16] / aux; | |
438 | compressed_spec_mat[(i*30) + 17] = compressed_spec_mat[(i*30) + 17] / aux; |
|
447 | compressed_spec_mat[(i*30) + 17] = compressed_spec_mat[(i*30) + 17] / aux; | |
439 | // S34 |
|
448 | // S34 | |
440 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 24]); |
|
449 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 24]); | |
441 | compressed_spec_mat[(i*30) + 20] = compressed_spec_mat[(i*30) + 20] / aux; |
|
450 | compressed_spec_mat[(i*30) + 20] = compressed_spec_mat[(i*30) + 20] / aux; | |
442 | compressed_spec_mat[(i*30) + 21] = compressed_spec_mat[(i*30) + 21] / aux; |
|
451 | compressed_spec_mat[(i*30) + 21] = compressed_spec_mat[(i*30) + 21] / aux; | |
443 | // S35 |
|
452 | // S35 | |
444 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 28]); |
|
453 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 28]); | |
445 | compressed_spec_mat[(i*30) + 22] = compressed_spec_mat[(i*30) + 22] / aux; |
|
454 | compressed_spec_mat[(i*30) + 22] = compressed_spec_mat[(i*30) + 22] / aux; | |
446 | compressed_spec_mat[(i*30) + 23] = compressed_spec_mat[(i*30) + 23] / aux; |
|
455 | compressed_spec_mat[(i*30) + 23] = compressed_spec_mat[(i*30) + 23] / aux; | |
447 | } |
|
456 | } | |
448 | } |
|
457 | } | |
449 |
|
458 | |||
450 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header) |
|
459 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header) | |
451 | { |
|
460 | { | |
452 | header->targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
461 | header->targetLogicalAddress = CCSDS_DESTINATION_ID; | |
453 | header->protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
462 | header->protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
454 | header->reserved = 0x00; |
|
463 | header->reserved = 0x00; | |
455 | header->userApplication = CCSDS_USER_APP; |
|
464 | header->userApplication = CCSDS_USER_APP; | |
456 | header->packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
465 | header->packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); | |
457 | header->packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); |
|
466 | header->packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
458 | header->packetSequenceControl[0] = 0xc0; |
|
467 | header->packetSequenceControl[0] = 0xc0; | |
459 | header->packetSequenceControl[1] = 0x00; |
|
468 | header->packetSequenceControl[1] = 0x00; | |
460 | header->packetLength[0] = 0x00; |
|
469 | header->packetLength[0] = 0x00; | |
461 | header->packetLength[1] = 0x00; |
|
470 | header->packetLength[1] = 0x00; | |
462 | // DATA FIELD HEADER |
|
471 | // DATA FIELD HEADER | |
463 | header->spare1_pusVersion_spare2 = 0x10; |
|
472 | header->spare1_pusVersion_spare2 = 0x10; | |
464 | header->serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
473 | header->serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
465 | header->serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
474 | header->serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
466 | header->destinationID = TM_DESTINATION_ID_GROUND; |
|
475 | header->destinationID = TM_DESTINATION_ID_GROUND; | |
467 | // AUXILIARY DATA HEADER |
|
476 | // AUXILIARY DATA HEADER | |
468 | header->sid = 0x00; |
|
477 | header->sid = 0x00; | |
469 | header->biaStatusInfo = 0x00; |
|
478 | header->biaStatusInfo = 0x00; | |
470 | header->cntASM = 0x00; |
|
479 | header->cntASM = 0x00; | |
471 | header->nrASM = 0x00; |
|
480 | header->nrASM = 0x00; | |
472 | header->time[0] = 0x00; |
|
481 | header->time[0] = 0x00; | |
473 | header->time[0] = 0x00; |
|
482 | header->time[0] = 0x00; | |
474 | header->time[0] = 0x00; |
|
483 | header->time[0] = 0x00; | |
475 | header->time[0] = 0x00; |
|
484 | header->time[0] = 0x00; | |
476 | header->time[0] = 0x00; |
|
485 | header->time[0] = 0x00; | |
477 | header->time[0] = 0x00; |
|
486 | header->time[0] = 0x00; | |
478 | header->blkNr[0] = 0x00; // BLK_NR MSB |
|
487 | header->blkNr[0] = 0x00; // BLK_NR MSB | |
479 | header->blkNr[1] = 0x00; // BLK_NR LSB |
|
488 | header->blkNr[1] = 0x00; // BLK_NR LSB | |
480 | } |
|
489 | } | |
481 |
|
490 | |||
482 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, |
|
491 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, | |
483 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id) |
|
492 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id) | |
484 | { |
|
493 | { | |
485 | unsigned int i; |
|
494 | unsigned int i; | |
486 | unsigned int length = 0; |
|
495 | unsigned int length = 0; | |
487 | rtems_status_code status; |
|
496 | rtems_status_code status; | |
488 |
|
497 | |||
489 | header->sid = (unsigned char) sid; |
|
498 | header->sid = (unsigned char) sid; | |
490 |
|
499 | |||
491 | for (i=0; i<2; i++) |
|
500 | for (i=0; i<2; i++) | |
492 | { |
|
501 | { | |
493 | // BUILD THE DATA |
|
502 | // BUILD THE DATA | |
494 | spw_ioctl_send->dlen = TOTAL_SIZE_SM; |
|
503 | spw_ioctl_send->dlen = TOTAL_SIZE_SM; | |
495 | spw_ioctl_send->data = &spectral_matrix[ i * TOTAL_SIZE_SM]; |
|
504 | spw_ioctl_send->data = &spectral_matrix[ i * TOTAL_SIZE_SM]; | |
496 | spw_ioctl_send->hlen = HEADER_LENGTH_TM_LFR_SCIENCE_ASM + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
505 | spw_ioctl_send->hlen = HEADER_LENGTH_TM_LFR_SCIENCE_ASM + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
497 | spw_ioctl_send->hdr = (char *) header; |
|
506 | spw_ioctl_send->hdr = (char *) header; | |
498 | spw_ioctl_send->options = 0; |
|
507 | spw_ioctl_send->options = 0; | |
499 |
|
508 | |||
500 | // BUILD THE HEADER |
|
509 | // BUILD THE HEADER | |
501 | length = PACKET_LENGTH_TM_LFR_SCIENCE_ASM; |
|
510 | length = PACKET_LENGTH_TM_LFR_SCIENCE_ASM; | |
502 | header->packetLength[0] = (unsigned char) (length>>8); |
|
511 | header->packetLength[0] = (unsigned char) (length>>8); | |
503 | header->packetLength[1] = (unsigned char) (length); |
|
512 | header->packetLength[1] = (unsigned char) (length); | |
504 | header->sid = (unsigned char) sid; // SID |
|
513 | header->sid = (unsigned char) sid; // SID | |
505 | header->cntASM = 2; |
|
514 | header->cntASM = 2; | |
506 | header->nrASM = (unsigned char) (i+1); |
|
515 | header->nrASM = (unsigned char) (i+1); | |
507 | header->blkNr[0] =(unsigned char) ( (NB_BINS_PER_SM/2) >> 8 ); // BLK_NR MSB |
|
516 | header->blkNr[0] =(unsigned char) ( (NB_BINS_PER_SM/2) >> 8 ); // BLK_NR MSB | |
508 | header->blkNr[1] = (unsigned char) (NB_BINS_PER_SM/2); // BLK_NR LSB |
|
517 | header->blkNr[1] = (unsigned char) (NB_BINS_PER_SM/2); // BLK_NR LSB | |
509 | // SET PACKET TIME |
|
518 | // SET PACKET TIME | |
510 | header->time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
519 | header->time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
511 | header->time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
520 | header->time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
512 | header->time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
521 | header->time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
513 | header->time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
522 | header->time[3] = (unsigned char) (time_management_regs->coarse_time); | |
514 | header->time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
523 | header->time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
515 | header->time[5] = (unsigned char) (time_management_regs->fine_time); |
|
524 | header->time[5] = (unsigned char) (time_management_regs->fine_time); | |
516 | header->acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
525 | header->acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
517 | header->acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
526 | header->acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
518 | header->acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
527 | header->acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
519 | header->acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); |
|
528 | header->acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); | |
520 | header->acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
529 | header->acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
521 | header->acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); |
|
530 | header->acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); | |
522 | // SEND PACKET |
|
531 | // SEND PACKET | |
523 | status = rtems_message_queue_send( queue_id, spw_ioctl_send, ACTION_MSG_SPW_IOCTL_SEND_SIZE); |
|
532 | status = rtems_message_queue_send( queue_id, spw_ioctl_send, ACTION_MSG_SPW_IOCTL_SEND_SIZE); | |
524 | if (status != RTEMS_SUCCESSFUL) { |
|
533 | if (status != RTEMS_SUCCESSFUL) { | |
525 | printf("in send_spectral_matrix *** ERR %d\n", (int) status); |
|
534 | printf("in send_spectral_matrix *** ERR %d\n", (int) status); | |
526 | } |
|
535 | } | |
527 | } |
|
536 | } | |
528 | } |
|
537 | } | |
529 |
|
538 | |||
530 | void convert_averaged_spectral_matrix( volatile float *input_matrix, char *output_matrix) |
|
539 | void convert_averaged_spectral_matrix( volatile float *input_matrix, char *output_matrix) | |
531 | { |
|
540 | { | |
532 | unsigned int i; |
|
541 | unsigned int i; | |
533 | unsigned int j; |
|
542 | unsigned int j; | |
534 | char * pt_char_input; |
|
543 | char * pt_char_input; | |
535 | char * pt_char_output; |
|
544 | char * pt_char_output; | |
536 |
|
545 | |||
537 | pt_char_input = NULL; |
|
546 | pt_char_input = NULL; | |
538 | pt_char_output = NULL; |
|
547 | pt_char_output = NULL; | |
539 |
|
548 | |||
540 | for( i=0; i<NB_BINS_PER_SM; i++) |
|
549 | for( i=0; i<NB_BINS_PER_SM; i++) | |
541 | { |
|
550 | { | |
542 | for ( j=0; j<NB_VALUES_PER_SM; j++) |
|
551 | for ( j=0; j<NB_VALUES_PER_SM; j++) | |
543 | { |
|
552 | { | |
544 | pt_char_input = (char*) &input_matrix[ (i*NB_VALUES_PER_SM) + j ]; |
|
553 | pt_char_input = (char*) &input_matrix[ (i*NB_VALUES_PER_SM) + j ]; | |
545 | pt_char_output = (char*) &output_matrix[ 2 * ( (i*NB_VALUES_PER_SM) + j ) ]; |
|
554 | pt_char_output = (char*) &output_matrix[ 2 * ( (i*NB_VALUES_PER_SM) + j ) ]; | |
546 | pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float |
|
555 | pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float | |
547 | pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float |
|
556 | pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float | |
548 | } |
|
557 | } | |
549 | } |
|
558 | } | |
550 | } |
|
559 | } | |
551 |
|
560 | |||
552 | void fill_averaged_spectral_matrix(void) |
|
561 | void fill_averaged_spectral_matrix(void) | |
553 | { |
|
562 | { | |
554 | /** This function fills spectral matrices related buffers with arbitrary data. |
|
563 | /** This function fills spectral matrices related buffers with arbitrary data. | |
555 | * |
|
564 | * | |
556 | * This function is for testing purpose only. |
|
565 | * This function is for testing purpose only. | |
557 | * |
|
566 | * | |
558 | */ |
|
567 | */ | |
559 |
|
568 | |||
560 | #ifdef GSA |
|
569 | #ifdef GSA | |
561 | float offset = 10.; |
|
570 | float offset = 10.; | |
562 | float coeff = 100000.; |
|
571 | float coeff = 100000.; | |
563 |
|
572 | |||
564 | averaged_spec_mat_f0[ 0 + 25 * 0 ] = 0. + offset; |
|
573 | averaged_spec_mat_f0[ 0 + 25 * 0 ] = 0. + offset; | |
565 | averaged_spec_mat_f0[ 0 + 25 * 1 ] = 1. + offset; |
|
574 | averaged_spec_mat_f0[ 0 + 25 * 1 ] = 1. + offset; | |
566 | averaged_spec_mat_f0[ 0 + 25 * 2 ] = 2. + offset; |
|
575 | averaged_spec_mat_f0[ 0 + 25 * 2 ] = 2. + offset; | |
567 | averaged_spec_mat_f0[ 0 + 25 * 3 ] = 3. + offset; |
|
576 | averaged_spec_mat_f0[ 0 + 25 * 3 ] = 3. + offset; | |
568 | averaged_spec_mat_f0[ 0 + 25 * 4 ] = 4. + offset; |
|
577 | averaged_spec_mat_f0[ 0 + 25 * 4 ] = 4. + offset; | |
569 | averaged_spec_mat_f0[ 0 + 25 * 5 ] = 5. + offset; |
|
578 | averaged_spec_mat_f0[ 0 + 25 * 5 ] = 5. + offset; | |
570 | averaged_spec_mat_f0[ 0 + 25 * 6 ] = 6. + offset; |
|
579 | averaged_spec_mat_f0[ 0 + 25 * 6 ] = 6. + offset; | |
571 | averaged_spec_mat_f0[ 0 + 25 * 7 ] = 7. + offset; |
|
580 | averaged_spec_mat_f0[ 0 + 25 * 7 ] = 7. + offset; | |
572 | averaged_spec_mat_f0[ 0 + 25 * 8 ] = 8. + offset; |
|
581 | averaged_spec_mat_f0[ 0 + 25 * 8 ] = 8. + offset; | |
573 | averaged_spec_mat_f0[ 0 + 25 * 9 ] = 9. + offset; |
|
582 | averaged_spec_mat_f0[ 0 + 25 * 9 ] = 9. + offset; | |
574 | averaged_spec_mat_f0[ 0 + 25 * 10 ] = 10. + offset; |
|
583 | averaged_spec_mat_f0[ 0 + 25 * 10 ] = 10. + offset; | |
575 | averaged_spec_mat_f0[ 0 + 25 * 11 ] = 11. + offset; |
|
584 | averaged_spec_mat_f0[ 0 + 25 * 11 ] = 11. + offset; | |
576 | averaged_spec_mat_f0[ 0 + 25 * 12 ] = 12. + offset; |
|
585 | averaged_spec_mat_f0[ 0 + 25 * 12 ] = 12. + offset; | |
577 | averaged_spec_mat_f0[ 0 + 25 * 13 ] = 13. + offset; |
|
586 | averaged_spec_mat_f0[ 0 + 25 * 13 ] = 13. + offset; | |
578 | averaged_spec_mat_f0[ 0 + 25 * 14 ] = 14. + offset; |
|
587 | averaged_spec_mat_f0[ 0 + 25 * 14 ] = 14. + offset; | |
579 | averaged_spec_mat_f0[ 9 + 25 * 0 ] = -(0. + offset)* coeff; |
|
588 | averaged_spec_mat_f0[ 9 + 25 * 0 ] = -(0. + offset)* coeff; | |
580 | averaged_spec_mat_f0[ 9 + 25 * 1 ] = -(1. + offset)* coeff; |
|
589 | averaged_spec_mat_f0[ 9 + 25 * 1 ] = -(1. + offset)* coeff; | |
581 | averaged_spec_mat_f0[ 9 + 25 * 2 ] = -(2. + offset)* coeff; |
|
590 | averaged_spec_mat_f0[ 9 + 25 * 2 ] = -(2. + offset)* coeff; | |
582 | averaged_spec_mat_f0[ 9 + 25 * 3 ] = -(3. + offset)* coeff; |
|
591 | averaged_spec_mat_f0[ 9 + 25 * 3 ] = -(3. + offset)* coeff; | |
583 | averaged_spec_mat_f0[ 9 + 25 * 4 ] = -(4. + offset)* coeff; |
|
592 | averaged_spec_mat_f0[ 9 + 25 * 4 ] = -(4. + offset)* coeff; | |
584 | averaged_spec_mat_f0[ 9 + 25 * 5 ] = -(5. + offset)* coeff; |
|
593 | averaged_spec_mat_f0[ 9 + 25 * 5 ] = -(5. + offset)* coeff; | |
585 | averaged_spec_mat_f0[ 9 + 25 * 6 ] = -(6. + offset)* coeff; |
|
594 | averaged_spec_mat_f0[ 9 + 25 * 6 ] = -(6. + offset)* coeff; | |
586 | averaged_spec_mat_f0[ 9 + 25 * 7 ] = -(7. + offset)* coeff; |
|
595 | averaged_spec_mat_f0[ 9 + 25 * 7 ] = -(7. + offset)* coeff; | |
587 | averaged_spec_mat_f0[ 9 + 25 * 8 ] = -(8. + offset)* coeff; |
|
596 | averaged_spec_mat_f0[ 9 + 25 * 8 ] = -(8. + offset)* coeff; | |
588 | averaged_spec_mat_f0[ 9 + 25 * 9 ] = -(9. + offset)* coeff; |
|
597 | averaged_spec_mat_f0[ 9 + 25 * 9 ] = -(9. + offset)* coeff; | |
589 | averaged_spec_mat_f0[ 9 + 25 * 10 ] = -(10. + offset)* coeff; |
|
598 | averaged_spec_mat_f0[ 9 + 25 * 10 ] = -(10. + offset)* coeff; | |
590 | averaged_spec_mat_f0[ 9 + 25 * 11 ] = -(11. + offset)* coeff; |
|
599 | averaged_spec_mat_f0[ 9 + 25 * 11 ] = -(11. + offset)* coeff; | |
591 | averaged_spec_mat_f0[ 9 + 25 * 12 ] = -(12. + offset)* coeff; |
|
600 | averaged_spec_mat_f0[ 9 + 25 * 12 ] = -(12. + offset)* coeff; | |
592 | averaged_spec_mat_f0[ 9 + 25 * 13 ] = -(13. + offset)* coeff; |
|
601 | averaged_spec_mat_f0[ 9 + 25 * 13 ] = -(13. + offset)* coeff; | |
593 | averaged_spec_mat_f0[ 9 + 25 * 14 ] = -(14. + offset)* coeff; |
|
602 | averaged_spec_mat_f0[ 9 + 25 * 14 ] = -(14. + offset)* coeff; | |
594 | offset = 10000000; |
|
603 | offset = 10000000; | |
595 | averaged_spec_mat_f0[ 16 + 25 * 0 ] = (0. + offset)* coeff; |
|
604 | averaged_spec_mat_f0[ 16 + 25 * 0 ] = (0. + offset)* coeff; | |
596 | averaged_spec_mat_f0[ 16 + 25 * 1 ] = (1. + offset)* coeff; |
|
605 | averaged_spec_mat_f0[ 16 + 25 * 1 ] = (1. + offset)* coeff; | |
597 | averaged_spec_mat_f0[ 16 + 25 * 2 ] = (2. + offset)* coeff; |
|
606 | averaged_spec_mat_f0[ 16 + 25 * 2 ] = (2. + offset)* coeff; | |
598 | averaged_spec_mat_f0[ 16 + 25 * 3 ] = (3. + offset)* coeff; |
|
607 | averaged_spec_mat_f0[ 16 + 25 * 3 ] = (3. + offset)* coeff; | |
599 | averaged_spec_mat_f0[ 16 + 25 * 4 ] = (4. + offset)* coeff; |
|
608 | averaged_spec_mat_f0[ 16 + 25 * 4 ] = (4. + offset)* coeff; | |
600 | averaged_spec_mat_f0[ 16 + 25 * 5 ] = (5. + offset)* coeff; |
|
609 | averaged_spec_mat_f0[ 16 + 25 * 5 ] = (5. + offset)* coeff; | |
601 | averaged_spec_mat_f0[ 16 + 25 * 6 ] = (6. + offset)* coeff; |
|
610 | averaged_spec_mat_f0[ 16 + 25 * 6 ] = (6. + offset)* coeff; | |
602 | averaged_spec_mat_f0[ 16 + 25 * 7 ] = (7. + offset)* coeff; |
|
611 | averaged_spec_mat_f0[ 16 + 25 * 7 ] = (7. + offset)* coeff; | |
603 | averaged_spec_mat_f0[ 16 + 25 * 8 ] = (8. + offset)* coeff; |
|
612 | averaged_spec_mat_f0[ 16 + 25 * 8 ] = (8. + offset)* coeff; | |
604 | averaged_spec_mat_f0[ 16 + 25 * 9 ] = (9. + offset)* coeff; |
|
613 | averaged_spec_mat_f0[ 16 + 25 * 9 ] = (9. + offset)* coeff; | |
605 | averaged_spec_mat_f0[ 16 + 25 * 10 ] = (10. + offset)* coeff; |
|
614 | averaged_spec_mat_f0[ 16 + 25 * 10 ] = (10. + offset)* coeff; | |
606 | averaged_spec_mat_f0[ 16 + 25 * 11 ] = (11. + offset)* coeff; |
|
615 | averaged_spec_mat_f0[ 16 + 25 * 11 ] = (11. + offset)* coeff; | |
607 | averaged_spec_mat_f0[ 16 + 25 * 12 ] = (12. + offset)* coeff; |
|
616 | averaged_spec_mat_f0[ 16 + 25 * 12 ] = (12. + offset)* coeff; | |
608 | averaged_spec_mat_f0[ 16 + 25 * 13 ] = (13. + offset)* coeff; |
|
617 | averaged_spec_mat_f0[ 16 + 25 * 13 ] = (13. + offset)* coeff; | |
609 | averaged_spec_mat_f0[ 16 + 25 * 14 ] = (14. + offset)* coeff; |
|
618 | averaged_spec_mat_f0[ 16 + 25 * 14 ] = (14. + offset)* coeff; | |
610 |
|
619 | |||
611 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 0 ] = averaged_spec_mat_f0[ 0 ]; |
|
620 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 0 ] = averaged_spec_mat_f0[ 0 ]; | |
612 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 1 ] = averaged_spec_mat_f0[ 1 ]; |
|
621 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 1 ] = averaged_spec_mat_f0[ 1 ]; | |
613 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 2 ] = averaged_spec_mat_f0[ 2 ]; |
|
622 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 2 ] = averaged_spec_mat_f0[ 2 ]; | |
614 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 3 ] = averaged_spec_mat_f0[ 3 ]; |
|
623 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 3 ] = averaged_spec_mat_f0[ 3 ]; | |
615 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 4 ] = averaged_spec_mat_f0[ 4 ]; |
|
624 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 4 ] = averaged_spec_mat_f0[ 4 ]; | |
616 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 5 ] = averaged_spec_mat_f0[ 5 ]; |
|
625 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 5 ] = averaged_spec_mat_f0[ 5 ]; | |
617 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 6 ] = averaged_spec_mat_f0[ 6 ]; |
|
626 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 6 ] = averaged_spec_mat_f0[ 6 ]; | |
618 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 7 ] = averaged_spec_mat_f0[ 7 ]; |
|
627 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 7 ] = averaged_spec_mat_f0[ 7 ]; | |
619 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 8 ] = averaged_spec_mat_f0[ 8 ]; |
|
628 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 8 ] = averaged_spec_mat_f0[ 8 ]; | |
620 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 9 ] = averaged_spec_mat_f0[ 9 ]; |
|
629 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 9 ] = averaged_spec_mat_f0[ 9 ]; | |
621 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 10 ] = averaged_spec_mat_f0[ 10 ]; |
|
630 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 10 ] = averaged_spec_mat_f0[ 10 ]; | |
622 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 11 ] = averaged_spec_mat_f0[ 11 ]; |
|
631 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 11 ] = averaged_spec_mat_f0[ 11 ]; | |
623 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 12 ] = averaged_spec_mat_f0[ 12 ]; |
|
632 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 12 ] = averaged_spec_mat_f0[ 12 ]; | |
624 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 13 ] = averaged_spec_mat_f0[ 13 ]; |
|
633 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 13 ] = averaged_spec_mat_f0[ 13 ]; | |
625 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 14 ] = averaged_spec_mat_f0[ 14 ]; |
|
634 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 14 ] = averaged_spec_mat_f0[ 14 ]; | |
626 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 15 ] = averaged_spec_mat_f0[ 15 ]; |
|
635 | averaged_spec_mat_f0[ (TOTAL_SIZE_SM/2) + 15 ] = averaged_spec_mat_f0[ 15 ]; | |
627 | #else |
|
636 | #else | |
628 | unsigned int i; |
|
637 | unsigned int i; | |
629 |
|
638 | |||
630 | for(i=0; i<TOTAL_SIZE_SM; i++) |
|
639 | for(i=0; i<TOTAL_SIZE_SM; i++) | |
631 | { |
|
640 | { | |
632 | if (spectral_matrix_regs->matrixF0_Address0 == (int) spec_mat_f0_0) |
|
641 | if (spectral_matrix_regs->matrixF0_Address0 == (int) spec_mat_f0_0) | |
633 | averaged_spec_mat_f0[i] = (float) spec_mat_f0_0_bis[ SM_HEADER + i ]; |
|
642 | averaged_spec_mat_f0[i] = (float) spec_mat_f0_0_bis[ SM_HEADER + i ]; | |
634 | else |
|
643 | else | |
635 | averaged_spec_mat_f0[i] = (float) spec_mat_f0_0[ SM_HEADER + i ]; |
|
644 | averaged_spec_mat_f0[i] = (float) spec_mat_f0_0[ SM_HEADER + i ]; | |
636 | } |
|
645 | } | |
637 | #endif |
|
646 | #endif | |
638 | } |
|
647 | } | |
639 |
|
648 | |||
640 | void reset_spectral_matrix_regs() |
|
649 | void reset_spectral_matrix_regs() | |
641 | { |
|
650 | { | |
642 | /** This function resets the spectral matrices module registers. |
|
651 | /** This function resets the spectral matrices module registers. | |
643 | * |
|
652 | * | |
644 | * The registers affected by this function are located at the following offset addresses: |
|
653 | * The registers affected by this function are located at the following offset addresses: | |
645 | * |
|
654 | * | |
646 | * - 0x00 config |
|
655 | * - 0x00 config | |
647 | * - 0x04 status |
|
656 | * - 0x04 status | |
648 | * - 0x08 matrixF0_Address0 |
|
657 | * - 0x08 matrixF0_Address0 | |
649 | * - 0x10 matrixFO_Address1 |
|
658 | * - 0x10 matrixFO_Address1 | |
650 | * - 0x14 matrixF1_Address |
|
659 | * - 0x14 matrixF1_Address | |
651 | * - 0x18 matrixF2_Address |
|
660 | * - 0x18 matrixF2_Address | |
652 | * |
|
661 | * | |
653 | */ |
|
662 | */ | |
654 |
|
663 | |||
655 | #ifdef GSA |
|
664 | #ifdef GSA | |
656 | #else |
|
665 | #else | |
657 | spectral_matrix_regs->matrixF0_Address0 = (int) spec_mat_f0_0; |
|
666 | spectral_matrix_regs->matrixF0_Address0 = (int) spec_mat_f0_0; | |
658 | spectral_matrix_regs->matrixFO_Address1 = (int) spec_mat_f0_1; |
|
667 | spectral_matrix_regs->matrixFO_Address1 = (int) spec_mat_f0_1; | |
659 | spectral_matrix_regs->matrixF1_Address = (int) spec_mat_f1; |
|
668 | spectral_matrix_regs->matrixF1_Address = (int) spec_mat_f1; | |
660 | spectral_matrix_regs->matrixF2_Address = (int) spec_mat_f2; |
|
669 | spectral_matrix_regs->matrixF2_Address = (int) spec_mat_f2; | |
661 | #endif |
|
670 | #endif | |
662 | } |
|
671 | } | |
663 |
|
672 | |||
664 | //****************** |
|
673 | //****************** | |
665 | // general functions |
|
674 | // general functions | |
666 |
|
675 | |||
667 |
|
676 | |||
668 |
|
677 | |||
669 |
|
678 |
@@ -1,39 +1,46 | |||||
|
1 | /** Global variables used by the processing functions. | |||
|
2 | * | |||
|
3 | * @file | |||
|
4 | * @author P. LEROY | |||
|
5 | * | |||
|
6 | */ | |||
|
7 | ||||
1 | // TOTAL = 32 coefficients * 4 = 128 octets * 3 * 12 = 4608 octets |
|
8 | // TOTAL = 32 coefficients * 4 = 128 octets * 3 * 12 = 4608 octets | |
2 | // SX 12 coefficients |
|
9 | // SX 12 coefficients | |
3 | float K14_sx_re = 1; |
|
10 | float K14_sx_re = 1; | |
4 | float K14_sx_im = 1; |
|
11 | float K14_sx_im = 1; | |
5 | float K15_sx_re = 1; |
|
12 | float K15_sx_re = 1; | |
6 | float K15_sx_im = 1; |
|
13 | float K15_sx_im = 1; | |
7 | float K24_sx_re = 1; |
|
14 | float K24_sx_re = 1; | |
8 | float K24_sx_im = 1; |
|
15 | float K24_sx_im = 1; | |
9 | float K25_sx_re = 1; |
|
16 | float K25_sx_re = 1; | |
10 | float K25_sx_im = 1; |
|
17 | float K25_sx_im = 1; | |
11 | float K34_sx_re = 1; |
|
18 | float K34_sx_re = 1; | |
12 | float K34_sx_im = 1; |
|
19 | float K34_sx_im = 1; | |
13 | float K35_sx_re = 1; |
|
20 | float K35_sx_re = 1; | |
14 | float K35_sx_im = 1; |
|
21 | float K35_sx_im = 1; | |
15 | // NY 8 coefficients |
|
22 | // NY 8 coefficients | |
16 | float K24_ny_re = 1; |
|
23 | float K24_ny_re = 1; | |
17 | float K24_ny_im = 1; |
|
24 | float K24_ny_im = 1; | |
18 | float K25_ny_re = 1; |
|
25 | float K25_ny_re = 1; | |
19 | float K25_ny_im = 1; |
|
26 | float K25_ny_im = 1; | |
20 | float K34_ny_re = 1; |
|
27 | float K34_ny_re = 1; | |
21 | float K34_ny_im = 1; |
|
28 | float K34_ny_im = 1; | |
22 | float K35_ny_re = 1; |
|
29 | float K35_ny_re = 1; | |
23 | float K35_ny_im = 1; |
|
30 | float K35_ny_im = 1; | |
24 | // NZ 8 coefficients |
|
31 | // NZ 8 coefficients | |
25 | float K24_nz_re = 1; |
|
32 | float K24_nz_re = 1; | |
26 | float K24_nz_im = 1; |
|
33 | float K24_nz_im = 1; | |
27 | float K25_nz_re = 1; |
|
34 | float K25_nz_re = 1; | |
28 | float K25_nz_im = 1; |
|
35 | float K25_nz_im = 1; | |
29 | float K34_nz_re = 1; |
|
36 | float K34_nz_re = 1; | |
30 | float K34_nz_im = 1; |
|
37 | float K34_nz_im = 1; | |
31 | float K35_nz_re = 1; |
|
38 | float K35_nz_re = 1; | |
32 | float K35_nz_im = 1; |
|
39 | float K35_nz_im = 1; | |
33 | // PE 4 coefficients |
|
40 | // PE 4 coefficients | |
34 | float K44_pe = 1; |
|
41 | float K44_pe = 1; | |
35 | float K55_pe = 1; |
|
42 | float K55_pe = 1; | |
36 | float K45_pe_re = 1; |
|
43 | float K45_pe_re = 1; | |
37 | float K45_pe_im = 1; |
|
44 | float K45_pe_im = 1; | |
38 |
|
45 | |||
39 | float Alpha_M = M_PI/4; |
|
46 | float Alpha_M = M_PI/4; |
@@ -1,207 +1,486 | |||||
|
1 | /** Functions related to the SpaceWire interface. | |||
|
2 | * | |||
|
3 | * @file | |||
|
4 | * @author P. LEROY | |||
|
5 | * | |||
|
6 | * A group of functions to handle SpaceWire transmissions: | |||
|
7 | * - configuration of the SpaceWire link | |||
|
8 | * - SpaceWire related interruption requests processing | |||
|
9 | * - transmission of TeleMetry packets by a dedicated RTEMS task | |||
|
10 | * - reception of TeleCommands by a dedicated RTEMS task | |||
|
11 | * | |||
|
12 | */ | |||
|
13 | ||||
1 | #include "fsw_spacewire.h" |
|
14 | #include "fsw_spacewire.h" | |
2 |
|
15 | |||
3 | char *lstates[6] = {"Error-reset", |
|
16 | char *lstates[6] = {"Error-reset", | |
4 | "Error-wait", |
|
17 | "Error-wait", | |
5 | "Ready", |
|
18 | "Ready", | |
6 | "Started", |
|
19 | "Started", | |
7 | "Connecting", |
|
20 | "Connecting", | |
8 | "Run" |
|
21 | "Run" | |
9 | }; |
|
22 | }; | |
10 |
|
23 | |||
|
24 | //*********** | |||
11 | // RTEMS TASK |
|
25 | // RTEMS TASK | |
12 | rtems_task spiq_task(rtems_task_argument unused) |
|
26 | rtems_task spiq_task(rtems_task_argument unused) | |
13 | { |
|
27 | { | |
|
28 | /** This RTEMS task is dedicated to the handling of interruption requests raised by the SpaceWire driver. | |||
|
29 | * | |||
|
30 | * @param unused is the starting argument of the RTEMS task | |||
|
31 | * | |||
|
32 | */ | |||
|
33 | ||||
14 | rtems_event_set event_out; |
|
34 | rtems_event_set event_out; | |
15 | rtems_status_code status; |
|
35 | rtems_status_code status; | |
16 | unsigned char lfrMode; |
|
36 | unsigned char lfrMode; | |
17 |
|
37 | |||
18 | while(true){ |
|
38 | while(true){ | |
19 | BOOT_PRINTF("in SPIQ *** Waiting for SPW_LINKERR_EVENT\n") |
|
39 | BOOT_PRINTF("in SPIQ *** Waiting for SPW_LINKERR_EVENT\n") | |
20 | rtems_event_receive(SPW_LINKERR_EVENT, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an SPW_LINKERR_EVENT |
|
40 | rtems_event_receive(SPW_LINKERR_EVENT, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an SPW_LINKERR_EVENT | |
21 |
|
41 | |||
22 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; // get the current mode |
|
42 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; // get the current mode | |
23 |
|
43 | |||
24 | status = spacewire_wait_for_link(); |
|
44 | status = spacewire_wait_for_link(); | |
25 |
|
45 | |||
26 | if (status != RTEMS_SUCCESSFUL) |
|
46 | if (status != RTEMS_SUCCESSFUL) | |
27 | { |
|
47 | { | |
28 | //**************** |
|
48 | //**************** | |
29 | // STOP THE SYSTEM |
|
49 | // STOP THE SYSTEM | |
30 | spacewire_compute_stats_offsets(); |
|
50 | spacewire_compute_stats_offsets(); | |
31 | stop_current_mode(); |
|
51 | stop_current_mode(); | |
32 | if (rtems_task_suspend(Task_id[TASKID_RECV])!=RTEMS_SUCCESSFUL) { // suspend RECV task |
|
52 | if (rtems_task_suspend(Task_id[TASKID_RECV])!=RTEMS_SUCCESSFUL) { // suspend RECV task | |
33 | PRINTF("in SPIQ *** Error suspending RECV Task\n") |
|
53 | PRINTF("in SPIQ *** Error suspending RECV Task\n") | |
34 | } |
|
54 | } | |
35 | if (rtems_task_suspend(Task_id[TASKID_HOUS])!=RTEMS_SUCCESSFUL) { // suspend HOUS task |
|
55 | if (rtems_task_suspend(Task_id[TASKID_HOUS])!=RTEMS_SUCCESSFUL) { // suspend HOUS task | |
36 | PRINTF("in SPIQ *** Error suspending HOUS Task\n") |
|
56 | PRINTF("in SPIQ *** Error suspending HOUS Task\n") | |
37 | } |
|
57 | } | |
38 |
|
58 | |||
39 | //*************************** |
|
59 | //*************************** | |
40 | // RESTART THE SPACEWIRE LINK |
|
60 | // RESTART THE SPACEWIRE LINK | |
41 | spacewire_configure_link(); |
|
61 | spacewire_configure_link(); | |
42 |
|
62 | |||
43 | //******************* |
|
63 | //******************* | |
44 | // RESTART THE SYSTEM |
|
64 | // RESTART THE SYSTEM | |
45 | //ioctl(fdSPW, SPACEWIRE_IOCTRL_CLR_STATISTICS); // clear statistics |
|
65 | //ioctl(fdSPW, SPACEWIRE_IOCTRL_CLR_STATISTICS); // clear statistics | |
46 | status = rtems_task_restart( Task_id[TASKID_HOUS], 1 ); |
|
66 | status = rtems_task_restart( Task_id[TASKID_HOUS], 1 ); | |
47 | if (status != RTEMS_SUCCESSFUL) { |
|
67 | if (status != RTEMS_SUCCESSFUL) { | |
48 | PRINTF1("in SPIQ *** Error restarting HOUS Task *** code %d\n", status) |
|
68 | PRINTF1("in SPIQ *** Error restarting HOUS Task *** code %d\n", status) | |
49 | } |
|
69 | } | |
50 | status = rtems_task_restart(Task_id[TASKID_RECV], 1); |
|
70 | status = rtems_task_restart(Task_id[TASKID_RECV], 1); | |
51 | if ( status != RTEMS_SUCCESSFUL) { |
|
71 | if ( status != RTEMS_SUCCESSFUL) { | |
52 | PRINTF("in SPIQ *** Error restarting RECV Task\n") |
|
72 | PRINTF("in SPIQ *** Error restarting RECV Task\n") | |
53 | } |
|
73 | } | |
54 | enter_mode(lfrMode, NULL); // enter the mode that was running before the SpaceWire interruption |
|
74 | enter_mode(lfrMode, NULL); // enter the mode that was running before the SpaceWire interruption | |
55 | } |
|
75 | } | |
56 | } |
|
76 | } | |
57 | } |
|
77 | } | |
58 |
|
78 | |||
|
79 | rtems_task recv_task( rtems_task_argument unused ) | |||
|
80 | { | |||
|
81 | /** This RTEMS task is dedicated to the reception of incoming TeleCommands. | |||
|
82 | * | |||
|
83 | * @param unused is the starting argument of the RTEMS task | |||
|
84 | * | |||
|
85 | * The RECV task blocks on a call to the read system call, waiting for incoming SpaceWire data. When unblocked: | |||
|
86 | * 1. It reads the incoming data. | |||
|
87 | * 2. Launches the acceptance procedure. | |||
|
88 | * 3. If the Telecommand is valid, sends it to a dedicated RTEMS message queue. | |||
|
89 | * | |||
|
90 | */ | |||
|
91 | ||||
|
92 | int len; | |||
|
93 | ccsdsTelecommandPacket_t currentTC; | |||
|
94 | unsigned char computed_CRC[ 2 ]; | |||
|
95 | unsigned char currentTC_LEN_RCV[ 2 ]; | |||
|
96 | unsigned int currentTC_LEN_RCV_AsUnsignedInt; | |||
|
97 | unsigned int parserCode; | |||
|
98 | rtems_status_code status; | |||
|
99 | rtems_id queue_recv_id; | |||
|
100 | rtems_id queue_send_id; | |||
|
101 | ||||
|
102 | initLookUpTableForCRC(); // the table is used to compute Cyclic Redundancy Codes | |||
|
103 | ||||
|
104 | status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_recv_id ); | |||
|
105 | if (status != RTEMS_SUCCESSFUL) | |||
|
106 | { | |||
|
107 | PRINTF1("in RECV *** ERR getting QUEUE_RECV id, %d\n", status) | |||
|
108 | } | |||
|
109 | ||||
|
110 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_send_id ); | |||
|
111 | if (status != RTEMS_SUCCESSFUL) | |||
|
112 | { | |||
|
113 | PRINTF1("in RECV *** ERR getting QUEUE_SEND id, %d\n", status) | |||
|
114 | } | |||
|
115 | ||||
|
116 | BOOT_PRINTF("in RECV *** \n") | |||
|
117 | ||||
|
118 | while(1) | |||
|
119 | { | |||
|
120 | len = read(fdSPW, (char*) ¤tTC, CCSDS_TC_PKT_MAX_SIZE); // the call to read is blocking | |||
|
121 | if (len == -1){ // error during the read call | |||
|
122 | PRINTF("In RECV *** last read call returned -1\n") | |||
|
123 | } | |||
|
124 | else { | |||
|
125 | if ( (len+1) < CCSDS_TC_PKT_MIN_SIZE ) { | |||
|
126 | PRINTF("In RECV *** packet lenght too short\n") | |||
|
127 | } | |||
|
128 | else { | |||
|
129 | currentTC_LEN_RCV_AsUnsignedInt = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes | |||
|
130 | currentTC_LEN_RCV[ 0 ] = (unsigned char) (currentTC_LEN_RCV_AsUnsignedInt >> 8); | |||
|
131 | currentTC_LEN_RCV[ 1 ] = (unsigned char) (currentTC_LEN_RCV_AsUnsignedInt ); | |||
|
132 | // CHECK THE TC | |||
|
133 | parserCode = tc_parser( ¤tTC, currentTC_LEN_RCV_AsUnsignedInt, computed_CRC ) ; | |||
|
134 | if ( (parserCode == ILLEGAL_APID) || (parserCode == WRONG_LEN_PACKET) || (parserCode == INCOR_CHECKSUM) | |||
|
135 | | (parserCode == ILL_TYPE) || (parserCode == ILL_SUBTYPE) || (parserCode == WRONG_APP_DATA) ) | |||
|
136 | { // send TM_LFR_TC_EXE_CORRUPTED | |||
|
137 | send_tm_lfr_tc_exe_corrupted( ¤tTC, queue_send_id, computed_CRC, currentTC_LEN_RCV ); | |||
|
138 | } | |||
|
139 | else | |||
|
140 | { // send valid TC to the action launcher | |||
|
141 | status = rtems_message_queue_send( queue_recv_id, ¤tTC, | |||
|
142 | currentTC_LEN_RCV_AsUnsignedInt + CCSDS_TC_TM_PACKET_OFFSET + 3); | |||
|
143 | } | |||
|
144 | } | |||
|
145 | } | |||
|
146 | } | |||
|
147 | } | |||
|
148 | ||||
|
149 | rtems_task send_task( rtems_task_argument argument) | |||
|
150 | { | |||
|
151 | /** This RTEMS task is dedicated to the transmission of TeleMetry packets. | |||
|
152 | * | |||
|
153 | * @param unused is the starting argument of the RTEMS task | |||
|
154 | * | |||
|
155 | * The SEND task waits for a message to become available in the dedicated RTEMS queue. When a message arrives: | |||
|
156 | * - if the first byte is equal to CCSDS_DESTINATION_ID, the message is sent as is using the write system call. | |||
|
157 | * - if the first byte is not equal to CCSDS_DESTINATION_ID, the message is handled as a spw_ioctl_pkt_send. After | |||
|
158 | * analyzis, the packet is sent either using the write system call or using the ioctl call SPACEWIRE_IOCTRL_SEND, depending on the | |||
|
159 | * data it contains. | |||
|
160 | * | |||
|
161 | */ | |||
|
162 | ||||
|
163 | rtems_status_code status; // RTEMS status code | |||
|
164 | char incomingData[ACTION_MSG_PKTS_MAX_SIZE]; // incoming data buffer | |||
|
165 | spw_ioctl_pkt_send *spw_ioctl_send; | |||
|
166 | size_t size; // size of the incoming TC packet | |||
|
167 | u_int32_t count; | |||
|
168 | rtems_id queue_id; | |||
|
169 | ||||
|
170 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |||
|
171 | if (status != RTEMS_SUCCESSFUL) | |||
|
172 | { | |||
|
173 | PRINTF1("in SEND *** ERR getting queue id, %d\n", status) | |||
|
174 | } | |||
|
175 | ||||
|
176 | BOOT_PRINTF("in SEND *** \n") | |||
|
177 | ||||
|
178 | while(1) | |||
|
179 | { | |||
|
180 | status = rtems_message_queue_receive( queue_id, incomingData, &size, | |||
|
181 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); | |||
|
182 | ||||
|
183 | if (status!=RTEMS_SUCCESSFUL) | |||
|
184 | { | |||
|
185 | PRINTF1("in SEND *** (1) ERR = %d\n", status) | |||
|
186 | } | |||
|
187 | else | |||
|
188 | { | |||
|
189 | if ( incomingData[0] == CCSDS_DESTINATION_ID) // the incoming message is a ccsds packet | |||
|
190 | { | |||
|
191 | status = write( fdSPW, incomingData, size ); | |||
|
192 | if (status == -1){ | |||
|
193 | PRINTF2("in SEND *** (2.a) ERR = %d, size = %d\n", status, size) | |||
|
194 | } | |||
|
195 | } | |||
|
196 | else // the incoming message is a spw_ioctl_pkt_send structure | |||
|
197 | { | |||
|
198 | spw_ioctl_send = (spw_ioctl_pkt_send*) incomingData; | |||
|
199 | if (spw_ioctl_send->hlen == 0) | |||
|
200 | { | |||
|
201 | status = write( fdSPW, spw_ioctl_send->data, spw_ioctl_send->dlen ); | |||
|
202 | if (status == -1){ | |||
|
203 | PRINTF2("in SEND *** (2.b) ERR = %d, dlen = %d\n", status, spw_ioctl_send->dlen) | |||
|
204 | } | |||
|
205 | } | |||
|
206 | else | |||
|
207 | { | |||
|
208 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_SEND, spw_ioctl_send ); | |||
|
209 | if (status == -1){ | |||
|
210 | PRINTF2("in SEND *** (2.c) ERR = %d, dlen = %d\n", status, spw_ioctl_send->dlen) | |||
|
211 | PRINTF1(" hlen = %d\n", spw_ioctl_send->hlen) | |||
|
212 | } | |||
|
213 | } | |||
|
214 | } | |||
|
215 | } | |||
|
216 | ||||
|
217 | status = rtems_message_queue_get_number_pending( queue_id, &count ); | |||
|
218 | if (status != RTEMS_SUCCESSFUL) | |||
|
219 | { | |||
|
220 | PRINTF1("in SEND *** (3) ERR = %d\n", status) | |||
|
221 | } | |||
|
222 | else | |||
|
223 | { | |||
|
224 | if (count > maxCount) | |||
|
225 | { | |||
|
226 | maxCount = count; | |||
|
227 | } | |||
|
228 | } | |||
|
229 | } | |||
|
230 | } | |||
|
231 | ||||
|
232 | //**************** | |||
|
233 | // OTHER FUNCTIONS | |||
59 | int spacewire_configure_link( void ) |
|
234 | int spacewire_configure_link( void ) | |
60 | { |
|
235 | { | |
|
236 | /** This function configures the SpaceWire link. | |||
|
237 | * | |||
|
238 | * @return GR-RTEMS-DRIVER directive status codes: | |||
|
239 | * - 22 EINVAL - Null pointer or an out of range value was given as the argument. | |||
|
240 | * - 16 EBUSY - Only used for SEND. Returned when no descriptors are avialble in non-blocking mode. | |||
|
241 | * - 88 ENOSYS - Returned for SET_DESTKEY if RMAP command handler is not available or if a non-implemented call is used. | |||
|
242 | * - 116 ETIMEDOUT - REturned for SET_PACKET_SIZE and START if the link could not be brought up. | |||
|
243 | * - 12 ENOMEM - Returned for SET_PACKETSIZE if it was unable to allocate the new buffers. | |||
|
244 | * - 5 EIO - Error when writing to grswp hardware registers. | |||
|
245 | * - 2 ENOENT - No such file or directory | |||
|
246 | */ | |||
|
247 | ||||
61 | rtems_status_code status; |
|
248 | rtems_status_code status; | |
62 |
|
249 | |||
63 | close(fdSPW); // close the device if it is already open |
|
250 | close(fdSPW); // close the device if it is already open | |
64 | BOOT_PRINTF("OK *** in configure_spw_link *** try to open "GRSPW_DEVICE_NAME"\n") |
|
251 | BOOT_PRINTF("OK *** in configure_spw_link *** try to open "GRSPW_DEVICE_NAME"\n") | |
65 | fdSPW = open(GRSPW_DEVICE_NAME, O_RDWR); // open the device. the open call reset the hardware |
|
252 | fdSPW = open(GRSPW_DEVICE_NAME, O_RDWR); // open the device. the open call resets the hardware | |
66 | if ( fdSPW<0 ) { |
|
253 | if ( fdSPW<0 ) { | |
67 | PRINTF("ERR *** in configure_spw_link *** Error opening"GRSPW_DEVICE_NAME"\n") |
|
254 | PRINTF1("ERR *** in configure_spw_link *** Error opening"GRSPW_DEVICE_NAME" with ERR %d\n", errno) | |
68 | } |
|
255 | } | |
69 |
|
256 | |||
70 | while(ioctl(fdSPW, SPACEWIRE_IOCTRL_START, -1) != RTEMS_SUCCESSFUL){ |
|
257 | while(ioctl(fdSPW, SPACEWIRE_IOCTRL_START, -1) != RTEMS_SUCCESSFUL){ | |
71 | PRINTF(".") |
|
258 | PRINTF(".") | |
72 | fflush( stdout ); |
|
259 | fflush( stdout ); | |
73 | close( fdSPW ); // close the device |
|
260 | close( fdSPW ); // close the device | |
74 | fdSPW = open( GRSPW_DEVICE_NAME, O_RDWR ); // open the device. the open call reset the hardware |
|
261 | fdSPW = open( GRSPW_DEVICE_NAME, O_RDWR ); // open the device. the open call reset the hardware | |
75 | if (fdSPW<0) { |
|
262 | if (fdSPW<0) { | |
76 |
PRINTF("ERR *** |
|
263 | PRINTF1("ERR *** in configure_spw_link *** Error opening"GRSPW_DEVICE_NAME" with ERR %d\n", errno) | |
77 | } |
|
264 | } | |
78 | rtems_task_wake_after(100); |
|
265 | rtems_task_wake_after(100); | |
79 | } |
|
266 | } | |
80 |
|
267 | |||
81 | BOOT_PRINTF("OK *** In configure_spw_link *** "GRSPW_DEVICE_NAME" opened and started successfully\n") |
|
268 | BOOT_PRINTF("OK *** In configure_spw_link *** "GRSPW_DEVICE_NAME" opened and started successfully\n") | |
82 |
|
269 | |||
83 | spacewire_set_NP(1, REGS_ADDR_GRSPW); // [N]o [P]ort force |
|
270 | spacewire_set_NP(1, REGS_ADDR_GRSPW); // [N]o [P]ort force | |
84 | spacewire_set_RE(1, REGS_ADDR_GRSPW); // [R]MAP [E]nable, the dedicated call seems to break the no port force configuration |
|
271 | spacewire_set_RE(1, REGS_ADDR_GRSPW); // [R]MAP [E]nable, the dedicated call seems to break the no port force configuration | |
85 |
|
272 | |||
86 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_RXBLOCK, 1); // sets the blocking mode for reception |
|
273 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_RXBLOCK, 1); // sets the blocking mode for reception | |
87 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_RXBLOCK\n") |
|
274 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_RXBLOCK\n") | |
88 | // |
|
275 | // | |
89 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_EVENT_ID, Task_id[TASKID_SPIQ]); // sets the task ID to which an event is sent when a |
|
276 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_EVENT_ID, Task_id[TASKID_SPIQ]); // sets the task ID to which an event is sent when a | |
90 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_EVENT_ID\n") // link-error interrupt occurs |
|
277 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_EVENT_ID\n") // link-error interrupt occurs | |
91 | // |
|
278 | // | |
92 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_DISABLE_ERR, 0); // automatic link-disabling due to link-error interrupts |
|
279 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_DISABLE_ERR, 0); // automatic link-disabling due to link-error interrupts | |
93 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_DISABLE_ERR\n") |
|
280 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_DISABLE_ERR\n") | |
94 | // |
|
281 | // | |
95 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_LINK_ERR_IRQ, 1); // sets the link-error interrupt bit |
|
282 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_LINK_ERR_IRQ, 1); // sets the link-error interrupt bit | |
96 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_LINK_ERR_IRQ\n") |
|
283 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_LINK_ERR_IRQ\n") | |
97 | // |
|
284 | // | |
98 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_TXBLOCK, 0); // transmission blocks |
|
285 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_TXBLOCK, 0); // transmission blocks | |
99 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TXBLOCK\n") |
|
286 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TXBLOCK\n") | |
100 | // |
|
287 | // | |
101 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL, 0); // transmission blocks on full |
|
288 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL, 0); // transmission blocks on full | |
102 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL\n") |
|
289 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL\n") | |
103 | // |
|
290 | // | |
104 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_TCODE_CTRL, 0x0909); // [Time Rx : Time Tx : Link error : Tick-out IRQ] |
|
291 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_SET_TCODE_CTRL, 0x0909); // [Time Rx : Time Tx : Link error : Tick-out IRQ] | |
105 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TCODE_CTRL,\n") |
|
292 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TCODE_CTRL,\n") | |
106 |
|
293 | |||
107 | BOOT_PRINTF("OK *** in configure_spw_link *** "GRSPW_DEVICE_NAME" configured successfully\n") |
|
294 | BOOT_PRINTF("OK *** in configure_spw_link *** "GRSPW_DEVICE_NAME" configured successfully\n") | |
108 |
|
295 | |||
109 | return RTEMS_SUCCESSFUL; |
|
296 | return RTEMS_SUCCESSFUL; | |
110 | } |
|
297 | } | |
111 |
|
298 | |||
112 | int spacewire_wait_for_link(void) |
|
299 | int spacewire_wait_for_link( void ) | |
113 | { |
|
300 | { | |
|
301 | /** This function is executed when an interruption is raised by the SpaceWire driver. | |||
|
302 | * | |||
|
303 | * @return RTEMS directive status code: | |||
|
304 | * - RTEMS_UNSATISFIED is returned is the link is not in the running state after 10 s. | |||
|
305 | * - RTEMS_SUCCESSFUL is returned if the link is up before the timeout. | |||
|
306 | * | |||
|
307 | */ | |||
|
308 | ||||
114 | unsigned int i; |
|
309 | unsigned int i; | |
115 | int linkStatus; |
|
310 | int linkStatus; | |
116 | rtems_status_code status = RTEMS_UNSATISFIED; |
|
311 | rtems_status_code status = RTEMS_UNSATISFIED; | |
117 |
|
312 | |||
118 | for(i = 0; i< 10; i++){ |
|
313 | for(i = 0; i< 10; i++){ | |
119 | PRINTF(".") |
|
314 | PRINTF(".") | |
120 | fflush( stdout ); |
|
315 | fflush( stdout ); | |
121 | ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status |
|
316 | ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status | |
122 | PRINTF1("in spacewire_wait_for_link *** link status is: %s\n", lstates[linkStatus]) |
|
317 | PRINTF1("in spacewire_wait_for_link *** link status is: %s\n", lstates[linkStatus]) | |
123 | if ( linkStatus == 5) { |
|
318 | if ( linkStatus == 5) { | |
124 | PRINTF("in spacewire_wait_for_link *** link is running\n") |
|
319 | PRINTF("in spacewire_wait_for_link *** link is running\n") | |
125 | status = RTEMS_SUCCESSFUL; |
|
320 | status = RTEMS_SUCCESSFUL; | |
126 | break; |
|
321 | break; | |
127 | } |
|
322 | } | |
128 | rtems_task_wake_after(100); |
|
323 | rtems_task_wake_after(100); | |
129 | } |
|
324 | } | |
130 |
|
325 | |||
131 | return status; |
|
326 | return status; | |
132 | } |
|
327 | } | |
133 |
|
328 | |||
134 | void spacewire_set_NP(unsigned char val, unsigned int regAddr) // [N]o [P]ort force |
|
329 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ) // [N]o [P]ort force | |
135 | { |
|
330 | { | |
|
331 | /** This function sets the [N]o [P]ort force bit of the GRSPW control register. | |||
|
332 | * | |||
|
333 | * @param val is the value, 0 or 1, used to set the value of the NP bit. | |||
|
334 | * @param regAddr is the address of the GRSPW control register. | |||
|
335 | * | |||
|
336 | * NP is the bit 20 of the GRSPW control register. | |||
|
337 | * | |||
|
338 | */ | |||
|
339 | ||||
136 | unsigned int *spwptr = (unsigned int*) regAddr; |
|
340 | unsigned int *spwptr = (unsigned int*) regAddr; | |
137 |
|
341 | |||
138 | if (val == 1) { |
|
342 | if (val == 1) { | |
139 | *spwptr = *spwptr | 0x00100000; // [NP] set the No port force bit |
|
343 | *spwptr = *spwptr | 0x00100000; // [NP] set the No port force bit | |
140 | } |
|
344 | } | |
141 | if (val== 0) { |
|
345 | if (val== 0) { | |
142 | *spwptr = *spwptr & 0xffdfffff; |
|
346 | *spwptr = *spwptr & 0xffdfffff; | |
143 | } |
|
347 | } | |
144 | } |
|
348 | } | |
145 |
|
349 | |||
146 | void spacewire_set_RE(unsigned char val, unsigned int regAddr) // [R]MAP [E]nable |
|
350 | void spacewire_set_RE( unsigned char val, unsigned int regAddr ) // [R]MAP [E]nable | |
147 | { |
|
351 | { | |
|
352 | /** This function sets the [R]MAP [E]nable bit of the GRSPW control register. | |||
|
353 | * | |||
|
354 | * @param val is the value, 0 or 1, used to set the value of the RE bit. | |||
|
355 | * @param regAddr is the address of the GRSPW control register. | |||
|
356 | * | |||
|
357 | * RE is the bit 16 of the GRSPW control register. | |||
|
358 | * | |||
|
359 | */ | |||
|
360 | ||||
148 | unsigned int *spwptr = (unsigned int*) regAddr; |
|
361 | unsigned int *spwptr = (unsigned int*) regAddr; | |
149 |
|
362 | |||
150 | if (val == 1) |
|
363 | if (val == 1) | |
151 | { |
|
364 | { | |
152 | *spwptr = *spwptr | 0x00010000; // [RE] set the RMAP Enable bit |
|
365 | *spwptr = *spwptr | 0x00010000; // [RE] set the RMAP Enable bit | |
153 | } |
|
366 | } | |
154 | if (val== 0) |
|
367 | if (val== 0) | |
155 | { |
|
368 | { | |
156 | *spwptr = *spwptr & 0xfffdffff; |
|
369 | *spwptr = *spwptr & 0xfffdffff; | |
157 | } |
|
370 | } | |
158 | } |
|
371 | } | |
159 |
|
372 | |||
160 | void spacewire_compute_stats_offsets( void ) |
|
373 | void spacewire_compute_stats_offsets( void ) | |
161 | { |
|
374 | { | |
162 | /** This function computes the SpaceWire statistics offsets in case of a SpaceWire related interruption raising. |
|
375 | /** This function computes the SpaceWire statistics offsets in case of a SpaceWire related interruption raising. | |
163 | * |
|
376 | * | |
164 | * The offsets keep a record of the statistics in case of a reset of the statistics. They are added to the current statistics |
|
377 | * The offsets keep a record of the statistics in case of a reset of the statistics. They are added to the current statistics | |
165 |
* to keep the counters consistent even after a reset of the SpaceWire driver |
|
378 | * to keep the counters consistent even after a reset of the SpaceWire driver (the counter are set to zero by the driver when it | |
|
379 | * during the open systel call). | |||
166 | * |
|
380 | * | |
167 | */ |
|
381 | */ | |
168 |
|
382 | |||
169 | spw_stats spacewire_stats_grspw; |
|
383 | spw_stats spacewire_stats_grspw; | |
170 | rtems_status_code status; |
|
384 | rtems_status_code status; | |
171 |
|
385 | |||
172 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, &spacewire_stats_grspw ); |
|
386 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, &spacewire_stats_grspw ); | |
173 |
|
387 | |||
174 | spacewire_stats_backup.packets_received = spacewire_stats_grspw.packets_received |
|
388 | spacewire_stats_backup.packets_received = spacewire_stats_grspw.packets_received | |
175 | + spacewire_stats.packets_received; |
|
389 | + spacewire_stats.packets_received; | |
176 | spacewire_stats_backup.packets_sent = spacewire_stats_grspw.packets_sent |
|
390 | spacewire_stats_backup.packets_sent = spacewire_stats_grspw.packets_sent | |
177 | + spacewire_stats.packets_sent; |
|
391 | + spacewire_stats.packets_sent; | |
178 | spacewire_stats_backup.parity_err = spacewire_stats_grspw.parity_err |
|
392 | spacewire_stats_backup.parity_err = spacewire_stats_grspw.parity_err | |
179 | + spacewire_stats.parity_err; |
|
393 | + spacewire_stats.parity_err; | |
180 | spacewire_stats_backup.disconnect_err = spacewire_stats_grspw.disconnect_err |
|
394 | spacewire_stats_backup.disconnect_err = spacewire_stats_grspw.disconnect_err | |
181 | + spacewire_stats.disconnect_err; |
|
395 | + spacewire_stats.disconnect_err; | |
182 | spacewire_stats_backup.escape_err = spacewire_stats_grspw.escape_err |
|
396 | spacewire_stats_backup.escape_err = spacewire_stats_grspw.escape_err | |
183 | + spacewire_stats.escape_err; |
|
397 | + spacewire_stats.escape_err; | |
184 | spacewire_stats_backup.credit_err = spacewire_stats_grspw.credit_err |
|
398 | spacewire_stats_backup.credit_err = spacewire_stats_grspw.credit_err | |
185 | + spacewire_stats.credit_err; |
|
399 | + spacewire_stats.credit_err; | |
186 | spacewire_stats_backup.write_sync_err = spacewire_stats_grspw.write_sync_err |
|
400 | spacewire_stats_backup.write_sync_err = spacewire_stats_grspw.write_sync_err | |
187 | + spacewire_stats.write_sync_err; |
|
401 | + spacewire_stats.write_sync_err; | |
188 | spacewire_stats_backup.rx_rmap_header_crc_err = spacewire_stats_grspw.rx_rmap_header_crc_err |
|
402 | spacewire_stats_backup.rx_rmap_header_crc_err = spacewire_stats_grspw.rx_rmap_header_crc_err | |
189 | + spacewire_stats.rx_rmap_header_crc_err; |
|
403 | + spacewire_stats.rx_rmap_header_crc_err; | |
190 | spacewire_stats_backup.rx_rmap_data_crc_err = spacewire_stats_grspw.rx_rmap_data_crc_err |
|
404 | spacewire_stats_backup.rx_rmap_data_crc_err = spacewire_stats_grspw.rx_rmap_data_crc_err | |
191 | + spacewire_stats.rx_rmap_data_crc_err; |
|
405 | + spacewire_stats.rx_rmap_data_crc_err; | |
192 | spacewire_stats_backup.early_ep = spacewire_stats_grspw.early_ep |
|
406 | spacewire_stats_backup.early_ep = spacewire_stats_grspw.early_ep | |
193 | + spacewire_stats.early_ep; |
|
407 | + spacewire_stats.early_ep; | |
194 | spacewire_stats_backup.invalid_address = spacewire_stats_grspw.invalid_address |
|
408 | spacewire_stats_backup.invalid_address = spacewire_stats_grspw.invalid_address | |
195 | + spacewire_stats.invalid_address; |
|
409 | + spacewire_stats.invalid_address; | |
196 | spacewire_stats_backup.rx_eep_err = spacewire_stats_grspw.rx_eep_err |
|
410 | spacewire_stats_backup.rx_eep_err = spacewire_stats_grspw.rx_eep_err | |
197 | + spacewire_stats.rx_eep_err; |
|
411 | + spacewire_stats.rx_eep_err; | |
198 | spacewire_stats_backup.rx_truncated = spacewire_stats_grspw.rx_truncated |
|
412 | spacewire_stats_backup.rx_truncated = spacewire_stats_grspw.rx_truncated | |
199 | + spacewire_stats.rx_truncated; |
|
413 | + spacewire_stats.rx_truncated; | |
200 | } |
|
414 | } | |
201 |
|
415 | |||
202 | void timecode_irq_handler(void *pDev, void *regs, int minor, unsigned int tc) |
|
416 | void spacewire_update_statistics( void ) | |
|
417 | { | |||
|
418 | rtems_status_code status; | |||
|
419 | spw_stats spacewire_stats_grspw; | |||
|
420 | ||||
|
421 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, &spacewire_stats_grspw ); | |||
|
422 | ||||
|
423 | spacewire_stats.packets_received = spacewire_stats_backup.packets_received | |||
|
424 | + spacewire_stats_grspw.packets_received; | |||
|
425 | spacewire_stats.packets_sent = spacewire_stats_backup.packets_sent | |||
|
426 | + spacewire_stats_grspw.packets_sent; | |||
|
427 | spacewire_stats.parity_err = spacewire_stats_backup.parity_err | |||
|
428 | + spacewire_stats_grspw.parity_err; | |||
|
429 | spacewire_stats.disconnect_err = spacewire_stats_backup.disconnect_err | |||
|
430 | + spacewire_stats_grspw.disconnect_err; | |||
|
431 | spacewire_stats.escape_err = spacewire_stats_backup.escape_err | |||
|
432 | + spacewire_stats_grspw.escape_err; | |||
|
433 | spacewire_stats.credit_err = spacewire_stats_backup.credit_err | |||
|
434 | + spacewire_stats_grspw.credit_err; | |||
|
435 | spacewire_stats.write_sync_err = spacewire_stats_backup.write_sync_err | |||
|
436 | + spacewire_stats_grspw.write_sync_err; | |||
|
437 | spacewire_stats.rx_rmap_header_crc_err = spacewire_stats_backup.rx_rmap_header_crc_err | |||
|
438 | + spacewire_stats_grspw.rx_rmap_header_crc_err; | |||
|
439 | spacewire_stats.rx_rmap_data_crc_err = spacewire_stats_backup.rx_rmap_data_crc_err | |||
|
440 | + spacewire_stats_grspw.rx_rmap_data_crc_err; | |||
|
441 | spacewire_stats.early_ep = spacewire_stats_backup.early_ep | |||
|
442 | + spacewire_stats_grspw.early_ep; | |||
|
443 | spacewire_stats.invalid_address = spacewire_stats_backup.invalid_address | |||
|
444 | + spacewire_stats_grspw.invalid_address; | |||
|
445 | spacewire_stats.rx_eep_err = spacewire_stats_backup.rx_eep_err | |||
|
446 | + spacewire_stats_grspw.rx_eep_err; | |||
|
447 | spacewire_stats.rx_truncated = spacewire_stats_backup.rx_truncated | |||
|
448 | + spacewire_stats_grspw.rx_truncated; | |||
|
449 | //spacewire_stats.tx_link_err; | |||
|
450 | ||||
|
451 | //**************************** | |||
|
452 | // DPU_SPACEWIRE_IF_STATISTICS | |||
|
453 | housekeeping_packet.hk_lfr_dpu_spw_pkt_rcv_cnt[0] = (unsigned char) (spacewire_stats.packets_received >> 8); | |||
|
454 | housekeeping_packet.hk_lfr_dpu_spw_pkt_rcv_cnt[1] = (unsigned char) (spacewire_stats.packets_received); | |||
|
455 | housekeeping_packet.hk_lfr_dpu_spw_pkt_sent_cnt[0] = (unsigned char) (spacewire_stats.packets_sent >> 8); | |||
|
456 | housekeeping_packet.hk_lfr_dpu_spw_pkt_sent_cnt[1] = (unsigned char) (spacewire_stats.packets_sent); | |||
|
457 | //housekeeping_packet.hk_lfr_dpu_spw_tick_out_cnt; | |||
|
458 | //housekeeping_packet.hk_lfr_dpu_spw_last_timc; | |||
|
459 | ||||
|
460 | //****************************************** | |||
|
461 | // ERROR COUNTERS / SPACEWIRE / LOW SEVERITY | |||
|
462 | housekeeping_packet.hk_lfr_dpu_spw_parity = (unsigned char) spacewire_stats.parity_err; | |||
|
463 | housekeeping_packet.hk_lfr_dpu_spw_disconnect = (unsigned char) spacewire_stats.disconnect_err; | |||
|
464 | housekeeping_packet.hk_lfr_dpu_spw_escape = (unsigned char) spacewire_stats.escape_err; | |||
|
465 | housekeeping_packet.hk_lfr_dpu_spw_credit = (unsigned char) spacewire_stats.credit_err; | |||
|
466 | housekeeping_packet.hk_lfr_dpu_spw_write_sync = (unsigned char) spacewire_stats.write_sync_err; | |||
|
467 | // housekeeping_packet.hk_lfr_dpu_spw_rx_ahb; | |||
|
468 | // housekeeping_packet.hk_lfr_dpu_spw_tx_ahb; | |||
|
469 | housekeeping_packet.hk_lfr_dpu_spw_header_crc = (unsigned char) spacewire_stats.rx_rmap_header_crc_err; | |||
|
470 | housekeeping_packet.hk_lfr_dpu_spw_data_crc = (unsigned char) spacewire_stats.rx_rmap_data_crc_err; | |||
|
471 | ||||
|
472 | //********************************************* | |||
|
473 | // ERROR COUNTERS / SPACEWIRE / MEDIUM SEVERITY | |||
|
474 | housekeeping_packet.hk_lfr_dpu_spw_early_eop = (unsigned char) spacewire_stats.early_ep; | |||
|
475 | housekeeping_packet.hk_lfr_dpu_spw_invalid_addr = (unsigned char) spacewire_stats.invalid_address; | |||
|
476 | housekeeping_packet.hk_lfr_dpu_spw_eep = (unsigned char) spacewire_stats.rx_eep_err; | |||
|
477 | housekeeping_packet.hk_lfr_dpu_spw_rx_too_big = (unsigned char) spacewire_stats.rx_truncated; | |||
|
478 | ||||
|
479 | } | |||
|
480 | ||||
|
481 | void timecode_irq_handler( void *pDev, void *regs, int minor, unsigned int tc ) | |||
203 | { |
|
482 | { | |
204 | //if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_1 ) != RTEMS_SUCCESSFUL) { |
|
483 | //if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_1 ) != RTEMS_SUCCESSFUL) { | |
205 | // printf("In timecode_irq_handler *** Error sending event to DUMB\n"); |
|
484 | // printf("In timecode_irq_handler *** Error sending event to DUMB\n"); | |
206 | //} |
|
485 | //} | |
207 | } |
|
486 | } |
This diff has been collapsed as it changes many lines, (528 lines changed) Show them Hide them | |||||
@@ -1,1284 +1,780 | |||||
1 | /** Functions and tasks related to TeleCommand handling. |
|
1 | /** Functions and tasks related to TeleCommand handling. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * A group of functions to handle TeleCommands:\n |
|
6 | * A group of functions to handle TeleCommands:\n | |
7 | * action launching\n |
|
7 | * action launching\n | |
8 | * TC parsing\n |
|
8 | * TC parsing\n | |
9 | * ... |
|
9 | * ... | |
10 | * |
|
10 | * | |
11 | */ |
|
11 | */ | |
12 |
|
12 | |||
13 | #include "tc_handler.h" |
|
13 | #include "tc_handler.h" | |
14 |
|
14 | |||
15 | char *DumbMessages[6] = {"in DUMB *** default", // RTEMS_EVENT_0 |
|
|||
16 | "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 |
|
|||
17 | "in DUMB *** waveforms_isr", // RTEMS_EVENT_2 |
|
|||
18 | "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 |
|
|||
19 | "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 |
|
|||
20 | "in DUMB *** waveforms_simulator_isr" // RTEMS_EVENT_5 |
|
|||
21 | }; |
|
|||
22 |
|
||||
23 | unsigned char currentTC_LEN_RCV[2]; // SHALL be equal to the current TC packet estimated packet length field |
|
|||
24 | unsigned int currentTC_LEN_RCV_AsUnsignedInt; |
|
|||
25 | unsigned int currentTM_length; |
|
|||
26 | unsigned char currentTC_processedFlag; |
|
|||
27 |
|
||||
28 | unsigned int lookUpTableForCRC[256]; |
|
|||
29 |
|
||||
30 | //********************** |
|
|||
31 | // GENERAL USE FUNCTIONS |
|
|||
32 | unsigned int Crc_opt( unsigned char D, unsigned int Chk) |
|
|||
33 | { |
|
|||
34 | /** This function generate the CRC for one byte and returns the value of the new syndrome. |
|
|||
35 | * |
|
|||
36 | * @param D is the current byte of data. |
|
|||
37 | * @param Chk is the current syndrom value. |
|
|||
38 | * @return the value of the new syndrome on two bytes. |
|
|||
39 | * |
|
|||
40 | */ |
|
|||
41 |
|
||||
42 | return(((Chk << 8) & 0xff00)^lookUpTableForCRC [(((Chk >> 8)^D) & 0x00ff)]); |
|
|||
43 | } |
|
|||
44 |
|
||||
45 | void initLookUpTableForCRC( void ) |
|
|||
46 | { |
|
|||
47 | /** This function is used to initiates the look-up table for fast CRC computation. |
|
|||
48 | * |
|
|||
49 | * The global table lookUpTableForCRC[256] is initiated. |
|
|||
50 | * |
|
|||
51 | */ |
|
|||
52 |
|
||||
53 | unsigned int i; |
|
|||
54 | unsigned int tmp; |
|
|||
55 |
|
||||
56 | for (i=0; i<256; i++) |
|
|||
57 | { |
|
|||
58 | tmp = 0; |
|
|||
59 | if((i & 1) != 0) { |
|
|||
60 | tmp = tmp ^ 0x1021; |
|
|||
61 | } |
|
|||
62 | if((i & 2) != 0) { |
|
|||
63 | tmp = tmp ^ 0x2042; |
|
|||
64 | } |
|
|||
65 | if((i & 4) != 0) { |
|
|||
66 | tmp = tmp ^ 0x4084; |
|
|||
67 | } |
|
|||
68 | if((i & 8) != 0) { |
|
|||
69 | tmp = tmp ^ 0x8108; |
|
|||
70 | } |
|
|||
71 | if((i & 16) != 0) { |
|
|||
72 | tmp = tmp ^ 0x1231; |
|
|||
73 | } |
|
|||
74 | if((i & 32) != 0) { |
|
|||
75 | tmp = tmp ^ 0x2462; |
|
|||
76 | } |
|
|||
77 | if((i & 64) != 0) { |
|
|||
78 | tmp = tmp ^ 0x48c4; |
|
|||
79 | } |
|
|||
80 | if((i & 128) != 0) { |
|
|||
81 | tmp = tmp ^ 0x9188; |
|
|||
82 | } |
|
|||
83 | lookUpTableForCRC[i] = tmp; |
|
|||
84 | } |
|
|||
85 | } |
|
|||
86 |
|
||||
87 | void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData) |
|
|||
88 | { |
|
|||
89 | /** This function calculates a two bytes Cyclic Redundancy Code. |
|
|||
90 | * |
|
|||
91 | * @param data points to a buffer containing the data on which to compute the CRC. |
|
|||
92 | * @param crcAsTwoBytes points points to a two bytes buffer in which the CRC is stored. |
|
|||
93 | * @param sizeOfData is the number of bytes of *data* used to compute the CRC. |
|
|||
94 | * |
|
|||
95 | * The specification of the Cyclic Redundancy Code is described in the following document: ECSS-E-70-41-A. |
|
|||
96 | * |
|
|||
97 | */ |
|
|||
98 |
|
||||
99 | unsigned int Chk; |
|
|||
100 | int j; |
|
|||
101 | Chk = 0xffff; // reset the syndrom to all ones |
|
|||
102 | for (j=0; j<sizeOfData; j++) { |
|
|||
103 | Chk = Crc_opt(data[j], Chk); |
|
|||
104 | } |
|
|||
105 | crcAsTwoBytes[0] = (unsigned char) (Chk >> 8); |
|
|||
106 | crcAsTwoBytes[1] = (unsigned char) (Chk & 0x00ff); |
|
|||
107 | } |
|
|||
108 |
|
||||
109 | void updateLFRCurrentMode() |
|
|||
110 | { |
|
|||
111 | /** This function updates the value of the global variable lfrCurrentMode. |
|
|||
112 | * |
|
|||
113 | * lfrCurrentMode is a parameter used by several functions to know in which mode LFR is running. |
|
|||
114 | * |
|
|||
115 | */ |
|
|||
116 | // update the local value of lfrCurrentMode with the value contained in the housekeeping_packet structure |
|
|||
117 | lfrCurrentMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
|||
118 | } |
|
|||
119 |
|
||||
120 | //********************* |
|
|||
121 | // ACCEPTANCE FUNCTIONS |
|
|||
122 | int tc_acceptance(ccsdsTelecommandPacket_t *TC, unsigned int tc_len_recv, rtems_id queue_recv_id, rtems_id queue_send_id) |
|
|||
123 | { |
|
|||
124 | /** This function executes the TeleCommand acceptance steps. |
|
|||
125 | * |
|
|||
126 | * @param TC points to the TeleCommand packet which is under investigation. |
|
|||
127 | * @param tc_len_recv contains the length of the packet that has been received. |
|
|||
128 | * @param queue_recv_id is the id of the rtems queue in which messages are written if the acceptance is not successful |
|
|||
129 | * @param queue_send_id is the id of the rtems queue in which messages are written if the acceptance is successful |
|
|||
130 | * @return status code |
|
|||
131 | * |
|
|||
132 | * The acceptance steps can result in two different actions. |
|
|||
133 | * 1. If the acceptance is successful, the TC is sent in the receiving queue for processing. |
|
|||
134 | * 2. If the acceptance fails, a TM packet is transmitted to report the error. |
|
|||
135 | * |
|
|||
136 | */ |
|
|||
137 |
|
||||
138 | int ret = 0; |
|
|||
139 | rtems_status_code status; |
|
|||
140 | unsigned int parserCode = 0; |
|
|||
141 | unsigned char computed_CRC[2]; |
|
|||
142 |
|
||||
143 | GetCRCAsTwoBytes( (unsigned char*) TC->packetID, computed_CRC, tc_len_recv + 5 ); |
|
|||
144 | parserCode = tc_parser( TC, tc_len_recv ) ; |
|
|||
145 | if ( (parserCode == ILLEGAL_APID) | (parserCode == WRONG_LEN_PACKET) | (parserCode == INCOR_CHECKSUM) |
|
|||
146 | | (parserCode == ILL_TYPE) | (parserCode == ILL_SUBTYPE) | (parserCode == WRONG_APP_DATA) ) |
|
|||
147 | { // send TM_LFR_TC_EXE_CORRUPTED |
|
|||
148 | send_tm_lfr_tc_exe_corrupted( TC, queue_send_id, computed_CRC, currentTC_LEN_RCV ); |
|
|||
149 | } |
|
|||
150 | else { // send valid TC to the action launcher |
|
|||
151 | status = rtems_message_queue_send( queue_recv_id, TC, tc_len_recv + CCSDS_TC_TM_PACKET_OFFSET + 3); |
|
|||
152 | ret = LFR_SUCCESSFUL; |
|
|||
153 | } |
|
|||
154 | return ret; |
|
|||
155 | } |
|
|||
156 |
|
||||
157 | int tc_parser(ccsdsTelecommandPacket_t * TCPacket, unsigned int TC_LEN_RCV) |
|
|||
158 | { |
|
|||
159 | /** This function parses TeleCommands. |
|
|||
160 | * |
|
|||
161 | * @param TC points to the TeleCommand that will be parsed. |
|
|||
162 | * @param TC_LEN_RCV is the received packet length. |
|
|||
163 | * @return Status code of the parsing. |
|
|||
164 | * |
|
|||
165 | * The parsing checks: |
|
|||
166 | * - process id |
|
|||
167 | * - category |
|
|||
168 | * - length: a global check is performed and a per subtype check also |
|
|||
169 | * - type |
|
|||
170 | * - subtype |
|
|||
171 | * - crc |
|
|||
172 | * |
|
|||
173 | */ |
|
|||
174 |
|
||||
175 | int status; |
|
|||
176 | unsigned char pid; |
|
|||
177 | unsigned char category; |
|
|||
178 | unsigned int length; |
|
|||
179 | unsigned char packetType; |
|
|||
180 | unsigned char packetSubtype; |
|
|||
181 |
|
||||
182 | status = CCSDS_TM_VALID; |
|
|||
183 |
|
||||
184 | // APID check *** APID on 2 bytes |
|
|||
185 | pid = ((TCPacket->packetID[0] & 0x07)<<4) + ( (TCPacket->packetID[1]>>4) & 0x0f ); // PID = 11 *** 7 bits xxxxx210 7654xxxx |
|
|||
186 | category = (TCPacket->packetID[1] & 0x0f); // PACKET_CATEGORY = 12 *** 4 bits xxxxxxxx xxxx3210 |
|
|||
187 | length = (TCPacket->packetLength[0] * 256) + TCPacket->packetLength[1]; |
|
|||
188 | packetType = TCPacket->serviceType; |
|
|||
189 | packetSubtype = TCPacket->serviceSubType; |
|
|||
190 |
|
||||
191 | if ( pid != CCSDS_PROCESS_ID ) // CHECK THE PROCESS ID |
|
|||
192 | { |
|
|||
193 | status = ILLEGAL_APID; |
|
|||
194 | } |
|
|||
195 | if (status == CCSDS_TM_VALID) // CHECK THE CATEGORY |
|
|||
196 | { |
|
|||
197 | if ( category != CCSDS_PACKET_CATEGORY ) |
|
|||
198 | { |
|
|||
199 | status = ILLEGAL_APID; |
|
|||
200 | } |
|
|||
201 | } |
|
|||
202 | if (status == CCSDS_TM_VALID) // CHECK THE PACKET LENGTH FIELD AND THE ACTUAL LENGTH COMPLIANCE |
|
|||
203 | { |
|
|||
204 | if (length != TC_LEN_RCV ) { |
|
|||
205 | status = WRONG_LEN_PACKET; |
|
|||
206 | } |
|
|||
207 | } |
|
|||
208 | if (status == CCSDS_TM_VALID) // CHECK THAT THE PACKET DOES NOT EXCEED THE MAX SIZE |
|
|||
209 | { |
|
|||
210 | if ( length >= CCSDS_TC_PKT_MAX_SIZE ) { |
|
|||
211 | status = WRONG_LEN_PACKET; |
|
|||
212 | } |
|
|||
213 | } |
|
|||
214 | if (status == CCSDS_TM_VALID) // CHECK THE TYPE |
|
|||
215 | { |
|
|||
216 | status = tc_check_type( packetType ); |
|
|||
217 | } |
|
|||
218 | if (status == CCSDS_TM_VALID) // CHECK THE SUBTYPE |
|
|||
219 | { |
|
|||
220 | status = tc_check_subtype( packetSubtype ); |
|
|||
221 | } |
|
|||
222 | if (status == CCSDS_TM_VALID) // CHECK THE SUBTYPE AND LENGTH COMPLIANCE |
|
|||
223 | { |
|
|||
224 | status = tc_check_length( packetSubtype, length ); |
|
|||
225 | } |
|
|||
226 | if (status == CCSDS_TM_VALID ) // CHECK CRC |
|
|||
227 | { |
|
|||
228 | status = tc_check_crc( TCPacket, length ); |
|
|||
229 | } |
|
|||
230 |
|
||||
231 | return status; |
|
|||
232 | } |
|
|||
233 |
|
||||
234 | int tc_check_type( unsigned char packetType ) |
|
|||
235 | { |
|
|||
236 | /** This function checks that the type of a TeleCommand is valid. |
|
|||
237 | * |
|
|||
238 | * @param packetType is the type to check. |
|
|||
239 | * @return Status code CCSDS_TM_VALID or ILL_TYPE. |
|
|||
240 | * |
|
|||
241 | */ |
|
|||
242 |
|
||||
243 | int status; |
|
|||
244 |
|
||||
245 | if ( (packetType == TC_TYPE_GEN) || (packetType == TC_TYPE_TIME)) |
|
|||
246 | { |
|
|||
247 | status = CCSDS_TM_VALID; |
|
|||
248 | } |
|
|||
249 | else |
|
|||
250 | { |
|
|||
251 | status = ILL_TYPE; |
|
|||
252 | } |
|
|||
253 |
|
||||
254 | return status; |
|
|||
255 | } |
|
|||
256 |
|
||||
257 | int tc_check_subtype( unsigned char packetSubType ) |
|
|||
258 | { |
|
|||
259 | /** This function checks that the subtype of a TeleCommand is valid. |
|
|||
260 | * |
|
|||
261 | * @param packetSubType is the subtype to check. |
|
|||
262 | * @return Status code CCSDS_TM_VALID or ILL_SUBTYPE. |
|
|||
263 | * |
|
|||
264 | */ |
|
|||
265 |
|
||||
266 | int status; |
|
|||
267 |
|
||||
268 | if ( (packetSubType == TC_SUBTYPE_RESET) |
|
|||
269 | || (packetSubType == TC_SUBTYPE_LOAD_COMM) |
|
|||
270 | || (packetSubType == TC_SUBTYPE_LOAD_NORM) || (packetSubType == TC_SUBTYPE_LOAD_BURST) |
|
|||
271 | || (packetSubType == TC_SUBTYPE_LOAD_SBM1) || (packetSubType == TC_SUBTYPE_LOAD_SBM2) |
|
|||
272 | || (packetSubType == TC_SUBTYPE_DUMP) |
|
|||
273 | || (packetSubType == TC_SUBTYPE_ENTER) |
|
|||
274 | || (packetSubType == TC_SUBTYPE_UPDT_INFO) || (packetSubType == TC_SUBTYPE_UPDT_TIME) |
|
|||
275 | || (packetSubType == TC_SUBTYPE_EN_CAL) || (packetSubType == TC_SUBTYPE_DIS_CAL) ) |
|
|||
276 | { |
|
|||
277 | status = CCSDS_TM_VALID; |
|
|||
278 | } |
|
|||
279 | else |
|
|||
280 | { |
|
|||
281 | status = ILL_TYPE; |
|
|||
282 | } |
|
|||
283 |
|
||||
284 | return status; |
|
|||
285 | } |
|
|||
286 |
|
||||
287 | int tc_check_length( unsigned char packetSubType, unsigned int length ) |
|
|||
288 | { |
|
|||
289 | /** This function checks that the subtype and the length are compliant. |
|
|||
290 | * |
|
|||
291 | * @param packetSubType is the subtype to check. |
|
|||
292 | * @param length is the length to check. |
|
|||
293 | * @return Status code CCSDS_TM_VALID or ILL_TYPE. |
|
|||
294 | * |
|
|||
295 | */ |
|
|||
296 |
|
||||
297 | int status; |
|
|||
298 |
|
||||
299 | status = LFR_SUCCESSFUL; |
|
|||
300 |
|
||||
301 | switch(packetSubType) |
|
|||
302 | { |
|
|||
303 | case TC_SUBTYPE_RESET: |
|
|||
304 | if (length!=(TC_LEN_RESET-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
305 | status = WRONG_LEN_PACKET; |
|
|||
306 | } |
|
|||
307 | else { |
|
|||
308 | status = CCSDS_TM_VALID; |
|
|||
309 | } |
|
|||
310 | break; |
|
|||
311 | case TC_SUBTYPE_LOAD_COMM: |
|
|||
312 | if (length!=(TC_LEN_LOAD_COMM-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
313 | status = WRONG_LEN_PACKET; |
|
|||
314 | } |
|
|||
315 | else { |
|
|||
316 | status = CCSDS_TM_VALID; |
|
|||
317 | } |
|
|||
318 | break; |
|
|||
319 | case TC_SUBTYPE_LOAD_NORM: |
|
|||
320 | if (length!=(TC_LEN_LOAD_NORM-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
321 | status = WRONG_LEN_PACKET; |
|
|||
322 | } |
|
|||
323 | else { |
|
|||
324 | status = CCSDS_TM_VALID; |
|
|||
325 | } |
|
|||
326 | break; |
|
|||
327 | case TC_SUBTYPE_LOAD_BURST: |
|
|||
328 | if (length!=(TC_LEN_LOAD_BURST-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
329 | status = WRONG_LEN_PACKET; |
|
|||
330 | } |
|
|||
331 | else { |
|
|||
332 | status = CCSDS_TM_VALID; |
|
|||
333 | } |
|
|||
334 | break; |
|
|||
335 | case TC_SUBTYPE_LOAD_SBM1: |
|
|||
336 | if (length!=(TC_LEN_LOAD_SBM1-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
337 | status = WRONG_LEN_PACKET; |
|
|||
338 | } |
|
|||
339 | else { |
|
|||
340 | status = CCSDS_TM_VALID; |
|
|||
341 | } |
|
|||
342 | break; |
|
|||
343 | case TC_SUBTYPE_LOAD_SBM2: |
|
|||
344 | if (length!=(TC_LEN_LOAD_SBM2-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
345 | status = WRONG_LEN_PACKET; |
|
|||
346 | } |
|
|||
347 | else { |
|
|||
348 | status = CCSDS_TM_VALID; |
|
|||
349 | } |
|
|||
350 | break; |
|
|||
351 | case TC_SUBTYPE_DUMP: |
|
|||
352 | if (length!=(TC_LEN_DUMP-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
353 | status = WRONG_LEN_PACKET; |
|
|||
354 | } |
|
|||
355 | else { |
|
|||
356 | status = CCSDS_TM_VALID; |
|
|||
357 | } |
|
|||
358 | break; |
|
|||
359 | case TC_SUBTYPE_ENTER: |
|
|||
360 | if (length!=(TC_LEN_ENTER-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
361 | status = WRONG_LEN_PACKET; |
|
|||
362 | } |
|
|||
363 | else { |
|
|||
364 | status = CCSDS_TM_VALID; |
|
|||
365 | } |
|
|||
366 | break; |
|
|||
367 | case TC_SUBTYPE_UPDT_INFO: |
|
|||
368 | if (length!=(TC_LEN_UPDT_INFO-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
369 | status = WRONG_LEN_PACKET; |
|
|||
370 | } |
|
|||
371 | else { |
|
|||
372 | status = CCSDS_TM_VALID; |
|
|||
373 | } |
|
|||
374 | break; |
|
|||
375 | case TC_SUBTYPE_EN_CAL: |
|
|||
376 | if (length!=(TC_LEN_EN_CAL-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
377 | status = WRONG_LEN_PACKET; |
|
|||
378 | } |
|
|||
379 | else { |
|
|||
380 | status = CCSDS_TM_VALID; |
|
|||
381 | } |
|
|||
382 | break; |
|
|||
383 | case TC_SUBTYPE_DIS_CAL: |
|
|||
384 | if (length!=(TC_LEN_DIS_CAL-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
385 | status = WRONG_LEN_PACKET; |
|
|||
386 | } |
|
|||
387 | else { |
|
|||
388 | status = CCSDS_TM_VALID; |
|
|||
389 | } |
|
|||
390 | break; |
|
|||
391 | case TC_SUBTYPE_UPDT_TIME: |
|
|||
392 | if (length!=(TC_LEN_UPDT_TIME-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
|||
393 | status = WRONG_LEN_PACKET; |
|
|||
394 | } |
|
|||
395 | else { |
|
|||
396 | status = CCSDS_TM_VALID; |
|
|||
397 | } |
|
|||
398 | break; |
|
|||
399 | default: // if the subtype is not a legal value, return ILL_SUBTYPE |
|
|||
400 | status = ILL_SUBTYPE; |
|
|||
401 | break ; |
|
|||
402 | } |
|
|||
403 |
|
||||
404 | return status; |
|
|||
405 | } |
|
|||
406 |
|
||||
407 | int tc_check_crc( ccsdsTelecommandPacket_t * TCPacket, unsigned int length ) |
|
|||
408 | { |
|
|||
409 | /** This function checks the CRC validity of the corresponding TeleCommand packet. |
|
|||
410 | * |
|
|||
411 | * @param TCPacket points to the TeleCommand packet to check. |
|
|||
412 | * @param length is the length of the TC packet. |
|
|||
413 | * @return Status code CCSDS_TM_VALID or INCOR_CHECKSUM. |
|
|||
414 | * |
|
|||
415 | */ |
|
|||
416 |
|
||||
417 | int status; |
|
|||
418 | unsigned char * CCSDSContent; |
|
|||
419 | unsigned char currentTC_COMPUTED_CRC[2]; |
|
|||
420 |
|
||||
421 | CCSDSContent = (unsigned char*) TCPacket->packetID; |
|
|||
422 | GetCRCAsTwoBytes(CCSDSContent, currentTC_COMPUTED_CRC, length + CCSDS_TC_TM_PACKET_OFFSET - 2); // 2 CRC bytes removed from the calculation of the CRC |
|
|||
423 | if (currentTC_COMPUTED_CRC[0] != CCSDSContent[length + CCSDS_TC_TM_PACKET_OFFSET -2]) { |
|
|||
424 | status = INCOR_CHECKSUM; |
|
|||
425 | } |
|
|||
426 | else if (currentTC_COMPUTED_CRC[1] != CCSDSContent[length + CCSDS_TC_TM_PACKET_OFFSET -1]) { |
|
|||
427 | status = INCOR_CHECKSUM; |
|
|||
428 | } |
|
|||
429 | else { |
|
|||
430 | status = CCSDS_TM_VALID; |
|
|||
431 | } |
|
|||
432 |
|
||||
433 | return status; |
|
|||
434 | } |
|
|||
435 |
|
||||
436 | //*********** |
|
15 | //*********** | |
437 | // RTEMS TASK |
|
16 | // RTEMS TASK | |
438 | rtems_task recv_task( rtems_task_argument unused ) |
|
|||
439 | { |
|
|||
440 | /** This RTEMS task is dedicated to the reception of incoming TeleCommands. |
|
|||
441 | * |
|
|||
442 | * @param unused is the starting argument of the RTEMS task |
|
|||
443 | * |
|
|||
444 | * The RECV task blocks on a call to the read system call, waiting for incoming SpaceWire data. When unblocked: |
|
|||
445 | * 1. It reads the incoming data. |
|
|||
446 | * 2. Launches the acceptance procedure. |
|
|||
447 | * 3. If the Telecommand is valid, sends it to the ACTN task using an RTEMS message queue. |
|
|||
448 | * |
|
|||
449 | */ |
|
|||
450 |
|
||||
451 | int len = 0; |
|
|||
452 | unsigned int i = 0; |
|
|||
453 | ccsdsTelecommandPacket_t currentTC; |
|
|||
454 | char data[100]; |
|
|||
455 | rtems_status_code status; |
|
|||
456 | rtems_id queue_recv_id; |
|
|||
457 | rtems_id queue_send_id; |
|
|||
458 |
|
||||
459 | for(i=0; i<100; i++) data[i] = 0; |
|
|||
460 |
|
||||
461 | initLookUpTableForCRC(); // the table is used to compute Cyclic Redundancy Codes |
|
|||
462 |
|
||||
463 | status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_recv_id ); |
|
|||
464 | if (status != RTEMS_SUCCESSFUL) |
|
|||
465 | { |
|
|||
466 | PRINTF1("in RECV *** ERR getting QUEUE_RECV id, %d\n", status) |
|
|||
467 | } |
|
|||
468 |
|
||||
469 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_send_id ); |
|
|||
470 | if (status != RTEMS_SUCCESSFUL) |
|
|||
471 | { |
|
|||
472 | PRINTF1("in RECV *** ERR getting QUEUE_SEND id, %d\n", status) |
|
|||
473 | } |
|
|||
474 |
|
||||
475 | BOOT_PRINTF("in RECV *** \n") |
|
|||
476 |
|
||||
477 | while(1) |
|
|||
478 | { |
|
|||
479 | len = read(fdSPW, (char*) ¤tTC, CCSDS_TC_PKT_MAX_SIZE); // the call to read is blocking |
|
|||
480 | if (len == -1){ // error during the read call |
|
|||
481 | PRINTF("In RECV *** last read call returned -1\n") |
|
|||
482 | } |
|
|||
483 | else { |
|
|||
484 | if ( (len+1) < CCSDS_TC_PKT_MIN_SIZE ) { |
|
|||
485 | PRINTF("In RECV *** packet lenght too short\n") |
|
|||
486 | } |
|
|||
487 | else { |
|
|||
488 | currentTC_LEN_RCV[0] = 0x00; |
|
|||
489 | currentTC_LEN_RCV[1] = (unsigned char) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // build the corresponding packet size field |
|
|||
490 | currentTC_LEN_RCV_AsUnsignedInt = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes |
|
|||
491 | // CHECK THE TC |
|
|||
492 | tc_acceptance(¤tTC, currentTC_LEN_RCV_AsUnsignedInt, queue_recv_id, queue_send_id); |
|
|||
493 | } |
|
|||
494 | } |
|
|||
495 | } |
|
|||
496 | } |
|
|||
497 |
|
17 | |||
498 | rtems_task actn_task( rtems_task_argument unused ) |
|
18 | rtems_task actn_task( rtems_task_argument unused ) | |
499 | { |
|
19 | { | |
500 | /** This RTEMS task is responsible for launching actions upton the reception of valid TeleCommands. |
|
20 | /** This RTEMS task is responsible for launching actions upton the reception of valid TeleCommands. | |
501 | * |
|
21 | * | |
502 | * @param unused is the starting argument of the RTEMS task |
|
22 | * @param unused is the starting argument of the RTEMS task | |
503 | * |
|
23 | * | |
504 | * The ACTN task waits for data coming from an RTEMS msesage queue. When data arrives, it launches specific actions depending |
|
24 | * The ACTN task waits for data coming from an RTEMS msesage queue. When data arrives, it launches specific actions depending | |
505 | * on the incoming TeleCommand. |
|
25 | * on the incoming TeleCommand. | |
506 | * |
|
26 | * | |
507 | */ |
|
27 | */ | |
508 |
|
28 | |||
509 | int result; |
|
29 | int result; | |
510 | rtems_status_code status; // RTEMS status code |
|
30 | rtems_status_code status; // RTEMS status code | |
511 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task |
|
31 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task | |
512 | size_t size; // size of the incoming TC packet |
|
32 | size_t size; // size of the incoming TC packet | |
513 | unsigned char subtype; // subtype of the current TC packet |
|
33 | unsigned char subtype; // subtype of the current TC packet | |
514 | rtems_id queue_rcv_id; |
|
34 | rtems_id queue_rcv_id; | |
515 | rtems_id queue_snd_id; |
|
35 | rtems_id queue_snd_id; | |
516 |
|
36 | |||
517 | status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_rcv_id ); |
|
37 | status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_rcv_id ); | |
518 | if (status != RTEMS_SUCCESSFUL) |
|
38 | if (status != RTEMS_SUCCESSFUL) | |
519 | { |
|
39 | { | |
520 | PRINTF1("in ACTN *** ERR getting queue_rcv_id %d\n", status) |
|
40 | PRINTF1("in ACTN *** ERR getting queue_rcv_id %d\n", status) | |
521 | } |
|
41 | } | |
522 |
|
42 | |||
523 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_snd_id ); |
|
43 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_snd_id ); | |
524 | if (status != RTEMS_SUCCESSFUL) |
|
44 | if (status != RTEMS_SUCCESSFUL) | |
525 | { |
|
45 | { | |
526 | PRINTF1("in ACTN *** ERR getting queue_snd_id %d\n", status) |
|
46 | PRINTF1("in ACTN *** ERR getting queue_snd_id %d\n", status) | |
527 | } |
|
47 | } | |
528 |
|
48 | |||
529 | result = LFR_SUCCESSFUL; |
|
49 | result = LFR_SUCCESSFUL; | |
530 | subtype = 0; // subtype of the current TC packet |
|
50 | subtype = 0; // subtype of the current TC packet | |
531 |
|
51 | |||
532 | BOOT_PRINTF("in ACTN *** \n") |
|
52 | BOOT_PRINTF("in ACTN *** \n") | |
533 |
|
53 | |||
534 | while(1) |
|
54 | while(1) | |
535 | { |
|
55 | { | |
536 | status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size, |
|
56 | status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size, | |
537 | RTEMS_WAIT, RTEMS_NO_TIMEOUT); |
|
57 | RTEMS_WAIT, RTEMS_NO_TIMEOUT); | |
538 | if (status!=RTEMS_SUCCESSFUL) PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status) |
|
58 | if (status!=RTEMS_SUCCESSFUL) PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status) | |
539 | else |
|
59 | else | |
540 | { |
|
60 | { | |
541 | subtype = TC.serviceSubType; |
|
61 | subtype = TC.serviceSubType; | |
542 | switch(subtype) |
|
62 | switch(subtype) | |
543 | { |
|
63 | { | |
544 | case TC_SUBTYPE_RESET: |
|
64 | case TC_SUBTYPE_RESET: | |
545 | result = action_reset( &TC, queue_snd_id ); |
|
65 | result = action_reset( &TC, queue_snd_id ); | |
546 | close_action( &TC, result, queue_snd_id ); |
|
66 | close_action( &TC, result, queue_snd_id ); | |
547 | break; |
|
67 | break; | |
548 | // |
|
68 | // | |
549 | case TC_SUBTYPE_LOAD_COMM: |
|
69 | case TC_SUBTYPE_LOAD_COMM: | |
550 | result = action_load_common_par( &TC ); |
|
70 | result = action_load_common_par( &TC ); | |
551 | close_action( &TC, result, queue_snd_id ); |
|
71 | close_action( &TC, result, queue_snd_id ); | |
552 | break; |
|
72 | break; | |
553 | // |
|
73 | // | |
554 | case TC_SUBTYPE_LOAD_NORM: |
|
74 | case TC_SUBTYPE_LOAD_NORM: | |
555 | result = action_load_normal_par( &TC, queue_snd_id ); |
|
75 | result = action_load_normal_par( &TC, queue_snd_id ); | |
556 | close_action( &TC, result, queue_snd_id ); |
|
76 | close_action( &TC, result, queue_snd_id ); | |
557 | break; |
|
77 | break; | |
558 | // |
|
78 | // | |
559 | case TC_SUBTYPE_LOAD_BURST: |
|
79 | case TC_SUBTYPE_LOAD_BURST: | |
560 | result = action_load_burst_par( &TC, queue_snd_id ); |
|
80 | result = action_load_burst_par( &TC, queue_snd_id ); | |
561 | close_action( &TC, result, queue_snd_id ); |
|
81 | close_action( &TC, result, queue_snd_id ); | |
562 | break; |
|
82 | break; | |
563 | // |
|
83 | // | |
564 | case TC_SUBTYPE_LOAD_SBM1: |
|
84 | case TC_SUBTYPE_LOAD_SBM1: | |
565 | result = action_load_sbm1_par( &TC, queue_snd_id ); |
|
85 | result = action_load_sbm1_par( &TC, queue_snd_id ); | |
566 | close_action( &TC, result, queue_snd_id ); |
|
86 | close_action( &TC, result, queue_snd_id ); | |
567 | break; |
|
87 | break; | |
568 | // |
|
88 | // | |
569 | case TC_SUBTYPE_LOAD_SBM2: |
|
89 | case TC_SUBTYPE_LOAD_SBM2: | |
570 | result = action_load_sbm2_par( &TC, queue_snd_id ); |
|
90 | result = action_load_sbm2_par( &TC, queue_snd_id ); | |
571 | close_action( &TC, result, queue_snd_id ); |
|
91 | close_action( &TC, result, queue_snd_id ); | |
572 | break; |
|
92 | break; | |
573 | // |
|
93 | // | |
574 | case TC_SUBTYPE_DUMP: |
|
94 | case TC_SUBTYPE_DUMP: | |
575 | result = action_dump_par( queue_snd_id ); |
|
95 | result = action_dump_par( queue_snd_id ); | |
576 | close_action( &TC, result, queue_snd_id ); |
|
96 | close_action( &TC, result, queue_snd_id ); | |
577 | break; |
|
97 | break; | |
578 | // |
|
98 | // | |
579 | case TC_SUBTYPE_ENTER: |
|
99 | case TC_SUBTYPE_ENTER: | |
580 | result = action_enter_mode( &TC, queue_snd_id ); |
|
100 | result = action_enter_mode( &TC, queue_snd_id ); | |
581 | close_action( &TC, result, queue_snd_id ); |
|
101 | close_action( &TC, result, queue_snd_id ); | |
582 | break; |
|
102 | break; | |
583 | // |
|
103 | // | |
584 | case TC_SUBTYPE_UPDT_INFO: |
|
104 | case TC_SUBTYPE_UPDT_INFO: | |
585 | result = action_update_info( &TC, queue_snd_id ); |
|
105 | result = action_update_info( &TC, queue_snd_id ); | |
586 | close_action( &TC, result, queue_snd_id ); |
|
106 | close_action( &TC, result, queue_snd_id ); | |
587 | break; |
|
107 | break; | |
588 | // |
|
108 | // | |
589 | case TC_SUBTYPE_EN_CAL: |
|
109 | case TC_SUBTYPE_EN_CAL: | |
590 | result = action_enable_calibration( &TC, queue_snd_id ); |
|
110 | result = action_enable_calibration( &TC, queue_snd_id ); | |
591 | close_action( &TC, result, queue_snd_id ); |
|
111 | close_action( &TC, result, queue_snd_id ); | |
592 | break; |
|
112 | break; | |
593 | // |
|
113 | // | |
594 | case TC_SUBTYPE_DIS_CAL: |
|
114 | case TC_SUBTYPE_DIS_CAL: | |
595 | result = action_disable_calibration( &TC, queue_snd_id ); |
|
115 | result = action_disable_calibration( &TC, queue_snd_id ); | |
596 | close_action( &TC, result, queue_snd_id ); |
|
116 | close_action( &TC, result, queue_snd_id ); | |
597 | break; |
|
117 | break; | |
598 | // |
|
118 | // | |
599 | case TC_SUBTYPE_UPDT_TIME: |
|
119 | case TC_SUBTYPE_UPDT_TIME: | |
600 | result = action_update_time( &TC ); |
|
120 | result = action_update_time( &TC ); | |
601 | close_action( &TC, result, queue_snd_id ); |
|
121 | close_action( &TC, result, queue_snd_id ); | |
602 | break; |
|
122 | break; | |
603 | // |
|
123 | // | |
604 | default: |
|
124 | default: | |
605 | break; |
|
125 | break; | |
606 | } |
|
126 | } | |
607 | } |
|
127 | } | |
608 | } |
|
128 | } | |
609 | } |
|
129 | } | |
610 |
|
130 | |||
611 | rtems_task dumb_task( rtems_task_argument unused ) |
|
|||
612 | { |
|
|||
613 | /** This RTEMS taks is used to print messages without affecting the general behaviour of the software. |
|
|||
614 | * |
|
|||
615 | * @param unused is the starting argument of the RTEMS task |
|
|||
616 | * |
|
|||
617 | * The DUMB taks waits for RTEMS events and print messages depending on the incoming events. |
|
|||
618 | * |
|
|||
619 | */ |
|
|||
620 |
|
||||
621 | unsigned int i; |
|
|||
622 | unsigned int intEventOut; |
|
|||
623 | unsigned int coarse_time = 0; |
|
|||
624 | unsigned int fine_time = 0; |
|
|||
625 | rtems_event_set event_out; |
|
|||
626 |
|
||||
627 | BOOT_PRINTF("in DUMB *** \n") |
|
|||
628 |
|
||||
629 | while(1){ |
|
|||
630 | rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 | RTEMS_EVENT_4 | RTEMS_EVENT_5, |
|
|||
631 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT |
|
|||
632 | intEventOut = (unsigned int) event_out; |
|
|||
633 | for ( i=0; i<32; i++) |
|
|||
634 | { |
|
|||
635 | if ( ((intEventOut >> i) & 0x0001) != 0) |
|
|||
636 | { |
|
|||
637 | coarse_time = time_management_regs->coarse_time; |
|
|||
638 | fine_time = time_management_regs->fine_time; |
|
|||
639 | printf("in DUMB *** time = coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); |
|
|||
640 | } |
|
|||
641 | } |
|
|||
642 | } |
|
|||
643 | } |
|
|||
644 |
|
||||
645 | //*********** |
|
131 | //*********** | |
646 | // TC ACTIONS |
|
132 | // TC ACTIONS | |
647 |
|
133 | |||
648 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
134 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
649 | { |
|
135 | { | |
650 | /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received. |
|
136 | /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received. | |
651 | * |
|
137 | * | |
652 | * @param TC points to the TeleCommand packet that is being processed |
|
138 | * @param TC points to the TeleCommand packet that is being processed | |
653 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
139 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
654 | * |
|
140 | * | |
655 | */ |
|
141 | */ | |
656 |
|
142 | |||
657 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); |
|
143 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |
658 | return LFR_DEFAULT; |
|
144 | return LFR_DEFAULT; | |
659 | } |
|
145 | } | |
660 |
|
146 | |||
661 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
147 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
662 | { |
|
148 | { | |
663 | /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received. |
|
149 | /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received. | |
664 | * |
|
150 | * | |
665 | * @param TC points to the TeleCommand packet that is being processed |
|
151 | * @param TC points to the TeleCommand packet that is being processed | |
666 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
152 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
667 | * |
|
153 | * | |
668 | */ |
|
154 | */ | |
669 |
|
155 | |||
670 | rtems_status_code status; |
|
156 | rtems_status_code status; | |
671 | unsigned char requestedMode; |
|
157 | unsigned char requestedMode; | |
672 |
|
158 | |||
673 | requestedMode = TC->dataAndCRC[1]; |
|
159 | requestedMode = TC->dataAndCRC[1]; | |
674 |
|
160 | |||
675 | if ( (requestedMode != LFR_MODE_STANDBY) |
|
161 | if ( (requestedMode != LFR_MODE_STANDBY) | |
676 | && (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST) |
|
162 | && (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST) | |
677 | && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) ) |
|
163 | && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) ) | |
678 | { |
|
164 | { | |
679 | status = RTEMS_UNSATISFIED; |
|
165 | status = RTEMS_UNSATISFIED; | |
680 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode ); |
|
166 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode ); | |
681 | } |
|
167 | } | |
682 | else |
|
168 | else | |
683 | { |
|
169 | { | |
684 | printf("try to enter mode %d\n", requestedMode); |
|
170 | printf("try to enter mode %d\n", requestedMode); | |
685 |
|
171 | |||
686 | #ifdef PRINT_TASK_STATISTICS |
|
172 | #ifdef PRINT_TASK_STATISTICS | |
687 | if (requestedMode != LFR_MODE_STANDBY) |
|
173 | if (requestedMode != LFR_MODE_STANDBY) | |
688 | { |
|
174 | { | |
689 | rtems_cpu_usage_reset(); |
|
175 | rtems_cpu_usage_reset(); | |
690 | maxCount = 0; |
|
176 | maxCount = 0; | |
691 | } |
|
177 | } | |
692 | #endif |
|
178 | #endif | |
693 |
|
179 | |||
694 | status = transition_validation(requestedMode); |
|
180 | status = transition_validation(requestedMode); | |
695 |
|
181 | |||
696 | if ( status == LFR_SUCCESSFUL ) { |
|
182 | if ( status == LFR_SUCCESSFUL ) { | |
697 | if ( lfrCurrentMode != LFR_MODE_STANDBY) |
|
183 | if ( lfrCurrentMode != LFR_MODE_STANDBY) | |
698 | { |
|
184 | { | |
699 | status = stop_current_mode(); |
|
185 | status = stop_current_mode(); | |
700 | } |
|
186 | } | |
701 | if (status != RTEMS_SUCCESSFUL) |
|
187 | if (status != RTEMS_SUCCESSFUL) | |
702 | { |
|
188 | { | |
703 | PRINTF("ERR *** in action_enter *** stop_current_mode\n") |
|
189 | PRINTF("ERR *** in action_enter *** stop_current_mode\n") | |
704 | } |
|
190 | } | |
705 | status = enter_mode(requestedMode, TC); |
|
191 | status = enter_mode(requestedMode, TC); | |
706 | } |
|
192 | } | |
707 | else |
|
193 | else | |
708 | { |
|
194 | { | |
709 | PRINTF("ERR *** in action_enter *** transition rejected\n") |
|
195 | PRINTF("ERR *** in action_enter *** transition rejected\n") | |
710 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
196 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
711 | } |
|
197 | } | |
712 | } |
|
198 | } | |
713 |
|
199 | |||
714 | return status; |
|
200 | return status; | |
715 | } |
|
201 | } | |
716 |
|
202 | |||
717 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
203 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
718 | { |
|
204 | { | |
719 | /** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received. |
|
205 | /** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received. | |
720 | * |
|
206 | * | |
721 | * @param TC points to the TeleCommand packet that is being processed |
|
207 | * @param TC points to the TeleCommand packet that is being processed | |
722 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
208 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
723 | * |
|
209 | * | |
724 | */ |
|
210 | */ | |
725 |
|
211 | |||
726 | unsigned int val; |
|
212 | unsigned int val; | |
727 | int result; |
|
213 | int result; | |
728 | unsigned char lfrMode; |
|
214 | unsigned char lfrMode; | |
729 |
|
215 | |||
730 | result = LFR_DEFAULT; |
|
216 | result = LFR_DEFAULT; | |
731 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
217 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
732 |
|
218 | |||
733 | if ( (lfrMode == LFR_MODE_STANDBY) ) { |
|
219 | if ( (lfrMode == LFR_MODE_STANDBY) ) { | |
734 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); |
|
220 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |
735 | result = LFR_DEFAULT; |
|
221 | result = LFR_DEFAULT; | |
736 | } |
|
222 | } | |
737 | else { |
|
223 | else { | |
738 | val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256 |
|
224 | val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256 | |
739 | + housekeeping_packet.hk_lfr_update_info_tc_cnt[1]; |
|
225 | + housekeeping_packet.hk_lfr_update_info_tc_cnt[1]; | |
740 | val++; |
|
226 | val++; | |
741 | housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8); |
|
227 | housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8); | |
742 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); |
|
228 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); | |
743 | result = LFR_SUCCESSFUL; |
|
229 | result = LFR_SUCCESSFUL; | |
744 | } |
|
230 | } | |
745 |
|
231 | |||
746 | return result; |
|
232 | return result; | |
747 | } |
|
233 | } | |
748 |
|
234 | |||
749 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
235 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
750 | { |
|
236 | { | |
751 | /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received. |
|
237 | /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received. | |
752 | * |
|
238 | * | |
753 | * @param TC points to the TeleCommand packet that is being processed |
|
239 | * @param TC points to the TeleCommand packet that is being processed | |
754 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
240 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
755 | * |
|
241 | * | |
756 | */ |
|
242 | */ | |
757 |
|
243 | |||
758 | int result; |
|
244 | int result; | |
759 | unsigned char lfrMode; |
|
245 | unsigned char lfrMode; | |
760 |
|
246 | |||
761 | result = LFR_DEFAULT; |
|
247 | result = LFR_DEFAULT; | |
762 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
248 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
763 |
|
249 | |||
764 | if ( (lfrMode == LFR_MODE_STANDBY) | (lfrMode == LFR_MODE_BURST) | (lfrMode == LFR_MODE_SBM2) ) { |
|
250 | if ( (lfrMode == LFR_MODE_STANDBY) | (lfrMode == LFR_MODE_BURST) | (lfrMode == LFR_MODE_SBM2) ) { | |
765 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
251 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
766 | result = LFR_DEFAULT; |
|
252 | result = LFR_DEFAULT; | |
767 | } |
|
253 | } | |
768 | else { |
|
254 | else { | |
769 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); |
|
255 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |
770 | result = LFR_DEFAULT; |
|
256 | result = LFR_DEFAULT; | |
771 | } |
|
257 | } | |
772 | return result; |
|
258 | return result; | |
773 | } |
|
259 | } | |
774 |
|
260 | |||
775 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
261 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
776 | { |
|
262 | { | |
777 | /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received. |
|
263 | /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received. | |
778 | * |
|
264 | * | |
779 | * @param TC points to the TeleCommand packet that is being processed |
|
265 | * @param TC points to the TeleCommand packet that is being processed | |
780 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
266 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
781 | * |
|
267 | * | |
782 | */ |
|
268 | */ | |
783 |
|
269 | |||
784 | int result; |
|
270 | int result; | |
785 | unsigned char lfrMode; |
|
271 | unsigned char lfrMode; | |
786 |
|
272 | |||
787 | result = LFR_DEFAULT; |
|
273 | result = LFR_DEFAULT; | |
788 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
274 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
789 |
|
275 | |||
790 | if ( (lfrMode == LFR_MODE_STANDBY) | (lfrMode == LFR_MODE_BURST) | (lfrMode == LFR_MODE_SBM2) ) { |
|
276 | if ( (lfrMode == LFR_MODE_STANDBY) | (lfrMode == LFR_MODE_BURST) | (lfrMode == LFR_MODE_SBM2) ) { | |
791 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
277 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
792 | result = LFR_DEFAULT; |
|
278 | result = LFR_DEFAULT; | |
793 | } |
|
279 | } | |
794 | else { |
|
280 | else { | |
795 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); |
|
281 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |
796 | result = LFR_DEFAULT; |
|
282 | result = LFR_DEFAULT; | |
797 | } |
|
283 | } | |
798 | return result; |
|
284 | return result; | |
799 | } |
|
285 | } | |
800 |
|
286 | |||
801 | int action_update_time(ccsdsTelecommandPacket_t *TC) |
|
287 | int action_update_time(ccsdsTelecommandPacket_t *TC) | |
802 | { |
|
288 | { | |
803 | /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received. |
|
289 | /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received. | |
804 | * |
|
290 | * | |
805 | * @param TC points to the TeleCommand packet that is being processed |
|
291 | * @param TC points to the TeleCommand packet that is being processed | |
806 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
292 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
807 | * |
|
293 | * | |
808 | */ |
|
294 | */ | |
809 |
|
295 | |||
810 | unsigned int val; |
|
296 | unsigned int val; | |
811 |
|
297 | |||
812 | time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24) |
|
298 | time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24) | |
813 | + (TC->dataAndCRC[1] << 16) |
|
299 | + (TC->dataAndCRC[1] << 16) | |
814 | + (TC->dataAndCRC[2] << 8) |
|
300 | + (TC->dataAndCRC[2] << 8) | |
815 | + TC->dataAndCRC[3]; |
|
301 | + TC->dataAndCRC[3]; | |
816 | val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256 |
|
302 | val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256 | |
817 | + housekeeping_packet.hk_lfr_update_time_tc_cnt[1]; |
|
303 | + housekeeping_packet.hk_lfr_update_time_tc_cnt[1]; | |
818 | val++; |
|
304 | val++; | |
819 | housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8); |
|
305 | housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8); | |
820 | housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val); |
|
306 | housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val); | |
821 | time_management_regs->ctrl = time_management_regs->ctrl | 1; |
|
307 | time_management_regs->ctrl = time_management_regs->ctrl | 1; | |
822 |
|
308 | |||
823 | return LFR_SUCCESSFUL; |
|
309 | return LFR_SUCCESSFUL; | |
824 | } |
|
310 | } | |
825 |
|
311 | |||
826 | //******************* |
|
312 | //******************* | |
827 | // ENTERING THE MODES |
|
313 | // ENTERING THE MODES | |
828 |
|
314 | |||
829 | int transition_validation(unsigned char requestedMode) |
|
315 | int transition_validation(unsigned char requestedMode) | |
830 | { |
|
316 | { | |
831 | int status; |
|
317 | int status; | |
832 |
|
318 | |||
833 | switch (requestedMode) |
|
319 | switch (requestedMode) | |
834 | { |
|
320 | { | |
835 | case LFR_MODE_STANDBY: |
|
321 | case LFR_MODE_STANDBY: | |
836 | if ( lfrCurrentMode == LFR_MODE_STANDBY ) { |
|
322 | if ( lfrCurrentMode == LFR_MODE_STANDBY ) { | |
837 | status = LFR_DEFAULT; |
|
323 | status = LFR_DEFAULT; | |
838 | } |
|
324 | } | |
839 | else |
|
325 | else | |
840 | { |
|
326 | { | |
841 | status = LFR_SUCCESSFUL; |
|
327 | status = LFR_SUCCESSFUL; | |
842 | } |
|
328 | } | |
843 | break; |
|
329 | break; | |
844 | case LFR_MODE_NORMAL: |
|
330 | case LFR_MODE_NORMAL: | |
845 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { |
|
331 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { | |
846 | status = LFR_DEFAULT; |
|
332 | status = LFR_DEFAULT; | |
847 | } |
|
333 | } | |
848 | else { |
|
334 | else { | |
849 | status = LFR_SUCCESSFUL; |
|
335 | status = LFR_SUCCESSFUL; | |
850 | } |
|
336 | } | |
851 | break; |
|
337 | break; | |
852 | case LFR_MODE_BURST: |
|
338 | case LFR_MODE_BURST: | |
853 | if ( lfrCurrentMode == LFR_MODE_BURST ) { |
|
339 | if ( lfrCurrentMode == LFR_MODE_BURST ) { | |
854 | status = LFR_DEFAULT; |
|
340 | status = LFR_DEFAULT; | |
855 | } |
|
341 | } | |
856 | else { |
|
342 | else { | |
857 | status = LFR_SUCCESSFUL; |
|
343 | status = LFR_SUCCESSFUL; | |
858 | } |
|
344 | } | |
859 | break; |
|
345 | break; | |
860 | case LFR_MODE_SBM1: |
|
346 | case LFR_MODE_SBM1: | |
861 | if ( lfrCurrentMode == LFR_MODE_SBM1 ) { |
|
347 | if ( lfrCurrentMode == LFR_MODE_SBM1 ) { | |
862 | status = LFR_DEFAULT; |
|
348 | status = LFR_DEFAULT; | |
863 | } |
|
349 | } | |
864 | else { |
|
350 | else { | |
865 | status = LFR_SUCCESSFUL; |
|
351 | status = LFR_SUCCESSFUL; | |
866 | } |
|
352 | } | |
867 | break; |
|
353 | break; | |
868 | case LFR_MODE_SBM2: |
|
354 | case LFR_MODE_SBM2: | |
869 | if ( lfrCurrentMode == LFR_MODE_SBM2 ) { |
|
355 | if ( lfrCurrentMode == LFR_MODE_SBM2 ) { | |
870 | status = LFR_DEFAULT; |
|
356 | status = LFR_DEFAULT; | |
871 | } |
|
357 | } | |
872 | else { |
|
358 | else { | |
873 | status = LFR_SUCCESSFUL; |
|
359 | status = LFR_SUCCESSFUL; | |
874 | } |
|
360 | } | |
875 | break; |
|
361 | break; | |
876 | default: |
|
362 | default: | |
877 | status = LFR_DEFAULT; |
|
363 | status = LFR_DEFAULT; | |
878 | break; |
|
364 | break; | |
879 | } |
|
365 | } | |
880 |
|
366 | |||
881 | return status; |
|
367 | return status; | |
882 | } |
|
368 | } | |
883 |
|
369 | |||
884 | int stop_current_mode() |
|
370 | int stop_current_mode() | |
885 | { |
|
371 | { | |
886 | /** This function stops the current mode by masking interrupt lines and suspending science tasks. |
|
372 | /** This function stops the current mode by masking interrupt lines and suspending science tasks. | |
887 | * |
|
373 | * | |
888 | * @return RTEMS directive status codes: |
|
374 | * @return RTEMS directive status codes: | |
889 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
375 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
890 | * - RTEMS_INVALID_ID - task id invalid |
|
376 | * - RTEMS_INVALID_ID - task id invalid | |
891 | * - RTEMS_ALREADY_SUSPENDED - task already suspended |
|
377 | * - RTEMS_ALREADY_SUSPENDED - task already suspended | |
892 | * |
|
378 | * | |
893 | */ |
|
379 | */ | |
894 |
|
380 | |||
895 | rtems_status_code status; |
|
381 | rtems_status_code status; | |
896 |
|
382 | |||
897 | status = RTEMS_SUCCESSFUL; |
|
383 | status = RTEMS_SUCCESSFUL; | |
898 |
|
384 | |||
899 | // mask all IRQ lines related to signal processing |
|
385 | // mask all IRQ lines related to signal processing | |
900 | LEON_Mask_interrupt( IRQ_SM ); // mask spectral matrices interrupt (coming from the timer VHDL IP) |
|
386 | LEON_Mask_interrupt( IRQ_SM ); // mask spectral matrices interrupt (coming from the timer VHDL IP) | |
901 | LEON_Clear_interrupt( IRQ_SM ); // clear spectral matrices interrupt (coming from the timer VHDL IP) |
|
387 | LEON_Clear_interrupt( IRQ_SM ); // clear spectral matrices interrupt (coming from the timer VHDL IP) | |
902 |
|
388 | |||
903 | #ifdef GSA |
|
389 | #ifdef GSA | |
904 | LEON_Mask_interrupt( IRQ_WF ); // mask waveform interrupt (coming from the timer VHDL IP) |
|
390 | LEON_Mask_interrupt( IRQ_WF ); // mask waveform interrupt (coming from the timer VHDL IP) | |
905 | LEON_Clear_interrupt( IRQ_WF ); // clear waveform interrupt (coming from the timer VHDL IP) |
|
391 | LEON_Clear_interrupt( IRQ_WF ); // clear waveform interrupt (coming from the timer VHDL IP) | |
906 | timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); |
|
392 | timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); | |
907 | #else |
|
393 | #else | |
908 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt |
|
394 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt | |
909 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt |
|
395 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt | |
910 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt |
|
396 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt | |
911 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt |
|
397 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt | |
912 | LEON_Mask_interrupt( IRQ_SM ); // for SM simulation |
|
398 | LEON_Mask_interrupt( IRQ_SM ); // for SM simulation | |
913 | LEON_Clear_interrupt( IRQ_SM ); // for SM simulation |
|
399 | LEON_Clear_interrupt( IRQ_SM ); // for SM simulation | |
914 | #endif |
|
400 | #endif | |
915 | //********************** |
|
401 | //********************** | |
916 | // suspend several tasks |
|
402 | // suspend several tasks | |
917 | if (lfrCurrentMode != LFR_MODE_STANDBY) { |
|
403 | if (lfrCurrentMode != LFR_MODE_STANDBY) { | |
918 | status = suspend_science_tasks(); |
|
404 | status = suspend_science_tasks(); | |
919 | } |
|
405 | } | |
920 |
|
406 | |||
921 | if (status != RTEMS_SUCCESSFUL) |
|
407 | if (status != RTEMS_SUCCESSFUL) | |
922 | { |
|
408 | { | |
923 | PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status) |
|
409 | PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status) | |
924 | } |
|
410 | } | |
925 |
|
411 | |||
926 | //************************* |
|
412 | //************************* | |
927 | // initialize the registers |
|
413 | // initialize the registers | |
928 | #ifdef GSA |
|
414 | #ifdef GSA | |
929 | #else |
|
415 | #else | |
930 | reset_wfp_burst_enable(); // reset burst and enable bits |
|
416 | reset_wfp_burst_enable(); // reset burst and enable bits | |
931 | reset_wfp_status(); // reset all the status bits |
|
417 | reset_wfp_status(); // reset all the status bits | |
932 | #endif |
|
418 | #endif | |
933 |
|
419 | |||
934 | return status; |
|
420 | return status; | |
935 | } |
|
421 | } | |
936 |
|
422 | |||
937 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC ) |
|
423 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC ) | |
938 | { |
|
424 | { | |
939 | rtems_status_code status; |
|
425 | rtems_status_code status; | |
940 |
|
426 | |||
941 | status = RTEMS_UNSATISFIED; |
|
427 | status = RTEMS_UNSATISFIED; | |
942 |
|
428 | |||
943 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d); |
|
429 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d); | |
944 | lfrCurrentMode = mode; |
|
430 | lfrCurrentMode = mode; | |
945 |
|
431 | |||
946 | switch(mode){ |
|
432 | switch(mode){ | |
947 | case LFR_MODE_STANDBY: |
|
433 | case LFR_MODE_STANDBY: | |
948 | status = enter_standby_mode( TC ); |
|
434 | status = enter_standby_mode( TC ); | |
949 | break; |
|
435 | break; | |
950 | case LFR_MODE_NORMAL: |
|
436 | case LFR_MODE_NORMAL: | |
951 | status = enter_normal_mode( TC ); |
|
437 | status = enter_normal_mode( TC ); | |
952 | break; |
|
438 | break; | |
953 | case LFR_MODE_BURST: |
|
439 | case LFR_MODE_BURST: | |
954 | status = enter_burst_mode( TC ); |
|
440 | status = enter_burst_mode( TC ); | |
955 | break; |
|
441 | break; | |
956 | case LFR_MODE_SBM1: |
|
442 | case LFR_MODE_SBM1: | |
957 | status = enter_sbm1_mode( TC ); |
|
443 | status = enter_sbm1_mode( TC ); | |
958 | break; |
|
444 | break; | |
959 | case LFR_MODE_SBM2: |
|
445 | case LFR_MODE_SBM2: | |
960 | status = enter_sbm2_mode( TC ); |
|
446 | status = enter_sbm2_mode( TC ); | |
961 | break; |
|
447 | break; | |
962 | default: |
|
448 | default: | |
963 | status = RTEMS_UNSATISFIED; |
|
449 | status = RTEMS_UNSATISFIED; | |
964 | } |
|
450 | } | |
965 |
|
451 | |||
966 | if (status != RTEMS_SUCCESSFUL) |
|
452 | if (status != RTEMS_SUCCESSFUL) | |
967 | { |
|
453 | { | |
968 | PRINTF("in enter_mode *** ERR\n") |
|
454 | PRINTF("in enter_mode *** ERR\n") | |
969 | status = RTEMS_UNSATISFIED; |
|
455 | status = RTEMS_UNSATISFIED; | |
970 | } |
|
456 | } | |
971 |
|
457 | |||
972 | return status; |
|
458 | return status; | |
973 | } |
|
459 | } | |
974 |
|
460 | |||
975 | int enter_standby_mode() |
|
461 | int enter_standby_mode() | |
976 | { |
|
462 | { | |
977 | reset_waveform_picker_regs(); |
|
463 | reset_waveform_picker_regs(); | |
978 |
|
464 | |||
979 | PRINTF1("maxCount = %d\n", maxCount) |
|
465 | PRINTF1("maxCount = %d\n", maxCount) | |
980 |
|
466 | |||
981 | #ifdef PRINT_TASK_STATISTICS |
|
467 | #ifdef PRINT_TASK_STATISTICS | |
982 | rtems_cpu_usage_report(); |
|
468 | rtems_cpu_usage_report(); | |
983 | #endif |
|
469 | #endif | |
984 |
|
470 | |||
985 | #ifdef PRINT_STACK_REPORT |
|
471 | #ifdef PRINT_STACK_REPORT | |
986 | rtems_stack_checker_report_usage(); |
|
472 | rtems_stack_checker_report_usage(); | |
987 | #endif |
|
473 | #endif | |
988 |
|
474 | |||
989 | return LFR_SUCCESSFUL; |
|
475 | return LFR_SUCCESSFUL; | |
990 | } |
|
476 | } | |
991 |
|
477 | |||
992 | int enter_normal_mode() |
|
478 | int enter_normal_mode() | |
993 | { |
|
479 | { | |
994 | rtems_status_code status; |
|
480 | rtems_status_code status; | |
995 |
|
481 | |||
996 | status = restart_science_tasks(); |
|
482 | status = restart_science_tasks(); | |
997 |
|
483 | |||
998 | #ifdef GSA |
|
484 | #ifdef GSA | |
999 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); |
|
485 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); | |
1000 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
486 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
1001 | LEON_Clear_interrupt( IRQ_WF ); |
|
487 | LEON_Clear_interrupt( IRQ_WF ); | |
1002 | LEON_Unmask_interrupt( IRQ_WF ); |
|
488 | LEON_Unmask_interrupt( IRQ_WF ); | |
1003 | // |
|
489 | // | |
1004 | set_local_nb_interrupt_f0_MAX(); |
|
490 | set_local_nb_interrupt_f0_MAX(); | |
1005 | LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board |
|
491 | LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board | |
1006 | LEON_Unmask_interrupt( IRQ_SM ); |
|
492 | LEON_Unmask_interrupt( IRQ_SM ); | |
1007 | #else |
|
493 | #else | |
1008 | //**************** |
|
494 | //**************** | |
1009 | // waveform picker |
|
495 | // waveform picker | |
1010 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
496 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
1011 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
497 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
1012 | reset_waveform_picker_regs(); |
|
498 | reset_waveform_picker_regs(); | |
1013 | set_wfp_burst_enable_register(LFR_MODE_NORMAL); |
|
499 | set_wfp_burst_enable_register(LFR_MODE_NORMAL); | |
1014 | //**************** |
|
500 | //**************** | |
1015 | // spectral matrix |
|
501 | // spectral matrix | |
1016 | // set_local_nb_interrupt_f0_MAX(); |
|
502 | // set_local_nb_interrupt_f0_MAX(); | |
1017 | // LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board |
|
503 | // LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board | |
1018 | // LEON_Unmask_interrupt( IRQ_SPECTRAL_MATRIX ); |
|
504 | // LEON_Unmask_interrupt( IRQ_SPECTRAL_MATRIX ); | |
1019 | // spectral_matrix_regs->config = 0x01; |
|
505 | // spectral_matrix_regs->config = 0x01; | |
1020 | // spectral_matrix_regs->status = 0x00; |
|
506 | // spectral_matrix_regs->status = 0x00; | |
1021 | #endif |
|
507 | #endif | |
1022 |
|
508 | |||
1023 | return status; |
|
509 | return status; | |
1024 | } |
|
510 | } | |
1025 |
|
511 | |||
1026 | int enter_burst_mode() |
|
512 | int enter_burst_mode() | |
1027 | { |
|
513 | { | |
1028 | rtems_status_code status; |
|
514 | rtems_status_code status; | |
1029 |
|
515 | |||
1030 | status = restart_science_tasks(); |
|
516 | status = restart_science_tasks(); | |
1031 |
|
517 | |||
1032 | #ifdef GSA |
|
518 | #ifdef GSA | |
1033 | LEON_Unmask_interrupt( IRQ_SM ); |
|
519 | LEON_Unmask_interrupt( IRQ_SM ); | |
1034 | #else |
|
520 | #else | |
1035 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
521 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
1036 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
522 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
1037 | reset_waveform_picker_regs(); |
|
523 | reset_waveform_picker_regs(); | |
1038 | set_wfp_burst_enable_register(LFR_MODE_BURST); |
|
524 | set_wfp_burst_enable_register(LFR_MODE_BURST); | |
1039 | #endif |
|
525 | #endif | |
1040 |
|
526 | |||
1041 | return status; |
|
527 | return status; | |
1042 | } |
|
528 | } | |
1043 |
|
529 | |||
1044 | int enter_sbm1_mode() |
|
530 | int enter_sbm1_mode() | |
1045 | { |
|
531 | { | |
1046 | rtems_status_code status; |
|
532 | rtems_status_code status; | |
1047 |
|
533 | |||
1048 | status = restart_science_tasks(); |
|
534 | status = restart_science_tasks(); | |
1049 |
|
535 | |||
1050 | set_local_sbm1_nb_cwf_max(); |
|
536 | set_local_sbm1_nb_cwf_max(); | |
1051 |
|
537 | |||
1052 | reset_local_sbm1_nb_cwf_sent(); |
|
538 | reset_local_sbm1_nb_cwf_sent(); | |
1053 |
|
539 | |||
1054 | #ifdef GSA |
|
540 | #ifdef GSA | |
1055 | LEON_Unmask_interrupt( IRQ_SM ); |
|
541 | LEON_Unmask_interrupt( IRQ_SM ); | |
1056 | #else |
|
542 | #else | |
1057 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
543 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
1058 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
544 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
1059 | reset_waveform_picker_regs(); |
|
545 | reset_waveform_picker_regs(); | |
1060 | set_wfp_burst_enable_register(LFR_MODE_SBM1); |
|
546 | set_wfp_burst_enable_register(LFR_MODE_SBM1); | |
1061 | // SM simulation |
|
547 | // SM simulation | |
1062 | // timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
548 | // timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
1063 | // LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board |
|
549 | // LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board | |
1064 | // LEON_Unmask_interrupt( IRQ_SM ); |
|
550 | // LEON_Unmask_interrupt( IRQ_SM ); | |
1065 | #endif |
|
551 | #endif | |
1066 |
|
552 | |||
1067 | return status; |
|
553 | return status; | |
1068 | } |
|
554 | } | |
1069 |
|
555 | |||
1070 | int enter_sbm2_mode() |
|
556 | int enter_sbm2_mode() | |
1071 | { |
|
557 | { | |
1072 | rtems_status_code status; |
|
558 | rtems_status_code status; | |
1073 |
|
559 | |||
1074 | status = restart_science_tasks(); |
|
560 | status = restart_science_tasks(); | |
1075 |
|
561 | |||
1076 | set_local_sbm2_nb_cwf_max(); |
|
562 | set_local_sbm2_nb_cwf_max(); | |
1077 |
|
563 | |||
1078 | reset_local_sbm2_nb_cwf_sent(); |
|
564 | reset_local_sbm2_nb_cwf_sent(); | |
1079 |
|
565 | |||
1080 | #ifdef GSA |
|
566 | #ifdef GSA | |
1081 | LEON_Unmask_interrupt( IRQ_SM ); |
|
567 | LEON_Unmask_interrupt( IRQ_SM ); | |
1082 | #else |
|
568 | #else | |
1083 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
569 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
1084 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
570 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
1085 | reset_waveform_picker_regs(); |
|
571 | reset_waveform_picker_regs(); | |
1086 | set_wfp_burst_enable_register(LFR_MODE_SBM2); |
|
572 | set_wfp_burst_enable_register(LFR_MODE_SBM2); | |
1087 | #endif |
|
573 | #endif | |
1088 |
|
574 | |||
1089 | return status; |
|
575 | return status; | |
1090 | } |
|
576 | } | |
1091 |
|
577 | |||
1092 | int restart_science_tasks() |
|
578 | int restart_science_tasks() | |
1093 | { |
|
579 | { | |
1094 | rtems_status_code status[6]; |
|
580 | rtems_status_code status[6]; | |
1095 | rtems_status_code ret; |
|
581 | rtems_status_code ret; | |
1096 |
|
582 | |||
1097 | ret = RTEMS_SUCCESSFUL; |
|
583 | ret = RTEMS_SUCCESSFUL; | |
1098 |
|
584 | |||
1099 | status[0] = rtems_task_restart( Task_id[TASKID_AVF0], 1 ); |
|
585 | status[0] = rtems_task_restart( Task_id[TASKID_AVF0], 1 ); | |
1100 | if (status[0] != RTEMS_SUCCESSFUL) |
|
586 | if (status[0] != RTEMS_SUCCESSFUL) | |
1101 | { |
|
587 | { | |
1102 | PRINTF1("in restart_science_task *** 0 ERR %d\n", status[0]) |
|
588 | PRINTF1("in restart_science_task *** 0 ERR %d\n", status[0]) | |
1103 | } |
|
589 | } | |
1104 |
|
590 | |||
1105 | status[1] = rtems_task_restart( Task_id[TASKID_BPF0],1 ); |
|
591 | status[1] = rtems_task_restart( Task_id[TASKID_BPF0],1 ); | |
1106 | if (status[1] != RTEMS_SUCCESSFUL) |
|
592 | if (status[1] != RTEMS_SUCCESSFUL) | |
1107 | { |
|
593 | { | |
1108 | PRINTF1("in restart_science_task *** 1 ERR %d\n", status[1]) |
|
594 | PRINTF1("in restart_science_task *** 1 ERR %d\n", status[1]) | |
1109 | } |
|
595 | } | |
1110 |
|
596 | |||
1111 | status[2] = rtems_task_restart( Task_id[TASKID_WFRM],1 ); |
|
597 | status[2] = rtems_task_restart( Task_id[TASKID_WFRM],1 ); | |
1112 | if (status[2] != RTEMS_SUCCESSFUL) |
|
598 | if (status[2] != RTEMS_SUCCESSFUL) | |
1113 | { |
|
599 | { | |
1114 | PRINTF1("in restart_science_task *** 2 ERR %d\n", status[2]) |
|
600 | PRINTF1("in restart_science_task *** 2 ERR %d\n", status[2]) | |
1115 | } |
|
601 | } | |
1116 |
|
602 | |||
1117 | status[3] = rtems_task_restart( Task_id[TASKID_CWF3],1 ); |
|
603 | status[3] = rtems_task_restart( Task_id[TASKID_CWF3],1 ); | |
1118 | if (status[3] != RTEMS_SUCCESSFUL) |
|
604 | if (status[3] != RTEMS_SUCCESSFUL) | |
1119 | { |
|
605 | { | |
1120 | PRINTF1("in restart_science_task *** 3 ERR %d\n", status[3]) |
|
606 | PRINTF1("in restart_science_task *** 3 ERR %d\n", status[3]) | |
1121 | } |
|
607 | } | |
1122 |
|
608 | |||
1123 | status[4] = rtems_task_restart( Task_id[TASKID_CWF2],1 ); |
|
609 | status[4] = rtems_task_restart( Task_id[TASKID_CWF2],1 ); | |
1124 | if (status[4] != RTEMS_SUCCESSFUL) |
|
610 | if (status[4] != RTEMS_SUCCESSFUL) | |
1125 | { |
|
611 | { | |
1126 | PRINTF1("in restart_science_task *** 4 ERR %d\n", status[4]) |
|
612 | PRINTF1("in restart_science_task *** 4 ERR %d\n", status[4]) | |
1127 | } |
|
613 | } | |
1128 |
|
614 | |||
1129 | status[5] = rtems_task_restart( Task_id[TASKID_CWF1],1 ); |
|
615 | status[5] = rtems_task_restart( Task_id[TASKID_CWF1],1 ); | |
1130 | if (status[5] != RTEMS_SUCCESSFUL) |
|
616 | if (status[5] != RTEMS_SUCCESSFUL) | |
1131 | { |
|
617 | { | |
1132 | PRINTF1("in restart_science_task *** 5 ERR %d\n", status[5]) |
|
618 | PRINTF1("in restart_science_task *** 5 ERR %d\n", status[5]) | |
1133 | } |
|
619 | } | |
1134 |
|
620 | |||
1135 | if ( (status[0] != RTEMS_SUCCESSFUL) || (status[1] != RTEMS_SUCCESSFUL) || (status[2] != RTEMS_SUCCESSFUL) || |
|
621 | if ( (status[0] != RTEMS_SUCCESSFUL) || (status[1] != RTEMS_SUCCESSFUL) || (status[2] != RTEMS_SUCCESSFUL) || | |
1136 | (status[3] != RTEMS_SUCCESSFUL) || (status[4] != RTEMS_SUCCESSFUL) || (status[5] != RTEMS_SUCCESSFUL) ) |
|
622 | (status[3] != RTEMS_SUCCESSFUL) || (status[4] != RTEMS_SUCCESSFUL) || (status[5] != RTEMS_SUCCESSFUL) ) | |
1137 | { |
|
623 | { | |
1138 | ret = RTEMS_UNSATISFIED; |
|
624 | ret = RTEMS_UNSATISFIED; | |
1139 | } |
|
625 | } | |
1140 |
|
626 | |||
1141 | return ret; |
|
627 | return ret; | |
1142 | } |
|
628 | } | |
1143 |
|
629 | |||
1144 | int suspend_science_tasks() |
|
630 | int suspend_science_tasks() | |
1145 | { |
|
631 | { | |
1146 | /** This function suspends the science tasks. |
|
632 | /** This function suspends the science tasks. | |
1147 | * |
|
633 | * | |
1148 | * @return RTEMS directive status codes: |
|
634 | * @return RTEMS directive status codes: | |
1149 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
635 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
1150 | * - RTEMS_INVALID_ID - task id invalid |
|
636 | * - RTEMS_INVALID_ID - task id invalid | |
1151 | * - RTEMS_ALREADY_SUSPENDED - task already suspended |
|
637 | * - RTEMS_ALREADY_SUSPENDED - task already suspended | |
1152 | * |
|
638 | * | |
1153 | */ |
|
639 | */ | |
1154 |
|
640 | |||
1155 | rtems_status_code status; |
|
641 | rtems_status_code status; | |
1156 |
|
642 | |||
1157 | status = rtems_task_suspend( Task_id[TASKID_AVF0] ); |
|
643 | status = rtems_task_suspend( Task_id[TASKID_AVF0] ); | |
1158 | if (status != RTEMS_SUCCESSFUL) |
|
644 | if (status != RTEMS_SUCCESSFUL) | |
1159 | { |
|
645 | { | |
1160 | PRINTF1("in suspend_science_task *** AVF0 ERR %d\n", status) |
|
646 | PRINTF1("in suspend_science_task *** AVF0 ERR %d\n", status) | |
1161 | } |
|
647 | } | |
1162 | if (status == RTEMS_SUCCESSFUL) // suspend BPF0 |
|
648 | if (status == RTEMS_SUCCESSFUL) // suspend BPF0 | |
1163 | { |
|
649 | { | |
1164 | status = rtems_task_suspend( Task_id[TASKID_BPF0] ); |
|
650 | status = rtems_task_suspend( Task_id[TASKID_BPF0] ); | |
1165 | if (status != RTEMS_SUCCESSFUL) |
|
651 | if (status != RTEMS_SUCCESSFUL) | |
1166 | { |
|
652 | { | |
1167 | PRINTF1("in suspend_science_task *** BPF0 ERR %d\n", status) |
|
653 | PRINTF1("in suspend_science_task *** BPF0 ERR %d\n", status) | |
1168 | } |
|
654 | } | |
1169 | } |
|
655 | } | |
1170 | if (status == RTEMS_SUCCESSFUL) // suspend WFRM |
|
656 | if (status == RTEMS_SUCCESSFUL) // suspend WFRM | |
1171 | { |
|
657 | { | |
1172 | status = rtems_task_suspend( Task_id[TASKID_WFRM] ); |
|
658 | status = rtems_task_suspend( Task_id[TASKID_WFRM] ); | |
1173 | if (status != RTEMS_SUCCESSFUL) |
|
659 | if (status != RTEMS_SUCCESSFUL) | |
1174 | { |
|
660 | { | |
1175 | PRINTF1("in suspend_science_task *** WFRM ERR %d\n", status) |
|
661 | PRINTF1("in suspend_science_task *** WFRM ERR %d\n", status) | |
1176 | } |
|
662 | } | |
1177 | } |
|
663 | } | |
1178 |
|
664 | |||
1179 | if (status == RTEMS_SUCCESSFUL) // suspend CWF3 |
|
665 | if (status == RTEMS_SUCCESSFUL) // suspend CWF3 | |
1180 | { |
|
666 | { | |
1181 | status = rtems_task_suspend( Task_id[TASKID_CWF3] ); |
|
667 | status = rtems_task_suspend( Task_id[TASKID_CWF3] ); | |
1182 | if (status != RTEMS_SUCCESSFUL) |
|
668 | if (status != RTEMS_SUCCESSFUL) | |
1183 | { |
|
669 | { | |
1184 | PRINTF1("in suspend_science_task *** CWF3 ERR %d\n", status) |
|
670 | PRINTF1("in suspend_science_task *** CWF3 ERR %d\n", status) | |
1185 | } |
|
671 | } | |
1186 | } |
|
672 | } | |
1187 | if (status == RTEMS_SUCCESSFUL) // suspend CWF2 |
|
673 | if (status == RTEMS_SUCCESSFUL) // suspend CWF2 | |
1188 | { |
|
674 | { | |
1189 | status = rtems_task_suspend( Task_id[TASKID_CWF2] ); |
|
675 | status = rtems_task_suspend( Task_id[TASKID_CWF2] ); | |
1190 | if (status != RTEMS_SUCCESSFUL) |
|
676 | if (status != RTEMS_SUCCESSFUL) | |
1191 | { |
|
677 | { | |
1192 | PRINTF1("in suspend_science_task *** CWF2 ERR %d\n", status) |
|
678 | PRINTF1("in suspend_science_task *** CWF2 ERR %d\n", status) | |
1193 | } |
|
679 | } | |
1194 | } |
|
680 | } | |
1195 | if (status == RTEMS_SUCCESSFUL) // suspend CWF1 |
|
681 | if (status == RTEMS_SUCCESSFUL) // suspend CWF1 | |
1196 | { |
|
682 | { | |
1197 | status = rtems_task_suspend( Task_id[TASKID_CWF1] ); |
|
683 | status = rtems_task_suspend( Task_id[TASKID_CWF1] ); | |
1198 | if (status != RTEMS_SUCCESSFUL) |
|
684 | if (status != RTEMS_SUCCESSFUL) | |
1199 | { |
|
685 | { | |
1200 | PRINTF1("in suspend_science_task *** CWF1 ERR %d\n", status) |
|
686 | PRINTF1("in suspend_science_task *** CWF1 ERR %d\n", status) | |
1201 | } |
|
687 | } | |
1202 | } |
|
688 | } | |
1203 |
|
689 | |||
1204 | return status; |
|
690 | return status; | |
1205 | } |
|
691 | } | |
1206 |
|
692 | |||
1207 | //**************** |
|
693 | //**************** | |
1208 | // CLOSING ACTIONS |
|
694 | // CLOSING ACTIONS | |
1209 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC) |
|
695 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC) | |
1210 | { |
|
696 | { | |
1211 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; |
|
697 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; | |
1212 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; |
|
698 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; | |
1213 | housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00; |
|
699 | housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00; | |
1214 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; |
|
700 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; | |
1215 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; |
|
701 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; | |
1216 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; |
|
702 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; | |
1217 | housekeeping_packet.hk_lfr_last_exe_tc_time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
703 | housekeeping_packet.hk_lfr_last_exe_tc_time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
1218 | housekeeping_packet.hk_lfr_last_exe_tc_time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
704 | housekeeping_packet.hk_lfr_last_exe_tc_time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
1219 | housekeeping_packet.hk_lfr_last_exe_tc_time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
705 | housekeeping_packet.hk_lfr_last_exe_tc_time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
1220 | housekeeping_packet.hk_lfr_last_exe_tc_time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
706 | housekeeping_packet.hk_lfr_last_exe_tc_time[3] = (unsigned char) (time_management_regs->coarse_time); | |
1221 | housekeeping_packet.hk_lfr_last_exe_tc_time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
707 | housekeeping_packet.hk_lfr_last_exe_tc_time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
1222 | housekeeping_packet.hk_lfr_last_exe_tc_time[5] = (unsigned char) (time_management_regs->fine_time); |
|
708 | housekeeping_packet.hk_lfr_last_exe_tc_time[5] = (unsigned char) (time_management_regs->fine_time); | |
1223 | } |
|
709 | } | |
1224 |
|
710 | |||
1225 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC) |
|
711 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC) | |
1226 | { |
|
712 | { | |
1227 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; |
|
713 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; | |
1228 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; |
|
714 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; | |
1229 | housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00; |
|
715 | housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00; | |
1230 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; |
|
716 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; | |
1231 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; |
|
717 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; | |
1232 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; |
|
718 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; | |
1233 | housekeeping_packet.hk_lfr_last_rej_tc_time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
719 | housekeeping_packet.hk_lfr_last_rej_tc_time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
1234 | housekeeping_packet.hk_lfr_last_rej_tc_time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
720 | housekeeping_packet.hk_lfr_last_rej_tc_time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
1235 | housekeeping_packet.hk_lfr_last_rej_tc_time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
721 | housekeeping_packet.hk_lfr_last_rej_tc_time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
1236 | housekeeping_packet.hk_lfr_last_rej_tc_time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
722 | housekeeping_packet.hk_lfr_last_rej_tc_time[3] = (unsigned char) (time_management_regs->coarse_time); | |
1237 | housekeeping_packet.hk_lfr_last_rej_tc_time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
723 | housekeeping_packet.hk_lfr_last_rej_tc_time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
1238 | housekeeping_packet.hk_lfr_last_rej_tc_time[5] = (unsigned char) (time_management_regs->fine_time); |
|
724 | housekeeping_packet.hk_lfr_last_rej_tc_time[5] = (unsigned char) (time_management_regs->fine_time); | |
1239 | } |
|
725 | } | |
1240 |
|
726 | |||
1241 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id) |
|
727 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id) | |
1242 | { |
|
728 | { | |
1243 | unsigned int val = 0; |
|
729 | unsigned int val = 0; | |
1244 | if (result == LFR_SUCCESSFUL) |
|
730 | if (result == LFR_SUCCESSFUL) | |
1245 | { |
|
731 | { | |
1246 | if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) ) |
|
732 | if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) ) | |
1247 | { |
|
733 | { | |
1248 | send_tm_lfr_tc_exe_success( TC, queue_id ); |
|
734 | send_tm_lfr_tc_exe_success( TC, queue_id ); | |
1249 | } |
|
735 | } | |
1250 | update_last_TC_exe( TC ); |
|
736 | update_last_TC_exe( TC ); | |
1251 | val = housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1]; |
|
737 | val = housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1]; | |
1252 | val++; |
|
738 | val++; | |
1253 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] = (unsigned char) (val >> 8); |
|
739 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] = (unsigned char) (val >> 8); | |
1254 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1] = (unsigned char) (val); |
|
740 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1] = (unsigned char) (val); | |
1255 | } |
|
741 | } | |
1256 | else |
|
742 | else | |
1257 | { |
|
743 | { | |
1258 | update_last_TC_rej( TC ); |
|
744 | update_last_TC_rej( TC ); | |
1259 | val = housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1]; |
|
745 | val = housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1]; | |
1260 | val++; |
|
746 | val++; | |
1261 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] = (unsigned char) (val >> 8); |
|
747 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] = (unsigned char) (val >> 8); | |
1262 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1] = (unsigned char) (val); |
|
748 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1] = (unsigned char) (val); | |
1263 | } |
|
749 | } | |
1264 | } |
|
750 | } | |
1265 |
|
751 | |||
1266 | //*************************** |
|
752 | //*************************** | |
1267 | // Interrupt Service Routines |
|
753 | // Interrupt Service Routines | |
1268 | rtems_isr commutation_isr1( rtems_vector_number vector ) |
|
754 | rtems_isr commutation_isr1( rtems_vector_number vector ) | |
1269 | { |
|
755 | { | |
1270 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
756 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
1271 | printf("In commutation_isr1 *** Error sending event to DUMB\n"); |
|
757 | printf("In commutation_isr1 *** Error sending event to DUMB\n"); | |
1272 | } |
|
758 | } | |
1273 | } |
|
759 | } | |
1274 |
|
760 | |||
1275 | rtems_isr commutation_isr2( rtems_vector_number vector ) |
|
761 | rtems_isr commutation_isr2( rtems_vector_number vector ) | |
1276 | { |
|
762 | { | |
1277 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
763 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
1278 | printf("In commutation_isr2 *** Error sending event to DUMB\n"); |
|
764 | printf("In commutation_isr2 *** Error sending event to DUMB\n"); | |
1279 | } |
|
765 | } | |
1280 | } |
|
766 | } | |
1281 |
|
767 | |||
1282 |
|
768 | //**************** | ||
|
769 | // OTHER FUNCTIONS | |||
|
770 | void updateLFRCurrentMode() | |||
|
771 | { | |||
|
772 | /** This function updates the value of the global variable lfrCurrentMode. | |||
|
773 | * | |||
|
774 | * lfrCurrentMode is a parameter used by several functions to know in which mode LFR is running. | |||
|
775 | * | |||
|
776 | */ | |||
|
777 | // update the local value of lfrCurrentMode with the value contained in the housekeeping_packet structure | |||
|
778 | lfrCurrentMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |||
|
779 | } | |||
1283 |
|
780 | |||
1284 |
|
@@ -1,377 +1,380 | |||||
1 | /** Functions to load and dump parameters in the LFR registers. |
|
1 | /** Functions to load and dump parameters in the LFR registers. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * A group of functions to handle TC related to parameter loading and dumping.\n |
|
6 | * A group of functions to handle TC related to parameter loading and dumping.\n | |
7 | * TC_LFR_LOAD_COMMON_PAR\n |
|
7 | * TC_LFR_LOAD_COMMON_PAR\n | |
8 | * TC_LFR_LOAD_NORMAL_PAR\n |
|
8 | * TC_LFR_LOAD_NORMAL_PAR\n | |
9 | * TC_LFR_LOAD_BURST_PAR\n |
|
9 | * TC_LFR_LOAD_BURST_PAR\n | |
10 | * TC_LFR_LOAD_SBM1_PAR\n |
|
10 | * TC_LFR_LOAD_SBM1_PAR\n | |
11 | * TC_LFR_LOAD_SBM2_PAR\n |
|
11 | * TC_LFR_LOAD_SBM2_PAR\n | |
12 | * |
|
12 | * | |
13 | */ |
|
13 | */ | |
14 |
|
14 | |||
15 | #include "tc_load_dump_parameters.h" |
|
15 | #include "tc_load_dump_parameters.h" | |
16 |
|
16 | |||
17 | int action_load_common_par(ccsdsTelecommandPacket_t *TC) |
|
17 | int action_load_common_par(ccsdsTelecommandPacket_t *TC) | |
18 | { |
|
18 | { | |
19 | /** This function updates the LFR registers with the incoming common parameters. |
|
19 | /** This function updates the LFR registers with the incoming common parameters. | |
20 | * |
|
20 | * | |
21 | * @param TC points to the TeleCommand packet that is being processed |
|
21 | * @param TC points to the TeleCommand packet that is being processed | |
22 | * |
|
22 | * | |
23 | * |
|
23 | * | |
24 | */ |
|
24 | */ | |
|
25 | ||||
25 | parameter_dump_packet.unused0 = TC->dataAndCRC[0]; |
|
26 | parameter_dump_packet.unused0 = TC->dataAndCRC[0]; | |
26 | parameter_dump_packet.bw_sp0_sp1_r0_r1 = TC->dataAndCRC[1]; |
|
27 | parameter_dump_packet.bw_sp0_sp1_r0_r1 = TC->dataAndCRC[1]; | |
27 | set_wfp_data_shaping(parameter_dump_packet.bw_sp0_sp1_r0_r1); |
|
28 | set_wfp_data_shaping(parameter_dump_packet.bw_sp0_sp1_r0_r1); | |
28 | return LFR_SUCCESSFUL; |
|
29 | return LFR_SUCCESSFUL; | |
29 | } |
|
30 | } | |
30 |
|
31 | |||
31 | int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
32 | int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
32 | { |
|
33 | { | |
33 | /** This function updates the LFR registers with the incoming normal parameters. |
|
34 | /** This function updates the LFR registers with the incoming normal parameters. | |
34 | * |
|
35 | * | |
35 | * @param TC points to the TeleCommand packet that is being processed |
|
36 | * @param TC points to the TeleCommand packet that is being processed | |
36 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
37 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
37 | * |
|
38 | * | |
38 | */ |
|
39 | */ | |
|
40 | ||||
39 | int result; |
|
41 | int result; | |
40 | int flag; |
|
42 | int flag; | |
41 |
|
43 | |||
42 | flag = LFR_SUCCESSFUL; |
|
44 | flag = LFR_SUCCESSFUL; | |
43 | result = LFR_SUCCESSFUL; |
|
45 | result = LFR_SUCCESSFUL; | |
44 |
|
46 | |||
45 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { |
|
47 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { | |
46 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
48 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
47 | flag = LFR_DEFAULT; |
|
49 | flag = LFR_DEFAULT; | |
48 | } |
|
50 | } | |
49 |
|
51 | |||
50 | //*************** |
|
52 | //*************** | |
51 | // sy_lfr_n_swf_l |
|
53 | // sy_lfr_n_swf_l | |
52 | if (flag == LFR_SUCCESSFUL) |
|
54 | if (flag == LFR_SUCCESSFUL) | |
53 | { |
|
55 | { | |
54 | result = set_sy_lfr_n_swf_l( TC, queue_id ); |
|
56 | result = set_sy_lfr_n_swf_l( TC, queue_id ); | |
55 | if (result != LFR_SUCCESSFUL) |
|
57 | if (result != LFR_SUCCESSFUL) | |
56 | { |
|
58 | { | |
57 | flag = LFR_DEFAULT; |
|
59 | flag = LFR_DEFAULT; | |
58 | } |
|
60 | } | |
59 | } |
|
61 | } | |
60 |
|
62 | |||
61 | //*************** |
|
63 | //*************** | |
62 | // sy_lfr_n_swf_p |
|
64 | // sy_lfr_n_swf_p | |
63 | if (flag == LFR_SUCCESSFUL) |
|
65 | if (flag == LFR_SUCCESSFUL) | |
64 | { |
|
66 | { | |
65 | result = set_sy_lfr_n_swf_p( TC, queue_id ); |
|
67 | result = set_sy_lfr_n_swf_p( TC, queue_id ); | |
66 | if (result != LFR_SUCCESSFUL) |
|
68 | if (result != LFR_SUCCESSFUL) | |
67 | { |
|
69 | { | |
68 | flag = LFR_DEFAULT; |
|
70 | flag = LFR_DEFAULT; | |
69 | } |
|
71 | } | |
70 | } |
|
72 | } | |
71 |
|
73 | |||
72 | //*************** |
|
74 | //*************** | |
73 | // sy_lfr_n_asm_p |
|
75 | // sy_lfr_n_asm_p | |
74 | if (flag == LFR_SUCCESSFUL) |
|
76 | if (flag == LFR_SUCCESSFUL) | |
75 | { |
|
77 | { | |
76 | result = set_sy_lfr_n_asm_p( TC, queue_id ); |
|
78 | result = set_sy_lfr_n_asm_p( TC, queue_id ); | |
77 | if (result != LFR_SUCCESSFUL) |
|
79 | if (result != LFR_SUCCESSFUL) | |
78 | { |
|
80 | { | |
79 | flag = LFR_DEFAULT; |
|
81 | flag = LFR_DEFAULT; | |
80 | } |
|
82 | } | |
81 | } |
|
83 | } | |
82 |
|
84 | |||
83 | //*************** |
|
85 | //*************** | |
84 | // sy_lfr_n_bp_p0 |
|
86 | // sy_lfr_n_bp_p0 | |
85 | if (flag == LFR_SUCCESSFUL) |
|
87 | if (flag == LFR_SUCCESSFUL) | |
86 | { |
|
88 | { | |
87 | result = set_sy_lfr_n_bp_p0( TC, queue_id ); |
|
89 | result = set_sy_lfr_n_bp_p0( TC, queue_id ); | |
88 | if (result != LFR_SUCCESSFUL) |
|
90 | if (result != LFR_SUCCESSFUL) | |
89 | { |
|
91 | { | |
90 | flag = LFR_DEFAULT; |
|
92 | flag = LFR_DEFAULT; | |
91 | } |
|
93 | } | |
92 | } |
|
94 | } | |
93 |
|
95 | |||
94 | //*************** |
|
96 | //*************** | |
95 | // sy_lfr_n_bp_p1 |
|
97 | // sy_lfr_n_bp_p1 | |
96 | if (flag == LFR_SUCCESSFUL) |
|
98 | if (flag == LFR_SUCCESSFUL) | |
97 | { |
|
99 | { | |
98 | result = set_sy_lfr_n_bp_p1( TC, queue_id ); |
|
100 | result = set_sy_lfr_n_bp_p1( TC, queue_id ); | |
99 | if (result != LFR_SUCCESSFUL) |
|
101 | if (result != LFR_SUCCESSFUL) | |
100 | { |
|
102 | { | |
101 | flag = LFR_DEFAULT; |
|
103 | flag = LFR_DEFAULT; | |
102 | } |
|
104 | } | |
103 | } |
|
105 | } | |
104 |
|
106 | |||
105 | return result; |
|
107 | return result; | |
106 | } |
|
108 | } | |
107 |
|
109 | |||
108 | int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
110 | int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
109 | { |
|
111 | { | |
110 | /** This function updates the LFR registers with the incoming burst parameters. |
|
112 | /** This function updates the LFR registers with the incoming burst parameters. | |
111 | * |
|
113 | * | |
112 | * @param TC points to the TeleCommand packet that is being processed |
|
114 | * @param TC points to the TeleCommand packet that is being processed | |
113 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
115 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
114 | * |
|
116 | * | |
115 | */ |
|
117 | */ | |
|
118 | ||||
116 | int result; |
|
119 | int result; | |
117 | unsigned char lfrMode; |
|
120 | unsigned char lfrMode; | |
118 |
|
121 | |||
119 | result = LFR_DEFAULT; |
|
122 | result = LFR_DEFAULT; | |
120 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
123 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
121 |
|
124 | |||
122 | if ( lfrMode == LFR_MODE_BURST ) { |
|
125 | if ( lfrMode == LFR_MODE_BURST ) { | |
123 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
126 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
124 | result = LFR_DEFAULT; |
|
127 | result = LFR_DEFAULT; | |
125 | } |
|
128 | } | |
126 | else { |
|
129 | else { | |
127 | parameter_dump_packet.sy_lfr_b_bp_p0 = TC->dataAndCRC[0]; |
|
130 | parameter_dump_packet.sy_lfr_b_bp_p0 = TC->dataAndCRC[0]; | |
128 | parameter_dump_packet.sy_lfr_b_bp_p1 = TC->dataAndCRC[1]; |
|
131 | parameter_dump_packet.sy_lfr_b_bp_p1 = TC->dataAndCRC[1]; | |
129 |
|
132 | |||
130 | result = LFR_SUCCESSFUL; |
|
133 | result = LFR_SUCCESSFUL; | |
131 | } |
|
134 | } | |
132 |
|
135 | |||
133 | return result; |
|
136 | return result; | |
134 | } |
|
137 | } | |
135 |
|
138 | |||
136 | int action_load_sbm1_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
139 | int action_load_sbm1_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
137 | { |
|
140 | { | |
138 | /** This function updates the LFR registers with the incoming sbm1 parameters. |
|
141 | /** This function updates the LFR registers with the incoming sbm1 parameters. | |
139 | * |
|
142 | * | |
140 | * @param TC points to the TeleCommand packet that is being processed |
|
143 | * @param TC points to the TeleCommand packet that is being processed | |
141 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
144 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
142 | * |
|
145 | * | |
143 | */ |
|
146 | */ | |
144 | int result; |
|
147 | int result; | |
145 | unsigned char lfrMode; |
|
148 | unsigned char lfrMode; | |
146 |
|
149 | |||
147 | result = LFR_DEFAULT; |
|
150 | result = LFR_DEFAULT; | |
148 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
151 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
149 |
|
152 | |||
150 | if ( lfrMode == LFR_MODE_SBM1 ) { |
|
153 | if ( lfrMode == LFR_MODE_SBM1 ) { | |
151 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
154 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
152 | result = LFR_DEFAULT; |
|
155 | result = LFR_DEFAULT; | |
153 | } |
|
156 | } | |
154 | else { |
|
157 | else { | |
155 | parameter_dump_packet.sy_lfr_s1_bp_p0 = TC->dataAndCRC[0]; |
|
158 | parameter_dump_packet.sy_lfr_s1_bp_p0 = TC->dataAndCRC[0]; | |
156 | parameter_dump_packet.sy_lfr_s1_bp_p1 = TC->dataAndCRC[1]; |
|
159 | parameter_dump_packet.sy_lfr_s1_bp_p1 = TC->dataAndCRC[1]; | |
157 |
|
160 | |||
158 | result = LFR_SUCCESSFUL; |
|
161 | result = LFR_SUCCESSFUL; | |
159 | } |
|
162 | } | |
160 |
|
163 | |||
161 | return result; |
|
164 | return result; | |
162 | } |
|
165 | } | |
163 |
|
166 | |||
164 | int action_load_sbm2_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
167 | int action_load_sbm2_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
165 | { |
|
168 | { | |
166 | /** This function updates the LFR registers with the incoming sbm2 parameters. |
|
169 | /** This function updates the LFR registers with the incoming sbm2 parameters. | |
167 | * |
|
170 | * | |
168 | * @param TC points to the TeleCommand packet that is being processed |
|
171 | * @param TC points to the TeleCommand packet that is being processed | |
169 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
172 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
170 | * |
|
173 | * | |
171 | */ |
|
174 | */ | |
172 |
|
175 | |||
173 | int result; |
|
176 | int result; | |
174 | unsigned char lfrMode; |
|
177 | unsigned char lfrMode; | |
175 |
|
178 | |||
176 | result = LFR_DEFAULT; |
|
179 | result = LFR_DEFAULT; | |
177 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
180 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
178 |
|
181 | |||
179 | if ( lfrMode == LFR_MODE_SBM2 ) { |
|
182 | if ( lfrMode == LFR_MODE_SBM2 ) { | |
180 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
183 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
181 | result = LFR_DEFAULT; |
|
184 | result = LFR_DEFAULT; | |
182 | } |
|
185 | } | |
183 | else { |
|
186 | else { | |
184 | parameter_dump_packet.sy_lfr_s2_bp_p0 = TC->dataAndCRC[0]; |
|
187 | parameter_dump_packet.sy_lfr_s2_bp_p0 = TC->dataAndCRC[0]; | |
185 | parameter_dump_packet.sy_lfr_s2_bp_p1 = TC->dataAndCRC[1]; |
|
188 | parameter_dump_packet.sy_lfr_s2_bp_p1 = TC->dataAndCRC[1]; | |
186 |
|
189 | |||
187 | result = LFR_SUCCESSFUL; |
|
190 | result = LFR_SUCCESSFUL; | |
188 | } |
|
191 | } | |
189 |
|
192 | |||
190 | return result; |
|
193 | return result; | |
191 | } |
|
194 | } | |
192 |
|
195 | |||
193 | int action_dump_par( rtems_id queue_id ) |
|
196 | int action_dump_par( rtems_id queue_id ) | |
194 | { |
|
197 | { | |
195 | /** This function dumps the LFR parameters by sending the appropriate TM packet to the dedicated RTEMS message queue. |
|
198 | /** This function dumps the LFR parameters by sending the appropriate TM packet to the dedicated RTEMS message queue. | |
196 | * |
|
199 | * | |
197 | * @param queue_id is the id of the queue which handles TM related to this execution step. |
|
200 | * @param queue_id is the id of the queue which handles TM related to this execution step. | |
198 | * |
|
201 | * | |
199 | * @return RTEMS directive status codes: |
|
202 | * @return RTEMS directive status codes: | |
200 | * - RTEMS_SUCCESSFUL - message sent successfully |
|
203 | * - RTEMS_SUCCESSFUL - message sent successfully | |
201 | * - RTEMS_INVALID_ID - invalid queue id |
|
204 | * - RTEMS_INVALID_ID - invalid queue id | |
202 | * - RTEMS_INVALID_SIZE - invalid message size |
|
205 | * - RTEMS_INVALID_SIZE - invalid message size | |
203 | * - RTEMS_INVALID_ADDRESS - buffer is NULL |
|
206 | * - RTEMS_INVALID_ADDRESS - buffer is NULL | |
204 | * - RTEMS_UNSATISFIED - out of message buffers |
|
207 | * - RTEMS_UNSATISFIED - out of message buffers | |
205 | * - RTEMS_TOO_MANY - queue s limit has been reached |
|
208 | * - RTEMS_TOO_MANY - queue s limit has been reached | |
206 | * |
|
209 | * | |
207 | */ |
|
210 | */ | |
208 |
|
211 | |||
209 | int status; |
|
212 | int status; | |
210 |
|
213 | |||
211 | // SEND DATA |
|
214 | // SEND DATA | |
212 | status = rtems_message_queue_send( queue_id, ¶meter_dump_packet, |
|
215 | status = rtems_message_queue_send( queue_id, ¶meter_dump_packet, | |
213 | PACKET_LENGTH_PARAMETER_DUMP + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); |
|
216 | PACKET_LENGTH_PARAMETER_DUMP + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); | |
214 | if (status != RTEMS_SUCCESSFUL) { |
|
217 | if (status != RTEMS_SUCCESSFUL) { | |
215 | PRINTF1("in action_dump *** ERR sending packet, code %d", status) |
|
218 | PRINTF1("in action_dump *** ERR sending packet, code %d", status) | |
216 | } |
|
219 | } | |
217 |
|
220 | |||
218 | return status; |
|
221 | return status; | |
219 | } |
|
222 | } | |
220 |
|
223 | |||
221 | //*********************** |
|
224 | //*********************** | |
222 | // NORMAL MODE PARAMETERS |
|
225 | // NORMAL MODE PARAMETERS | |
223 |
|
226 | |||
224 | int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
227 | int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
225 | { |
|
228 | { | |
226 | /** This function sets the number of points of a snapshot (sy_lfr_n_swf_l). |
|
229 | /** This function sets the number of points of a snapshot (sy_lfr_n_swf_l). | |
227 | * |
|
230 | * | |
228 | * @param TC points to the TeleCommand packet that is being processed |
|
231 | * @param TC points to the TeleCommand packet that is being processed | |
229 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
232 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
230 | * |
|
233 | * | |
231 | */ |
|
234 | */ | |
232 |
|
235 | |||
233 | unsigned int tmp; |
|
236 | unsigned int tmp; | |
234 | int result; |
|
237 | int result; | |
235 | unsigned char msb; |
|
238 | unsigned char msb; | |
236 | unsigned char lsb; |
|
239 | unsigned char lsb; | |
237 |
|
240 | |||
238 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_L ]; |
|
241 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_L ]; | |
239 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_L+1 ]; |
|
242 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_L+1 ]; | |
240 |
|
243 | |||
241 | tmp = ( unsigned int ) floor( |
|
244 | tmp = ( unsigned int ) floor( | |
242 | ( ( msb*256 ) + lsb ) / 16 |
|
245 | ( ( msb*256 ) + lsb ) / 16 | |
243 | ) * 16; |
|
246 | ) * 16; | |
244 |
|
247 | |||
245 | if ( (tmp < 16) || (tmp > 2048) ) // the snapshot period is a multiple of 16 |
|
248 | if ( (tmp < 16) || (tmp > 2048) ) // the snapshot period is a multiple of 16 | |
246 | { // 2048 is the maximum limit due to thesize of the buffers |
|
249 | { // 2048 is the maximum limit due to thesize of the buffers | |
247 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_L+10, lsb ); |
|
250 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_L+10, lsb ); | |
248 | result = WRONG_APP_DATA; |
|
251 | result = WRONG_APP_DATA; | |
249 | } |
|
252 | } | |
250 | else if (tmp != 2048) |
|
253 | else if (tmp != 2048) | |
251 | { |
|
254 | { | |
252 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); |
|
255 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |
253 | result = FUNCT_NOT_IMPL; |
|
256 | result = FUNCT_NOT_IMPL; | |
254 | } |
|
257 | } | |
255 | else |
|
258 | else | |
256 | { |
|
259 | { | |
257 | parameter_dump_packet.sy_lfr_n_swf_l[0] = (unsigned char) (tmp >> 8); |
|
260 | parameter_dump_packet.sy_lfr_n_swf_l[0] = (unsigned char) (tmp >> 8); | |
258 | parameter_dump_packet.sy_lfr_n_swf_l[1] = (unsigned char) (tmp ); |
|
261 | parameter_dump_packet.sy_lfr_n_swf_l[1] = (unsigned char) (tmp ); | |
259 | result = LFR_SUCCESSFUL; |
|
262 | result = LFR_SUCCESSFUL; | |
260 | } |
|
263 | } | |
261 |
|
264 | |||
262 | return result; |
|
265 | return result; | |
263 | } |
|
266 | } | |
264 |
|
267 | |||
265 | int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
268 | int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
266 | { |
|
269 | { | |
267 | /** This function sets the time between two snapshots, in s (sy_lfr_n_swf_p). |
|
270 | /** This function sets the time between two snapshots, in s (sy_lfr_n_swf_p). | |
268 | * |
|
271 | * | |
269 | * @param TC points to the TeleCommand packet that is being processed |
|
272 | * @param TC points to the TeleCommand packet that is being processed | |
270 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
273 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
271 | * |
|
274 | * | |
272 | */ |
|
275 | */ | |
273 |
|
276 | |||
274 | unsigned int tmp; |
|
277 | unsigned int tmp; | |
275 | int result; |
|
278 | int result; | |
276 | unsigned char msb; |
|
279 | unsigned char msb; | |
277 | unsigned char lsb; |
|
280 | unsigned char lsb; | |
278 |
|
281 | |||
279 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_P ]; |
|
282 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_P ]; | |
280 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_P+1 ]; |
|
283 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_SWF_P+1 ]; | |
281 |
|
284 | |||
282 | tmp = ( unsigned int ) floor( |
|
285 | tmp = ( unsigned int ) floor( | |
283 | ( ( msb*256 ) + lsb ) / 8 |
|
286 | ( ( msb*256 ) + lsb ) / 8 | |
284 | ) * 8; |
|
287 | ) * 8; | |
285 |
|
288 | |||
286 | if ( (tmp < 16) || (tmp > 65528) ) |
|
289 | if ( (tmp < 16) || (tmp > 65528) ) | |
287 | { |
|
290 | { | |
288 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_P+10, lsb ); |
|
291 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_P+10, lsb ); | |
289 | result = WRONG_APP_DATA; |
|
292 | result = WRONG_APP_DATA; | |
290 | } |
|
293 | } | |
291 | else |
|
294 | else | |
292 | { |
|
295 | { | |
293 | parameter_dump_packet.sy_lfr_n_swf_p[0] = (unsigned char) (tmp >> 8); |
|
296 | parameter_dump_packet.sy_lfr_n_swf_p[0] = (unsigned char) (tmp >> 8); | |
294 | parameter_dump_packet.sy_lfr_n_swf_p[1] = (unsigned char) (tmp ); |
|
297 | parameter_dump_packet.sy_lfr_n_swf_p[1] = (unsigned char) (tmp ); | |
295 | result = LFR_SUCCESSFUL; |
|
298 | result = LFR_SUCCESSFUL; | |
296 | } |
|
299 | } | |
297 |
|
300 | |||
298 | return result; |
|
301 | return result; | |
299 | } |
|
302 | } | |
300 |
|
303 | |||
301 | int set_sy_lfr_n_asm_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
304 | int set_sy_lfr_n_asm_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
302 | { |
|
305 | { | |
303 | /** This function sets the time between two full spectral matrices transmission, in s (sy_lfr_n_asm_p). |
|
306 | /** This function sets the time between two full spectral matrices transmission, in s (sy_lfr_n_asm_p). | |
304 | * |
|
307 | * | |
305 | * @param TC points to the TeleCommand packet that is being processed |
|
308 | * @param TC points to the TeleCommand packet that is being processed | |
306 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
309 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
307 | * |
|
310 | * | |
308 | */ |
|
311 | */ | |
309 |
|
312 | |||
310 | int result; |
|
313 | int result; | |
311 | unsigned char msb; |
|
314 | unsigned char msb; | |
312 | unsigned char lsb; |
|
315 | unsigned char lsb; | |
313 |
|
316 | |||
314 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_ASM_P ]; |
|
317 | msb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_ASM_P ]; | |
315 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_ASM_P+1 ]; |
|
318 | lsb = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_ASM_P+1 ]; | |
316 |
|
319 | |||
317 | parameter_dump_packet.sy_lfr_n_asm_p[0] = msb; |
|
320 | parameter_dump_packet.sy_lfr_n_asm_p[0] = msb; | |
318 | parameter_dump_packet.sy_lfr_n_asm_p[1] = lsb; |
|
321 | parameter_dump_packet.sy_lfr_n_asm_p[1] = lsb; | |
319 | result = LFR_SUCCESSFUL; |
|
322 | result = LFR_SUCCESSFUL; | |
320 |
|
323 | |||
321 | return result; |
|
324 | return result; | |
322 | } |
|
325 | } | |
323 |
|
326 | |||
324 | int set_sy_lfr_n_bp_p0( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
327 | int set_sy_lfr_n_bp_p0( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
325 | { |
|
328 | { | |
326 | /** This function sets the time between two basic parameter sets, in s (sy_lfr_n_bp_p0). |
|
329 | /** This function sets the time between two basic parameter sets, in s (sy_lfr_n_bp_p0). | |
327 | * |
|
330 | * | |
328 | * @param TC points to the TeleCommand packet that is being processed |
|
331 | * @param TC points to the TeleCommand packet that is being processed | |
329 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
332 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
330 | * |
|
333 | * | |
331 | */ |
|
334 | */ | |
332 |
|
335 | |||
333 | int status; |
|
336 | int status; | |
334 |
|
337 | |||
335 | status = LFR_SUCCESSFUL; |
|
338 | status = LFR_SUCCESSFUL; | |
336 |
|
339 | |||
337 | parameter_dump_packet.sy_lfr_n_bp_p0 = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_BP_P0 ]; |
|
340 | parameter_dump_packet.sy_lfr_n_bp_p0 = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_BP_P0 ]; | |
338 |
|
341 | |||
339 | return status; |
|
342 | return status; | |
340 | } |
|
343 | } | |
341 |
|
344 | |||
342 | int set_sy_lfr_n_bp_p1(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
345 | int set_sy_lfr_n_bp_p1(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
343 | { |
|
346 | { | |
344 | /** This function sets the time between two basic parameter sets (autocorrelation + crosscorrelation), in s (sy_lfr_n_bp_p1). |
|
347 | /** This function sets the time between two basic parameter sets (autocorrelation + crosscorrelation), in s (sy_lfr_n_bp_p1). | |
345 | * |
|
348 | * | |
346 | * @param TC points to the TeleCommand packet that is being processed |
|
349 | * @param TC points to the TeleCommand packet that is being processed | |
347 | * @param queue_id is the id of the queue which handles TM related to this execution step |
|
350 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
348 | * |
|
351 | * | |
349 | */ |
|
352 | */ | |
350 |
|
353 | |||
351 | int status; |
|
354 | int status; | |
352 |
|
355 | |||
353 | status = LFR_SUCCESSFUL; |
|
356 | status = LFR_SUCCESSFUL; | |
354 |
|
357 | |||
355 | parameter_dump_packet.sy_lfr_n_bp_p1 = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_BP_P1 ]; |
|
358 | parameter_dump_packet.sy_lfr_n_bp_p1 = TC->dataAndCRC[ BYTE_POS_SY_LFR_N_BP_P1 ]; | |
356 |
|
359 | |||
357 | return status; |
|
360 | return status; | |
358 | } |
|
361 | } | |
359 |
|
362 | |||
360 | //********************** |
|
363 | //********************** | |
361 | // BURST MODE PARAMETERS |
|
364 | // BURST MODE PARAMETERS | |
362 |
|
365 | |||
363 | //********************* |
|
366 | //********************* | |
364 | // SBM1 MODE PARAMETERS |
|
367 | // SBM1 MODE PARAMETERS | |
365 |
|
368 | |||
366 | //********************* |
|
369 | //********************* | |
367 | // SBM2 MODE PARAMETERS |
|
370 | // SBM2 MODE PARAMETERS | |
368 |
|
371 | |||
369 |
|
372 | |||
370 |
|
373 | |||
371 |
|
374 | |||
372 |
|
375 | |||
373 |
|
376 | |||
374 |
|
377 | |||
375 |
|
378 | |||
376 |
|
379 | |||
377 |
|
380 |
@@ -1,1106 +1,1171 | |||||
1 | /** Functions and tasks related to waveform packet generation. |
|
1 | /** Functions and tasks related to waveform packet generation. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * A group of functions to handle waveforms, in snapshot or continuous format.\n |
|
6 | * A group of functions to handle waveforms, in snapshot or continuous format.\n | |
7 | * |
|
7 | * | |
8 | */ |
|
8 | */ | |
9 |
|
9 | |||
10 | #include "wf_handler.h" |
|
10 | #include "wf_handler.h" | |
11 |
|
11 | |||
12 | // SWF |
|
12 | // SWF | |
13 | Header_TM_LFR_SCIENCE_SWF_t headerSWF_F0[7]; |
|
13 | Header_TM_LFR_SCIENCE_SWF_t headerSWF_F0[7]; | |
14 | Header_TM_LFR_SCIENCE_SWF_t headerSWF_F1[7]; |
|
14 | Header_TM_LFR_SCIENCE_SWF_t headerSWF_F1[7]; | |
15 | Header_TM_LFR_SCIENCE_SWF_t headerSWF_F2[7]; |
|
15 | Header_TM_LFR_SCIENCE_SWF_t headerSWF_F2[7]; | |
16 | // CWF |
|
16 | // CWF | |
17 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[7]; |
|
17 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[7]; | |
18 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[7]; |
|
18 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[7]; | |
19 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[7]; |
|
19 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[7]; | |
20 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[7]; |
|
20 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[7]; | |
21 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[7]; |
|
21 | Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[7]; | |
22 |
|
22 | |||
23 | unsigned char doubleSendCWF1 = 0; |
|
23 | unsigned char doubleSendCWF1 = 0; | |
24 | unsigned char doubleSendCWF2 = 0; |
|
24 | unsigned char doubleSendCWF2 = 0; | |
25 |
|
25 | |||
26 | rtems_isr waveforms_isr( rtems_vector_number vector ) |
|
26 | rtems_isr waveforms_isr( rtems_vector_number vector ) | |
27 | { |
|
27 | { | |
|
28 | /** This is the interrupt sub routine called by the waveform picker core. | |||
|
29 | * | |||
|
30 | * This ISR launch different actions depending mainly on two pieces of information: | |||
|
31 | * 1. the values read in the registers of the waveform picker. | |||
|
32 | * 2. the current LFR mode. | |||
|
33 | * | |||
|
34 | */ | |||
28 |
|
35 | |||
29 | #ifdef GSA |
|
36 | #ifdef GSA | |
30 | #else |
|
37 | #else | |
31 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
38 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
32 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
39 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
33 | { // in modes other than STANDBY and BURST, send the CWF_F3 data |
|
40 | { // in modes other than STANDBY and BURST, send the CWF_F3 data | |
34 | if ((waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full |
|
41 | if ((waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full | |
35 | // (1) change the receiving buffer for the waveform picker |
|
42 | // (1) change the receiving buffer for the waveform picker | |
36 | if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { |
|
43 | if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { | |
37 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis); |
|
44 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis); | |
38 | } |
|
45 | } | |
39 | else { |
|
46 | else { | |
40 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); |
|
47 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); | |
41 | } |
|
48 | } | |
42 | // (2) send an event for the waveforms transmission |
|
49 | // (2) send an event for the waveforms transmission | |
43 | if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
50 | if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
44 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
51 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
45 | } |
|
52 | } | |
46 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111] |
|
53 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111] | |
47 | } |
|
54 | } | |
48 | } |
|
55 | } | |
49 | #endif |
|
56 | #endif | |
50 |
|
57 | |||
51 | switch(lfrCurrentMode) |
|
58 | switch(lfrCurrentMode) | |
52 | { |
|
59 | { | |
53 | //******** |
|
60 | //******** | |
54 | // STANDBY |
|
61 | // STANDBY | |
55 | case(LFR_MODE_STANDBY): |
|
62 | case(LFR_MODE_STANDBY): | |
56 | break; |
|
63 | break; | |
57 |
|
64 | |||
58 | //****** |
|
65 | //****** | |
59 | // NORMAL |
|
66 | // NORMAL | |
60 | case(LFR_MODE_NORMAL): |
|
67 | case(LFR_MODE_NORMAL): | |
61 | #ifdef GSA |
|
68 | #ifdef GSA | |
62 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
69 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
63 | #else |
|
70 | #else | |
64 | if ( (waveform_picker_regs->burst_enable & 0x7) == 0x0 ){ // if no channel is enable |
|
71 | if ( (waveform_picker_regs->burst_enable & 0x7) == 0x0 ){ // if no channel is enable | |
65 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
72 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
66 | } |
|
73 | } | |
67 | else { |
|
74 | else { | |
68 | if ( (waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full |
|
75 | if ( (waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full | |
69 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable & 0x08; |
|
76 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable & 0x08; | |
70 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { |
|
77 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
71 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
78 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
72 | } |
|
79 | } | |
73 | waveform_picker_regs->status = waveform_picker_regs->status & 0x00; |
|
80 | waveform_picker_regs->status = waveform_picker_regs->status & 0x00; | |
74 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x07; // [0111] enable f2 f1 f0 |
|
81 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x07; // [0111] enable f2 f1 f0 | |
75 | } |
|
82 | } | |
76 | } |
|
83 | } | |
77 | #endif |
|
84 | #endif | |
78 | break; |
|
85 | break; | |
79 |
|
86 | |||
80 | //****** |
|
87 | //****** | |
81 | // BURST |
|
88 | // BURST | |
82 | case(LFR_MODE_BURST): |
|
89 | case(LFR_MODE_BURST): | |
83 | #ifdef GSA |
|
90 | #ifdef GSA | |
84 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
91 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
85 | #else |
|
92 | #else | |
86 | if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit |
|
93 | if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit | |
87 | // (1) change the receiving buffer for the waveform picker |
|
94 | // (1) change the receiving buffer for the waveform picker | |
88 | if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { |
|
95 | if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { | |
89 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis); |
|
96 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis); | |
90 | } |
|
97 | } | |
91 | else { |
|
98 | else { | |
92 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); |
|
99 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); | |
93 | } |
|
100 | } | |
94 | // (2) send an event for the waveforms transmission |
|
101 | // (2) send an event for the waveforms transmission | |
95 | if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) { |
|
102 | if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) { | |
96 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
103 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
97 | } |
|
104 | } | |
98 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0 |
|
105 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0 | |
99 | } |
|
106 | } | |
100 | #endif |
|
107 | #endif | |
101 | break; |
|
108 | break; | |
102 |
|
109 | |||
103 | //***** |
|
110 | //***** | |
104 | // SBM1 |
|
111 | // SBM1 | |
105 | case(LFR_MODE_SBM1): |
|
112 | case(LFR_MODE_SBM1): | |
106 | #ifdef GSA |
|
113 | #ifdef GSA | |
107 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
114 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
108 | #else |
|
115 | #else | |
109 | if ((waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit |
|
116 | if ((waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit | |
110 | // (1) change the receiving buffer for the waveform picker |
|
117 | // (1) change the receiving buffer for the waveform picker | |
111 | if ( param_local.local_sbm1_nb_cwf_sent == (param_local.local_sbm1_nb_cwf_max-1) ) |
|
118 | if ( param_local.local_sbm1_nb_cwf_sent == (param_local.local_sbm1_nb_cwf_max-1) ) | |
112 | { |
|
119 | { | |
113 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm); |
|
120 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm); | |
114 | } |
|
121 | } | |
115 | else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm ) |
|
122 | else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm ) | |
116 | { |
|
123 | { | |
117 | doubleSendCWF1 = 1; |
|
124 | doubleSendCWF1 = 1; | |
118 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); |
|
125 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); | |
119 | } |
|
126 | } | |
120 | else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) { |
|
127 | else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) { | |
121 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis); |
|
128 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis); | |
122 | } |
|
129 | } | |
123 | else { |
|
130 | else { | |
124 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); |
|
131 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); | |
125 | } |
|
132 | } | |
126 | // (2) send an event for the waveforms transmission |
|
133 | // (2) send an event for the waveforms transmission | |
127 | if (rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 ) != RTEMS_SUCCESSFUL) { |
|
134 | if (rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 ) != RTEMS_SUCCESSFUL) { | |
128 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
135 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
129 | } |
|
136 | } | |
130 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0 |
|
137 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0 | |
131 | } |
|
138 | } | |
132 | if ( ( (waveform_picker_regs->status & 0x05) == 0x05 ) ) { // [0101] check the f2 and f0 full bit |
|
139 | if ( ( (waveform_picker_regs->status & 0x05) == 0x05 ) ) { // [0101] check the f2 and f0 full bit | |
133 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { |
|
140 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
134 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
141 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
135 | } |
|
142 | } | |
136 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0 |
|
143 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0 | |
137 | reset_local_sbm1_nb_cwf_sent(); |
|
144 | reset_local_sbm1_nb_cwf_sent(); | |
138 | } |
|
145 | } | |
139 |
|
146 | |||
140 | #endif |
|
147 | #endif | |
141 | break; |
|
148 | break; | |
142 |
|
149 | |||
143 | //***** |
|
150 | //***** | |
144 | // SBM2 |
|
151 | // SBM2 | |
145 | case(LFR_MODE_SBM2): |
|
152 | case(LFR_MODE_SBM2): | |
146 | #ifdef GSA |
|
153 | #ifdef GSA | |
147 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
154 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
148 | #else |
|
155 | #else | |
149 | if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit |
|
156 | if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit | |
150 | // (1) change the receiving buffer for the waveform picker |
|
157 | // (1) change the receiving buffer for the waveform picker | |
151 | if ( param_local.local_sbm2_nb_cwf_sent == (param_local.local_sbm2_nb_cwf_max-1) ) |
|
158 | if ( param_local.local_sbm2_nb_cwf_sent == (param_local.local_sbm2_nb_cwf_max-1) ) | |
152 | { |
|
159 | { | |
153 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm); |
|
160 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm); | |
154 | } |
|
161 | } | |
155 | else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) { |
|
162 | else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) { | |
156 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); |
|
163 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); | |
157 | doubleSendCWF2 = 1; |
|
164 | doubleSendCWF2 = 1; | |
158 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2_WFRM ) != RTEMS_SUCCESSFUL) { |
|
165 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2_WFRM ) != RTEMS_SUCCESSFUL) { | |
159 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
166 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
160 | } |
|
167 | } | |
161 | reset_local_sbm2_nb_cwf_sent(); |
|
168 | reset_local_sbm2_nb_cwf_sent(); | |
162 | } |
|
169 | } | |
163 | else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) { |
|
170 | else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) { | |
164 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis); |
|
171 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis); | |
165 | } |
|
172 | } | |
166 | else { |
|
173 | else { | |
167 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); |
|
174 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); | |
168 | } |
|
175 | } | |
169 | // (2) send an event for the waveforms transmission |
|
176 | // (2) send an event for the waveforms transmission | |
170 | if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) { |
|
177 | if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) { | |
171 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
178 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
172 | } |
|
179 | } | |
173 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0 |
|
180 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0 | |
174 | } |
|
181 | } | |
175 | if ( ( (waveform_picker_regs->status & 0x03) == 0x03 ) ) { // [0011] f3 f2 f1 f0, f1 and f0 are full |
|
182 | if ( ( (waveform_picker_regs->status & 0x03) == 0x03 ) ) { // [0011] f3 f2 f1 f0, f1 and f0 are full | |
176 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) { |
|
183 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) { | |
177 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
184 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
178 | } |
|
185 | } | |
179 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 |
|
186 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 | |
180 | } |
|
187 | } | |
181 | #endif |
|
188 | #endif | |
182 | break; |
|
189 | break; | |
183 |
|
190 | |||
184 | //******** |
|
191 | //******** | |
185 | // DEFAULT |
|
192 | // DEFAULT | |
186 | default: |
|
193 | default: | |
187 | break; |
|
194 | break; | |
188 | } |
|
195 | } | |
189 | } |
|
196 | } | |
190 |
|
197 | |||
191 | rtems_isr waveforms_simulator_isr( rtems_vector_number vector ) |
|
198 | rtems_isr waveforms_simulator_isr( rtems_vector_number vector ) | |
192 | { |
|
199 | { | |
|
200 | /** This is the interrupt sub routine called by the waveform picker simulator. | |||
|
201 | * | |||
|
202 | * This ISR is for debug purpose only. | |||
|
203 | * | |||
|
204 | */ | |||
|
205 | ||||
193 | unsigned char lfrMode; |
|
206 | unsigned char lfrMode; | |
194 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
207 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
195 |
|
208 | |||
196 | switch(lfrMode) { |
|
209 | switch(lfrMode) { | |
197 | case (LFR_MODE_STANDBY): |
|
210 | case (LFR_MODE_STANDBY): | |
198 | break; |
|
211 | break; | |
199 | case (LFR_MODE_NORMAL): |
|
212 | case (LFR_MODE_NORMAL): | |
200 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { |
|
213 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
201 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_5 ); |
|
214 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_5 ); | |
202 | } |
|
215 | } | |
203 | break; |
|
216 | break; | |
204 | case (LFR_MODE_BURST): |
|
217 | case (LFR_MODE_BURST): | |
205 | break; |
|
218 | break; | |
206 | case (LFR_MODE_SBM1): |
|
219 | case (LFR_MODE_SBM1): | |
207 | break; |
|
220 | break; | |
208 | case (LFR_MODE_SBM2): |
|
221 | case (LFR_MODE_SBM2): | |
209 | break; |
|
222 | break; | |
210 | } |
|
223 | } | |
211 | } |
|
224 | } | |
212 |
|
225 | |||
213 | rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP |
|
226 | rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP | |
214 | { |
|
227 | { | |
|
228 | /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode. | |||
|
229 | * | |||
|
230 | * @param unused is the starting argument of the RTEMS task | |||
|
231 | * | |||
|
232 | * The following data packets are sent by this task: | |||
|
233 | * - TM_LFR_SCIENCE_NORMAL_SWF_F0 | |||
|
234 | * - TM_LFR_SCIENCE_NORMAL_SWF_F1 | |||
|
235 | * - TM_LFR_SCIENCE_NORMAL_SWF_F2 | |||
|
236 | * | |||
|
237 | */ | |||
|
238 | ||||
215 | rtems_event_set event_out; |
|
239 | rtems_event_set event_out; | |
216 | rtems_id queue_id; |
|
240 | rtems_id queue_id; | |
217 | rtems_status_code status; |
|
241 | rtems_status_code status; | |
218 |
|
242 | |||
219 | init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 ); |
|
243 | init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 ); | |
220 | init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 ); |
|
244 | init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 ); | |
221 | init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 ); |
|
245 | init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 ); | |
222 |
|
246 | |||
223 | init_waveforms(); |
|
247 | init_waveforms(); | |
224 |
|
248 | |||
225 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); |
|
249 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |
226 | if (status != RTEMS_SUCCESSFUL) |
|
250 | if (status != RTEMS_SUCCESSFUL) | |
227 | { |
|
251 | { | |
228 | PRINTF1("in WFRM *** ERR getting queue id, %d\n", status) |
|
252 | PRINTF1("in WFRM *** ERR getting queue id, %d\n", status) | |
229 | } |
|
253 | } | |
230 |
|
254 | |||
231 | BOOT_PRINTF("in WFRM ***\n") |
|
255 | BOOT_PRINTF("in WFRM ***\n") | |
232 |
|
256 | |||
233 | while(1){ |
|
257 | while(1){ | |
234 | // wait for an RTEMS_EVENT |
|
258 | // wait for an RTEMS_EVENT | |
235 | rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1 |
|
259 | rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1 | |
236 | | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM, |
|
260 | | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM, | |
237 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
261 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
238 |
|
262 | |||
239 | if (event_out == RTEMS_EVENT_MODE_NORMAL) |
|
263 | if (event_out == RTEMS_EVENT_MODE_NORMAL) | |
240 | { |
|
264 | { | |
241 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); |
|
265 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); | |
242 | send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id); |
|
266 | send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id); | |
243 | send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id); |
|
267 | send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id); | |
244 | #ifdef GSA |
|
268 | #ifdef GSA | |
245 | waveform_picker_regs->status = waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0 |
|
269 | waveform_picker_regs->status = waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0 | |
246 | #endif |
|
270 | #endif | |
247 | } |
|
271 | } | |
248 | else if (event_out == RTEMS_EVENT_MODE_SBM1) |
|
272 | else if (event_out == RTEMS_EVENT_MODE_SBM1) | |
249 | { |
|
273 | { | |
250 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); |
|
274 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); | |
251 | send_waveform_SWF(wf_snap_f1_norm, SID_NORM_SWF_F1, headerSWF_F1, queue_id); |
|
275 | send_waveform_SWF(wf_snap_f1_norm, SID_NORM_SWF_F1, headerSWF_F1, queue_id); | |
252 | send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id); |
|
276 | send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id); | |
253 | #ifdef GSA |
|
277 | #ifdef GSA | |
254 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0 |
|
278 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0 | |
255 | #endif |
|
279 | #endif | |
256 | } |
|
280 | } | |
257 | else if (event_out == RTEMS_EVENT_MODE_SBM2) |
|
281 | else if (event_out == RTEMS_EVENT_MODE_SBM2) | |
258 | { |
|
282 | { | |
259 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); |
|
283 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); | |
260 | send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id); |
|
284 | send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id); | |
261 | #ifdef GSA |
|
285 | #ifdef GSA | |
262 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 |
|
286 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 | |
263 | #endif |
|
287 | #endif | |
264 | } |
|
288 | } | |
265 | else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM) |
|
289 | else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM) | |
266 | { |
|
290 | { | |
267 | send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id); |
|
291 | send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id); | |
268 | } |
|
292 | } | |
269 | else |
|
293 | else | |
270 | { |
|
294 | { | |
271 | PRINTF("in WFRM *** unexpected event") |
|
295 | PRINTF("in WFRM *** unexpected event") | |
272 | } |
|
296 | } | |
273 |
|
297 | |||
274 |
|
298 | |||
275 | #ifdef GSA |
|
299 | #ifdef GSA | |
276 | // irq processed, reset the related register of the timer unit |
|
300 | // irq processed, reset the related register of the timer unit | |
277 | gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl = gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl | 0x00000010; |
|
301 | gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl = gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl | 0x00000010; | |
278 | // clear the interruption |
|
302 | // clear the interruption | |
279 | LEON_Unmask_interrupt( IRQ_WF ); |
|
303 | LEON_Unmask_interrupt( IRQ_WF ); | |
280 | #endif |
|
304 | #endif | |
281 | } |
|
305 | } | |
282 | } |
|
306 | } | |
283 |
|
307 | |||
284 | rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP |
|
308 | rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP | |
285 | { |
|
309 | { | |
|
310 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3. | |||
|
311 | * | |||
|
312 | * @param unused is the starting argument of the RTEMS task | |||
|
313 | * | |||
|
314 | * The following data packet is sent by this task: | |||
|
315 | * - TM_LFR_SCIENCE_NORMAL_CWF_F3 | |||
|
316 | * | |||
|
317 | */ | |||
|
318 | ||||
286 | rtems_event_set event_out; |
|
319 | rtems_event_set event_out; | |
287 | rtems_id queue_id; |
|
320 | rtems_id queue_id; | |
288 |
|
321 | |||
289 | init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 ); |
|
322 | init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 ); | |
290 | init_header_continuous_wf3_light_table( headerCWF_F3_light ); |
|
323 | init_header_continuous_wf3_light_table( headerCWF_F3_light ); | |
291 |
|
324 | |||
292 | queue_id = get_pkts_queue_id(); |
|
325 | queue_id = get_pkts_queue_id(); | |
293 |
|
326 | |||
294 | BOOT_PRINTF("in CWF3 ***\n") |
|
327 | BOOT_PRINTF("in CWF3 ***\n") | |
295 |
|
328 | |||
296 | while(1){ |
|
329 | while(1){ | |
297 | // wait for an RTEMS_EVENT |
|
330 | // wait for an RTEMS_EVENT | |
298 | rtems_event_receive( RTEMS_EVENT_0, |
|
331 | rtems_event_receive( RTEMS_EVENT_0, | |
299 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
332 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
300 | PRINTF("send CWF F3 \n") |
|
333 | PRINTF("send CWF F3 \n") | |
301 | #ifdef GSA |
|
334 | #ifdef GSA | |
302 | #else |
|
335 | #else | |
303 | if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { |
|
336 | if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { | |
304 | send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id ); |
|
337 | send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id ); | |
305 | } |
|
338 | } | |
306 | else { |
|
339 | else { | |
307 | send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id ); |
|
340 | send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id ); | |
308 | } |
|
341 | } | |
309 | #endif |
|
342 | #endif | |
310 | } |
|
343 | } | |
311 | } |
|
344 | } | |
312 |
|
345 | |||
313 | rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2 |
|
346 | rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2 | |
314 | { |
|
347 | { | |
|
348 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2. | |||
|
349 | * | |||
|
350 | * @param unused is the starting argument of the RTEMS task | |||
|
351 | * | |||
|
352 | * The following data packet is sent by this function: | |||
|
353 | * - TM_LFR_SCIENCE_BURST_CWF_F2 | |||
|
354 | * - TM_LFR_SCIENCE_SBM2_CWF_F2 | |||
|
355 | * | |||
|
356 | */ | |||
|
357 | ||||
315 | rtems_event_set event_out; |
|
358 | rtems_event_set event_out; | |
316 | rtems_id queue_id; |
|
359 | rtems_id queue_id; | |
317 |
|
360 | |||
318 | init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST ); |
|
361 | init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST ); | |
319 | init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 ); |
|
362 | init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 ); | |
320 |
|
363 | |||
321 | queue_id = get_pkts_queue_id(); |
|
364 | queue_id = get_pkts_queue_id(); | |
322 |
|
365 | |||
323 | BOOT_PRINTF("in CWF2 ***\n") |
|
366 | BOOT_PRINTF("in CWF2 ***\n") | |
324 |
|
367 | |||
325 | while(1){ |
|
368 | while(1){ | |
326 | // wait for an RTEMS_EVENT |
|
369 | // wait for an RTEMS_EVENT | |
327 | rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2, |
|
370 | rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2, | |
328 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
371 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
329 |
|
372 | |||
330 | if (event_out == RTEMS_EVENT_MODE_BURST) |
|
373 | if (event_out == RTEMS_EVENT_MODE_BURST) | |
331 | { |
|
374 | { | |
332 | // F2 |
|
375 | // F2 | |
333 | #ifdef GSA |
|
376 | #ifdef GSA | |
334 | #else |
|
377 | #else | |
335 | if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { |
|
378 | if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { | |
336 | send_waveform_CWF( wf_snap_f2_bis, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); |
|
379 | send_waveform_CWF( wf_snap_f2_bis, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); | |
337 | } |
|
380 | } | |
338 | else { |
|
381 | else { | |
339 | send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); |
|
382 | send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); | |
340 | } |
|
383 | } | |
341 | #endif |
|
384 | #endif | |
342 | } |
|
385 | } | |
343 |
|
386 | |||
344 | else if (event_out == RTEMS_EVENT_MODE_SBM2) |
|
387 | else if (event_out == RTEMS_EVENT_MODE_SBM2) | |
345 | { |
|
388 | { | |
346 | #ifdef GSA |
|
389 | #ifdef GSA | |
347 | #else |
|
390 | #else | |
348 | if (doubleSendCWF2 == 1) |
|
391 | if (doubleSendCWF2 == 1) | |
349 | { |
|
392 | { | |
350 | doubleSendCWF2 = 0; |
|
393 | doubleSendCWF2 = 0; | |
351 | send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); |
|
394 | send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); | |
352 | } |
|
395 | } | |
353 | else if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { |
|
396 | else if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { | |
354 | send_waveform_CWF( wf_snap_f2_bis, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); |
|
397 | send_waveform_CWF( wf_snap_f2_bis, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); | |
355 | } |
|
398 | } | |
356 | else { |
|
399 | else { | |
357 | send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); |
|
400 | send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); | |
358 | } |
|
401 | } | |
359 | param_local.local_sbm2_nb_cwf_sent ++; |
|
402 | param_local.local_sbm2_nb_cwf_sent ++; | |
360 | #endif |
|
403 | #endif | |
361 | } |
|
404 | } | |
362 | else |
|
405 | else | |
363 | { |
|
406 | { | |
364 | PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode) |
|
407 | PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode) | |
365 | } |
|
408 | } | |
366 | } |
|
409 | } | |
367 | } |
|
410 | } | |
368 |
|
411 | |||
369 | rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1 |
|
412 | rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1 | |
370 | { |
|
413 | { | |
|
414 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1. | |||
|
415 | * | |||
|
416 | * @param unused is the starting argument of the RTEMS task | |||
|
417 | * | |||
|
418 | * The following data packet is sent by this function: | |||
|
419 | * - TM_LFR_SCIENCE_SBM1_CWF_F1 | |||
|
420 | * | |||
|
421 | */ | |||
|
422 | ||||
371 | rtems_event_set event_out; |
|
423 | rtems_event_set event_out; | |
372 | rtems_id queue_id; |
|
424 | rtems_id queue_id; | |
373 |
|
425 | |||
374 | init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 ); |
|
426 | init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 ); | |
375 |
|
427 | |||
376 | queue_id = get_pkts_queue_id(); |
|
428 | queue_id = get_pkts_queue_id(); | |
377 |
|
429 | |||
378 | BOOT_PRINTF("in CWF1 ***\n") |
|
430 | BOOT_PRINTF("in CWF1 ***\n") | |
379 |
|
431 | |||
380 | while(1){ |
|
432 | while(1){ | |
381 | // wait for an RTEMS_EVENT |
|
433 | // wait for an RTEMS_EVENT | |
382 | rtems_event_receive( RTEMS_EVENT_MODE_SBM1, |
|
434 | rtems_event_receive( RTEMS_EVENT_MODE_SBM1, | |
383 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
435 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
384 | if (event_out == RTEMS_EVENT_MODE_SBM1) |
|
436 | if (event_out == RTEMS_EVENT_MODE_SBM1) | |
385 | { |
|
437 | { | |
386 | #ifdef GSA |
|
438 | #ifdef GSA | |
387 | #else |
|
439 | #else | |
388 | if (doubleSendCWF1 == 1) |
|
440 | if (doubleSendCWF1 == 1) | |
389 | { |
|
441 | { | |
390 | doubleSendCWF1 = 0; |
|
442 | doubleSendCWF1 = 0; | |
391 | send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); |
|
443 | send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); | |
392 | } |
|
444 | } | |
393 | else if (waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1) { |
|
445 | else if (waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1) { | |
394 | send_waveform_CWF( wf_snap_f1_bis, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); |
|
446 | send_waveform_CWF( wf_snap_f1_bis, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); | |
395 | } |
|
447 | } | |
396 | else { |
|
448 | else { | |
397 | send_waveform_CWF( wf_snap_f1, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); |
|
449 | send_waveform_CWF( wf_snap_f1, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); | |
398 | } |
|
450 | } | |
399 | param_local.local_sbm1_nb_cwf_sent ++; |
|
451 | param_local.local_sbm1_nb_cwf_sent ++; | |
400 | #endif |
|
452 | #endif | |
401 | } |
|
453 | } | |
402 | else |
|
454 | else | |
403 | { |
|
455 | { | |
404 | PRINTF1("in CWF1 *** ERR mode = %d\n", lfrCurrentMode) |
|
456 | PRINTF1("in CWF1 *** ERR mode = %d\n", lfrCurrentMode) | |
405 | } |
|
457 | } | |
406 | } |
|
458 | } | |
407 | } |
|
459 | } | |
408 |
|
460 | |||
409 | //****************** |
|
461 | //****************** | |
410 | // general functions |
|
462 | // general functions | |
411 | void init_waveforms( void ) |
|
463 | void init_waveforms( void ) | |
412 | { |
|
464 | { | |
413 | int i = 0; |
|
465 | int i = 0; | |
414 |
|
466 | |||
415 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) |
|
467 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) | |
416 | { |
|
468 | { | |
417 | //*** |
|
469 | //*** | |
418 | // F0 |
|
470 | // F0 | |
419 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; // |
|
471 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; // | |
420 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; // |
|
472 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; // | |
421 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; // |
|
473 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; // | |
422 |
|
474 | |||
423 | //*** |
|
475 | //*** | |
424 | // F1 |
|
476 | // F1 | |
425 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111; |
|
477 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111; | |
426 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333; |
|
478 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333; | |
427 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; |
|
479 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; | |
428 |
|
480 | |||
429 | //*** |
|
481 | //*** | |
430 | // F2 |
|
482 | // F2 | |
431 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333; |
|
483 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333; | |
432 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; |
|
484 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; | |
433 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; |
|
485 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; | |
434 |
|
486 | |||
435 | //*** |
|
487 | //*** | |
436 | // F3 |
|
488 | // F3 | |
437 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1; |
|
489 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1; | |
438 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2; |
|
490 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2; | |
439 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000; |
|
491 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000; | |
440 | } |
|
492 | } | |
441 | } |
|
493 | } | |
442 |
|
494 | |||
443 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF) |
|
495 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF) | |
444 | { |
|
496 | { | |
445 | unsigned char i; |
|
497 | unsigned char i; | |
446 |
|
498 | |||
447 | for (i=0; i<7; i++) |
|
499 | for (i=0; i<7; i++) | |
448 | { |
|
500 | { | |
449 | headerSWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
501 | headerSWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; | |
450 | headerSWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
502 | headerSWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
451 | headerSWF[ i ].reserved = DEFAULT_RESERVED; |
|
503 | headerSWF[ i ].reserved = DEFAULT_RESERVED; | |
452 | headerSWF[ i ].userApplication = CCSDS_USER_APP; |
|
504 | headerSWF[ i ].userApplication = CCSDS_USER_APP; | |
453 | headerSWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
505 | headerSWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); | |
454 | headerSWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); |
|
506 | headerSWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
455 | if (i == 0) |
|
507 | if (i == 0) | |
456 | { |
|
508 | { | |
457 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; |
|
509 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; | |
458 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8); |
|
510 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8); | |
459 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 ); |
|
511 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 ); | |
460 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
512 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
461 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
513 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
462 | } |
|
514 | } | |
463 | else if (i == 6) |
|
515 | else if (i == 6) | |
464 | { |
|
516 | { | |
465 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; |
|
517 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; | |
466 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_8 >> 8); |
|
518 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_8 >> 8); | |
467 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_8 ); |
|
519 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_8 ); | |
468 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); |
|
520 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); | |
469 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); |
|
521 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); | |
470 | } |
|
522 | } | |
471 | else |
|
523 | else | |
472 | { |
|
524 | { | |
473 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; |
|
525 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; | |
474 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8); |
|
526 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8); | |
475 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 ); |
|
527 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 ); | |
476 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
528 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
477 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
529 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
478 | } |
|
530 | } | |
479 | headerSWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
531 | headerSWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
480 | headerSWF[ i ].pktCnt = DEFAULT_PKTCNT; // PKT_CNT |
|
532 | headerSWF[ i ].pktCnt = DEFAULT_PKTCNT; // PKT_CNT | |
481 | headerSWF[ i ].pktNr = i+1; // PKT_NR |
|
533 | headerSWF[ i ].pktNr = i+1; // PKT_NR | |
482 | // DATA FIELD HEADER |
|
534 | // DATA FIELD HEADER | |
483 | headerSWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
535 | headerSWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
484 | headerSWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
536 | headerSWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
485 | headerSWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
537 | headerSWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
486 | headerSWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; |
|
538 | headerSWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; | |
487 | // AUXILIARY DATA HEADER |
|
539 | // AUXILIARY DATA HEADER | |
488 | headerSWF[ i ].sid = sid; |
|
540 | headerSWF[ i ].sid = sid; | |
489 | headerSWF[ i ].hkBIA = DEFAULT_HKBIA; |
|
541 | headerSWF[ i ].hkBIA = DEFAULT_HKBIA; | |
490 | headerSWF[ i ].time[0] = 0x00; |
|
542 | headerSWF[ i ].time[0] = 0x00; | |
491 | headerSWF[ i ].time[0] = 0x00; |
|
543 | headerSWF[ i ].time[0] = 0x00; | |
492 | headerSWF[ i ].time[0] = 0x00; |
|
544 | headerSWF[ i ].time[0] = 0x00; | |
493 | headerSWF[ i ].time[0] = 0x00; |
|
545 | headerSWF[ i ].time[0] = 0x00; | |
494 | headerSWF[ i ].time[0] = 0x00; |
|
546 | headerSWF[ i ].time[0] = 0x00; | |
495 | headerSWF[ i ].time[0] = 0x00; |
|
547 | headerSWF[ i ].time[0] = 0x00; | |
496 | } |
|
548 | } | |
497 | return LFR_SUCCESSFUL; |
|
549 | return LFR_SUCCESSFUL; | |
498 | } |
|
550 | } | |
499 |
|
551 | |||
500 | int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ) |
|
552 | int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ) | |
501 | { |
|
553 | { | |
502 | unsigned int i; |
|
554 | unsigned int i; | |
503 |
|
555 | |||
504 | for (i=0; i<7; i++) |
|
556 | for (i=0; i<7; i++) | |
505 | { |
|
557 | { | |
506 | headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
558 | headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; | |
507 | headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
559 | headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
508 | headerCWF[ i ].reserved = DEFAULT_RESERVED; |
|
560 | headerCWF[ i ].reserved = DEFAULT_RESERVED; | |
509 | headerCWF[ i ].userApplication = CCSDS_USER_APP; |
|
561 | headerCWF[ i ].userApplication = CCSDS_USER_APP; | |
510 | if ( (sid == SID_SBM1_CWF_F1) || (sid == SID_SBM2_CWF_F2) ) |
|
562 | if ( (sid == SID_SBM1_CWF_F1) || (sid == SID_SBM2_CWF_F2) ) | |
511 | { |
|
563 | { | |
512 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2 >> 8); |
|
564 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2 >> 8); | |
513 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2); |
|
565 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2); | |
514 | } |
|
566 | } | |
515 | else |
|
567 | else | |
516 | { |
|
568 | { | |
517 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
569 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); | |
518 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); |
|
570 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
519 | } |
|
571 | } | |
520 | if (i == 0) |
|
572 | if (i == 0) | |
521 | { |
|
573 | { | |
522 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; |
|
574 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; | |
523 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8); |
|
575 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8); | |
524 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 ); |
|
576 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 ); | |
525 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
577 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
526 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
578 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
527 | } |
|
579 | } | |
528 | else if (i == 6) |
|
580 | else if (i == 6) | |
529 | { |
|
581 | { | |
530 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; |
|
582 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; | |
531 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_8 >> 8); |
|
583 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_8 >> 8); | |
532 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_8 ); |
|
584 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_8 ); | |
533 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); |
|
585 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); | |
534 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); |
|
586 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); | |
535 | } |
|
587 | } | |
536 | else |
|
588 | else | |
537 | { |
|
589 | { | |
538 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; |
|
590 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; | |
539 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8); |
|
591 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8); | |
540 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 ); |
|
592 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 ); | |
541 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
593 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
542 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
594 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
543 | } |
|
595 | } | |
544 | headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
596 | headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
545 | // PKT_CNT |
|
597 | // PKT_CNT | |
546 | // PKT_NR |
|
598 | // PKT_NR | |
547 | // DATA FIELD HEADER |
|
599 | // DATA FIELD HEADER | |
548 | headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
600 | headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
549 | headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
601 | headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
550 | headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
602 | headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
551 | headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; |
|
603 | headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; | |
552 | // AUXILIARY DATA HEADER |
|
604 | // AUXILIARY DATA HEADER | |
553 | headerCWF[ i ].sid = sid; |
|
605 | headerCWF[ i ].sid = sid; | |
554 | headerCWF[ i ].hkBIA = DEFAULT_HKBIA; |
|
606 | headerCWF[ i ].hkBIA = DEFAULT_HKBIA; | |
555 | headerCWF[ i ].time[0] = 0x00; |
|
607 | headerCWF[ i ].time[0] = 0x00; | |
556 | headerCWF[ i ].time[0] = 0x00; |
|
608 | headerCWF[ i ].time[0] = 0x00; | |
557 | headerCWF[ i ].time[0] = 0x00; |
|
609 | headerCWF[ i ].time[0] = 0x00; | |
558 | headerCWF[ i ].time[0] = 0x00; |
|
610 | headerCWF[ i ].time[0] = 0x00; | |
559 | headerCWF[ i ].time[0] = 0x00; |
|
611 | headerCWF[ i ].time[0] = 0x00; | |
560 | headerCWF[ i ].time[0] = 0x00; |
|
612 | headerCWF[ i ].time[0] = 0x00; | |
561 | } |
|
613 | } | |
562 | return LFR_SUCCESSFUL; |
|
614 | return LFR_SUCCESSFUL; | |
563 | } |
|
615 | } | |
564 |
|
616 | |||
565 | int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ) |
|
617 | int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ) | |
566 | { |
|
618 | { | |
567 | unsigned int i; |
|
619 | unsigned int i; | |
568 |
|
620 | |||
569 | for (i=0; i<7; i++) |
|
621 | for (i=0; i<7; i++) | |
570 | { |
|
622 | { | |
571 | headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
623 | headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; | |
572 | headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
624 | headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
573 | headerCWF[ i ].reserved = DEFAULT_RESERVED; |
|
625 | headerCWF[ i ].reserved = DEFAULT_RESERVED; | |
574 | headerCWF[ i ].userApplication = CCSDS_USER_APP; |
|
626 | headerCWF[ i ].userApplication = CCSDS_USER_APP; | |
575 |
|
627 | |||
576 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
628 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); | |
577 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); |
|
629 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
578 | if (i == 0) |
|
630 | if (i == 0) | |
579 | { |
|
631 | { | |
580 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; |
|
632 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; | |
581 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8); |
|
633 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8); | |
582 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 ); |
|
634 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 ); | |
583 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
635 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
584 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
636 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
585 | } |
|
637 | } | |
586 | else if (i == 6) |
|
638 | else if (i == 6) | |
587 | { |
|
639 | { | |
588 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; |
|
640 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; | |
589 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 >> 8); |
|
641 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 >> 8); | |
590 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 ); |
|
642 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 ); | |
591 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); |
|
643 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); | |
592 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); |
|
644 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); | |
593 | } |
|
645 | } | |
594 | else |
|
646 | else | |
595 | { |
|
647 | { | |
596 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; |
|
648 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; | |
597 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8); |
|
649 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8); | |
598 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 ); |
|
650 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 ); | |
599 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
651 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
600 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
652 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
601 | } |
|
653 | } | |
602 | headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
654 | headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
603 | // DATA FIELD HEADER |
|
655 | // DATA FIELD HEADER | |
604 | headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
656 | headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
605 | headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
657 | headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
606 | headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
658 | headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
607 | headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; |
|
659 | headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; | |
608 | // AUXILIARY DATA HEADER |
|
660 | // AUXILIARY DATA HEADER | |
609 | headerCWF[ i ].sid = SID_NORM_CWF_F3; |
|
661 | headerCWF[ i ].sid = SID_NORM_CWF_F3; | |
610 | headerCWF[ i ].hkBIA = DEFAULT_HKBIA; |
|
662 | headerCWF[ i ].hkBIA = DEFAULT_HKBIA; | |
611 | headerCWF[ i ].time[0] = 0x00; |
|
663 | headerCWF[ i ].time[0] = 0x00; | |
612 | headerCWF[ i ].time[0] = 0x00; |
|
664 | headerCWF[ i ].time[0] = 0x00; | |
613 | headerCWF[ i ].time[0] = 0x00; |
|
665 | headerCWF[ i ].time[0] = 0x00; | |
614 | headerCWF[ i ].time[0] = 0x00; |
|
666 | headerCWF[ i ].time[0] = 0x00; | |
615 | headerCWF[ i ].time[0] = 0x00; |
|
667 | headerCWF[ i ].time[0] = 0x00; | |
616 | headerCWF[ i ].time[0] = 0x00; |
|
668 | headerCWF[ i ].time[0] = 0x00; | |
617 | } |
|
669 | } | |
618 | return LFR_SUCCESSFUL; |
|
670 | return LFR_SUCCESSFUL; | |
619 | } |
|
671 | } | |
620 |
|
672 | |||
621 | void reset_waveforms( void ) |
|
673 | void reset_waveforms( void ) | |
622 | { |
|
674 | { | |
623 | int i = 0; |
|
675 | int i = 0; | |
624 |
|
676 | |||
625 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) |
|
677 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) | |
626 | { |
|
678 | { | |
627 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x10002000; |
|
679 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x10002000; | |
628 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000; |
|
680 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000; | |
629 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000; |
|
681 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000; | |
630 |
|
682 | |||
631 | //*** |
|
683 | //*** | |
632 | // F1 |
|
684 | // F1 | |
633 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x1000f000; |
|
685 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x1000f000; | |
634 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0xf0001000; |
|
686 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0xf0001000; | |
635 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000; |
|
687 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000; | |
636 |
|
688 | |||
637 | //*** |
|
689 | //*** | |
638 | // F2 |
|
690 | // F2 | |
639 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x40008000; |
|
691 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x40008000; | |
640 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000; |
|
692 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000; | |
641 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x10002000; |
|
693 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x10002000; | |
642 |
|
694 | |||
643 | //*** |
|
695 | //*** | |
644 | // F3 |
|
696 | // F3 | |
645 | /*wf_cont_f3[ i* NB_WORDS_SWF_BLK + 0 ] = build_value( i, i ); // v and 1 |
|
697 | /*wf_cont_f3[ i* NB_WORDS_SWF_BLK + 0 ] = build_value( i, i ); // v and 1 | |
646 | wf_cont_f3[ i* NB_WORDS_SWF_BLK + 1 ] = build_value( i, i ); // e2 and b1 |
|
698 | wf_cont_f3[ i* NB_WORDS_SWF_BLK + 1 ] = build_value( i, i ); // e2 and b1 | |
647 | wf_cont_f3[ i* NB_WORDS_SWF_BLK + 2 ] = build_value( i, i ); // b2 and b3*/ |
|
699 | wf_cont_f3[ i* NB_WORDS_SWF_BLK + 2 ] = build_value( i, i ); // b2 and b3*/ | |
648 | } |
|
700 | } | |
649 | } |
|
701 | } | |
650 |
|
702 | |||
651 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, |
|
703 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, | |
652 | Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ) |
|
704 | Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ) | |
653 | { |
|
705 | { | |
654 | /** This function sends SWF CCSDS packets (F2, F1 or F0). |
|
706 | /** This function sends SWF CCSDS packets (F2, F1 or F0). | |
655 | * |
|
707 | * | |
656 | * @param waveform points to the buffer containing the data that will be send. |
|
708 | * @param waveform points to the buffer containing the data that will be send. | |
657 | * @param sid is the source identifier of the data that will be sent. |
|
709 | * @param sid is the source identifier of the data that will be sent. | |
658 | * @param headerSWF points to a table of headers that have been prepared for the data transmission. |
|
710 | * @param headerSWF points to a table of headers that have been prepared for the data transmission. | |
659 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures |
|
711 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures | |
660 | * contain information to setup the transmission of the data packets. |
|
712 | * contain information to setup the transmission of the data packets. | |
661 | * |
|
713 | * | |
662 | * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks. |
|
714 | * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks. | |
663 | * |
|
715 | * | |
664 | */ |
|
716 | */ | |
665 |
|
717 | |||
666 | unsigned int i; |
|
718 | unsigned int i; | |
667 | int ret; |
|
719 | int ret; | |
668 | rtems_status_code status; |
|
720 | rtems_status_code status; | |
669 | spw_ioctl_pkt_send spw_ioctl_send_SWF; |
|
721 | spw_ioctl_pkt_send spw_ioctl_send_SWF; | |
670 |
|
722 | |||
671 | spw_ioctl_send_SWF.hlen = TM_HEADER_LEN + 4 + 12; // + 4 is for the protocole extra header, + 12 is for the auxiliary header |
|
723 | spw_ioctl_send_SWF.hlen = TM_HEADER_LEN + 4 + 12; // + 4 is for the protocole extra header, + 12 is for the auxiliary header | |
672 | spw_ioctl_send_SWF.options = 0; |
|
724 | spw_ioctl_send_SWF.options = 0; | |
673 |
|
725 | |||
674 | ret = LFR_DEFAULT; |
|
726 | ret = LFR_DEFAULT; | |
675 |
|
727 | |||
676 | for (i=0; i<7; i++) // send waveform |
|
728 | for (i=0; i<7; i++) // send waveform | |
677 | { |
|
729 | { | |
678 | spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; |
|
730 | spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; | |
679 | spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ]; |
|
731 | spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ]; | |
680 | // BUILD THE DATA |
|
732 | // BUILD THE DATA | |
681 | if (i==6) { |
|
733 | if (i==6) { | |
682 | spw_ioctl_send_SWF.dlen = 8 * NB_BYTES_SWF_BLK; |
|
734 | spw_ioctl_send_SWF.dlen = 8 * NB_BYTES_SWF_BLK; | |
683 | } |
|
735 | } | |
684 | else { |
|
736 | else { | |
685 | spw_ioctl_send_SWF.dlen = 340 * NB_BYTES_SWF_BLK; |
|
737 | spw_ioctl_send_SWF.dlen = 340 * NB_BYTES_SWF_BLK; | |
686 | } |
|
738 | } | |
687 | // SET PACKET TIME |
|
739 | // SET PACKET TIME | |
688 | headerSWF[ i ].time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
740 | headerSWF[ i ].time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
689 | headerSWF[ i ].time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
741 | headerSWF[ i ].time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
690 | headerSWF[ i ].time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
742 | headerSWF[ i ].time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
691 | headerSWF[ i ].time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
743 | headerSWF[ i ].time[3] = (unsigned char) (time_management_regs->coarse_time); | |
692 | headerSWF[ i ].time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
744 | headerSWF[ i ].time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
693 | headerSWF[ i ].time[5] = (unsigned char) (time_management_regs->fine_time); |
|
745 | headerSWF[ i ].time[5] = (unsigned char) (time_management_regs->fine_time); | |
694 | headerSWF[ i ].acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
746 | headerSWF[ i ].acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
695 | headerSWF[ i ].acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
747 | headerSWF[ i ].acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
696 | headerSWF[ i ].acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
748 | headerSWF[ i ].acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
697 | headerSWF[ i ].acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); |
|
749 | headerSWF[ i ].acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); | |
698 | headerSWF[ i ].acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
750 | headerSWF[ i ].acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
699 | headerSWF[ i ].acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); |
|
751 | headerSWF[ i ].acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); | |
700 | // SEND PACKET |
|
752 | // SEND PACKET | |
701 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_SWF, ACTION_MSG_SPW_IOCTL_SEND_SIZE); |
|
753 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_SWF, ACTION_MSG_SPW_IOCTL_SEND_SIZE); | |
702 | if (status != RTEMS_SUCCESSFUL) { |
|
754 | if (status != RTEMS_SUCCESSFUL) { | |
703 | printf("%d-%d, ERR %d\n", sid, i, (int) status); |
|
755 | printf("%d-%d, ERR %d\n", sid, i, (int) status); | |
704 | ret = LFR_DEFAULT; |
|
756 | ret = LFR_DEFAULT; | |
705 | } |
|
757 | } | |
706 | rtems_task_wake_after(TIME_BETWEEN_TWO_SWF_PACKETS); // 300 ms between each packet => 7 * 3 = 21 packets => 6.3 seconds |
|
758 | rtems_task_wake_after(TIME_BETWEEN_TWO_SWF_PACKETS); // 300 ms between each packet => 7 * 3 = 21 packets => 6.3 seconds | |
707 | } |
|
759 | } | |
708 |
|
760 | |||
709 | return ret; |
|
761 | return ret; | |
710 | } |
|
762 | } | |
711 |
|
763 | |||
712 | int send_waveform_CWF(volatile int *waveform, unsigned int sid, |
|
764 | int send_waveform_CWF(volatile int *waveform, unsigned int sid, | |
713 | Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id) |
|
765 | Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id) | |
714 | { |
|
766 | { | |
715 | /** This function sends CWF CCSDS packets (F2, F1 or F0). |
|
767 | /** This function sends CWF CCSDS packets (F2, F1 or F0). | |
716 | * |
|
768 | * | |
717 | * @param waveform points to the buffer containing the data that will be send. |
|
769 | * @param waveform points to the buffer containing the data that will be send. | |
718 | * @param sid is the source identifier of the data that will be sent. |
|
770 | * @param sid is the source identifier of the data that will be sent. | |
719 | * @param headerCWF points to a table of headers that have been prepared for the data transmission. |
|
771 | * @param headerCWF points to a table of headers that have been prepared for the data transmission. | |
720 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures |
|
772 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures | |
721 | * contain information to setup the transmission of the data packets. |
|
773 | * contain information to setup the transmission of the data packets. | |
722 | * |
|
774 | * | |
723 | * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks. |
|
775 | * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks. | |
724 | * |
|
776 | * | |
725 | */ |
|
777 | */ | |
726 |
|
778 | |||
727 | unsigned int i; |
|
779 | unsigned int i; | |
728 | int ret; |
|
780 | int ret; | |
729 | rtems_status_code status; |
|
781 | rtems_status_code status; | |
730 | spw_ioctl_pkt_send spw_ioctl_send_CWF; |
|
782 | spw_ioctl_pkt_send spw_ioctl_send_CWF; | |
731 |
|
783 | |||
732 | spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header |
|
784 | spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header | |
733 | spw_ioctl_send_CWF.options = 0; |
|
785 | spw_ioctl_send_CWF.options = 0; | |
734 |
|
786 | |||
735 | ret = LFR_DEFAULT; |
|
787 | ret = LFR_DEFAULT; | |
736 |
|
788 | |||
737 | for (i=0; i<7; i++) // send waveform |
|
789 | for (i=0; i<7; i++) // send waveform | |
738 | { |
|
790 | { | |
739 | int coarseTime = 0x00; |
|
791 | int coarseTime = 0x00; | |
740 | int fineTime = 0x00; |
|
792 | int fineTime = 0x00; | |
741 | spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; |
|
793 | spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; | |
742 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; |
|
794 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; | |
743 | // BUILD THE DATA |
|
795 | // BUILD THE DATA | |
744 | if (i==6) { |
|
796 | if (i==6) { | |
745 | spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_SWF_BLK; |
|
797 | spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_SWF_BLK; | |
746 | } |
|
798 | } | |
747 | else { |
|
799 | else { | |
748 | spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_SWF_BLK; |
|
800 | spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_SWF_BLK; | |
749 | } |
|
801 | } | |
750 | // SET PACKET TIME |
|
802 | // SET PACKET TIME | |
751 | coarseTime = time_management_regs->coarse_time; |
|
803 | coarseTime = time_management_regs->coarse_time; | |
752 | fineTime = time_management_regs->fine_time; |
|
804 | fineTime = time_management_regs->fine_time; | |
753 | headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24); |
|
805 | headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24); | |
754 | headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16); |
|
806 | headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16); | |
755 | headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8); |
|
807 | headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8); | |
756 | headerCWF[ i ].time[3] = (unsigned char) (coarseTime); |
|
808 | headerCWF[ i ].time[3] = (unsigned char) (coarseTime); | |
757 | headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8); |
|
809 | headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8); | |
758 | headerCWF[ i ].time[5] = (unsigned char) (fineTime); |
|
810 | headerCWF[ i ].time[5] = (unsigned char) (fineTime); | |
759 | headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24); |
|
811 | headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24); | |
760 | headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16); |
|
812 | headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16); | |
761 | headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8); |
|
813 | headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8); | |
762 | headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime); |
|
814 | headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime); | |
763 | headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8); |
|
815 | headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8); | |
764 | headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime); |
|
816 | headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime); | |
765 | // SEND PACKET |
|
817 | // SEND PACKET | |
766 | if (sid == SID_NORM_CWF_F3) |
|
818 | if (sid == SID_NORM_CWF_F3) | |
767 | { |
|
819 | { | |
768 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); |
|
820 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); | |
769 | if (status != RTEMS_SUCCESSFUL) { |
|
821 | if (status != RTEMS_SUCCESSFUL) { | |
770 | printf("%d-%d, ERR %d\n", sid, i, (int) status); |
|
822 | printf("%d-%d, ERR %d\n", sid, i, (int) status); | |
771 | ret = LFR_DEFAULT; |
|
823 | ret = LFR_DEFAULT; | |
772 | } |
|
824 | } | |
773 | rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS); |
|
825 | rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS); | |
774 | } |
|
826 | } | |
775 | else |
|
827 | else | |
776 | { |
|
828 | { | |
777 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); |
|
829 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); | |
778 | if (status != RTEMS_SUCCESSFUL) { |
|
830 | if (status != RTEMS_SUCCESSFUL) { | |
779 | printf("%d-%d, ERR %d\n", sid, i, (int) status); |
|
831 | printf("%d-%d, ERR %d\n", sid, i, (int) status); | |
780 | ret = LFR_DEFAULT; |
|
832 | ret = LFR_DEFAULT; | |
781 | } |
|
833 | } | |
782 | } |
|
834 | } | |
783 | } |
|
835 | } | |
784 |
|
836 | |||
785 | return ret; |
|
837 | return ret; | |
786 | } |
|
838 | } | |
787 |
|
839 | |||
788 | int send_waveform_CWF3_light(volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id) |
|
840 | int send_waveform_CWF3_light(volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id) | |
789 | { |
|
841 | { | |
790 | /** This function sends CWF_F3 CCSDS packets without the b1, b2 and b3 data. |
|
842 | /** This function sends CWF_F3 CCSDS packets without the b1, b2 and b3 data. | |
791 | * |
|
843 | * | |
792 | * @param waveform points to the buffer containing the data that will be send. |
|
844 | * @param waveform points to the buffer containing the data that will be send. | |
793 | * @param headerCWF points to a table of headers that have been prepared for the data transmission. |
|
845 | * @param headerCWF points to a table of headers that have been prepared for the data transmission. | |
794 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures |
|
846 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures | |
795 | * contain information to setup the transmission of the data packets. |
|
847 | * contain information to setup the transmission of the data packets. | |
796 | * |
|
848 | * | |
797 | * By default, CWF_F3 packet are send without the b1, b2 and b3 data. This function rebuilds a data buffer |
|
849 | * By default, CWF_F3 packet are send without the b1, b2 and b3 data. This function rebuilds a data buffer | |
798 | * from the incoming data and sends it in 7 packets, 6 containing 340 blocks and 1 one containing 8 blocks. |
|
850 | * from the incoming data and sends it in 7 packets, 6 containing 340 blocks and 1 one containing 8 blocks. | |
799 | * |
|
851 | * | |
800 | */ |
|
852 | */ | |
801 |
|
853 | |||
802 | unsigned int i; |
|
854 | unsigned int i; | |
803 | int ret; |
|
855 | int ret; | |
804 | rtems_status_code status; |
|
856 | rtems_status_code status; | |
805 | spw_ioctl_pkt_send spw_ioctl_send_CWF; |
|
857 | spw_ioctl_pkt_send spw_ioctl_send_CWF; | |
806 | char *sample; |
|
858 | char *sample; | |
807 |
|
859 | |||
808 | spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header |
|
860 | spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header | |
809 | spw_ioctl_send_CWF.options = 0; |
|
861 | spw_ioctl_send_CWF.options = 0; | |
810 |
|
862 | |||
811 | ret = LFR_DEFAULT; |
|
863 | ret = LFR_DEFAULT; | |
812 |
|
864 | |||
813 | //********************** |
|
865 | //********************** | |
814 | // BUILD CWF3_light DATA |
|
866 | // BUILD CWF3_light DATA | |
815 | for ( i=0; i< 2048; i++) |
|
867 | for ( i=0; i< 2048; i++) | |
816 | { |
|
868 | { | |
817 | sample = (char*) &waveform[ i * NB_WORDS_SWF_BLK ]; |
|
869 | sample = (char*) &waveform[ i * NB_WORDS_SWF_BLK ]; | |
818 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) ] = sample[ 0 ]; |
|
870 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) ] = sample[ 0 ]; | |
819 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 1 ] = sample[ 1 ]; |
|
871 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 1 ] = sample[ 1 ]; | |
820 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 2 ] = sample[ 2 ]; |
|
872 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 2 ] = sample[ 2 ]; | |
821 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 3 ] = sample[ 3 ]; |
|
873 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 3 ] = sample[ 3 ]; | |
822 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 4 ] = sample[ 4 ]; |
|
874 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 4 ] = sample[ 4 ]; | |
823 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 5 ] = sample[ 5 ]; |
|
875 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 5 ] = sample[ 5 ]; | |
824 | } |
|
876 | } | |
825 |
|
877 | |||
826 | //********************* |
|
878 | //********************* | |
827 | // SEND CWF3_light DATA |
|
879 | // SEND CWF3_light DATA | |
828 |
|
880 | |||
829 | for (i=0; i<7; i++) // send waveform |
|
881 | for (i=0; i<7; i++) // send waveform | |
830 | { |
|
882 | { | |
831 | int coarseTime = 0x00; |
|
883 | int coarseTime = 0x00; | |
832 | int fineTime = 0x00; |
|
884 | int fineTime = 0x00; | |
833 | spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ]; |
|
885 | spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ]; | |
834 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; |
|
886 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; | |
835 | // BUILD THE DATA |
|
887 | // BUILD THE DATA | |
836 | if ( i == WFRM_INDEX_OF_LAST_PACKET ) { |
|
888 | if ( i == WFRM_INDEX_OF_LAST_PACKET ) { | |
837 | spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_CWF3_LIGHT_BLK; |
|
889 | spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_CWF3_LIGHT_BLK; | |
838 | } |
|
890 | } | |
839 | else { |
|
891 | else { | |
840 | spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_CWF3_LIGHT_BLK; |
|
892 | spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_CWF3_LIGHT_BLK; | |
841 | } |
|
893 | } | |
842 | // SET PACKET TIME |
|
894 | // SET PACKET TIME | |
843 | coarseTime = time_management_regs->coarse_time; |
|
895 | coarseTime = time_management_regs->coarse_time; | |
844 | fineTime = time_management_regs->fine_time; |
|
896 | fineTime = time_management_regs->fine_time; | |
845 | headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24); |
|
897 | headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24); | |
846 | headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16); |
|
898 | headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16); | |
847 | headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8); |
|
899 | headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8); | |
848 | headerCWF[ i ].time[3] = (unsigned char) (coarseTime); |
|
900 | headerCWF[ i ].time[3] = (unsigned char) (coarseTime); | |
849 | headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8); |
|
901 | headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8); | |
850 | headerCWF[ i ].time[5] = (unsigned char) (fineTime); |
|
902 | headerCWF[ i ].time[5] = (unsigned char) (fineTime); | |
851 | headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24); |
|
903 | headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24); | |
852 | headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16); |
|
904 | headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16); | |
853 | headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8); |
|
905 | headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8); | |
854 | headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime); |
|
906 | headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime); | |
855 | headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8); |
|
907 | headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8); | |
856 | headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime); |
|
908 | headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime); | |
857 | // SEND PACKET |
|
909 | // SEND PACKET | |
858 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); |
|
910 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); | |
859 | if (status != RTEMS_SUCCESSFUL) { |
|
911 | if (status != RTEMS_SUCCESSFUL) { | |
860 | printf("%d-%d, ERR %d\n", SID_NORM_CWF_F3, i, (int) status); |
|
912 | printf("%d-%d, ERR %d\n", SID_NORM_CWF_F3, i, (int) status); | |
861 | ret = LFR_DEFAULT; |
|
913 | ret = LFR_DEFAULT; | |
862 | } |
|
914 | } | |
863 | rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS); |
|
915 | rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS); | |
864 | } |
|
916 | } | |
865 |
|
917 | |||
866 | return ret; |
|
918 | return ret; | |
867 | } |
|
919 | } | |
868 |
|
920 | |||
869 |
|
921 | |||
870 | //************** |
|
922 | //************** | |
871 | // wfp registers |
|
923 | // wfp registers | |
872 | void set_wfp_data_shaping() |
|
924 | void set_wfp_data_shaping() | |
873 | { |
|
925 | { | |
874 | /** This function sets the data_shaping register of the waveform picker module. |
|
926 | /** This function sets the data_shaping register of the waveform picker module. | |
875 | * |
|
927 | * | |
876 | * The value is read from one field of the parameter_dump_packet structure:\n |
|
928 | * The value is read from one field of the parameter_dump_packet structure:\n | |
877 | * bw_sp0_sp1_r0_r1 |
|
929 | * bw_sp0_sp1_r0_r1 | |
878 | * |
|
930 | * | |
879 | */ |
|
931 | */ | |
880 |
|
932 | |||
881 | unsigned char data_shaping; |
|
933 | unsigned char data_shaping; | |
882 |
|
934 | |||
883 | // get the parameters for the data shaping [BW SP0 SP1 R0 R1] in sy_lfr_common1 and configure the register |
|
935 | // get the parameters for the data shaping [BW SP0 SP1 R0 R1] in sy_lfr_common1 and configure the register | |
884 | // waveform picker : [R1 R0 SP1 SP0 BW] |
|
936 | // waveform picker : [R1 R0 SP1 SP0 BW] | |
885 |
|
937 | |||
886 | data_shaping = parameter_dump_packet.bw_sp0_sp1_r0_r1; |
|
938 | data_shaping = parameter_dump_packet.bw_sp0_sp1_r0_r1; | |
887 |
|
939 | |||
888 | #ifdef GSA |
|
940 | #ifdef GSA | |
889 | #else |
|
941 | #else | |
890 | waveform_picker_regs->data_shaping = |
|
942 | waveform_picker_regs->data_shaping = | |
891 | ( (data_shaping & 0x10) >> 4 ) // BW |
|
943 | ( (data_shaping & 0x10) >> 4 ) // BW | |
892 | + ( (data_shaping & 0x08) >> 2 ) // SP0 |
|
944 | + ( (data_shaping & 0x08) >> 2 ) // SP0 | |
893 | + ( (data_shaping & 0x04) ) // SP1 |
|
945 | + ( (data_shaping & 0x04) ) // SP1 | |
894 | + ( (data_shaping & 0x02) << 2 ) // R0 |
|
946 | + ( (data_shaping & 0x02) << 2 ) // R0 | |
895 | + ( (data_shaping & 0x01) << 4 ); // R1 |
|
947 | + ( (data_shaping & 0x01) << 4 ); // R1 | |
896 | #endif |
|
948 | #endif | |
897 | } |
|
949 | } | |
898 |
|
950 | |||
899 | char set_wfp_delta_snapshot() |
|
951 | char set_wfp_delta_snapshot() | |
900 | { |
|
952 | { | |
901 | /** This function sets the delta_snapshot register of the waveform picker module. |
|
953 | /** This function sets the delta_snapshot register of the waveform picker module. | |
902 | * |
|
954 | * | |
903 |
* The value is read from two (unsigned char) of the parameter_dump_packet structure: |
|
955 | * The value is read from two (unsigned char) of the parameter_dump_packet structure: | |
904 |
* sy_lfr_n_swf_p[0] |
|
956 | * - sy_lfr_n_swf_p[0] | |
905 | * sy_lfr_n_swf_p[1] |
|
957 | * - sy_lfr_n_swf_p[1] | |
906 | * |
|
958 | * | |
907 | */ |
|
959 | */ | |
908 |
|
960 | |||
909 | char ret; |
|
961 | char ret; | |
910 | unsigned int delta_snapshot; |
|
962 | unsigned int delta_snapshot; | |
911 | unsigned int aux; |
|
963 | unsigned int aux; | |
912 |
|
964 | |||
913 | aux = 0; |
|
965 | aux = 0; | |
914 | ret = LFR_DEFAULT; |
|
966 | ret = LFR_DEFAULT; | |
915 |
|
967 | |||
916 | delta_snapshot = parameter_dump_packet.sy_lfr_n_swf_p[0]*256 |
|
968 | delta_snapshot = parameter_dump_packet.sy_lfr_n_swf_p[0]*256 | |
917 | + parameter_dump_packet.sy_lfr_n_swf_p[1]; |
|
969 | + parameter_dump_packet.sy_lfr_n_swf_p[1]; | |
918 |
|
970 | |||
919 | #ifdef GSA |
|
971 | #ifdef GSA | |
920 | #else |
|
972 | #else | |
921 | if ( delta_snapshot < MIN_DELTA_SNAPSHOT ) |
|
973 | if ( delta_snapshot < MIN_DELTA_SNAPSHOT ) | |
922 | { |
|
974 | { | |
923 | aux = MIN_DELTA_SNAPSHOT; |
|
975 | aux = MIN_DELTA_SNAPSHOT; | |
924 | ret = LFR_DEFAULT; |
|
976 | ret = LFR_DEFAULT; | |
925 | } |
|
977 | } | |
926 | else |
|
978 | else | |
927 | { |
|
979 | { | |
928 | aux = delta_snapshot ; |
|
980 | aux = delta_snapshot ; | |
929 | ret = LFR_SUCCESSFUL; |
|
981 | ret = LFR_SUCCESSFUL; | |
930 | } |
|
982 | } | |
931 | waveform_picker_regs->delta_snapshot = aux; // max 2 bytes |
|
983 | waveform_picker_regs->delta_snapshot = aux - 1; // max 2 bytes | |
932 | #endif |
|
984 | #endif | |
933 |
|
985 | |||
934 | return ret; |
|
986 | return ret; | |
935 | } |
|
987 | } | |
936 |
|
988 | |||
937 | void set_wfp_burst_enable_register( unsigned char mode) |
|
989 | void set_wfp_burst_enable_register( unsigned char mode) | |
938 | { |
|
990 | { | |
939 | /** This function sets the waveform picker burst_enable register depending on the mode. |
|
991 | /** This function sets the waveform picker burst_enable register depending on the mode. | |
940 | * |
|
992 | * | |
941 | * @param mode is the LFR mode to launch. |
|
993 | * @param mode is the LFR mode to launch. | |
942 | * |
|
994 | * | |
943 | * The burst bits shall be before the enable bits. |
|
995 | * The burst bits shall be before the enable bits. | |
944 | * |
|
996 | * | |
945 | */ |
|
997 | */ | |
946 |
|
998 | |||
947 | #ifdef GSA |
|
999 | #ifdef GSA | |
948 | #else |
|
1000 | #else | |
949 | // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0 |
|
1001 | // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0 | |
950 | // the burst bits shall be set first, before the enable bits |
|
1002 | // the burst bits shall be set first, before the enable bits | |
951 | switch(mode) { |
|
1003 | switch(mode) { | |
952 | case(LFR_MODE_NORMAL): |
|
1004 | case(LFR_MODE_NORMAL): | |
953 | waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enable |
|
1005 | waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enable | |
954 | waveform_picker_regs->burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0 |
|
1006 | waveform_picker_regs->burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0 | |
955 | break; |
|
1007 | break; | |
956 | case(LFR_MODE_BURST): |
|
1008 | case(LFR_MODE_BURST): | |
957 | waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled |
|
1009 | waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled | |
958 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x04; // [0100] enable f2 |
|
1010 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x04; // [0100] enable f2 | |
959 | break; |
|
1011 | break; | |
960 | case(LFR_MODE_SBM1): |
|
1012 | case(LFR_MODE_SBM1): | |
961 | waveform_picker_regs->burst_enable = 0x20; // [0010 0000] f1 burst enabled |
|
1013 | waveform_picker_regs->burst_enable = 0x20; // [0010 0000] f1 burst enabled | |
962 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 |
|
1014 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 | |
963 | break; |
|
1015 | break; | |
964 | case(LFR_MODE_SBM2): |
|
1016 | case(LFR_MODE_SBM2): | |
965 | waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled |
|
1017 | waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled | |
966 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 |
|
1018 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 | |
967 | break; |
|
1019 | break; | |
968 | default: |
|
1020 | default: | |
969 | waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled |
|
1021 | waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled | |
970 | break; |
|
1022 | break; | |
971 | } |
|
1023 | } | |
972 | #endif |
|
1024 | #endif | |
973 | } |
|
1025 | } | |
974 |
|
1026 | |||
975 | void reset_wfp_burst_enable() |
|
1027 | void reset_wfp_burst_enable() | |
976 | { |
|
1028 | { | |
977 | /** This function resets the waveform picker burst_enable register. |
|
1029 | /** This function resets the waveform picker burst_enable register. | |
978 | * |
|
1030 | * | |
979 | * The burst bits [f2 f1 f0] and the enable bits [f3 f2 f1 f0] are set to 0. |
|
1031 | * The burst bits [f2 f1 f0] and the enable bits [f3 f2 f1 f0] are set to 0. | |
980 | * |
|
1032 | * | |
981 | */ |
|
1033 | */ | |
982 |
|
1034 | |||
983 | #ifdef GSA |
|
1035 | #ifdef GSA | |
984 | #else |
|
1036 | #else | |
985 | waveform_picker_regs->burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 |
|
1037 | waveform_picker_regs->burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 | |
986 | #endif |
|
1038 | #endif | |
987 | } |
|
1039 | } | |
988 |
|
1040 | |||
989 | void reset_wfp_status() |
|
1041 | void reset_wfp_status() | |
990 | { |
|
1042 | { | |
991 | /** This function resets the waveform picker status register. |
|
1043 | /** This function resets the waveform picker status register. | |
992 | * |
|
1044 | * | |
993 | * All status bits are set to 0 [new_err full_err full]. |
|
1045 | * All status bits are set to 0 [new_err full_err full]. | |
994 | * |
|
1046 | * | |
995 | */ |
|
1047 | */ | |
996 |
|
1048 | |||
997 | #ifdef GSA |
|
1049 | #ifdef GSA | |
998 | #else |
|
1050 | #else | |
999 | waveform_picker_regs->status = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 |
|
1051 | waveform_picker_regs->status = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 | |
1000 | #endif |
|
1052 | #endif | |
1001 | } |
|
1053 | } | |
1002 |
|
1054 | |||
1003 | void reset_waveform_picker_regs() |
|
1055 | void reset_waveform_picker_regs() | |
1004 | { |
|
1056 | { | |
1005 | /** This function resets the waveform picker module registers. |
|
1057 | /** This function resets the waveform picker module registers. | |
1006 | * |
|
1058 | * | |
1007 | * The registers affected by this function are located at the following offset addresses: |
|
1059 | * The registers affected by this function are located at the following offset addresses: | |
1008 | * - 0x00 data_shaping |
|
1060 | * - 0x00 data_shaping | |
1009 | * - 0x04 burst_enable |
|
1061 | * - 0x04 burst_enable | |
1010 | * - 0x08 addr_data_f0 |
|
1062 | * - 0x08 addr_data_f0 | |
1011 | * - 0x0C addr_data_f1 |
|
1063 | * - 0x0C addr_data_f1 | |
1012 | * - 0x10 addr_data_f2 |
|
1064 | * - 0x10 addr_data_f2 | |
1013 | * - 0x14 addr_data_f3 |
|
1065 | * - 0x14 addr_data_f3 | |
1014 | * - 0x18 status |
|
1066 | * - 0x18 status | |
1015 | * - 0x1C delta_snapshot |
|
1067 | * - 0x1C delta_snapshot | |
1016 | * - 0x20 delta_f2_f1 |
|
1068 | * - 0x20 delta_f2_f1 | |
1017 | * - 0x24 delta_f2_f0 |
|
1069 | * - 0x24 delta_f2_f0 | |
1018 | * - 0x28 nb_burst |
|
1070 | * - 0x28 nb_burst | |
1019 | * - 0x2C nb_snapshot |
|
1071 | * - 0x2C nb_snapshot | |
1020 | * |
|
1072 | * | |
1021 | */ |
|
1073 | */ | |
1022 |
|
1074 | |||
1023 | #ifdef GSA |
|
1075 | #ifdef GSA | |
1024 | #else |
|
1076 | #else | |
1025 | set_wfp_data_shaping(); |
|
1077 | set_wfp_data_shaping(); | |
1026 | reset_wfp_burst_enable(); |
|
1078 | reset_wfp_burst_enable(); | |
1027 | waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // |
|
1079 | waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // | |
1028 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); // |
|
1080 | waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); // | |
1029 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); // |
|
1081 | waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); // | |
1030 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); // |
|
1082 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); // | |
1031 | set_wfp_delta_snapshot(); // time in seconds between two snapshots |
|
1083 | set_wfp_delta_snapshot(); // time in seconds between two snapshots | |
1032 | waveform_picker_regs->delta_f2_f1 = 0xffff; // 0x16800 => 92160 (max 4 bytes) |
|
1084 | waveform_picker_regs->delta_f2_f1 = 0xffff; // 0x16800 => 92160 (max 4 bytes) | |
1033 | waveform_picker_regs->delta_f2_f0 = 0x17c00; // 97 280 (max 5 bytes) |
|
1085 | waveform_picker_regs->delta_f2_f0 = 0x17c00; // 97 280 (max 5 bytes) | |
1034 | waveform_picker_regs->nb_burst_available = 0x180; // max 3 bytes, size of the buffer in burst (1 burst = 16 x 4 octets) |
|
1086 | waveform_picker_regs->nb_burst_available = 0x180; // max 3 bytes, size of the buffer in burst (1 burst = 16 x 4 octets) | |
1035 | waveform_picker_regs->nb_snapshot_param = 0x7ff; // max 3 octets, 2048 - 1 |
|
1087 | waveform_picker_regs->nb_snapshot_param = 0x7ff; // max 3 octets, 2048 - 1 | |
1036 | waveform_picker_regs->status = 0x00; // |
|
1088 | waveform_picker_regs->status = 0x00; // | |
1037 | #endif |
|
1089 | #endif | |
1038 | } |
|
1090 | } | |
1039 |
|
1091 | |||
1040 | //***************** |
|
1092 | //***************** | |
1041 | // local parameters |
|
1093 | // local parameters | |
1042 | void set_local_sbm1_nb_cwf_max() |
|
1094 | void set_local_sbm1_nb_cwf_max() | |
1043 | { |
|
1095 | { | |
1044 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. |
|
1096 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. | |
1045 | * |
|
1097 | * | |
1046 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n |
|
1098 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n | |
1047 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.\n\n |
|
1099 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.\n\n | |
1048 | * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot) |
|
1100 | * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot) | |
1049 | * |
|
1101 | * | |
1050 | */ |
|
1102 | */ | |
1051 | param_local.local_sbm1_nb_cwf_max = 2 * |
|
1103 | param_local.local_sbm1_nb_cwf_max = 2 * | |
1052 | (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 |
|
1104 | (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 | |
1053 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2 |
|
1105 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2 | |
1054 | } |
|
1106 | } | |
1055 |
|
1107 | |||
1056 | void set_local_sbm2_nb_cwf_max() |
|
1108 | void set_local_sbm2_nb_cwf_max() | |
1057 | { |
|
1109 | { | |
1058 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. |
|
1110 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. | |
1059 | * |
|
1111 | * | |
1060 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n |
|
1112 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n | |
1061 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n |
|
1113 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n | |
1062 | * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz) |
|
1114 | * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz) | |
1063 | * |
|
1115 | * | |
1064 | */ |
|
1116 | */ | |
1065 |
|
1117 | |||
1066 | param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 |
|
1118 | param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 | |
1067 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8; |
|
1119 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8; | |
1068 | } |
|
1120 | } | |
1069 |
|
1121 | |||
1070 | void set_local_nb_interrupt_f0_MAX() |
|
1122 | void set_local_nb_interrupt_f0_MAX() | |
1071 | { |
|
1123 | { | |
1072 | /** This function sets the value of the nb_interrupt_f0_MAX local parameter. |
|
1124 | /** This function sets the value of the nb_interrupt_f0_MAX local parameter. | |
1073 | * |
|
1125 | * | |
1074 | * This parameter is used for the SM validation only.\n |
|
1126 | * This parameter is used for the SM validation only.\n | |
1075 | * The software waits param_local.local_nb_interrupt_f0_MAX interruptions from the spectral matrices |
|
1127 | * The software waits param_local.local_nb_interrupt_f0_MAX interruptions from the spectral matrices | |
1076 | * module before launching a basic processing. |
|
1128 | * module before launching a basic processing. | |
1077 | * |
|
1129 | * | |
1078 | */ |
|
1130 | */ | |
1079 |
|
1131 | |||
1080 | param_local.local_nb_interrupt_f0_MAX = ( (parameter_dump_packet.sy_lfr_n_asm_p[0]) * 256 |
|
1132 | param_local.local_nb_interrupt_f0_MAX = ( (parameter_dump_packet.sy_lfr_n_asm_p[0]) * 256 | |
1081 | + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100; |
|
1133 | + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100; | |
1082 | } |
|
1134 | } | |
1083 |
|
1135 | |||
1084 | void reset_local_sbm1_nb_cwf_sent() |
|
1136 | void reset_local_sbm1_nb_cwf_sent() | |
1085 | { |
|
1137 | { | |
1086 | /** This function resets the value of the sbm1_nb_cwf_sent local parameter. |
|
1138 | /** This function resets the value of the sbm1_nb_cwf_sent local parameter. | |
1087 | * |
|
1139 | * | |
1088 | * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n |
|
1140 | * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n | |
1089 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active. |
|
1141 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active. | |
1090 | * |
|
1142 | * | |
1091 | */ |
|
1143 | */ | |
1092 |
|
1144 | |||
1093 | param_local.local_sbm1_nb_cwf_sent = 0; |
|
1145 | param_local.local_sbm1_nb_cwf_sent = 0; | |
1094 | } |
|
1146 | } | |
1095 |
|
1147 | |||
1096 | void reset_local_sbm2_nb_cwf_sent() |
|
1148 | void reset_local_sbm2_nb_cwf_sent() | |
1097 | { |
|
1149 | { | |
1098 | /** This function resets the value of the sbm2_nb_cwf_sent local parameter. |
|
1150 | /** This function resets the value of the sbm2_nb_cwf_sent local parameter. | |
1099 | * |
|
1151 | * | |
1100 | * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n |
|
1152 | * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n | |
1101 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active. |
|
1153 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active. | |
1102 | * |
|
1154 | * | |
1103 | */ |
|
1155 | */ | |
1104 |
|
1156 | |||
1105 | param_local.local_sbm2_nb_cwf_sent = 0; |
|
1157 | param_local.local_sbm2_nb_cwf_sent = 0; | |
1106 | } |
|
1158 | } | |
|
1159 | ||||
|
1160 | rtems_id get_pkts_queue_id( void ) | |||
|
1161 | { | |||
|
1162 | rtems_id queue_id; | |||
|
1163 | rtems_status_code status; | |||
|
1164 | ||||
|
1165 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |||
|
1166 | if (status != RTEMS_SUCCESSFUL) | |||
|
1167 | { | |||
|
1168 | PRINTF1("in get_pkts_queue_id *** ERR %d\n", status) | |||
|
1169 | } | |||
|
1170 | return queue_id; | |||
|
1171 | } |
General Comments 0
You need to be logged in to leave comments.
Login now