##// END OF EJS Templates
HK emission using the directive...
paul -
r55:278c7d92e10c default
parent child
Show More
@@ -1,248 +1,248
1 #############################################################################
1 #############################################################################
2 # Makefile for building: bin/fsw
2 # Makefile for building: bin/fsw
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Mon Nov 4 07:05:32 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Nov 5 13:12:35 2013
4 # Project: fsw-qt.pro
4 # Project: fsw-qt.pro
5 # Template: app
5 # Template: app
6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
7 #############################################################################
7 #############################################################################
8
8
9 ####### Compiler, tools and options
9 ####### Compiler, tools and options
10
10
11 CC = sparc-rtems-gcc
11 CC = sparc-rtems-gcc
12 CXX = sparc-rtems-g++
12 CXX = sparc-rtems-g++
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=20 -DPRINT_MESSAGES_ON_CONSOLE
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=20 -DPRINT_MESSAGES_ON_CONSOLE
14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
17 LINK = sparc-rtems-g++
17 LINK = sparc-rtems-g++
18 LFLAGS =
18 LFLAGS =
19 LIBS = $(SUBLIBS)
19 LIBS = $(SUBLIBS)
20 AR = sparc-rtems-ar rcs
20 AR = sparc-rtems-ar rcs
21 RANLIB =
21 RANLIB =
22 QMAKE = /usr/bin/qmake-qt4
22 QMAKE = /usr/bin/qmake-qt4
23 TAR = tar -cf
23 TAR = tar -cf
24 COMPRESS = gzip -9f
24 COMPRESS = gzip -9f
25 COPY = cp -f
25 COPY = cp -f
26 SED = sed
26 SED = sed
27 COPY_FILE = $(COPY)
27 COPY_FILE = $(COPY)
28 COPY_DIR = $(COPY) -r
28 COPY_DIR = $(COPY) -r
29 STRIP = sparc-rtems-strip
29 STRIP = sparc-rtems-strip
30 INSTALL_FILE = install -m 644 -p
30 INSTALL_FILE = install -m 644 -p
31 INSTALL_DIR = $(COPY_DIR)
31 INSTALL_DIR = $(COPY_DIR)
32 INSTALL_PROGRAM = install -m 755 -p
32 INSTALL_PROGRAM = install -m 755 -p
33 DEL_FILE = rm -f
33 DEL_FILE = rm -f
34 SYMLINK = ln -f -s
34 SYMLINK = ln -f -s
35 DEL_DIR = rmdir
35 DEL_DIR = rmdir
36 MOVE = mv -f
36 MOVE = mv -f
37 CHK_DIR_EXISTS= test -d
37 CHK_DIR_EXISTS= test -d
38 MKDIR = mkdir -p
38 MKDIR = mkdir -p
39
39
40 ####### Output directory
40 ####### Output directory
41
41
42 OBJECTS_DIR = obj/
42 OBJECTS_DIR = obj/
43
43
44 ####### Files
44 ####### Files
45
45
46 SOURCES = ../src/wf_handler.c \
46 SOURCES = ../src/wf_handler.c \
47 ../src/tc_handler.c \
47 ../src/tc_handler.c \
48 ../src/fsw_processing.c \
48 ../src/fsw_processing.c \
49 ../src/fsw_misc.c \
49 ../src/fsw_misc.c \
50 ../src/fsw_init.c \
50 ../src/fsw_init.c \
51 ../src/fsw_globals.c \
51 ../src/fsw_globals.c \
52 ../src/fsw_spacewire.c \
52 ../src/fsw_spacewire.c \
53 ../src/tc_load_dump_parameters.c \
53 ../src/tc_load_dump_parameters.c \
54 ../src/tm_lfr_tc_exe.c \
54 ../src/tm_lfr_tc_exe.c \
55 ../src/tc_acceptance.c
55 ../src/tc_acceptance.c
56 OBJECTS = obj/wf_handler.o \
56 OBJECTS = obj/wf_handler.o \
57 obj/tc_handler.o \
57 obj/tc_handler.o \
58 obj/fsw_processing.o \
58 obj/fsw_processing.o \
59 obj/fsw_misc.o \
59 obj/fsw_misc.o \
60 obj/fsw_init.o \
60 obj/fsw_init.o \
61 obj/fsw_globals.o \
61 obj/fsw_globals.o \
62 obj/fsw_spacewire.o \
62 obj/fsw_spacewire.o \
63 obj/tc_load_dump_parameters.o \
63 obj/tc_load_dump_parameters.o \
64 obj/tm_lfr_tc_exe.o \
64 obj/tm_lfr_tc_exe.o \
65 obj/tc_acceptance.o
65 obj/tc_acceptance.o
66 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
66 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
67 /usr/lib64/qt4/mkspecs/common/linux.conf \
67 /usr/lib64/qt4/mkspecs/common/linux.conf \
68 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
68 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
69 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
69 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
70 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
70 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
71 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
71 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
72 /usr/lib64/qt4/mkspecs/qconfig.pri \
72 /usr/lib64/qt4/mkspecs/qconfig.pri \
73 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
73 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
74 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
74 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
75 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
75 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
76 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
76 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
77 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
77 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
78 sparc.pri \
78 sparc.pri \
79 /usr/lib64/qt4/mkspecs/features/release.prf \
79 /usr/lib64/qt4/mkspecs/features/release.prf \
80 /usr/lib64/qt4/mkspecs/features/default_post.prf \
80 /usr/lib64/qt4/mkspecs/features/default_post.prf \
81 /usr/lib64/qt4/mkspecs/features/shared.prf \
81 /usr/lib64/qt4/mkspecs/features/shared.prf \
82 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
82 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
83 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
83 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
84 /usr/lib64/qt4/mkspecs/features/resources.prf \
84 /usr/lib64/qt4/mkspecs/features/resources.prf \
85 /usr/lib64/qt4/mkspecs/features/uic.prf \
85 /usr/lib64/qt4/mkspecs/features/uic.prf \
86 /usr/lib64/qt4/mkspecs/features/yacc.prf \
86 /usr/lib64/qt4/mkspecs/features/yacc.prf \
87 /usr/lib64/qt4/mkspecs/features/lex.prf \
87 /usr/lib64/qt4/mkspecs/features/lex.prf \
88 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
88 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
89 fsw-qt.pro
89 fsw-qt.pro
90 QMAKE_TARGET = fsw
90 QMAKE_TARGET = fsw
91 DESTDIR = bin/
91 DESTDIR = bin/
92 TARGET = bin/fsw
92 TARGET = bin/fsw
93
93
94 first: all
94 first: all
95 ####### Implicit rules
95 ####### Implicit rules
96
96
97 .SUFFIXES: .o .c .cpp .cc .cxx .C
97 .SUFFIXES: .o .c .cpp .cc .cxx .C
98
98
99 .cpp.o:
99 .cpp.o:
100 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
100 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
101
101
102 .cc.o:
102 .cc.o:
103 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
103 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
104
104
105 .cxx.o:
105 .cxx.o:
106 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
106 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
107
107
108 .C.o:
108 .C.o:
109 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
109 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
110
110
111 .c.o:
111 .c.o:
112 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
112 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
113
113
114 ####### Build rules
114 ####### Build rules
115
115
116 all: Makefile $(TARGET)
116 all: Makefile $(TARGET)
117
117
118 $(TARGET): $(OBJECTS)
118 $(TARGET): $(OBJECTS)
119 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
119 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
120 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
120 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
121
121
122 Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
122 Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
123 /usr/lib64/qt4/mkspecs/common/linux.conf \
123 /usr/lib64/qt4/mkspecs/common/linux.conf \
124 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
124 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
125 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
125 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
126 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
126 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
127 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
127 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
128 /usr/lib64/qt4/mkspecs/qconfig.pri \
128 /usr/lib64/qt4/mkspecs/qconfig.pri \
129 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
129 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
130 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
130 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
131 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
131 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
132 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
132 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
133 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
133 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
134 sparc.pri \
134 sparc.pri \
135 /usr/lib64/qt4/mkspecs/features/release.prf \
135 /usr/lib64/qt4/mkspecs/features/release.prf \
136 /usr/lib64/qt4/mkspecs/features/default_post.prf \
136 /usr/lib64/qt4/mkspecs/features/default_post.prf \
137 /usr/lib64/qt4/mkspecs/features/shared.prf \
137 /usr/lib64/qt4/mkspecs/features/shared.prf \
138 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
138 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
139 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
139 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
140 /usr/lib64/qt4/mkspecs/features/resources.prf \
140 /usr/lib64/qt4/mkspecs/features/resources.prf \
141 /usr/lib64/qt4/mkspecs/features/uic.prf \
141 /usr/lib64/qt4/mkspecs/features/uic.prf \
142 /usr/lib64/qt4/mkspecs/features/yacc.prf \
142 /usr/lib64/qt4/mkspecs/features/yacc.prf \
143 /usr/lib64/qt4/mkspecs/features/lex.prf \
143 /usr/lib64/qt4/mkspecs/features/lex.prf \
144 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf
144 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf
145 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
145 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
146 /usr/lib64/qt4/mkspecs/common/unix.conf:
146 /usr/lib64/qt4/mkspecs/common/unix.conf:
147 /usr/lib64/qt4/mkspecs/common/linux.conf:
147 /usr/lib64/qt4/mkspecs/common/linux.conf:
148 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
148 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
149 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
149 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
150 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
150 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
151 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
151 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
152 /usr/lib64/qt4/mkspecs/qconfig.pri:
152 /usr/lib64/qt4/mkspecs/qconfig.pri:
153 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri:
153 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri:
154 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
154 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
155 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
155 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
156 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
156 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
157 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
157 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
158 sparc.pri:
158 sparc.pri:
159 /usr/lib64/qt4/mkspecs/features/release.prf:
159 /usr/lib64/qt4/mkspecs/features/release.prf:
160 /usr/lib64/qt4/mkspecs/features/default_post.prf:
160 /usr/lib64/qt4/mkspecs/features/default_post.prf:
161 /usr/lib64/qt4/mkspecs/features/shared.prf:
161 /usr/lib64/qt4/mkspecs/features/shared.prf:
162 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
162 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
163 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
163 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
164 /usr/lib64/qt4/mkspecs/features/resources.prf:
164 /usr/lib64/qt4/mkspecs/features/resources.prf:
165 /usr/lib64/qt4/mkspecs/features/uic.prf:
165 /usr/lib64/qt4/mkspecs/features/uic.prf:
166 /usr/lib64/qt4/mkspecs/features/yacc.prf:
166 /usr/lib64/qt4/mkspecs/features/yacc.prf:
167 /usr/lib64/qt4/mkspecs/features/lex.prf:
167 /usr/lib64/qt4/mkspecs/features/lex.prf:
168 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
168 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
169 qmake: FORCE
169 qmake: FORCE
170 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
170 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
171
171
172 dist:
172 dist:
173 @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0
173 @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0
174 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0
174 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0
175
175
176
176
177 clean:compiler_clean
177 clean:compiler_clean
178 -$(DEL_FILE) $(OBJECTS)
178 -$(DEL_FILE) $(OBJECTS)
179 -$(DEL_FILE) *~ core *.core
179 -$(DEL_FILE) *~ core *.core
180
180
181
181
182 ####### Sub-libraries
182 ####### Sub-libraries
183
183
184 distclean: clean
184 distclean: clean
185 -$(DEL_FILE) $(TARGET)
185 -$(DEL_FILE) $(TARGET)
186 -$(DEL_FILE) Makefile
186 -$(DEL_FILE) Makefile
187
187
188
188
189 grmon:
189 grmon:
190 cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u
190 cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u
191
191
192 check: first
192 check: first
193
193
194 compiler_rcc_make_all:
194 compiler_rcc_make_all:
195 compiler_rcc_clean:
195 compiler_rcc_clean:
196 compiler_uic_make_all:
196 compiler_uic_make_all:
197 compiler_uic_clean:
197 compiler_uic_clean:
198 compiler_image_collection_make_all: qmake_image_collection.cpp
198 compiler_image_collection_make_all: qmake_image_collection.cpp
199 compiler_image_collection_clean:
199 compiler_image_collection_clean:
200 -$(DEL_FILE) qmake_image_collection.cpp
200 -$(DEL_FILE) qmake_image_collection.cpp
201 compiler_yacc_decl_make_all:
201 compiler_yacc_decl_make_all:
202 compiler_yacc_decl_clean:
202 compiler_yacc_decl_clean:
203 compiler_yacc_impl_make_all:
203 compiler_yacc_impl_make_all:
204 compiler_yacc_impl_clean:
204 compiler_yacc_impl_clean:
205 compiler_lex_make_all:
205 compiler_lex_make_all:
206 compiler_lex_clean:
206 compiler_lex_clean:
207 compiler_clean:
207 compiler_clean:
208
208
209 ####### Compile
209 ####### Compile
210
210
211 obj/wf_handler.o: ../src/wf_handler.c
211 obj/wf_handler.o: ../src/wf_handler.c
212 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c
212 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c
213
213
214 obj/tc_handler.o: ../src/tc_handler.c
214 obj/tc_handler.o: ../src/tc_handler.c
215 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c
215 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c
216
216
217 obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c
217 obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c
218 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c
218 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c
219
219
220 obj/fsw_misc.o: ../src/fsw_misc.c
220 obj/fsw_misc.o: ../src/fsw_misc.c
221 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c
221 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c
222
222
223 obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c
223 obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c
224 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c
224 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c
225
225
226 obj/fsw_globals.o: ../src/fsw_globals.c
226 obj/fsw_globals.o: ../src/fsw_globals.c
227 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c
227 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c
228
228
229 obj/fsw_spacewire.o: ../src/fsw_spacewire.c
229 obj/fsw_spacewire.o: ../src/fsw_spacewire.c
230 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c
230 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c
231
231
232 obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c
232 obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c
233 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c
233 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c
234
234
235 obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c
235 obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c
236 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c
236 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c
237
237
238 obj/tc_acceptance.o: ../src/tc_acceptance.c
238 obj/tc_acceptance.o: ../src/tc_acceptance.c
239 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c
239 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c
240
240
241 ####### Install
241 ####### Install
242
242
243 install: FORCE
243 install: FORCE
244
244
245 uninstall: FORCE
245 uninstall: FORCE
246
246
247 FORCE:
247 FORCE:
248
248
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -1,305 +1,305
1 <?xml version="1.0" encoding="UTF-8"?>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE QtCreatorProject>
2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.0, 2013-11-04T07:04:49. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-05T13:11:18. -->
4 <qtcreator>
4 <qtcreator>
5 <data>
5 <data>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
7 <value type="int">0</value>
7 <value type="int">0</value>
8 </data>
8 </data>
9 <data>
9 <data>
10 <variable>ProjectExplorer.Project.EditorSettings</variable>
10 <variable>ProjectExplorer.Project.EditorSettings</variable>
11 <valuemap type="QVariantMap">
11 <valuemap type="QVariantMap">
12 <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
12 <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
13 <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
13 <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
14 <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
14 <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
15 <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
15 <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
16 <value type="QString" key="language">Cpp</value>
16 <value type="QString" key="language">Cpp</value>
17 <valuemap type="QVariantMap" key="value">
17 <valuemap type="QVariantMap" key="value">
18 <value type="QString" key="CurrentPreferences">CppGlobal</value>
18 <value type="QString" key="CurrentPreferences">CppGlobal</value>
19 </valuemap>
19 </valuemap>
20 </valuemap>
20 </valuemap>
21 <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
21 <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
22 <value type="QString" key="language">QmlJS</value>
22 <value type="QString" key="language">QmlJS</value>
23 <valuemap type="QVariantMap" key="value">
23 <valuemap type="QVariantMap" key="value">
24 <value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
24 <value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
25 </valuemap>
25 </valuemap>
26 </valuemap>
26 </valuemap>
27 <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
27 <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
28 <value type="QByteArray" key="EditorConfiguration.Codec">System</value>
28 <value type="QByteArray" key="EditorConfiguration.Codec">System</value>
29 <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
29 <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
30 <value type="int" key="EditorConfiguration.IndentSize">4</value>
30 <value type="int" key="EditorConfiguration.IndentSize">4</value>
31 <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
31 <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
32 <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
32 <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
33 <value type="int" key="EditorConfiguration.PaddingMode">1</value>
33 <value type="int" key="EditorConfiguration.PaddingMode">1</value>
34 <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
34 <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
35 <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
35 <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
36 <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
36 <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
37 <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
37 <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
38 <value type="int" key="EditorConfiguration.TabSize">8</value>
38 <value type="int" key="EditorConfiguration.TabSize">8</value>
39 <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
39 <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
40 <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
40 <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
41 <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
41 <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
42 <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
42 <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
43 <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
43 <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
44 <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
44 <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
45 </valuemap>
45 </valuemap>
46 </data>
46 </data>
47 <data>
47 <data>
48 <variable>ProjectExplorer.Project.PluginSettings</variable>
48 <variable>ProjectExplorer.Project.PluginSettings</variable>
49 <valuemap type="QVariantMap"/>
49 <valuemap type="QVariantMap"/>
50 </data>
50 </data>
51 <data>
51 <data>
52 <variable>ProjectExplorer.Project.Target.0</variable>
52 <variable>ProjectExplorer.Project.Target.0</variable>
53 <valuemap type="QVariantMap">
53 <valuemap type="QVariantMap">
54 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value>
54 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value>
55 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value>
55 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value>
56 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value>
56 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value>
57 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
57 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
58 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
58 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
59 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value>
59 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value>
60 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
60 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
61 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
61 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
62 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
62 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
63 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
63 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
64 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
64 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
65 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
65 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
66 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
66 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
67 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
67 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
68 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
68 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
69 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
69 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
70 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
70 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
71 </valuemap>
71 </valuemap>
72 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
72 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
73 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
73 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
74 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
74 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
75 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
75 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
76 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
76 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
77 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
77 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
78 <value type="QString">-w</value>
78 <value type="QString">-w</value>
79 <value type="QString">-r</value>
79 <value type="QString">-r</value>
80 </valuelist>
80 </valuelist>
81 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
81 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
82 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w -j 4</value>
82 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w -j 4</value>
83 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
83 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
84 </valuemap>
84 </valuemap>
85 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
85 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
86 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
86 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
87 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
87 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
88 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
88 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
89 </valuemap>
89 </valuemap>
90 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
90 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
91 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
91 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
92 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
92 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
93 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
93 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
94 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
94 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
95 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
95 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
96 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
96 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
97 <value type="QString">-w</value>
97 <value type="QString">-w</value>
98 <value type="QString">-r</value>
98 <value type="QString">-r</value>
99 </valuelist>
99 </valuelist>
100 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
100 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
101 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value>
101 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value>
102 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
102 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
103 </valuemap>
103 </valuemap>
104 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
104 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
105 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
105 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
106 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
106 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
107 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
107 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
108 </valuemap>
108 </valuemap>
109 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
109 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
110 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
110 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
111 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
111 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
112 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value>
112 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value>
113 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
113 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
114 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
114 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
115 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
115 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
116 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
116 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
117 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
117 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
118 </valuemap>
118 </valuemap>
119 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
119 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
120 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
120 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
121 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
121 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
122 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
122 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
123 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
123 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
124 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
124 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
125 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
125 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
126 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
126 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
127 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
127 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
128 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
128 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
129 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
129 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
130 </valuemap>
130 </valuemap>
131 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
131 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
132 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
132 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
133 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
133 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
134 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
134 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
135 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
135 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
136 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
136 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
137 <value type="QString">-w</value>
137 <value type="QString">-w</value>
138 <value type="QString">-r</value>
138 <value type="QString">-r</value>
139 </valuelist>
139 </valuelist>
140 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
140 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
141 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value>
141 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value>
142 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
142 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
143 </valuemap>
143 </valuemap>
144 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
144 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
145 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
145 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
146 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
146 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
147 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
147 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
148 </valuemap>
148 </valuemap>
149 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
149 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
150 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
150 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
151 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
151 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
152 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
152 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
153 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
153 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
154 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
154 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
155 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
155 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
156 <value type="QString">-w</value>
156 <value type="QString">-w</value>
157 <value type="QString">-r</value>
157 <value type="QString">-r</value>
158 </valuelist>
158 </valuelist>
159 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
159 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
160 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value>
160 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value>
161 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
161 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
162 </valuemap>
162 </valuemap>
163 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
163 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
164 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
164 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
165 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
165 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
166 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
166 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
167 </valuemap>
167 </valuemap>
168 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
168 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
169 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
169 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
170 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
170 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
171 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value>
171 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value>
172 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
172 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
173 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
173 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
174 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
174 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
175 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
175 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
176 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
176 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
177 </valuemap>
177 </valuemap>
178 <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
178 <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
179 <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
179 <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
180 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
180 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
181 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
181 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
182 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
182 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
183 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
183 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
184 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
184 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
185 </valuemap>
185 </valuemap>
186 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
186 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
187 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value>
187 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value>
188 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
188 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
189 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
189 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
190 </valuemap>
190 </valuemap>
191 <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
191 <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
192 <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
192 <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
193 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
193 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
194 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
194 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
195 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
195 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
196 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
196 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
197 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
197 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
198 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
198 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
199 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
199 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
200 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
200 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
201 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
201 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
202 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
202 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
203 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
203 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
204 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
204 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
205 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
205 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
206 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
206 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
207 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
207 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
208 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
208 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
209 <value type="int">0</value>
209 <value type="int">0</value>
210 <value type="int">1</value>
210 <value type="int">1</value>
211 <value type="int">2</value>
211 <value type="int">2</value>
212 <value type="int">3</value>
212 <value type="int">3</value>
213 <value type="int">4</value>
213 <value type="int">4</value>
214 <value type="int">5</value>
214 <value type="int">5</value>
215 <value type="int">6</value>
215 <value type="int">6</value>
216 <value type="int">7</value>
216 <value type="int">7</value>
217 <value type="int">8</value>
217 <value type="int">8</value>
218 <value type="int">9</value>
218 <value type="int">9</value>
219 <value type="int">10</value>
219 <value type="int">10</value>
220 <value type="int">11</value>
220 <value type="int">11</value>
221 <value type="int">12</value>
221 <value type="int">12</value>
222 <value type="int">13</value>
222 <value type="int">13</value>
223 <value type="int">14</value>
223 <value type="int">14</value>
224 </valuelist>
224 </valuelist>
225 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
225 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
226 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
226 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
227 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
227 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
228 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
228 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
229 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value>
229 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value>
230 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
230 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
231 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
231 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
232 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
232 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
233 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
233 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
234 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
234 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
235 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
235 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
236 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
236 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
237 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
237 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
238 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
238 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
239 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
239 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
240 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
240 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
241 </valuemap>
241 </valuemap>
242 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
242 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
243 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
243 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
244 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
244 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
245 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
245 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
246 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
246 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
247 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
247 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
248 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
248 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
249 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
249 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
250 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
250 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
251 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
251 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
252 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
252 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
253 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
253 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
254 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
254 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
255 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
255 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
256 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
256 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
257 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
257 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
258 <value type="int">0</value>
258 <value type="int">0</value>
259 <value type="int">1</value>
259 <value type="int">1</value>
260 <value type="int">2</value>
260 <value type="int">2</value>
261 <value type="int">3</value>
261 <value type="int">3</value>
262 <value type="int">4</value>
262 <value type="int">4</value>
263 <value type="int">5</value>
263 <value type="int">5</value>
264 <value type="int">6</value>
264 <value type="int">6</value>
265 <value type="int">7</value>
265 <value type="int">7</value>
266 <value type="int">8</value>
266 <value type="int">8</value>
267 <value type="int">9</value>
267 <value type="int">9</value>
268 <value type="int">10</value>
268 <value type="int">10</value>
269 <value type="int">11</value>
269 <value type="int">11</value>
270 <value type="int">12</value>
270 <value type="int">12</value>
271 <value type="int">13</value>
271 <value type="int">13</value>
272 <value type="int">14</value>
272 <value type="int">14</value>
273 </valuelist>
273 </valuelist>
274 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
274 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
275 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
275 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
276 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
276 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
277 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value>
277 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value>
278 <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value>
278 <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value>
279 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value>
279 <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value>
280 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value>
280 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value>
281 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
281 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
282 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
282 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
283 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
283 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
284 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
284 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
285 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
285 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
286 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
286 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
287 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
287 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
288 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
288 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
289 </valuemap>
289 </valuemap>
290 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
290 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
291 </valuemap>
291 </valuemap>
292 </data>
292 </data>
293 <data>
293 <data>
294 <variable>ProjectExplorer.Project.TargetCount</variable>
294 <variable>ProjectExplorer.Project.TargetCount</variable>
295 <value type="int">1</value>
295 <value type="int">1</value>
296 </data>
296 </data>
297 <data>
297 <data>
298 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
298 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
299 <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
299 <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
300 </data>
300 </data>
301 <data>
301 <data>
302 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
302 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
303 <value type="int">14</value>
303 <value type="int">14</value>
304 </data>
304 </data>
305 </qtcreator>
305 </qtcreator>
@@ -1,590 +1,592
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 BOOT_PRINTF("\n\n\n\n\n")
78 BOOT_PRINTF("\n\n\n\n\n")
79 BOOT_PRINTF("***************************\n")
79 BOOT_PRINTF("***************************\n")
80 BOOT_PRINTF("** START Flight Software **\n")
80 BOOT_PRINTF("** START Flight Software **\n")
81 BOOT_PRINTF("***************************\n")
81 BOOT_PRINTF("***************************\n")
82 BOOT_PRINTF("\n\n")
82 BOOT_PRINTF("\n\n")
83
83
84 //send_console_outputs_on_apbuart_port();
84 //send_console_outputs_on_apbuart_port();
85 set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE);
85 set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE);
86
86
87 reset_wfp_burst_enable(); // stop the waveform picker if it was running
88
87 init_parameter_dump();
89 init_parameter_dump();
88 init_local_mode_parameters();
90 init_local_mode_parameters();
89 init_housekeeping_parameters();
91 init_housekeeping_parameters();
90
92
91 updateLFRCurrentMode();
93 updateLFRCurrentMode();
92
94
93 BOOT_PRINTF1("in INIT *** lfrCurrentMode is %d\n", lfrCurrentMode)
95 BOOT_PRINTF1("in INIT *** lfrCurrentMode is %d\n", lfrCurrentMode)
94
96
95 create_names(); // create all names
97 create_names(); // create all names
96
98
97 status = create_message_queues(); // create message queues
99 status = create_message_queues(); // create message queues
98 if (status != RTEMS_SUCCESSFUL)
100 if (status != RTEMS_SUCCESSFUL)
99 {
101 {
100 PRINTF1("in INIT *** ERR in create_message_queues, code %d", status)
102 PRINTF1("in INIT *** ERR in create_message_queues, code %d", status)
101 }
103 }
102
104
103 status = create_all_tasks(); // create all tasks
105 status = create_all_tasks(); // create all tasks
104 if (status != RTEMS_SUCCESSFUL)
106 if (status != RTEMS_SUCCESSFUL)
105 {
107 {
106 PRINTF1("in INIT *** ERR in create_all_tasks, code %d", status)
108 PRINTF1("in INIT *** ERR in create_all_tasks, code %d", status)
107 }
109 }
108
110
109 // **************************
111 // **************************
110 // <SPACEWIRE INITIALIZATION>
112 // <SPACEWIRE INITIALIZATION>
111 grspw_timecode_callback = &timecode_irq_handler;
113 grspw_timecode_callback = &timecode_irq_handler;
112
114
113 status_spw = spacewire_open_link(); // (1) open the link
115 status_spw = spacewire_open_link(); // (1) open the link
114 if ( status_spw != RTEMS_SUCCESSFUL )
116 if ( status_spw != RTEMS_SUCCESSFUL )
115 {
117 {
116 PRINTF1("in INIT *** ERR spacewire_open_link code %d\n", status_spw )
118 PRINTF1("in INIT *** ERR spacewire_open_link code %d\n", status_spw )
117 }
119 }
118
120
119 if ( status_spw == RTEMS_SUCCESSFUL ) // (2) configure the link
121 if ( status_spw == RTEMS_SUCCESSFUL ) // (2) configure the link
120 {
122 {
121 status_spw = spacewire_configure_link( fdSPW );
123 status_spw = spacewire_configure_link( fdSPW );
122 if ( status_spw != RTEMS_SUCCESSFUL )
124 if ( status_spw != RTEMS_SUCCESSFUL )
123 {
125 {
124 PRINTF1("in INIT *** ERR spacewire_configure_link code %d\n", status_spw )
126 PRINTF1("in INIT *** ERR spacewire_configure_link code %d\n", status_spw )
125 }
127 }
126 }
128 }
127
129
128 if ( status_spw == RTEMS_SUCCESSFUL) // (3) start the link
130 if ( status_spw == RTEMS_SUCCESSFUL) // (3) start the link
129 {
131 {
130 status_spw = spacewire_start_link( fdSPW );
132 status_spw = spacewire_start_link( fdSPW );
131 if ( status_spw != RTEMS_SUCCESSFUL )
133 if ( status_spw != RTEMS_SUCCESSFUL )
132 {
134 {
133 PRINTF1("in INIT *** ERR spacewire_start_link code %d\n", status_spw )
135 PRINTF1("in INIT *** ERR spacewire_start_link code %d\n", status_spw )
134 }
136 }
135 }
137 }
136 // </SPACEWIRE INITIALIZATION>
138 // </SPACEWIRE INITIALIZATION>
137 // ***************************
139 // ***************************
138
140
139 status = start_all_tasks(); // start all tasks
141 status = start_all_tasks(); // start all tasks
140 if (status != RTEMS_SUCCESSFUL)
142 if (status != RTEMS_SUCCESSFUL)
141 {
143 {
142 PRINTF1("in INIT *** ERR in start_all_tasks, code %d", status)
144 PRINTF1("in INIT *** ERR in start_all_tasks, code %d", status)
143 }
145 }
144
146
145 // start RECV and SEND *AFTER* SpaceWire Initialization, due to the timeout of the start call during the initialization
147 // start RECV and SEND *AFTER* SpaceWire Initialization, due to the timeout of the start call during the initialization
146 status = start_recv_send_tasks();
148 status = start_recv_send_tasks();
147 if ( status != RTEMS_SUCCESSFUL )
149 if ( status != RTEMS_SUCCESSFUL )
148 {
150 {
149 PRINTF1("in INIT *** ERR start_recv_send_tasks code %d\n", status )
151 PRINTF1("in INIT *** ERR start_recv_send_tasks code %d\n", status )
150 }
152 }
151
153
152 // suspend science tasks. they will be restarted later depending on the mode
154 // suspend science tasks. they will be restarted later depending on the mode
153 status = suspend_science_tasks(); // suspend science tasks (not done in stop_current_mode if current mode = STANDBY)
155 status = suspend_science_tasks(); // suspend science tasks (not done in stop_current_mode if current mode = STANDBY)
154 if (status != RTEMS_SUCCESSFUL)
156 if (status != RTEMS_SUCCESSFUL)
155 {
157 {
156 PRINTF1("in INIT *** in suspend_science_tasks *** ERR code: %d\n", status)
158 PRINTF1("in INIT *** in suspend_science_tasks *** ERR code: %d\n", status)
157 }
159 }
158
160
159 #ifdef GSA
161 #ifdef GSA
160 // mask IRQ lines
162 // mask IRQ lines
161 LEON_Mask_interrupt( IRQ_SM );
163 LEON_Mask_interrupt( IRQ_SM );
162 LEON_Mask_interrupt( IRQ_WF );
164 LEON_Mask_interrupt( IRQ_WF );
163 // Spectral Matrices simulator
165 // Spectral Matrices simulator
164 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR,
166 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR,
165 IRQ_SPARC_SM, spectral_matrices_isr );
167 IRQ_SPARC_SM, spectral_matrices_isr );
166 // WaveForms
168 // WaveForms
167 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR, CLKDIV_WF_SIMULATOR,
169 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR, CLKDIV_WF_SIMULATOR,
168 IRQ_SPARC_WF, waveforms_simulator_isr );
170 IRQ_SPARC_WF, waveforms_simulator_isr );
169 #else
171 #else
170 // configure IRQ handling for the waveform picker unit
172 // configure IRQ handling for the waveform picker unit
171 status = rtems_interrupt_catch( waveforms_isr,
173 status = rtems_interrupt_catch( waveforms_isr,
172 IRQ_SPARC_WAVEFORM_PICKER,
174 IRQ_SPARC_WAVEFORM_PICKER,
173 &old_isr_handler) ;
175 &old_isr_handler) ;
174 #endif
176 #endif
175
177
176 // if the spacewire link is not up then send an event to the SPIQ task for link recovery
178 // if the spacewire link is not up then send an event to the SPIQ task for link recovery
177 if ( status_spw != RTEMS_SUCCESSFUL )
179 if ( status_spw != RTEMS_SUCCESSFUL )
178 {
180 {
179 status = rtems_event_send( Task_id[TASKID_SPIQ], SPW_LINKERR_EVENT );
181 status = rtems_event_send( Task_id[TASKID_SPIQ], SPW_LINKERR_EVENT );
180 if ( status != RTEMS_SUCCESSFUL ) {
182 if ( status != RTEMS_SUCCESSFUL ) {
181 PRINTF1("in INIT *** ERR rtems_event_send to SPIQ code %d\n", status )
183 PRINTF1("in INIT *** ERR rtems_event_send to SPIQ code %d\n", status )
182 }
184 }
183 }
185 }
184
186
185 BOOT_PRINTF("delete INIT\n")
187 BOOT_PRINTF("delete INIT\n")
186
188
187 status = rtems_task_delete(RTEMS_SELF);
189 status = rtems_task_delete(RTEMS_SELF);
188
190
189 }
191 }
190
192
191 void init_local_mode_parameters( void )
193 void init_local_mode_parameters( void )
192 {
194 {
193 /** This function initialize the param_local global variable with default values.
195 /** This function initialize the param_local global variable with default values.
194 *
196 *
195 */
197 */
196
198
197 unsigned int i;
199 unsigned int i;
198 unsigned int j;
200 unsigned int j;
199 unsigned int k;
201 unsigned int k;
200
202
201 // LOCAL PARAMETERS
203 // LOCAL PARAMETERS
202 set_local_sbm1_nb_cwf_max();
204 set_local_sbm1_nb_cwf_max();
203 set_local_sbm2_nb_cwf_max();
205 set_local_sbm2_nb_cwf_max();
204 set_local_nb_interrupt_f0_MAX();
206 set_local_nb_interrupt_f0_MAX();
205
207
206 BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max)
208 BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max)
207 BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max)
209 BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max)
208 BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX)
210 BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX)
209
211
210 reset_local_sbm1_nb_cwf_sent();
212 reset_local_sbm1_nb_cwf_sent();
211 reset_local_sbm2_nb_cwf_sent();
213 reset_local_sbm2_nb_cwf_sent();
212
214
213 // init sequence counters
215 // init sequence counters
214 for (i = 0; i<SEQ_CNT_NB_PID; i++)
216 for (i = 0; i<SEQ_CNT_NB_PID; i++)
215 {
217 {
216 for(j = 0; j<SEQ_CNT_NB_CAT; j++)
218 for(j = 0; j<SEQ_CNT_NB_CAT; j++)
217 {
219 {
218 for(k = 0; k<SEQ_CNT_NB_DEST_ID; k++)
220 for(k = 0; k<SEQ_CNT_NB_DEST_ID; k++)
219 {
221 {
220 sequenceCounters[i][j][k] = 0x00;
222 sequenceCounters[i][j][k] = 0x00;
221 }
223 }
222 }
224 }
223 }
225 }
224 }
226 }
225
227
226 void create_names( void ) // create all names for tasks and queues
228 void create_names( void ) // create all names for tasks and queues
227 {
229 {
228 /** This function creates all RTEMS names used in the software for tasks and queues.
230 /** This function creates all RTEMS names used in the software for tasks and queues.
229 *
231 *
230 * @return RTEMS directive status codes:
232 * @return RTEMS directive status codes:
231 * - RTEMS_SUCCESSFUL - successful completion
233 * - RTEMS_SUCCESSFUL - successful completion
232 *
234 *
233 */
235 */
234
236
235 // task names
237 // task names
236 Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' );
238 Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' );
237 Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' );
239 Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' );
238 Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' );
240 Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' );
239 Task_name[TASKID_SMIQ] = rtems_build_name( 'S', 'M', 'I', 'Q' );
241 Task_name[TASKID_SMIQ] = rtems_build_name( 'S', 'M', 'I', 'Q' );
240 Task_name[TASKID_STAT] = rtems_build_name( 'S', 'T', 'A', 'T' );
242 Task_name[TASKID_STAT] = rtems_build_name( 'S', 'T', 'A', 'T' );
241 Task_name[TASKID_AVF0] = rtems_build_name( 'A', 'V', 'F', '0' );
243 Task_name[TASKID_AVF0] = rtems_build_name( 'A', 'V', 'F', '0' );
242 Task_name[TASKID_BPF0] = rtems_build_name( 'B', 'P', 'F', '0' );
244 Task_name[TASKID_BPF0] = rtems_build_name( 'B', 'P', 'F', '0' );
243 Task_name[TASKID_WFRM] = rtems_build_name( 'W', 'F', 'R', 'M' );
245 Task_name[TASKID_WFRM] = rtems_build_name( 'W', 'F', 'R', 'M' );
244 Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' );
246 Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' );
245 Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' );
247 Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' );
246 Task_name[TASKID_MATR] = rtems_build_name( 'M', 'A', 'T', 'R' );
248 Task_name[TASKID_MATR] = rtems_build_name( 'M', 'A', 'T', 'R' );
247 Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' );
249 Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' );
248 Task_name[TASKID_CWF2] = rtems_build_name( 'C', 'W', 'F', '2' );
250 Task_name[TASKID_CWF2] = rtems_build_name( 'C', 'W', 'F', '2' );
249 Task_name[TASKID_CWF1] = rtems_build_name( 'C', 'W', 'F', '1' );
251 Task_name[TASKID_CWF1] = rtems_build_name( 'C', 'W', 'F', '1' );
250 Task_name[TASKID_SEND] = rtems_build_name( 'S', 'E', 'N', 'D' );
252 Task_name[TASKID_SEND] = rtems_build_name( 'S', 'E', 'N', 'D' );
251 Task_name[TASKID_WTDG] = rtems_build_name( 'W', 'T', 'D', 'G' );
253 Task_name[TASKID_WTDG] = rtems_build_name( 'W', 'T', 'D', 'G' );
252
254
253 // rate monotonic period names
255 // rate monotonic period names
254 name_hk_rate_monotonic = rtems_build_name( 'H', 'O', 'U', 'S' );
256 name_hk_rate_monotonic = rtems_build_name( 'H', 'O', 'U', 'S' );
255
257
256 misc_name[QUEUE_RECV] = rtems_build_name( 'Q', '_', 'R', 'V' );
258 misc_name[QUEUE_RECV] = rtems_build_name( 'Q', '_', 'R', 'V' );
257 misc_name[QUEUE_SEND] = rtems_build_name( 'Q', '_', 'S', 'D' );
259 misc_name[QUEUE_SEND] = rtems_build_name( 'Q', '_', 'S', 'D' );
258 }
260 }
259
261
260 int create_all_tasks( void ) // create all tasks which run in the software
262 int create_all_tasks( void ) // create all tasks which run in the software
261 {
263 {
262 /** This function creates all RTEMS tasks used in the software.
264 /** This function creates all RTEMS tasks used in the software.
263 *
265 *
264 * @return RTEMS directive status codes:
266 * @return RTEMS directive status codes:
265 * - RTEMS_SUCCESSFUL - task created successfully
267 * - RTEMS_SUCCESSFUL - task created successfully
266 * - RTEMS_INVALID_ADDRESS - id is NULL
268 * - RTEMS_INVALID_ADDRESS - id is NULL
267 * - RTEMS_INVALID_NAME - invalid task name
269 * - RTEMS_INVALID_NAME - invalid task name
268 * - RTEMS_INVALID_PRIORITY - invalid task priority
270 * - RTEMS_INVALID_PRIORITY - invalid task priority
269 * - RTEMS_MP_NOT_CONFIGURED - multiprocessing not configured
271 * - RTEMS_MP_NOT_CONFIGURED - multiprocessing not configured
270 * - RTEMS_TOO_MANY - too many tasks created
272 * - RTEMS_TOO_MANY - too many tasks created
271 * - RTEMS_UNSATISFIED - not enough memory for stack/FP context
273 * - RTEMS_UNSATISFIED - not enough memory for stack/FP context
272 * - RTEMS_TOO_MANY - too many global objects
274 * - RTEMS_TOO_MANY - too many global objects
273 *
275 *
274 */
276 */
275
277
276 rtems_status_code status;
278 rtems_status_code status;
277
279
278 // RECV
280 // RECV
279 status = rtems_task_create(
281 status = rtems_task_create(
280 Task_name[TASKID_RECV], TASK_PRIORITY_RECV, RTEMS_MINIMUM_STACK_SIZE,
282 Task_name[TASKID_RECV], TASK_PRIORITY_RECV, RTEMS_MINIMUM_STACK_SIZE,
281 RTEMS_DEFAULT_MODES,
283 RTEMS_DEFAULT_MODES,
282 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_RECV]
284 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_RECV]
283 );
285 );
284
286
285 if (status == RTEMS_SUCCESSFUL) // ACTN
287 if (status == RTEMS_SUCCESSFUL) // ACTN
286 {
288 {
287 status = rtems_task_create(
289 status = rtems_task_create(
288 Task_name[TASKID_ACTN], TASK_PRIORITY_ACTN, RTEMS_MINIMUM_STACK_SIZE,
290 Task_name[TASKID_ACTN], TASK_PRIORITY_ACTN, RTEMS_MINIMUM_STACK_SIZE,
289 RTEMS_DEFAULT_MODES,
291 RTEMS_DEFAULT_MODES,
290 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_ACTN]
292 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_ACTN]
291 );
293 );
292 }
294 }
293 if (status == RTEMS_SUCCESSFUL) // SPIQ
295 if (status == RTEMS_SUCCESSFUL) // SPIQ
294 {
296 {
295 status = rtems_task_create(
297 status = rtems_task_create(
296 Task_name[TASKID_SPIQ], TASK_PRIORITY_SPIQ, RTEMS_MINIMUM_STACK_SIZE,
298 Task_name[TASKID_SPIQ], TASK_PRIORITY_SPIQ, RTEMS_MINIMUM_STACK_SIZE,
297 RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT,
299 RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT,
298 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SPIQ]
300 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SPIQ]
299 );
301 );
300 }
302 }
301 if (status == RTEMS_SUCCESSFUL) // SMIQ
303 if (status == RTEMS_SUCCESSFUL) // SMIQ
302 {
304 {
303 status = rtems_task_create(
305 status = rtems_task_create(
304 Task_name[TASKID_SMIQ], TASK_PRIORITY_SMIQ, RTEMS_MINIMUM_STACK_SIZE,
306 Task_name[TASKID_SMIQ], TASK_PRIORITY_SMIQ, RTEMS_MINIMUM_STACK_SIZE,
305 RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT,
307 RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT,
306 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SMIQ]
308 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SMIQ]
307 );
309 );
308 }
310 }
309 if (status == RTEMS_SUCCESSFUL) // STAT
311 if (status == RTEMS_SUCCESSFUL) // STAT
310 {
312 {
311 status = rtems_task_create(
313 status = rtems_task_create(
312 Task_name[TASKID_STAT], TASK_PRIORITY_STAT, RTEMS_MINIMUM_STACK_SIZE,
314 Task_name[TASKID_STAT], TASK_PRIORITY_STAT, RTEMS_MINIMUM_STACK_SIZE,
313 RTEMS_DEFAULT_MODES,
315 RTEMS_DEFAULT_MODES,
314 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT]
316 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT]
315 );
317 );
316 }
318 }
317 if (status == RTEMS_SUCCESSFUL) // AVF0
319 if (status == RTEMS_SUCCESSFUL) // AVF0
318 {
320 {
319 status = rtems_task_create(
321 status = rtems_task_create(
320 Task_name[TASKID_AVF0], TASK_PRIORITY_AVF0, RTEMS_MINIMUM_STACK_SIZE,
322 Task_name[TASKID_AVF0], TASK_PRIORITY_AVF0, RTEMS_MINIMUM_STACK_SIZE,
321 RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT,
323 RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT,
322 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF0]
324 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF0]
323 );
325 );
324 }
326 }
325 if (status == RTEMS_SUCCESSFUL) // BPF0
327 if (status == RTEMS_SUCCESSFUL) // BPF0
326 {
328 {
327 status = rtems_task_create(
329 status = rtems_task_create(
328 Task_name[TASKID_BPF0], TASK_PRIORITY_BPF0, RTEMS_MINIMUM_STACK_SIZE,
330 Task_name[TASKID_BPF0], TASK_PRIORITY_BPF0, RTEMS_MINIMUM_STACK_SIZE,
329 RTEMS_DEFAULT_MODES,
331 RTEMS_DEFAULT_MODES,
330 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_BPF0]
332 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_BPF0]
331 );
333 );
332 }
334 }
333 if (status == RTEMS_SUCCESSFUL) // WFRM
335 if (status == RTEMS_SUCCESSFUL) // WFRM
334 {
336 {
335 status = rtems_task_create(
337 status = rtems_task_create(
336 Task_name[TASKID_WFRM], TASK_PRIORITY_WFRM, RTEMS_MINIMUM_STACK_SIZE,
338 Task_name[TASKID_WFRM], TASK_PRIORITY_WFRM, RTEMS_MINIMUM_STACK_SIZE,
337 RTEMS_DEFAULT_MODES,
339 RTEMS_DEFAULT_MODES,
338 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_WFRM]
340 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_WFRM]
339 );
341 );
340 }
342 }
341 if (status == RTEMS_SUCCESSFUL) // DUMB
343 if (status == RTEMS_SUCCESSFUL) // DUMB
342 {
344 {
343 status = rtems_task_create(
345 status = rtems_task_create(
344 Task_name[TASKID_DUMB], TASK_PRIORITY_DUMB, RTEMS_MINIMUM_STACK_SIZE,
346 Task_name[TASKID_DUMB], TASK_PRIORITY_DUMB, RTEMS_MINIMUM_STACK_SIZE,
345 RTEMS_DEFAULT_MODES,
347 RTEMS_DEFAULT_MODES,
346 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB]
348 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB]
347 );
349 );
348 }
350 }
349 if (status == RTEMS_SUCCESSFUL) // HOUS
351 if (status == RTEMS_SUCCESSFUL) // HOUS
350 {
352 {
351 status = rtems_task_create(
353 status = rtems_task_create(
352 Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE,
354 Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE,
353 RTEMS_DEFAULT_MODES,
355 RTEMS_DEFAULT_MODES,
354 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS]
356 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS]
355 );
357 );
356 }
358 }
357 if (status == RTEMS_SUCCESSFUL) // MATR
359 if (status == RTEMS_SUCCESSFUL) // MATR
358 {
360 {
359 status = rtems_task_create(
361 status = rtems_task_create(
360 Task_name[TASKID_MATR], TASK_PRIORITY_MATR, RTEMS_MINIMUM_STACK_SIZE,
362 Task_name[TASKID_MATR], TASK_PRIORITY_MATR, RTEMS_MINIMUM_STACK_SIZE,
361 RTEMS_DEFAULT_MODES,
363 RTEMS_DEFAULT_MODES,
362 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_MATR]
364 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_MATR]
363 );
365 );
364 }
366 }
365 if (status == RTEMS_SUCCESSFUL) // CWF3
367 if (status == RTEMS_SUCCESSFUL) // CWF3
366 {
368 {
367 status = rtems_task_create(
369 status = rtems_task_create(
368 Task_name[TASKID_CWF3], TASK_PRIORITY_CWF3, RTEMS_MINIMUM_STACK_SIZE,
370 Task_name[TASKID_CWF3], TASK_PRIORITY_CWF3, RTEMS_MINIMUM_STACK_SIZE,
369 RTEMS_DEFAULT_MODES,
371 RTEMS_DEFAULT_MODES,
370 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF3]
372 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF3]
371 );
373 );
372 }
374 }
373 if (status == RTEMS_SUCCESSFUL) // CWF2
375 if (status == RTEMS_SUCCESSFUL) // CWF2
374 {
376 {
375 status = rtems_task_create(
377 status = rtems_task_create(
376 Task_name[TASKID_CWF2], TASK_PRIORITY_CWF2, RTEMS_MINIMUM_STACK_SIZE,
378 Task_name[TASKID_CWF2], TASK_PRIORITY_CWF2, RTEMS_MINIMUM_STACK_SIZE,
377 RTEMS_DEFAULT_MODES,
379 RTEMS_DEFAULT_MODES,
378 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF2]
380 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF2]
379 );
381 );
380 }
382 }
381 if (status == RTEMS_SUCCESSFUL) // CWF1
383 if (status == RTEMS_SUCCESSFUL) // CWF1
382 {
384 {
383 status = rtems_task_create(
385 status = rtems_task_create(
384 Task_name[TASKID_CWF1], TASK_PRIORITY_CWF1, RTEMS_MINIMUM_STACK_SIZE,
386 Task_name[TASKID_CWF1], TASK_PRIORITY_CWF1, RTEMS_MINIMUM_STACK_SIZE,
385 RTEMS_DEFAULT_MODES,
387 RTEMS_DEFAULT_MODES,
386 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF1]
388 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF1]
387 );
389 );
388 }
390 }
389 if (status == RTEMS_SUCCESSFUL) // SEND
391 if (status == RTEMS_SUCCESSFUL) // SEND
390 {
392 {
391 status = rtems_task_create(
393 status = rtems_task_create(
392 Task_name[TASKID_SEND], TASK_PRIORITY_SEND, RTEMS_MINIMUM_STACK_SIZE,
394 Task_name[TASKID_SEND], TASK_PRIORITY_SEND, RTEMS_MINIMUM_STACK_SIZE,
393 RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT,
395 RTEMS_DEFAULT_MODES,
394 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SEND]
396 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SEND]
395 );
397 );
396 }
398 }
397 if (status == RTEMS_SUCCESSFUL) // WTDG
399 if (status == RTEMS_SUCCESSFUL) // WTDG
398 {
400 {
399 status = rtems_task_create(
401 status = rtems_task_create(
400 Task_name[TASKID_WTDG], TASK_PRIORITY_WTDG, RTEMS_MINIMUM_STACK_SIZE,
402 Task_name[TASKID_WTDG], TASK_PRIORITY_WTDG, RTEMS_MINIMUM_STACK_SIZE,
401 RTEMS_DEFAULT_MODES,
403 RTEMS_DEFAULT_MODES,
402 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_WTDG]
404 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_WTDG]
403 );
405 );
404 }
406 }
405
407
406 return status;
408 return status;
407 }
409 }
408
410
409 int start_recv_send_tasks( void )
411 int start_recv_send_tasks( void )
410 {
412 {
411 rtems_status_code status;
413 rtems_status_code status;
412
414
413 status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 );
415 status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 );
414 if (status!=RTEMS_SUCCESSFUL) {
416 if (status!=RTEMS_SUCCESSFUL) {
415 BOOT_PRINTF("in INIT *** Error starting TASK_RECV\n")
417 BOOT_PRINTF("in INIT *** Error starting TASK_RECV\n")
416 }
418 }
417
419
418 if (status == RTEMS_SUCCESSFUL) // SEND
420 if (status == RTEMS_SUCCESSFUL) // SEND
419 {
421 {
420 status = rtems_task_start( Task_id[TASKID_SEND], send_task, 1 );
422 status = rtems_task_start( Task_id[TASKID_SEND], send_task, 1 );
421 if (status!=RTEMS_SUCCESSFUL) {
423 if (status!=RTEMS_SUCCESSFUL) {
422 BOOT_PRINTF("in INIT *** Error starting TASK_SEND\n")
424 BOOT_PRINTF("in INIT *** Error starting TASK_SEND\n")
423 }
425 }
424 }
426 }
425
427
426 return status;
428 return status;
427 }
429 }
428
430
429 int start_all_tasks( void ) // start all tasks except SEND RECV and HOUS
431 int start_all_tasks( void ) // start all tasks except SEND RECV and HOUS
430 {
432 {
431 /** This function starts all RTEMS tasks used in the software.
433 /** This function starts all RTEMS tasks used in the software.
432 *
434 *
433 * @return RTEMS directive status codes:
435 * @return RTEMS directive status codes:
434 * - RTEMS_SUCCESSFUL - ask started successfully
436 * - RTEMS_SUCCESSFUL - ask started successfully
435 * - RTEMS_INVALID_ADDRESS - invalid task entry point
437 * - RTEMS_INVALID_ADDRESS - invalid task entry point
436 * - RTEMS_INVALID_ID - invalid task id
438 * - RTEMS_INVALID_ID - invalid task id
437 * - RTEMS_INCORRECT_STATE - task not in the dormant state
439 * - RTEMS_INCORRECT_STATE - task not in the dormant state
438 * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot start remote task
440 * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot start remote task
439 *
441 *
440 */
442 */
441 // starts all the tasks fot eh flight software
443 // starts all the tasks fot eh flight software
442
444
443 rtems_status_code status;
445 rtems_status_code status;
444
446
445 status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 );
447 status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 );
446 if (status!=RTEMS_SUCCESSFUL) {
448 if (status!=RTEMS_SUCCESSFUL) {
447 BOOT_PRINTF("in INIT *** Error starting TASK_SPIQ\n")
449 BOOT_PRINTF("in INIT *** Error starting TASK_SPIQ\n")
448 }
450 }
449
451
450 if (status == RTEMS_SUCCESSFUL) // WTDG
452 if (status == RTEMS_SUCCESSFUL) // WTDG
451 {
453 {
452 status = rtems_task_start( Task_id[TASKID_WTDG], wtdg_task, 1 );
454 status = rtems_task_start( Task_id[TASKID_WTDG], wtdg_task, 1 );
453 if (status!=RTEMS_SUCCESSFUL) {
455 if (status!=RTEMS_SUCCESSFUL) {
454 BOOT_PRINTF("in INIT *** Error starting TASK_WTDG\n")
456 BOOT_PRINTF("in INIT *** Error starting TASK_WTDG\n")
455 }
457 }
456 }
458 }
457
459
458 if (status == RTEMS_SUCCESSFUL) // SMIQ
460 if (status == RTEMS_SUCCESSFUL) // SMIQ
459 {
461 {
460 status = rtems_task_start( Task_id[TASKID_SMIQ], smiq_task, 1 );
462 status = rtems_task_start( Task_id[TASKID_SMIQ], smiq_task, 1 );
461 if (status!=RTEMS_SUCCESSFUL) {
463 if (status!=RTEMS_SUCCESSFUL) {
462 BOOT_PRINTF("in INIT *** Error starting TASK_BPPR\n")
464 BOOT_PRINTF("in INIT *** Error starting TASK_BPPR\n")
463 }
465 }
464 }
466 }
465
467
466 if (status == RTEMS_SUCCESSFUL) // ACTN
468 if (status == RTEMS_SUCCESSFUL) // ACTN
467 {
469 {
468 status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 );
470 status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 );
469 if (status!=RTEMS_SUCCESSFUL) {
471 if (status!=RTEMS_SUCCESSFUL) {
470 BOOT_PRINTF("in INIT *** Error starting TASK_ACTN\n")
472 BOOT_PRINTF("in INIT *** Error starting TASK_ACTN\n")
471 }
473 }
472 }
474 }
473
475
474 if (status == RTEMS_SUCCESSFUL) // STAT
476 if (status == RTEMS_SUCCESSFUL) // STAT
475 {
477 {
476 status = rtems_task_start( Task_id[TASKID_STAT], stat_task, 1 );
478 status = rtems_task_start( Task_id[TASKID_STAT], stat_task, 1 );
477 if (status!=RTEMS_SUCCESSFUL) {
479 if (status!=RTEMS_SUCCESSFUL) {
478 BOOT_PRINTF("in INIT *** Error starting TASK_STAT\n")
480 BOOT_PRINTF("in INIT *** Error starting TASK_STAT\n")
479 }
481 }
480 }
482 }
481
483
482 if (status == RTEMS_SUCCESSFUL) // AVF0
484 if (status == RTEMS_SUCCESSFUL) // AVF0
483 {
485 {
484 status = rtems_task_start( Task_id[TASKID_AVF0], avf0_task, 1 );
486 status = rtems_task_start( Task_id[TASKID_AVF0], avf0_task, 1 );
485 if (status!=RTEMS_SUCCESSFUL) {
487 if (status!=RTEMS_SUCCESSFUL) {
486 BOOT_PRINTF("in INIT *** Error starting TASK_AVF0\n")
488 BOOT_PRINTF("in INIT *** Error starting TASK_AVF0\n")
487 }
489 }
488 }
490 }
489
491
490 if (status == RTEMS_SUCCESSFUL) // BPF0
492 if (status == RTEMS_SUCCESSFUL) // BPF0
491 {
493 {
492 status = rtems_task_start( Task_id[TASKID_BPF0], bpf0_task, 1 );
494 status = rtems_task_start( Task_id[TASKID_BPF0], bpf0_task, 1 );
493 if (status!=RTEMS_SUCCESSFUL) {
495 if (status!=RTEMS_SUCCESSFUL) {
494 BOOT_PRINTF("in INIT *** Error starting TASK_BPF0\n")
496 BOOT_PRINTF("in INIT *** Error starting TASK_BPF0\n")
495 }
497 }
496 }
498 }
497
499
498 if (status == RTEMS_SUCCESSFUL) // WFRM
500 if (status == RTEMS_SUCCESSFUL) // WFRM
499 {
501 {
500 status = rtems_task_start( Task_id[TASKID_WFRM], wfrm_task, 1 );
502 status = rtems_task_start( Task_id[TASKID_WFRM], wfrm_task, 1 );
501 if (status!=RTEMS_SUCCESSFUL) {
503 if (status!=RTEMS_SUCCESSFUL) {
502 BOOT_PRINTF("in INIT *** Error starting TASK_WFRM\n")
504 BOOT_PRINTF("in INIT *** Error starting TASK_WFRM\n")
503 }
505 }
504 }
506 }
505
507
506 if (status == RTEMS_SUCCESSFUL) // DUMB
508 if (status == RTEMS_SUCCESSFUL) // DUMB
507 {
509 {
508 status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 );
510 status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 );
509 if (status!=RTEMS_SUCCESSFUL) {
511 if (status!=RTEMS_SUCCESSFUL) {
510 BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n")
512 BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n")
511 }
513 }
512 }
514 }
513
515
514 if (status == RTEMS_SUCCESSFUL) // HOUS
516 if (status == RTEMS_SUCCESSFUL) // HOUS
515 {
517 {
516 status = rtems_task_start( Task_id[TASKID_HOUS], hous_task, 1 );
518 status = rtems_task_start( Task_id[TASKID_HOUS], hous_task, 1 );
517 if (status!=RTEMS_SUCCESSFUL) {
519 if (status!=RTEMS_SUCCESSFUL) {
518 BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n")
520 BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n")
519 }
521 }
520 }
522 }
521
523
522 if (status == RTEMS_SUCCESSFUL) // MATR
524 if (status == RTEMS_SUCCESSFUL) // MATR
523 {
525 {
524 status = rtems_task_start( Task_id[TASKID_MATR], matr_task, 1 );
526 status = rtems_task_start( Task_id[TASKID_MATR], matr_task, 1 );
525 if (status!=RTEMS_SUCCESSFUL) {
527 if (status!=RTEMS_SUCCESSFUL) {
526 BOOT_PRINTF("in INIT *** Error starting TASK_MATR\n")
528 BOOT_PRINTF("in INIT *** Error starting TASK_MATR\n")
527 }
529 }
528 }
530 }
529
531
530 if (status == RTEMS_SUCCESSFUL) // CWF3
532 if (status == RTEMS_SUCCESSFUL) // CWF3
531 {
533 {
532 status = rtems_task_start( Task_id[TASKID_CWF3], cwf3_task, 1 );
534 status = rtems_task_start( Task_id[TASKID_CWF3], cwf3_task, 1 );
533 if (status!=RTEMS_SUCCESSFUL) {
535 if (status!=RTEMS_SUCCESSFUL) {
534 BOOT_PRINTF("in INIT *** Error starting TASK_CWF3\n")
536 BOOT_PRINTF("in INIT *** Error starting TASK_CWF3\n")
535 }
537 }
536 }
538 }
537
539
538 if (status == RTEMS_SUCCESSFUL) // CWF2
540 if (status == RTEMS_SUCCESSFUL) // CWF2
539 {
541 {
540 status = rtems_task_start( Task_id[TASKID_CWF2], cwf2_task, 1 );
542 status = rtems_task_start( Task_id[TASKID_CWF2], cwf2_task, 1 );
541 if (status!=RTEMS_SUCCESSFUL) {
543 if (status!=RTEMS_SUCCESSFUL) {
542 BOOT_PRINTF("in INIT *** Error starting TASK_CWF2\n")
544 BOOT_PRINTF("in INIT *** Error starting TASK_CWF2\n")
543 }
545 }
544 }
546 }
545
547
546 if (status == RTEMS_SUCCESSFUL) // CWF1
548 if (status == RTEMS_SUCCESSFUL) // CWF1
547 {
549 {
548 status = rtems_task_start( Task_id[TASKID_CWF1], cwf1_task, 1 );
550 status = rtems_task_start( Task_id[TASKID_CWF1], cwf1_task, 1 );
549 if (status!=RTEMS_SUCCESSFUL) {
551 if (status!=RTEMS_SUCCESSFUL) {
550 BOOT_PRINTF("in INIT *** Error starting TASK_CWF1\n")
552 BOOT_PRINTF("in INIT *** Error starting TASK_CWF1\n")
551 }
553 }
552 }
554 }
553 return status;
555 return status;
554 }
556 }
555
557
556 rtems_status_code create_message_queues( void ) // create the two message queues used in the software
558 rtems_status_code create_message_queues( void ) // create the two message queues used in the software
557 {
559 {
558 rtems_status_code status_recv;
560 rtems_status_code status_recv;
559 rtems_status_code status_send;
561 rtems_status_code status_send;
560 rtems_status_code ret;
562 rtems_status_code ret;
561 rtems_id queue_id;
563 rtems_id queue_id;
562
564
563 // create the queue for handling valid TCs
565 // create the queue for handling valid TCs
564 status_recv = rtems_message_queue_create( misc_name[QUEUE_RECV],
566 status_recv = rtems_message_queue_create( misc_name[QUEUE_RECV],
565 ACTION_MSG_QUEUE_COUNT, CCSDS_TC_PKT_MAX_SIZE,
567 ACTION_MSG_QUEUE_COUNT, CCSDS_TC_PKT_MAX_SIZE,
566 RTEMS_FIFO | RTEMS_LOCAL, &queue_id );
568 RTEMS_FIFO | RTEMS_LOCAL, &queue_id );
567 if ( status_recv != RTEMS_SUCCESSFUL ) {
569 if ( status_recv != RTEMS_SUCCESSFUL ) {
568 PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", status_recv)
570 PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", status_recv)
569 }
571 }
570
572
571 // create the queue for handling TM packet sending
573 // create the queue for handling TM packet sending
572 status_send = rtems_message_queue_create( misc_name[QUEUE_SEND],
574 status_send = rtems_message_queue_create( misc_name[QUEUE_SEND],
573 ACTION_MSG_PKTS_COUNT, ACTION_MSG_PKTS_MAX_SIZE,
575 ACTION_MSG_PKTS_COUNT, ACTION_MSG_PKTS_MAX_SIZE,
574 RTEMS_FIFO | RTEMS_LOCAL, &queue_id );
576 RTEMS_FIFO | RTEMS_LOCAL, &queue_id );
575 if ( status_send != RTEMS_SUCCESSFUL ) {
577 if ( status_send != RTEMS_SUCCESSFUL ) {
576 PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", status_send)
578 PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", status_send)
577 }
579 }
578
580
579 if ( status_recv != RTEMS_SUCCESSFUL )
581 if ( status_recv != RTEMS_SUCCESSFUL )
580 {
582 {
581 ret = status_recv;
583 ret = status_recv;
582 }
584 }
583 else
585 else
584 {
586 {
585 ret = status_send;
587 ret = status_send;
586 }
588 }
587
589
588 return ret;
590 return ret;
589 }
591 }
590
592
@@ -1,292 +1,295
1 /** General usage functions and RTEMS tasks.
1 /** General usage functions and RTEMS tasks.
2 *
2 *
3 * @file
3 * @file
4 * @author P. LEROY
4 * @author P. LEROY
5 *
5 *
6 */
6 */
7
7
8 #include "fsw_misc.h"
8 #include "fsw_misc.h"
9
9
10 char *DumbMessages[6] = {"in DUMB *** default", // RTEMS_EVENT_0
10 char *DumbMessages[7] = {"in DUMB *** default", // RTEMS_EVENT_0
11 "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1
11 "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1
12 "in DUMB *** waveforms_isr", // RTEMS_EVENT_2
12 "in DUMB *** waveforms_isr", // RTEMS_EVENT_2
13 "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3
13 "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3
14 "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4
14 "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4
15 "in DUMB *** waveforms_simulator_isr" // RTEMS_EVENT_5
15 "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5
16 "ERR HK" // RTEMS_EVENT_6
16 };
17 };
17
18
18 int configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider,
19 int configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider,
19 unsigned char interrupt_level, rtems_isr (*timer_isr)() )
20 unsigned char interrupt_level, rtems_isr (*timer_isr)() )
20 {
21 {
21 /** This function configures a GPTIMER timer instantiated in the VHDL design.
22 /** This function configures a GPTIMER timer instantiated in the VHDL design.
22 *
23 *
23 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
24 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
24 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
25 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
25 * @param clock_divider is the divider of the 1 MHz clock that will be configured.
26 * @param clock_divider is the divider of the 1 MHz clock that will be configured.
26 * @param interrupt_level is the interrupt level that the timer drives.
27 * @param interrupt_level is the interrupt level that the timer drives.
27 * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer.
28 * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer.
28 *
29 *
29 * @return
30 * @return
30 *
31 *
31 * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76
32 * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76
32 *
33 *
33 */
34 */
34
35
35 rtems_status_code status;
36 rtems_status_code status;
36 rtems_isr_entry old_isr_handler;
37 rtems_isr_entry old_isr_handler;
37
38
38 status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels
39 status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels
39 if (status!=RTEMS_SUCCESSFUL)
40 if (status!=RTEMS_SUCCESSFUL)
40 {
41 {
41 PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n")
42 PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n")
42 }
43 }
43
44
44 timer_set_clock_divider( gptimer_regs, timer, clock_divider);
45 timer_set_clock_divider( gptimer_regs, timer, clock_divider);
45
46
46 return 1;
47 return 1;
47 }
48 }
48
49
49 int timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer)
50 int timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer)
50 {
51 {
51 /** This function starts a GPTIMER timer.
52 /** This function starts a GPTIMER timer.
52 *
53 *
53 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
54 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
54 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
55 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
55 *
56 *
56 * @return 1
57 * @return 1
57 *
58 *
58 */
59 */
59
60
60 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any
61 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any
61 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register
62 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register
62 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer
63 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer
63 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart
64 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart
64 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable
65 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable
65
66
66 return 1;
67 return 1;
67 }
68 }
68
69
69 int timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer)
70 int timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer)
70 {
71 {
71 /** This function stops a GPTIMER timer.
72 /** This function stops a GPTIMER timer.
72 *
73 *
73 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
74 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
74 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
75 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
75 *
76 *
76 * @return 1
77 * @return 1
77 *
78 *
78 */
79 */
79
80
80 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer
81 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer
81 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable
82 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable
82 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any
83 gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any
83
84
84 return 1;
85 return 1;
85 }
86 }
86
87
87 int timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider)
88 int timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider)
88 {
89 {
89 /** This function sets the clock divider of a GPTIMER timer.
90 /** This function sets the clock divider of a GPTIMER timer.
90 *
91 *
91 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
92 * @param gptimer_regs points to the APB registers of the GPTIMER IP core.
92 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
93 * @param timer is the number of the timer in the IP core (several timers can be instantiated).
93 * @param clock_divider is the divider of the 1 MHz clock that will be configured.
94 * @param clock_divider is the divider of the 1 MHz clock that will be configured.
94 *
95 *
95 * @return 1
96 * @return 1
96 *
97 *
97 */
98 */
98
99
99 gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz
100 gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz
100
101
101 return 1;
102 return 1;
102 }
103 }
103
104
104 int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port
105 int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port
105 {
106 {
106 struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART;
107 struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART;
107
108
108 apbuart_regs->ctrl = apbuart_regs->ctrl & APBUART_CTRL_REG_MASK_DB;
109 apbuart_regs->ctrl = apbuart_regs->ctrl & APBUART_CTRL_REG_MASK_DB;
109 PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n")
110 PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n")
110
111
111 return 0;
112 return 0;
112 }
113 }
113
114
114 void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value)
115 void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value)
115 {
116 {
116 /** This function sets the scaler reload register of the apbuart module
117 /** This function sets the scaler reload register of the apbuart module
117 *
118 *
118 * @param regs is the address of the apbuart registers in memory
119 * @param regs is the address of the apbuart registers in memory
119 * @param value is the value that will be stored in the scaler register
120 * @param value is the value that will be stored in the scaler register
120 *
121 *
121 * The value shall be set by the software to get data on the serial interface.
122 * The value shall be set by the software to get data on the serial interface.
122 *
123 *
123 */
124 */
124
125
125 struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs;
126 struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs;
126
127
127 apbuart_regs->scaler = value;
128 apbuart_regs->scaler = value;
128 BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value)
129 BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value)
129 }
130 }
130
131
131 //************
132 //************
132 // RTEMS TASKS
133 // RTEMS TASKS
133
134
134 rtems_task stat_task(rtems_task_argument argument)
135 rtems_task stat_task(rtems_task_argument argument)
135 {
136 {
136 int i;
137 int i;
137 int j;
138 int j;
138 i = 0;
139 i = 0;
139 j = 0;
140 j = 0;
140 BOOT_PRINTF("in STAT *** \n")
141 BOOT_PRINTF("in STAT *** \n")
141 while(1){
142 while(1){
142 rtems_task_wake_after(1000);
143 rtems_task_wake_after(1000);
143 PRINTF1("%d\n", j)
144 PRINTF1("%d\n", j)
144 if (i == CPU_USAGE_REPORT_PERIOD) {
145 if (i == CPU_USAGE_REPORT_PERIOD) {
145 // #ifdef PRINT_TASK_STATISTICS
146 // #ifdef PRINT_TASK_STATISTICS
146 // rtems_cpu_usage_report();
147 // rtems_cpu_usage_report();
147 // rtems_cpu_usage_reset();
148 // rtems_cpu_usage_reset();
148 // #endif
149 // #endif
149 i = 0;
150 i = 0;
150 }
151 }
151 else i++;
152 else i++;
152 j++;
153 j++;
153 }
154 }
154 }
155 }
155
156
156 rtems_task hous_task(rtems_task_argument argument)
157 rtems_task hous_task(rtems_task_argument argument)
157 {
158 {
158 rtems_status_code status;
159 rtems_status_code status;
159 rtems_id queue_id;
160 rtems_id queue_id;
160
161
161 status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id );
162 status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id );
162 if (status != RTEMS_SUCCESSFUL)
163 if (status != RTEMS_SUCCESSFUL)
163 {
164 {
164 PRINTF1("in HOUS *** ERR %d\n", status)
165 PRINTF1("in HOUS *** ERR %d\n", status)
165 }
166 }
166
167
167 BOOT_PRINTF("in HOUS ***\n")
168 BOOT_PRINTF("in HOUS ***\n")
168
169
169 if (rtems_rate_monotonic_ident( name_hk_rate_monotonic, &HK_id) != RTEMS_SUCCESSFUL) {
170 if (rtems_rate_monotonic_ident( name_hk_rate_monotonic, &HK_id) != RTEMS_SUCCESSFUL) {
170 status = rtems_rate_monotonic_create( name_hk_rate_monotonic, &HK_id );
171 status = rtems_rate_monotonic_create( name_hk_rate_monotonic, &HK_id );
171 if( status != RTEMS_SUCCESSFUL ) {
172 if( status != RTEMS_SUCCESSFUL ) {
172 PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status )
173 PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status )
173 }
174 }
174 }
175 }
175
176
176 housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID;
177 housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID;
177 housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID;
178 housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID;
178 housekeeping_packet.reserved = DEFAULT_RESERVED;
179 housekeeping_packet.reserved = DEFAULT_RESERVED;
179 housekeeping_packet.userApplication = CCSDS_USER_APP;
180 housekeeping_packet.userApplication = CCSDS_USER_APP;
180 housekeeping_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_HK >> 8);
181 housekeeping_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_HK >> 8);
181 housekeeping_packet.packetID[1] = (unsigned char) (TM_PACKET_ID_HK);
182 housekeeping_packet.packetID[1] = (unsigned char) (TM_PACKET_ID_HK);
182 housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE;
183 housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE;
183 housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
184 housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
184 housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8);
185 housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8);
185 housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK );
186 housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK );
186 housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
187 housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
187 housekeeping_packet.serviceType = TM_TYPE_HK;
188 housekeeping_packet.serviceType = TM_TYPE_HK;
188 housekeeping_packet.serviceSubType = TM_SUBTYPE_HK;
189 housekeeping_packet.serviceSubType = TM_SUBTYPE_HK;
189 housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND;
190 housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND;
190
191
191 status = rtems_rate_monotonic_cancel(HK_id);
192 status = rtems_rate_monotonic_cancel(HK_id);
192 if( status != RTEMS_SUCCESSFUL ) {
193 if( status != RTEMS_SUCCESSFUL ) {
193 PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status )
194 PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status )
194 }
195 }
195 else {
196 else {
196 DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n")
197 DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n")
197 }
198 }
198
199
199 while(1){ // launch the rate monotonic task
200 while(1){ // launch the rate monotonic task
200 status = rtems_rate_monotonic_period( HK_id, HK_PERIOD );
201 status = rtems_rate_monotonic_period( HK_id, HK_PERIOD );
201 if ( status != RTEMS_SUCCESSFUL ) {
202 if ( status != RTEMS_SUCCESSFUL ) {
202 PRINTF1( "in HOUS *** ERR period: %d\n", status);
203 PRINTF1( "in HOUS *** ERR period: %d\n", status);
204 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_6 );
203 }
205 }
204 else {
206 else {
205 housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
207 housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
206 housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
208 housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
207 housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
209 housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
208 housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time);
210 housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time);
209 housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
211 housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
210 housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time);
212 housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time);
211 housekeeping_packet.sid = SID_HK;
213 housekeeping_packet.sid = SID_HK;
212
214
213 spacewire_update_statistics();
215 spacewire_update_statistics();
214
216
215 // SEND PACKET
217 // SEND PACKET
216 status = rtems_message_queue_send( queue_id, &housekeeping_packet,
218 status = rtems_message_queue_urgent( queue_id, &housekeeping_packet,
217 PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES);
219 PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES);
218 if (status != RTEMS_SUCCESSFUL) {
220 if (status != RTEMS_SUCCESSFUL) {
219 PRINTF1("in HOUS *** ERR send: %d\n", status)
221 PRINTF1("in HOUS *** ERR send: %d\n", status)
220 }
222 }
221 }
223 }
222 }
224 }
223
225
224 PRINTF("in HOUS *** deleting task\n")
226 PRINTF("in HOUS *** deleting task\n")
225
227
226 status = rtems_task_delete( RTEMS_SELF ); // should not return
228 status = rtems_task_delete( RTEMS_SELF ); // should not return
227 printf( "rtems_task_delete returned with status of %d.\n", status );
229 printf( "rtems_task_delete returned with status of %d.\n", status );
228 return;
230 return;
229 }
231 }
230
232
231 rtems_task dumb_task( rtems_task_argument unused )
233 rtems_task dumb_task( rtems_task_argument unused )
232 {
234 {
233 /** This RTEMS taks is used to print messages without affecting the general behaviour of the software.
235 /** This RTEMS taks is used to print messages without affecting the general behaviour of the software.
234 *
236 *
235 * @param unused is the starting argument of the RTEMS task
237 * @param unused is the starting argument of the RTEMS task
236 *
238 *
237 * The DUMB taks waits for RTEMS events and print messages depending on the incoming events.
239 * The DUMB taks waits for RTEMS events and print messages depending on the incoming events.
238 *
240 *
239 */
241 */
240
242
241 unsigned int i;
243 unsigned int i;
242 unsigned int intEventOut;
244 unsigned int intEventOut;
243 unsigned int coarse_time = 0;
245 unsigned int coarse_time = 0;
244 unsigned int fine_time = 0;
246 unsigned int fine_time = 0;
245 rtems_event_set event_out;
247 rtems_event_set event_out;
246
248
247 BOOT_PRINTF("in DUMB *** \n")
249 BOOT_PRINTF("in DUMB *** \n")
248
250
249 while(1){
251 while(1){
250 rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 | RTEMS_EVENT_4 | RTEMS_EVENT_5,
252 rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3
253 | RTEMS_EVENT_4 | RTEMS_EVENT_5 | RTEMS_EVENT_6,
251 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT
254 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT
252 intEventOut = (unsigned int) event_out;
255 intEventOut = (unsigned int) event_out;
253 for ( i=0; i<32; i++)
256 for ( i=0; i<32; i++)
254 {
257 {
255 if ( ((intEventOut >> i) & 0x0001) != 0)
258 if ( ((intEventOut >> i) & 0x0001) != 0)
256 {
259 {
257 coarse_time = time_management_regs->coarse_time;
260 coarse_time = time_management_regs->coarse_time;
258 fine_time = time_management_regs->fine_time;
261 fine_time = time_management_regs->fine_time;
259 printf("in DUMB *** time = coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]);
262 printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]);
260 }
263 }
261 }
264 }
262 }
265 }
263 }
266 }
264
267
265 //*****************************
268 //*****************************
266 // init housekeeping parameters
269 // init housekeeping parameters
267
270
268 void init_housekeeping_parameters( void )
271 void init_housekeeping_parameters( void )
269 {
272 {
270 /** This function initialize the housekeeping_packet global variable with default values.
273 /** This function initialize the housekeeping_packet global variable with default values.
271 *
274 *
272 */
275 */
273
276
274 unsigned int i = 0;
277 unsigned int i = 0;
275 char *parameters;
278 char *parameters;
276
279
277 parameters = (char*) &housekeeping_packet.lfr_status_word;
280 parameters = (char*) &housekeeping_packet.lfr_status_word;
278 for(i = 0; i< SIZE_HK_PARAMETERS; i++)
281 for(i = 0; i< SIZE_HK_PARAMETERS; i++)
279 {
282 {
280 parameters[i] = 0x00;
283 parameters[i] = 0x00;
281 }
284 }
282 // init status word
285 // init status word
283 housekeeping_packet.lfr_status_word[0] = DEFAULT_STATUS_WORD_BYTE0;
286 housekeeping_packet.lfr_status_word[0] = DEFAULT_STATUS_WORD_BYTE0;
284 housekeeping_packet.lfr_status_word[1] = DEFAULT_STATUS_WORD_BYTE1;
287 housekeeping_packet.lfr_status_word[1] = DEFAULT_STATUS_WORD_BYTE1;
285 // init software version
288 // init software version
286 housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1;
289 housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1;
287 housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2;
290 housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2;
288 housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3;
291 housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3;
289 housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4;
292 housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4;
290
293
291 }
294 }
292
295
@@ -1,1191 +1,1172
1 /** Functions and tasks related to waveform packet generation.
1 /** Functions and tasks related to waveform packet generation.
2 *
2 *
3 * @file
3 * @file
4 * @author P. LEROY
4 * @author P. LEROY
5 *
5 *
6 * A group of functions to handle waveforms, in snapshot or continuous format.\n
6 * A group of functions to handle waveforms, in snapshot or continuous format.\n
7 *
7 *
8 */
8 */
9
9
10 #include "wf_handler.h"
10 #include "wf_handler.h"
11
11
12 // SWF
12 // SWF
13 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F0[7];
13 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F0[7];
14 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F1[7];
14 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F1[7];
15 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F2[7];
15 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F2[7];
16 // CWF
16 // CWF
17 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[7];
17 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[7];
18 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[7];
18 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[7];
19 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[7];
19 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[7];
20 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[7];
20 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[7];
21 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[7];
21 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[7];
22
22
23 unsigned char doubleSendCWF1 = 0;
23 unsigned char doubleSendCWF1 = 0;
24 unsigned char doubleSendCWF2 = 0;
24 unsigned char doubleSendCWF2 = 0;
25
25
26 rtems_isr waveforms_isr( rtems_vector_number vector )
26 rtems_isr waveforms_isr( rtems_vector_number vector )
27 {
27 {
28 /** This is the interrupt sub routine called by the waveform picker core.
28 /** This is the interrupt sub routine called by the waveform picker core.
29 *
29 *
30 * This ISR launch different actions depending mainly on two pieces of information:
30 * This ISR launch different actions depending mainly on two pieces of information:
31 * 1. the values read in the registers of the waveform picker.
31 * 1. the values read in the registers of the waveform picker.
32 * 2. the current LFR mode.
32 * 2. the current LFR mode.
33 *
33 *
34 */
34 */
35
35
36 #ifdef GSA
36 #ifdef GSA
37 #else
37 #else
38 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
38 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
39 || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) )
39 || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) )
40 { // in modes other than STANDBY and BURST, send the CWF_F3 data
40 { // in modes other than STANDBY and BURST, send the CWF_F3 data
41 if ((waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full
41 if ((waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full
42 // (1) change the receiving buffer for the waveform picker
42 // (1) change the receiving buffer for the waveform picker
43 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
43 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
44 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis);
44 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis);
45 }
45 }
46 else {
46 else {
47 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3);
47 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3);
48 }
48 }
49 // (2) send an event for the waveforms transmission
49 // (2) send an event for the waveforms transmission
50 if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) {
50 if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) {
51 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
51 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
52 }
52 }
53 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111]
53 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111]
54 }
54 }
55 }
55 }
56 #endif
56 #endif
57
57
58 switch(lfrCurrentMode)
58 switch(lfrCurrentMode)
59 {
59 {
60 //********
60 //********
61 // STANDBY
61 // STANDBY
62 case(LFR_MODE_STANDBY):
62 case(LFR_MODE_STANDBY):
63 break;
63 break;
64
64
65 //******
65 //******
66 // NORMAL
66 // NORMAL
67 case(LFR_MODE_NORMAL):
67 case(LFR_MODE_NORMAL):
68 #ifdef GSA
68 #ifdef GSA
69 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
69 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
70 #else
70 #else
71 if ( (waveform_picker_regs->burst_enable & 0x7) == 0x0 ){ // if no channel is enable
71 if ( (waveform_picker_regs->burst_enable & 0x7) == 0x0 ){ // if no channel is enable
72 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
72 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
73 }
73 }
74 else {
74 else {
75 if ( (waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full
75 if ( (waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full
76 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable & 0x08;
76 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable & 0x08;
77 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
77 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
78 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
78 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
79 }
79 }
80 // waveform_picker_regs->status = waveform_picker_regs->status & 0x00;
80 // waveform_picker_regs->status = waveform_picker_regs->status & 0x00;
81 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888;
81 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888;
82 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x07; // [0111] enable f2 f1 f0
82 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x07; // [0111] enable f2 f1 f0
83 }
83 }
84 }
84 }
85 #endif
85 #endif
86 break;
86 break;
87
87
88 //******
88 //******
89 // BURST
89 // BURST
90 case(LFR_MODE_BURST):
90 case(LFR_MODE_BURST):
91 #ifdef GSA
91 #ifdef GSA
92 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
92 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
93 #else
93 #else
94 if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
94 if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
95 // (1) change the receiving buffer for the waveform picker
95 // (1) change the receiving buffer for the waveform picker
96 if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
96 if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
97 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
97 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
98 }
98 }
99 else {
99 else {
100 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
100 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
101 }
101 }
102 // (2) send an event for the waveforms transmission
102 // (2) send an event for the waveforms transmission
103 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) {
103 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) {
104 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
104 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
105 }
105 }
106 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0
106 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0
107 }
107 }
108 #endif
108 #endif
109 break;
109 break;
110
110
111 //*****
111 //*****
112 // SBM1
112 // SBM1
113 case(LFR_MODE_SBM1):
113 case(LFR_MODE_SBM1):
114 #ifdef GSA
114 #ifdef GSA
115 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
115 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
116 #else
116 #else
117 if ((waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit
117 if ((waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit
118 // (1) change the receiving buffer for the waveform picker
118 // (1) change the receiving buffer for the waveform picker
119 if ( param_local.local_sbm1_nb_cwf_sent == (param_local.local_sbm1_nb_cwf_max-1) )
119 if ( param_local.local_sbm1_nb_cwf_sent == (param_local.local_sbm1_nb_cwf_max-1) )
120 {
120 {
121 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm);
121 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm);
122 }
122 }
123 else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm )
123 else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm )
124 {
124 {
125 doubleSendCWF1 = 1;
125 doubleSendCWF1 = 1;
126 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
126 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
127 }
127 }
128 else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) {
128 else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) {
129 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis);
129 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis);
130 }
130 }
131 else {
131 else {
132 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
132 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
133 }
133 }
134 // (2) send an event for the waveforms transmission
134 // (2) send an event for the waveforms transmission
135 if (rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 ) != RTEMS_SUCCESSFUL) {
135 if (rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 ) != RTEMS_SUCCESSFUL) {
136 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
136 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
137 }
137 }
138 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0
138 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0
139 }
139 }
140 if ( ( (waveform_picker_regs->status & 0x05) == 0x05 ) ) { // [0101] check the f2 and f0 full bit
140 if ( ( (waveform_picker_regs->status & 0x05) == 0x05 ) ) { // [0101] check the f2 and f0 full bit
141 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
141 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
142 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
142 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
143 }
143 }
144 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0
144 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0
145 reset_local_sbm1_nb_cwf_sent();
145 reset_local_sbm1_nb_cwf_sent();
146 }
146 }
147
147
148 #endif
148 #endif
149 break;
149 break;
150
150
151 //*****
151 //*****
152 // SBM2
152 // SBM2
153 case(LFR_MODE_SBM2):
153 case(LFR_MODE_SBM2):
154 #ifdef GSA
154 #ifdef GSA
155 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
155 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
156 #else
156 #else
157 if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
157 if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
158 // (1) change the receiving buffer for the waveform picker
158 // (1) change the receiving buffer for the waveform picker
159 if ( param_local.local_sbm2_nb_cwf_sent == (param_local.local_sbm2_nb_cwf_max-1) )
159 if ( param_local.local_sbm2_nb_cwf_sent == (param_local.local_sbm2_nb_cwf_max-1) )
160 {
160 {
161 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm);
161 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm);
162 }
162 }
163 else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) {
163 else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) {
164 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
164 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
165 doubleSendCWF2 = 1;
165 doubleSendCWF2 = 1;
166 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2_WFRM ) != RTEMS_SUCCESSFUL) {
166 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2_WFRM ) != RTEMS_SUCCESSFUL) {
167 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
167 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
168 }
168 }
169 reset_local_sbm2_nb_cwf_sent();
169 reset_local_sbm2_nb_cwf_sent();
170 }
170 }
171 else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) {
171 else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) {
172 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
172 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
173 }
173 }
174 else {
174 else {
175 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
175 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
176 }
176 }
177 // (2) send an event for the waveforms transmission
177 // (2) send an event for the waveforms transmission
178 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
178 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
179 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
179 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
180 }
180 }
181 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
181 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
182 }
182 }
183 if ( ( (waveform_picker_regs->status & 0x03) == 0x03 ) ) { // [0011] f3 f2 f1 f0, f1 and f0 are full
183 if ( ( (waveform_picker_regs->status & 0x03) == 0x03 ) ) { // [0011] f3 f2 f1 f0, f1 and f0 are full
184 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
184 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
185 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
185 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
186 }
186 }
187 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
187 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
188 }
188 }
189 #endif
189 #endif
190 break;
190 break;
191
191
192 //********
192 //********
193 // DEFAULT
193 // DEFAULT
194 default:
194 default:
195 break;
195 break;
196 }
196 }
197 }
197 }
198
198
199 rtems_isr waveforms_simulator_isr( rtems_vector_number vector )
199 rtems_isr waveforms_simulator_isr( rtems_vector_number vector )
200 {
200 {
201 /** This is the interrupt sub routine called by the waveform picker simulator.
201 /** This is the interrupt sub routine called by the waveform picker simulator.
202 *
202 *
203 * This ISR is for debug purpose only.
203 * This ISR is for debug purpose only.
204 *
204 *
205 */
205 */
206
206
207 unsigned char lfrMode;
207 unsigned char lfrMode;
208 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
208 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
209
209
210 switch(lfrMode) {
210 switch(lfrMode) {
211 case (LFR_MODE_STANDBY):
211 case (LFR_MODE_STANDBY):
212 break;
212 break;
213 case (LFR_MODE_NORMAL):
213 case (LFR_MODE_NORMAL):
214 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
214 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
215 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_5 );
215 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_5 );
216 }
216 }
217 break;
217 break;
218 case (LFR_MODE_BURST):
218 case (LFR_MODE_BURST):
219 break;
219 break;
220 case (LFR_MODE_SBM1):
220 case (LFR_MODE_SBM1):
221 break;
221 break;
222 case (LFR_MODE_SBM2):
222 case (LFR_MODE_SBM2):
223 break;
223 break;
224 }
224 }
225 }
225 }
226
226
227 rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
227 rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
228 {
228 {
229 /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode.
229 /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode.
230 *
230 *
231 * @param unused is the starting argument of the RTEMS task
231 * @param unused is the starting argument of the RTEMS task
232 *
232 *
233 * The following data packets are sent by this task:
233 * The following data packets are sent by this task:
234 * - TM_LFR_SCIENCE_NORMAL_SWF_F0
234 * - TM_LFR_SCIENCE_NORMAL_SWF_F0
235 * - TM_LFR_SCIENCE_NORMAL_SWF_F1
235 * - TM_LFR_SCIENCE_NORMAL_SWF_F1
236 * - TM_LFR_SCIENCE_NORMAL_SWF_F2
236 * - TM_LFR_SCIENCE_NORMAL_SWF_F2
237 *
237 *
238 */
238 */
239
239
240 rtems_event_set event_out;
240 rtems_event_set event_out;
241 rtems_id queue_id;
241 rtems_id queue_id;
242
242
243 init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 );
243 init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 );
244 init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 );
244 init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 );
245 init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 );
245 init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 );
246
246
247 init_waveforms();
247 init_waveforms();
248
248
249 queue_id = get_pkts_queue_id();
249 queue_id = get_pkts_queue_id();
250
250
251 BOOT_PRINTF("in WFRM ***\n")
251 BOOT_PRINTF("in WFRM ***\n")
252
252
253 while(1){
253 while(1){
254 // wait for an RTEMS_EVENT
254 // wait for an RTEMS_EVENT
255 rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1
255 rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1
256 | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM,
256 | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM,
257 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
257 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
258
258
259 if (event_out == RTEMS_EVENT_MODE_NORMAL)
259 if (event_out == RTEMS_EVENT_MODE_NORMAL)
260 {
260 {
261 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
261 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
262 send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
262 send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
263 send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
263 send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
264 #ifdef GSA
264 #ifdef GSA
265 waveform_picker_regs->status = waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0
265 waveform_picker_regs->status = waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0
266 #endif
266 #endif
267 }
267 }
268 else if (event_out == RTEMS_EVENT_MODE_SBM1)
268 else if (event_out == RTEMS_EVENT_MODE_SBM1)
269 {
269 {
270 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
270 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
271 send_waveform_SWF(wf_snap_f1_norm, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
271 send_waveform_SWF(wf_snap_f1_norm, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
272 send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
272 send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
273 #ifdef GSA
273 #ifdef GSA
274 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0
274 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0
275 #endif
275 #endif
276 }
276 }
277 else if (event_out == RTEMS_EVENT_MODE_SBM2)
277 else if (event_out == RTEMS_EVENT_MODE_SBM2)
278 {
278 {
279 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
279 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
280 send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
280 send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
281 #ifdef GSA
281 #ifdef GSA
282 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
282 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
283 #endif
283 #endif
284 }
284 }
285 else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM)
285 else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM)
286 {
286 {
287 send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
287 send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
288 }
288 }
289 else
289 else
290 {
290 {
291 PRINTF("in WFRM *** unexpected event")
291 PRINTF("in WFRM *** unexpected event")
292 }
292 }
293
293
294
294
295 #ifdef GSA
295 #ifdef GSA
296 // irq processed, reset the related register of the timer unit
296 // irq processed, reset the related register of the timer unit
297 gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl = gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl | 0x00000010;
297 gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl = gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl | 0x00000010;
298 // clear the interruption
298 // clear the interruption
299 LEON_Unmask_interrupt( IRQ_WF );
299 LEON_Unmask_interrupt( IRQ_WF );
300 #endif
300 #endif
301 }
301 }
302 }
302 }
303
303
304 rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
304 rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
305 {
305 {
306 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3.
306 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3.
307 *
307 *
308 * @param unused is the starting argument of the RTEMS task
308 * @param unused is the starting argument of the RTEMS task
309 *
309 *
310 * The following data packet is sent by this task:
310 * The following data packet is sent by this task:
311 * - TM_LFR_SCIENCE_NORMAL_CWF_F3
311 * - TM_LFR_SCIENCE_NORMAL_CWF_F3
312 *
312 *
313 */
313 */
314
314
315 rtems_event_set event_out;
315 rtems_event_set event_out;
316 rtems_id queue_id;
316 rtems_id queue_id;
317
317
318 init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 );
318 init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 );
319 init_header_continuous_wf3_light_table( headerCWF_F3_light );
319 init_header_continuous_wf3_light_table( headerCWF_F3_light );
320
320
321 queue_id = get_pkts_queue_id();
321 queue_id = get_pkts_queue_id();
322
322
323 BOOT_PRINTF("in CWF3 ***\n")
323 BOOT_PRINTF("in CWF3 ***\n")
324
324
325 while(1){
325 while(1){
326 // wait for an RTEMS_EVENT
326 // wait for an RTEMS_EVENT
327 rtems_event_receive( RTEMS_EVENT_0,
327 rtems_event_receive( RTEMS_EVENT_0,
328 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
328 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
329 PRINTF("send CWF F3 \n")
329 PRINTF("send CWF F3 \n")
330 #ifdef GSA
330 #ifdef GSA
331 #else
331 #else
332 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
332 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
333 send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id );
333 send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id );
334 }
334 }
335 else {
335 else {
336 send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id );
336 send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id );
337 }
337 }
338 #endif
338 #endif
339 }
339 }
340 }
340 }
341
341
342 rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2
342 rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2
343 {
343 {
344 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2.
344 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2.
345 *
345 *
346 * @param unused is the starting argument of the RTEMS task
346 * @param unused is the starting argument of the RTEMS task
347 *
347 *
348 * The following data packet is sent by this function:
348 * The following data packet is sent by this function:
349 * - TM_LFR_SCIENCE_BURST_CWF_F2
349 * - TM_LFR_SCIENCE_BURST_CWF_F2
350 * - TM_LFR_SCIENCE_SBM2_CWF_F2
350 * - TM_LFR_SCIENCE_SBM2_CWF_F2
351 *
351 *
352 */
352 */
353
353
354 rtems_event_set event_out;
354 rtems_event_set event_out;
355 rtems_id queue_id;
355 rtems_id queue_id;
356
356
357 init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST );
357 init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST );
358 init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 );
358 init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 );
359
359
360 queue_id = get_pkts_queue_id();
360 queue_id = get_pkts_queue_id();
361
361
362 BOOT_PRINTF("in CWF2 ***\n")
362 BOOT_PRINTF("in CWF2 ***\n")
363
363
364 while(1){
364 while(1){
365 // wait for an RTEMS_EVENT
365 // wait for an RTEMS_EVENT
366 rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2,
366 rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2,
367 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
367 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
368
368
369 if (event_out == RTEMS_EVENT_MODE_BURST)
369 if (event_out == RTEMS_EVENT_MODE_BURST)
370 {
370 {
371 // F2
371 // F2
372 #ifdef GSA
372 #ifdef GSA
373 #else
373 #else
374 if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
374 if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
375 send_waveform_CWF( wf_snap_f2_bis, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
375 send_waveform_CWF( wf_snap_f2_bis, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
376 }
376 }
377 else {
377 else {
378 send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
378 send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
379 }
379 }
380 #endif
380 #endif
381 }
381 }
382
382
383 else if (event_out == RTEMS_EVENT_MODE_SBM2)
383 else if (event_out == RTEMS_EVENT_MODE_SBM2)
384 {
384 {
385 #ifdef GSA
385 #ifdef GSA
386 #else
386 #else
387 if (doubleSendCWF2 == 1)
387 if (doubleSendCWF2 == 1)
388 {
388 {
389 doubleSendCWF2 = 0;
389 doubleSendCWF2 = 0;
390 send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
390 send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
391 }
391 }
392 else if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
392 else if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
393 send_waveform_CWF( wf_snap_f2_bis, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
393 send_waveform_CWF( wf_snap_f2_bis, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
394 }
394 }
395 else {
395 else {
396 send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
396 send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
397 }
397 }
398 param_local.local_sbm2_nb_cwf_sent ++;
398 param_local.local_sbm2_nb_cwf_sent ++;
399 #endif
399 #endif
400 }
400 }
401 else
401 else
402 {
402 {
403 PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode)
403 PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode)
404 }
404 }
405 }
405 }
406 }
406 }
407
407
408 rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1
408 rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1
409 {
409 {
410 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1.
410 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1.
411 *
411 *
412 * @param unused is the starting argument of the RTEMS task
412 * @param unused is the starting argument of the RTEMS task
413 *
413 *
414 * The following data packet is sent by this function:
414 * The following data packet is sent by this function:
415 * - TM_LFR_SCIENCE_SBM1_CWF_F1
415 * - TM_LFR_SCIENCE_SBM1_CWF_F1
416 *
416 *
417 */
417 */
418
418
419 rtems_event_set event_out;
419 rtems_event_set event_out;
420 rtems_id queue_id;
420 rtems_id queue_id;
421
421
422 init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 );
422 init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 );
423
423
424 queue_id = get_pkts_queue_id();
424 queue_id = get_pkts_queue_id();
425
425
426 BOOT_PRINTF("in CWF1 ***\n")
426 BOOT_PRINTF("in CWF1 ***\n")
427
427
428 while(1){
428 while(1){
429 // wait for an RTEMS_EVENT
429 // wait for an RTEMS_EVENT
430 rtems_event_receive( RTEMS_EVENT_MODE_SBM1,
430 rtems_event_receive( RTEMS_EVENT_MODE_SBM1,
431 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
431 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
432 if (event_out == RTEMS_EVENT_MODE_SBM1)
432 if (event_out == RTEMS_EVENT_MODE_SBM1)
433 {
433 {
434 #ifdef GSA
434 #ifdef GSA
435 #else
435 #else
436 if (doubleSendCWF1 == 1)
436 if (doubleSendCWF1 == 1)
437 {
437 {
438 doubleSendCWF1 = 0;
438 doubleSendCWF1 = 0;
439 send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
439 send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
440 }
440 }
441 else if (waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1) {
441 else if (waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1) {
442 send_waveform_CWF( wf_snap_f1_bis, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
442 send_waveform_CWF( wf_snap_f1_bis, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
443 }
443 }
444 else {
444 else {
445 send_waveform_CWF( wf_snap_f1, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
445 send_waveform_CWF( wf_snap_f1, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
446 }
446 }
447 param_local.local_sbm1_nb_cwf_sent ++;
447 param_local.local_sbm1_nb_cwf_sent ++;
448 #endif
448 #endif
449 }
449 }
450 else
450 else
451 {
451 {
452 PRINTF1("in CWF1 *** ERR mode = %d\n", lfrCurrentMode)
452 PRINTF1("in CWF1 *** ERR mode = %d\n", lfrCurrentMode)
453 }
453 }
454 }
454 }
455 }
455 }
456
456
457 //******************
457 //******************
458 // general functions
458 // general functions
459 void init_waveforms( void )
459 void init_waveforms( void )
460 {
460 {
461 int i = 0;
461 int i = 0;
462
462
463 for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
463 for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
464 {
464 {
465 //***
465 //***
466 // F0
466 // F0
467 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; //
467 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; //
468 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; //
468 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; //
469 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; //
469 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; //
470
470
471 //***
471 //***
472 // F1
472 // F1
473 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111;
473 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111;
474 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333;
474 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333;
475 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
475 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
476
476
477 //***
477 //***
478 // F2
478 // F2
479 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333;
479 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333;
480 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111;
480 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111;
481 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
481 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
482
482
483 //***
483 //***
484 // F3
484 // F3
485 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1;
485 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1;
486 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2;
486 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2;
487 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000;
487 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000;
488 }
488 }
489 }
489 }
490
490
491 int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF)
491 int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF)
492 {
492 {
493 unsigned char i;
493 unsigned char i;
494
494
495 for (i=0; i<7; i++)
495 for (i=0; i<7; i++)
496 {
496 {
497 headerSWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
497 headerSWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
498 headerSWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
498 headerSWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
499 headerSWF[ i ].reserved = DEFAULT_RESERVED;
499 headerSWF[ i ].reserved = DEFAULT_RESERVED;
500 headerSWF[ i ].userApplication = CCSDS_USER_APP;
500 headerSWF[ i ].userApplication = CCSDS_USER_APP;
501 headerSWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
501 headerSWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
502 headerSWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
502 headerSWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
503 if (i == 0)
503 if (i == 0)
504 {
504 {
505 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
505 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
506 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8);
506 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8);
507 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 );
507 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 );
508 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
508 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
509 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
509 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
510 }
510 }
511 else if (i == 6)
511 else if (i == 6)
512 {
512 {
513 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
513 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
514 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_8 >> 8);
514 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_8 >> 8);
515 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_8 );
515 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_8 );
516 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
516 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
517 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
517 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
518 }
518 }
519 else
519 else
520 {
520 {
521 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
521 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
522 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8);
522 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8);
523 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 );
523 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 );
524 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
524 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
525 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
525 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
526 }
526 }
527 headerSWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
527 headerSWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
528 headerSWF[ i ].pktCnt = DEFAULT_PKTCNT; // PKT_CNT
528 headerSWF[ i ].pktCnt = DEFAULT_PKTCNT; // PKT_CNT
529 headerSWF[ i ].pktNr = i+1; // PKT_NR
529 headerSWF[ i ].pktNr = i+1; // PKT_NR
530 // DATA FIELD HEADER
530 // DATA FIELD HEADER
531 headerSWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
531 headerSWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
532 headerSWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
532 headerSWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
533 headerSWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
533 headerSWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
534 headerSWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
534 headerSWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
535 // AUXILIARY DATA HEADER
535 // AUXILIARY DATA HEADER
536 headerSWF[ i ].sid = sid;
536 headerSWF[ i ].sid = sid;
537 headerSWF[ i ].hkBIA = DEFAULT_HKBIA;
537 headerSWF[ i ].hkBIA = DEFAULT_HKBIA;
538 headerSWF[ i ].time[0] = 0x00;
538 headerSWF[ i ].time[0] = 0x00;
539 headerSWF[ i ].time[0] = 0x00;
539 headerSWF[ i ].time[0] = 0x00;
540 headerSWF[ i ].time[0] = 0x00;
540 headerSWF[ i ].time[0] = 0x00;
541 headerSWF[ i ].time[0] = 0x00;
541 headerSWF[ i ].time[0] = 0x00;
542 headerSWF[ i ].time[0] = 0x00;
542 headerSWF[ i ].time[0] = 0x00;
543 headerSWF[ i ].time[0] = 0x00;
543 headerSWF[ i ].time[0] = 0x00;
544 }
544 }
545 return LFR_SUCCESSFUL;
545 return LFR_SUCCESSFUL;
546 }
546 }
547
547
548 int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF )
548 int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF )
549 {
549 {
550 unsigned int i;
550 unsigned int i;
551
551
552 for (i=0; i<7; i++)
552 for (i=0; i<7; i++)
553 {
553 {
554 headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
554 headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
555 headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
555 headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
556 headerCWF[ i ].reserved = DEFAULT_RESERVED;
556 headerCWF[ i ].reserved = DEFAULT_RESERVED;
557 headerCWF[ i ].userApplication = CCSDS_USER_APP;
557 headerCWF[ i ].userApplication = CCSDS_USER_APP;
558 if ( (sid == SID_SBM1_CWF_F1) || (sid == SID_SBM2_CWF_F2) )
558 if ( (sid == SID_SBM1_CWF_F1) || (sid == SID_SBM2_CWF_F2) )
559 {
559 {
560 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2 >> 8);
560 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2 >> 8);
561 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2);
561 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2);
562 }
562 }
563 else
563 else
564 {
564 {
565 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
565 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
566 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
566 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
567 }
567 }
568 if (i == 0)
568 if (i == 0)
569 {
569 {
570 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
570 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
571 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8);
571 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8);
572 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 );
572 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 );
573 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
573 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
574 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
574 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
575 }
575 }
576 else if (i == 6)
576 else if (i == 6)
577 {
577 {
578 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
578 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
579 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_8 >> 8);
579 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_8 >> 8);
580 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_8 );
580 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_8 );
581 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
581 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
582 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
582 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
583 }
583 }
584 else
584 else
585 {
585 {
586 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
586 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
587 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8);
587 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8);
588 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 );
588 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 );
589 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
589 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
590 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
590 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
591 }
591 }
592 headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
592 headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
593 // PKT_CNT
593 // PKT_CNT
594 // PKT_NR
594 // PKT_NR
595 // DATA FIELD HEADER
595 // DATA FIELD HEADER
596 headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
596 headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
597 headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
597 headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
598 headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
598 headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
599 headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
599 headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
600 // AUXILIARY DATA HEADER
600 // AUXILIARY DATA HEADER
601 headerCWF[ i ].sid = sid;
601 headerCWF[ i ].sid = sid;
602 headerCWF[ i ].hkBIA = DEFAULT_HKBIA;
602 headerCWF[ i ].hkBIA = DEFAULT_HKBIA;
603 headerCWF[ i ].time[0] = 0x00;
603 headerCWF[ i ].time[0] = 0x00;
604 headerCWF[ i ].time[0] = 0x00;
604 headerCWF[ i ].time[0] = 0x00;
605 headerCWF[ i ].time[0] = 0x00;
605 headerCWF[ i ].time[0] = 0x00;
606 headerCWF[ i ].time[0] = 0x00;
606 headerCWF[ i ].time[0] = 0x00;
607 headerCWF[ i ].time[0] = 0x00;
607 headerCWF[ i ].time[0] = 0x00;
608 headerCWF[ i ].time[0] = 0x00;
608 headerCWF[ i ].time[0] = 0x00;
609 }
609 }
610 return LFR_SUCCESSFUL;
610 return LFR_SUCCESSFUL;
611 }
611 }
612
612
613 int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF )
613 int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF )
614 {
614 {
615 unsigned int i;
615 unsigned int i;
616
616
617 for (i=0; i<7; i++)
617 for (i=0; i<7; i++)
618 {
618 {
619 headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
619 headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
620 headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
620 headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
621 headerCWF[ i ].reserved = DEFAULT_RESERVED;
621 headerCWF[ i ].reserved = DEFAULT_RESERVED;
622 headerCWF[ i ].userApplication = CCSDS_USER_APP;
622 headerCWF[ i ].userApplication = CCSDS_USER_APP;
623
623
624 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
624 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
625 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
625 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
626 if (i == 0)
626 if (i == 0)
627 {
627 {
628 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
628 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
629 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8);
629 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8);
630 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 );
630 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 );
631 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
631 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
632 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
632 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
633 }
633 }
634 else if (i == 6)
634 else if (i == 6)
635 {
635 {
636 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
636 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
637 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 >> 8);
637 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 >> 8);
638 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 );
638 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 );
639 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
639 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
640 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
640 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
641 }
641 }
642 else
642 else
643 {
643 {
644 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
644 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
645 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8);
645 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8);
646 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 );
646 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 );
647 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
647 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
648 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
648 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
649 }
649 }
650 headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
650 headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
651 // DATA FIELD HEADER
651 // DATA FIELD HEADER
652 headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
652 headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
653 headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
653 headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
654 headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
654 headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
655 headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
655 headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
656 // AUXILIARY DATA HEADER
656 // AUXILIARY DATA HEADER
657 headerCWF[ i ].sid = SID_NORM_CWF_F3;
657 headerCWF[ i ].sid = SID_NORM_CWF_F3;
658 headerCWF[ i ].hkBIA = DEFAULT_HKBIA;
658 headerCWF[ i ].hkBIA = DEFAULT_HKBIA;
659 headerCWF[ i ].time[0] = 0x00;
659 headerCWF[ i ].time[0] = 0x00;
660 headerCWF[ i ].time[0] = 0x00;
660 headerCWF[ i ].time[0] = 0x00;
661 headerCWF[ i ].time[0] = 0x00;
661 headerCWF[ i ].time[0] = 0x00;
662 headerCWF[ i ].time[0] = 0x00;
662 headerCWF[ i ].time[0] = 0x00;
663 headerCWF[ i ].time[0] = 0x00;
663 headerCWF[ i ].time[0] = 0x00;
664 headerCWF[ i ].time[0] = 0x00;
664 headerCWF[ i ].time[0] = 0x00;
665 }
665 }
666 return LFR_SUCCESSFUL;
666 return LFR_SUCCESSFUL;
667 }
667 }
668
668
669 void reset_waveforms( void )
669 void reset_waveforms( void )
670 {
670 {
671 int i = 0;
671 int i = 0;
672
672
673 for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
673 for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
674 {
674 {
675 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x10002000;
675 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x10002000;
676 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000;
676 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000;
677 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000;
677 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000;
678
678
679 //***
679 //***
680 // F1
680 // F1
681 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x1000f000;
681 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x1000f000;
682 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0xf0001000;
682 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0xf0001000;
683 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000;
683 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000;
684
684
685 //***
685 //***
686 // F2
686 // F2
687 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x40008000;
687 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x40008000;
688 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000;
688 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000;
689 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x10002000;
689 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x10002000;
690
690
691 //***
691 //***
692 // F3
692 // F3
693 /*wf_cont_f3[ i* NB_WORDS_SWF_BLK + 0 ] = build_value( i, i ); // v and 1
693 /*wf_cont_f3[ i* NB_WORDS_SWF_BLK + 0 ] = build_value( i, i ); // v and 1
694 wf_cont_f3[ i* NB_WORDS_SWF_BLK + 1 ] = build_value( i, i ); // e2 and b1
694 wf_cont_f3[ i* NB_WORDS_SWF_BLK + 1 ] = build_value( i, i ); // e2 and b1
695 wf_cont_f3[ i* NB_WORDS_SWF_BLK + 2 ] = build_value( i, i ); // b2 and b3*/
695 wf_cont_f3[ i* NB_WORDS_SWF_BLK + 2 ] = build_value( i, i ); // b2 and b3*/
696 }
696 }
697 }
697 }
698
698
699 int send_waveform_SWF( volatile int *waveform, unsigned int sid,
699 int send_waveform_SWF( volatile int *waveform, unsigned int sid,
700 Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id )
700 Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id )
701 {
701 {
702 /** This function sends SWF CCSDS packets (F2, F1 or F0).
702 /** This function sends SWF CCSDS packets (F2, F1 or F0).
703 *
703 *
704 * @param waveform points to the buffer containing the data that will be send.
704 * @param waveform points to the buffer containing the data that will be send.
705 * @param sid is the source identifier of the data that will be sent.
705 * @param sid is the source identifier of the data that will be sent.
706 * @param headerSWF points to a table of headers that have been prepared for the data transmission.
706 * @param headerSWF points to a table of headers that have been prepared for the data transmission.
707 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
707 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
708 * contain information to setup the transmission of the data packets.
708 * contain information to setup the transmission of the data packets.
709 *
709 *
710 * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks.
710 * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks.
711 *
711 *
712 */
712 */
713
713
714 unsigned int i;
714 unsigned int i;
715 int ret;
715 int ret;
716 rtems_status_code status;
716 rtems_status_code status;
717 spw_ioctl_pkt_send spw_ioctl_send_SWF;
717 spw_ioctl_pkt_send spw_ioctl_send_SWF;
718
718
719 spw_ioctl_send_SWF.hlen = TM_HEADER_LEN + 4 + 12; // + 4 is for the protocole extra header, + 12 is for the auxiliary header
719 spw_ioctl_send_SWF.hlen = TM_HEADER_LEN + 4 + 12; // + 4 is for the protocole extra header, + 12 is for the auxiliary header
720 spw_ioctl_send_SWF.options = 0;
720 spw_ioctl_send_SWF.options = 0;
721
721
722 ret = LFR_DEFAULT;
722 ret = LFR_DEFAULT;
723
723
724 for (i=0; i<7; i++) // send waveform
724 for (i=0; i<7; i++) // send waveform
725 {
725 {
726 spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ];
726 spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ];
727 spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ];
727 spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ];
728 // BUILD THE DATA
728 // BUILD THE DATA
729 if (i==6) {
729 if (i==6) {
730 spw_ioctl_send_SWF.dlen = 8 * NB_BYTES_SWF_BLK;
730 spw_ioctl_send_SWF.dlen = 8 * NB_BYTES_SWF_BLK;
731 }
731 }
732 else {
732 else {
733 spw_ioctl_send_SWF.dlen = 340 * NB_BYTES_SWF_BLK;
733 spw_ioctl_send_SWF.dlen = 340 * NB_BYTES_SWF_BLK;
734 }
734 }
735 // SET PACKET TIME
735 // SET PACKET TIME
736 headerSWF[ i ].acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24);
736 headerSWF[ i ].acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24);
737 headerSWF[ i ].acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16);
737 headerSWF[ i ].acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16);
738 headerSWF[ i ].acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8);
738 headerSWF[ i ].acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8);
739 headerSWF[ i ].acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time);
739 headerSWF[ i ].acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time);
740 headerSWF[ i ].acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8);
740 headerSWF[ i ].acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8);
741 headerSWF[ i ].acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time);
741 headerSWF[ i ].acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time);
742 headerSWF[ i ].time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
742 headerSWF[ i ].time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
743 headerSWF[ i ].time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
743 headerSWF[ i ].time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
744 headerSWF[ i ].time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
744 headerSWF[ i ].time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
745 headerSWF[ i ].time[3] = (unsigned char) (time_management_regs->coarse_time);
745 headerSWF[ i ].time[3] = (unsigned char) (time_management_regs->coarse_time);
746 headerSWF[ i ].time[4] = (unsigned char) (time_management_regs->fine_time>>8);
746 headerSWF[ i ].time[4] = (unsigned char) (time_management_regs->fine_time>>8);
747 headerSWF[ i ].time[5] = (unsigned char) (time_management_regs->fine_time);
747 headerSWF[ i ].time[5] = (unsigned char) (time_management_regs->fine_time);
748 // SEND PACKET
748 // SEND PACKET
749 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_SWF, ACTION_MSG_SPW_IOCTL_SEND_SIZE);
749 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_SWF, ACTION_MSG_SPW_IOCTL_SEND_SIZE);
750 if (status != RTEMS_SUCCESSFUL) {
750 if (status != RTEMS_SUCCESSFUL) {
751 printf("%d-%d, ERR %d\n", sid, i, (int) status);
751 printf("%d-%d, ERR %d\n", sid, i, (int) status);
752 ret = LFR_DEFAULT;
752 ret = LFR_DEFAULT;
753 }
753 }
754 rtems_task_wake_after(TIME_BETWEEN_TWO_SWF_PACKETS); // 300 ms between each packet => 7 * 3 = 21 packets => 6.3 seconds
754 rtems_task_wake_after(TIME_BETWEEN_TWO_SWF_PACKETS); // 300 ms between each packet => 7 * 3 = 21 packets => 6.3 seconds
755 }
755 }
756
756
757 return ret;
757 return ret;
758 }
758 }
759
759
760 int send_waveform_CWF(volatile int *waveform, unsigned int sid,
760 int send_waveform_CWF(volatile int *waveform, unsigned int sid,
761 Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id)
761 Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id)
762 {
762 {
763 /** This function sends CWF CCSDS packets (F2, F1 or F0).
763 /** This function sends CWF CCSDS packets (F2, F1 or F0).
764 *
764 *
765 * @param waveform points to the buffer containing the data that will be send.
765 * @param waveform points to the buffer containing the data that will be send.
766 * @param sid is the source identifier of the data that will be sent.
766 * @param sid is the source identifier of the data that will be sent.
767 * @param headerCWF points to a table of headers that have been prepared for the data transmission.
767 * @param headerCWF points to a table of headers that have been prepared for the data transmission.
768 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
768 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
769 * contain information to setup the transmission of the data packets.
769 * contain information to setup the transmission of the data packets.
770 *
770 *
771 * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks.
771 * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks.
772 *
772 *
773 */
773 */
774
774
775 unsigned int i;
775 unsigned int i;
776 int ret;
776 int ret;
777 rtems_status_code status;
777 rtems_status_code status;
778 spw_ioctl_pkt_send spw_ioctl_send_CWF;
778 spw_ioctl_pkt_send spw_ioctl_send_CWF;
779
779
780 spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header
780 spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header
781 spw_ioctl_send_CWF.options = 0;
781 spw_ioctl_send_CWF.options = 0;
782
782
783 ret = LFR_DEFAULT;
783 ret = LFR_DEFAULT;
784
784
785 for (i=0; i<7; i++) // send waveform
785 for (i=0; i<7; i++) // send waveform
786 {
786 {
787 int coarseTime = 0x00;
787 int coarseTime = 0x00;
788 int fineTime = 0x00;
788 int fineTime = 0x00;
789 spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ];
789 spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ];
790 spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ];
790 spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ];
791 // BUILD THE DATA
791 // BUILD THE DATA
792 if (i==6) {
792 if (i==6) {
793 spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_SWF_BLK;
793 spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_SWF_BLK;
794 }
794 }
795 else {
795 else {
796 spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_SWF_BLK;
796 spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_SWF_BLK;
797 }
797 }
798 // SET PACKET TIME
798 // SET PACKET TIME
799 coarseTime = time_management_regs->coarse_time;
799 coarseTime = time_management_regs->coarse_time;
800 fineTime = time_management_regs->fine_time;
800 fineTime = time_management_regs->fine_time;
801 headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24);
801 headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24);
802 headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16);
802 headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16);
803 headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8);
803 headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8);
804 headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime);
804 headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime);
805 headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8);
805 headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8);
806 headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime);
806 headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime);
807 headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24);
807 headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24);
808 headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16);
808 headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16);
809 headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8);
809 headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8);
810 headerCWF[ i ].time[3] = (unsigned char) (coarseTime);
810 headerCWF[ i ].time[3] = (unsigned char) (coarseTime);
811 headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8);
811 headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8);
812 headerCWF[ i ].time[5] = (unsigned char) (fineTime);
812 headerCWF[ i ].time[5] = (unsigned char) (fineTime);
813 // SEND PACKET
813 // SEND PACKET
814 if (sid == SID_NORM_CWF_F3)
814 if (sid == SID_NORM_CWF_F3)
815 {
815 {
816 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
816 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
817 if (status != RTEMS_SUCCESSFUL) {
817 if (status != RTEMS_SUCCESSFUL) {
818 printf("%d-%d, ERR %d\n", sid, i, (int) status);
818 printf("%d-%d, ERR %d\n", sid, i, (int) status);
819 ret = LFR_DEFAULT;
819 ret = LFR_DEFAULT;
820 }
820 }
821 rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS);
821 rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS);
822 }
822 }
823 else
823 else
824 {
824 {
825 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
825 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
826 if (status != RTEMS_SUCCESSFUL) {
826 if (status != RTEMS_SUCCESSFUL) {
827 printf("%d-%d, ERR %d\n", sid, i, (int) status);
827 printf("%d-%d, ERR %d\n", sid, i, (int) status);
828 ret = LFR_DEFAULT;
828 ret = LFR_DEFAULT;
829 }
829 }
830 }
830 }
831 }
831 }
832
832
833 return ret;
833 return ret;
834 }
834 }
835
835
836 int send_waveform_CWF3_light(volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id)
836 int send_waveform_CWF3_light(volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id)
837 {
837 {
838 /** This function sends CWF_F3 CCSDS packets without the b1, b2 and b3 data.
838 /** This function sends CWF_F3 CCSDS packets without the b1, b2 and b3 data.
839 *
839 *
840 * @param waveform points to the buffer containing the data that will be send.
840 * @param waveform points to the buffer containing the data that will be send.
841 * @param headerCWF points to a table of headers that have been prepared for the data transmission.
841 * @param headerCWF points to a table of headers that have been prepared for the data transmission.
842 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
842 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
843 * contain information to setup the transmission of the data packets.
843 * contain information to setup the transmission of the data packets.
844 *
844 *
845 * By default, CWF_F3 packet are send without the b1, b2 and b3 data. This function rebuilds a data buffer
845 * By default, CWF_F3 packet are send without the b1, b2 and b3 data. This function rebuilds a data buffer
846 * from the incoming data and sends it in 7 packets, 6 containing 340 blocks and 1 one containing 8 blocks.
846 * from the incoming data and sends it in 7 packets, 6 containing 340 blocks and 1 one containing 8 blocks.
847 *
847 *
848 */
848 */
849
849
850 unsigned int i;
850 unsigned int i;
851 int ret;
851 int ret;
852 rtems_status_code status;
852 rtems_status_code status;
853 spw_ioctl_pkt_send spw_ioctl_send_CWF;
853 spw_ioctl_pkt_send spw_ioctl_send_CWF;
854 char *sample;
854 char *sample;
855
855
856 spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header
856 spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header
857 spw_ioctl_send_CWF.options = 0;
857 spw_ioctl_send_CWF.options = 0;
858
858
859 ret = LFR_DEFAULT;
859 ret = LFR_DEFAULT;
860
860
861 //**********************
861 //**********************
862 // BUILD CWF3_light DATA
862 // BUILD CWF3_light DATA
863 for ( i=0; i< 2048; i++)
863 for ( i=0; i< 2048; i++)
864 {
864 {
865 sample = (char*) &waveform[ i * NB_WORDS_SWF_BLK ];
865 sample = (char*) &waveform[ i * NB_WORDS_SWF_BLK ];
866 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) ] = sample[ 0 ];
866 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) ] = sample[ 0 ];
867 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 1 ] = sample[ 1 ];
867 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 1 ] = sample[ 1 ];
868 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 2 ] = sample[ 2 ];
868 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 2 ] = sample[ 2 ];
869 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 3 ] = sample[ 3 ];
869 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 3 ] = sample[ 3 ];
870 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 4 ] = sample[ 4 ];
870 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 4 ] = sample[ 4 ];
871 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 5 ] = sample[ 5 ];
871 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 5 ] = sample[ 5 ];
872 }
872 }
873
873
874 //*********************
874 //*********************
875 // SEND CWF3_light DATA
875 // SEND CWF3_light DATA
876
876
877 for (i=0; i<7; i++) // send waveform
877 for (i=0; i<7; i++) // send waveform
878 {
878 {
879 int coarseTime = 0x00;
879 int coarseTime = 0x00;
880 int fineTime = 0x00;
880 int fineTime = 0x00;
881 spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ];
881 spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ];
882 spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ];
882 spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ];
883 // BUILD THE DATA
883 // BUILD THE DATA
884 if ( i == WFRM_INDEX_OF_LAST_PACKET ) {
884 if ( i == WFRM_INDEX_OF_LAST_PACKET ) {
885 spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_CWF3_LIGHT_BLK;
885 spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_CWF3_LIGHT_BLK;
886 }
886 }
887 else {
887 else {
888 spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_CWF3_LIGHT_BLK;
888 spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_CWF3_LIGHT_BLK;
889 }
889 }
890 // SET PACKET TIME
890 // SET PACKET TIME
891 coarseTime = time_management_regs->coarse_time;
891 coarseTime = time_management_regs->coarse_time;
892 fineTime = time_management_regs->fine_time;
892 fineTime = time_management_regs->fine_time;
893 headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24);
893 headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24);
894 headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16);
894 headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16);
895 headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8);
895 headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8);
896 headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime);
896 headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime);
897 headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8);
897 headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8);
898 headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime);
898 headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime);
899 headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24);
899 headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24);
900 headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16);
900 headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16);
901 headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8);
901 headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8);
902 headerCWF[ i ].time[3] = (unsigned char) (coarseTime);
902 headerCWF[ i ].time[3] = (unsigned char) (coarseTime);
903 headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8);
903 headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8);
904 headerCWF[ i ].time[5] = (unsigned char) (fineTime);
904 headerCWF[ i ].time[5] = (unsigned char) (fineTime);
905 // SEND PACKET
905 // SEND PACKET
906 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
906 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
907 if (status != RTEMS_SUCCESSFUL) {
907 if (status != RTEMS_SUCCESSFUL) {
908 printf("%d-%d, ERR %d\n", SID_NORM_CWF_F3, i, (int) status);
908 printf("%d-%d, ERR %d\n", SID_NORM_CWF_F3, i, (int) status);
909 ret = LFR_DEFAULT;
909 ret = LFR_DEFAULT;
910 }
910 }
911 rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS);
911 rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS);
912 }
912 }
913
913
914 return ret;
914 return ret;
915 }
915 }
916
916
917
917
918 //**************
918 //**************
919 // wfp registers
919 // wfp registers
920 void set_wfp_data_shaping()
920 void set_wfp_data_shaping()
921 {
921 {
922 /** This function sets the data_shaping register of the waveform picker module.
922 /** This function sets the data_shaping register of the waveform picker module.
923 *
923 *
924 * The value is read from one field of the parameter_dump_packet structure:\n
924 * The value is read from one field of the parameter_dump_packet structure:\n
925 * bw_sp0_sp1_r0_r1
925 * bw_sp0_sp1_r0_r1
926 *
926 *
927 */
927 */
928
928
929 unsigned char data_shaping;
929 unsigned char data_shaping;
930
930
931 // get the parameters for the data shaping [BW SP0 SP1 R0 R1] in sy_lfr_common1 and configure the register
931 // get the parameters for the data shaping [BW SP0 SP1 R0 R1] in sy_lfr_common1 and configure the register
932 // waveform picker : [R1 R0 SP1 SP0 BW]
932 // waveform picker : [R1 R0 SP1 SP0 BW]
933
933
934 data_shaping = parameter_dump_packet.bw_sp0_sp1_r0_r1;
934 data_shaping = parameter_dump_packet.bw_sp0_sp1_r0_r1;
935
935
936 #ifdef GSA
936 #ifdef GSA
937 #else
937 #else
938 waveform_picker_regs->data_shaping =
938 waveform_picker_regs->data_shaping =
939 ( (data_shaping & 0x10) >> 4 ) // BW
939 ( (data_shaping & 0x10) >> 4 ) // BW
940 + ( (data_shaping & 0x08) >> 2 ) // SP0
940 + ( (data_shaping & 0x08) >> 2 ) // SP0
941 + ( (data_shaping & 0x04) ) // SP1
941 + ( (data_shaping & 0x04) ) // SP1
942 + ( (data_shaping & 0x02) << 2 ) // R0
942 + ( (data_shaping & 0x02) << 2 ) // R0
943 + ( (data_shaping & 0x01) << 4 ); // R1
943 + ( (data_shaping & 0x01) << 4 ); // R1
944 #endif
944 #endif
945 }
945 }
946
946
947 char set_wfp_delta_snapshot()
947 char set_wfp_delta_snapshot()
948 {
948 {
949 /** This function sets the delta_snapshot register of the waveform picker module.
949 /** This function sets the delta_snapshot register of the waveform picker module.
950 *
950 *
951 * The value is read from two (unsigned char) of the parameter_dump_packet structure:
951 * The value is read from two (unsigned char) of the parameter_dump_packet structure:
952 * - sy_lfr_n_swf_p[0]
952 * - sy_lfr_n_swf_p[0]
953 * - sy_lfr_n_swf_p[1]
953 * - sy_lfr_n_swf_p[1]
954 *
954 *
955 */
955 */
956
956
957 char ret;
957 char ret;
958 unsigned int delta_snapshot;
958 unsigned int delta_snapshot;
959 unsigned int aux;
959 unsigned int aux;
960
960
961 aux = 0;
961 aux = 0;
962 ret = LFR_DEFAULT;
962 ret = LFR_DEFAULT;
963
963
964 delta_snapshot = parameter_dump_packet.sy_lfr_n_swf_p[0]*256
964 delta_snapshot = parameter_dump_packet.sy_lfr_n_swf_p[0]*256
965 + parameter_dump_packet.sy_lfr_n_swf_p[1];
965 + parameter_dump_packet.sy_lfr_n_swf_p[1];
966
966
967 #ifdef GSA
967 #ifdef GSA
968 #else
968 #else
969 if ( delta_snapshot < MIN_DELTA_SNAPSHOT )
969 if ( delta_snapshot < MIN_DELTA_SNAPSHOT )
970 {
970 {
971 aux = MIN_DELTA_SNAPSHOT;
971 aux = MIN_DELTA_SNAPSHOT;
972 ret = LFR_DEFAULT;
972 ret = LFR_DEFAULT;
973 }
973 }
974 else
974 else
975 {
975 {
976 aux = delta_snapshot ;
976 aux = delta_snapshot ;
977 ret = LFR_SUCCESSFUL;
977 ret = LFR_SUCCESSFUL;
978 }
978 }
979 waveform_picker_regs->delta_snapshot = aux - 1; // max 2 bytes
979 waveform_picker_regs->delta_snapshot = aux - 1; // max 2 bytes
980 #endif
980 #endif
981
981
982 return ret;
982 return ret;
983 }
983 }
984
984
985 void set_wfp_burst_enable_register( unsigned char mode)
985 void set_wfp_burst_enable_register( unsigned char mode)
986 {
986 {
987 /** This function sets the waveform picker burst_enable register depending on the mode.
987 /** This function sets the waveform picker burst_enable register depending on the mode.
988 *
988 *
989 * @param mode is the LFR mode to launch.
989 * @param mode is the LFR mode to launch.
990 *
990 *
991 * The burst bits shall be before the enable bits.
991 * The burst bits shall be before the enable bits.
992 *
992 *
993 */
993 */
994
994
995 #ifdef GSA
995 #ifdef GSA
996 #else
996 #else
997 // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0
997 // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0
998 // the burst bits shall be set first, before the enable bits
998 // the burst bits shall be set first, before the enable bits
999 switch(mode) {
999 switch(mode) {
1000 case(LFR_MODE_NORMAL):
1000 case(LFR_MODE_NORMAL):
1001 waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enable
1001 waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enable
1002 waveform_picker_regs->burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0
1002 waveform_picker_regs->burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0
1003 break;
1003 break;
1004 case(LFR_MODE_BURST):
1004 case(LFR_MODE_BURST):
1005 waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled
1005 waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled
1006 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x04; // [0100] enable f2
1006 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x04; // [0100] enable f2
1007 break;
1007 break;
1008 case(LFR_MODE_SBM1):
1008 case(LFR_MODE_SBM1):
1009 waveform_picker_regs->burst_enable = 0x20; // [0010 0000] f1 burst enabled
1009 waveform_picker_regs->burst_enable = 0x20; // [0010 0000] f1 burst enabled
1010 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0
1010 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0
1011 break;
1011 break;
1012 case(LFR_MODE_SBM2):
1012 case(LFR_MODE_SBM2):
1013 waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled
1013 waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled
1014 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0
1014 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0
1015 break;
1015 break;
1016 default:
1016 default:
1017 waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled
1017 waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled
1018 break;
1018 break;
1019 }
1019 }
1020 #endif
1020 #endif
1021 }
1021 }
1022
1022
1023 void reset_wfp_burst_enable()
1023 void reset_wfp_burst_enable()
1024 {
1024 {
1025 /** This function resets the waveform picker burst_enable register.
1025 /** This function resets the waveform picker burst_enable register.
1026 *
1026 *
1027 * The burst bits [f2 f1 f0] and the enable bits [f3 f2 f1 f0] are set to 0.
1027 * The burst bits [f2 f1 f0] and the enable bits [f3 f2 f1 f0] are set to 0.
1028 *
1028 *
1029 */
1029 */
1030
1030
1031 #ifdef GSA
1031 #ifdef GSA
1032 #else
1032 #else
1033 waveform_picker_regs->burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0
1033 waveform_picker_regs->burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0
1034 #endif
1034 #endif
1035 }
1035 }
1036
1036
1037 void reset_wfp_status()
1037 void reset_wfp_status()
1038 {
1038 {
1039 /** This function resets the waveform picker status register.
1039 /** This function resets the waveform picker status register.
1040 *
1040 *
1041 * All status bits are set to 0 [new_err full_err full].
1041 * All status bits are set to 0 [new_err full_err full].
1042 *
1042 *
1043 */
1043 */
1044
1044
1045 #ifdef GSA
1045 #ifdef GSA
1046 #else
1046 #else
1047 waveform_picker_regs->status = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0
1047 waveform_picker_regs->status = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0
1048 #endif
1048 #endif
1049 }
1049 }
1050
1050
1051 void reset_waveform_picker_regs()
1051 void reset_waveform_picker_regs()
1052 {
1052 {
1053 /** This function resets the waveform picker module registers.
1053 /** This function resets the waveform picker module registers.
1054 *
1054 *
1055 * The registers affected by this function are located at the following offset addresses:
1055 * The registers affected by this function are located at the following offset addresses:
1056 * - 0x00 data_shaping
1056 * - 0x00 data_shaping
1057 * - 0x04 burst_enable
1057 * - 0x04 burst_enable
1058 * - 0x08 addr_data_f0
1058 * - 0x08 addr_data_f0
1059 * - 0x0C addr_data_f1
1059 * - 0x0C addr_data_f1
1060 * - 0x10 addr_data_f2
1060 * - 0x10 addr_data_f2
1061 * - 0x14 addr_data_f3
1061 * - 0x14 addr_data_f3
1062 * - 0x18 status
1062 * - 0x18 status
1063 * - 0x1C delta_snapshot
1063 * - 0x1C delta_snapshot
1064 * - 0x20 delta_f2_f1
1064 * - 0x20 delta_f2_f1
1065 * - 0x24 delta_f2_f0
1065 * - 0x24 delta_f2_f0
1066 * - 0x28 nb_burst
1066 * - 0x28 nb_burst
1067 * - 0x2C nb_snapshot
1067 * - 0x2C nb_snapshot
1068 *
1068 *
1069 */
1069 */
1070
1070
1071 #ifdef GSA
1071 #ifdef GSA
1072 #else
1072 #else
1073 reset_wfp_burst_enable();
1073 reset_wfp_burst_enable();
1074 reset_wfp_status();
1074 reset_wfp_status();
1075 // set buffer addresses
1075 // set buffer addresses
1076 waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); //
1076 waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); //
1077 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); //
1077 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); //
1078 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); //
1078 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); //
1079 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); //
1079 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); //
1080 // set other parameters
1080 // set other parameters
1081 set_wfp_data_shaping();
1081 set_wfp_data_shaping();
1082 set_wfp_delta_snapshot(); // time in seconds between two snapshots
1082 set_wfp_delta_snapshot(); // time in seconds between two snapshots
1083 waveform_picker_regs->delta_f2_f1 = 0xffff; // 0x16800 => 92160 (max 4 bytes)
1083 waveform_picker_regs->delta_f2_f1 = 0xffff; // 0x16800 => 92160 (max 4 bytes)
1084 waveform_picker_regs->delta_f2_f0 = 0x17c00; // 97 280 (max 5 bytes)
1084 waveform_picker_regs->delta_f2_f0 = 0x17c00; // 97 280 (max 5 bytes)
1085 waveform_picker_regs->nb_burst_available = 0x180; // max 3 bytes, size of the buffer in burst (1 burst = 16 x 4 octets)
1085 waveform_picker_regs->nb_burst_available = 0x180; // max 3 bytes, size of the buffer in burst (1 burst = 16 x 4 octets)
1086 waveform_picker_regs->nb_snapshot_param = 0x7ff; // max 3 octets, 2048 - 1
1086 waveform_picker_regs->nb_snapshot_param = 0x7ff; // max 3 octets, 2048 - 1
1087 #endif
1087 #endif
1088 }
1088 }
1089
1089
1090 void reset_waveform_picker_regs_alt()
1091 {
1092 waveform_picker_regs_alt->data_shaping = 0x01; // 0x00 00 *** R1 R0 SP1 SP0 BW
1093 waveform_picker_regs_alt->run_burst_enable = 0x00; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
1094 waveform_picker_regs_alt->addr_data_f0 = (int) (wf_snap_f0); // 0x08
1095 waveform_picker_regs_alt->addr_data_f1 = (int) (wf_snap_f1); // 0x0c
1096 waveform_picker_regs_alt->addr_data_f2 = (int) (wf_snap_f2); // 0x10
1097 waveform_picker_regs_alt->addr_data_f3 = (int) (wf_cont_f3); // 0x14
1098 waveform_picker_regs_alt->status = 0x00; // 0x18
1099 waveform_picker_regs_alt->delta_snapshot = 0x12800; // 0x1c
1100 waveform_picker_regs_alt->delta_f0 = 0x3f5; // 0x20 *** 1013
1101 waveform_picker_regs_alt->delta_f0_2 = 0x7; // 0x24 *** 7
1102 waveform_picker_regs_alt->delta_f1 = 0x3c0; // 0x28 *** 960
1103 waveform_picker_regs_alt->delta_f2 = 0x12200; // 0x2c *** 74240
1104 waveform_picker_regs_alt->nb_data_by_buffer = 0x1802; // 0x30 *** 2048 * 3 + 2
1105 waveform_picker_regs_alt->snapshot_param = 0x7ff; // 0x34 *** 2048 -1
1106 waveform_picker_regs_alt->start_date = 0x00;
1107 }
1108
1109 //*****************
1090 //*****************
1110 // local parameters
1091 // local parameters
1111 void set_local_sbm1_nb_cwf_max()
1092 void set_local_sbm1_nb_cwf_max()
1112 {
1093 {
1113 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1094 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1114 *
1095 *
1115 * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n
1096 * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n
1116 * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.\n\n
1097 * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.\n\n
1117 * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot)
1098 * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot)
1118 *
1099 *
1119 */
1100 */
1120 param_local.local_sbm1_nb_cwf_max = 2 *
1101 param_local.local_sbm1_nb_cwf_max = 2 *
1121 (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
1102 (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
1122 + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2
1103 + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2
1123 }
1104 }
1124
1105
1125 void set_local_sbm2_nb_cwf_max()
1106 void set_local_sbm2_nb_cwf_max()
1126 {
1107 {
1127 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1108 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1128 *
1109 *
1129 * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n
1110 * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n
1130 * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n
1111 * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n
1131 * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz)
1112 * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz)
1132 *
1113 *
1133 */
1114 */
1134
1115
1135 param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
1116 param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
1136 + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8;
1117 + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8;
1137 }
1118 }
1138
1119
1139 void set_local_nb_interrupt_f0_MAX()
1120 void set_local_nb_interrupt_f0_MAX()
1140 {
1121 {
1141 /** This function sets the value of the nb_interrupt_f0_MAX local parameter.
1122 /** This function sets the value of the nb_interrupt_f0_MAX local parameter.
1142 *
1123 *
1143 * This parameter is used for the SM validation only.\n
1124 * This parameter is used for the SM validation only.\n
1144 * The software waits param_local.local_nb_interrupt_f0_MAX interruptions from the spectral matrices
1125 * The software waits param_local.local_nb_interrupt_f0_MAX interruptions from the spectral matrices
1145 * module before launching a basic processing.
1126 * module before launching a basic processing.
1146 *
1127 *
1147 */
1128 */
1148
1129
1149 param_local.local_nb_interrupt_f0_MAX = ( (parameter_dump_packet.sy_lfr_n_asm_p[0]) * 256
1130 param_local.local_nb_interrupt_f0_MAX = ( (parameter_dump_packet.sy_lfr_n_asm_p[0]) * 256
1150 + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100;
1131 + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100;
1151 }
1132 }
1152
1133
1153 void reset_local_sbm1_nb_cwf_sent()
1134 void reset_local_sbm1_nb_cwf_sent()
1154 {
1135 {
1155 /** This function resets the value of the sbm1_nb_cwf_sent local parameter.
1136 /** This function resets the value of the sbm1_nb_cwf_sent local parameter.
1156 *
1137 *
1157 * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n
1138 * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n
1158 * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.
1139 * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.
1159 *
1140 *
1160 */
1141 */
1161
1142
1162 param_local.local_sbm1_nb_cwf_sent = 0;
1143 param_local.local_sbm1_nb_cwf_sent = 0;
1163 }
1144 }
1164
1145
1165 void reset_local_sbm2_nb_cwf_sent()
1146 void reset_local_sbm2_nb_cwf_sent()
1166 {
1147 {
1167 /** This function resets the value of the sbm2_nb_cwf_sent local parameter.
1148 /** This function resets the value of the sbm2_nb_cwf_sent local parameter.
1168 *
1149 *
1169 * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n
1150 * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n
1170 * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active.
1151 * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active.
1171 *
1152 *
1172 */
1153 */
1173
1154
1174 param_local.local_sbm2_nb_cwf_sent = 0;
1155 param_local.local_sbm2_nb_cwf_sent = 0;
1175 }
1156 }
1176
1157
1177 rtems_id get_pkts_queue_id( void )
1158 rtems_id get_pkts_queue_id( void )
1178 {
1159 {
1179 rtems_id queue_id;
1160 rtems_id queue_id;
1180 rtems_status_code status;
1161 rtems_status_code status;
1181 rtems_name queue_send_name;
1162 rtems_name queue_send_name;
1182
1163
1183 queue_send_name = rtems_build_name( 'Q', '_', 'S', 'D' );
1164 queue_send_name = rtems_build_name( 'Q', '_', 'S', 'D' );
1184
1165
1185 status = rtems_message_queue_ident( queue_send_name, 0, &queue_id );
1166 status = rtems_message_queue_ident( queue_send_name, 0, &queue_id );
1186 if (status != RTEMS_SUCCESSFUL)
1167 if (status != RTEMS_SUCCESSFUL)
1187 {
1168 {
1188 PRINTF1("in get_pkts_queue_id *** ERR %d\n", status)
1169 PRINTF1("in get_pkts_queue_id *** ERR %d\n", status)
1189 }
1170 }
1190 return queue_id;
1171 return queue_id;
1191 }
1172 }
General Comments 0
You need to be logged in to leave comments. Login now