@@ -1,253 +1,253 | |||||
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: Wed Feb 19 13:04:42 2014 | |
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=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4= |
|
13 | DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=2 -DPRINT_MESSAGES_ON_CONSOLE -DDEBUG_MESSAGES -DPRINT_TASK_STATISTICS | |
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 -I../../LFR_basic-parameters |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../../LFR_basic-parameters | |
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 | ../src/tc_acceptance.c \ | |
56 | ../../LFR_basic-parameters/basic_parameters.c |
|
56 | ../../LFR_basic-parameters/basic_parameters.c | |
57 | OBJECTS = obj/wf_handler.o \ |
|
57 | OBJECTS = obj/wf_handler.o \ | |
58 | obj/tc_handler.o \ |
|
58 | obj/tc_handler.o \ | |
59 | obj/fsw_processing.o \ |
|
59 | obj/fsw_processing.o \ | |
60 | obj/fsw_misc.o \ |
|
60 | obj/fsw_misc.o \ | |
61 | obj/fsw_init.o \ |
|
61 | obj/fsw_init.o \ | |
62 | obj/fsw_globals.o \ |
|
62 | obj/fsw_globals.o \ | |
63 | obj/fsw_spacewire.o \ |
|
63 | obj/fsw_spacewire.o \ | |
64 | obj/tc_load_dump_parameters.o \ |
|
64 | obj/tc_load_dump_parameters.o \ | |
65 | obj/tm_lfr_tc_exe.o \ |
|
65 | obj/tm_lfr_tc_exe.o \ | |
66 | obj/tc_acceptance.o \ |
|
66 | obj/tc_acceptance.o \ | |
67 | obj/basic_parameters.o |
|
67 | obj/basic_parameters.o | |
68 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
68 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
69 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
69 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
70 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
70 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
71 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
71 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
72 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
72 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
73 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
73 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
74 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
74 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
75 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
75 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
76 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
76 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
77 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
77 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
78 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
78 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
79 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
79 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
80 | sparc.pri \ |
|
80 | sparc.pri \ | |
81 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
81 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
82 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
82 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
83 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
83 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
84 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
91 | fsw-qt.pro |
|
91 | fsw-qt.pro | |
92 | QMAKE_TARGET = fsw |
|
92 | QMAKE_TARGET = fsw | |
93 | DESTDIR = bin/ |
|
93 | DESTDIR = bin/ | |
94 | TARGET = bin/fsw |
|
94 | TARGET = bin/fsw | |
95 |
|
95 | |||
96 | first: all |
|
96 | first: all | |
97 | ####### Implicit rules |
|
97 | ####### Implicit rules | |
98 |
|
98 | |||
99 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
99 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
100 |
|
100 | |||
101 | .cpp.o: |
|
101 | .cpp.o: | |
102 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
102 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
103 |
|
103 | |||
104 | .cc.o: |
|
104 | .cc.o: | |
105 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
105 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
106 |
|
106 | |||
107 | .cxx.o: |
|
107 | .cxx.o: | |
108 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
108 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
109 |
|
109 | |||
110 | .C.o: |
|
110 | .C.o: | |
111 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
111 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
112 |
|
112 | |||
113 | .c.o: |
|
113 | .c.o: | |
114 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
114 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
115 |
|
115 | |||
116 | ####### Build rules |
|
116 | ####### Build rules | |
117 |
|
117 | |||
118 | all: Makefile $(TARGET) |
|
118 | all: Makefile $(TARGET) | |
119 |
|
119 | |||
120 | $(TARGET): $(OBJECTS) |
|
120 | $(TARGET): $(OBJECTS) | |
121 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
121 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
122 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
122 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
123 |
|
123 | |||
124 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
124 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
125 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
125 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
126 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
126 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
127 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
127 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
128 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
128 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
129 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
129 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
130 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
130 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
131 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
131 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
132 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
132 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
133 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
133 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
134 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
134 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
135 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
135 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
136 | sparc.pri \ |
|
136 | sparc.pri \ | |
137 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
137 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
138 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
138 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
139 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
139 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
140 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
140 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
141 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
141 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
142 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
142 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
143 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
143 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
144 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
144 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
145 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
145 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
146 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
146 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
147 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
147 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
148 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
148 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
149 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
149 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
150 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
150 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
151 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
151 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
152 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
152 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
153 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
153 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
154 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
154 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
155 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
155 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
156 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
156 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
157 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
157 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
158 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
158 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
159 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
159 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
160 | sparc.pri: |
|
160 | sparc.pri: | |
161 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
161 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
162 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
162 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
163 | /usr/lib64/qt4/mkspecs/features/shared.prf: |
|
163 | /usr/lib64/qt4/mkspecs/features/shared.prf: | |
164 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
164 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
165 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
165 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
166 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
166 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
167 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
167 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
168 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
168 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
169 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
169 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
170 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
170 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
171 | qmake: FORCE |
|
171 | qmake: FORCE | |
172 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
172 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
173 |
|
173 | |||
174 | dist: |
|
174 | dist: | |
175 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
|
175 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 | |
176 | $(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 |
|
176 | $(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 | |
177 |
|
177 | |||
178 |
|
178 | |||
179 | clean:compiler_clean |
|
179 | clean:compiler_clean | |
180 | -$(DEL_FILE) $(OBJECTS) |
|
180 | -$(DEL_FILE) $(OBJECTS) | |
181 | -$(DEL_FILE) *~ core *.core |
|
181 | -$(DEL_FILE) *~ core *.core | |
182 |
|
182 | |||
183 |
|
183 | |||
184 | ####### Sub-libraries |
|
184 | ####### Sub-libraries | |
185 |
|
185 | |||
186 | distclean: clean |
|
186 | distclean: clean | |
187 | -$(DEL_FILE) $(TARGET) |
|
187 | -$(DEL_FILE) $(TARGET) | |
188 | -$(DEL_FILE) Makefile |
|
188 | -$(DEL_FILE) Makefile | |
189 |
|
189 | |||
190 |
|
190 | |||
191 | grmon: |
|
191 | grmon: | |
192 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u |
|
192 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u | |
193 |
|
193 | |||
194 | check: first |
|
194 | check: first | |
195 |
|
195 | |||
196 | compiler_rcc_make_all: |
|
196 | compiler_rcc_make_all: | |
197 | compiler_rcc_clean: |
|
197 | compiler_rcc_clean: | |
198 | compiler_uic_make_all: |
|
198 | compiler_uic_make_all: | |
199 | compiler_uic_clean: |
|
199 | compiler_uic_clean: | |
200 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
200 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
201 | compiler_image_collection_clean: |
|
201 | compiler_image_collection_clean: | |
202 | -$(DEL_FILE) qmake_image_collection.cpp |
|
202 | -$(DEL_FILE) qmake_image_collection.cpp | |
203 | compiler_yacc_decl_make_all: |
|
203 | compiler_yacc_decl_make_all: | |
204 | compiler_yacc_decl_clean: |
|
204 | compiler_yacc_decl_clean: | |
205 | compiler_yacc_impl_make_all: |
|
205 | compiler_yacc_impl_make_all: | |
206 | compiler_yacc_impl_clean: |
|
206 | compiler_yacc_impl_clean: | |
207 | compiler_lex_make_all: |
|
207 | compiler_lex_make_all: | |
208 | compiler_lex_clean: |
|
208 | compiler_lex_clean: | |
209 | compiler_clean: |
|
209 | compiler_clean: | |
210 |
|
210 | |||
211 | ####### Compile |
|
211 | ####### Compile | |
212 |
|
212 | |||
213 | obj/wf_handler.o: ../src/wf_handler.c |
|
213 | obj/wf_handler.o: ../src/wf_handler.c | |
214 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c |
|
214 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c | |
215 |
|
215 | |||
216 | obj/tc_handler.o: ../src/tc_handler.c |
|
216 | obj/tc_handler.o: ../src/tc_handler.c | |
217 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c |
|
217 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c | |
218 |
|
218 | |||
219 | obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c |
|
219 | obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c | |
220 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c |
|
220 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c | |
221 |
|
221 | |||
222 | obj/fsw_misc.o: ../src/fsw_misc.c |
|
222 | obj/fsw_misc.o: ../src/fsw_misc.c | |
223 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c |
|
223 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c | |
224 |
|
224 | |||
225 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c |
|
225 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c | |
226 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c |
|
226 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c | |
227 |
|
227 | |||
228 | obj/fsw_globals.o: ../src/fsw_globals.c |
|
228 | obj/fsw_globals.o: ../src/fsw_globals.c | |
229 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c |
|
229 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c | |
230 |
|
230 | |||
231 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c |
|
231 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c | |
232 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c |
|
232 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c | |
233 |
|
233 | |||
234 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c |
|
234 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c | |
235 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c |
|
235 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c | |
236 |
|
236 | |||
237 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c |
|
237 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c | |
238 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c |
|
238 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c | |
239 |
|
239 | |||
240 | obj/tc_acceptance.o: ../src/tc_acceptance.c |
|
240 | obj/tc_acceptance.o: ../src/tc_acceptance.c | |
241 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c |
|
241 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c | |
242 |
|
242 | |||
243 | obj/basic_parameters.o: ../../LFR_basic-parameters/basic_parameters.c ../../LFR_basic-parameters/basic_parameters.h |
|
243 | obj/basic_parameters.o: ../../LFR_basic-parameters/basic_parameters.c ../../LFR_basic-parameters/basic_parameters.h | |
244 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../../LFR_basic-parameters/basic_parameters.c |
|
244 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../../LFR_basic-parameters/basic_parameters.c | |
245 |
|
245 | |||
246 | ####### Install |
|
246 | ####### Install | |
247 |
|
247 | |||
248 | install: FORCE |
|
248 | install: FORCE | |
249 |
|
249 | |||
250 | uninstall: FORCE |
|
250 | uninstall: FORCE | |
251 |
|
251 | |||
252 | FORCE: |
|
252 | FORCE: | |
253 |
|
253 |
@@ -1,78 +1,78 | |||||
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 |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report | |
4 | CONFIG += console verbose |
|
4 | CONFIG += console verbose cpu_usage_report debug_messages | |
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=-1-0 |
|
10 | SWVERSION=-1-0 | |
11 | DEFINES += SW_VERSION_N1=1 # major |
|
11 | DEFINES += SW_VERSION_N1=1 # major | |
12 | DEFINES += SW_VERSION_N2=0 # minor |
|
12 | DEFINES += SW_VERSION_N2=0 # minor | |
13 | DEFINES += SW_VERSION_N3=0 # patch |
|
13 | DEFINES += SW_VERSION_N3=0 # patch | |
14 |
DEFINES += SW_VERSION_N4= |
|
14 | DEFINES += SW_VERSION_N4=2 # internal | |
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, debug_messages ) { |
|
20 | contains( CONFIG, debug_messages ) { | |
21 | DEFINES += DEBUG_MESSAGES |
|
21 | DEFINES += DEBUG_MESSAGES | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | contains( CONFIG, cpu_usage_report ) { |
|
24 | contains( CONFIG, cpu_usage_report ) { | |
25 | DEFINES += PRINT_TASK_STATISTICS |
|
25 | DEFINES += PRINT_TASK_STATISTICS | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | contains( CONFIG, stack_report ) { |
|
28 | contains( CONFIG, stack_report ) { | |
29 | DEFINES += PRINT_STACK_REPORT |
|
29 | DEFINES += PRINT_STACK_REPORT | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
32 | contains( CONFIG, boot_messages ) { |
|
32 | contains( CONFIG, boot_messages ) { | |
33 | DEFINES += BOOT_MESSAGES |
|
33 | DEFINES += BOOT_MESSAGES | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | #doxygen.target = doxygen |
|
36 | #doxygen.target = doxygen | |
37 | #doxygen.commands = doxygen ../doc/Doxyfile |
|
37 | #doxygen.commands = doxygen ../doc/Doxyfile | |
38 | #QMAKE_EXTRA_TARGETS += doxygen |
|
38 | #QMAKE_EXTRA_TARGETS += doxygen | |
39 |
|
39 | |||
40 | TARGET = fsw |
|
40 | TARGET = fsw | |
41 |
|
41 | |||
42 | INCLUDEPATH += \ |
|
42 | INCLUDEPATH += \ | |
43 | ../src \ |
|
43 | ../src \ | |
44 | ../header \ |
|
44 | ../header \ | |
45 | ../../LFR_basic-parameters |
|
45 | ../../LFR_basic-parameters | |
46 |
|
46 | |||
47 | SOURCES += \ |
|
47 | SOURCES += \ | |
48 | ../src/wf_handler.c \ |
|
48 | ../src/wf_handler.c \ | |
49 | ../src/tc_handler.c \ |
|
49 | ../src/tc_handler.c \ | |
50 | ../src/fsw_processing.c \ |
|
50 | ../src/fsw_processing.c \ | |
51 | ../src/fsw_misc.c \ |
|
51 | ../src/fsw_misc.c \ | |
52 | ../src/fsw_init.c \ |
|
52 | ../src/fsw_init.c \ | |
53 | ../src/fsw_globals.c \ |
|
53 | ../src/fsw_globals.c \ | |
54 | ../src/fsw_spacewire.c \ |
|
54 | ../src/fsw_spacewire.c \ | |
55 | ../src/tc_load_dump_parameters.c \ |
|
55 | ../src/tc_load_dump_parameters.c \ | |
56 | ../src/tm_lfr_tc_exe.c \ |
|
56 | ../src/tm_lfr_tc_exe.c \ | |
57 | ../src/tc_acceptance.c \ |
|
57 | ../src/tc_acceptance.c \ | |
58 | ../../LFR_basic-parameters/basic_parameters.c |
|
58 | ../../LFR_basic-parameters/basic_parameters.c | |
59 |
|
59 | |||
60 |
|
60 | |||
61 | HEADERS += \ |
|
61 | HEADERS += \ | |
62 | ../header/wf_handler.h \ |
|
62 | ../header/wf_handler.h \ | |
63 | ../header/tc_handler.h \ |
|
63 | ../header/tc_handler.h \ | |
64 | ../header/grlib_regs.h \ |
|
64 | ../header/grlib_regs.h \ | |
65 | ../header/fsw_processing.h \ |
|
65 | ../header/fsw_processing.h \ | |
66 | ../header/fsw_params.h \ |
|
66 | ../header/fsw_params.h \ | |
67 | ../header/fsw_misc.h \ |
|
67 | ../header/fsw_misc.h \ | |
68 | ../header/fsw_init.h \ |
|
68 | ../header/fsw_init.h \ | |
69 | ../header/ccsds_types.h \ |
|
69 | ../header/ccsds_types.h \ | |
70 | ../header/fsw_params_processing.h \ |
|
70 | ../header/fsw_params_processing.h \ | |
71 | ../header/fsw_spacewire.h \ |
|
71 | ../header/fsw_spacewire.h \ | |
72 | ../header/tm_byte_positions.h \ |
|
72 | ../header/tm_byte_positions.h \ | |
73 | ../header/tc_load_dump_parameters.h \ |
|
73 | ../header/tc_load_dump_parameters.h \ | |
74 | ../header/tm_lfr_tc_exe.h \ |
|
74 | ../header/tm_lfr_tc_exe.h \ | |
75 | ../header/tc_acceptance.h \ |
|
75 | ../header/tc_acceptance.h \ | |
76 | ../header/fsw_params_nb_bytes.h \ |
|
76 | ../header/fsw_params_nb_bytes.h \ | |
77 | ../../LFR_basic-parameters/basic_parameters.h |
|
77 | ../../LFR_basic-parameters/basic_parameters.h | |
78 |
|
78 |
@@ -1,339 +1,339 | |||||
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 3.0.0, 2014-02-1 |
|
3 | <!-- Written by QtCreator 3.0.0, 2014-02-19T07:19:44. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">1</value> |
|
7 | <value type="int">1</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="QByteArray" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QByteArray" 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="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QByteArray" 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">UTF-8</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</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</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | |
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e04e3924-0bd8-4708-be18-f1474e45608e}</value> |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e04e3924-0bd8-4708-be18-f1474e45608e}</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">0</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> |
|
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
72 | </valuemap> |
|
72 | </valuemap> | |
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
79 | <value type="QString">-w</value> |
|
79 | <value type="QString">-w</value> | |
80 | <value type="QString">-r</value> |
|
80 | <value type="QString">-r</value> | |
81 | </valuelist> |
|
81 | </valuelist> | |
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
85 | </valuemap> |
|
85 | </valuemap> | |
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
90 | </valuemap> |
|
90 | </valuemap> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
98 | <value type="QString">-w</value> |
|
98 | <value type="QString">-w</value> | |
99 | <value type="QString">-r</value> |
|
99 | <value type="QString">-r</value> | |
100 | </valuelist> |
|
100 | </valuelist> | |
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
104 | </valuemap> |
|
104 | </valuemap> | |
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
109 | </valuemap> |
|
109 | </valuemap> | |
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | |
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</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">ProjectExplorer.BuildSteps.Deploy</value> |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
126 | </valuemap> |
|
126 | </valuemap> | |
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
|
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
131 | </valuemap> |
|
131 | </valuemap> | |
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> |
|
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | |
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> |
|
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | |
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
|
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | |
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> |
|
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | |
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
153 | <value type="int">0</value> |
|
153 | <value type="int">0</value> | |
154 | <value type="int">1</value> |
|
154 | <value type="int">1</value> | |
155 | <value type="int">2</value> |
|
155 | <value type="int">2</value> | |
156 | <value type="int">3</value> |
|
156 | <value type="int">3</value> | |
157 | <value type="int">4</value> |
|
157 | <value type="int">4</value> | |
158 | <value type="int">5</value> |
|
158 | <value type="int">5</value> | |
159 | <value type="int">6</value> |
|
159 | <value type="int">6</value> | |
160 | <value type="int">7</value> |
|
160 | <value type="int">7</value> | |
161 | <value type="int">8</value> |
|
161 | <value type="int">8</value> | |
162 | <value type="int">9</value> |
|
162 | <value type="int">9</value> | |
163 | <value type="int">10</value> |
|
163 | <value type="int">10</value> | |
164 | <value type="int">11</value> |
|
164 | <value type="int">11</value> | |
165 | <value type="int">12</value> |
|
165 | <value type="int">12</value> | |
166 | <value type="int">13</value> |
|
166 | <value type="int">13</value> | |
167 | <value type="int">14</value> |
|
167 | <value type="int">14</value> | |
168 | </valuelist> |
|
168 | </valuelist> | |
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</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.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> |
|
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | |
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> |
|
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> | |
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
185 | </valuemap> |
|
185 | </valuemap> | |
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
187 | </valuemap> |
|
187 | </valuemap> | |
188 | </data> |
|
188 | </data> | |
189 | <data> |
|
189 | <data> | |
190 | <variable>ProjectExplorer.Project.Target.1</variable> |
|
190 | <variable>ProjectExplorer.Project.Target.1</variable> | |
191 | <valuemap type="QVariantMap"> |
|
191 | <valuemap type="QVariantMap"> | |
192 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
192 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
193 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
193 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
194 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
194 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
195 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
195 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
196 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
196 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
197 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
197 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
198 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
198 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
199 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> |
|
199 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> | |
200 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
200 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
201 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
201 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
202 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
202 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
203 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
203 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
204 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
204 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
205 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
205 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
206 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
206 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
207 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
207 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
208 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
208 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
209 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
209 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
210 | </valuemap> |
|
210 | </valuemap> | |
211 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
211 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
212 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
212 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
213 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
213 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
214 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
214 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
215 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
215 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
216 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
216 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
217 | <value type="QString">-w</value> |
|
217 | <value type="QString">-w</value> | |
218 | <value type="QString">-r</value> |
|
218 | <value type="QString">-r</value> | |
219 | </valuelist> |
|
219 | </valuelist> | |
220 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
220 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
221 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
221 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
222 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
222 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
223 | </valuemap> |
|
223 | </valuemap> | |
224 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
224 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
225 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
225 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
226 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
226 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
228 | </valuemap> |
|
228 | </valuemap> | |
229 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
229 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
230 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
230 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
231 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
231 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
232 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
232 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
233 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
233 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
234 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
234 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
235 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
235 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
236 | <value type="QString">-w</value> |
|
236 | <value type="QString">-w</value> | |
237 | <value type="QString">-r</value> |
|
237 | <value type="QString">-r</value> | |
238 | </valuelist> |
|
238 | </valuelist> | |
239 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
239 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
240 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
240 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
241 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
241 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
242 | </valuemap> |
|
242 | </valuemap> | |
243 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
243 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
244 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
244 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
245 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
245 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
246 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
246 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
247 | </valuemap> |
|
247 | </valuemap> | |
248 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
248 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
249 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
249 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
250 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
250 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
251 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> |
|
251 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | |
252 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
252 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
253 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
253 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
254 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
254 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
255 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
|
255 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | |
256 | </valuemap> |
|
256 | </valuemap> | |
257 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
257 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
258 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
258 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
259 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
259 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
260 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
260 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
261 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
261 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
262 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
262 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
263 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
263 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
264 | </valuemap> |
|
264 | </valuemap> | |
265 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
265 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
266 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
|
266 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | |
267 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
267 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
268 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
268 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
269 | </valuemap> |
|
269 | </valuemap> | |
270 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
270 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
271 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
271 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
272 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
272 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
273 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
273 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
274 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
274 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
275 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
275 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
276 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
276 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
277 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
277 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
278 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
278 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
279 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
279 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
280 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
280 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
281 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
281 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
282 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> |
|
282 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | |
283 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
283 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
284 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
284 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
285 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> |
|
285 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | |
286 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
|
286 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | |
287 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> |
|
287 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | |
288 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
288 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
289 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
289 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
290 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
290 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
291 | <value type="int">0</value> |
|
291 | <value type="int">0</value> | |
292 | <value type="int">1</value> |
|
292 | <value type="int">1</value> | |
293 | <value type="int">2</value> |
|
293 | <value type="int">2</value> | |
294 | <value type="int">3</value> |
|
294 | <value type="int">3</value> | |
295 | <value type="int">4</value> |
|
295 | <value type="int">4</value> | |
296 | <value type="int">5</value> |
|
296 | <value type="int">5</value> | |
297 | <value type="int">6</value> |
|
297 | <value type="int">6</value> | |
298 | <value type="int">7</value> |
|
298 | <value type="int">7</value> | |
299 | <value type="int">8</value> |
|
299 | <value type="int">8</value> | |
300 | <value type="int">9</value> |
|
300 | <value type="int">9</value> | |
301 | <value type="int">10</value> |
|
301 | <value type="int">10</value> | |
302 | <value type="int">11</value> |
|
302 | <value type="int">11</value> | |
303 | <value type="int">12</value> |
|
303 | <value type="int">12</value> | |
304 | <value type="int">13</value> |
|
304 | <value type="int">13</value> | |
305 | <value type="int">14</value> |
|
305 | <value type="int">14</value> | |
306 | </valuelist> |
|
306 | </valuelist> | |
307 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
307 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
308 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
308 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
309 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
309 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> | |
310 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
310 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
311 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
311 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
312 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
312 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
313 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
313 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
314 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
314 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
315 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
315 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
316 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
316 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
317 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
317 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
318 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
318 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
319 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
319 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
320 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
320 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
321 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
321 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
322 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
322 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
323 | </valuemap> |
|
323 | </valuemap> | |
324 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
324 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
325 | </valuemap> |
|
325 | </valuemap> | |
326 | </data> |
|
326 | </data> | |
327 | <data> |
|
327 | <data> | |
328 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
328 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
329 | <value type="int">2</value> |
|
329 | <value type="int">2</value> | |
330 | </data> |
|
330 | </data> | |
331 | <data> |
|
331 | <data> | |
332 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
332 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
333 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
333 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
334 | </data> |
|
334 | </data> | |
335 | <data> |
|
335 | <data> | |
336 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
336 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
337 | <value type="int">15</value> |
|
337 | <value type="int">15</value> | |
338 | </data> |
|
338 | </data> | |
339 | </qtcreator> |
|
339 | </qtcreator> |
@@ -1,605 +1,612 | |||||
1 | #ifndef CCSDS_TYPES_H_INCLUDED |
|
1 | #ifndef CCSDS_TYPES_H_INCLUDED | |
2 | #define CCSDS_TYPES_H_INCLUDED |
|
2 | #define CCSDS_TYPES_H_INCLUDED | |
3 |
|
3 | |||
|
4 | #include "fsw_params_processing.h" | |||
|
5 | ||||
4 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 |
|
6 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 | |
5 | #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4 |
|
7 | #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4 | |
6 | #define CCSDS_TM_PKT_MAX_SIZE 4412 |
|
8 | #define CCSDS_TM_PKT_MAX_SIZE 4412 | |
7 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 |
|
9 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 | |
8 | #define CCSDS_TC_PKT_MAX_SIZE 256 |
|
10 | #define CCSDS_TC_PKT_MAX_SIZE 256 | |
9 | #define CCSDS_TC_PKT_MIN_SIZE 16 |
|
11 | #define CCSDS_TC_PKT_MIN_SIZE 16 | |
10 | #define CCSDS_TC_TM_PACKET_OFFSET 7 |
|
12 | #define CCSDS_TC_TM_PACKET_OFFSET 7 | |
11 | #define CCSDS_PROCESS_ID 76 |
|
13 | #define CCSDS_PROCESS_ID 76 | |
12 | #define CCSDS_PACKET_CATEGORY 12 |
|
14 | #define CCSDS_PACKET_CATEGORY 12 | |
13 | #define CCSDS_NODE_ADDRESS 0xfe |
|
15 | #define CCSDS_NODE_ADDRESS 0xfe | |
14 | #define CCSDS_USER_APP 0x00 |
|
16 | #define CCSDS_USER_APP 0x00 | |
15 |
|
17 | |||
16 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 |
|
18 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 | |
17 | #define DEFAULT_RESERVED 0x00 |
|
19 | #define DEFAULT_RESERVED 0x00 | |
18 | #define DEFAULT_HKBIA 0x1e // 0001 1110 |
|
20 | #define DEFAULT_HKBIA 0x1e // 0001 1110 | |
19 |
|
21 | |||
20 | // PACKET ID |
|
22 | // PACKET ID | |
21 | #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1 |
|
23 | #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1 | |
22 | #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4 |
|
24 | #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4 | |
23 | #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9 |
|
25 | #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9 | |
24 | #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 |
|
26 | #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 |
|
27 | #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 | |
26 | #define TM_PACKET_PID_DEFAULT 76 |
|
28 | #define TM_PACKET_PID_DEFAULT 76 | |
27 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 |
|
29 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 | |
28 | #define TM_PACKET_CAT_TC_EXE 1 |
|
30 | #define TM_PACKET_CAT_TC_EXE 1 | |
29 | #define TM_PACKET_CAT_HK 4 |
|
31 | #define TM_PACKET_CAT_HK 4 | |
30 | #define TM_PACKET_CAT_PARAMETER_DUMP 9 |
|
32 | #define TM_PACKET_CAT_PARAMETER_DUMP 9 | |
31 | #define TM_PACKET_CAT_SCIENCE 12 |
|
33 | #define TM_PACKET_CAT_SCIENCE 12 | |
32 |
|
34 | |||
33 | // PACKET SEQUENCE CONTROL |
|
35 | // PACKET SEQUENCE CONTROL | |
34 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] |
|
36 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] | |
35 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] |
|
37 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] | |
36 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] |
|
38 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] | |
37 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] |
|
39 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] | |
38 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] |
|
40 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] | |
39 |
|
41 | |||
40 | // DESTINATION ID |
|
42 | // DESTINATION ID | |
41 | #define TM_DESTINATION_ID_GROUND 0 |
|
43 | #define TM_DESTINATION_ID_GROUND 0 | |
42 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 |
|
44 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 | |
43 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 |
|
45 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 | |
44 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 |
|
46 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 | |
45 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 |
|
47 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 | |
46 | #define TM_DESTINATION_ID_DIRECT_CMD 120 |
|
48 | #define TM_DESTINATION_ID_DIRECT_CMD 120 | |
47 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 |
|
49 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 | |
48 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 |
|
50 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 | |
49 | #define TM_DESTINATION_ID_OBCP 15 |
|
51 | #define TM_DESTINATION_ID_OBCP 15 | |
50 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 |
|
52 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 | |
51 | #define TM_DESTINATION_ID_AOCS 11 |
|
53 | #define TM_DESTINATION_ID_AOCS 11 | |
52 |
|
54 | |||
53 | #define CCSDS_DESTINATION_ID 0x01 |
|
55 | #define CCSDS_DESTINATION_ID 0x01 | |
54 | #define CCSDS_PROTOCOLE_ID 0x02 |
|
56 | #define CCSDS_PROTOCOLE_ID 0x02 | |
55 | #define CCSDS_RESERVED 0x00 |
|
57 | #define CCSDS_RESERVED 0x00 | |
56 | #define CCSDS_USER_APP 0x00 |
|
58 | #define CCSDS_USER_APP 0x00 | |
57 |
|
59 | |||
58 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 |
|
60 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 | |
59 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 |
|
61 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 | |
60 | #define SIZE_HK_PARAMETERS 112 |
|
62 | #define SIZE_HK_PARAMETERS 112 | |
61 |
|
63 | |||
62 | // TC TYPES |
|
64 | // TC TYPES | |
63 | #define TC_TYPE_GEN 181 |
|
65 | #define TC_TYPE_GEN 181 | |
64 | #define TC_TYPE_TIME 9 |
|
66 | #define TC_TYPE_TIME 9 | |
65 |
|
67 | |||
66 | // TC SUBTYPES |
|
68 | // TC SUBTYPES | |
67 | #define TC_SUBTYPE_RESET 1 |
|
69 | #define TC_SUBTYPE_RESET 1 | |
68 | #define TC_SUBTYPE_LOAD_COMM 11 |
|
70 | #define TC_SUBTYPE_LOAD_COMM 11 | |
69 | #define TC_SUBTYPE_LOAD_NORM 13 |
|
71 | #define TC_SUBTYPE_LOAD_NORM 13 | |
70 | #define TC_SUBTYPE_LOAD_BURST 19 |
|
72 | #define TC_SUBTYPE_LOAD_BURST 19 | |
71 | #define TC_SUBTYPE_LOAD_SBM1 25 |
|
73 | #define TC_SUBTYPE_LOAD_SBM1 25 | |
72 | #define TC_SUBTYPE_LOAD_SBM2 27 |
|
74 | #define TC_SUBTYPE_LOAD_SBM2 27 | |
73 | #define TC_SUBTYPE_DUMP 31 |
|
75 | #define TC_SUBTYPE_DUMP 31 | |
74 | #define TC_SUBTYPE_ENTER 41 |
|
76 | #define TC_SUBTYPE_ENTER 41 | |
75 | #define TC_SUBTYPE_UPDT_INFO 51 |
|
77 | #define TC_SUBTYPE_UPDT_INFO 51 | |
76 | #define TC_SUBTYPE_EN_CAL 61 |
|
78 | #define TC_SUBTYPE_EN_CAL 61 | |
77 | #define TC_SUBTYPE_DIS_CAL 63 |
|
79 | #define TC_SUBTYPE_DIS_CAL 63 | |
78 | #define TC_SUBTYPE_UPDT_TIME 129 |
|
80 | #define TC_SUBTYPE_UPDT_TIME 129 | |
79 |
|
81 | |||
80 | // TC LEN |
|
82 | // TC LEN | |
81 | #define TC_LEN_RESET 12 |
|
83 | #define TC_LEN_RESET 12 | |
82 | #define TC_LEN_LOAD_COMM 14 |
|
84 | #define TC_LEN_LOAD_COMM 14 | |
83 | #define TC_LEN_LOAD_NORM 22 |
|
85 | #define TC_LEN_LOAD_NORM 22 | |
84 | #define TC_LEN_LOAD_BURST 14 |
|
86 | #define TC_LEN_LOAD_BURST 14 | |
85 | #define TC_LEN_LOAD_SBM1 14 |
|
87 | #define TC_LEN_LOAD_SBM1 14 | |
86 | #define TC_LEN_LOAD_SBM2 14 |
|
88 | #define TC_LEN_LOAD_SBM2 14 | |
87 | #define TC_LEN_DUMP 12 |
|
89 | #define TC_LEN_DUMP 12 | |
88 | #define TC_LEN_ENTER 20 |
|
90 | #define TC_LEN_ENTER 20 | |
89 | #define TC_LEN_UPDT_INFO 46 |
|
91 | #define TC_LEN_UPDT_INFO 46 | |
90 | #define TC_LEN_EN_CAL 12 |
|
92 | #define TC_LEN_EN_CAL 12 | |
91 | #define TC_LEN_DIS_CAL 12 |
|
93 | #define TC_LEN_DIS_CAL 12 | |
92 | #define TC_LEN_UPDT_TIME 18 |
|
94 | #define TC_LEN_UPDT_TIME 18 | |
93 |
|
95 | |||
94 | // TM TYPES |
|
96 | // TM TYPES | |
95 | #define TM_TYPE_TC_EXE 1 |
|
97 | #define TM_TYPE_TC_EXE 1 | |
96 | #define TM_TYPE_HK 3 |
|
98 | #define TM_TYPE_HK 3 | |
97 | #define TM_TYPE_PARAMETER_DUMP 3 |
|
99 | #define TM_TYPE_PARAMETER_DUMP 3 | |
98 | #define TM_TYPE_LFR_SCIENCE 21 |
|
100 | #define TM_TYPE_LFR_SCIENCE 21 | |
99 |
|
101 | |||
100 | // TM SUBTYPES |
|
102 | // TM SUBTYPES | |
101 | #define TM_SUBTYPE_EXE_OK 7 |
|
103 | #define TM_SUBTYPE_EXE_OK 7 | |
102 | #define TM_SUBTYPE_EXE_NOK 8 |
|
104 | #define TM_SUBTYPE_EXE_NOK 8 | |
103 | #define TM_SUBTYPE_HK 25 |
|
105 | #define TM_SUBTYPE_HK 25 | |
104 | #define TM_SUBTYPE_PARAMETER_DUMP 25 |
|
106 | #define TM_SUBTYPE_PARAMETER_DUMP 25 | |
105 | #define TM_SUBTYPE_SCIENCE 3 |
|
107 | #define TM_SUBTYPE_SCIENCE 3 | |
106 | #define TM_SUBTYPE_LFR_SCIENCE 3 |
|
108 | #define TM_SUBTYPE_LFR_SCIENCE 3 | |
107 |
|
109 | |||
108 | // FAILURE CODES |
|
110 | // FAILURE CODES | |
109 | #define ILLEGAL_APID 0 |
|
111 | #define ILLEGAL_APID 0 | |
110 | #define WRONG_LEN_PKT 1 |
|
112 | #define WRONG_LEN_PKT 1 | |
111 | #define INCOR_CHECKSUM 2 |
|
113 | #define INCOR_CHECKSUM 2 | |
112 | #define ILL_TYPE 3 |
|
114 | #define ILL_TYPE 3 | |
113 | #define ILL_SUBTYPE 4 |
|
115 | #define ILL_SUBTYPE 4 | |
114 | #define WRONG_APP_DATA 5 // 0x00 0x05 |
|
116 | #define WRONG_APP_DATA 5 // 0x00 0x05 | |
115 | #define TC_NOT_EXE 42000 // 0xa4 0x10 |
|
117 | #define TC_NOT_EXE 42000 // 0xa4 0x10 | |
116 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 |
|
118 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 | |
117 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 |
|
119 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 | |
118 | #define FAIL_DETECTED 42003 // 0xa4 0x13 |
|
120 | #define FAIL_DETECTED 42003 // 0xa4 0x13 | |
119 | #define NOT_ALLOWED 42004 // 0xa4 0x14 |
|
121 | #define NOT_ALLOWED 42004 // 0xa4 0x14 | |
120 | #define CORRUPTED 42005 // 0xa4 0x15 |
|
122 | #define CORRUPTED 42005 // 0xa4 0x15 | |
121 | #define CCSDS_TM_VALID 7 |
|
123 | #define CCSDS_TM_VALID 7 | |
122 |
|
124 | |||
123 | // TC SID |
|
125 | // TC SID | |
124 | #define SID_TC_GROUND 0 |
|
126 | #define SID_TC_GROUND 0 | |
125 | #define SID_TC_MISSION_TIMELINE 110 |
|
127 | #define SID_TC_MISSION_TIMELINE 110 | |
126 | #define SID_TC_TC_SEQUENCES 111 |
|
128 | #define SID_TC_TC_SEQUENCES 111 | |
127 | #define SID_TC_RECOVERY_ACTION_CMD 112 |
|
129 | #define SID_TC_RECOVERY_ACTION_CMD 112 | |
128 | #define SID_TC_BACKUP_MISSION_TIMELINE 113 |
|
130 | #define SID_TC_BACKUP_MISSION_TIMELINE 113 | |
129 | #define SID_TC_DIRECT_CMD 120 |
|
131 | #define SID_TC_DIRECT_CMD 120 | |
130 | #define SID_TC_SPARE_GRD_SRC1 121 |
|
132 | #define SID_TC_SPARE_GRD_SRC1 121 | |
131 | #define SID_TC_SPARE_GRD_SRC2 122 |
|
133 | #define SID_TC_SPARE_GRD_SRC2 122 | |
132 | #define SID_TC_OBCP 15 |
|
134 | #define SID_TC_OBCP 15 | |
133 | #define SID_TC_SYSTEM_CONTROL 14 |
|
135 | #define SID_TC_SYSTEM_CONTROL 14 | |
134 | #define SID_TC_AOCS 11 |
|
136 | #define SID_TC_AOCS 11 | |
135 | #define SID_TC_RPW_INTERNAL 254 |
|
137 | #define SID_TC_RPW_INTERNAL 254 | |
136 |
|
138 | |||
137 | enum apid_destid{ |
|
139 | enum apid_destid{ | |
138 | GROUND, |
|
140 | GROUND, | |
139 | MISSION_TIMELINE, |
|
141 | MISSION_TIMELINE, | |
140 | TC_SEQUENCES, |
|
142 | TC_SEQUENCES, | |
141 | RECOVERY_ACTION_CMD, |
|
143 | RECOVERY_ACTION_CMD, | |
142 | BACKUP_MISSION_TIMELINE, |
|
144 | BACKUP_MISSION_TIMELINE, | |
143 | DIRECT_CMD, |
|
145 | DIRECT_CMD, | |
144 | SPARE_GRD_SRC1, |
|
146 | SPARE_GRD_SRC1, | |
145 | SPARE_GRD_SRC2, |
|
147 | SPARE_GRD_SRC2, | |
146 | OBCP, |
|
148 | OBCP, | |
147 | SYSTEM_CONTROL, |
|
149 | SYSTEM_CONTROL, | |
148 | AOCS, |
|
150 | AOCS, | |
149 | RPW_INTERNAL |
|
151 | RPW_INTERNAL | |
150 | }; |
|
152 | }; | |
151 | // SEQUENCE COUNTERS |
|
153 | // SEQUENCE COUNTERS | |
152 | #define SEQ_CNT_MAX 16383 |
|
154 | #define SEQ_CNT_MAX 16383 | |
153 | #define SEQ_CNT_NB_DEST_ID 12 |
|
155 | #define SEQ_CNT_NB_DEST_ID 12 | |
154 |
|
156 | |||
155 | // TM SID |
|
157 | // TM SID | |
156 | #define SID_HK 1 |
|
158 | #define SID_HK 1 | |
157 | #define SID_PARAMETER_DUMP 10 |
|
159 | #define SID_PARAMETER_DUMP 10 | |
158 |
|
160 | |||
159 | #define SID_NORM_SWF_F0 3 |
|
161 | #define SID_NORM_SWF_F0 3 | |
160 | #define SID_NORM_SWF_F1 4 |
|
162 | #define SID_NORM_SWF_F1 4 | |
161 | #define SID_NORM_SWF_F2 5 |
|
163 | #define SID_NORM_SWF_F2 5 | |
162 | #define SID_NORM_CWF_F3 1 |
|
164 | #define SID_NORM_CWF_F3 1 | |
163 | #define SID_BURST_CWF_F2 2 |
|
165 | #define SID_BURST_CWF_F2 2 | |
164 | #define SID_SBM1_CWF_F1 24 |
|
166 | #define SID_SBM1_CWF_F1 24 | |
165 | #define SID_SBM2_CWF_F2 25 |
|
167 | #define SID_SBM2_CWF_F2 25 | |
166 | #define SID_NORM_ASM_F0 11 |
|
168 | #define SID_NORM_ASM_F0 11 | |
167 | #define SID_NORM_ASM_F1 12 |
|
169 | #define SID_NORM_ASM_F1 12 | |
168 | #define SID_NORM_ASM_F2 13 |
|
170 | #define SID_NORM_ASM_F2 13 | |
169 | #define SID_NORM_BP1_F0 14 |
|
171 | #define SID_NORM_BP1_F0 14 | |
170 | #define SID_NORM_BP1_F1 15 |
|
172 | #define SID_NORM_BP1_F1 15 | |
171 | #define SID_NORM_BP1_F2 16 |
|
173 | #define SID_NORM_BP1_F2 16 | |
172 | #define SID_NORM_BP2_F0 19 |
|
174 | #define SID_NORM_BP2_F0 19 | |
173 | #define SID_NORM_BP2_F1 20 |
|
175 | #define SID_NORM_BP2_F1 20 | |
174 | #define SID_NORM_BP2_F2 21 |
|
176 | #define SID_NORM_BP2_F2 21 | |
175 | #define SID_BURST_BP1_F0 17 |
|
177 | #define SID_BURST_BP1_F0 17 | |
176 | #define SID_BURST_BP2_F0 22 |
|
178 | #define SID_BURST_BP2_F0 22 | |
177 | #define SID_BURST_BP1_F1 18 |
|
179 | #define SID_BURST_BP1_F1 18 | |
178 | #define SID_BURST_BP2_F1 23 |
|
180 | #define SID_BURST_BP2_F1 23 | |
179 | #define SID_SBM1_BP1_F0 28 |
|
181 | #define SID_SBM1_BP1_F0 28 | |
180 | #define SID_SBM1_BP2_F0 31 |
|
182 | #define SID_SBM1_BP2_F0 31 | |
181 | #define SID_SBM2_BP1_F0 29 |
|
183 | #define SID_SBM2_BP1_F0 29 | |
182 | #define SID_SBM2_BP2_F0 32 |
|
184 | #define SID_SBM2_BP2_F0 32 | |
183 | #define SID_SBM2_BP1_F1 30 |
|
185 | #define SID_SBM2_BP1_F1 30 | |
184 | #define SID_SBM2_BP2_F1 33 |
|
186 | #define SID_SBM2_BP2_F1 33 | |
185 | #define SID_NORM_CWF_LONG_F3 34 |
|
187 | #define SID_NORM_CWF_LONG_F3 34 | |
186 |
|
188 | |||
187 | // LENGTH (BYTES) |
|
189 | // LENGTH (BYTES) | |
188 | #define LENGTH_TM_LFR_TC_EXE_MAX 32 |
|
190 | #define LENGTH_TM_LFR_TC_EXE_MAX 32 | |
189 | #define LENGTH_TM_LFR_HK 126 |
|
191 | #define LENGTH_TM_LFR_HK 126 | |
190 |
|
192 | |||
191 | // HEADER_LENGTH |
|
193 | // HEADER_LENGTH | |
192 | #define TM_HEADER_LEN 16 |
|
194 | #define TM_HEADER_LEN 16 | |
193 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28 |
|
195 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28 | |
194 | // PACKET_LENGTH |
|
196 | // PACKET_LENGTH | |
195 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) |
|
197 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) | |
196 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
198 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
197 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
199 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
198 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
200 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
199 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
201 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
200 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) |
|
202 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) | |
201 |
#define PACKET_LENGTH_HK (12 |
|
203 | #define PACKET_LENGTH_HK (124 - CCSDS_TC_TM_PACKET_OFFSET) | |
202 |
#define PACKET_LENGTH_PARAMETER_DUMP (3 |
|
204 | #define PACKET_LENGTH_PARAMETER_DUMP (36 - CCSDS_TC_TM_PACKET_OFFSET) | |
203 |
#define PACKET_LENGTH_TM_LFR_SCIENCE_ASM |
|
205 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0 (TOTAL_SIZE_ASM_F0 + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET) | |
|
206 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1 (TOTAL_SIZE_ASM_F1 + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET) | |||
|
207 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F2 (TOTAL_SIZE_ASM_F2 + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET) | |||
204 |
|
208 | |||
205 | #define SPARE1_PUSVERSION_SPARE2 0x10 |
|
209 | #define SPARE1_PUSVERSION_SPARE2 0x10 | |
206 |
|
210 | |||
207 | #define LEN_TM_LFR_HK 130 // 126 + 4 |
|
211 | #define LEN_TM_LFR_HK 130 // 126 + 4 | |
208 | #define LEN_TM_LFR_TC_EXE_NOT_IMP 28 // 24 + 4 |
|
212 | #define LEN_TM_LFR_TC_EXE_NOT_IMP 28 // 24 + 4 | |
209 |
|
213 | |||
210 | // R1 |
|
214 | // R1 | |
211 | #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1 |
|
215 | #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1 | |
212 | #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1 |
|
216 | #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1 | |
213 | #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1 |
|
217 | #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1 | |
214 | #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1 |
|
218 | #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1 | |
215 | #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1 |
|
219 | #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1 | |
216 | #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1 |
|
220 | #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1 | |
217 | // R2 |
|
221 | // R2 | |
218 | #define TM_LEN_SCI_SWF_304 3669 // 304 * 12 + 10 + 12 - 1 |
|
222 | #define TM_LEN_SCI_SWF_304 3669 // 304 * 12 + 10 + 12 - 1 | |
219 | #define TM_LEN_SCI_SWF_224 2709 // 224 * 12 + 10 + 12 - 1 |
|
223 | #define TM_LEN_SCI_SWF_224 2709 // 224 * 12 + 10 + 12 - 1 | |
220 | #define TM_LEN_SCI_CWF_336 4051 // 336 * 12 + 10 + 10 - 1 |
|
224 | #define TM_LEN_SCI_CWF_336 4051 // 336 * 12 + 10 + 10 - 1 | |
221 | #define TM_LEN_SCI_CWF_672 4051 // 672 * 6 + 10 + 10 - 1 |
|
225 | #define TM_LEN_SCI_CWF_672 4051 // 672 * 6 + 10 + 10 - 1 | |
222 | // |
|
226 | // | |
223 | #define DEFAULT_PKTCNT 0x07 |
|
227 | #define DEFAULT_PKTCNT 0x07 | |
224 | #define BLK_NR_304 0x0130 |
|
228 | #define BLK_NR_304 0x0130 | |
225 | #define BLK_NR_224 0x00e0 |
|
229 | #define BLK_NR_224 0x00e0 | |
226 | #define BLK_NR_CWF 0x0150 // 336 |
|
230 | #define BLK_NR_CWF 0x0150 // 336 | |
227 | #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672 |
|
231 | #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672 | |
228 |
|
232 | |||
229 | enum TM_TYPE{ |
|
233 | enum TM_TYPE{ | |
230 | TM_LFR_TC_EXE_OK, |
|
234 | TM_LFR_TC_EXE_OK, | |
231 | TM_LFR_TC_EXE_ERR, |
|
235 | TM_LFR_TC_EXE_ERR, | |
232 | TM_LFR_HK, |
|
236 | TM_LFR_HK, | |
233 | TM_LFR_SCI, |
|
237 | TM_LFR_SCI, | |
234 | TM_LFR_SCI_SBM, |
|
238 | TM_LFR_SCI_SBM, | |
235 | TM_LFR_PAR_DUMP |
|
239 | TM_LFR_PAR_DUMP | |
236 | }; |
|
240 | }; | |
237 |
|
241 | |||
238 | typedef struct { |
|
242 | typedef struct { | |
239 | unsigned char targetLogicalAddress; |
|
243 | unsigned char targetLogicalAddress; | |
240 | unsigned char protocolIdentifier; |
|
244 | unsigned char protocolIdentifier; | |
241 | unsigned char reserved; |
|
245 | unsigned char reserved; | |
242 | unsigned char userApplication; |
|
246 | unsigned char userApplication; | |
243 | // PACKET HEADER |
|
247 | // PACKET HEADER | |
244 | unsigned char packetID[2]; |
|
248 | unsigned char packetID[2]; | |
245 | unsigned char packetSequenceControl[2]; |
|
249 | unsigned char packetSequenceControl[2]; | |
246 | unsigned char packetLength[2]; |
|
250 | unsigned char packetLength[2]; | |
247 | // DATA FIELD HEADER |
|
251 | // DATA FIELD HEADER | |
248 | unsigned char spare1_pusVersion_spare2; |
|
252 | unsigned char spare1_pusVersion_spare2; | |
249 | unsigned char serviceType; |
|
253 | unsigned char serviceType; | |
250 | unsigned char serviceSubType; |
|
254 | unsigned char serviceSubType; | |
251 | unsigned char destinationID; |
|
255 | unsigned char destinationID; | |
252 | unsigned char time[6]; |
|
256 | unsigned char time[6]; | |
253 | // |
|
257 | // | |
254 | unsigned char telecommand_pkt_id[2]; |
|
258 | unsigned char telecommand_pkt_id[2]; | |
255 | unsigned char pkt_seq_control[2]; |
|
259 | unsigned char pkt_seq_control[2]; | |
256 | } Packet_TM_LFR_TC_EXE_SUCCESS_t; |
|
260 | } Packet_TM_LFR_TC_EXE_SUCCESS_t; | |
257 |
|
261 | |||
258 | typedef struct { |
|
262 | typedef struct { | |
259 | unsigned char targetLogicalAddress; |
|
263 | unsigned char targetLogicalAddress; | |
260 | unsigned char protocolIdentifier; |
|
264 | unsigned char protocolIdentifier; | |
261 | unsigned char reserved; |
|
265 | unsigned char reserved; | |
262 | unsigned char userApplication; |
|
266 | unsigned char userApplication; | |
263 | // PACKET HEADER |
|
267 | // PACKET HEADER | |
264 | unsigned char packetID[2]; |
|
268 | unsigned char packetID[2]; | |
265 | unsigned char packetSequenceControl[2]; |
|
269 | unsigned char packetSequenceControl[2]; | |
266 | unsigned char packetLength[2]; |
|
270 | unsigned char packetLength[2]; | |
267 | // DATA FIELD HEADER |
|
271 | // DATA FIELD HEADER | |
268 | unsigned char spare1_pusVersion_spare2; |
|
272 | unsigned char spare1_pusVersion_spare2; | |
269 | unsigned char serviceType; |
|
273 | unsigned char serviceType; | |
270 | unsigned char serviceSubType; |
|
274 | unsigned char serviceSubType; | |
271 | unsigned char destinationID; |
|
275 | unsigned char destinationID; | |
272 | unsigned char time[6]; |
|
276 | unsigned char time[6]; | |
273 | // |
|
277 | // | |
274 | unsigned char tc_failure_code[2]; |
|
278 | unsigned char tc_failure_code[2]; | |
275 | unsigned char telecommand_pkt_id[2]; |
|
279 | unsigned char telecommand_pkt_id[2]; | |
276 | unsigned char pkt_seq_control[2]; |
|
280 | unsigned char pkt_seq_control[2]; | |
277 | unsigned char tc_service; |
|
281 | unsigned char tc_service; | |
278 | unsigned char tc_subtype; |
|
282 | unsigned char tc_subtype; | |
279 | unsigned char byte_position; |
|
283 | unsigned char byte_position; | |
280 | unsigned char rcv_value; |
|
284 | unsigned char rcv_value; | |
281 | } Packet_TM_LFR_TC_EXE_INCONSISTENT_t; |
|
285 | } Packet_TM_LFR_TC_EXE_INCONSISTENT_t; | |
282 |
|
286 | |||
283 | typedef struct { |
|
287 | typedef struct { | |
284 | unsigned char targetLogicalAddress; |
|
288 | unsigned char targetLogicalAddress; | |
285 | unsigned char protocolIdentifier; |
|
289 | unsigned char protocolIdentifier; | |
286 | unsigned char reserved; |
|
290 | unsigned char reserved; | |
287 | unsigned char userApplication; |
|
291 | unsigned char userApplication; | |
288 | // PACKET HEADER |
|
292 | // PACKET HEADER | |
289 | unsigned char packetID[2]; |
|
293 | unsigned char packetID[2]; | |
290 | unsigned char packetSequenceControl[2]; |
|
294 | unsigned char packetSequenceControl[2]; | |
291 | unsigned char packetLength[2]; |
|
295 | unsigned char packetLength[2]; | |
292 | // DATA FIELD HEADER |
|
296 | // DATA FIELD HEADER | |
293 | unsigned char spare1_pusVersion_spare2; |
|
297 | unsigned char spare1_pusVersion_spare2; | |
294 | unsigned char serviceType; |
|
298 | unsigned char serviceType; | |
295 | unsigned char serviceSubType; |
|
299 | unsigned char serviceSubType; | |
296 | unsigned char destinationID; |
|
300 | unsigned char destinationID; | |
297 | unsigned char time[6]; |
|
301 | unsigned char time[6]; | |
298 | // |
|
302 | // | |
299 | unsigned char tc_failure_code[2]; |
|
303 | unsigned char tc_failure_code[2]; | |
300 | unsigned char telecommand_pkt_id[2]; |
|
304 | unsigned char telecommand_pkt_id[2]; | |
301 | unsigned char pkt_seq_control[2]; |
|
305 | unsigned char pkt_seq_control[2]; | |
302 | unsigned char tc_service; |
|
306 | unsigned char tc_service; | |
303 | unsigned char tc_subtype; |
|
307 | unsigned char tc_subtype; | |
304 | unsigned char lfr_status_word[2]; |
|
308 | unsigned char lfr_status_word[2]; | |
305 | } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; |
|
309 | } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; | |
306 |
|
310 | |||
307 | typedef struct { |
|
311 | typedef struct { | |
308 | unsigned char targetLogicalAddress; |
|
312 | unsigned char targetLogicalAddress; | |
309 | unsigned char protocolIdentifier; |
|
313 | unsigned char protocolIdentifier; | |
310 | unsigned char reserved; |
|
314 | unsigned char reserved; | |
311 | unsigned char userApplication; |
|
315 | unsigned char userApplication; | |
312 | // PACKET HEADER |
|
316 | // PACKET HEADER | |
313 | unsigned char packetID[2]; |
|
317 | unsigned char packetID[2]; | |
314 | unsigned char packetSequenceControl[2]; |
|
318 | unsigned char packetSequenceControl[2]; | |
315 | unsigned char packetLength[2]; |
|
319 | unsigned char packetLength[2]; | |
316 | // DATA FIELD HEADER |
|
320 | // DATA FIELD HEADER | |
317 | unsigned char spare1_pusVersion_spare2; |
|
321 | unsigned char spare1_pusVersion_spare2; | |
318 | unsigned char serviceType; |
|
322 | unsigned char serviceType; | |
319 | unsigned char serviceSubType; |
|
323 | unsigned char serviceSubType; | |
320 | unsigned char destinationID; |
|
324 | unsigned char destinationID; | |
321 | unsigned char time[6]; |
|
325 | unsigned char time[6]; | |
322 | // |
|
326 | // | |
323 | unsigned char tc_failure_code[2]; |
|
327 | unsigned char tc_failure_code[2]; | |
324 | unsigned char telecommand_pkt_id[2]; |
|
328 | unsigned char telecommand_pkt_id[2]; | |
325 | unsigned char pkt_seq_control[2]; |
|
329 | unsigned char pkt_seq_control[2]; | |
326 | unsigned char tc_service; |
|
330 | unsigned char tc_service; | |
327 | unsigned char tc_subtype; |
|
331 | unsigned char tc_subtype; | |
328 | } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; |
|
332 | } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; | |
329 |
|
333 | |||
330 | typedef struct { |
|
334 | typedef struct { | |
331 | unsigned char targetLogicalAddress; |
|
335 | unsigned char targetLogicalAddress; | |
332 | unsigned char protocolIdentifier; |
|
336 | unsigned char protocolIdentifier; | |
333 | unsigned char reserved; |
|
337 | unsigned char reserved; | |
334 | unsigned char userApplication; |
|
338 | unsigned char userApplication; | |
335 | // PACKET HEADER |
|
339 | // PACKET HEADER | |
336 | unsigned char packetID[2]; |
|
340 | unsigned char packetID[2]; | |
337 | unsigned char packetSequenceControl[2]; |
|
341 | unsigned char packetSequenceControl[2]; | |
338 | unsigned char packetLength[2]; |
|
342 | unsigned char packetLength[2]; | |
339 | // DATA FIELD HEADER |
|
343 | // DATA FIELD HEADER | |
340 | unsigned char spare1_pusVersion_spare2; |
|
344 | unsigned char spare1_pusVersion_spare2; | |
341 | unsigned char serviceType; |
|
345 | unsigned char serviceType; | |
342 | unsigned char serviceSubType; |
|
346 | unsigned char serviceSubType; | |
343 | unsigned char destinationID; |
|
347 | unsigned char destinationID; | |
344 | unsigned char time[6]; |
|
348 | unsigned char time[6]; | |
345 | // |
|
349 | // | |
346 | unsigned char tc_failure_code[2]; |
|
350 | unsigned char tc_failure_code[2]; | |
347 | unsigned char telecommand_pkt_id[2]; |
|
351 | unsigned char telecommand_pkt_id[2]; | |
348 | unsigned char pkt_seq_control[2]; |
|
352 | unsigned char pkt_seq_control[2]; | |
349 | unsigned char tc_service; |
|
353 | unsigned char tc_service; | |
350 | unsigned char tc_subtype; |
|
354 | unsigned char tc_subtype; | |
351 | } Packet_TM_LFR_TC_EXE_ERROR_t; |
|
355 | } Packet_TM_LFR_TC_EXE_ERROR_t; | |
352 |
|
356 | |||
353 | typedef struct { |
|
357 | typedef struct { | |
354 | unsigned char targetLogicalAddress; |
|
358 | unsigned char targetLogicalAddress; | |
355 | unsigned char protocolIdentifier; |
|
359 | unsigned char protocolIdentifier; | |
356 | unsigned char reserved; |
|
360 | unsigned char reserved; | |
357 | unsigned char userApplication; |
|
361 | unsigned char userApplication; | |
358 | // PACKET HEADER |
|
362 | // PACKET HEADER | |
359 | unsigned char packetID[2]; |
|
363 | unsigned char packetID[2]; | |
360 | unsigned char packetSequenceControl[2]; |
|
364 | unsigned char packetSequenceControl[2]; | |
361 | unsigned char packetLength[2]; |
|
365 | unsigned char packetLength[2]; | |
362 | // DATA FIELD HEADER |
|
366 | // DATA FIELD HEADER | |
363 | unsigned char spare1_pusVersion_spare2; |
|
367 | unsigned char spare1_pusVersion_spare2; | |
364 | unsigned char serviceType; |
|
368 | unsigned char serviceType; | |
365 | unsigned char serviceSubType; |
|
369 | unsigned char serviceSubType; | |
366 | unsigned char destinationID; |
|
370 | unsigned char destinationID; | |
367 | unsigned char time[6]; |
|
371 | unsigned char time[6]; | |
368 | // |
|
372 | // | |
369 | unsigned char tc_failure_code[2]; |
|
373 | unsigned char tc_failure_code[2]; | |
370 | unsigned char telecommand_pkt_id[2]; |
|
374 | unsigned char telecommand_pkt_id[2]; | |
371 | unsigned char pkt_seq_control[2]; |
|
375 | unsigned char pkt_seq_control[2]; | |
372 | unsigned char tc_service; |
|
376 | unsigned char tc_service; | |
373 | unsigned char tc_subtype; |
|
377 | unsigned char tc_subtype; | |
374 | unsigned char pkt_len_rcv_value[2]; |
|
378 | unsigned char pkt_len_rcv_value[2]; | |
375 | unsigned char pkt_datafieldsize_cnt[2]; |
|
379 | unsigned char pkt_datafieldsize_cnt[2]; | |
376 | unsigned char rcv_crc[2]; |
|
380 | unsigned char rcv_crc[2]; | |
377 | unsigned char computed_crc[2]; |
|
381 | unsigned char computed_crc[2]; | |
378 | } Packet_TM_LFR_TC_EXE_CORRUPTED_t; |
|
382 | } Packet_TM_LFR_TC_EXE_CORRUPTED_t; | |
379 |
|
383 | |||
380 | typedef struct { |
|
384 | typedef struct { | |
381 | unsigned char targetLogicalAddress; |
|
385 | unsigned char targetLogicalAddress; | |
382 | unsigned char protocolIdentifier; |
|
386 | unsigned char protocolIdentifier; | |
383 | unsigned char reserved; |
|
387 | unsigned char reserved; | |
384 | unsigned char userApplication; |
|
388 | unsigned char userApplication; | |
385 | unsigned char packetID[2]; |
|
389 | unsigned char packetID[2]; | |
386 | unsigned char packetSequenceControl[2]; |
|
390 | unsigned char packetSequenceControl[2]; | |
387 | unsigned char packetLength[2]; |
|
391 | unsigned char packetLength[2]; | |
388 | // DATA FIELD HEADER |
|
392 | // DATA FIELD HEADER | |
389 | unsigned char spare1_pusVersion_spare2; |
|
393 | unsigned char spare1_pusVersion_spare2; | |
390 | unsigned char serviceType; |
|
394 | unsigned char serviceType; | |
391 | unsigned char serviceSubType; |
|
395 | unsigned char serviceSubType; | |
392 | unsigned char destinationID; |
|
396 | unsigned char destinationID; | |
393 | unsigned char time[6]; |
|
397 | unsigned char time[6]; | |
394 | // AUXILIARY HEADER |
|
398 | // AUXILIARY HEADER | |
395 | unsigned char sid; |
|
399 | unsigned char sid; | |
396 | unsigned char hkBIA; |
|
400 | unsigned char hkBIA; | |
397 | unsigned char pktCnt; |
|
401 | unsigned char pktCnt; | |
398 | unsigned char pktNr; |
|
402 | unsigned char pktNr; | |
399 | unsigned char acquisitionTime[6]; |
|
403 | unsigned char acquisitionTime[6]; | |
400 | unsigned char blkNr[2]; |
|
404 | unsigned char blkNr[2]; | |
401 | } Header_TM_LFR_SCIENCE_SWF_t; |
|
405 | } Header_TM_LFR_SCIENCE_SWF_t; | |
402 |
|
406 | |||
403 | typedef struct { |
|
407 | typedef struct { | |
404 | unsigned char targetLogicalAddress; |
|
408 | unsigned char targetLogicalAddress; | |
405 | unsigned char protocolIdentifier; |
|
409 | unsigned char protocolIdentifier; | |
406 | unsigned char reserved; |
|
410 | unsigned char reserved; | |
407 | unsigned char userApplication; |
|
411 | unsigned char userApplication; | |
408 | unsigned char packetID[2]; |
|
412 | unsigned char packetID[2]; | |
409 | unsigned char packetSequenceControl[2]; |
|
413 | unsigned char packetSequenceControl[2]; | |
410 | unsigned char packetLength[2]; |
|
414 | unsigned char packetLength[2]; | |
411 | // DATA FIELD HEADER |
|
415 | // DATA FIELD HEADER | |
412 | unsigned char spare1_pusVersion_spare2; |
|
416 | unsigned char spare1_pusVersion_spare2; | |
413 | unsigned char serviceType; |
|
417 | unsigned char serviceType; | |
414 | unsigned char serviceSubType; |
|
418 | unsigned char serviceSubType; | |
415 | unsigned char destinationID; |
|
419 | unsigned char destinationID; | |
416 | unsigned char time[6]; |
|
420 | unsigned char time[6]; | |
417 | // AUXILIARY DATA HEADER |
|
421 | // AUXILIARY DATA HEADER | |
418 | unsigned char sid; |
|
422 | unsigned char sid; | |
419 | unsigned char hkBIA; |
|
423 | unsigned char hkBIA; | |
420 | unsigned char acquisitionTime[6]; |
|
424 | unsigned char acquisitionTime[6]; | |
421 | unsigned char blkNr[2]; |
|
425 | unsigned char blkNr[2]; | |
422 | } Header_TM_LFR_SCIENCE_CWF_t; |
|
426 | } Header_TM_LFR_SCIENCE_CWF_t; | |
423 |
|
427 | |||
424 | typedef struct { |
|
428 | typedef struct { | |
425 | unsigned char targetLogicalAddress; |
|
429 | unsigned char targetLogicalAddress; | |
426 | unsigned char protocolIdentifier; |
|
430 | unsigned char protocolIdentifier; | |
427 | unsigned char reserved; |
|
431 | unsigned char reserved; | |
428 | unsigned char userApplication; |
|
432 | unsigned char userApplication; | |
429 | unsigned char packetID[2]; |
|
433 | unsigned char packetID[2]; | |
430 | unsigned char packetSequenceControl[2]; |
|
434 | unsigned char packetSequenceControl[2]; | |
431 | unsigned char packetLength[2]; |
|
435 | unsigned char packetLength[2]; | |
432 | // DATA FIELD HEADER |
|
436 | // DATA FIELD HEADER | |
433 | unsigned char spare1_pusVersion_spare2; |
|
437 | unsigned char spare1_pusVersion_spare2; | |
434 | unsigned char serviceType; |
|
438 | unsigned char serviceType; | |
435 | unsigned char serviceSubType; |
|
439 | unsigned char serviceSubType; | |
436 | unsigned char destinationID; |
|
440 | unsigned char destinationID; | |
437 | unsigned char time[6]; |
|
441 | unsigned char time[6]; | |
438 | // AUXILIARY HEADER |
|
442 | // AUXILIARY HEADER | |
439 | unsigned char sid; |
|
443 | unsigned char sid; | |
440 | unsigned char biaStatusInfo; |
|
444 | unsigned char biaStatusInfo; | |
441 |
unsigned char |
|
445 | unsigned char pa_lfr_pkt_cnt_asm; | |
442 |
unsigned char |
|
446 | unsigned char pa_lfr_pkt_nr_asm; | |
443 | unsigned char acquisitionTime[6]; |
|
447 | unsigned char acquisitionTime[6]; | |
444 |
unsigned char |
|
448 | unsigned char pa_lfr_asm_blk_nr[2]; | |
445 | } Header_TM_LFR_SCIENCE_ASM_t; |
|
449 | } Header_TM_LFR_SCIENCE_ASM_t; | |
446 |
|
450 | |||
447 | typedef struct { |
|
451 | typedef struct { | |
448 | //targetLogicalAddress is removed by the grspw module |
|
452 | //targetLogicalAddress is removed by the grspw module | |
449 | unsigned char protocolIdentifier; |
|
453 | unsigned char protocolIdentifier; | |
450 | unsigned char reserved; |
|
454 | unsigned char reserved; | |
451 | unsigned char userApplication; |
|
455 | unsigned char userApplication; | |
452 | unsigned char packetID[2]; |
|
456 | unsigned char packetID[2]; | |
453 | unsigned char packetSequenceControl[2]; |
|
457 | unsigned char packetSequenceControl[2]; | |
454 | unsigned char packetLength[2]; |
|
458 | unsigned char packetLength[2]; | |
455 | // DATA FIELD HEADER |
|
459 | // DATA FIELD HEADER | |
456 | unsigned char headerFlag_pusVersion_Ack; |
|
460 | unsigned char headerFlag_pusVersion_Ack; | |
457 | unsigned char serviceType; |
|
461 | unsigned char serviceType; | |
458 | unsigned char serviceSubType; |
|
462 | unsigned char serviceSubType; | |
459 | unsigned char sourceID; |
|
463 | unsigned char sourceID; | |
460 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; |
|
464 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; | |
461 | } ccsdsTelecommandPacket_t; |
|
465 | } ccsdsTelecommandPacket_t; | |
462 |
|
466 | |||
463 | typedef struct { |
|
467 | typedef struct { | |
464 | unsigned char targetLogicalAddress; |
|
468 | unsigned char targetLogicalAddress; | |
465 | unsigned char protocolIdentifier; |
|
469 | unsigned char protocolIdentifier; | |
466 | unsigned char reserved; |
|
470 | unsigned char reserved; | |
467 | unsigned char userApplication; |
|
471 | unsigned char userApplication; | |
468 | unsigned char packetID[2]; |
|
472 | unsigned char packetID[2]; | |
469 | unsigned char packetSequenceControl[2]; |
|
473 | unsigned char packetSequenceControl[2]; | |
470 | unsigned char packetLength[2]; |
|
474 | unsigned char packetLength[2]; | |
471 | unsigned char spare1_pusVersion_spare2; |
|
475 | unsigned char spare1_pusVersion_spare2; | |
472 | unsigned char serviceType; |
|
476 | unsigned char serviceType; | |
473 | unsigned char serviceSubType; |
|
477 | unsigned char serviceSubType; | |
474 | unsigned char destinationID; |
|
478 | unsigned char destinationID; | |
475 | unsigned char time[6]; |
|
479 | unsigned char time[6]; | |
476 | unsigned char sid; |
|
480 | unsigned char sid; | |
477 |
|
481 | |||
478 | //************** |
|
482 | //************** | |
479 | // HK PARAMETERS |
|
483 | // HK PARAMETERS | |
480 | unsigned char lfr_status_word[2]; |
|
484 | unsigned char lfr_status_word[2]; | |
481 | unsigned char lfr_sw_version[4]; |
|
485 | unsigned char lfr_sw_version[4]; | |
482 | unsigned char lfr_fpga_version[3]; |
|
486 | unsigned char lfr_fpga_version[3]; | |
483 | // ressource statistics |
|
487 | // ressource statistics | |
484 | unsigned char hk_lfr_cpu_load; |
|
488 | unsigned char hk_lfr_cpu_load; | |
485 | unsigned char hk_lfr_load_max; |
|
489 | unsigned char hk_lfr_load_max; | |
486 | unsigned char hk_lfr_load_aver; |
|
490 | unsigned char hk_lfr_load_aver; | |
487 | // tc statistics |
|
491 | // tc statistics | |
488 | unsigned char hk_lfr_update_info_tc_cnt[2]; |
|
492 | unsigned char hk_lfr_update_info_tc_cnt[2]; | |
489 | unsigned char hk_lfr_update_time_tc_cnt[2]; |
|
493 | unsigned char hk_lfr_update_time_tc_cnt[2]; | |
490 | unsigned char hk_lfr_exe_tc_cnt[2]; |
|
494 | unsigned char hk_lfr_exe_tc_cnt[2]; | |
491 | unsigned char hk_lfr_rej_tc_cnt[2]; |
|
495 | unsigned char hk_lfr_rej_tc_cnt[2]; | |
492 | unsigned char hk_lfr_last_exe_tc_id[2]; |
|
496 | unsigned char hk_lfr_last_exe_tc_id[2]; | |
493 | unsigned char hk_lfr_last_exe_tc_type[2]; |
|
497 | unsigned char hk_lfr_last_exe_tc_type[2]; | |
494 | unsigned char hk_lfr_last_exe_tc_subtype[2]; |
|
498 | unsigned char hk_lfr_last_exe_tc_subtype[2]; | |
495 | unsigned char hk_lfr_last_exe_tc_time[6]; |
|
499 | unsigned char hk_lfr_last_exe_tc_time[6]; | |
496 | unsigned char hk_lfr_last_rej_tc_id[2]; |
|
500 | unsigned char hk_lfr_last_rej_tc_id[2]; | |
497 | unsigned char hk_lfr_last_rej_tc_type[2]; |
|
501 | unsigned char hk_lfr_last_rej_tc_type[2]; | |
498 | unsigned char hk_lfr_last_rej_tc_subtype[2]; |
|
502 | unsigned char hk_lfr_last_rej_tc_subtype[2]; | |
499 | unsigned char hk_lfr_last_rej_tc_time[6]; |
|
503 | unsigned char hk_lfr_last_rej_tc_time[6]; | |
500 | // anomaly statistics |
|
504 | // anomaly statistics | |
501 | unsigned char hk_lfr_le_cnt[2]; |
|
505 | unsigned char hk_lfr_le_cnt[2]; | |
502 | unsigned char hk_lfr_me_cnt[2]; |
|
506 | unsigned char hk_lfr_me_cnt[2]; | |
503 | unsigned char hk_lfr_he_cnt[2]; |
|
507 | unsigned char hk_lfr_he_cnt[2]; | |
504 | unsigned char hk_lfr_last_er_rid[2]; |
|
508 | unsigned char hk_lfr_last_er_rid[2]; | |
505 | unsigned char hk_lfr_last_er_code; |
|
509 | unsigned char hk_lfr_last_er_code; | |
506 | unsigned char hk_lfr_last_er_time[6]; |
|
510 | unsigned char hk_lfr_last_er_time[6]; | |
507 | // vhdl_blk_status |
|
511 | // vhdl_blk_status | |
508 | unsigned char hk_lfr_vhdl_aa_sm; |
|
512 | unsigned char hk_lfr_vhdl_aa_sm; | |
509 | unsigned char hk_lfr_vhdl_fft_sr; |
|
513 | unsigned char hk_lfr_vhdl_fft_sr; | |
510 | unsigned char hk_lfr_vhdl_cic_hk; |
|
514 | unsigned char hk_lfr_vhdl_cic_hk; | |
511 | unsigned char hk_lfr_vhdl_iir_cal; |
|
515 | unsigned char hk_lfr_vhdl_iir_cal; | |
512 | // spacewire_if_statistics |
|
516 | // spacewire_if_statistics | |
513 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; |
|
517 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; | |
514 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; |
|
518 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; | |
515 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; |
|
519 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; | |
516 | unsigned char hk_lfr_dpu_spw_last_timc; |
|
520 | unsigned char hk_lfr_dpu_spw_last_timc; | |
517 | // ahb error statistics |
|
521 | // ahb error statistics | |
518 | unsigned int hk_lfr_last_fail_addr; |
|
522 | unsigned int hk_lfr_last_fail_addr; | |
519 | // temperatures |
|
523 | // temperatures | |
520 | unsigned char hk_lfr_temp_scm[2]; |
|
524 | unsigned char hk_lfr_temp_scm[2]; | |
521 | unsigned char hk_lfr_temp_pcb[2]; |
|
525 | unsigned char hk_lfr_temp_pcb[2]; | |
522 | unsigned char hk_lfr_temp_fpga[2]; |
|
526 | unsigned char hk_lfr_temp_fpga[2]; | |
523 | // spacecraft potential |
|
527 | // spacecraft potential | |
524 | unsigned char hk_lfr_sc_v_f3[2]; |
|
528 | unsigned char hk_lfr_sc_v_f3[2]; | |
525 | unsigned char hk_lfr_sc_e1_f3[2]; |
|
529 | unsigned char hk_lfr_sc_e1_f3[2]; | |
526 | unsigned char hk_lfr_sc_e2_f3[2]; |
|
530 | unsigned char hk_lfr_sc_e2_f3[2]; | |
527 | // error counters |
|
531 | // error counters | |
528 | unsigned char hk_lfr_dpu_spw_parity; |
|
532 | unsigned char hk_lfr_dpu_spw_parity; | |
529 | unsigned char hk_lfr_dpu_spw_disconnect; |
|
533 | unsigned char hk_lfr_dpu_spw_disconnect; | |
530 | unsigned char hk_lfr_dpu_spw_escape; |
|
534 | unsigned char hk_lfr_dpu_spw_escape; | |
531 | unsigned char hk_lfr_dpu_spw_credit; |
|
535 | unsigned char hk_lfr_dpu_spw_credit; | |
532 | unsigned char hk_lfr_dpu_spw_write_sync; |
|
536 | unsigned char hk_lfr_dpu_spw_write_sync; | |
533 | unsigned char hk_lfr_dpu_spw_rx_ahb; |
|
537 | unsigned char hk_lfr_dpu_spw_rx_ahb; | |
534 | unsigned char hk_lfr_dpu_spw_tx_ahb; |
|
538 | unsigned char hk_lfr_dpu_spw_tx_ahb; | |
535 | unsigned char hk_lfr_dpu_spw_early_eop; |
|
539 | unsigned char hk_lfr_dpu_spw_early_eop; | |
536 | unsigned char hk_lfr_dpu_spw_invalid_addr; |
|
540 | unsigned char hk_lfr_dpu_spw_invalid_addr; | |
537 | unsigned char hk_lfr_dpu_spw_eep; |
|
541 | unsigned char hk_lfr_dpu_spw_eep; | |
538 | unsigned char hk_lfr_dpu_spw_rx_too_big; |
|
542 | unsigned char hk_lfr_dpu_spw_rx_too_big; | |
539 | // timecode |
|
543 | // timecode | |
540 | unsigned char hk_lfr_timecode_erroneous; |
|
544 | unsigned char hk_lfr_timecode_erroneous; | |
541 | unsigned char hk_lfr_timecode_missing; |
|
545 | unsigned char hk_lfr_timecode_missing; | |
542 | unsigned char hk_lfr_timecode_invalid; |
|
546 | unsigned char hk_lfr_timecode_invalid; | |
543 | // time |
|
547 | // time | |
544 | unsigned char hk_lfr_time_timecode_it; |
|
548 | unsigned char hk_lfr_time_timecode_it; | |
545 | unsigned char hk_lfr_time_not_synchro; |
|
549 | unsigned char hk_lfr_time_not_synchro; | |
546 | unsigned char hk_lfr_time_timecode_ctr; |
|
550 | unsigned char hk_lfr_time_timecode_ctr; | |
547 | // hk_lfr_buffer_dpu_ |
|
551 | // hk_lfr_buffer_dpu_ | |
548 | unsigned char hk_lfr_buffer_dpu_tc_fifo; |
|
552 | unsigned char hk_lfr_buffer_dpu_tc_fifo; | |
549 | unsigned char hk_lfr_buffer_dpu_tm_fifo; |
|
553 | unsigned char hk_lfr_buffer_dpu_tm_fifo; | |
550 | // hk_lfr_ahb_ |
|
554 | // hk_lfr_ahb_ | |
551 | unsigned char hk_lfr_ahb_correctable; |
|
555 | unsigned char hk_lfr_ahb_correctable; | |
552 | unsigned char hk_lfr_ahb_uncorrectable; |
|
556 | unsigned char hk_lfr_ahb_uncorrectable; | |
553 | // spare |
|
557 | // spare | |
554 | unsigned char parameters_spare; |
|
558 | unsigned char parameters_spare; | |
555 | } Packet_TM_LFR_HK_t; |
|
559 | } Packet_TM_LFR_HK_t; | |
556 |
|
560 | |||
557 | typedef struct { |
|
561 | typedef struct { | |
558 | unsigned char targetLogicalAddress; |
|
562 | unsigned char targetLogicalAddress; | |
559 | unsigned char protocolIdentifier; |
|
563 | unsigned char protocolIdentifier; | |
560 | unsigned char reserved; |
|
564 | unsigned char reserved; | |
561 | unsigned char userApplication; |
|
565 | unsigned char userApplication; | |
562 | unsigned char packetID[2]; |
|
566 | unsigned char packetID[2]; | |
563 | unsigned char packetSequenceControl[2]; |
|
567 | unsigned char packetSequenceControl[2]; | |
564 | unsigned char packetLength[2]; |
|
568 | unsigned char packetLength[2]; | |
565 | // DATA FIELD HEADER |
|
569 | // DATA FIELD HEADER | |
566 | unsigned char spare1_pusVersion_spare2; |
|
570 | unsigned char spare1_pusVersion_spare2; | |
567 | unsigned char serviceType; |
|
571 | unsigned char serviceType; | |
568 | unsigned char serviceSubType; |
|
572 | unsigned char serviceSubType; | |
569 | unsigned char destinationID; |
|
573 | unsigned char destinationID; | |
570 | unsigned char time[6]; |
|
574 | unsigned char time[6]; | |
571 | unsigned char sid; |
|
575 | unsigned char sid; | |
572 |
|
576 | |||
573 | //****************** |
|
577 | //****************** | |
574 | // COMMON PARAMETERS |
|
578 | // COMMON PARAMETERS | |
575 | unsigned char unused0; |
|
579 | unsigned char unused0; | |
576 | unsigned char bw_sp0_sp1_r0_r1; |
|
580 | unsigned char bw_sp0_sp1_r0_r1; | |
577 |
|
581 | |||
578 | //****************** |
|
582 | //****************** | |
579 | // NORMAL PARAMETERS |
|
583 | // NORMAL PARAMETERS | |
580 | unsigned char sy_lfr_n_swf_l[2]; |
|
584 | unsigned char sy_lfr_n_swf_l[2]; | |
581 | unsigned char sy_lfr_n_swf_p[2]; |
|
585 | unsigned char sy_lfr_n_swf_p[2]; | |
582 | unsigned char sy_lfr_n_asm_p[2]; |
|
586 | unsigned char sy_lfr_n_asm_p[2]; | |
583 | unsigned char sy_lfr_n_bp_p0; |
|
587 | unsigned char sy_lfr_n_bp_p0; | |
584 | unsigned char sy_lfr_n_bp_p1; |
|
588 | unsigned char sy_lfr_n_bp_p1; | |
585 | unsigned char sy_lfr_n_cwf_long_f3; |
|
589 | unsigned char sy_lfr_n_cwf_long_f3; | |
586 | unsigned char lfr_normal_parameters_spare; |
|
590 | unsigned char lfr_normal_parameters_spare; | |
587 |
|
591 | |||
588 | //***************** |
|
592 | //***************** | |
589 | // BURST PARAMETERS |
|
593 | // BURST PARAMETERS | |
590 | unsigned char sy_lfr_b_bp_p0; |
|
594 | unsigned char sy_lfr_b_bp_p0; | |
591 | unsigned char sy_lfr_b_bp_p1; |
|
595 | unsigned char sy_lfr_b_bp_p1; | |
592 |
|
596 | |||
593 | //**************** |
|
597 | //**************** | |
594 | // SBM1 PARAMETERS |
|
598 | // SBM1 PARAMETERS | |
595 | unsigned char sy_lfr_s1_bp_p0; |
|
599 | unsigned char sy_lfr_s1_bp_p0; | |
596 | unsigned char sy_lfr_s1_bp_p1; |
|
600 | unsigned char sy_lfr_s1_bp_p1; | |
597 |
|
601 | |||
598 | //**************** |
|
602 | //**************** | |
599 | // SBM2 PARAMETERS |
|
603 | // SBM2 PARAMETERS | |
600 | unsigned char sy_lfr_s2_bp_p0; |
|
604 | unsigned char sy_lfr_s2_bp_p0; | |
601 | unsigned char sy_lfr_s2_bp_p1; |
|
605 | unsigned char sy_lfr_s2_bp_p1; | |
|
606 | ||||
|
607 | // SPARE | |||
|
608 | unsigned char source_data_spare; | |||
602 | } Packet_TM_LFR_PARAMETER_DUMP_t; |
|
609 | } Packet_TM_LFR_PARAMETER_DUMP_t; | |
603 |
|
610 | |||
604 |
|
611 | |||
605 | #endif // CCSDS_TYPES_H_INCLUDED |
|
612 | #endif // CCSDS_TYPES_H_INCLUDED |
@@ -1,228 +1,212 | |||||
1 | #ifndef FSW_PARAMS_H_INCLUDED |
|
1 | #ifndef FSW_PARAMS_H_INCLUDED | |
2 | #define FSW_PARAMS_H_INCLUDED |
|
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 | typedef struct ring_node |
|
12 | typedef struct ring_node | |
13 | { |
|
13 | { | |
14 | struct ring_node *previous; |
|
14 | struct ring_node *previous; | |
15 | int buffer_address; |
|
15 | int buffer_address; | |
16 | struct ring_node *next; |
|
16 | struct ring_node *next; | |
17 | unsigned int status; |
|
17 | unsigned int status; | |
18 | } ring_node; |
|
18 | } ring_node; | |
19 |
|
19 | |||
20 | typedef struct ring_node_sm |
|
|||
21 | { |
|
|||
22 | struct ring_node *previous; |
|
|||
23 | volatile int *buffer_address; |
|
|||
24 | struct ring_node *next; |
|
|||
25 | unsigned int status; |
|
|||
26 | } ring_node_sm; |
|
|||
27 |
|
||||
28 | //************************ |
|
20 | //************************ | |
29 | // flight software version |
|
21 | // flight software version | |
30 | // this parameters is handled by the Qt project options |
|
22 | // this parameters is handled by the Qt project options | |
31 |
|
23 | |||
32 | #define NB_PACKETS_PER_GROUP_OF_CWF 8 // 8 packets containing 336 blk |
|
24 | #define NB_PACKETS_PER_GROUP_OF_CWF 8 // 8 packets containing 336 blk | |
33 | #define NB_PACKETS_PER_GROUP_OF_CWF_LIGHT 4 // 4 packets containing 672 blk |
|
25 | #define NB_PACKETS_PER_GROUP_OF_CWF_LIGHT 4 // 4 packets containing 672 blk | |
34 | #define NB_SAMPLES_PER_SNAPSHOT 2688 // 336 * 8 = 672 * 4 = 2688 |
|
26 | #define NB_SAMPLES_PER_SNAPSHOT 2688 // 336 * 8 = 672 * 4 = 2688 | |
35 | #define TIME_OFFSET 2 |
|
27 | #define TIME_OFFSET 2 | |
36 | #define TIME_OFFSET_IN_BYTES 8 |
|
28 | #define TIME_OFFSET_IN_BYTES 8 | |
37 | #define WAVEFORM_EXTENDED_HEADER_OFFSET 22 |
|
29 | #define WAVEFORM_EXTENDED_HEADER_OFFSET 22 | |
38 | #define NB_BYTES_SWF_BLK (2 * 6) |
|
30 | #define NB_BYTES_SWF_BLK (2 * 6) | |
39 | #define NB_WORDS_SWF_BLK 3 |
|
31 | #define NB_WORDS_SWF_BLK 3 | |
40 | #define NB_BYTES_CWF3_LIGHT_BLK 6 |
|
32 | #define NB_BYTES_CWF3_LIGHT_BLK 6 | |
41 | #define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8 |
|
33 | #define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8 | |
42 | #define NB_RING_NODES_F0 3 // AT LEAST 3 |
|
34 | #define NB_RING_NODES_F0 3 // AT LEAST 3 | |
43 | #define NB_RING_NODES_F1 5 // AT LEAST 3 |
|
35 | #define NB_RING_NODES_F1 5 // AT LEAST 3 | |
44 | #define NB_RING_NODES_F2 5 // AT LEAST 3 |
|
36 | #define NB_RING_NODES_F2 5 // AT LEAST 3 | |
45 | #define NB_RING_NODES_ASM_F0 12 // AT LEAST 3 |
|
37 | #define NB_RING_NODES_ASM_F0 12 // AT LEAST 3 | |
46 | #define NB_RING_NODES_ASM_F1 2 // AT LEAST 3 |
|
38 | #define NB_RING_NODES_ASM_F1 2 // AT LEAST 3 | |
47 | #define NB_RING_NODES_ASM_F2 2 // AT LEAST 3 |
|
39 | #define NB_RING_NODES_ASM_F2 2 // AT LEAST 3 | |
48 |
|
40 | |||
49 | //********** |
|
41 | //********** | |
50 | // LFR MODES |
|
42 | // LFR MODES | |
51 | #define LFR_MODE_STANDBY 0 |
|
43 | #define LFR_MODE_STANDBY 0 | |
52 | #define LFR_MODE_NORMAL 1 |
|
44 | #define LFR_MODE_NORMAL 1 | |
53 | #define LFR_MODE_BURST 2 |
|
45 | #define LFR_MODE_BURST 2 | |
54 | #define LFR_MODE_SBM1 3 |
|
46 | #define LFR_MODE_SBM1 3 | |
55 | #define LFR_MODE_SBM2 4 |
|
47 | #define LFR_MODE_SBM2 4 | |
56 | #define LFR_MODE_NORMAL_CWF_F3 5 |
|
48 | #define LFR_MODE_NORMAL_CWF_F3 5 | |
57 |
|
49 | |||
58 | #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0 |
|
50 | #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0 | |
59 | #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1 |
|
51 | #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1 | |
60 | #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2 |
|
52 | #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2 | |
61 | #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3 |
|
53 | #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3 | |
62 | #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4 |
|
54 | #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4 | |
63 | #define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5 |
|
55 | #define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5 | |
64 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F0 RTEMS_EVENT_6 |
|
56 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F0 RTEMS_EVENT_6 | |
65 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F1 RTEMS_EVENT_7 |
|
57 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F1 RTEMS_EVENT_7 | |
66 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F2 RTEMS_EVENT_8 |
|
58 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F2 RTEMS_EVENT_8 | |
67 |
|
59 | |||
68 | //**************************** |
|
60 | //**************************** | |
69 | // LFR DEFAULT MODE PARAMETERS |
|
61 | // LFR DEFAULT MODE PARAMETERS | |
70 | // COMMON |
|
62 | // COMMON | |
71 | #define DEFAULT_SY_LFR_COMMON0 0x00 |
|
63 | #define DEFAULT_SY_LFR_COMMON0 0x00 | |
72 | #define DEFAULT_SY_LFR_COMMON1 0x10 // default value 0 0 0 1 0 0 0 0 |
|
64 | #define DEFAULT_SY_LFR_COMMON1 0x10 // default value 0 0 0 1 0 0 0 0 | |
73 | // NORM |
|
65 | // NORM | |
74 | #define SY_LFR_N_SWF_L 2048 // nb sample |
|
66 | #define SY_LFR_N_SWF_L 2048 // nb sample | |
75 | #define SY_LFR_N_SWF_P 300 // sec |
|
67 | #define SY_LFR_N_SWF_P 300 // sec | |
76 | #define SY_LFR_N_ASM_P 3600 // sec |
|
68 | #define SY_LFR_N_ASM_P 3600 // sec | |
77 | #define SY_LFR_N_BP_P0 4 // sec |
|
69 | #define SY_LFR_N_BP_P0 4 // sec | |
78 | #define SY_LFR_N_BP_P1 20 // sec |
|
70 | #define SY_LFR_N_BP_P1 20 // sec | |
79 | #define SY_LFR_N_CWF_LONG_F3 0 // 0 => production of light continuous waveforms at f3 |
|
71 | #define SY_LFR_N_CWF_LONG_F3 0 // 0 => production of light continuous waveforms at f3 | |
80 | #define MIN_DELTA_SNAPSHOT 16 // sec |
|
72 | #define MIN_DELTA_SNAPSHOT 16 // sec | |
81 | // BURST |
|
73 | // BURST | |
82 | #define DEFAULT_SY_LFR_B_BP_P0 1 // sec |
|
74 | #define DEFAULT_SY_LFR_B_BP_P0 1 // sec | |
83 | #define DEFAULT_SY_LFR_B_BP_P1 5 // sec |
|
75 | #define DEFAULT_SY_LFR_B_BP_P1 5 // sec | |
84 | // SBM1 |
|
76 | // SBM1 | |
85 | #define DEFAULT_SY_LFR_S1_BP_P0 1 // sec |
|
77 | #define DEFAULT_SY_LFR_S1_BP_P0 1 // sec | |
86 | #define DEFAULT_SY_LFR_S1_BP_P1 1 // sec |
|
78 | #define DEFAULT_SY_LFR_S1_BP_P1 1 // sec | |
87 | // SBM2 |
|
79 | // SBM2 | |
88 | #define DEFAULT_SY_LFR_S2_BP_P0 1 // sec |
|
80 | #define DEFAULT_SY_LFR_S2_BP_P0 1 // sec | |
89 | #define DEFAULT_SY_LFR_S2_BP_P1 5 // sec |
|
81 | #define DEFAULT_SY_LFR_S2_BP_P1 5 // sec | |
90 | // ADDITIONAL PARAMETERS |
|
82 | // ADDITIONAL PARAMETERS | |
91 | #define TIME_BETWEEN_TWO_SWF_PACKETS 30 // nb x 10 ms => 300 ms |
|
83 | #define TIME_BETWEEN_TWO_SWF_PACKETS 30 // nb x 10 ms => 300 ms | |
92 | #define TIME_BETWEEN_TWO_CWF3_PACKETS 1000 // nb x 10 ms => 10 s |
|
84 | #define TIME_BETWEEN_TWO_CWF3_PACKETS 1000 // nb x 10 ms => 10 s | |
93 | // STATUS WORD |
|
85 | // STATUS WORD | |
94 | #define DEFAULT_STATUS_WORD_BYTE0 0x0d // [0000] [1] [101] mode 4 bits / SPW enabled 1 bit / state is run 3 bits |
|
86 | #define DEFAULT_STATUS_WORD_BYTE0 0x0d // [0000] [1] [101] mode 4 bits / SPW enabled 1 bit / state is run 3 bits | |
95 | #define DEFAULT_STATUS_WORD_BYTE1 0x00 |
|
87 | #define DEFAULT_STATUS_WORD_BYTE1 0x00 | |
96 | // |
|
88 | // | |
97 | #define SY_LFR_DPU_CONNECT_TIMEOUT 100 // 100 * 10 ms = 1 s |
|
89 | #define SY_LFR_DPU_CONNECT_TIMEOUT 100 // 100 * 10 ms = 1 s | |
98 | #define SY_LFR_DPU_CONNECT_ATTEMPT 3 |
|
90 | #define SY_LFR_DPU_CONNECT_ATTEMPT 3 | |
99 | //**************************** |
|
91 | //**************************** | |
100 |
|
92 | |||
101 | //***************************** |
|
93 | //***************************** | |
102 | // APB REGISTERS BASE ADDRESSES |
|
94 | // APB REGISTERS BASE ADDRESSES | |
103 | #define REGS_ADDR_APBUART 0x80000100 |
|
95 | #define REGS_ADDR_APBUART 0x80000100 | |
104 | #define REGS_ADDR_GPTIMER 0x80000300 |
|
96 | #define REGS_ADDR_GPTIMER 0x80000300 | |
105 | #define REGS_ADDR_GRSPW 0x80000500 |
|
97 | #define REGS_ADDR_GRSPW 0x80000500 | |
106 | #define REGS_ADDR_TIME_MANAGEMENT 0x80000600 |
|
98 | #define REGS_ADDR_TIME_MANAGEMENT 0x80000600 | |
107 | #define REGS_ADDR_SPECTRAL_MATRIX 0x80000f00 |
|
99 | #define REGS_ADDR_SPECTRAL_MATRIX 0x80000f00 | |
108 | #define REGS_ADDR_WAVEFORM_PICKER 0x80000f20 |
|
100 | #define REGS_ADDR_WAVEFORM_PICKER 0x80000f20 | |
109 |
|
101 | |||
110 | #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff |
|
102 | #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff | |
111 | #define APBUART_CTRL_REG_MASK_TE 0x00000002 |
|
103 | #define APBUART_CTRL_REG_MASK_TE 0x00000002 | |
112 | #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 (0x50) |
|
104 | #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 (0x50) | |
113 |
|
105 | |||
114 | //********** |
|
106 | //********** | |
115 | // IRQ LINES |
|
107 | // IRQ LINES | |
116 | #define IRQ_SM 9 |
|
108 | #define IRQ_SM_SIMULATOR 9 | |
117 |
#define IRQ_SPARC_SM 0x19 |
|
109 | #define IRQ_SPARC_SM_SIMULATOR 0x19 // see sparcv8.pdf p.76 for interrupt levels | |
118 | #define IRQ_WF 10 |
|
|||
119 | #define IRQ_SPARC_WF 0x1a // see sparcv8.pdf p.76 for interrupt levels |
|
|||
120 | #define IRQ_TIME1 12 |
|
|||
121 | #define IRQ_SPARC_TIME1 0x1c // see sparcv8.pdf p.76 for interrupt levels |
|
|||
122 | #define IRQ_TIME2 13 |
|
|||
123 | #define IRQ_SPARC_TIME2 0x1d // see sparcv8.pdf p.76 for interrupt levels |
|
|||
124 | #define IRQ_WAVEFORM_PICKER 14 |
|
110 | #define IRQ_WAVEFORM_PICKER 14 | |
125 | #define IRQ_SPARC_WAVEFORM_PICKER 0x1e // see sparcv8.pdf p.76 for interrupt levels |
|
111 | #define IRQ_SPARC_WAVEFORM_PICKER 0x1e // see sparcv8.pdf p.76 for interrupt levels | |
126 | #define IRQ_SPECTRAL_MATRIX 6 |
|
112 | #define IRQ_SPECTRAL_MATRIX 6 | |
127 | #define IRQ_SPARC_SPECTRAL_MATRIX 0x16 // see sparcv8.pdf p.76 for interrupt levels |
|
113 | #define IRQ_SPARC_SPECTRAL_MATRIX 0x16 // see sparcv8.pdf p.76 for interrupt levels | |
128 |
|
114 | |||
129 | //***** |
|
115 | //***** | |
130 | // TIME |
|
116 | // TIME | |
131 | #define CLKDIV_SM_SIMULATOR (10000 - 1) // 10 ms |
|
117 | #define CLKDIV_SM_SIMULATOR (10000 - 1) // 10 ms | |
132 | #define CLKDIV_WF_SIMULATOR (10000000 - 1) // 10 000 000 * 1 us = 10 s |
|
|||
133 | #define TIMER_SM_SIMULATOR 1 |
|
118 | #define TIMER_SM_SIMULATOR 1 | |
134 | #define TIMER_WF_SIMULATOR 2 |
|
|||
135 | #define HK_PERIOD 100 // 100 * 10ms => 1sec |
|
119 | #define HK_PERIOD 100 // 100 * 10ms => 1sec | |
136 |
|
120 | |||
137 | //********** |
|
121 | //********** | |
138 | // LPP CODES |
|
122 | // LPP CODES | |
139 | #define LFR_SUCCESSFUL 0 |
|
123 | #define LFR_SUCCESSFUL 0 | |
140 | #define LFR_DEFAULT 1 |
|
124 | #define LFR_DEFAULT 1 | |
141 |
|
125 | |||
142 | //****** |
|
126 | //****** | |
143 | // RTEMS |
|
127 | // RTEMS | |
144 | #define TASKID_RECV 1 |
|
128 | #define TASKID_RECV 1 | |
145 | #define TASKID_ACTN 2 |
|
129 | #define TASKID_ACTN 2 | |
146 | #define TASKID_SPIQ 3 |
|
130 | #define TASKID_SPIQ 3 | |
147 | #define TASKID_SMIQ 4 |
|
131 | #define TASKID_SMIQ 4 | |
148 | #define TASKID_STAT 5 |
|
132 | #define TASKID_STAT 5 | |
149 | #define TASKID_AVF0 6 |
|
133 | #define TASKID_AVF0 6 | |
150 | #define TASKID_BPF0 7 |
|
134 | #define TASKID_BPF0 7 | |
151 | #define TASKID_WFRM 8 |
|
135 | #define TASKID_WFRM 8 | |
152 | #define TASKID_DUMB 9 |
|
136 | #define TASKID_DUMB 9 | |
153 | #define TASKID_HOUS 10 |
|
137 | #define TASKID_HOUS 10 | |
154 | #define TASKID_MATR 11 |
|
138 | #define TASKID_MATR 11 | |
155 | #define TASKID_CWF3 12 |
|
139 | #define TASKID_CWF3 12 | |
156 | #define TASKID_CWF2 13 |
|
140 | #define TASKID_CWF2 13 | |
157 | #define TASKID_CWF1 14 |
|
141 | #define TASKID_CWF1 14 | |
158 | #define TASKID_SEND 15 |
|
142 | #define TASKID_SEND 15 | |
159 | #define TASKID_WTDG 16 |
|
143 | #define TASKID_WTDG 16 | |
160 |
|
144 | |||
161 | #define TASK_PRIORITY_SPIQ 5 |
|
145 | #define TASK_PRIORITY_SPIQ 5 | |
162 | #define TASK_PRIORITY_SMIQ 10 |
|
146 | #define TASK_PRIORITY_SMIQ 10 | |
163 | #define TASK_PRIORITY_WTDG 20 |
|
147 | #define TASK_PRIORITY_WTDG 20 | |
164 | #define TASK_PRIORITY_HOUS 30 |
|
148 | #define TASK_PRIORITY_HOUS 30 | |
165 | #define TASK_PRIORITY_CWF1 35 // CWF1 and CWF2 are never running together |
|
149 | #define TASK_PRIORITY_CWF1 35 // CWF1 and CWF2 are never running together | |
166 | #define TASK_PRIORITY_CWF2 35 // |
|
150 | #define TASK_PRIORITY_CWF2 35 // | |
167 | #define TASK_PRIORITY_WFRM 40 |
|
151 | #define TASK_PRIORITY_WFRM 40 | |
168 | #define TASK_PRIORITY_CWF3 40 // there is a printf in this function, be careful with its priority wrt CWF1 |
|
152 | #define TASK_PRIORITY_CWF3 40 // there is a printf in this function, be careful with its priority wrt CWF1 | |
169 | #define TASK_PRIORITY_SEND 45 |
|
153 | #define TASK_PRIORITY_SEND 45 | |
170 | #define TASK_PRIORITY_RECV 50 |
|
154 | #define TASK_PRIORITY_RECV 50 | |
171 | #define TASK_PRIORITY_ACTN 50 |
|
155 | #define TASK_PRIORITY_ACTN 50 | |
172 | #define TASK_PRIORITY_AVF0 60 |
|
156 | #define TASK_PRIORITY_AVF0 60 | |
173 | #define TASK_PRIORITY_BPF0 60 |
|
157 | #define TASK_PRIORITY_BPF0 60 | |
174 | #define TASK_PRIORITY_MATR 100 |
|
158 | #define TASK_PRIORITY_MATR 100 | |
175 | #define TASK_PRIORITY_STAT 200 |
|
159 | #define TASK_PRIORITY_STAT 200 | |
176 | #define TASK_PRIORITY_DUMB 200 |
|
160 | #define TASK_PRIORITY_DUMB 200 | |
177 |
|
161 | |||
178 | #define ACTION_MSG_QUEUE_COUNT 10 |
|
162 | #define ACTION_MSG_QUEUE_COUNT 10 | |
179 | #define ACTION_MSG_PKTS_COUNT 50 |
|
163 | #define ACTION_MSG_PKTS_COUNT 50 | |
180 | #define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES) |
|
164 | #define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES) | |
181 | #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options |
|
165 | #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options | |
182 |
|
166 | |||
183 | #define QUEUE_RECV 0 |
|
167 | #define QUEUE_RECV 0 | |
184 | #define QUEUE_SEND 1 |
|
168 | #define QUEUE_SEND 1 | |
185 |
|
169 | |||
186 | //******* |
|
170 | //******* | |
187 | // MACROS |
|
171 | // MACROS | |
188 | #ifdef PRINT_MESSAGES_ON_CONSOLE |
|
172 | #ifdef PRINT_MESSAGES_ON_CONSOLE | |
189 | #define PRINTF(x) printf(x); |
|
173 | #define PRINTF(x) printf(x); | |
190 | #define PRINTF1(x,y) printf(x,y); |
|
174 | #define PRINTF1(x,y) printf(x,y); | |
191 | #define PRINTF2(x,y,z) printf(x,y,z); |
|
175 | #define PRINTF2(x,y,z) printf(x,y,z); | |
192 | #else |
|
176 | #else | |
193 | #define PRINTF(x) ; |
|
177 | #define PRINTF(x) ; | |
194 | #define PRINTF1(x,y) ; |
|
178 | #define PRINTF1(x,y) ; | |
195 | #define PRINTF2(x,y,z) ; |
|
179 | #define PRINTF2(x,y,z) ; | |
196 | #endif |
|
180 | #endif | |
197 |
|
181 | |||
198 | #ifdef BOOT_MESSAGES |
|
182 | #ifdef BOOT_MESSAGES | |
199 | #define BOOT_PRINTF(x) printf(x); |
|
183 | #define BOOT_PRINTF(x) printf(x); | |
200 | #define BOOT_PRINTF1(x,y) printf(x,y); |
|
184 | #define BOOT_PRINTF1(x,y) printf(x,y); | |
201 | #define BOOT_PRINTF2(x,y,z) printf(x,y,z); |
|
185 | #define BOOT_PRINTF2(x,y,z) printf(x,y,z); | |
202 | #else |
|
186 | #else | |
203 | #define BOOT_PRINTF(x) ; |
|
187 | #define BOOT_PRINTF(x) ; | |
204 | #define BOOT_PRINTF1(x,y) ; |
|
188 | #define BOOT_PRINTF1(x,y) ; | |
205 | #define BOOT_PRINTF2(x,y,z) ; |
|
189 | #define BOOT_PRINTF2(x,y,z) ; | |
206 | #endif |
|
190 | #endif | |
207 |
|
191 | |||
208 | #ifdef DEBUG_MESSAGES |
|
192 | #ifdef DEBUG_MESSAGES | |
209 | #define DEBUG_PRINTF(x) printf(x); |
|
193 | #define DEBUG_PRINTF(x) printf(x); | |
210 | #define DEBUG_PRINTF1(x,y) printf(x,y); |
|
194 | #define DEBUG_PRINTF1(x,y) printf(x,y); | |
211 | #define DEBUG_PRINTF2(x,y,z) printf(x,y,z); |
|
195 | #define DEBUG_PRINTF2(x,y,z) printf(x,y,z); | |
212 | #else |
|
196 | #else | |
213 | #define DEBUG_PRINTF(x) ; |
|
197 | #define DEBUG_PRINTF(x) ; | |
214 | #define DEBUG_PRINTF1(x,y) ; |
|
198 | #define DEBUG_PRINTF1(x,y) ; | |
215 | #define DEBUG_PRINTF2(x,y,z) ; |
|
199 | #define DEBUG_PRINTF2(x,y,z) ; | |
216 | #endif |
|
200 | #endif | |
217 |
|
201 | |||
218 | #define CPU_USAGE_REPORT_PERIOD 6 // * 10 s = period |
|
202 | #define CPU_USAGE_REPORT_PERIOD 6 // * 10 s = period | |
219 |
|
203 | |||
220 | struct param_local_str{ |
|
204 | struct param_local_str{ | |
221 | unsigned int local_sbm1_nb_cwf_sent; |
|
205 | unsigned int local_sbm1_nb_cwf_sent; | |
222 | unsigned int local_sbm1_nb_cwf_max; |
|
206 | unsigned int local_sbm1_nb_cwf_max; | |
223 | unsigned int local_sbm2_nb_cwf_sent; |
|
207 | unsigned int local_sbm2_nb_cwf_sent; | |
224 | unsigned int local_sbm2_nb_cwf_max; |
|
208 | unsigned int local_sbm2_nb_cwf_max; | |
225 | unsigned int local_nb_interrupt_f0_MAX; |
|
209 | unsigned int local_nb_interrupt_f0_MAX; | |
226 | }; |
|
210 | }; | |
227 |
|
211 | |||
228 | #endif // FSW_PARAMS_H_INCLUDED |
|
212 | #endif // FSW_PARAMS_H_INCLUDED |
@@ -1,26 +1,42 | |||||
1 | #ifndef FSW_PARAMS_PROCESSING_H |
|
1 | #ifndef FSW_PARAMS_PROCESSING_H | |
2 | #define FSW_PARAMS_PROCESSING_H |
|
2 | #define FSW_PARAMS_PROCESSING_H | |
3 |
|
3 | |||
4 | #define NB_BINS_PER_SM 128 // |
|
4 | #define NB_BINS_PER_SM 128 // | |
5 | #define NB_VALUES_PER_SM 25 // |
|
5 | #define NB_VALUES_PER_SM 25 // | |
6 | #define TOTAL_SIZE_SM 3200 // 25 * 128 |
|
6 | #define TOTAL_SIZE_SM 3200 // 25 * 128 | |
7 | #define SM_HEADER 0 // |
|
7 | #define SM_HEADER 0 // | |
8 |
|
8 | // | ||
|
9 | #define NB_BINS_PER_ASM_F0 88 | |||
|
10 | #define TOTAL_SIZE_ASM_F0 2200 // 25 * 88 | |||
|
11 | #define ASM_F0_INDICE_START 17 // 88 bins | |||
|
12 | #define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins | |||
|
13 | // | |||
|
14 | #define NB_BINS_PER_ASM_F1 104 | |||
|
15 | #define TOTAL_SIZE_ASM_F1 2600 // 25 * 104 | |||
|
16 | #define ASM_F1_INDICE_START 6 // 104 bins | |||
|
17 | #define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins | |||
|
18 | // | |||
|
19 | #define NB_BINS_PER_ASM_F2 96 | |||
|
20 | #define TOTAL_SIZE_ASM_F2 2400 // 25 * 96 | |||
|
21 | #define ASM_F2_INDICE_START 7 // 96 bins | |||
|
22 | #define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins | |||
|
23 | // | |||
9 | #define NB_BINS_COMPRESSED_SM_F0 11 |
|
24 | #define NB_BINS_COMPRESSED_SM_F0 11 | |
10 | #define NB_BINS_COMPRESSED_SM_F1 13 |
|
25 | #define NB_BINS_COMPRESSED_SM_F1 13 | |
11 | #define NB_BINS_COMPRESSED_SM_F2 12 |
|
26 | #define NB_BINS_COMPRESSED_SM_F2 12 | |
|
27 | // | |||
12 | #define TOTAL_SIZE_COMPRESSED_MATRIX_f0 (NB_BINS_COMPRESSED_SM_F0 * NB_VALUES_PER_SM) |
|
28 | #define TOTAL_SIZE_COMPRESSED_MATRIX_f0 (NB_BINS_COMPRESSED_SM_F0 * NB_VALUES_PER_SM) | |
13 | #define NB_AVERAGE_NORMAL_f0 96*4 |
|
29 | #define NB_AVERAGE_NORMAL_f0 96*4 | |
14 | #define NB_SM_TO_RECEIVE_BEFORE_AVF0 8 |
|
30 | #define NB_SM_TO_RECEIVE_BEFORE_AVF0 8 | |
15 |
|
31 | |||
16 | typedef struct { |
|
32 | typedef struct { | |
17 | volatile unsigned char PE[2]; |
|
33 | volatile unsigned char PE[2]; | |
18 | volatile unsigned char PB[2]; |
|
34 | volatile unsigned char PB[2]; | |
19 | volatile unsigned char V0; |
|
35 | volatile unsigned char V0; | |
20 | volatile unsigned char V1; |
|
36 | volatile unsigned char V1; | |
21 | volatile unsigned char V2_ELLIP_DOP; |
|
37 | volatile unsigned char V2_ELLIP_DOP; | |
22 | volatile unsigned char SZ; |
|
38 | volatile unsigned char SZ; | |
23 | volatile unsigned char VPHI; |
|
39 | volatile unsigned char VPHI; | |
24 | } BP1_t; |
|
40 | } BP1_t; | |
25 |
|
41 | |||
26 | #endif // FSW_PARAMS_PROCESSING_H |
|
42 | #endif // FSW_PARAMS_PROCESSING_H |
@@ -1,56 +1,56 | |||||
1 | #ifndef FSW_PROCESSING_H_INCLUDED |
|
1 | #ifndef FSW_PROCESSING_H_INCLUDED | |
2 | #define FSW_PROCESSING_H_INCLUDED |
|
2 | #define FSW_PROCESSING_H_INCLUDED | |
3 |
|
3 | |||
4 | #include <rtems.h> |
|
4 | #include <rtems.h> | |
5 | #include <grspw.h> |
|
5 | #include <grspw.h> | |
6 | #include <math.h> |
|
6 | #include <math.h> | |
7 | #include <stdlib.h> // abs() is in the stdlib |
|
7 | #include <stdlib.h> // abs() is in the stdlib | |
8 | #include <stdio.h> // printf() |
|
8 | #include <stdio.h> // printf() | |
9 | #include <math.h> |
|
9 | #include <math.h> | |
10 |
|
10 | |||
11 | #include "fsw_params.h" |
|
11 | #include "fsw_params.h" | |
12 | #include "fsw_spacewire.h" |
|
12 | #include "fsw_spacewire.h" | |
13 | #include "basic_parameters.h" |
|
13 | #include "basic_parameters.h" | |
14 |
|
14 | |||
15 | extern volatile int sm_f0[ ][ SM_HEADER + TOTAL_SIZE_SM ]; |
|
15 | extern volatile int sm_f0[ ][ SM_HEADER + TOTAL_SIZE_SM ]; | |
16 | extern volatile int sm_f1[ ][ SM_HEADER + TOTAL_SIZE_SM ]; |
|
16 | extern volatile int sm_f1[ ][ SM_HEADER + TOTAL_SIZE_SM ]; | |
17 | extern volatile int sm_f2[ ][ SM_HEADER + TOTAL_SIZE_SM ]; |
|
17 | extern volatile int sm_f2[ ][ SM_HEADER + TOTAL_SIZE_SM ]; | |
18 |
|
18 | |||
19 | // parameters |
|
19 | // parameters | |
20 | extern struct param_local_str param_local; |
|
20 | extern struct param_local_str param_local; | |
21 |
|
21 | |||
22 | // registers |
|
22 | // registers | |
23 | extern time_management_regs_t *time_management_regs; |
|
23 | extern time_management_regs_t *time_management_regs; | |
24 | extern spectral_matrix_regs_t *spectral_matrix_regs; |
|
24 | extern spectral_matrix_regs_t *spectral_matrix_regs; | |
25 |
|
25 | |||
26 | extern rtems_name misc_name[5]; |
|
26 | extern rtems_name misc_name[5]; | |
27 | extern rtems_id Task_id[20]; /* array of task ids */ |
|
27 | extern rtems_id Task_id[20]; /* array of task ids */ | |
28 |
|
28 | |||
29 | // |
|
|||
30 | void init_sm_rings( void ); |
|
29 | void init_sm_rings( void ); | |
31 | void reset_current_sm_ring_nodes( void ); |
|
30 | void reset_current_sm_ring_nodes( void ); | |
32 |
|
31 | |||
33 | // ISR |
|
32 | // ISR | |
|
33 | void reset_nb_sm_f0( void ); | |||
34 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ); |
|
34 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ); | |
35 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ); |
|
35 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ); | |
36 |
|
36 | |||
37 | // RTEMS TASKS |
|
37 | // RTEMS TASKS | |
38 | rtems_task spw_bppr_task(rtems_task_argument argument); |
|
38 | rtems_task spw_bppr_task(rtems_task_argument argument); | |
39 | rtems_task avf0_task(rtems_task_argument argument); |
|
39 | rtems_task avf0_task(rtems_task_argument argument); | |
40 | rtems_task bpf0_task(rtems_task_argument argument); |
|
40 | rtems_task bpf0_task(rtems_task_argument argument); | |
41 | rtems_task smiq_task(rtems_task_argument argument); // added to test the spectral matrix simulator |
|
41 | rtems_task smiq_task(rtems_task_argument argument); // added to test the spectral matrix simulator | |
42 | rtems_task matr_task(rtems_task_argument argument); |
|
42 | rtems_task matr_task(rtems_task_argument argument); | |
43 |
|
43 | |||
44 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat); |
|
44 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat); | |
45 | void matrix_reset(volatile float *averaged_spec_mat); |
|
45 | void matrix_reset(volatile float *averaged_spec_mat); | |
46 | void BP1_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1); |
|
46 | void BP1_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1); | |
47 | void BP2_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat); |
|
47 | void BP2_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat); | |
48 | // |
|
48 | // | |
49 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header); |
|
49 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header); | |
50 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, |
|
50 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, | |
51 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id); |
|
51 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id); | |
52 | void convert_averaged_spectral_matrix(volatile float *input_matrix, char *output_matrix); |
|
52 | void convert_averaged_spectral_matrix(volatile float *input_matrix, char *output_matrix); | |
53 | void fill_averaged_spectral_matrix( void ); |
|
53 | void fill_averaged_spectral_matrix( void ); | |
54 | void reset_spectral_matrix_regs(); |
|
54 | void reset_spectral_matrix_regs(); | |
55 |
|
55 | |||
56 | #endif // FSW_PROCESSING_H_INCLUDED |
|
56 | #endif // FSW_PROCESSING_H_INCLUDED |
@@ -1,611 +1,610 | |||||
1 | /** This is the RTEMS initialization module. |
|
1 | /** This is the RTEMS initialization module. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * This module contains two very different information: |
|
6 | * This module contains two very different information: | |
7 | * - specific instructions to configure the compilation of the RTEMS executive |
|
7 | * - specific instructions to configure the compilation of the RTEMS executive | |
8 | * - functions related to the fligth softwre initialization, especially the INIT RTEMS task |
|
8 | * - functions related to the fligth softwre initialization, especially the INIT RTEMS task | |
9 | * |
|
9 | * | |
10 | */ |
|
10 | */ | |
11 |
|
11 | |||
12 | //************************* |
|
12 | //************************* | |
13 | // GPL reminder to be added |
|
13 | // GPL reminder to be added | |
14 | //************************* |
|
14 | //************************* | |
15 |
|
15 | |||
16 | #include <rtems.h> |
|
16 | #include <rtems.h> | |
17 |
|
17 | |||
18 | /* configuration information */ |
|
18 | /* configuration information */ | |
19 |
|
19 | |||
20 | #define CONFIGURE_INIT |
|
20 | #define CONFIGURE_INIT | |
21 |
|
21 | |||
22 | #include <bsp.h> /* for device driver prototypes */ |
|
22 | #include <bsp.h> /* for device driver prototypes */ | |
23 |
|
23 | |||
24 | /* configuration information */ |
|
24 | /* configuration information */ | |
25 |
|
25 | |||
26 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
|
26 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER | |
27 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
|
27 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER | |
28 |
|
28 | |||
29 | #define CONFIGURE_MAXIMUM_TASKS 20 |
|
29 | #define CONFIGURE_MAXIMUM_TASKS 20 | |
30 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
|
30 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE | |
31 | #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) |
|
31 | #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) | |
32 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 |
|
32 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 | |
33 | #define CONFIGURE_INIT_TASK_PRIORITY 1 // instead of 100 |
|
33 | #define CONFIGURE_INIT_TASK_PRIORITY 1 // instead of 100 | |
34 | #define CONFIGURE_INIT_TASK_MODE (RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT) |
|
34 | #define CONFIGURE_INIT_TASK_MODE (RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT) | |
35 | #define CONFIGURE_MAXIMUM_DRIVERS 16 |
|
35 | #define CONFIGURE_MAXIMUM_DRIVERS 16 | |
36 | #define CONFIGURE_MAXIMUM_PERIODS 5 |
|
36 | #define CONFIGURE_MAXIMUM_PERIODS 5 | |
37 | #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) | |
38 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 2 |
|
38 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 2 | |
39 | #ifdef PRINT_STACK_REPORT |
|
39 | #ifdef PRINT_STACK_REPORT | |
40 | #define CONFIGURE_STACK_CHECKER_ENABLED |
|
40 | #define CONFIGURE_STACK_CHECKER_ENABLED | |
41 | #endif |
|
41 | #endif | |
42 |
|
42 | |||
43 | #include <rtems/confdefs.h> |
|
43 | #include <rtems/confdefs.h> | |
44 |
|
44 | |||
45 | /* If --drvmgr was enabled during the configuration of the RTEMS kernel */ |
|
45 | /* If --drvmgr was enabled during the configuration of the RTEMS kernel */ | |
46 | #ifdef RTEMS_DRVMGR_STARTUP |
|
46 | #ifdef RTEMS_DRVMGR_STARTUP | |
47 | #ifdef LEON3 |
|
47 | #ifdef LEON3 | |
48 | /* Add Timer and UART Driver */ |
|
48 | /* Add Timer and UART Driver */ | |
49 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
|
49 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER | |
50 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER |
|
50 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER | |
51 | #endif |
|
51 | #endif | |
52 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
|
52 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER | |
53 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART |
|
53 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART | |
54 | #endif |
|
54 | #endif | |
55 | #endif |
|
55 | #endif | |
56 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */ |
|
56 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */ | |
57 | #include <drvmgr/drvmgr_confdefs.h> |
|
57 | #include <drvmgr/drvmgr_confdefs.h> | |
58 | #endif |
|
58 | #endif | |
59 |
|
59 | |||
60 | #include "fsw_init.h" |
|
60 | #include "fsw_init.h" | |
61 | #include "fsw_config.c" |
|
61 | #include "fsw_config.c" | |
62 |
|
62 | |||
63 | rtems_task Init( rtems_task_argument ignored ) |
|
63 | rtems_task Init( rtems_task_argument ignored ) | |
64 | { |
|
64 | { | |
65 | /** This is the RTEMS INIT taks, it the first task launched by the system. |
|
65 | /** This is the RTEMS INIT taks, it the first task launched by the system. | |
66 | * |
|
66 | * | |
67 | * @param unused is the starting argument of the RTEMS task |
|
67 | * @param unused is the starting argument of the RTEMS task | |
68 | * |
|
68 | * | |
69 | * The INIT task create and run all other RTEMS tasks. |
|
69 | * The INIT task create and run all other RTEMS tasks. | |
70 | * |
|
70 | * | |
71 | */ |
|
71 | */ | |
72 |
|
72 | |||
73 |
|
73 | |||
74 | rtems_status_code status; |
|
74 | rtems_status_code status; | |
75 | rtems_status_code status_spw; |
|
75 | rtems_status_code status_spw; | |
76 | rtems_isr_entry old_isr_handler; |
|
76 | rtems_isr_entry old_isr_handler; | |
77 |
|
77 | |||
78 | // UART settings |
|
78 | // UART settings | |
79 | send_console_outputs_on_apbuart_port(); |
|
79 | send_console_outputs_on_apbuart_port(); | |
80 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); |
|
80 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); | |
81 | enable_apbuart_transmitter(); |
|
81 | enable_apbuart_transmitter(); | |
82 | DEBUG_PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n") |
|
82 | DEBUG_PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n") | |
83 |
|
83 | |||
84 | PRINTF("\n\n\n\n\n") |
|
84 | PRINTF("\n\n\n\n\n") | |
85 | PRINTF("*************************\n") |
|
85 | PRINTF("*************************\n") | |
86 | PRINTF("** LFR Flight Software **\n") |
|
86 | PRINTF("** LFR Flight Software **\n") | |
87 | PRINTF1("** %d.", SW_VERSION_N1) |
|
87 | PRINTF1("** %d.", SW_VERSION_N1) | |
88 | PRINTF1("%d.", SW_VERSION_N2) |
|
88 | PRINTF1("%d.", SW_VERSION_N2) | |
89 | PRINTF1("%d.", SW_VERSION_N3) |
|
89 | PRINTF1("%d.", SW_VERSION_N3) | |
90 | PRINTF1("%d\n", SW_VERSION_N4) |
|
90 | PRINTF1("%d **\n", SW_VERSION_N4) | |
91 | PRINTF("*************************\n") |
|
91 | PRINTF("*************************\n") | |
92 | PRINTF("\n\n") |
|
92 | PRINTF("\n\n") | |
93 |
|
93 | |||
94 | reset_wfp_burst_enable(); // stop the waveform picker if it was running |
|
94 | reset_wfp_burst_enable(); // stop the waveform picker if it was running | |
95 | init_waveform_rings(); // initialize the waveform rings |
|
95 | init_waveform_rings(); // initialize the waveform rings | |
96 | init_sm_rings(); |
|
96 | init_sm_rings(); | |
97 |
|
97 | |||
98 | init_parameter_dump(); |
|
98 | init_parameter_dump(); | |
99 | init_local_mode_parameters(); |
|
99 | init_local_mode_parameters(); | |
100 | init_housekeeping_parameters(); |
|
100 | init_housekeeping_parameters(); | |
101 |
|
101 | |||
102 | updateLFRCurrentMode(); |
|
102 | updateLFRCurrentMode(); | |
103 |
|
103 | |||
104 | BOOT_PRINTF1("in INIT *** lfrCurrentMode is %d\n", lfrCurrentMode) |
|
104 | BOOT_PRINTF1("in INIT *** lfrCurrentMode is %d\n", lfrCurrentMode) | |
105 |
|
105 | |||
106 | create_names(); // create all names |
|
106 | create_names(); // create all names | |
107 |
|
107 | |||
108 | status = create_message_queues(); // create message queues |
|
108 | status = create_message_queues(); // create message queues | |
109 | if (status != RTEMS_SUCCESSFUL) |
|
109 | if (status != RTEMS_SUCCESSFUL) | |
110 | { |
|
110 | { | |
111 | PRINTF1("in INIT *** ERR in create_message_queues, code %d", status) |
|
111 | PRINTF1("in INIT *** ERR in create_message_queues, code %d", status) | |
112 | } |
|
112 | } | |
113 |
|
113 | |||
114 | status = create_all_tasks(); // create all tasks |
|
114 | status = create_all_tasks(); // create all tasks | |
115 | if (status != RTEMS_SUCCESSFUL) |
|
115 | if (status != RTEMS_SUCCESSFUL) | |
116 | { |
|
116 | { | |
117 | PRINTF1("in INIT *** ERR in create_all_tasks, code %d", status) |
|
117 | PRINTF1("in INIT *** ERR in create_all_tasks, code %d", status) | |
118 | } |
|
118 | } | |
119 |
|
119 | |||
120 | // ************************** |
|
120 | // ************************** | |
121 | // <SPACEWIRE INITIALIZATION> |
|
121 | // <SPACEWIRE INITIALIZATION> | |
122 | grspw_timecode_callback = &timecode_irq_handler; |
|
122 | grspw_timecode_callback = &timecode_irq_handler; | |
123 |
|
123 | |||
124 | status_spw = spacewire_open_link(); // (1) open the link |
|
124 | status_spw = spacewire_open_link(); // (1) open the link | |
125 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
125 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
126 | { |
|
126 | { | |
127 | PRINTF1("in INIT *** ERR spacewire_open_link code %d\n", status_spw ) |
|
127 | PRINTF1("in INIT *** ERR spacewire_open_link code %d\n", status_spw ) | |
128 | } |
|
128 | } | |
129 |
|
129 | |||
130 | if ( status_spw == RTEMS_SUCCESSFUL ) // (2) configure the link |
|
130 | if ( status_spw == RTEMS_SUCCESSFUL ) // (2) configure the link | |
131 | { |
|
131 | { | |
132 | status_spw = spacewire_configure_link( fdSPW ); |
|
132 | status_spw = spacewire_configure_link( fdSPW ); | |
133 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
133 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
134 | { |
|
134 | { | |
135 | PRINTF1("in INIT *** ERR spacewire_configure_link code %d\n", status_spw ) |
|
135 | PRINTF1("in INIT *** ERR spacewire_configure_link code %d\n", status_spw ) | |
136 | } |
|
136 | } | |
137 | } |
|
137 | } | |
138 |
|
138 | |||
139 | if ( status_spw == RTEMS_SUCCESSFUL) // (3) start the link |
|
139 | if ( status_spw == RTEMS_SUCCESSFUL) // (3) start the link | |
140 | { |
|
140 | { | |
141 | status_spw = spacewire_start_link( fdSPW ); |
|
141 | status_spw = spacewire_start_link( fdSPW ); | |
142 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
142 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
143 | { |
|
143 | { | |
144 | PRINTF1("in INIT *** ERR spacewire_start_link code %d\n", status_spw ) |
|
144 | PRINTF1("in INIT *** ERR spacewire_start_link code %d\n", status_spw ) | |
145 | } |
|
145 | } | |
146 | } |
|
146 | } | |
147 | // </SPACEWIRE INITIALIZATION> |
|
147 | // </SPACEWIRE INITIALIZATION> | |
148 | // *************************** |
|
148 | // *************************** | |
149 |
|
149 | |||
150 | status = start_all_tasks(); // start all tasks |
|
150 | status = start_all_tasks(); // start all tasks | |
151 | if (status != RTEMS_SUCCESSFUL) |
|
151 | if (status != RTEMS_SUCCESSFUL) | |
152 | { |
|
152 | { | |
153 | PRINTF1("in INIT *** ERR in start_all_tasks, code %d", status) |
|
153 | PRINTF1("in INIT *** ERR in start_all_tasks, code %d", status) | |
154 | } |
|
154 | } | |
155 |
|
155 | |||
156 | // start RECV and SEND *AFTER* SpaceWire Initialization, due to the timeout of the start call during the initialization |
|
156 | // start RECV and SEND *AFTER* SpaceWire Initialization, due to the timeout of the start call during the initialization | |
157 | status = start_recv_send_tasks(); |
|
157 | status = start_recv_send_tasks(); | |
158 | if ( status != RTEMS_SUCCESSFUL ) |
|
158 | if ( status != RTEMS_SUCCESSFUL ) | |
159 | { |
|
159 | { | |
160 | PRINTF1("in INIT *** ERR start_recv_send_tasks code %d\n", status ) |
|
160 | PRINTF1("in INIT *** ERR start_recv_send_tasks code %d\n", status ) | |
161 | } |
|
161 | } | |
162 |
|
162 | |||
163 | // suspend science tasks. they will be restarted later depending on the mode |
|
163 | // suspend science tasks. they will be restarted later depending on the mode | |
164 | status = suspend_science_tasks(); // suspend science tasks (not done in stop_current_mode if current mode = STANDBY) |
|
164 | status = suspend_science_tasks(); // suspend science tasks (not done in stop_current_mode if current mode = STANDBY) | |
165 | if (status != RTEMS_SUCCESSFUL) |
|
165 | if (status != RTEMS_SUCCESSFUL) | |
166 | { |
|
166 | { | |
167 | PRINTF1("in INIT *** in suspend_science_tasks *** ERR code: %d\n", status) |
|
167 | PRINTF1("in INIT *** in suspend_science_tasks *** ERR code: %d\n", status) | |
168 | } |
|
168 | } | |
169 |
|
169 | |||
170 |
|
||||
171 | //****************************** |
|
170 | //****************************** | |
172 | // <SPECTRAL MATRICES SIMULATOR> |
|
171 | // <SPECTRAL MATRICES SIMULATOR> | |
173 | LEON_Mask_interrupt( IRQ_SM ); |
|
172 | LEON_Mask_interrupt( IRQ_SM_SIMULATOR ); | |
174 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR, |
|
173 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR, | |
175 | IRQ_SPARC_SM, spectral_matrices_isr_simu ); |
|
174 | IRQ_SPARC_SM_SIMULATOR, spectral_matrices_isr_simu ); | |
176 | // </SPECTRAL MATRICES SIMULATOR> |
|
175 | // </SPECTRAL MATRICES SIMULATOR> | |
177 | //******************************* |
|
176 | //******************************* | |
178 |
|
177 | |||
179 | // configure IRQ handling for the waveform picker unit |
|
178 | // configure IRQ handling for the waveform picker unit | |
180 | status = rtems_interrupt_catch( waveforms_isr, |
|
179 | status = rtems_interrupt_catch( waveforms_isr, | |
181 | IRQ_SPARC_WAVEFORM_PICKER, |
|
180 | IRQ_SPARC_WAVEFORM_PICKER, | |
182 | &old_isr_handler) ; |
|
181 | &old_isr_handler) ; | |
183 |
|
182 | |||
184 | // if the spacewire link is not up then send an event to the SPIQ task for link recovery |
|
183 | // if the spacewire link is not up then send an event to the SPIQ task for link recovery | |
185 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
184 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
186 | { |
|
185 | { | |
187 | status = rtems_event_send( Task_id[TASKID_SPIQ], SPW_LINKERR_EVENT ); |
|
186 | status = rtems_event_send( Task_id[TASKID_SPIQ], SPW_LINKERR_EVENT ); | |
188 | if ( status != RTEMS_SUCCESSFUL ) { |
|
187 | if ( status != RTEMS_SUCCESSFUL ) { | |
189 | PRINTF1("in INIT *** ERR rtems_event_send to SPIQ code %d\n", status ) |
|
188 | PRINTF1("in INIT *** ERR rtems_event_send to SPIQ code %d\n", status ) | |
190 | } |
|
189 | } | |
191 | } |
|
190 | } | |
192 |
|
191 | |||
193 | BOOT_PRINTF("delete INIT\n") |
|
192 | BOOT_PRINTF("delete INIT\n") | |
194 |
|
193 | |||
195 | status = rtems_task_delete(RTEMS_SELF); |
|
194 | status = rtems_task_delete(RTEMS_SELF); | |
196 |
|
195 | |||
197 | } |
|
196 | } | |
198 |
|
197 | |||
199 | void init_local_mode_parameters( void ) |
|
198 | void init_local_mode_parameters( void ) | |
200 | { |
|
199 | { | |
201 | /** This function initialize the param_local global variable with default values. |
|
200 | /** This function initialize the param_local global variable with default values. | |
202 | * |
|
201 | * | |
203 | */ |
|
202 | */ | |
204 |
|
203 | |||
205 | unsigned int i; |
|
204 | unsigned int i; | |
206 |
|
205 | |||
207 | // LOCAL PARAMETERS |
|
206 | // LOCAL PARAMETERS | |
208 | set_local_nb_interrupt_f0_MAX(); |
|
207 | set_local_nb_interrupt_f0_MAX(); | |
209 |
|
208 | |||
210 | BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max) |
|
209 | BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max) | |
211 | BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max) |
|
210 | BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max) | |
212 | BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX) |
|
211 | BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX) | |
213 |
|
212 | |||
214 | // init sequence counters |
|
213 | // init sequence counters | |
215 |
|
214 | |||
216 | for(i = 0; i<SEQ_CNT_NB_DEST_ID; i++) |
|
215 | for(i = 0; i<SEQ_CNT_NB_DEST_ID; i++) | |
217 | { |
|
216 | { | |
218 | sequenceCounters_TC_EXE[i] = 0x00; |
|
217 | sequenceCounters_TC_EXE[i] = 0x00; | |
219 | } |
|
218 | } | |
220 | sequenceCounters_SCIENCE_NORMAL_BURST = 0x00; |
|
219 | sequenceCounters_SCIENCE_NORMAL_BURST = 0x00; | |
221 | sequenceCounters_SCIENCE_SBM1_SBM2 = 0x00; |
|
220 | sequenceCounters_SCIENCE_SBM1_SBM2 = 0x00; | |
222 | } |
|
221 | } | |
223 |
|
222 | |||
224 | void create_names( void ) // create all names for tasks and queues |
|
223 | void create_names( void ) // create all names for tasks and queues | |
225 | { |
|
224 | { | |
226 | /** This function creates all RTEMS names used in the software for tasks and queues. |
|
225 | /** This function creates all RTEMS names used in the software for tasks and queues. | |
227 | * |
|
226 | * | |
228 | * @return RTEMS directive status codes: |
|
227 | * @return RTEMS directive status codes: | |
229 | * - RTEMS_SUCCESSFUL - successful completion |
|
228 | * - RTEMS_SUCCESSFUL - successful completion | |
230 | * |
|
229 | * | |
231 | */ |
|
230 | */ | |
232 |
|
231 | |||
233 | // task names |
|
232 | // task names | |
234 | Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' ); |
|
233 | Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' ); | |
235 | Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' ); |
|
234 | Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' ); | |
236 | Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' ); |
|
235 | Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' ); | |
237 | Task_name[TASKID_SMIQ] = rtems_build_name( 'S', 'M', 'I', 'Q' ); |
|
236 | Task_name[TASKID_SMIQ] = rtems_build_name( 'S', 'M', 'I', 'Q' ); | |
238 | Task_name[TASKID_STAT] = rtems_build_name( 'S', 'T', 'A', 'T' ); |
|
237 | Task_name[TASKID_STAT] = rtems_build_name( 'S', 'T', 'A', 'T' ); | |
239 | Task_name[TASKID_AVF0] = rtems_build_name( 'A', 'V', 'F', '0' ); |
|
238 | Task_name[TASKID_AVF0] = rtems_build_name( 'A', 'V', 'F', '0' ); | |
240 | Task_name[TASKID_BPF0] = rtems_build_name( 'B', 'P', 'F', '0' ); |
|
239 | Task_name[TASKID_BPF0] = rtems_build_name( 'B', 'P', 'F', '0' ); | |
241 | Task_name[TASKID_WFRM] = rtems_build_name( 'W', 'F', 'R', 'M' ); |
|
240 | Task_name[TASKID_WFRM] = rtems_build_name( 'W', 'F', 'R', 'M' ); | |
242 | Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' ); |
|
241 | Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' ); | |
243 | Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' ); |
|
242 | Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' ); | |
244 | Task_name[TASKID_MATR] = rtems_build_name( 'M', 'A', 'T', 'R' ); |
|
243 | Task_name[TASKID_MATR] = rtems_build_name( 'M', 'A', 'T', 'R' ); | |
245 | Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' ); |
|
244 | Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' ); | |
246 | Task_name[TASKID_CWF2] = rtems_build_name( 'C', 'W', 'F', '2' ); |
|
245 | Task_name[TASKID_CWF2] = rtems_build_name( 'C', 'W', 'F', '2' ); | |
247 | Task_name[TASKID_CWF1] = rtems_build_name( 'C', 'W', 'F', '1' ); |
|
246 | Task_name[TASKID_CWF1] = rtems_build_name( 'C', 'W', 'F', '1' ); | |
248 | Task_name[TASKID_SEND] = rtems_build_name( 'S', 'E', 'N', 'D' ); |
|
247 | Task_name[TASKID_SEND] = rtems_build_name( 'S', 'E', 'N', 'D' ); | |
249 | Task_name[TASKID_WTDG] = rtems_build_name( 'W', 'T', 'D', 'G' ); |
|
248 | Task_name[TASKID_WTDG] = rtems_build_name( 'W', 'T', 'D', 'G' ); | |
250 |
|
249 | |||
251 | // rate monotonic period names |
|
250 | // rate monotonic period names | |
252 | name_hk_rate_monotonic = rtems_build_name( 'H', 'O', 'U', 'S' ); |
|
251 | name_hk_rate_monotonic = rtems_build_name( 'H', 'O', 'U', 'S' ); | |
253 |
|
252 | |||
254 | misc_name[QUEUE_RECV] = rtems_build_name( 'Q', '_', 'R', 'V' ); |
|
253 | misc_name[QUEUE_RECV] = rtems_build_name( 'Q', '_', 'R', 'V' ); | |
255 | misc_name[QUEUE_SEND] = rtems_build_name( 'Q', '_', 'S', 'D' ); |
|
254 | misc_name[QUEUE_SEND] = rtems_build_name( 'Q', '_', 'S', 'D' ); | |
256 | } |
|
255 | } | |
257 |
|
256 | |||
258 | int create_all_tasks( void ) // create all tasks which run in the software |
|
257 | int create_all_tasks( void ) // create all tasks which run in the software | |
259 | { |
|
258 | { | |
260 | /** This function creates all RTEMS tasks used in the software. |
|
259 | /** This function creates all RTEMS tasks used in the software. | |
261 | * |
|
260 | * | |
262 | * @return RTEMS directive status codes: |
|
261 | * @return RTEMS directive status codes: | |
263 | * - RTEMS_SUCCESSFUL - task created successfully |
|
262 | * - RTEMS_SUCCESSFUL - task created successfully | |
264 | * - RTEMS_INVALID_ADDRESS - id is NULL |
|
263 | * - RTEMS_INVALID_ADDRESS - id is NULL | |
265 | * - RTEMS_INVALID_NAME - invalid task name |
|
264 | * - RTEMS_INVALID_NAME - invalid task name | |
266 | * - RTEMS_INVALID_PRIORITY - invalid task priority |
|
265 | * - RTEMS_INVALID_PRIORITY - invalid task priority | |
267 | * - RTEMS_MP_NOT_CONFIGURED - multiprocessing not configured |
|
266 | * - RTEMS_MP_NOT_CONFIGURED - multiprocessing not configured | |
268 | * - RTEMS_TOO_MANY - too many tasks created |
|
267 | * - RTEMS_TOO_MANY - too many tasks created | |
269 | * - RTEMS_UNSATISFIED - not enough memory for stack/FP context |
|
268 | * - RTEMS_UNSATISFIED - not enough memory for stack/FP context | |
270 | * - RTEMS_TOO_MANY - too many global objects |
|
269 | * - RTEMS_TOO_MANY - too many global objects | |
271 | * |
|
270 | * | |
272 | */ |
|
271 | */ | |
273 |
|
272 | |||
274 | rtems_status_code status; |
|
273 | rtems_status_code status; | |
275 |
|
274 | |||
276 | // RECV |
|
275 | // RECV | |
277 | status = rtems_task_create( |
|
276 | status = rtems_task_create( | |
278 | Task_name[TASKID_RECV], TASK_PRIORITY_RECV, RTEMS_MINIMUM_STACK_SIZE, |
|
277 | Task_name[TASKID_RECV], TASK_PRIORITY_RECV, RTEMS_MINIMUM_STACK_SIZE, | |
279 | RTEMS_DEFAULT_MODES, |
|
278 | RTEMS_DEFAULT_MODES, | |
280 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_RECV] |
|
279 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_RECV] | |
281 | ); |
|
280 | ); | |
282 |
|
281 | |||
283 | if (status == RTEMS_SUCCESSFUL) // ACTN |
|
282 | if (status == RTEMS_SUCCESSFUL) // ACTN | |
284 | { |
|
283 | { | |
285 | status = rtems_task_create( |
|
284 | status = rtems_task_create( | |
286 | Task_name[TASKID_ACTN], TASK_PRIORITY_ACTN, RTEMS_MINIMUM_STACK_SIZE, |
|
285 | Task_name[TASKID_ACTN], TASK_PRIORITY_ACTN, RTEMS_MINIMUM_STACK_SIZE, | |
287 | RTEMS_DEFAULT_MODES, |
|
286 | RTEMS_DEFAULT_MODES, | |
288 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_ACTN] |
|
287 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_ACTN] | |
289 | ); |
|
288 | ); | |
290 | } |
|
289 | } | |
291 | if (status == RTEMS_SUCCESSFUL) // SPIQ |
|
290 | if (status == RTEMS_SUCCESSFUL) // SPIQ | |
292 | { |
|
291 | { | |
293 | status = rtems_task_create( |
|
292 | status = rtems_task_create( | |
294 | Task_name[TASKID_SPIQ], TASK_PRIORITY_SPIQ, RTEMS_MINIMUM_STACK_SIZE, |
|
293 | Task_name[TASKID_SPIQ], TASK_PRIORITY_SPIQ, RTEMS_MINIMUM_STACK_SIZE, | |
295 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
294 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
296 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SPIQ] |
|
295 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SPIQ] | |
297 | ); |
|
296 | ); | |
298 | } |
|
297 | } | |
299 | if (status == RTEMS_SUCCESSFUL) // SMIQ |
|
298 | if (status == RTEMS_SUCCESSFUL) // SMIQ | |
300 | { |
|
299 | { | |
301 | status = rtems_task_create( |
|
300 | status = rtems_task_create( | |
302 | Task_name[TASKID_SMIQ], TASK_PRIORITY_SMIQ, RTEMS_MINIMUM_STACK_SIZE, |
|
301 | Task_name[TASKID_SMIQ], TASK_PRIORITY_SMIQ, RTEMS_MINIMUM_STACK_SIZE, | |
303 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
302 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
304 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SMIQ] |
|
303 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SMIQ] | |
305 | ); |
|
304 | ); | |
306 | } |
|
305 | } | |
307 | if (status == RTEMS_SUCCESSFUL) // STAT |
|
306 | if (status == RTEMS_SUCCESSFUL) // STAT | |
308 | { |
|
307 | { | |
309 | status = rtems_task_create( |
|
308 | status = rtems_task_create( | |
310 | Task_name[TASKID_STAT], TASK_PRIORITY_STAT, RTEMS_MINIMUM_STACK_SIZE, |
|
309 | Task_name[TASKID_STAT], TASK_PRIORITY_STAT, RTEMS_MINIMUM_STACK_SIZE, | |
311 | RTEMS_DEFAULT_MODES, |
|
310 | RTEMS_DEFAULT_MODES, | |
312 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT] |
|
311 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT] | |
313 | ); |
|
312 | ); | |
314 | } |
|
313 | } | |
315 | if (status == RTEMS_SUCCESSFUL) // AVF0 |
|
314 | if (status == RTEMS_SUCCESSFUL) // AVF0 | |
316 | { |
|
315 | { | |
317 | status = rtems_task_create( |
|
316 | status = rtems_task_create( | |
318 | Task_name[TASKID_AVF0], TASK_PRIORITY_AVF0, RTEMS_MINIMUM_STACK_SIZE, |
|
317 | Task_name[TASKID_AVF0], TASK_PRIORITY_AVF0, RTEMS_MINIMUM_STACK_SIZE, | |
319 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
318 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
320 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF0] |
|
319 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF0] | |
321 | ); |
|
320 | ); | |
322 | } |
|
321 | } | |
323 | if (status == RTEMS_SUCCESSFUL) // BPF0 |
|
322 | if (status == RTEMS_SUCCESSFUL) // BPF0 | |
324 | { |
|
323 | { | |
325 | status = rtems_task_create( |
|
324 | status = rtems_task_create( | |
326 | Task_name[TASKID_BPF0], TASK_PRIORITY_BPF0, RTEMS_MINIMUM_STACK_SIZE, |
|
325 | Task_name[TASKID_BPF0], TASK_PRIORITY_BPF0, RTEMS_MINIMUM_STACK_SIZE, | |
327 | RTEMS_DEFAULT_MODES, |
|
326 | RTEMS_DEFAULT_MODES, | |
328 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_BPF0] |
|
327 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_BPF0] | |
329 | ); |
|
328 | ); | |
330 | } |
|
329 | } | |
331 | if (status == RTEMS_SUCCESSFUL) // WFRM |
|
330 | if (status == RTEMS_SUCCESSFUL) // WFRM | |
332 | { |
|
331 | { | |
333 | status = rtems_task_create( |
|
332 | status = rtems_task_create( | |
334 | Task_name[TASKID_WFRM], TASK_PRIORITY_WFRM, RTEMS_MINIMUM_STACK_SIZE, |
|
333 | Task_name[TASKID_WFRM], TASK_PRIORITY_WFRM, RTEMS_MINIMUM_STACK_SIZE, | |
335 | RTEMS_DEFAULT_MODES, |
|
334 | RTEMS_DEFAULT_MODES, | |
336 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_WFRM] |
|
335 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_WFRM] | |
337 | ); |
|
336 | ); | |
338 | } |
|
337 | } | |
339 | if (status == RTEMS_SUCCESSFUL) // DUMB |
|
338 | if (status == RTEMS_SUCCESSFUL) // DUMB | |
340 | { |
|
339 | { | |
341 | status = rtems_task_create( |
|
340 | status = rtems_task_create( | |
342 | Task_name[TASKID_DUMB], TASK_PRIORITY_DUMB, RTEMS_MINIMUM_STACK_SIZE, |
|
341 | Task_name[TASKID_DUMB], TASK_PRIORITY_DUMB, RTEMS_MINIMUM_STACK_SIZE, | |
343 | RTEMS_DEFAULT_MODES, |
|
342 | RTEMS_DEFAULT_MODES, | |
344 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB] |
|
343 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB] | |
345 | ); |
|
344 | ); | |
346 | } |
|
345 | } | |
347 | if (status == RTEMS_SUCCESSFUL) // HOUS |
|
346 | if (status == RTEMS_SUCCESSFUL) // HOUS | |
348 | { |
|
347 | { | |
349 | status = rtems_task_create( |
|
348 | status = rtems_task_create( | |
350 | Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE, |
|
349 | Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE, | |
351 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
350 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
352 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS] |
|
351 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS] | |
353 | ); |
|
352 | ); | |
354 | } |
|
353 | } | |
355 | if (status == RTEMS_SUCCESSFUL) // MATR |
|
354 | if (status == RTEMS_SUCCESSFUL) // MATR | |
356 | { |
|
355 | { | |
357 | status = rtems_task_create( |
|
356 | status = rtems_task_create( | |
358 | Task_name[TASKID_MATR], TASK_PRIORITY_MATR, RTEMS_MINIMUM_STACK_SIZE, |
|
357 | Task_name[TASKID_MATR], TASK_PRIORITY_MATR, RTEMS_MINIMUM_STACK_SIZE, | |
359 | RTEMS_DEFAULT_MODES, |
|
358 | RTEMS_DEFAULT_MODES, | |
360 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_MATR] |
|
359 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_MATR] | |
361 | ); |
|
360 | ); | |
362 | } |
|
361 | } | |
363 | if (status == RTEMS_SUCCESSFUL) // CWF3 |
|
362 | if (status == RTEMS_SUCCESSFUL) // CWF3 | |
364 | { |
|
363 | { | |
365 | status = rtems_task_create( |
|
364 | status = rtems_task_create( | |
366 | Task_name[TASKID_CWF3], TASK_PRIORITY_CWF3, RTEMS_MINIMUM_STACK_SIZE, |
|
365 | Task_name[TASKID_CWF3], TASK_PRIORITY_CWF3, RTEMS_MINIMUM_STACK_SIZE, | |
367 | RTEMS_DEFAULT_MODES, |
|
366 | RTEMS_DEFAULT_MODES, | |
368 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF3] |
|
367 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF3] | |
369 | ); |
|
368 | ); | |
370 | } |
|
369 | } | |
371 | if (status == RTEMS_SUCCESSFUL) // CWF2 |
|
370 | if (status == RTEMS_SUCCESSFUL) // CWF2 | |
372 | { |
|
371 | { | |
373 | status = rtems_task_create( |
|
372 | status = rtems_task_create( | |
374 | Task_name[TASKID_CWF2], TASK_PRIORITY_CWF2, RTEMS_MINIMUM_STACK_SIZE, |
|
373 | Task_name[TASKID_CWF2], TASK_PRIORITY_CWF2, RTEMS_MINIMUM_STACK_SIZE, | |
375 | RTEMS_DEFAULT_MODES, |
|
374 | RTEMS_DEFAULT_MODES, | |
376 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF2] |
|
375 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF2] | |
377 | ); |
|
376 | ); | |
378 | } |
|
377 | } | |
379 | if (status == RTEMS_SUCCESSFUL) // CWF1 |
|
378 | if (status == RTEMS_SUCCESSFUL) // CWF1 | |
380 | { |
|
379 | { | |
381 | status = rtems_task_create( |
|
380 | status = rtems_task_create( | |
382 | Task_name[TASKID_CWF1], TASK_PRIORITY_CWF1, RTEMS_MINIMUM_STACK_SIZE, |
|
381 | Task_name[TASKID_CWF1], TASK_PRIORITY_CWF1, RTEMS_MINIMUM_STACK_SIZE, | |
383 | RTEMS_DEFAULT_MODES, |
|
382 | RTEMS_DEFAULT_MODES, | |
384 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF1] |
|
383 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF1] | |
385 | ); |
|
384 | ); | |
386 | } |
|
385 | } | |
387 | if (status == RTEMS_SUCCESSFUL) // SEND |
|
386 | if (status == RTEMS_SUCCESSFUL) // SEND | |
388 | { |
|
387 | { | |
389 | status = rtems_task_create( |
|
388 | status = rtems_task_create( | |
390 | Task_name[TASKID_SEND], TASK_PRIORITY_SEND, RTEMS_MINIMUM_STACK_SIZE, |
|
389 | Task_name[TASKID_SEND], TASK_PRIORITY_SEND, RTEMS_MINIMUM_STACK_SIZE, | |
391 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
390 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
392 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SEND] |
|
391 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SEND] | |
393 | ); |
|
392 | ); | |
394 | } |
|
393 | } | |
395 | if (status == RTEMS_SUCCESSFUL) // WTDG |
|
394 | if (status == RTEMS_SUCCESSFUL) // WTDG | |
396 | { |
|
395 | { | |
397 | status = rtems_task_create( |
|
396 | status = rtems_task_create( | |
398 | Task_name[TASKID_WTDG], TASK_PRIORITY_WTDG, RTEMS_MINIMUM_STACK_SIZE, |
|
397 | Task_name[TASKID_WTDG], TASK_PRIORITY_WTDG, RTEMS_MINIMUM_STACK_SIZE, | |
399 | RTEMS_DEFAULT_MODES, |
|
398 | RTEMS_DEFAULT_MODES, | |
400 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_WTDG] |
|
399 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_WTDG] | |
401 | ); |
|
400 | ); | |
402 | } |
|
401 | } | |
403 |
|
402 | |||
404 | return status; |
|
403 | return status; | |
405 | } |
|
404 | } | |
406 |
|
405 | |||
407 | int start_recv_send_tasks( void ) |
|
406 | int start_recv_send_tasks( void ) | |
408 | { |
|
407 | { | |
409 | rtems_status_code status; |
|
408 | rtems_status_code status; | |
410 |
|
409 | |||
411 | status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 ); |
|
410 | status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 ); | |
412 | if (status!=RTEMS_SUCCESSFUL) { |
|
411 | if (status!=RTEMS_SUCCESSFUL) { | |
413 | BOOT_PRINTF("in INIT *** Error starting TASK_RECV\n") |
|
412 | BOOT_PRINTF("in INIT *** Error starting TASK_RECV\n") | |
414 | } |
|
413 | } | |
415 |
|
414 | |||
416 | if (status == RTEMS_SUCCESSFUL) // SEND |
|
415 | if (status == RTEMS_SUCCESSFUL) // SEND | |
417 | { |
|
416 | { | |
418 | status = rtems_task_start( Task_id[TASKID_SEND], send_task, 1 ); |
|
417 | status = rtems_task_start( Task_id[TASKID_SEND], send_task, 1 ); | |
419 | if (status!=RTEMS_SUCCESSFUL) { |
|
418 | if (status!=RTEMS_SUCCESSFUL) { | |
420 | BOOT_PRINTF("in INIT *** Error starting TASK_SEND\n") |
|
419 | BOOT_PRINTF("in INIT *** Error starting TASK_SEND\n") | |
421 | } |
|
420 | } | |
422 | } |
|
421 | } | |
423 |
|
422 | |||
424 | return status; |
|
423 | return status; | |
425 | } |
|
424 | } | |
426 |
|
425 | |||
427 | int start_all_tasks( void ) // start all tasks except SEND RECV and HOUS |
|
426 | int start_all_tasks( void ) // start all tasks except SEND RECV and HOUS | |
428 | { |
|
427 | { | |
429 | /** This function starts all RTEMS tasks used in the software. |
|
428 | /** This function starts all RTEMS tasks used in the software. | |
430 | * |
|
429 | * | |
431 | * @return RTEMS directive status codes: |
|
430 | * @return RTEMS directive status codes: | |
432 | * - RTEMS_SUCCESSFUL - ask started successfully |
|
431 | * - RTEMS_SUCCESSFUL - ask started successfully | |
433 | * - RTEMS_INVALID_ADDRESS - invalid task entry point |
|
432 | * - RTEMS_INVALID_ADDRESS - invalid task entry point | |
434 | * - RTEMS_INVALID_ID - invalid task id |
|
433 | * - RTEMS_INVALID_ID - invalid task id | |
435 | * - RTEMS_INCORRECT_STATE - task not in the dormant state |
|
434 | * - RTEMS_INCORRECT_STATE - task not in the dormant state | |
436 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot start remote task |
|
435 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot start remote task | |
437 | * |
|
436 | * | |
438 | */ |
|
437 | */ | |
439 | // starts all the tasks fot eh flight software |
|
438 | // starts all the tasks fot eh flight software | |
440 |
|
439 | |||
441 | rtems_status_code status; |
|
440 | rtems_status_code status; | |
442 |
|
441 | |||
443 | status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 ); |
|
442 | status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 ); | |
444 | if (status!=RTEMS_SUCCESSFUL) { |
|
443 | if (status!=RTEMS_SUCCESSFUL) { | |
445 | BOOT_PRINTF("in INIT *** Error starting TASK_SPIQ\n") |
|
444 | BOOT_PRINTF("in INIT *** Error starting TASK_SPIQ\n") | |
446 | } |
|
445 | } | |
447 |
|
446 | |||
448 | if (status == RTEMS_SUCCESSFUL) // WTDG |
|
447 | if (status == RTEMS_SUCCESSFUL) // WTDG | |
449 | { |
|
448 | { | |
450 | status = rtems_task_start( Task_id[TASKID_WTDG], wtdg_task, 1 ); |
|
449 | status = rtems_task_start( Task_id[TASKID_WTDG], wtdg_task, 1 ); | |
451 | if (status!=RTEMS_SUCCESSFUL) { |
|
450 | if (status!=RTEMS_SUCCESSFUL) { | |
452 | BOOT_PRINTF("in INIT *** Error starting TASK_WTDG\n") |
|
451 | BOOT_PRINTF("in INIT *** Error starting TASK_WTDG\n") | |
453 | } |
|
452 | } | |
454 | } |
|
453 | } | |
455 |
|
454 | |||
456 | if (status == RTEMS_SUCCESSFUL) // SMIQ |
|
455 | if (status == RTEMS_SUCCESSFUL) // SMIQ | |
457 | { |
|
456 | { | |
458 | status = rtems_task_start( Task_id[TASKID_SMIQ], smiq_task, 1 ); |
|
457 | status = rtems_task_start( Task_id[TASKID_SMIQ], smiq_task, 1 ); | |
459 | if (status!=RTEMS_SUCCESSFUL) { |
|
458 | if (status!=RTEMS_SUCCESSFUL) { | |
460 | BOOT_PRINTF("in INIT *** Error starting TASK_BPPR\n") |
|
459 | BOOT_PRINTF("in INIT *** Error starting TASK_BPPR\n") | |
461 | } |
|
460 | } | |
462 | } |
|
461 | } | |
463 |
|
462 | |||
464 | if (status == RTEMS_SUCCESSFUL) // ACTN |
|
463 | if (status == RTEMS_SUCCESSFUL) // ACTN | |
465 | { |
|
464 | { | |
466 | status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 ); |
|
465 | status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 ); | |
467 | if (status!=RTEMS_SUCCESSFUL) { |
|
466 | if (status!=RTEMS_SUCCESSFUL) { | |
468 | BOOT_PRINTF("in INIT *** Error starting TASK_ACTN\n") |
|
467 | BOOT_PRINTF("in INIT *** Error starting TASK_ACTN\n") | |
469 | } |
|
468 | } | |
470 | } |
|
469 | } | |
471 |
|
470 | |||
472 | if (status == RTEMS_SUCCESSFUL) // STAT |
|
471 | if (status == RTEMS_SUCCESSFUL) // STAT | |
473 | { |
|
472 | { | |
474 | status = rtems_task_start( Task_id[TASKID_STAT], stat_task, 1 ); |
|
473 | status = rtems_task_start( Task_id[TASKID_STAT], stat_task, 1 ); | |
475 | if (status!=RTEMS_SUCCESSFUL) { |
|
474 | if (status!=RTEMS_SUCCESSFUL) { | |
476 | BOOT_PRINTF("in INIT *** Error starting TASK_STAT\n") |
|
475 | BOOT_PRINTF("in INIT *** Error starting TASK_STAT\n") | |
477 | } |
|
476 | } | |
478 | } |
|
477 | } | |
479 |
|
478 | |||
480 | if (status == RTEMS_SUCCESSFUL) // AVF0 |
|
479 | if (status == RTEMS_SUCCESSFUL) // AVF0 | |
481 | { |
|
480 | { | |
482 | status = rtems_task_start( Task_id[TASKID_AVF0], avf0_task, 1 ); |
|
481 | status = rtems_task_start( Task_id[TASKID_AVF0], avf0_task, 1 ); | |
483 | if (status!=RTEMS_SUCCESSFUL) { |
|
482 | if (status!=RTEMS_SUCCESSFUL) { | |
484 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF0\n") |
|
483 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF0\n") | |
485 | } |
|
484 | } | |
486 | } |
|
485 | } | |
487 |
|
486 | |||
488 | if (status == RTEMS_SUCCESSFUL) // BPF0 |
|
487 | if (status == RTEMS_SUCCESSFUL) // BPF0 | |
489 | { |
|
488 | { | |
490 | status = rtems_task_start( Task_id[TASKID_BPF0], bpf0_task, 1 ); |
|
489 | status = rtems_task_start( Task_id[TASKID_BPF0], bpf0_task, 1 ); | |
491 | if (status!=RTEMS_SUCCESSFUL) { |
|
490 | if (status!=RTEMS_SUCCESSFUL) { | |
492 | BOOT_PRINTF("in INIT *** Error starting TASK_BPF0\n") |
|
491 | BOOT_PRINTF("in INIT *** Error starting TASK_BPF0\n") | |
493 | } |
|
492 | } | |
494 | } |
|
493 | } | |
495 |
|
494 | |||
496 | if (status == RTEMS_SUCCESSFUL) // WFRM |
|
495 | if (status == RTEMS_SUCCESSFUL) // WFRM | |
497 | { |
|
496 | { | |
498 | status = rtems_task_start( Task_id[TASKID_WFRM], wfrm_task, 1 ); |
|
497 | status = rtems_task_start( Task_id[TASKID_WFRM], wfrm_task, 1 ); | |
499 | if (status!=RTEMS_SUCCESSFUL) { |
|
498 | if (status!=RTEMS_SUCCESSFUL) { | |
500 | BOOT_PRINTF("in INIT *** Error starting TASK_WFRM\n") |
|
499 | BOOT_PRINTF("in INIT *** Error starting TASK_WFRM\n") | |
501 | } |
|
500 | } | |
502 | } |
|
501 | } | |
503 |
|
502 | |||
504 | if (status == RTEMS_SUCCESSFUL) // DUMB |
|
503 | if (status == RTEMS_SUCCESSFUL) // DUMB | |
505 | { |
|
504 | { | |
506 | status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 ); |
|
505 | status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 ); | |
507 | if (status!=RTEMS_SUCCESSFUL) { |
|
506 | if (status!=RTEMS_SUCCESSFUL) { | |
508 | BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n") |
|
507 | BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n") | |
509 | } |
|
508 | } | |
510 | } |
|
509 | } | |
511 |
|
510 | |||
512 | if (status == RTEMS_SUCCESSFUL) // HOUS |
|
511 | if (status == RTEMS_SUCCESSFUL) // HOUS | |
513 | { |
|
512 | { | |
514 | status = rtems_task_start( Task_id[TASKID_HOUS], hous_task, 1 ); |
|
513 | status = rtems_task_start( Task_id[TASKID_HOUS], hous_task, 1 ); | |
515 | if (status!=RTEMS_SUCCESSFUL) { |
|
514 | if (status!=RTEMS_SUCCESSFUL) { | |
516 | BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n") |
|
515 | BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n") | |
517 | } |
|
516 | } | |
518 | } |
|
517 | } | |
519 |
|
518 | |||
520 | if (status == RTEMS_SUCCESSFUL) // MATR |
|
519 | if (status == RTEMS_SUCCESSFUL) // MATR | |
521 | { |
|
520 | { | |
522 | status = rtems_task_start( Task_id[TASKID_MATR], matr_task, 1 ); |
|
521 | status = rtems_task_start( Task_id[TASKID_MATR], matr_task, 1 ); | |
523 | if (status!=RTEMS_SUCCESSFUL) { |
|
522 | if (status!=RTEMS_SUCCESSFUL) { | |
524 | BOOT_PRINTF("in INIT *** Error starting TASK_MATR\n") |
|
523 | BOOT_PRINTF("in INIT *** Error starting TASK_MATR\n") | |
525 | } |
|
524 | } | |
526 | } |
|
525 | } | |
527 |
|
526 | |||
528 | if (status == RTEMS_SUCCESSFUL) // CWF3 |
|
527 | if (status == RTEMS_SUCCESSFUL) // CWF3 | |
529 | { |
|
528 | { | |
530 | status = rtems_task_start( Task_id[TASKID_CWF3], cwf3_task, 1 ); |
|
529 | status = rtems_task_start( Task_id[TASKID_CWF3], cwf3_task, 1 ); | |
531 | if (status!=RTEMS_SUCCESSFUL) { |
|
530 | if (status!=RTEMS_SUCCESSFUL) { | |
532 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF3\n") |
|
531 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF3\n") | |
533 | } |
|
532 | } | |
534 | } |
|
533 | } | |
535 |
|
534 | |||
536 | if (status == RTEMS_SUCCESSFUL) // CWF2 |
|
535 | if (status == RTEMS_SUCCESSFUL) // CWF2 | |
537 | { |
|
536 | { | |
538 | status = rtems_task_start( Task_id[TASKID_CWF2], cwf2_task, 1 ); |
|
537 | status = rtems_task_start( Task_id[TASKID_CWF2], cwf2_task, 1 ); | |
539 | if (status!=RTEMS_SUCCESSFUL) { |
|
538 | if (status!=RTEMS_SUCCESSFUL) { | |
540 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF2\n") |
|
539 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF2\n") | |
541 | } |
|
540 | } | |
542 | } |
|
541 | } | |
543 |
|
542 | |||
544 | if (status == RTEMS_SUCCESSFUL) // CWF1 |
|
543 | if (status == RTEMS_SUCCESSFUL) // CWF1 | |
545 | { |
|
544 | { | |
546 | status = rtems_task_start( Task_id[TASKID_CWF1], cwf1_task, 1 ); |
|
545 | status = rtems_task_start( Task_id[TASKID_CWF1], cwf1_task, 1 ); | |
547 | if (status!=RTEMS_SUCCESSFUL) { |
|
546 | if (status!=RTEMS_SUCCESSFUL) { | |
548 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF1\n") |
|
547 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF1\n") | |
549 | } |
|
548 | } | |
550 | } |
|
549 | } | |
551 | return status; |
|
550 | return status; | |
552 | } |
|
551 | } | |
553 |
|
552 | |||
554 | rtems_status_code create_message_queues( void ) // create the two message queues used in the software |
|
553 | rtems_status_code create_message_queues( void ) // create the two message queues used in the software | |
555 | { |
|
554 | { | |
556 | rtems_status_code status_recv; |
|
555 | rtems_status_code status_recv; | |
557 | rtems_status_code status_send; |
|
556 | rtems_status_code status_send; | |
558 | rtems_status_code ret; |
|
557 | rtems_status_code ret; | |
559 | rtems_id queue_id; |
|
558 | rtems_id queue_id; | |
560 |
|
559 | |||
561 | // create the queue for handling valid TCs |
|
560 | // create the queue for handling valid TCs | |
562 | status_recv = rtems_message_queue_create( misc_name[QUEUE_RECV], |
|
561 | status_recv = rtems_message_queue_create( misc_name[QUEUE_RECV], | |
563 | ACTION_MSG_QUEUE_COUNT, CCSDS_TC_PKT_MAX_SIZE, |
|
562 | ACTION_MSG_QUEUE_COUNT, CCSDS_TC_PKT_MAX_SIZE, | |
564 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
563 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
565 | if ( status_recv != RTEMS_SUCCESSFUL ) { |
|
564 | if ( status_recv != RTEMS_SUCCESSFUL ) { | |
566 | PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", status_recv) |
|
565 | PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", status_recv) | |
567 | } |
|
566 | } | |
568 |
|
567 | |||
569 | // create the queue for handling TM packet sending |
|
568 | // create the queue for handling TM packet sending | |
570 | status_send = rtems_message_queue_create( misc_name[QUEUE_SEND], |
|
569 | status_send = rtems_message_queue_create( misc_name[QUEUE_SEND], | |
571 | ACTION_MSG_PKTS_COUNT, ACTION_MSG_PKTS_MAX_SIZE, |
|
570 | ACTION_MSG_PKTS_COUNT, ACTION_MSG_PKTS_MAX_SIZE, | |
572 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
571 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
573 | if ( status_send != RTEMS_SUCCESSFUL ) { |
|
572 | if ( status_send != RTEMS_SUCCESSFUL ) { | |
574 | PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", status_send) |
|
573 | PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", status_send) | |
575 | } |
|
574 | } | |
576 |
|
575 | |||
577 | if ( status_recv != RTEMS_SUCCESSFUL ) |
|
576 | if ( status_recv != RTEMS_SUCCESSFUL ) | |
578 | { |
|
577 | { | |
579 | ret = status_recv; |
|
578 | ret = status_recv; | |
580 | } |
|
579 | } | |
581 | else |
|
580 | else | |
582 | { |
|
581 | { | |
583 | ret = status_send; |
|
582 | ret = status_send; | |
584 | } |
|
583 | } | |
585 |
|
584 | |||
586 | return ret; |
|
585 | return ret; | |
587 | } |
|
586 | } | |
588 |
|
587 | |||
589 | rtems_status_code get_message_queue_id_send( rtems_id *queue_id ) |
|
588 | rtems_status_code get_message_queue_id_send( rtems_id *queue_id ) | |
590 | { |
|
589 | { | |
591 | rtems_status_code status; |
|
590 | rtems_status_code status; | |
592 | rtems_name queue_name; |
|
591 | rtems_name queue_name; | |
593 |
|
592 | |||
594 | queue_name = rtems_build_name( 'Q', '_', 'S', 'D' ); |
|
593 | queue_name = rtems_build_name( 'Q', '_', 'S', 'D' ); | |
595 |
|
594 | |||
596 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); |
|
595 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); | |
597 |
|
596 | |||
598 | return status; |
|
597 | return status; | |
599 | } |
|
598 | } | |
600 |
|
599 | |||
601 | rtems_status_code get_message_queue_id_recv( rtems_id *queue_id ) |
|
600 | rtems_status_code get_message_queue_id_recv( rtems_id *queue_id ) | |
602 | { |
|
601 | { | |
603 | rtems_status_code status; |
|
602 | rtems_status_code status; | |
604 | rtems_name queue_name; |
|
603 | rtems_name queue_name; | |
605 |
|
604 | |||
606 | queue_name = rtems_build_name( 'Q', '_', 'R', 'V' ); |
|
605 | queue_name = rtems_build_name( 'Q', '_', 'R', 'V' ); | |
607 |
|
606 | |||
608 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); |
|
607 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); | |
609 |
|
608 | |||
610 | return status; |
|
609 | return status; | |
611 | } |
|
610 | } |
@@ -1,658 +1,687 | |||||
1 | /** Functions related to data processing. |
|
1 | /** Functions related to data processing. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. |
|
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. | |
7 | * |
|
7 | * | |
8 | */ |
|
8 | */ | |
9 |
|
9 | |||
10 | #include <fsw_processing.h> |
|
10 | #include <fsw_processing.h> | |
11 |
|
11 | |||
12 | #include "fsw_processing_globals.c" |
|
12 | #include "fsw_processing_globals.c" | |
13 |
|
13 | |||
14 | //************************ |
|
14 | //************************ | |
15 | // spectral matrices rings |
|
15 | // spectral matrices rings | |
16 | ring_node sm_ring_f0[NB_RING_NODES_ASM_F0]; |
|
16 | ring_node sm_ring_f0[NB_RING_NODES_ASM_F0]; | |
17 | ring_node sm_ring_f1[NB_RING_NODES_ASM_F1]; |
|
17 | ring_node sm_ring_f1[NB_RING_NODES_ASM_F1]; | |
18 | ring_node sm_ring_f2[NB_RING_NODES_ASM_F2]; |
|
18 | ring_node sm_ring_f2[NB_RING_NODES_ASM_F2]; | |
19 | ring_node *current_ring_node_sm_f0; |
|
19 | ring_node *current_ring_node_sm_f0; | |
20 | ring_node *ring_node_for_averaging_sm_f0; |
|
20 | ring_node *ring_node_for_averaging_sm_f0; | |
21 | ring_node *current_ring_node_sm_f1; |
|
21 | ring_node *current_ring_node_sm_f1; | |
22 | ring_node *current_ring_node_sm_f2; |
|
22 | ring_node *current_ring_node_sm_f2; | |
23 |
|
23 | |||
24 | BP1_t data_BP1[ NB_BINS_COMPRESSED_SM_F0 ]; |
|
24 | BP1_t data_BP1[ NB_BINS_COMPRESSED_SM_F0 ]; | |
25 | float averaged_sm_f0[ TOTAL_SIZE_SM ]; |
|
25 | float averaged_sm_f0[ TOTAL_SIZE_SM ]; | |
26 | char averaged_sm_f0_char[ TOTAL_SIZE_SM * 2 ]; |
|
26 | char averaged_sm_f0_char[ TOTAL_SIZE_SM * 2 ]; | |
27 | float compressed_sm_f0[ TOTAL_SIZE_COMPRESSED_MATRIX_f0 ]; |
|
27 | float compressed_sm_f0[ TOTAL_SIZE_COMPRESSED_MATRIX_f0 ]; | |
28 |
|
28 | |||
|
29 | unsigned int nb_sm_f0; | |||
|
30 | ||||
29 | void init_sm_rings( void ) |
|
31 | void init_sm_rings( void ) | |
30 | { |
|
32 | { | |
31 | unsigned char i; |
|
33 | unsigned char i; | |
32 |
|
34 | |||
33 | // F0 RING |
|
35 | // F0 RING | |
34 | sm_ring_f0[0].next = (ring_node*) &sm_ring_f0[1]; |
|
36 | sm_ring_f0[0].next = (ring_node*) &sm_ring_f0[1]; | |
35 | sm_ring_f0[0].previous = (ring_node*) &sm_ring_f0[NB_RING_NODES_ASM_F0-1]; |
|
37 | sm_ring_f0[0].previous = (ring_node*) &sm_ring_f0[NB_RING_NODES_ASM_F0-1]; | |
36 | sm_ring_f0[0].buffer_address = (int) &sm_f0[0][0]; |
|
38 | sm_ring_f0[0].buffer_address = (int) &sm_f0[0][0]; | |
37 |
|
39 | |||
38 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].next = (ring_node*) &sm_ring_f0[0]; |
|
40 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].next = (ring_node*) &sm_ring_f0[0]; | |
39 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].previous = (ring_node*) &sm_ring_f0[NB_RING_NODES_ASM_F0-2]; |
|
41 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].previous = (ring_node*) &sm_ring_f0[NB_RING_NODES_ASM_F0-2]; | |
40 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].buffer_address = (int) &sm_f0[NB_RING_NODES_ASM_F0-1][0]; |
|
42 | sm_ring_f0[NB_RING_NODES_ASM_F0-1].buffer_address = (int) &sm_f0[NB_RING_NODES_ASM_F0-1][0]; | |
41 |
|
43 | |||
42 | for(i=1; i<NB_RING_NODES_ASM_F0-1; i++) |
|
44 | for(i=1; i<NB_RING_NODES_ASM_F0-1; i++) | |
43 | { |
|
45 | { | |
44 | sm_ring_f0[i].next = (ring_node*) &sm_ring_f0[i+1]; |
|
46 | sm_ring_f0[i].next = (ring_node*) &sm_ring_f0[i+1]; | |
45 | sm_ring_f0[i].previous = (ring_node*) &sm_ring_f0[i-1]; |
|
47 | sm_ring_f0[i].previous = (ring_node*) &sm_ring_f0[i-1]; | |
46 | sm_ring_f0[i].buffer_address = (int) &sm_f0[i][0]; |
|
48 | sm_ring_f0[i].buffer_address = (int) &sm_f0[i][0]; | |
47 | } |
|
49 | } | |
48 |
|
50 | |||
49 | DEBUG_PRINTF1("asm_ring_f0 @%x\n", (unsigned int) sm_ring_f0) |
|
51 | DEBUG_PRINTF1("asm_ring_f0 @%x\n", (unsigned int) sm_ring_f0) | |
50 |
|
52 | |||
|
53 | spectral_matrix_regs->matrixF0_Address0 = sm_ring_f0[0].buffer_address; | |||
|
54 | DEBUG_PRINTF1("spectral_matrix_regs->matrixF0_Address0 @%x\n", spectral_matrix_regs->matrixF0_Address0) | |||
51 | } |
|
55 | } | |
52 |
|
56 | |||
53 | void reset_current_sm_ring_nodes( void ) |
|
57 | void reset_current_sm_ring_nodes( void ) | |
54 | { |
|
58 | { | |
55 | current_ring_node_sm_f0 = sm_ring_f0; |
|
59 | current_ring_node_sm_f0 = sm_ring_f0; | |
56 | ring_node_for_averaging_sm_f0 = sm_ring_f0; |
|
60 | ring_node_for_averaging_sm_f0 = sm_ring_f0; | |
57 | } |
|
61 | } | |
58 |
|
62 | |||
59 | //*********************************************************** |
|
63 | //*********************************************************** | |
60 | // Interrupt Service Routine for spectral matrices processing |
|
64 | // Interrupt Service Routine for spectral matrices processing | |
|
65 | void reset_nb_sm_f0( void ) | |||
|
66 | { | |||
|
67 | nb_sm_f0 = 0; | |||
|
68 | } | |||
|
69 | ||||
61 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ) |
|
70 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ) | |
62 | { |
|
71 | { | |
63 | unsigned char status; |
|
72 | // unsigned char status; | |
64 | unsigned char i; |
|
73 | // unsigned char i; | |
65 | static unsigned int nb_interrupt_f0 = 0; |
|
|||
66 |
|
74 | |||
67 | status = spectral_matrix_regs->status; //[f2 f1 f0_1 f0_0] |
|
75 | // status = spectral_matrix_regs->status; //[f2 f1 f0_1 f0_0] | |
68 | for (i=0; i<4; i++) |
|
76 | // for (i=0; i<4; i++) | |
69 | { |
|
77 | // { | |
70 | if ( ( (status >> i) & 0x01) == 1) // (1) buffer rotation |
|
78 | // if ( ( (status >> i) & 0x01) == 1) // (1) buffer rotation | |
71 | { |
|
79 | // { | |
72 | switch(i) |
|
80 | // switch(i) | |
73 | { |
|
81 | // { | |
74 | case 0: |
|
82 | // case 0: | |
75 | current_ring_node_sm_f0 = current_ring_node_sm_f0->next; |
|
83 | // current_ring_node_sm_f0 = current_ring_node_sm_f0->next; | |
76 | spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; |
|
84 | // spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; | |
77 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; |
|
85 | // spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; | |
78 | nb_interrupt_f0 = nb_interrupt_f0 + 1; |
|
86 | // nb_interrupt_f0 = nb_interrupt_f0 + 1; | |
79 | if (nb_interrupt_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ){ |
|
87 | // if (nb_interrupt_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ){ | |
80 | ring_node_for_averaging_sm_f0 = current_ring_node_sm_f0; |
|
88 | // ring_node_for_averaging_sm_f0 = current_ring_node_sm_f0; | |
81 | if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) |
|
89 | // if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) | |
82 | { |
|
90 | // { | |
83 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); |
|
91 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); | |
84 | } |
|
92 | // } | |
85 | nb_interrupt_f0 = 0; |
|
93 | // nb_interrupt_f0 = 0; | |
86 | } |
|
94 | // } | |
87 | break; |
|
95 | // break; | |
88 | case 1: |
|
96 | // case 1: | |
89 | break; |
|
97 | // break; | |
90 | case 2: |
|
98 | // case 2: | |
91 | break; |
|
99 | // break; | |
92 | default: |
|
100 | // default: | |
93 | break; |
|
101 | // break; | |
94 | } |
|
102 | // } | |
95 | } |
|
103 | // } | |
96 | } |
|
104 | // } | |
97 |
|
105 | |||
98 | // reset error codes to 0 |
|
106 | // // reset error codes to 0 | |
99 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xffffffcf; // [1100 1111] |
|
107 | // spectral_matrix_regs->status = spectral_matrix_regs->status & 0xffffffcf; // [1100 1111] | |
100 | } |
|
108 | } | |
101 |
|
109 | |||
102 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ) |
|
110 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ) | |
103 | { |
|
111 | { | |
104 | static unsigned int nb_interrupt_f0 = 0; |
|
|||
105 |
|
||||
106 | current_ring_node_sm_f0 = current_ring_node_sm_f0->next; |
|
112 | current_ring_node_sm_f0 = current_ring_node_sm_f0->next; | |
107 | spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; |
|
113 | spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; | |
108 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; |
|
114 | spectral_matrix_regs->status = spectral_matrix_regs->status & 0xfffffffe; | |
109 | nb_interrupt_f0 = nb_interrupt_f0 + 1; |
|
115 | ||
110 | if (nb_interrupt_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ) |
|
116 | rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ); | |
111 | { |
|
117 | // if (nb_sm_f0 == NB_SM_TO_RECEIVE_BEFORE_AVF0 ) | |
112 | ring_node_for_averaging_sm_f0 = current_ring_node_sm_f0; |
|
118 | // { | |
113 | if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) |
|
119 | // ring_node_for_averaging_sm_f0 = current_ring_node_sm_f0; | |
114 | { |
|
120 | // if (rtems_event_send( Task_id[TASKID_AVF0], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) | |
115 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); |
|
121 | // { | |
116 | } |
|
122 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_3 ); | |
117 | nb_interrupt_f0 = 0; |
|
123 | // } | |
118 | } |
|
124 | // nb_sm_f0 = 0; | |
|
125 | // } | |||
|
126 | // else | |||
|
127 | // { | |||
|
128 | // nb_sm_f0 = nb_sm_f0 + 1; | |||
|
129 | // } | |||
119 | } |
|
130 | } | |
120 |
|
131 | |||
121 | //************ |
|
132 | //************ | |
122 | // RTEMS TASKS |
|
133 | // RTEMS TASKS | |
123 |
|
134 | |||
124 | rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ |
|
135 | rtems_task smiq_task(rtems_task_argument argument) // process the Spectral Matrices IRQ | |
125 | { |
|
136 | { | |
126 | rtems_event_set event_out; |
|
137 | rtems_event_set event_out; | |
127 |
|
138 | |||
128 | BOOT_PRINTF("in SMIQ *** \n") |
|
139 | BOOT_PRINTF("in SMIQ *** \n") | |
129 |
|
140 | |||
130 | while(1){ |
|
141 | while(1){ | |
131 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
142 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
132 | } |
|
143 | } | |
133 | } |
|
144 | } | |
134 |
|
145 | |||
135 | rtems_task spw_bppr_task(rtems_task_argument argument) |
|
146 | rtems_task spw_bppr_task(rtems_task_argument argument) | |
136 | { |
|
147 | { | |
137 | rtems_status_code status; |
|
148 | rtems_status_code status; | |
138 | rtems_event_set event_out; |
|
149 | rtems_event_set event_out; | |
139 |
|
150 | |||
140 | BOOT_PRINTF("in BPPR ***\n"); |
|
151 | BOOT_PRINTF("in BPPR ***\n"); | |
141 |
|
152 | |||
142 | while( true ){ // wait for an event to begin with the processing |
|
153 | while( true ){ // wait for an event to begin with the processing | |
143 | status = rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); |
|
154 | status = rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); | |
144 | } |
|
155 | } | |
145 | } |
|
156 | } | |
146 |
|
157 | |||
147 | rtems_task avf0_task(rtems_task_argument argument) |
|
158 | rtems_task avf0_task(rtems_task_argument argument) | |
148 | { |
|
159 | { | |
149 | int i; |
|
160 | int i; | |
150 | static int nb_average; |
|
161 | static int nb_average; | |
151 | rtems_event_set event_out; |
|
162 | rtems_event_set event_out; | |
152 | rtems_status_code status; |
|
163 | rtems_status_code status; | |
|
164 | ring_node *ring_node_tab[8]; | |||
153 |
|
165 | |||
154 | nb_average = 0; |
|
166 | nb_average = 0; | |
155 |
|
167 | |||
156 | BOOT_PRINTF("in AVFO *** \n") |
|
168 | BOOT_PRINTF("in AVFO *** \n") | |
157 |
|
169 | |||
158 | while(1){ |
|
170 | while(1){ | |
159 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
171 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
160 | for (i=0; i<NB_SM_TO_RECEIVE_BEFORE_AVF0; i++) |
|
172 | PRINTF("avf0\n") | |
|
173 | ring_node_tab[NB_SM_TO_RECEIVE_BEFORE_AVF0-1] = ring_node_for_averaging_sm_f0; | |||
|
174 | for (i=0; i<NB_SM_TO_RECEIVE_BEFORE_AVF0-1; i++) | |||
161 | { |
|
175 | { | |
162 | ring_node_for_averaging_sm_f0 = ring_node_for_averaging_sm_f0->previous; |
|
176 | ring_node_for_averaging_sm_f0 = ring_node_for_averaging_sm_f0->previous; | |
|
177 | ring_node_tab[i] = ring_node_for_averaging_sm_f0; | |||
163 | } |
|
178 | } | |
164 |
for(i=0; i<TOTAL_SIZE_SM; i++) |
|
179 | for(i=0; i<TOTAL_SIZE_SM; i++) | |
165 | averaged_sm_f0[i] = ( (int *) (ring_node_for_averaging_sm_f0[0].buffer_address) )[i] |
|
180 | { | |
166 |
|
|
181 | averaged_sm_f0[i] = ( (int *) (ring_node_tab[0]->buffer_address) ) [i] | |
167 |
+ ( (int *) (ring_node_ |
|
182 | + ( (int *) (ring_node_tab[1]->buffer_address) ) [i] | |
168 |
+ ( (int *) (ring_node_ |
|
183 | + ( (int *) (ring_node_tab[2]->buffer_address) ) [i] | |
169 |
+ ( (int *) (ring_node_ |
|
184 | + ( (int *) (ring_node_tab[3]->buffer_address) ) [i] | |
170 |
+ ( (int *) (ring_node_ |
|
185 | + ( (int *) (ring_node_tab[4]->buffer_address) ) [i] | |
171 |
+ ( (int *) (ring_node_ |
|
186 | + ( (int *) (ring_node_tab[5]->buffer_address) ) [i] | |
172 |
+ ( (int *) (ring_node_ |
|
187 | + ( (int *) (ring_node_tab[6]->buffer_address) ) [i] | |
|
188 | + ( (int *) (ring_node_tab[7]->buffer_address) ) [i]; | |||
173 | } |
|
189 | } | |
174 | nb_average = nb_average + NB_SM_TO_RECEIVE_BEFORE_AVF0; |
|
190 | nb_average = nb_average + NB_SM_TO_RECEIVE_BEFORE_AVF0; | |
175 | if (nb_average == NB_AVERAGE_NORMAL_f0) { |
|
191 | if (nb_average == NB_AVERAGE_NORMAL_f0) { | |
176 | nb_average = 0; |
|
192 | nb_average = 0; | |
177 | status = rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ); // sending an event to the task 7, BPF0 |
|
193 | status = rtems_event_send( Task_id[TASKID_MATR], RTEMS_EVENT_0 ); // sending an event to the task 7, BPF0 | |
178 | if (status != RTEMS_SUCCESSFUL) { |
|
194 | if (status != RTEMS_SUCCESSFUL) { | |
179 | printf("in AVF0 *** Error sending RTEMS_EVENT_0, code %d\n", status); |
|
195 | printf("in AVF0 *** Error sending RTEMS_EVENT_0, code %d\n", status); | |
180 | } |
|
196 | } | |
181 | } |
|
197 | } | |
182 | } |
|
198 | } | |
183 | } |
|
199 | } | |
184 |
|
200 | |||
185 | rtems_task bpf0_task(rtems_task_argument argument) |
|
201 | rtems_task bpf0_task(rtems_task_argument argument) | |
186 | { |
|
202 | { | |
187 | rtems_event_set event_out; |
|
203 | rtems_event_set event_out; | |
188 | static unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_SM_F0 * 9 ]; |
|
204 | static unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_SM_F0 * 9 ]; | |
189 |
|
205 | |||
190 | BOOT_PRINTF("in BPFO *** \n") |
|
206 | BOOT_PRINTF("in BPFO *** \n") | |
191 |
|
207 | |||
192 | while(1){ |
|
208 | while(1){ | |
193 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
209 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
194 | matrix_compression(averaged_sm_f0, 0, compressed_sm_f0); |
|
210 | matrix_compression(averaged_sm_f0, 0, compressed_sm_f0); | |
195 | BP1_set(compressed_sm_f0, NB_BINS_COMPRESSED_SM_F0, LFR_BP1_F0); |
|
211 | BP1_set(compressed_sm_f0, NB_BINS_COMPRESSED_SM_F0, LFR_BP1_F0); | |
196 | } |
|
212 | } | |
197 | } |
|
213 | } | |
198 |
|
214 | |||
199 | rtems_task matr_task(rtems_task_argument argument) |
|
215 | rtems_task matr_task(rtems_task_argument argument) | |
200 | { |
|
216 | { | |
201 | spw_ioctl_pkt_send spw_ioctl_send_ASM; |
|
217 | spw_ioctl_pkt_send spw_ioctl_send_ASM; | |
202 | rtems_event_set event_out; |
|
218 | rtems_event_set event_out; | |
203 | rtems_status_code status; |
|
219 | rtems_status_code status; | |
204 | rtems_id queue_id; |
|
220 | rtems_id queue_id; | |
205 | Header_TM_LFR_SCIENCE_ASM_t headerASM; |
|
221 | Header_TM_LFR_SCIENCE_ASM_t headerASM; | |
206 |
|
222 | |||
207 | init_header_asm( &headerASM ); |
|
223 | init_header_asm( &headerASM ); | |
208 |
|
224 | |||
209 | status = get_message_queue_id_send( &queue_id ); |
|
225 | status = get_message_queue_id_send( &queue_id ); | |
210 | if (status != RTEMS_SUCCESSFUL) |
|
226 | if (status != RTEMS_SUCCESSFUL) | |
211 | { |
|
227 | { | |
212 | PRINTF1("in MATR *** ERR get_message_queue_id_send %d\n", status) |
|
228 | PRINTF1("in MATR *** ERR get_message_queue_id_send %d\n", status) | |
213 | } |
|
229 | } | |
214 |
|
230 | |||
215 | BOOT_PRINTF("in MATR *** \n") |
|
231 | BOOT_PRINTF("in MATR *** \n") | |
216 |
|
232 | |||
217 | fill_averaged_spectral_matrix( ); |
|
233 | fill_averaged_spectral_matrix( ); | |
218 |
|
234 | |||
219 | while(1){ |
|
235 | while(1){ | |
220 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
236 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
221 | // 1) convert the float array in a char array |
|
237 | // 1) convert the float array in a char array | |
222 | convert_averaged_spectral_matrix( averaged_sm_f0, averaged_sm_f0_char); |
|
238 | convert_averaged_spectral_matrix( averaged_sm_f0, averaged_sm_f0_char); | |
223 | // 2) send the spectral matrix packets |
|
239 | // 2) send the spectral matrix packets | |
224 | send_spectral_matrix( &headerASM, averaged_sm_f0_char, SID_NORM_ASM_F0, &spw_ioctl_send_ASM, queue_id); |
|
240 | send_spectral_matrix( &headerASM, averaged_sm_f0_char, SID_NORM_ASM_F0, &spw_ioctl_send_ASM, queue_id); | |
225 | } |
|
241 | } | |
226 | } |
|
242 | } | |
227 |
|
243 | |||
228 | //***************************** |
|
244 | //***************************** | |
229 | // Spectral matrices processing |
|
245 | // Spectral matrices processing | |
230 |
|
246 | |||
231 | void matrix_reset(volatile float *averaged_spec_mat) |
|
247 | void matrix_reset(volatile float *averaged_spec_mat) | |
232 | { |
|
248 | { | |
233 | int i; |
|
249 | int i; | |
234 | for(i=0; i<TOTAL_SIZE_SM; i++){ |
|
250 | for(i=0; i<TOTAL_SIZE_SM; i++){ | |
235 | averaged_spec_mat[i] = 0; |
|
251 | averaged_spec_mat[i] = 0; | |
236 | } |
|
252 | } | |
237 | } |
|
253 | } | |
238 |
|
254 | |||
239 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat) |
|
255 | void matrix_compression(volatile float *averaged_spec_mat, unsigned char fChannel, float *compressed_spec_mat) | |
240 | { |
|
256 | { | |
241 | int i; |
|
257 | int i; | |
242 | int j; |
|
258 | int j; | |
243 | switch (fChannel){ |
|
259 | switch (fChannel){ | |
244 | case 0: |
|
260 | case 0: | |
245 | for(i=0;i<NB_BINS_COMPRESSED_SM_F0;i++){ |
|
261 | for(i=0;i<NB_BINS_COMPRESSED_SM_F0;i++){ | |
246 | j = 17 + (i * 8); |
|
262 | j = 17 + (i * 8); | |
247 | compressed_spec_mat[i] = (averaged_spec_mat[j] |
|
263 | compressed_spec_mat[i] = (averaged_spec_mat[j] | |
248 | + averaged_spec_mat[j+1] |
|
264 | + averaged_spec_mat[j+1] | |
249 | + averaged_spec_mat[j+2] |
|
265 | + averaged_spec_mat[j+2] | |
250 | + averaged_spec_mat[j+3] |
|
266 | + averaged_spec_mat[j+3] | |
251 | + averaged_spec_mat[j+4] |
|
267 | + averaged_spec_mat[j+4] | |
252 | + averaged_spec_mat[j+5] |
|
268 | + averaged_spec_mat[j+5] | |
253 | + averaged_spec_mat[j+6] |
|
269 | + averaged_spec_mat[j+6] | |
254 | + averaged_spec_mat[j+7])/(8*NB_AVERAGE_NORMAL_f0); |
|
270 | + averaged_spec_mat[j+7])/(8*NB_AVERAGE_NORMAL_f0); | |
255 | } |
|
271 | } | |
256 | break; |
|
272 | break; | |
257 | case 1: |
|
273 | case 1: | |
258 | // case fChannel = f1 to be completed later |
|
274 | // case fChannel = f1 to be completed later | |
259 | break; |
|
275 | break; | |
260 | case 2: |
|
276 | case 2: | |
261 | // case fChannel = f1 to be completed later |
|
277 | // case fChannel = f1 to be completed later | |
262 | break; |
|
278 | break; | |
263 | default: |
|
279 | default: | |
264 | break; |
|
280 | break; | |
265 | } |
|
281 | } | |
266 | } |
|
282 | } | |
267 |
|
283 | |||
268 | void BP1_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1){ |
|
284 | void BP1_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * LFR_BP1){ | |
269 | int i; |
|
285 | int i; | |
270 | int j; |
|
286 | int j; | |
271 | unsigned char tmp_u_char; |
|
287 | unsigned char tmp_u_char; | |
272 | unsigned char * pt_char = NULL; |
|
288 | unsigned char * pt_char = NULL; | |
273 | float PSDB, PSDE; |
|
289 | float PSDB, PSDE; | |
274 | float NVEC_V0; |
|
290 | float NVEC_V0; | |
275 | float NVEC_V1; |
|
291 | float NVEC_V1; | |
276 | float NVEC_V2; |
|
292 | float NVEC_V2; | |
277 | //float significand; |
|
293 | //float significand; | |
278 | //int exponent; |
|
294 | //int exponent; | |
279 | float aux; |
|
295 | float aux; | |
280 | float tr_SB_SB; |
|
296 | float tr_SB_SB; | |
281 | float tmp; |
|
297 | float tmp; | |
282 | float sx_re; |
|
298 | float sx_re; | |
283 | float sx_im; |
|
299 | float sx_im; | |
284 | float nebx_re = 0; |
|
300 | float nebx_re = 0; | |
285 | float nebx_im = 0; |
|
301 | float nebx_im = 0; | |
286 | float ny = 0; |
|
302 | float ny = 0; | |
287 | float nz = 0; |
|
303 | float nz = 0; | |
288 | float bx_bx_star = 0; |
|
304 | float bx_bx_star = 0; | |
289 | for(i=0; i<nb_bins_compressed_spec_mat; i++){ |
|
305 | for(i=0; i<nb_bins_compressed_spec_mat; i++){ | |
290 | //============================================== |
|
306 | //============================================== | |
291 | // BP1 PSD == B PAR_LFR_SC_BP1_PE_FL0 == 16 bits |
|
307 | // BP1 PSD == B PAR_LFR_SC_BP1_PE_FL0 == 16 bits | |
292 | PSDB = compressed_spec_mat[i*30] // S11 |
|
308 | PSDB = compressed_spec_mat[i*30] // S11 | |
293 | + compressed_spec_mat[(i*30) + 10] // S22 |
|
309 | + compressed_spec_mat[(i*30) + 10] // S22 | |
294 | + compressed_spec_mat[(i*30) + 18]; // S33 |
|
310 | + compressed_spec_mat[(i*30) + 18]; // S33 | |
295 | //significand = frexp(PSDB, &exponent); |
|
311 | //significand = frexp(PSDB, &exponent); | |
296 | pt_char = (unsigned char*) &PSDB; |
|
312 | pt_char = (unsigned char*) &PSDB; | |
297 | LFR_BP1[(i*9) + 2] = pt_char[0]; // bits 31 downto 24 of the float |
|
313 | LFR_BP1[(i*9) + 2] = pt_char[0]; // bits 31 downto 24 of the float | |
298 | LFR_BP1[(i*9) + 3] = pt_char[1]; // bits 23 downto 16 of the float |
|
314 | LFR_BP1[(i*9) + 3] = pt_char[1]; // bits 23 downto 16 of the float | |
299 | //============================================== |
|
315 | //============================================== | |
300 | // BP1 PSD == E PAR_LFR_SC_BP1_PB_FL0 == 16 bits |
|
316 | // BP1 PSD == E PAR_LFR_SC_BP1_PB_FL0 == 16 bits | |
301 | PSDE = compressed_spec_mat[(i*30) + 24] * K44_pe // S44 |
|
317 | PSDE = compressed_spec_mat[(i*30) + 24] * K44_pe // S44 | |
302 | + compressed_spec_mat[(i*30) + 28] * K55_pe // S55 |
|
318 | + compressed_spec_mat[(i*30) + 28] * K55_pe // S55 | |
303 | + compressed_spec_mat[(i*30) + 26] * K45_pe_re // S45 |
|
319 | + compressed_spec_mat[(i*30) + 26] * K45_pe_re // S45 | |
304 | - compressed_spec_mat[(i*30) + 27] * K45_pe_im; // S45 |
|
320 | - compressed_spec_mat[(i*30) + 27] * K45_pe_im; // S45 | |
305 | pt_char = (unsigned char*) &PSDE; |
|
321 | pt_char = (unsigned char*) &PSDE; | |
306 | LFR_BP1[(i*9) + 0] = pt_char[0]; // bits 31 downto 24 of the float |
|
322 | LFR_BP1[(i*9) + 0] = pt_char[0]; // bits 31 downto 24 of the float | |
307 | LFR_BP1[(i*9) + 1] = pt_char[1]; // bits 23 downto 16 of the float |
|
323 | LFR_BP1[(i*9) + 1] = pt_char[1]; // bits 23 downto 16 of the float | |
308 | //============================================================================== |
|
324 | //============================================================================== | |
309 | // BP1 normal wave vector == PAR_LFR_SC_BP1_NVEC_V0_F0 == 8 bits |
|
325 | // BP1 normal wave vector == PAR_LFR_SC_BP1_NVEC_V0_F0 == 8 bits | |
310 | // == PAR_LFR_SC_BP1_NVEC_V1_F0 == 8 bits |
|
326 | // == PAR_LFR_SC_BP1_NVEC_V1_F0 == 8 bits | |
311 | // == PAR_LFR_SC_BP1_NVEC_V2_F0 == 1 bits |
|
327 | // == PAR_LFR_SC_BP1_NVEC_V2_F0 == 1 bits | |
312 | tmp = sqrt( |
|
328 | tmp = sqrt( | |
313 | compressed_spec_mat[(i*30) + 3]*compressed_spec_mat[(i*30) + 3] //Im S12 |
|
329 | compressed_spec_mat[(i*30) + 3]*compressed_spec_mat[(i*30) + 3] //Im S12 | |
314 | +compressed_spec_mat[(i*30) + 5]*compressed_spec_mat[(i*30) + 5] //Im S13 |
|
330 | +compressed_spec_mat[(i*30) + 5]*compressed_spec_mat[(i*30) + 5] //Im S13 | |
315 | +compressed_spec_mat[(i*30) + 13]*compressed_spec_mat[(i*30) + 13] //Im S23 |
|
331 | +compressed_spec_mat[(i*30) + 13]*compressed_spec_mat[(i*30) + 13] //Im S23 | |
316 | ); |
|
332 | ); | |
317 | NVEC_V0 = compressed_spec_mat[(i*30) + 13] / tmp; // Im S23 |
|
333 | NVEC_V0 = compressed_spec_mat[(i*30) + 13] / tmp; // Im S23 | |
318 | NVEC_V1 = -compressed_spec_mat[(i*30) + 5] / tmp; // Im S13 |
|
334 | NVEC_V1 = -compressed_spec_mat[(i*30) + 5] / tmp; // Im S13 | |
319 | NVEC_V2 = compressed_spec_mat[(i*30) + 3] / tmp; // Im S12 |
|
335 | NVEC_V2 = compressed_spec_mat[(i*30) + 3] / tmp; // Im S12 | |
320 | LFR_BP1[(i*9) + 4] = (char) (NVEC_V0*127); |
|
336 | LFR_BP1[(i*9) + 4] = (char) (NVEC_V0*127); | |
321 | LFR_BP1[(i*9) + 5] = (char) (NVEC_V1*127); |
|
337 | LFR_BP1[(i*9) + 5] = (char) (NVEC_V1*127); | |
322 | pt_char = (unsigned char*) &NVEC_V2; |
|
338 | pt_char = (unsigned char*) &NVEC_V2; | |
323 | LFR_BP1[(i*9) + 6] = pt_char[0] & 0x80; // extract the sign of NVEC_V2 |
|
339 | LFR_BP1[(i*9) + 6] = pt_char[0] & 0x80; // extract the sign of NVEC_V2 | |
324 | //======================================================= |
|
340 | //======================================================= | |
325 | // BP1 ellipticity == PAR_LFR_SC_BP1_ELLIP_F0 == 4 bits |
|
341 | // BP1 ellipticity == PAR_LFR_SC_BP1_ELLIP_F0 == 4 bits | |
326 | aux = 2*tmp / PSDB; // compute the ellipticity |
|
342 | aux = 2*tmp / PSDB; // compute the ellipticity | |
327 | tmp_u_char = (unsigned char) (aux*(16-1)); // convert the ellipticity |
|
343 | tmp_u_char = (unsigned char) (aux*(16-1)); // convert the ellipticity | |
328 | LFR_BP1[i*9+6] = LFR_BP1[i*9+6] | ((tmp_u_char&0x0f)<<3); // keeps 4 bits of the resulting unsigned char |
|
344 | LFR_BP1[i*9+6] = LFR_BP1[i*9+6] | ((tmp_u_char&0x0f)<<3); // keeps 4 bits of the resulting unsigned char | |
329 | //============================================================== |
|
345 | //============================================================== | |
330 | // BP1 degree of polarization == PAR_LFR_SC_BP1_DOP_F0 == 3 bits |
|
346 | // BP1 degree of polarization == PAR_LFR_SC_BP1_DOP_F0 == 3 bits | |
331 | for(j = 0; j<NB_VALUES_PER_SM;j++){ |
|
347 | for(j = 0; j<NB_VALUES_PER_SM;j++){ | |
332 | tr_SB_SB = compressed_spec_mat[i*30] * compressed_spec_mat[i*30] |
|
348 | tr_SB_SB = compressed_spec_mat[i*30] * compressed_spec_mat[i*30] | |
333 | + compressed_spec_mat[(i*30) + 10] * compressed_spec_mat[(i*30) + 10] |
|
349 | + compressed_spec_mat[(i*30) + 10] * compressed_spec_mat[(i*30) + 10] | |
334 | + compressed_spec_mat[(i*30) + 18] * compressed_spec_mat[(i*30) + 18] |
|
350 | + compressed_spec_mat[(i*30) + 18] * compressed_spec_mat[(i*30) + 18] | |
335 | + 2 * compressed_spec_mat[(i*30) + 2] * compressed_spec_mat[(i*30) + 2] |
|
351 | + 2 * compressed_spec_mat[(i*30) + 2] * compressed_spec_mat[(i*30) + 2] | |
336 | + 2 * compressed_spec_mat[(i*30) + 3] * compressed_spec_mat[(i*30) + 3] |
|
352 | + 2 * compressed_spec_mat[(i*30) + 3] * compressed_spec_mat[(i*30) + 3] | |
337 | + 2 * compressed_spec_mat[(i*30) + 4] * compressed_spec_mat[(i*30) + 4] |
|
353 | + 2 * compressed_spec_mat[(i*30) + 4] * compressed_spec_mat[(i*30) + 4] | |
338 | + 2 * compressed_spec_mat[(i*30) + 5] * compressed_spec_mat[(i*30) + 5] |
|
354 | + 2 * compressed_spec_mat[(i*30) + 5] * compressed_spec_mat[(i*30) + 5] | |
339 | + 2 * compressed_spec_mat[(i*30) + 12] * compressed_spec_mat[(i*30) + 12] |
|
355 | + 2 * compressed_spec_mat[(i*30) + 12] * compressed_spec_mat[(i*30) + 12] | |
340 | + 2 * compressed_spec_mat[(i*30) + 13] * compressed_spec_mat[(i*30) + 13]; |
|
356 | + 2 * compressed_spec_mat[(i*30) + 13] * compressed_spec_mat[(i*30) + 13]; | |
341 | } |
|
357 | } | |
342 | aux = PSDB*PSDB; |
|
358 | aux = PSDB*PSDB; | |
343 | tmp = sqrt( abs( ( 3*tr_SB_SB - aux ) / ( 2 * aux ) ) ); |
|
359 | tmp = sqrt( abs( ( 3*tr_SB_SB - aux ) / ( 2 * aux ) ) ); | |
344 | tmp_u_char = (unsigned char) (NVEC_V0*(8-1)); |
|
360 | tmp_u_char = (unsigned char) (NVEC_V0*(8-1)); | |
345 | LFR_BP1[(i*9) + 6] = LFR_BP1[(i*9) + 6] | (tmp_u_char & 0x07); // keeps 3 bits of the resulting unsigned char |
|
361 | LFR_BP1[(i*9) + 6] = LFR_BP1[(i*9) + 6] | (tmp_u_char & 0x07); // keeps 3 bits of the resulting unsigned char | |
346 | //======================================================================================= |
|
362 | //======================================================================================= | |
347 | // BP1 x-component of the normalized Poynting flux == PAR_LFR_SC_BP1_SZ_F0 == 8 bits (7+1) |
|
363 | // BP1 x-component of the normalized Poynting flux == PAR_LFR_SC_BP1_SZ_F0 == 8 bits (7+1) | |
348 | sx_re = compressed_spec_mat[(i*30) + 20] * K34_sx_re |
|
364 | sx_re = compressed_spec_mat[(i*30) + 20] * K34_sx_re | |
349 | + compressed_spec_mat[(i*30) + 6] * K14_sx_re |
|
365 | + compressed_spec_mat[(i*30) + 6] * K14_sx_re | |
350 | + compressed_spec_mat[(i*30) + 8] * K15_sx_re |
|
366 | + compressed_spec_mat[(i*30) + 8] * K15_sx_re | |
351 | + compressed_spec_mat[(i*30) + 14] * K24_sx_re |
|
367 | + compressed_spec_mat[(i*30) + 14] * K24_sx_re | |
352 | + compressed_spec_mat[(i*30) + 16] * K25_sx_re |
|
368 | + compressed_spec_mat[(i*30) + 16] * K25_sx_re | |
353 | + compressed_spec_mat[(i*30) + 22] * K35_sx_re; |
|
369 | + compressed_spec_mat[(i*30) + 22] * K35_sx_re; | |
354 | sx_im = compressed_spec_mat[(i*30) + 21] * K34_sx_im |
|
370 | sx_im = compressed_spec_mat[(i*30) + 21] * K34_sx_im | |
355 | + compressed_spec_mat[(i*30) + 7] * K14_sx_im |
|
371 | + compressed_spec_mat[(i*30) + 7] * K14_sx_im | |
356 | + compressed_spec_mat[(i*30) + 9] * K15_sx_im |
|
372 | + compressed_spec_mat[(i*30) + 9] * K15_sx_im | |
357 | + compressed_spec_mat[(i*30) + 15] * K24_sx_im |
|
373 | + compressed_spec_mat[(i*30) + 15] * K24_sx_im | |
358 | + compressed_spec_mat[(i*30) + 17] * K25_sx_im |
|
374 | + compressed_spec_mat[(i*30) + 17] * K25_sx_im | |
359 | + compressed_spec_mat[(i*30) + 23] * K35_sx_im; |
|
375 | + compressed_spec_mat[(i*30) + 23] * K35_sx_im; | |
360 | LFR_BP1[(i*9) + 7] = ((unsigned char) (sx_re * 128)) & 0x7f; // cf DOC for the compression |
|
376 | LFR_BP1[(i*9) + 7] = ((unsigned char) (sx_re * 128)) & 0x7f; // cf DOC for the compression | |
361 | if ( abs(sx_re) > abs(sx_im) ) { |
|
377 | if ( abs(sx_re) > abs(sx_im) ) { | |
362 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] | (0x80); // extract the sector of sx |
|
378 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] | (0x80); // extract the sector of sx | |
363 | } |
|
379 | } | |
364 | else { |
|
380 | else { | |
365 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] & (0x7f); // extract the sector of sx |
|
381 | LFR_BP1[(i*9) + 7] = LFR_BP1[(i*9) + 1] & (0x7f); // extract the sector of sx | |
366 | } |
|
382 | } | |
367 | //====================================================================== |
|
383 | //====================================================================== | |
368 | // BP1 phase velocity estimator == PAR_LFR_SC_BP1_VPHI_F0 == 8 bits (7+1) |
|
384 | // BP1 phase velocity estimator == PAR_LFR_SC_BP1_VPHI_F0 == 8 bits (7+1) | |
369 | ny = sin(Alpha_M)*NVEC_V1 + cos(Alpha_M)*NVEC_V2; |
|
385 | ny = sin(Alpha_M)*NVEC_V1 + cos(Alpha_M)*NVEC_V2; | |
370 | nz = NVEC_V0; |
|
386 | nz = NVEC_V0; | |
371 | bx_bx_star = cos(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+10] // re S22 |
|
387 | bx_bx_star = cos(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+10] // re S22 | |
372 | + sin(Alpha_M) * sin(Alpha_M) * compressed_spec_mat[i*30+18] // re S33 |
|
388 | + sin(Alpha_M) * sin(Alpha_M) * compressed_spec_mat[i*30+18] // re S33 | |
373 | - 2 * sin(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+12]; // re S23 |
|
389 | - 2 * sin(Alpha_M) * cos(Alpha_M) * compressed_spec_mat[i*30+12]; // re S23 | |
374 | nebx_re = ny * (compressed_spec_mat[(i*30) + 14] * K24_ny_re |
|
390 | nebx_re = ny * (compressed_spec_mat[(i*30) + 14] * K24_ny_re | |
375 | +compressed_spec_mat[(i*30) + 16] * K25_ny_re |
|
391 | +compressed_spec_mat[(i*30) + 16] * K25_ny_re | |
376 | +compressed_spec_mat[(i*30) + 20] * K34_ny_re |
|
392 | +compressed_spec_mat[(i*30) + 20] * K34_ny_re | |
377 | +compressed_spec_mat[(i*30) + 22] * K35_ny_re) |
|
393 | +compressed_spec_mat[(i*30) + 22] * K35_ny_re) | |
378 | + nz * (compressed_spec_mat[(i*30) + 14] * K24_nz_re |
|
394 | + nz * (compressed_spec_mat[(i*30) + 14] * K24_nz_re | |
379 | +compressed_spec_mat[(i*30) + 16] * K25_nz_re |
|
395 | +compressed_spec_mat[(i*30) + 16] * K25_nz_re | |
380 | +compressed_spec_mat[(i*30) + 20] * K34_nz_re |
|
396 | +compressed_spec_mat[(i*30) + 20] * K34_nz_re | |
381 | +compressed_spec_mat[(i*30) + 22] * K35_nz_re); |
|
397 | +compressed_spec_mat[(i*30) + 22] * K35_nz_re); | |
382 | nebx_im = ny * (compressed_spec_mat[(i*30) + 15]*K24_ny_re |
|
398 | nebx_im = ny * (compressed_spec_mat[(i*30) + 15]*K24_ny_re | |
383 | +compressed_spec_mat[(i*30) + 17] * K25_ny_re |
|
399 | +compressed_spec_mat[(i*30) + 17] * K25_ny_re | |
384 | +compressed_spec_mat[(i*30) + 21] * K34_ny_re |
|
400 | +compressed_spec_mat[(i*30) + 21] * K34_ny_re | |
385 | +compressed_spec_mat[(i*30) + 23] * K35_ny_re) |
|
401 | +compressed_spec_mat[(i*30) + 23] * K35_ny_re) | |
386 | + nz * (compressed_spec_mat[(i*30) + 15] * K24_nz_im |
|
402 | + nz * (compressed_spec_mat[(i*30) + 15] * K24_nz_im | |
387 | +compressed_spec_mat[(i*30) + 17] * K25_nz_im |
|
403 | +compressed_spec_mat[(i*30) + 17] * K25_nz_im | |
388 | +compressed_spec_mat[(i*30) + 21] * K34_nz_im |
|
404 | +compressed_spec_mat[(i*30) + 21] * K34_nz_im | |
389 | +compressed_spec_mat[(i*30) + 23] * K35_nz_im); |
|
405 | +compressed_spec_mat[(i*30) + 23] * K35_nz_im); | |
390 | tmp = nebx_re / bx_bx_star; |
|
406 | tmp = nebx_re / bx_bx_star; | |
391 | LFR_BP1[(i*9) + 8] = ((unsigned char) (tmp * 128)) & 0x7f; // cf DOC for the compression |
|
407 | LFR_BP1[(i*9) + 8] = ((unsigned char) (tmp * 128)) & 0x7f; // cf DOC for the compression | |
392 | if ( abs(nebx_re) > abs(nebx_im) ) { |
|
408 | if ( abs(nebx_re) > abs(nebx_im) ) { | |
393 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] | (0x80); // extract the sector of nebx |
|
409 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] | (0x80); // extract the sector of nebx | |
394 | } |
|
410 | } | |
395 | else { |
|
411 | else { | |
396 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] & (0x7f); // extract the sector of nebx |
|
412 | LFR_BP1[(i*9) + 8] = LFR_BP1[(i*9) + 8] & (0x7f); // extract the sector of nebx | |
397 | } |
|
413 | } | |
398 | } |
|
414 | } | |
399 |
|
415 | |||
400 | } |
|
416 | } | |
401 |
|
417 | |||
402 | void BP2_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat){ |
|
418 | void BP2_set_old(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat){ | |
403 | // BP2 autocorrelation |
|
419 | // BP2 autocorrelation | |
404 | int i; |
|
420 | int i; | |
405 | int aux = 0; |
|
421 | int aux = 0; | |
406 |
|
422 | |||
407 | for(i = 0; i<nb_bins_compressed_spec_mat; i++){ |
|
423 | for(i = 0; i<nb_bins_compressed_spec_mat; i++){ | |
408 | // S12 |
|
424 | // S12 | |
409 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 10]); |
|
425 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 10]); | |
410 | compressed_spec_mat[(i*30) + 2] = compressed_spec_mat[(i*30) + 2] / aux; |
|
426 | compressed_spec_mat[(i*30) + 2] = compressed_spec_mat[(i*30) + 2] / aux; | |
411 | compressed_spec_mat[(i*30) + 3] = compressed_spec_mat[(i*30) + 3] / aux; |
|
427 | compressed_spec_mat[(i*30) + 3] = compressed_spec_mat[(i*30) + 3] / aux; | |
412 | // S13 |
|
428 | // S13 | |
413 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 18]); |
|
429 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 18]); | |
414 | compressed_spec_mat[(i*30) + 4] = compressed_spec_mat[(i*30) + 4] / aux; |
|
430 | compressed_spec_mat[(i*30) + 4] = compressed_spec_mat[(i*30) + 4] / aux; | |
415 | compressed_spec_mat[(i*30) + 5] = compressed_spec_mat[(i*30) + 5] / aux; |
|
431 | compressed_spec_mat[(i*30) + 5] = compressed_spec_mat[(i*30) + 5] / aux; | |
416 | // S23 |
|
432 | // S23 | |
417 | aux = sqrt(compressed_spec_mat[i*30+12]*compressed_spec_mat[(i*30) + 18]); |
|
433 | aux = sqrt(compressed_spec_mat[i*30+12]*compressed_spec_mat[(i*30) + 18]); | |
418 | compressed_spec_mat[(i*30) + 12] = compressed_spec_mat[(i*30) + 12] / aux; |
|
434 | compressed_spec_mat[(i*30) + 12] = compressed_spec_mat[(i*30) + 12] / aux; | |
419 | compressed_spec_mat[(i*30) + 13] = compressed_spec_mat[(i*30) + 13] / aux; |
|
435 | compressed_spec_mat[(i*30) + 13] = compressed_spec_mat[(i*30) + 13] / aux; | |
420 | // S45 |
|
436 | // S45 | |
421 | aux = sqrt(compressed_spec_mat[i*30+24]*compressed_spec_mat[(i*30) + 28]); |
|
437 | aux = sqrt(compressed_spec_mat[i*30+24]*compressed_spec_mat[(i*30) + 28]); | |
422 | compressed_spec_mat[(i*30) + 26] = compressed_spec_mat[(i*30) + 26] / aux; |
|
438 | compressed_spec_mat[(i*30) + 26] = compressed_spec_mat[(i*30) + 26] / aux; | |
423 | compressed_spec_mat[(i*30) + 27] = compressed_spec_mat[(i*30) + 27] / aux; |
|
439 | compressed_spec_mat[(i*30) + 27] = compressed_spec_mat[(i*30) + 27] / aux; | |
424 | // S14 |
|
440 | // S14 | |
425 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) +24]); |
|
441 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) +24]); | |
426 | compressed_spec_mat[(i*30) + 6] = compressed_spec_mat[(i*30) + 6] / aux; |
|
442 | compressed_spec_mat[(i*30) + 6] = compressed_spec_mat[(i*30) + 6] / aux; | |
427 | compressed_spec_mat[(i*30) + 7] = compressed_spec_mat[(i*30) + 7] / aux; |
|
443 | compressed_spec_mat[(i*30) + 7] = compressed_spec_mat[(i*30) + 7] / aux; | |
428 | // S15 |
|
444 | // S15 | |
429 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 28]); |
|
445 | aux = sqrt(compressed_spec_mat[i*30]*compressed_spec_mat[(i*30) + 28]); | |
430 | compressed_spec_mat[(i*30) + 8] = compressed_spec_mat[(i*30) + 8] / aux; |
|
446 | compressed_spec_mat[(i*30) + 8] = compressed_spec_mat[(i*30) + 8] / aux; | |
431 | compressed_spec_mat[(i*30) + 9] = compressed_spec_mat[(i*30) + 9] / aux; |
|
447 | compressed_spec_mat[(i*30) + 9] = compressed_spec_mat[(i*30) + 9] / aux; | |
432 | // S24 |
|
448 | // S24 | |
433 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 24]); |
|
449 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 24]); | |
434 | compressed_spec_mat[(i*30) + 14] = compressed_spec_mat[(i*30) + 14] / aux; |
|
450 | compressed_spec_mat[(i*30) + 14] = compressed_spec_mat[(i*30) + 14] / aux; | |
435 | compressed_spec_mat[(i*30) + 15] = compressed_spec_mat[(i*30) + 15] / aux; |
|
451 | compressed_spec_mat[(i*30) + 15] = compressed_spec_mat[(i*30) + 15] / aux; | |
436 | // S25 |
|
452 | // S25 | |
437 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 28]); |
|
453 | aux = sqrt(compressed_spec_mat[i*10]*compressed_spec_mat[(i*30) + 28]); | |
438 | compressed_spec_mat[(i*30) + 16] = compressed_spec_mat[(i*30) + 16] / aux; |
|
454 | compressed_spec_mat[(i*30) + 16] = compressed_spec_mat[(i*30) + 16] / aux; | |
439 | compressed_spec_mat[(i*30) + 17] = compressed_spec_mat[(i*30) + 17] / aux; |
|
455 | compressed_spec_mat[(i*30) + 17] = compressed_spec_mat[(i*30) + 17] / aux; | |
440 | // S34 |
|
456 | // S34 | |
441 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 24]); |
|
457 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 24]); | |
442 | compressed_spec_mat[(i*30) + 20] = compressed_spec_mat[(i*30) + 20] / aux; |
|
458 | compressed_spec_mat[(i*30) + 20] = compressed_spec_mat[(i*30) + 20] / aux; | |
443 | compressed_spec_mat[(i*30) + 21] = compressed_spec_mat[(i*30) + 21] / aux; |
|
459 | compressed_spec_mat[(i*30) + 21] = compressed_spec_mat[(i*30) + 21] / aux; | |
444 | // S35 |
|
460 | // S35 | |
445 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 28]); |
|
461 | aux = sqrt(compressed_spec_mat[i*18]*compressed_spec_mat[(i*30) + 28]); | |
446 | compressed_spec_mat[(i*30) + 22] = compressed_spec_mat[(i*30) + 22] / aux; |
|
462 | compressed_spec_mat[(i*30) + 22] = compressed_spec_mat[(i*30) + 22] / aux; | |
447 | compressed_spec_mat[(i*30) + 23] = compressed_spec_mat[(i*30) + 23] / aux; |
|
463 | compressed_spec_mat[(i*30) + 23] = compressed_spec_mat[(i*30) + 23] / aux; | |
448 | } |
|
464 | } | |
449 | } |
|
465 | } | |
450 |
|
466 | |||
451 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header) |
|
467 | void init_header_asm( Header_TM_LFR_SCIENCE_ASM_t *header) | |
452 | { |
|
468 | { | |
453 | header->targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
469 | header->targetLogicalAddress = CCSDS_DESTINATION_ID; | |
454 | header->protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
470 | header->protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
455 | header->reserved = 0x00; |
|
471 | header->reserved = 0x00; | |
456 | header->userApplication = CCSDS_USER_APP; |
|
472 | header->userApplication = CCSDS_USER_APP; | |
457 | header->packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
473 | header->packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); | |
458 | header->packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); |
|
474 | header->packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
459 | header->packetSequenceControl[0] = 0xc0; |
|
475 | header->packetSequenceControl[0] = 0xc0; | |
460 | header->packetSequenceControl[1] = 0x00; |
|
476 | header->packetSequenceControl[1] = 0x00; | |
461 | header->packetLength[0] = 0x00; |
|
477 | header->packetLength[0] = 0x00; | |
462 | header->packetLength[1] = 0x00; |
|
478 | header->packetLength[1] = 0x00; | |
463 | // DATA FIELD HEADER |
|
479 | // DATA FIELD HEADER | |
464 | header->spare1_pusVersion_spare2 = 0x10; |
|
480 | header->spare1_pusVersion_spare2 = 0x10; | |
465 | header->serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
481 | header->serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
466 | header->serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
482 | header->serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
467 | header->destinationID = TM_DESTINATION_ID_GROUND; |
|
483 | header->destinationID = TM_DESTINATION_ID_GROUND; | |
468 | // AUXILIARY DATA HEADER |
|
484 | // AUXILIARY DATA HEADER | |
469 | header->sid = 0x00; |
|
485 | header->sid = 0x00; | |
470 | header->biaStatusInfo = 0x00; |
|
486 | header->biaStatusInfo = 0x00; | |
471 |
header-> |
|
487 | header->pa_lfr_pkt_cnt_asm = 0x00; | |
472 |
header-> |
|
488 | header->pa_lfr_pkt_nr_asm = 0x00; | |
473 | header->time[0] = 0x00; |
|
489 | header->time[0] = 0x00; | |
474 | header->time[0] = 0x00; |
|
490 | header->time[0] = 0x00; | |
475 | header->time[0] = 0x00; |
|
491 | header->time[0] = 0x00; | |
476 | header->time[0] = 0x00; |
|
492 | header->time[0] = 0x00; | |
477 | header->time[0] = 0x00; |
|
493 | header->time[0] = 0x00; | |
478 | header->time[0] = 0x00; |
|
494 | header->time[0] = 0x00; | |
479 |
header-> |
|
495 | header->pa_lfr_asm_blk_nr[0] = 0x00; // BLK_NR MSB | |
480 |
header-> |
|
496 | header->pa_lfr_asm_blk_nr[1] = 0x00; // BLK_NR LSB | |
481 | } |
|
497 | } | |
482 |
|
498 | |||
483 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, |
|
499 | void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, | |
484 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id) |
|
500 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id) | |
485 | { |
|
501 | { | |
486 | unsigned int i; |
|
502 | unsigned int i; | |
487 | unsigned int length = 0; |
|
503 | unsigned int length = 0; | |
488 | rtems_status_code status; |
|
504 | rtems_status_code status; | |
489 |
|
505 | |||
490 | header->sid = (unsigned char) sid; |
|
|||
491 |
|
||||
492 | for (i=0; i<2; i++) |
|
506 | for (i=0; i<2; i++) | |
493 | { |
|
507 | { | |
494 | // BUILD THE DATA |
|
508 | // (1) BUILD THE DATA | |
495 | spw_ioctl_send->dlen = TOTAL_SIZE_SM; |
|
509 | switch(sid) | |
496 | spw_ioctl_send->data = &spectral_matrix[ i * TOTAL_SIZE_SM]; |
|
510 | { | |
|
511 | case SID_NORM_ASM_F0: | |||
|
512 | spw_ioctl_send->dlen = TOTAL_SIZE_ASM_F0 / 2; | |||
|
513 | spw_ioctl_send->data = &spectral_matrix[ ASM_F0_INDICE_START + i * (TOTAL_SIZE_ASM_F0/2)]; | |||
|
514 | length = PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0; | |||
|
515 | header->pa_lfr_asm_blk_nr[0] = (unsigned char) ( (NB_BINS_PER_ASM_F0/2) >> 8 ); // BLK_NR MSB | |||
|
516 | header->pa_lfr_asm_blk_nr[1] = (unsigned char) (NB_BINS_PER_ASM_F0/2); // BLK_NR LSB | |||
|
517 | break; | |||
|
518 | case SID_NORM_ASM_F1: | |||
|
519 | break; | |||
|
520 | case SID_NORM_ASM_F2: | |||
|
521 | break; | |||
|
522 | default: | |||
|
523 | PRINTF1("ERR *** in send_spectral_matrix *** unexpected sid %d\n", sid) | |||
|
524 | break; | |||
|
525 | } | |||
497 | spw_ioctl_send->hlen = HEADER_LENGTH_TM_LFR_SCIENCE_ASM + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
526 | spw_ioctl_send->hlen = HEADER_LENGTH_TM_LFR_SCIENCE_ASM + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
498 | spw_ioctl_send->hdr = (char *) header; |
|
527 | spw_ioctl_send->hdr = (char *) header; | |
499 | spw_ioctl_send->options = 0; |
|
528 | spw_ioctl_send->options = 0; | |
500 |
|
529 | |||
501 | // BUILD THE HEADER |
|
530 | // (2) BUILD THE HEADER | |
502 | length = PACKET_LENGTH_TM_LFR_SCIENCE_ASM; |
|
|||
503 | header->packetLength[0] = (unsigned char) (length>>8); |
|
531 | header->packetLength[0] = (unsigned char) (length>>8); | |
504 | header->packetLength[1] = (unsigned char) (length); |
|
532 | header->packetLength[1] = (unsigned char) (length); | |
505 | header->sid = (unsigned char) sid; // SID |
|
533 | header->sid = (unsigned char) sid; // SID | |
506 |
header-> |
|
534 | header->pa_lfr_pkt_cnt_asm = 2; | |
507 |
header-> |
|
535 | header->pa_lfr_pkt_nr_asm = (unsigned char) (i+1); | |
508 | header->blkNr[0] =(unsigned char) ( (NB_BINS_PER_SM/2) >> 8 ); // BLK_NR MSB |
|
536 | ||
509 | header->blkNr[1] = (unsigned char) (NB_BINS_PER_SM/2); // BLK_NR LSB |
|
537 | // (3) SET PACKET TIME | |
510 | // SET PACKET TIME |
|
|||
511 | header->time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
538 | header->time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
512 | header->time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
539 | header->time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
513 | header->time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
540 | header->time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
514 | header->time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
541 | header->time[3] = (unsigned char) (time_management_regs->coarse_time); | |
515 | header->time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
542 | header->time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
516 | header->time[5] = (unsigned char) (time_management_regs->fine_time); |
|
543 | header->time[5] = (unsigned char) (time_management_regs->fine_time); | |
|
544 | // | |||
517 | header->acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
545 | header->acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
518 | header->acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
546 | header->acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
519 | header->acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
547 | header->acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
520 | header->acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); |
|
548 | header->acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); | |
521 | header->acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
549 | header->acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
522 | header->acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); |
|
550 | header->acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); | |
523 | // SEND PACKET |
|
551 | ||
|
552 | // (4) SEND PACKET | |||
524 | status = rtems_message_queue_send( queue_id, spw_ioctl_send, ACTION_MSG_SPW_IOCTL_SEND_SIZE); |
|
553 | status = rtems_message_queue_send( queue_id, spw_ioctl_send, ACTION_MSG_SPW_IOCTL_SEND_SIZE); | |
525 | if (status != RTEMS_SUCCESSFUL) { |
|
554 | if (status != RTEMS_SUCCESSFUL) { | |
526 | printf("in send_spectral_matrix *** ERR %d\n", (int) status); |
|
555 | printf("in send_spectral_matrix *** ERR %d\n", (int) status); | |
527 | } |
|
556 | } | |
528 | } |
|
557 | } | |
529 | } |
|
558 | } | |
530 |
|
559 | |||
531 | void convert_averaged_spectral_matrix( volatile float *input_matrix, char *output_matrix) |
|
560 | void convert_averaged_spectral_matrix( volatile float *input_matrix, char *output_matrix) | |
532 | { |
|
561 | { | |
533 | unsigned int i; |
|
562 | unsigned int i; | |
534 | unsigned int j; |
|
563 | unsigned int j; | |
535 | char * pt_char_input; |
|
564 | char * pt_char_input; | |
536 | char * pt_char_output; |
|
565 | char * pt_char_output; | |
537 |
|
566 | |||
538 | pt_char_input = NULL; |
|
567 | pt_char_input = NULL; | |
539 | pt_char_output = NULL; |
|
568 | pt_char_output = NULL; | |
540 |
|
569 | |||
541 | for( i=0; i<NB_BINS_PER_SM; i++) |
|
570 | for( i=0; i<NB_BINS_PER_SM; i++) | |
542 | { |
|
571 | { | |
543 | for ( j=0; j<NB_VALUES_PER_SM; j++) |
|
572 | for ( j=0; j<NB_VALUES_PER_SM; j++) | |
544 | { |
|
573 | { | |
545 | pt_char_input = (char*) &input_matrix [ (i*NB_VALUES_PER_SM) + j ]; |
|
574 | pt_char_input = (char*) &input_matrix [ (i*NB_VALUES_PER_SM) + j ]; | |
546 | pt_char_output = (char*) &output_matrix[ 2 * ( (i*NB_VALUES_PER_SM) + j ) ]; |
|
575 | pt_char_output = (char*) &output_matrix[ 2 * ( (i*NB_VALUES_PER_SM) + j ) ]; | |
547 | pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float |
|
576 | pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float | |
548 | pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float |
|
577 | pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float | |
549 | } |
|
578 | } | |
550 | } |
|
579 | } | |
551 | } |
|
580 | } | |
552 |
|
581 | |||
553 | void fill_averaged_spectral_matrix(void) |
|
582 | void fill_averaged_spectral_matrix(void) | |
554 | { |
|
583 | { | |
555 | /** This function fills spectral matrices related buffers with arbitrary data. |
|
584 | /** This function fills spectral matrices related buffers with arbitrary data. | |
556 | * |
|
585 | * | |
557 | * This function is for testing purpose only. |
|
586 | * This function is for testing purpose only. | |
558 | * |
|
587 | * | |
559 | */ |
|
588 | */ | |
560 |
|
589 | |||
561 | float offset; |
|
590 | float offset; | |
562 | float coeff; |
|
591 | float coeff; | |
563 |
|
592 | |||
564 | offset = 10.; |
|
593 | offset = 10.; | |
565 | coeff = 100000.; |
|
594 | coeff = 100000.; | |
566 | averaged_sm_f0[ 0 + 25 * 0 ] = 0. + offset; |
|
595 | averaged_sm_f0[ 0 + 25 * 0 ] = 0. + offset; | |
567 | averaged_sm_f0[ 0 + 25 * 1 ] = 1. + offset; |
|
596 | averaged_sm_f0[ 0 + 25 * 1 ] = 1. + offset; | |
568 | averaged_sm_f0[ 0 + 25 * 2 ] = 2. + offset; |
|
597 | averaged_sm_f0[ 0 + 25 * 2 ] = 2. + offset; | |
569 | averaged_sm_f0[ 0 + 25 * 3 ] = 3. + offset; |
|
598 | averaged_sm_f0[ 0 + 25 * 3 ] = 3. + offset; | |
570 | averaged_sm_f0[ 0 + 25 * 4 ] = 4. + offset; |
|
599 | averaged_sm_f0[ 0 + 25 * 4 ] = 4. + offset; | |
571 | averaged_sm_f0[ 0 + 25 * 5 ] = 5. + offset; |
|
600 | averaged_sm_f0[ 0 + 25 * 5 ] = 5. + offset; | |
572 | averaged_sm_f0[ 0 + 25 * 6 ] = 6. + offset; |
|
601 | averaged_sm_f0[ 0 + 25 * 6 ] = 6. + offset; | |
573 | averaged_sm_f0[ 0 + 25 * 7 ] = 7. + offset; |
|
602 | averaged_sm_f0[ 0 + 25 * 7 ] = 7. + offset; | |
574 | averaged_sm_f0[ 0 + 25 * 8 ] = 8. + offset; |
|
603 | averaged_sm_f0[ 0 + 25 * 8 ] = 8. + offset; | |
575 | averaged_sm_f0[ 0 + 25 * 9 ] = 9. + offset; |
|
604 | averaged_sm_f0[ 0 + 25 * 9 ] = 9. + offset; | |
576 | averaged_sm_f0[ 0 + 25 * 10 ] = 10. + offset; |
|
605 | averaged_sm_f0[ 0 + 25 * 10 ] = 10. + offset; | |
577 | averaged_sm_f0[ 0 + 25 * 11 ] = 11. + offset; |
|
606 | averaged_sm_f0[ 0 + 25 * 11 ] = 11. + offset; | |
578 | averaged_sm_f0[ 0 + 25 * 12 ] = 12. + offset; |
|
607 | averaged_sm_f0[ 0 + 25 * 12 ] = 12. + offset; | |
579 | averaged_sm_f0[ 0 + 25 * 13 ] = 13. + offset; |
|
608 | averaged_sm_f0[ 0 + 25 * 13 ] = 13. + offset; | |
580 | averaged_sm_f0[ 0 + 25 * 14 ] = 14. + offset; |
|
609 | averaged_sm_f0[ 0 + 25 * 14 ] = 14. + offset; | |
581 | averaged_sm_f0[ 9 + 25 * 0 ] = -(0. + offset)* coeff; |
|
610 | averaged_sm_f0[ 9 + 25 * 0 ] = -(0. + offset)* coeff; | |
582 | averaged_sm_f0[ 9 + 25 * 1 ] = -(1. + offset)* coeff; |
|
611 | averaged_sm_f0[ 9 + 25 * 1 ] = -(1. + offset)* coeff; | |
583 | averaged_sm_f0[ 9 + 25 * 2 ] = -(2. + offset)* coeff; |
|
612 | averaged_sm_f0[ 9 + 25 * 2 ] = -(2. + offset)* coeff; | |
584 | averaged_sm_f0[ 9 + 25 * 3 ] = -(3. + offset)* coeff; |
|
613 | averaged_sm_f0[ 9 + 25 * 3 ] = -(3. + offset)* coeff; | |
585 | averaged_sm_f0[ 9 + 25 * 4 ] = -(4. + offset)* coeff; |
|
614 | averaged_sm_f0[ 9 + 25 * 4 ] = -(4. + offset)* coeff; | |
586 | averaged_sm_f0[ 9 + 25 * 5 ] = -(5. + offset)* coeff; |
|
615 | averaged_sm_f0[ 9 + 25 * 5 ] = -(5. + offset)* coeff; | |
587 | averaged_sm_f0[ 9 + 25 * 6 ] = -(6. + offset)* coeff; |
|
616 | averaged_sm_f0[ 9 + 25 * 6 ] = -(6. + offset)* coeff; | |
588 | averaged_sm_f0[ 9 + 25 * 7 ] = -(7. + offset)* coeff; |
|
617 | averaged_sm_f0[ 9 + 25 * 7 ] = -(7. + offset)* coeff; | |
589 | averaged_sm_f0[ 9 + 25 * 8 ] = -(8. + offset)* coeff; |
|
618 | averaged_sm_f0[ 9 + 25 * 8 ] = -(8. + offset)* coeff; | |
590 | averaged_sm_f0[ 9 + 25 * 9 ] = -(9. + offset)* coeff; |
|
619 | averaged_sm_f0[ 9 + 25 * 9 ] = -(9. + offset)* coeff; | |
591 | averaged_sm_f0[ 9 + 25 * 10 ] = -(10. + offset)* coeff; |
|
620 | averaged_sm_f0[ 9 + 25 * 10 ] = -(10. + offset)* coeff; | |
592 | averaged_sm_f0[ 9 + 25 * 11 ] = -(11. + offset)* coeff; |
|
621 | averaged_sm_f0[ 9 + 25 * 11 ] = -(11. + offset)* coeff; | |
593 | averaged_sm_f0[ 9 + 25 * 12 ] = -(12. + offset)* coeff; |
|
622 | averaged_sm_f0[ 9 + 25 * 12 ] = -(12. + offset)* coeff; | |
594 | averaged_sm_f0[ 9 + 25 * 13 ] = -(13. + offset)* coeff; |
|
623 | averaged_sm_f0[ 9 + 25 * 13 ] = -(13. + offset)* coeff; | |
595 | averaged_sm_f0[ 9 + 25 * 14 ] = -(14. + offset)* coeff; |
|
624 | averaged_sm_f0[ 9 + 25 * 14 ] = -(14. + offset)* coeff; | |
596 |
|
625 | |||
597 | offset = 10000000; |
|
626 | offset = 10000000; | |
598 | averaged_sm_f0[ 16 + 25 * 0 ] = (0. + offset)* coeff; |
|
627 | averaged_sm_f0[ 16 + 25 * 0 ] = (0. + offset)* coeff; | |
599 | averaged_sm_f0[ 16 + 25 * 1 ] = (1. + offset)* coeff; |
|
628 | averaged_sm_f0[ 16 + 25 * 1 ] = (1. + offset)* coeff; | |
600 | averaged_sm_f0[ 16 + 25 * 2 ] = (2. + offset)* coeff; |
|
629 | averaged_sm_f0[ 16 + 25 * 2 ] = (2. + offset)* coeff; | |
601 | averaged_sm_f0[ 16 + 25 * 3 ] = (3. + offset)* coeff; |
|
630 | averaged_sm_f0[ 16 + 25 * 3 ] = (3. + offset)* coeff; | |
602 | averaged_sm_f0[ 16 + 25 * 4 ] = (4. + offset)* coeff; |
|
631 | averaged_sm_f0[ 16 + 25 * 4 ] = (4. + offset)* coeff; | |
603 | averaged_sm_f0[ 16 + 25 * 5 ] = (5. + offset)* coeff; |
|
632 | averaged_sm_f0[ 16 + 25 * 5 ] = (5. + offset)* coeff; | |
604 | averaged_sm_f0[ 16 + 25 * 6 ] = (6. + offset)* coeff; |
|
633 | averaged_sm_f0[ 16 + 25 * 6 ] = (6. + offset)* coeff; | |
605 | averaged_sm_f0[ 16 + 25 * 7 ] = (7. + offset)* coeff; |
|
634 | averaged_sm_f0[ 16 + 25 * 7 ] = (7. + offset)* coeff; | |
606 | averaged_sm_f0[ 16 + 25 * 8 ] = (8. + offset)* coeff; |
|
635 | averaged_sm_f0[ 16 + 25 * 8 ] = (8. + offset)* coeff; | |
607 | averaged_sm_f0[ 16 + 25 * 9 ] = (9. + offset)* coeff; |
|
636 | averaged_sm_f0[ 16 + 25 * 9 ] = (9. + offset)* coeff; | |
608 | averaged_sm_f0[ 16 + 25 * 10 ] = (10. + offset)* coeff; |
|
637 | averaged_sm_f0[ 16 + 25 * 10 ] = (10. + offset)* coeff; | |
609 | averaged_sm_f0[ 16 + 25 * 11 ] = (11. + offset)* coeff; |
|
638 | averaged_sm_f0[ 16 + 25 * 11 ] = (11. + offset)* coeff; | |
610 | averaged_sm_f0[ 16 + 25 * 12 ] = (12. + offset)* coeff; |
|
639 | averaged_sm_f0[ 16 + 25 * 12 ] = (12. + offset)* coeff; | |
611 | averaged_sm_f0[ 16 + 25 * 13 ] = (13. + offset)* coeff; |
|
640 | averaged_sm_f0[ 16 + 25 * 13 ] = (13. + offset)* coeff; | |
612 | averaged_sm_f0[ 16 + 25 * 14 ] = (14. + offset)* coeff; |
|
641 | averaged_sm_f0[ 16 + 25 * 14 ] = (14. + offset)* coeff; | |
613 |
|
642 | |||
614 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 0 ] = averaged_sm_f0[ 0 ]; |
|
643 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 0 ] = averaged_sm_f0[ 0 ]; | |
615 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 1 ] = averaged_sm_f0[ 1 ]; |
|
644 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 1 ] = averaged_sm_f0[ 1 ]; | |
616 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 2 ] = averaged_sm_f0[ 2 ]; |
|
645 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 2 ] = averaged_sm_f0[ 2 ]; | |
617 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 3 ] = averaged_sm_f0[ 3 ]; |
|
646 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 3 ] = averaged_sm_f0[ 3 ]; | |
618 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 4 ] = averaged_sm_f0[ 4 ]; |
|
647 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 4 ] = averaged_sm_f0[ 4 ]; | |
619 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 5 ] = averaged_sm_f0[ 5 ]; |
|
648 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 5 ] = averaged_sm_f0[ 5 ]; | |
620 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 6 ] = averaged_sm_f0[ 6 ]; |
|
649 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 6 ] = averaged_sm_f0[ 6 ]; | |
621 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 7 ] = averaged_sm_f0[ 7 ]; |
|
650 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 7 ] = averaged_sm_f0[ 7 ]; | |
622 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 8 ] = averaged_sm_f0[ 8 ]; |
|
651 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 8 ] = averaged_sm_f0[ 8 ]; | |
623 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 9 ] = averaged_sm_f0[ 9 ]; |
|
652 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 9 ] = averaged_sm_f0[ 9 ]; | |
624 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 10 ] = averaged_sm_f0[ 10 ]; |
|
653 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 10 ] = averaged_sm_f0[ 10 ]; | |
625 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 11 ] = averaged_sm_f0[ 11 ]; |
|
654 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 11 ] = averaged_sm_f0[ 11 ]; | |
626 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 12 ] = averaged_sm_f0[ 12 ]; |
|
655 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 12 ] = averaged_sm_f0[ 12 ]; | |
627 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 13 ] = averaged_sm_f0[ 13 ]; |
|
656 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 13 ] = averaged_sm_f0[ 13 ]; | |
628 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 14 ] = averaged_sm_f0[ 14 ]; |
|
657 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 14 ] = averaged_sm_f0[ 14 ]; | |
629 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 15 ] = averaged_sm_f0[ 15 ]; |
|
658 | averaged_sm_f0[ (TOTAL_SIZE_SM/2) + 15 ] = averaged_sm_f0[ 15 ]; | |
630 | } |
|
659 | } | |
631 |
|
660 | |||
632 | void reset_spectral_matrix_regs() |
|
661 | void reset_spectral_matrix_regs() | |
633 | { |
|
662 | { | |
634 | /** This function resets the spectral matrices module registers. |
|
663 | /** This function resets the spectral matrices module registers. | |
635 | * |
|
664 | * | |
636 | * The registers affected by this function are located at the following offset addresses: |
|
665 | * The registers affected by this function are located at the following offset addresses: | |
637 | * |
|
666 | * | |
638 | * - 0x00 config |
|
667 | * - 0x00 config | |
639 | * - 0x04 status |
|
668 | * - 0x04 status | |
640 | * - 0x08 matrixF0_Address0 |
|
669 | * - 0x08 matrixF0_Address0 | |
641 | * - 0x10 matrixFO_Address1 |
|
670 | * - 0x10 matrixFO_Address1 | |
642 | * - 0x14 matrixF1_Address |
|
671 | * - 0x14 matrixF1_Address | |
643 | * - 0x18 matrixF2_Address |
|
672 | * - 0x18 matrixF2_Address | |
644 | * |
|
673 | * | |
645 | */ |
|
674 | */ | |
646 |
|
675 | |||
647 | spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; |
|
676 | spectral_matrix_regs->matrixF0_Address0 = current_ring_node_sm_f0->buffer_address; | |
648 | spectral_matrix_regs->matrixFO_Address1 = current_ring_node_sm_f0->buffer_address; |
|
677 | spectral_matrix_regs->matrixFO_Address1 = current_ring_node_sm_f0->buffer_address; | |
649 | spectral_matrix_regs->matrixF1_Address = current_ring_node_sm_f1->buffer_address; |
|
678 | spectral_matrix_regs->matrixF1_Address = current_ring_node_sm_f1->buffer_address; | |
650 | spectral_matrix_regs->matrixF2_Address = current_ring_node_sm_f2->buffer_address; |
|
679 | spectral_matrix_regs->matrixF2_Address = current_ring_node_sm_f2->buffer_address; | |
651 | } |
|
680 | } | |
652 |
|
681 | |||
653 | //****************** |
|
682 | //****************** | |
654 | // general functions |
|
683 | // general functions | |
655 |
|
684 | |||
656 |
|
685 | |||
657 |
|
686 | |||
658 |
|
687 |
@@ -1,748 +1,748 | |||||
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 | //*********** |
|
15 | //*********** | |
16 | // RTEMS TASK |
|
16 | // RTEMS TASK | |
17 |
|
17 | |||
18 | rtems_task actn_task( rtems_task_argument unused ) |
|
18 | rtems_task actn_task( rtems_task_argument unused ) | |
19 | { |
|
19 | { | |
20 | /** 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. | |
21 | * |
|
21 | * | |
22 | * @param unused is the starting argument of the RTEMS task |
|
22 | * @param unused is the starting argument of the RTEMS task | |
23 | * |
|
23 | * | |
24 | * 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 | |
25 | * on the incoming TeleCommand. |
|
25 | * on the incoming TeleCommand. | |
26 | * |
|
26 | * | |
27 | */ |
|
27 | */ | |
28 |
|
28 | |||
29 | int result; |
|
29 | int result; | |
30 | rtems_status_code status; // RTEMS status code |
|
30 | rtems_status_code status; // RTEMS status code | |
31 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task |
|
31 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task | |
32 | size_t size; // size of the incoming TC packet |
|
32 | size_t size; // size of the incoming TC packet | |
33 | unsigned char subtype; // subtype of the current TC packet |
|
33 | unsigned char subtype; // subtype of the current TC packet | |
34 | unsigned char time[6]; |
|
34 | unsigned char time[6]; | |
35 | rtems_id queue_rcv_id; |
|
35 | rtems_id queue_rcv_id; | |
36 | rtems_id queue_snd_id; |
|
36 | rtems_id queue_snd_id; | |
37 |
|
37 | |||
38 | status = get_message_queue_id_recv( &queue_rcv_id ); |
|
38 | status = get_message_queue_id_recv( &queue_rcv_id ); | |
39 | if (status != RTEMS_SUCCESSFUL) |
|
39 | if (status != RTEMS_SUCCESSFUL) | |
40 | { |
|
40 | { | |
41 | PRINTF1("in ACTN *** ERR get_message_queue_id_recv %d\n", status) |
|
41 | PRINTF1("in ACTN *** ERR get_message_queue_id_recv %d\n", status) | |
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | status = get_message_queue_id_send( &queue_snd_id ); |
|
44 | status = get_message_queue_id_send( &queue_snd_id ); | |
45 | if (status != RTEMS_SUCCESSFUL) |
|
45 | if (status != RTEMS_SUCCESSFUL) | |
46 | { |
|
46 | { | |
47 | PRINTF1("in ACTN *** ERR get_message_queue_id_send %d\n", status) |
|
47 | PRINTF1("in ACTN *** ERR get_message_queue_id_send %d\n", status) | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | result = LFR_SUCCESSFUL; |
|
50 | result = LFR_SUCCESSFUL; | |
51 | subtype = 0; // subtype of the current TC packet |
|
51 | subtype = 0; // subtype of the current TC packet | |
52 |
|
52 | |||
53 | BOOT_PRINTF("in ACTN *** \n") |
|
53 | BOOT_PRINTF("in ACTN *** \n") | |
54 |
|
54 | |||
55 | while(1) |
|
55 | while(1) | |
56 | { |
|
56 | { | |
57 | status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size, |
|
57 | status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size, | |
58 | RTEMS_WAIT, RTEMS_NO_TIMEOUT); |
|
58 | RTEMS_WAIT, RTEMS_NO_TIMEOUT); | |
59 | getTime( time ); // set time to the current time |
|
59 | getTime( time ); // set time to the current time | |
60 | if (status!=RTEMS_SUCCESSFUL) |
|
60 | if (status!=RTEMS_SUCCESSFUL) | |
61 | { |
|
61 | { | |
62 | PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status) |
|
62 | PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status) | |
63 | } |
|
63 | } | |
64 | else |
|
64 | else | |
65 | { |
|
65 | { | |
66 | subtype = TC.serviceSubType; |
|
66 | subtype = TC.serviceSubType; | |
67 | switch(subtype) |
|
67 | switch(subtype) | |
68 | { |
|
68 | { | |
69 | case TC_SUBTYPE_RESET: |
|
69 | case TC_SUBTYPE_RESET: | |
70 | result = action_reset( &TC, queue_snd_id, time ); |
|
70 | result = action_reset( &TC, queue_snd_id, time ); | |
71 | close_action( &TC, result, queue_snd_id, time ); |
|
71 | close_action( &TC, result, queue_snd_id, time ); | |
72 | break; |
|
72 | break; | |
73 | // |
|
73 | // | |
74 | case TC_SUBTYPE_LOAD_COMM: |
|
74 | case TC_SUBTYPE_LOAD_COMM: | |
75 | result = action_load_common_par( &TC ); |
|
75 | result = action_load_common_par( &TC ); | |
76 | close_action( &TC, result, queue_snd_id, time ); |
|
76 | close_action( &TC, result, queue_snd_id, time ); | |
77 | break; |
|
77 | break; | |
78 | // |
|
78 | // | |
79 | case TC_SUBTYPE_LOAD_NORM: |
|
79 | case TC_SUBTYPE_LOAD_NORM: | |
80 | result = action_load_normal_par( &TC, queue_snd_id, time ); |
|
80 | result = action_load_normal_par( &TC, queue_snd_id, time ); | |
81 | close_action( &TC, result, queue_snd_id, time ); |
|
81 | close_action( &TC, result, queue_snd_id, time ); | |
82 | break; |
|
82 | break; | |
83 | // |
|
83 | // | |
84 | case TC_SUBTYPE_LOAD_BURST: |
|
84 | case TC_SUBTYPE_LOAD_BURST: | |
85 | result = action_load_burst_par( &TC, queue_snd_id, time ); |
|
85 | result = action_load_burst_par( &TC, queue_snd_id, time ); | |
86 | close_action( &TC, result, queue_snd_id, time ); |
|
86 | close_action( &TC, result, queue_snd_id, time ); | |
87 | break; |
|
87 | break; | |
88 | // |
|
88 | // | |
89 | case TC_SUBTYPE_LOAD_SBM1: |
|
89 | case TC_SUBTYPE_LOAD_SBM1: | |
90 | result = action_load_sbm1_par( &TC, queue_snd_id, time ); |
|
90 | result = action_load_sbm1_par( &TC, queue_snd_id, time ); | |
91 | close_action( &TC, result, queue_snd_id, time ); |
|
91 | close_action( &TC, result, queue_snd_id, time ); | |
92 | break; |
|
92 | break; | |
93 | // |
|
93 | // | |
94 | case TC_SUBTYPE_LOAD_SBM2: |
|
94 | case TC_SUBTYPE_LOAD_SBM2: | |
95 | result = action_load_sbm2_par( &TC, queue_snd_id, time ); |
|
95 | result = action_load_sbm2_par( &TC, queue_snd_id, time ); | |
96 | close_action( &TC, result, queue_snd_id, time ); |
|
96 | close_action( &TC, result, queue_snd_id, time ); | |
97 | break; |
|
97 | break; | |
98 | // |
|
98 | // | |
99 | case TC_SUBTYPE_DUMP: |
|
99 | case TC_SUBTYPE_DUMP: | |
100 | result = action_dump_par( queue_snd_id ); |
|
100 | result = action_dump_par( queue_snd_id ); | |
101 | close_action( &TC, result, queue_snd_id, time ); |
|
101 | close_action( &TC, result, queue_snd_id, time ); | |
102 | break; |
|
102 | break; | |
103 | // |
|
103 | // | |
104 | case TC_SUBTYPE_ENTER: |
|
104 | case TC_SUBTYPE_ENTER: | |
105 | result = action_enter_mode( &TC, queue_snd_id, time ); |
|
105 | result = action_enter_mode( &TC, queue_snd_id, time ); | |
106 | close_action( &TC, result, queue_snd_id, time ); |
|
106 | close_action( &TC, result, queue_snd_id, time ); | |
107 | break; |
|
107 | break; | |
108 | // |
|
108 | // | |
109 | case TC_SUBTYPE_UPDT_INFO: |
|
109 | case TC_SUBTYPE_UPDT_INFO: | |
110 | result = action_update_info( &TC, queue_snd_id ); |
|
110 | result = action_update_info( &TC, queue_snd_id ); | |
111 | close_action( &TC, result, queue_snd_id, time ); |
|
111 | close_action( &TC, result, queue_snd_id, time ); | |
112 | break; |
|
112 | break; | |
113 | // |
|
113 | // | |
114 | case TC_SUBTYPE_EN_CAL: |
|
114 | case TC_SUBTYPE_EN_CAL: | |
115 | result = action_enable_calibration( &TC, queue_snd_id, time ); |
|
115 | result = action_enable_calibration( &TC, queue_snd_id, time ); | |
116 | close_action( &TC, result, queue_snd_id, time ); |
|
116 | close_action( &TC, result, queue_snd_id, time ); | |
117 | break; |
|
117 | break; | |
118 | // |
|
118 | // | |
119 | case TC_SUBTYPE_DIS_CAL: |
|
119 | case TC_SUBTYPE_DIS_CAL: | |
120 | result = action_disable_calibration( &TC, queue_snd_id, time ); |
|
120 | result = action_disable_calibration( &TC, queue_snd_id, time ); | |
121 | close_action( &TC, result, queue_snd_id, time ); |
|
121 | close_action( &TC, result, queue_snd_id, time ); | |
122 | break; |
|
122 | break; | |
123 | // |
|
123 | // | |
124 | case TC_SUBTYPE_UPDT_TIME: |
|
124 | case TC_SUBTYPE_UPDT_TIME: | |
125 | result = action_update_time( &TC ); |
|
125 | result = action_update_time( &TC ); | |
126 | close_action( &TC, result, queue_snd_id, time ); |
|
126 | close_action( &TC, result, queue_snd_id, time ); | |
127 | break; |
|
127 | break; | |
128 | // |
|
128 | // | |
129 | default: |
|
129 | default: | |
130 | break; |
|
130 | break; | |
131 | } |
|
131 | } | |
132 | } |
|
132 | } | |
133 | } |
|
133 | } | |
134 | } |
|
134 | } | |
135 |
|
135 | |||
136 | //*********** |
|
136 | //*********** | |
137 | // TC ACTIONS |
|
137 | // TC ACTIONS | |
138 |
|
138 | |||
139 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
139 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
140 | { |
|
140 | { | |
141 | /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received. |
|
141 | /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received. | |
142 | * |
|
142 | * | |
143 | * @param TC points to the TeleCommand packet that is being processed |
|
143 | * @param TC points to the TeleCommand packet that is being processed | |
144 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
144 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
145 | * |
|
145 | * | |
146 | */ |
|
146 | */ | |
147 |
|
147 | |||
148 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); |
|
148 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); | |
149 | return LFR_DEFAULT; |
|
149 | return LFR_DEFAULT; | |
150 | } |
|
150 | } | |
151 |
|
151 | |||
152 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
152 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
153 | { |
|
153 | { | |
154 | /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received. |
|
154 | /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received. | |
155 | * |
|
155 | * | |
156 | * @param TC points to the TeleCommand packet that is being processed |
|
156 | * @param TC points to the TeleCommand packet that is being processed | |
157 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
157 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
158 | * |
|
158 | * | |
159 | */ |
|
159 | */ | |
160 |
|
160 | |||
161 | rtems_status_code status; |
|
161 | rtems_status_code status; | |
162 | unsigned char requestedMode; |
|
162 | unsigned char requestedMode; | |
163 |
|
163 | |||
164 | requestedMode = TC->dataAndCRC[1]; |
|
164 | requestedMode = TC->dataAndCRC[1]; | |
165 |
|
165 | |||
166 | if ( (requestedMode != LFR_MODE_STANDBY) |
|
166 | if ( (requestedMode != LFR_MODE_STANDBY) | |
167 | && (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST) |
|
167 | && (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST) | |
168 | && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) ) |
|
168 | && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) ) | |
169 | { |
|
169 | { | |
170 | status = RTEMS_UNSATISFIED; |
|
170 | status = RTEMS_UNSATISFIED; | |
171 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode, time ); |
|
171 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode, time ); | |
172 | } |
|
172 | } | |
173 | else |
|
173 | else | |
174 | { |
|
174 | { | |
175 | printf("in action_enter_mode *** enter mode %d\n", requestedMode); |
|
175 | printf("in action_enter_mode *** enter mode %d\n", requestedMode); | |
176 |
|
176 | |||
177 | #ifdef PRINT_TASK_STATISTICS |
|
|||
178 | if (requestedMode != LFR_MODE_STANDBY) |
|
|||
179 | { |
|
|||
180 | rtems_cpu_usage_reset(); |
|
|||
181 | maxCount = 0; |
|
|||
182 | } |
|
|||
183 | #endif |
|
|||
184 |
|
||||
185 | status = transition_validation(requestedMode); |
|
177 | status = transition_validation(requestedMode); | |
186 |
|
178 | |||
187 | if ( status == LFR_SUCCESSFUL ) { |
|
179 | if ( status == LFR_SUCCESSFUL ) { | |
188 | if ( lfrCurrentMode != LFR_MODE_STANDBY) |
|
180 | if ( lfrCurrentMode != LFR_MODE_STANDBY) | |
189 | { |
|
181 | { | |
190 | status = stop_current_mode(); |
|
182 | status = stop_current_mode(); | |
191 | } |
|
183 | } | |
192 | if (status != RTEMS_SUCCESSFUL) |
|
184 | if (status != RTEMS_SUCCESSFUL) | |
193 | { |
|
185 | { | |
194 | PRINTF("ERR *** in action_enter *** stop_current_mode\n") |
|
186 | PRINTF("ERR *** in action_enter *** stop_current_mode\n") | |
195 | } |
|
187 | } | |
196 | status = enter_mode( requestedMode ); |
|
188 | status = enter_mode( requestedMode ); | |
197 | } |
|
189 | } | |
198 | else |
|
190 | else | |
199 | { |
|
191 | { | |
200 | PRINTF("ERR *** in action_enter *** transition rejected\n") |
|
192 | PRINTF("ERR *** in action_enter *** transition rejected\n") | |
201 | send_tm_lfr_tc_exe_not_executable( TC, queue_id, time ); |
|
193 | send_tm_lfr_tc_exe_not_executable( TC, queue_id, time ); | |
202 | } |
|
194 | } | |
203 | } |
|
195 | } | |
204 |
|
196 | |||
205 | return status; |
|
197 | return status; | |
206 | } |
|
198 | } | |
207 |
|
199 | |||
208 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
200 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
209 | { |
|
201 | { | |
210 | /** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received. |
|
202 | /** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received. | |
211 | * |
|
203 | * | |
212 | * @param TC points to the TeleCommand packet that is being processed |
|
204 | * @param TC points to the TeleCommand packet that is being processed | |
213 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
205 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
214 | * |
|
206 | * | |
215 | * @return LFR directive status code: |
|
207 | * @return LFR directive status code: | |
216 | * - LFR_DEFAULT |
|
208 | * - LFR_DEFAULT | |
217 | * - LFR_SUCCESSFUL |
|
209 | * - LFR_SUCCESSFUL | |
218 | * |
|
210 | * | |
219 | */ |
|
211 | */ | |
220 |
|
212 | |||
221 | unsigned int val; |
|
213 | unsigned int val; | |
222 | int result; |
|
214 | int result; | |
223 |
|
215 | |||
224 | result = LFR_SUCCESSFUL; |
|
216 | result = LFR_SUCCESSFUL; | |
225 |
|
217 | |||
226 | val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256 |
|
218 | val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256 | |
227 | + housekeeping_packet.hk_lfr_update_info_tc_cnt[1]; |
|
219 | + housekeeping_packet.hk_lfr_update_info_tc_cnt[1]; | |
228 | val++; |
|
220 | val++; | |
229 | housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8); |
|
221 | housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8); | |
230 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); |
|
222 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); | |
231 |
|
223 | |||
232 | return result; |
|
224 | return result; | |
233 | } |
|
225 | } | |
234 |
|
226 | |||
235 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
227 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
236 | { |
|
228 | { | |
237 | /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received. |
|
229 | /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received. | |
238 | * |
|
230 | * | |
239 | * @param TC points to the TeleCommand packet that is being processed |
|
231 | * @param TC points to the TeleCommand packet that is being processed | |
240 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
232 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
241 | * |
|
233 | * | |
242 | */ |
|
234 | */ | |
243 |
|
235 | |||
244 | int result; |
|
236 | int result; | |
245 | unsigned char lfrMode; |
|
237 | unsigned char lfrMode; | |
246 |
|
238 | |||
247 | result = LFR_DEFAULT; |
|
239 | result = LFR_DEFAULT; | |
248 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
240 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
249 |
|
241 | |||
250 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { |
|
242 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { | |
251 | send_tm_lfr_tc_exe_not_executable( TC, queue_id, time ); |
|
243 | send_tm_lfr_tc_exe_not_executable( TC, queue_id, time ); | |
252 | result = LFR_DEFAULT; |
|
244 | result = LFR_DEFAULT; | |
253 | } |
|
245 | } | |
254 | else { |
|
246 | else { | |
255 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); |
|
247 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); | |
256 | result = LFR_DEFAULT; |
|
248 | result = LFR_DEFAULT; | |
257 | } |
|
249 | } | |
258 | return result; |
|
250 | return result; | |
259 | } |
|
251 | } | |
260 |
|
252 | |||
261 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
253 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
262 | { |
|
254 | { | |
263 | /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received. |
|
255 | /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received. | |
264 | * |
|
256 | * | |
265 | * @param TC points to the TeleCommand packet that is being processed |
|
257 | * @param TC points to the TeleCommand packet that is being processed | |
266 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
258 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
267 | * |
|
259 | * | |
268 | */ |
|
260 | */ | |
269 |
|
261 | |||
270 | int result; |
|
262 | int result; | |
271 | unsigned char lfrMode; |
|
263 | unsigned char lfrMode; | |
272 |
|
264 | |||
273 | result = LFR_DEFAULT; |
|
265 | result = LFR_DEFAULT; | |
274 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
266 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
275 |
|
267 | |||
276 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { |
|
268 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { | |
277 | send_tm_lfr_tc_exe_not_executable( TC, queue_id, time ); |
|
269 | send_tm_lfr_tc_exe_not_executable( TC, queue_id, time ); | |
278 | result = LFR_DEFAULT; |
|
270 | result = LFR_DEFAULT; | |
279 | } |
|
271 | } | |
280 | else { |
|
272 | else { | |
281 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); |
|
273 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); | |
282 | result = LFR_DEFAULT; |
|
274 | result = LFR_DEFAULT; | |
283 | } |
|
275 | } | |
284 | return result; |
|
276 | return result; | |
285 | } |
|
277 | } | |
286 |
|
278 | |||
287 | int action_update_time(ccsdsTelecommandPacket_t *TC) |
|
279 | int action_update_time(ccsdsTelecommandPacket_t *TC) | |
288 | { |
|
280 | { | |
289 | /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received. |
|
281 | /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received. | |
290 | * |
|
282 | * | |
291 | * @param TC points to the TeleCommand packet that is being processed |
|
283 | * @param TC points to the TeleCommand packet that is being processed | |
292 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
284 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
293 | * |
|
285 | * | |
294 | * @return LFR_SUCCESSFUL |
|
286 | * @return LFR_SUCCESSFUL | |
295 | * |
|
287 | * | |
296 | */ |
|
288 | */ | |
297 |
|
289 | |||
298 | unsigned int val; |
|
290 | unsigned int val; | |
299 |
|
291 | |||
300 | time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24) |
|
292 | time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24) | |
301 | + (TC->dataAndCRC[1] << 16) |
|
293 | + (TC->dataAndCRC[1] << 16) | |
302 | + (TC->dataAndCRC[2] << 8) |
|
294 | + (TC->dataAndCRC[2] << 8) | |
303 | + TC->dataAndCRC[3]; |
|
295 | + TC->dataAndCRC[3]; | |
304 | val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256 |
|
296 | val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256 | |
305 | + housekeeping_packet.hk_lfr_update_time_tc_cnt[1]; |
|
297 | + housekeeping_packet.hk_lfr_update_time_tc_cnt[1]; | |
306 | val++; |
|
298 | val++; | |
307 | housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8); |
|
299 | housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8); | |
308 | housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val); |
|
300 | housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val); | |
309 | time_management_regs->ctrl = time_management_regs->ctrl | 1; |
|
301 | time_management_regs->ctrl = time_management_regs->ctrl | 1; | |
310 |
|
302 | |||
311 | return LFR_SUCCESSFUL; |
|
303 | return LFR_SUCCESSFUL; | |
312 | } |
|
304 | } | |
313 |
|
305 | |||
314 | //******************* |
|
306 | //******************* | |
315 | // ENTERING THE MODES |
|
307 | // ENTERING THE MODES | |
316 |
|
308 | |||
317 | int transition_validation(unsigned char requestedMode) |
|
309 | int transition_validation(unsigned char requestedMode) | |
318 | { |
|
310 | { | |
319 | /** This function checks the validity of the transition requested by the TC_LFR_ENTER_MODE. |
|
311 | /** This function checks the validity of the transition requested by the TC_LFR_ENTER_MODE. | |
320 | * |
|
312 | * | |
321 | * @param requestedMode is the mode requested by the TC_LFR_ENTER_MODE |
|
313 | * @param requestedMode is the mode requested by the TC_LFR_ENTER_MODE | |
322 | * |
|
314 | * | |
323 | * @return LFR directive status codes: |
|
315 | * @return LFR directive status codes: | |
324 | * - LFR_SUCCESSFUL - the transition is authorized |
|
316 | * - LFR_SUCCESSFUL - the transition is authorized | |
325 | * - LFR_DEFAULT - the transition is not authorized |
|
317 | * - LFR_DEFAULT - the transition is not authorized | |
326 | * |
|
318 | * | |
327 | */ |
|
319 | */ | |
328 |
|
320 | |||
329 | int status; |
|
321 | int status; | |
330 |
|
322 | |||
331 | switch (requestedMode) |
|
323 | switch (requestedMode) | |
332 | { |
|
324 | { | |
333 | case LFR_MODE_STANDBY: |
|
325 | case LFR_MODE_STANDBY: | |
334 | if ( lfrCurrentMode == LFR_MODE_STANDBY ) { |
|
326 | if ( lfrCurrentMode == LFR_MODE_STANDBY ) { | |
335 | status = LFR_DEFAULT; |
|
327 | status = LFR_DEFAULT; | |
336 | } |
|
328 | } | |
337 | else |
|
329 | else | |
338 | { |
|
330 | { | |
339 | status = LFR_SUCCESSFUL; |
|
331 | status = LFR_SUCCESSFUL; | |
340 | } |
|
332 | } | |
341 | break; |
|
333 | break; | |
342 | case LFR_MODE_NORMAL: |
|
334 | case LFR_MODE_NORMAL: | |
343 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { |
|
335 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { | |
344 | status = LFR_DEFAULT; |
|
336 | status = LFR_DEFAULT; | |
345 | } |
|
337 | } | |
346 | else { |
|
338 | else { | |
347 | status = LFR_SUCCESSFUL; |
|
339 | status = LFR_SUCCESSFUL; | |
348 | } |
|
340 | } | |
349 | break; |
|
341 | break; | |
350 | case LFR_MODE_BURST: |
|
342 | case LFR_MODE_BURST: | |
351 | if ( lfrCurrentMode == LFR_MODE_BURST ) { |
|
343 | if ( lfrCurrentMode == LFR_MODE_BURST ) { | |
352 | status = LFR_DEFAULT; |
|
344 | status = LFR_DEFAULT; | |
353 | } |
|
345 | } | |
354 | else { |
|
346 | else { | |
355 | status = LFR_SUCCESSFUL; |
|
347 | status = LFR_SUCCESSFUL; | |
356 | } |
|
348 | } | |
357 | break; |
|
349 | break; | |
358 | case LFR_MODE_SBM1: |
|
350 | case LFR_MODE_SBM1: | |
359 | if ( lfrCurrentMode == LFR_MODE_SBM1 ) { |
|
351 | if ( lfrCurrentMode == LFR_MODE_SBM1 ) { | |
360 | status = LFR_DEFAULT; |
|
352 | status = LFR_DEFAULT; | |
361 | } |
|
353 | } | |
362 | else { |
|
354 | else { | |
363 | status = LFR_SUCCESSFUL; |
|
355 | status = LFR_SUCCESSFUL; | |
364 | } |
|
356 | } | |
365 | break; |
|
357 | break; | |
366 | case LFR_MODE_SBM2: |
|
358 | case LFR_MODE_SBM2: | |
367 | if ( lfrCurrentMode == LFR_MODE_SBM2 ) { |
|
359 | if ( lfrCurrentMode == LFR_MODE_SBM2 ) { | |
368 | status = LFR_DEFAULT; |
|
360 | status = LFR_DEFAULT; | |
369 | } |
|
361 | } | |
370 | else { |
|
362 | else { | |
371 | status = LFR_SUCCESSFUL; |
|
363 | status = LFR_SUCCESSFUL; | |
372 | } |
|
364 | } | |
373 | break; |
|
365 | break; | |
374 | default: |
|
366 | default: | |
375 | status = LFR_DEFAULT; |
|
367 | status = LFR_DEFAULT; | |
376 | break; |
|
368 | break; | |
377 | } |
|
369 | } | |
378 |
|
370 | |||
379 | return status; |
|
371 | return status; | |
380 | } |
|
372 | } | |
381 |
|
373 | |||
382 | int stop_current_mode(void) |
|
374 | int stop_current_mode(void) | |
383 | { |
|
375 | { | |
384 | /** This function stops the current mode by masking interrupt lines and suspending science tasks. |
|
376 | /** This function stops the current mode by masking interrupt lines and suspending science tasks. | |
385 | * |
|
377 | * | |
386 | * @return RTEMS directive status codes: |
|
378 | * @return RTEMS directive status codes: | |
387 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
379 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
388 | * - RTEMS_INVALID_ID - task id invalid |
|
380 | * - RTEMS_INVALID_ID - task id invalid | |
389 | * - RTEMS_ALREADY_SUSPENDED - task already suspended |
|
381 | * - RTEMS_ALREADY_SUSPENDED - task already suspended | |
390 | * |
|
382 | * | |
391 | */ |
|
383 | */ | |
392 |
|
384 | |||
393 | rtems_status_code status; |
|
385 | rtems_status_code status; | |
394 |
|
386 | |||
395 | status = RTEMS_SUCCESSFUL; |
|
387 | status = RTEMS_SUCCESSFUL; | |
396 |
|
388 | |||
397 | // mask interruptions |
|
389 | // (1) mask interruptions | |
398 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt |
|
390 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt | |
399 | //LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt |
|
391 | //LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt | |
400 | LEON_Mask_interrupt( IRQ_SM ); // mask spectral matrix interrupt simulator |
|
392 | ||
401 | // reset registers |
|
393 | // (2) clear interruptions | |
|
394 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt | |||
|
395 | //LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt | |||
|
396 | ||||
|
397 | // (3) reset registers | |||
402 | reset_wfp_burst_enable(); // reset burst and enable bits |
|
398 | reset_wfp_burst_enable(); // reset burst and enable bits | |
403 | reset_wfp_status(); // reset all the status bits |
|
399 | reset_wfp_status(); // reset all the status bits | |
404 | // clear interruptions |
|
400 | ||
405 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt |
|
401 | // <Spectral Matrices simulator> | |
406 |
|
|
402 | LEON_Mask_interrupt( IRQ_SM_SIMULATOR ); // mask spectral matrix interrupt simulator | |
407 | LEON_Clear_interrupt( IRQ_SM ); // clear spectral matrix interrupt simulator |
|
403 | timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
408 | //********************** |
|
404 | LEON_Clear_interrupt( IRQ_SM_SIMULATOR ); // clear spectral matrix interrupt simulator | |
|
405 | // </Spectral Matrices simulator> | |||
|
406 | ||||
409 | // suspend several tasks |
|
407 | // suspend several tasks | |
410 | if (lfrCurrentMode != LFR_MODE_STANDBY) { |
|
408 | if (lfrCurrentMode != LFR_MODE_STANDBY) { | |
411 | status = suspend_science_tasks(); |
|
409 | status = suspend_science_tasks(); | |
412 | } |
|
410 | } | |
413 |
|
411 | |||
414 | if (status != RTEMS_SUCCESSFUL) |
|
412 | if (status != RTEMS_SUCCESSFUL) | |
415 | { |
|
413 | { | |
416 | PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status) |
|
414 | PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status) | |
417 | } |
|
415 | } | |
418 |
|
416 | |||
419 | return status; |
|
417 | return status; | |
420 | } |
|
418 | } | |
421 |
|
419 | |||
422 | int enter_mode(unsigned char mode ) |
|
420 | int enter_mode(unsigned char mode ) | |
423 | { |
|
421 | { | |
424 | /** This function is launched after a mode transition validation. |
|
422 | /** This function is launched after a mode transition validation. | |
425 | * |
|
423 | * | |
426 | * @param mode is the mode in which LFR will be put. |
|
424 | * @param mode is the mode in which LFR will be put. | |
427 | * |
|
425 | * | |
428 | * @return RTEMS directive status codes: |
|
426 | * @return RTEMS directive status codes: | |
429 | * - RTEMS_SUCCESSFUL - the mode has been entered successfully |
|
427 | * - RTEMS_SUCCESSFUL - the mode has been entered successfully | |
430 | * - RTEMS_NOT_SATISFIED - the mode has not been entered successfully |
|
428 | * - RTEMS_NOT_SATISFIED - the mode has not been entered successfully | |
431 | * |
|
429 | * | |
432 | */ |
|
430 | */ | |
433 |
|
431 | |||
434 | rtems_status_code status; |
|
432 | rtems_status_code status; | |
435 |
|
433 | |||
436 | status = RTEMS_UNSATISFIED; |
|
434 | status = RTEMS_UNSATISFIED; | |
437 |
|
435 | |||
438 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d); |
|
436 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d); | |
439 | updateLFRCurrentMode(); |
|
437 | updateLFRCurrentMode(); | |
440 |
|
438 | |||
441 | if ( (mode == LFR_MODE_NORMAL) || (mode == LFR_MODE_BURST) |
|
439 | if ( (mode == LFR_MODE_NORMAL) || (mode == LFR_MODE_BURST) | |
442 | || (mode == LFR_MODE_SBM1) || (mode == LFR_MODE_SBM2) ) |
|
440 | || (mode == LFR_MODE_SBM1) || (mode == LFR_MODE_SBM2) ) | |
443 | { |
|
441 | { | |
|
442 | #ifdef PRINT_TASK_STATISTICS | |||
|
443 | rtems_cpu_usage_reset(); | |||
|
444 | maxCount = 0; | |||
|
445 | #endif | |||
444 | status = restart_science_tasks(); |
|
446 | status = restart_science_tasks(); | |
445 | launch_waveform_picker( mode ); |
|
447 | launch_waveform_picker( mode ); | |
446 |
|
|
448 | launch_spectral_matrix( mode ); | |
447 | } |
|
449 | } | |
448 | else if ( mode == LFR_MODE_STANDBY ) |
|
450 | else if ( mode == LFR_MODE_STANDBY ) | |
449 | { |
|
451 | { | |
450 | status = stop_current_mode(); |
|
|||
451 | } |
|
|||
452 | else |
|
|||
453 | { |
|
|||
454 | status = RTEMS_UNSATISFIED; |
|
|||
455 | } |
|
|||
456 |
|
||||
457 | if (mode == LFR_MODE_STANDBY) |
|
|||
458 | { |
|
|||
459 | PRINTF1("maxCount = %d\n", maxCount) |
|
|||
460 | #ifdef PRINT_TASK_STATISTICS |
|
452 | #ifdef PRINT_TASK_STATISTICS | |
461 | rtems_cpu_usage_report(); |
|
453 | rtems_cpu_usage_report(); | |
462 | #endif |
|
454 | #endif | |
463 |
|
455 | |||
464 | #ifdef PRINT_STACK_REPORT |
|
456 | #ifdef PRINT_STACK_REPORT | |
465 | rtems_stack_checker_report_usage(); |
|
457 | rtems_stack_checker_report_usage(); | |
466 | #endif |
|
458 | #endif | |
|
459 | status = stop_current_mode(); | |||
|
460 | PRINTF1("maxCount = %d\n", maxCount) | |||
|
461 | } | |||
|
462 | else | |||
|
463 | { | |||
|
464 | status = RTEMS_UNSATISFIED; | |||
467 | } |
|
465 | } | |
468 |
|
466 | |||
469 | if (status != RTEMS_SUCCESSFUL) |
|
467 | if (status != RTEMS_SUCCESSFUL) | |
470 | { |
|
468 | { | |
471 | PRINTF1("in enter_mode *** ERR = %d\n", status) |
|
469 | PRINTF1("in enter_mode *** ERR = %d\n", status) | |
472 | status = RTEMS_UNSATISFIED; |
|
470 | status = RTEMS_UNSATISFIED; | |
473 | } |
|
471 | } | |
474 |
|
472 | |||
475 | return status; |
|
473 | return status; | |
476 | } |
|
474 | } | |
477 |
|
475 | |||
478 | int restart_science_tasks() |
|
476 | int restart_science_tasks() | |
479 | { |
|
477 | { | |
480 | /** This function is used to restart all science tasks. |
|
478 | /** This function is used to restart all science tasks. | |
481 | * |
|
479 | * | |
482 | * @return RTEMS directive status codes: |
|
480 | * @return RTEMS directive status codes: | |
483 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
481 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
484 | * - RTEMS_INVALID_ID - task id invalid |
|
482 | * - RTEMS_INVALID_ID - task id invalid | |
485 | * - RTEMS_INCORRECT_STATE - task never started |
|
483 | * - RTEMS_INCORRECT_STATE - task never started | |
486 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task |
|
484 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task | |
487 | * |
|
485 | * | |
488 | * Science tasks are AVF0, BPF0, WFRM, CWF3, CW2, CWF1 |
|
486 | * Science tasks are AVF0, BPF0, WFRM, CWF3, CW2, CWF1 | |
489 | * |
|
487 | * | |
490 | */ |
|
488 | */ | |
491 |
|
489 | |||
492 | rtems_status_code status[6]; |
|
490 | rtems_status_code status[6]; | |
493 | rtems_status_code ret; |
|
491 | rtems_status_code ret; | |
494 |
|
492 | |||
495 | ret = RTEMS_SUCCESSFUL; |
|
493 | ret = RTEMS_SUCCESSFUL; | |
496 |
|
494 | |||
497 | status[0] = rtems_task_restart( Task_id[TASKID_AVF0], 1 ); |
|
495 | status[0] = rtems_task_restart( Task_id[TASKID_AVF0], 1 ); | |
498 | if (status[0] != RTEMS_SUCCESSFUL) |
|
496 | if (status[0] != RTEMS_SUCCESSFUL) | |
499 | { |
|
497 | { | |
500 | PRINTF1("in restart_science_task *** 0 ERR %d\n", status[0]) |
|
498 | PRINTF1("in restart_science_task *** 0 ERR %d\n", status[0]) | |
501 | } |
|
499 | } | |
502 |
|
500 | |||
503 | status[1] = rtems_task_restart( Task_id[TASKID_BPF0],1 ); |
|
501 | status[1] = rtems_task_restart( Task_id[TASKID_BPF0],1 ); | |
504 | if (status[1] != RTEMS_SUCCESSFUL) |
|
502 | if (status[1] != RTEMS_SUCCESSFUL) | |
505 | { |
|
503 | { | |
506 | PRINTF1("in restart_science_task *** 1 ERR %d\n", status[1]) |
|
504 | PRINTF1("in restart_science_task *** 1 ERR %d\n", status[1]) | |
507 | } |
|
505 | } | |
508 |
|
506 | |||
509 | status[2] = rtems_task_restart( Task_id[TASKID_WFRM],1 ); |
|
507 | status[2] = rtems_task_restart( Task_id[TASKID_WFRM],1 ); | |
510 | if (status[2] != RTEMS_SUCCESSFUL) |
|
508 | if (status[2] != RTEMS_SUCCESSFUL) | |
511 | { |
|
509 | { | |
512 | PRINTF1("in restart_science_task *** 2 ERR %d\n", status[2]) |
|
510 | PRINTF1("in restart_science_task *** 2 ERR %d\n", status[2]) | |
513 | } |
|
511 | } | |
514 |
|
512 | |||
515 | status[3] = rtems_task_restart( Task_id[TASKID_CWF3],1 ); |
|
513 | status[3] = rtems_task_restart( Task_id[TASKID_CWF3],1 ); | |
516 | if (status[3] != RTEMS_SUCCESSFUL) |
|
514 | if (status[3] != RTEMS_SUCCESSFUL) | |
517 | { |
|
515 | { | |
518 | PRINTF1("in restart_science_task *** 3 ERR %d\n", status[3]) |
|
516 | PRINTF1("in restart_science_task *** 3 ERR %d\n", status[3]) | |
519 | } |
|
517 | } | |
520 |
|
518 | |||
521 | status[4] = rtems_task_restart( Task_id[TASKID_CWF2],1 ); |
|
519 | status[4] = rtems_task_restart( Task_id[TASKID_CWF2],1 ); | |
522 | if (status[4] != RTEMS_SUCCESSFUL) |
|
520 | if (status[4] != RTEMS_SUCCESSFUL) | |
523 | { |
|
521 | { | |
524 | PRINTF1("in restart_science_task *** 4 ERR %d\n", status[4]) |
|
522 | PRINTF1("in restart_science_task *** 4 ERR %d\n", status[4]) | |
525 | } |
|
523 | } | |
526 |
|
524 | |||
527 | status[5] = rtems_task_restart( Task_id[TASKID_CWF1],1 ); |
|
525 | status[5] = rtems_task_restart( Task_id[TASKID_CWF1],1 ); | |
528 | if (status[5] != RTEMS_SUCCESSFUL) |
|
526 | if (status[5] != RTEMS_SUCCESSFUL) | |
529 | { |
|
527 | { | |
530 | PRINTF1("in restart_science_task *** 5 ERR %d\n", status[5]) |
|
528 | PRINTF1("in restart_science_task *** 5 ERR %d\n", status[5]) | |
531 | } |
|
529 | } | |
532 |
|
530 | |||
533 | if ( (status[0] != RTEMS_SUCCESSFUL) || (status[1] != RTEMS_SUCCESSFUL) || (status[2] != RTEMS_SUCCESSFUL) || |
|
531 | if ( (status[0] != RTEMS_SUCCESSFUL) || (status[1] != RTEMS_SUCCESSFUL) || (status[2] != RTEMS_SUCCESSFUL) || | |
534 | (status[3] != RTEMS_SUCCESSFUL) || (status[4] != RTEMS_SUCCESSFUL) || (status[5] != RTEMS_SUCCESSFUL) ) |
|
532 | (status[3] != RTEMS_SUCCESSFUL) || (status[4] != RTEMS_SUCCESSFUL) || (status[5] != RTEMS_SUCCESSFUL) ) | |
535 | { |
|
533 | { | |
536 | ret = RTEMS_UNSATISFIED; |
|
534 | ret = RTEMS_UNSATISFIED; | |
537 | } |
|
535 | } | |
538 |
|
536 | |||
539 | return ret; |
|
537 | return ret; | |
540 | } |
|
538 | } | |
541 |
|
539 | |||
542 | int suspend_science_tasks() |
|
540 | int suspend_science_tasks() | |
543 | { |
|
541 | { | |
544 | /** This function suspends the science tasks. |
|
542 | /** This function suspends the science tasks. | |
545 | * |
|
543 | * | |
546 | * @return RTEMS directive status codes: |
|
544 | * @return RTEMS directive status codes: | |
547 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
545 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
548 | * - RTEMS_INVALID_ID - task id invalid |
|
546 | * - RTEMS_INVALID_ID - task id invalid | |
549 | * - RTEMS_ALREADY_SUSPENDED - task already suspended |
|
547 | * - RTEMS_ALREADY_SUSPENDED - task already suspended | |
550 | * |
|
548 | * | |
551 | */ |
|
549 | */ | |
552 |
|
550 | |||
553 | rtems_status_code status; |
|
551 | rtems_status_code status; | |
554 |
|
552 | |||
555 | status = rtems_task_suspend( Task_id[TASKID_AVF0] ); |
|
553 | status = rtems_task_suspend( Task_id[TASKID_AVF0] ); | |
556 | if (status != RTEMS_SUCCESSFUL) |
|
554 | if (status != RTEMS_SUCCESSFUL) | |
557 | { |
|
555 | { | |
558 | PRINTF1("in suspend_science_task *** AVF0 ERR %d\n", status) |
|
556 | PRINTF1("in suspend_science_task *** AVF0 ERR %d\n", status) | |
559 | } |
|
557 | } | |
560 |
|
558 | |||
561 | if (status == RTEMS_SUCCESSFUL) // suspend BPF0 |
|
559 | if (status == RTEMS_SUCCESSFUL) // suspend BPF0 | |
562 | { |
|
560 | { | |
563 | status = rtems_task_suspend( Task_id[TASKID_BPF0] ); |
|
561 | status = rtems_task_suspend( Task_id[TASKID_BPF0] ); | |
564 | if (status != RTEMS_SUCCESSFUL) |
|
562 | if (status != RTEMS_SUCCESSFUL) | |
565 | { |
|
563 | { | |
566 | PRINTF1("in suspend_science_task *** BPF0 ERR %d\n", status) |
|
564 | PRINTF1("in suspend_science_task *** BPF0 ERR %d\n", status) | |
567 | } |
|
565 | } | |
568 | } |
|
566 | } | |
569 |
|
567 | |||
570 | if (status == RTEMS_SUCCESSFUL) // suspend WFRM |
|
568 | if (status == RTEMS_SUCCESSFUL) // suspend WFRM | |
571 | { |
|
569 | { | |
572 | status = rtems_task_suspend( Task_id[TASKID_WFRM] ); |
|
570 | status = rtems_task_suspend( Task_id[TASKID_WFRM] ); | |
573 | if (status != RTEMS_SUCCESSFUL) |
|
571 | if (status != RTEMS_SUCCESSFUL) | |
574 | { |
|
572 | { | |
575 | PRINTF1("in suspend_science_task *** WFRM ERR %d\n", status) |
|
573 | PRINTF1("in suspend_science_task *** WFRM ERR %d\n", status) | |
576 | } |
|
574 | } | |
577 | } |
|
575 | } | |
578 |
|
576 | |||
579 | if (status == RTEMS_SUCCESSFUL) // suspend CWF3 |
|
577 | if (status == RTEMS_SUCCESSFUL) // suspend CWF3 | |
580 | { |
|
578 | { | |
581 | status = rtems_task_suspend( Task_id[TASKID_CWF3] ); |
|
579 | status = rtems_task_suspend( Task_id[TASKID_CWF3] ); | |
582 | if (status != RTEMS_SUCCESSFUL) |
|
580 | if (status != RTEMS_SUCCESSFUL) | |
583 | { |
|
581 | { | |
584 | PRINTF1("in suspend_science_task *** CWF3 ERR %d\n", status) |
|
582 | PRINTF1("in suspend_science_task *** CWF3 ERR %d\n", status) | |
585 | } |
|
583 | } | |
586 | } |
|
584 | } | |
587 |
|
585 | |||
588 | if (status == RTEMS_SUCCESSFUL) // suspend CWF2 |
|
586 | if (status == RTEMS_SUCCESSFUL) // suspend CWF2 | |
589 | { |
|
587 | { | |
590 | status = rtems_task_suspend( Task_id[TASKID_CWF2] ); |
|
588 | status = rtems_task_suspend( Task_id[TASKID_CWF2] ); | |
591 | if (status != RTEMS_SUCCESSFUL) |
|
589 | if (status != RTEMS_SUCCESSFUL) | |
592 | { |
|
590 | { | |
593 | PRINTF1("in suspend_science_task *** CWF2 ERR %d\n", status) |
|
591 | PRINTF1("in suspend_science_task *** CWF2 ERR %d\n", status) | |
594 | } |
|
592 | } | |
595 | } |
|
593 | } | |
596 |
|
594 | |||
597 | if (status == RTEMS_SUCCESSFUL) // suspend CWF1 |
|
595 | if (status == RTEMS_SUCCESSFUL) // suspend CWF1 | |
598 | { |
|
596 | { | |
599 | status = rtems_task_suspend( Task_id[TASKID_CWF1] ); |
|
597 | status = rtems_task_suspend( Task_id[TASKID_CWF1] ); | |
600 | if (status != RTEMS_SUCCESSFUL) |
|
598 | if (status != RTEMS_SUCCESSFUL) | |
601 | { |
|
599 | { | |
602 | PRINTF1("in suspend_science_task *** CWF1 ERR %d\n", status) |
|
600 | PRINTF1("in suspend_science_task *** CWF1 ERR %d\n", status) | |
603 | } |
|
601 | } | |
604 | } |
|
602 | } | |
605 |
|
603 | |||
606 | return status; |
|
604 | return status; | |
607 | } |
|
605 | } | |
608 |
|
606 | |||
609 | void launch_waveform_picker( unsigned char mode ) |
|
607 | void launch_waveform_picker( unsigned char mode ) | |
610 | { |
|
608 | { | |
611 | int startDate; |
|
609 | int startDate; | |
612 |
|
610 | |||
613 | reset_current_ring_nodes(); |
|
611 | reset_current_ring_nodes(); | |
614 | reset_waveform_picker_regs(); |
|
612 | reset_waveform_picker_regs(); | |
615 | set_wfp_burst_enable_register( mode ); |
|
613 | set_wfp_burst_enable_register( mode ); | |
616 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
614 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
617 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
615 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
618 | startDate = time_management_regs->coarse_time + 2; |
|
616 | startDate = time_management_regs->coarse_time + 2; | |
619 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x80; // [1000 0000] |
|
617 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x80; // [1000 0000] | |
620 | waveform_picker_regs->start_date = startDate; |
|
618 | waveform_picker_regs->start_date = startDate; | |
621 | } |
|
619 | } | |
622 |
|
620 | |||
623 | void launch_spectral_matrix( unsigned char mode ) |
|
621 | void launch_spectral_matrix( unsigned char mode ) | |
624 | { |
|
622 | { | |
|
623 | reset_nb_sm_f0(); | |||
625 | reset_current_sm_ring_nodes(); |
|
624 | reset_current_sm_ring_nodes(); | |
626 | reset_spectral_matrix_regs(); |
|
625 | reset_spectral_matrix_regs(); | |
|
626 | ||||
627 | // Spectral Matrices simulator |
|
627 | // Spectral Matrices simulator | |
628 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
628 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
|
629 | LEON_Clear_interrupt( IRQ_SM_SIMULATOR ); | |||
|
630 | LEON_Unmask_interrupt( IRQ_SM_SIMULATOR ); | |||
629 | set_local_nb_interrupt_f0_MAX(); |
|
631 | set_local_nb_interrupt_f0_MAX(); | |
630 | LEON_Clear_interrupt( IRQ_SM ); |
|
|||
631 | LEON_Unmask_interrupt( IRQ_SM ); |
|
|||
632 | } |
|
632 | } | |
633 |
|
633 | |||
634 | //**************** |
|
634 | //**************** | |
635 | // CLOSING ACTIONS |
|
635 | // CLOSING ACTIONS | |
636 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time) |
|
636 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time) | |
637 | { |
|
637 | { | |
638 | /** This function is used to update the HK packets statistics after a successful TC execution. |
|
638 | /** This function is used to update the HK packets statistics after a successful TC execution. | |
639 | * |
|
639 | * | |
640 | * @param TC points to the TC being processed |
|
640 | * @param TC points to the TC being processed | |
641 | * @param time is the time used to date the TC execution |
|
641 | * @param time is the time used to date the TC execution | |
642 | * |
|
642 | * | |
643 | */ |
|
643 | */ | |
644 |
|
644 | |||
645 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; |
|
645 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; | |
646 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; |
|
646 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; | |
647 | housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00; |
|
647 | housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00; | |
648 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; |
|
648 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; | |
649 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; |
|
649 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; | |
650 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; |
|
650 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; | |
651 | housekeeping_packet.hk_lfr_last_exe_tc_time[0] = time[0]; |
|
651 | housekeeping_packet.hk_lfr_last_exe_tc_time[0] = time[0]; | |
652 | housekeeping_packet.hk_lfr_last_exe_tc_time[1] = time[1]; |
|
652 | housekeeping_packet.hk_lfr_last_exe_tc_time[1] = time[1]; | |
653 | housekeeping_packet.hk_lfr_last_exe_tc_time[2] = time[2]; |
|
653 | housekeeping_packet.hk_lfr_last_exe_tc_time[2] = time[2]; | |
654 | housekeeping_packet.hk_lfr_last_exe_tc_time[3] = time[3]; |
|
654 | housekeeping_packet.hk_lfr_last_exe_tc_time[3] = time[3]; | |
655 | housekeeping_packet.hk_lfr_last_exe_tc_time[4] = time[4]; |
|
655 | housekeeping_packet.hk_lfr_last_exe_tc_time[4] = time[4]; | |
656 | housekeeping_packet.hk_lfr_last_exe_tc_time[5] = time[5]; |
|
656 | housekeeping_packet.hk_lfr_last_exe_tc_time[5] = time[5]; | |
657 | } |
|
657 | } | |
658 |
|
658 | |||
659 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time) |
|
659 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time) | |
660 | { |
|
660 | { | |
661 | /** This function is used to update the HK packets statistics after a TC rejection. |
|
661 | /** This function is used to update the HK packets statistics after a TC rejection. | |
662 | * |
|
662 | * | |
663 | * @param TC points to the TC being processed |
|
663 | * @param TC points to the TC being processed | |
664 | * @param time is the time used to date the TC rejection |
|
664 | * @param time is the time used to date the TC rejection | |
665 | * |
|
665 | * | |
666 | */ |
|
666 | */ | |
667 |
|
667 | |||
668 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; |
|
668 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; | |
669 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; |
|
669 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; | |
670 | housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00; |
|
670 | housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00; | |
671 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; |
|
671 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; | |
672 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; |
|
672 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; | |
673 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; |
|
673 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; | |
674 | housekeeping_packet.hk_lfr_last_rej_tc_time[0] = time[0]; |
|
674 | housekeeping_packet.hk_lfr_last_rej_tc_time[0] = time[0]; | |
675 | housekeeping_packet.hk_lfr_last_rej_tc_time[1] = time[1]; |
|
675 | housekeeping_packet.hk_lfr_last_rej_tc_time[1] = time[1]; | |
676 | housekeeping_packet.hk_lfr_last_rej_tc_time[2] = time[2]; |
|
676 | housekeeping_packet.hk_lfr_last_rej_tc_time[2] = time[2]; | |
677 | housekeeping_packet.hk_lfr_last_rej_tc_time[3] = time[3]; |
|
677 | housekeeping_packet.hk_lfr_last_rej_tc_time[3] = time[3]; | |
678 | housekeeping_packet.hk_lfr_last_rej_tc_time[4] = time[4]; |
|
678 | housekeeping_packet.hk_lfr_last_rej_tc_time[4] = time[4]; | |
679 | housekeeping_packet.hk_lfr_last_rej_tc_time[5] = time[5]; |
|
679 | housekeeping_packet.hk_lfr_last_rej_tc_time[5] = time[5]; | |
680 | } |
|
680 | } | |
681 |
|
681 | |||
682 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id, unsigned char *time) |
|
682 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id, unsigned char *time) | |
683 | { |
|
683 | { | |
684 | /** This function is the last step of the TC execution workflow. |
|
684 | /** This function is the last step of the TC execution workflow. | |
685 | * |
|
685 | * | |
686 | * @param TC points to the TC being processed |
|
686 | * @param TC points to the TC being processed | |
687 | * @param result is the result of the TC execution (LFR_SUCCESSFUL / LFR_DEFAULT) |
|
687 | * @param result is the result of the TC execution (LFR_SUCCESSFUL / LFR_DEFAULT) | |
688 | * @param queue_id is the id of the RTEMS message queue used to send TM packets |
|
688 | * @param queue_id is the id of the RTEMS message queue used to send TM packets | |
689 | * @param time is the time used to date the TC execution |
|
689 | * @param time is the time used to date the TC execution | |
690 | * |
|
690 | * | |
691 | */ |
|
691 | */ | |
692 |
|
692 | |||
693 | unsigned int val = 0; |
|
693 | unsigned int val = 0; | |
694 |
|
694 | |||
695 | if (result == LFR_SUCCESSFUL) |
|
695 | if (result == LFR_SUCCESSFUL) | |
696 | { |
|
696 | { | |
697 | if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) |
|
697 | if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) | |
698 | && |
|
698 | && | |
699 | !( (TC->serviceType==TC_TYPE_GEN) && (TC->serviceSubType==TC_SUBTYPE_UPDT_INFO)) |
|
699 | !( (TC->serviceType==TC_TYPE_GEN) && (TC->serviceSubType==TC_SUBTYPE_UPDT_INFO)) | |
700 | ) |
|
700 | ) | |
701 | { |
|
701 | { | |
702 | send_tm_lfr_tc_exe_success( TC, queue_id, time ); |
|
702 | send_tm_lfr_tc_exe_success( TC, queue_id, time ); | |
703 | } |
|
703 | } | |
704 | update_last_TC_exe( TC, time ); |
|
704 | update_last_TC_exe( TC, time ); | |
705 | val = housekeeping_packet.hk_lfr_exe_tc_cnt[0] * 256 + housekeeping_packet.hk_lfr_exe_tc_cnt[1]; |
|
705 | val = housekeeping_packet.hk_lfr_exe_tc_cnt[0] * 256 + housekeeping_packet.hk_lfr_exe_tc_cnt[1]; | |
706 | val++; |
|
706 | val++; | |
707 | housekeeping_packet.hk_lfr_exe_tc_cnt[0] = (unsigned char) (val >> 8); |
|
707 | housekeeping_packet.hk_lfr_exe_tc_cnt[0] = (unsigned char) (val >> 8); | |
708 | housekeeping_packet.hk_lfr_exe_tc_cnt[1] = (unsigned char) (val); |
|
708 | housekeeping_packet.hk_lfr_exe_tc_cnt[1] = (unsigned char) (val); | |
709 | } |
|
709 | } | |
710 | else |
|
710 | else | |
711 | { |
|
711 | { | |
712 | update_last_TC_rej( TC, time ); |
|
712 | update_last_TC_rej( TC, time ); | |
713 | val = housekeeping_packet.hk_lfr_rej_tc_cnt[0] * 256 + housekeeping_packet.hk_lfr_rej_tc_cnt[1]; |
|
713 | val = housekeeping_packet.hk_lfr_rej_tc_cnt[0] * 256 + housekeeping_packet.hk_lfr_rej_tc_cnt[1]; | |
714 | val++; |
|
714 | val++; | |
715 | housekeeping_packet.hk_lfr_rej_tc_cnt[0] = (unsigned char) (val >> 8); |
|
715 | housekeeping_packet.hk_lfr_rej_tc_cnt[0] = (unsigned char) (val >> 8); | |
716 | housekeeping_packet.hk_lfr_rej_tc_cnt[1] = (unsigned char) (val); |
|
716 | housekeeping_packet.hk_lfr_rej_tc_cnt[1] = (unsigned char) (val); | |
717 | } |
|
717 | } | |
718 | } |
|
718 | } | |
719 |
|
719 | |||
720 | //*************************** |
|
720 | //*************************** | |
721 | // Interrupt Service Routines |
|
721 | // Interrupt Service Routines | |
722 | rtems_isr commutation_isr1( rtems_vector_number vector ) |
|
722 | rtems_isr commutation_isr1( rtems_vector_number vector ) | |
723 | { |
|
723 | { | |
724 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
724 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
725 | printf("In commutation_isr1 *** Error sending event to DUMB\n"); |
|
725 | printf("In commutation_isr1 *** Error sending event to DUMB\n"); | |
726 | } |
|
726 | } | |
727 | } |
|
727 | } | |
728 |
|
728 | |||
729 | rtems_isr commutation_isr2( rtems_vector_number vector ) |
|
729 | rtems_isr commutation_isr2( rtems_vector_number vector ) | |
730 | { |
|
730 | { | |
731 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
731 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
732 | printf("In commutation_isr2 *** Error sending event to DUMB\n"); |
|
732 | printf("In commutation_isr2 *** Error sending event to DUMB\n"); | |
733 | } |
|
733 | } | |
734 | } |
|
734 | } | |
735 |
|
735 | |||
736 | //**************** |
|
736 | //**************** | |
737 | // OTHER FUNCTIONS |
|
737 | // OTHER FUNCTIONS | |
738 | void updateLFRCurrentMode() |
|
738 | void updateLFRCurrentMode() | |
739 | { |
|
739 | { | |
740 | /** This function updates the value of the global variable lfrCurrentMode. |
|
740 | /** This function updates the value of the global variable lfrCurrentMode. | |
741 | * |
|
741 | * | |
742 | * lfrCurrentMode is a parameter used by several functions to know in which mode LFR is running. |
|
742 | * lfrCurrentMode is a parameter used by several functions to know in which mode LFR is running. | |
743 | * |
|
743 | * | |
744 | */ |
|
744 | */ | |
745 | // update the local value of lfrCurrentMode with the value contained in the housekeeping_packet structure |
|
745 | // update the local value of lfrCurrentMode with the value contained in the housekeeping_packet structure | |
746 | lfrCurrentMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
746 | lfrCurrentMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
747 | } |
|
747 | } | |
748 |
|
748 |
General Comments 0
You need to be logged in to leave comments.
Login now