@@ -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: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 14 09:47:53 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=22 -DPRINT_MESSAGES_ON_CONSOLE |
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=22 -DPRINT_MESSAGES_ON_CONSOLE -DPRINT_TASK_STATISTICS | |
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
|
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,78 +1,78 | |||||
1 | TEMPLATE = app |
|
1 | TEMPLATE = app | |
2 | # CONFIG += console v8 sim |
|
2 | # CONFIG += console v8 sim | |
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa | |
4 | CONFIG += console verbose |
|
4 | CONFIG += console verbose cpu_usage_report | |
5 | CONFIG -= qt |
|
5 | CONFIG -= qt | |
6 |
|
6 | |||
7 | include(./sparc.pri) |
|
7 | include(./sparc.pri) | |
8 |
|
8 | |||
9 | # flight software version |
|
9 | # flight software version | |
10 | SWVERSION=-0-22 |
|
10 | SWVERSION=-0-22 | |
11 | DEFINES += SW_VERSION_N1=0 |
|
11 | DEFINES += SW_VERSION_N1=0 | |
12 | DEFINES += SW_VERSION_N2=0 |
|
12 | DEFINES += SW_VERSION_N2=0 | |
13 | DEFINES += SW_VERSION_N3=0 |
|
13 | DEFINES += SW_VERSION_N3=0 | |
14 | DEFINES += SW_VERSION_N4=22 |
|
14 | DEFINES += SW_VERSION_N4=22 | |
15 |
|
15 | |||
16 | contains( CONFIG, verbose ) { |
|
16 | contains( CONFIG, verbose ) { | |
17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
|
17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE | |
18 | } |
|
18 | } | |
19 |
|
19 | |||
20 | contains( CONFIG, debug_messages ) { |
|
20 | contains( CONFIG, debug_messages ) { | |
21 | DEFINES += DEBUG_MESSAGES |
|
21 | DEFINES += DEBUG_MESSAGES | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | contains( CONFIG, cpu_usage_report ) { |
|
24 | contains( CONFIG, cpu_usage_report ) { | |
25 | DEFINES += PRINT_TASK_STATISTICS |
|
25 | DEFINES += PRINT_TASK_STATISTICS | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | contains( CONFIG, stack_report ) { |
|
28 | contains( CONFIG, stack_report ) { | |
29 | DEFINES += PRINT_STACK_REPORT |
|
29 | DEFINES += PRINT_STACK_REPORT | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
32 | contains( CONFIG, boot_messages ) { |
|
32 | contains( CONFIG, boot_messages ) { | |
33 | DEFINES += BOOT_MESSAGES |
|
33 | DEFINES += BOOT_MESSAGES | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | #doxygen.target = doxygen |
|
36 | #doxygen.target = doxygen | |
37 | #doxygen.commands = doxygen ../doc/Doxyfile |
|
37 | #doxygen.commands = doxygen ../doc/Doxyfile | |
38 | #QMAKE_EXTRA_TARGETS += doxygen |
|
38 | #QMAKE_EXTRA_TARGETS += doxygen | |
39 |
|
39 | |||
40 | TARGET = fsw |
|
40 | TARGET = fsw | |
41 | contains( CONFIG, gsa ) { |
|
41 | contains( CONFIG, gsa ) { | |
42 | DEFINES += GSA |
|
42 | DEFINES += GSA | |
43 | TARGET = fsw-gsa |
|
43 | TARGET = fsw-gsa | |
44 | } |
|
44 | } | |
45 |
|
45 | |||
46 | INCLUDEPATH += \ |
|
46 | INCLUDEPATH += \ | |
47 | ../src \ |
|
47 | ../src \ | |
48 | ../header |
|
48 | ../header | |
49 |
|
49 | |||
50 | SOURCES += \ |
|
50 | SOURCES += \ | |
51 | ../src/wf_handler.c \ |
|
51 | ../src/wf_handler.c \ | |
52 | ../src/tc_handler.c \ |
|
52 | ../src/tc_handler.c \ | |
53 | ../src/fsw_processing.c \ |
|
53 | ../src/fsw_processing.c \ | |
54 | ../src/fsw_misc.c \ |
|
54 | ../src/fsw_misc.c \ | |
55 | ../src/fsw_init.c \ |
|
55 | ../src/fsw_init.c \ | |
56 | ../src/fsw_globals.c \ |
|
56 | ../src/fsw_globals.c \ | |
57 | ../src/fsw_spacewire.c \ |
|
57 | ../src/fsw_spacewire.c \ | |
58 | ../src/tc_load_dump_parameters.c \ |
|
58 | ../src/tc_load_dump_parameters.c \ | |
59 | ../src/tm_lfr_tc_exe.c \ |
|
59 | ../src/tm_lfr_tc_exe.c \ | |
60 | ../src/tc_acceptance.c |
|
60 | ../src/tc_acceptance.c | |
61 |
|
61 | |||
62 |
|
62 | |||
63 | HEADERS += \ |
|
63 | HEADERS += \ | |
64 | ../header/wf_handler.h \ |
|
64 | ../header/wf_handler.h \ | |
65 | ../header/tc_handler.h \ |
|
65 | ../header/tc_handler.h \ | |
66 | ../header/grlib_regs.h \ |
|
66 | ../header/grlib_regs.h \ | |
67 | ../header/fsw_processing.h \ |
|
67 | ../header/fsw_processing.h \ | |
68 | ../header/fsw_params.h \ |
|
68 | ../header/fsw_params.h \ | |
69 | ../header/fsw_misc.h \ |
|
69 | ../header/fsw_misc.h \ | |
70 | ../header/fsw_init.h \ |
|
70 | ../header/fsw_init.h \ | |
71 | ../header/ccsds_types.h \ |
|
71 | ../header/ccsds_types.h \ | |
72 | ../header/fsw_params_processing.h \ |
|
72 | ../header/fsw_params_processing.h \ | |
73 | ../header/fsw_spacewire.h \ |
|
73 | ../header/fsw_spacewire.h \ | |
74 | ../header/tm_byte_positions.h \ |
|
74 | ../header/tm_byte_positions.h \ | |
75 | ../header/tc_load_dump_parameters.h \ |
|
75 | ../header/tc_load_dump_parameters.h \ | |
76 | ../header/tm_lfr_tc_exe.h \ |
|
76 | ../header/tm_lfr_tc_exe.h \ | |
77 | ../header/tc_acceptance.h |
|
77 | ../header/tc_acceptance.h | |
78 |
|
78 |
@@ -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.1, 2013-11-1 |
|
3 | <!-- Written by QtCreator 2.8.1, 2013-11-14T11:56:41. --> | |
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,1224 +1,1249 | |||||
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 | unsigned char fullRecord; | |||
25 |
|
26 | |||
26 | rtems_isr waveforms_isr( rtems_vector_number vector ) |
|
27 | rtems_isr waveforms_isr( rtems_vector_number vector ) | |
27 | { |
|
28 | { | |
|
29 | unsigned int statusReg; | |||
|
30 | ||||
28 | /** This is the interrupt sub routine called by the waveform picker core. |
|
31 | /** This is the interrupt sub routine called by the waveform picker core. | |
29 | * |
|
32 | * | |
30 | * This ISR launch different actions depending mainly on two pieces of information: |
|
33 | * This ISR launch different actions depending mainly on two pieces of information: | |
31 | * 1. the values read in the registers of the waveform picker. |
|
34 | * 1. the values read in the registers of the waveform picker. | |
32 | * 2. the current LFR mode. |
|
35 | * 2. the current LFR mode. | |
33 | * |
|
36 | * | |
34 | */ |
|
37 | */ | |
35 |
|
38 | |||
36 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
|||
37 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff00f; // clear new_err and full_err |
|
39 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff00f; // clear new_err and full_err | |
38 |
|
40 | |||
39 | #ifdef GSA |
|
41 | #ifdef GSA | |
40 | #else |
|
42 | #else | |
41 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
43 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
42 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
44 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
43 | { // in modes other than STANDBY and BURST, send the CWF_F3 data |
|
45 | { // in modes other than STANDBY and BURST, send the CWF_F3 data | |
44 | if ((new_waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full |
|
46 | if ((new_waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full | |
45 | // (1) change the receiving buffer for the waveform picker |
|
47 | // (1) change the receiving buffer for the waveform picker | |
46 | if (new_waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { |
|
48 | if (new_waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { | |
47 | new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis); |
|
49 | new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis); | |
48 | } |
|
50 | } | |
49 | else { |
|
51 | else { | |
50 | new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); |
|
52 | new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); | |
51 | } |
|
53 | } | |
52 | // (2) send an event for the waveforms transmission |
|
54 | // (2) send an event for the waveforms transmission | |
53 | if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
55 | if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
54 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
56 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
55 | } |
|
57 | } | |
56 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111] |
|
58 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111] | |
57 | } |
|
59 | } | |
58 | } |
|
60 | } | |
59 | #endif |
|
61 | #endif | |
60 |
|
62 | |||
61 | switch(lfrCurrentMode) |
|
63 | switch(lfrCurrentMode) | |
62 | { |
|
64 | { | |
63 | //******** |
|
65 | //******** | |
64 | // STANDBY |
|
66 | // STANDBY | |
65 | case(LFR_MODE_STANDBY): |
|
67 | case(LFR_MODE_STANDBY): | |
66 | break; |
|
68 | break; | |
67 |
|
69 | |||
68 | //****** |
|
70 | //****** | |
69 | // NORMAL |
|
71 | // NORMAL | |
70 | case(LFR_MODE_NORMAL): |
|
72 | case(LFR_MODE_NORMAL): | |
71 | #ifdef GSA |
|
73 | #ifdef GSA | |
72 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
74 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
73 | #else |
|
75 | #else | |
74 | if ( (new_waveform_picker_regs->run_burst_enable & 0x7) == 0x0 ){ // if no channel is enable |
|
76 | statusReg = new_waveform_picker_regs->status; | |
75 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
77 | fullRecord = fullRecord | ( statusReg & 0x7 ); | |
|
78 | // if ( (new_waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full | |||
|
79 | // if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |||
|
80 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |||
|
81 | // } | |||
|
82 | // new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff888; | |||
|
83 | // } | |||
|
84 | if ( fullRecord == 0x7 ){ // f2 f1 and f0 are full | |||
|
85 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |||
|
86 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |||
|
87 | } | |||
|
88 | fullRecord = 0x00; | |||
76 | } |
|
89 | } | |
77 | else { |
|
90 | new_waveform_picker_regs->status = ( new_waveform_picker_regs->status & (~statusReg) ) | |
78 |
|
|
91 | | ( new_waveform_picker_regs->status & 0xfffffff8 ); | |
79 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { |
|
|||
80 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
|||
81 | } |
|
|||
82 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff888; |
|
|||
83 | } |
|
|||
84 | } |
|
|||
85 | #endif |
|
92 | #endif | |
86 | break; |
|
93 | break; | |
87 |
|
94 | |||
88 | //****** |
|
95 | //****** | |
89 | // BURST |
|
96 | // BURST | |
90 | case(LFR_MODE_BURST): |
|
97 | case(LFR_MODE_BURST): | |
91 | #ifdef GSA |
|
98 | #ifdef GSA | |
92 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
99 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
93 | #else |
|
100 | #else | |
94 | if ((new_waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit |
|
101 | if ((new_waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit | |
95 | // (1) change the receiving buffer for the waveform picker |
|
102 | // (1) change the receiving buffer for the waveform picker | |
96 | if (new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { |
|
103 | if (new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { | |
97 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis); |
|
104 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis); | |
98 | } |
|
105 | } | |
99 | else { |
|
106 | else { | |
100 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); |
|
107 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); | |
101 | } |
|
108 | } | |
102 | // (2) send an event for the waveforms transmission |
|
109 | // (2) send an event for the waveforms transmission | |
103 | if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) { |
|
110 | 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 ); |
|
111 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
105 | } |
|
112 | } | |
106 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0 |
|
113 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0 | |
107 | } |
|
114 | } | |
108 | #endif |
|
115 | #endif | |
109 | break; |
|
116 | break; | |
110 |
|
117 | |||
111 | //***** |
|
118 | //***** | |
112 | // SBM1 |
|
119 | // SBM1 | |
113 | case(LFR_MODE_SBM1): |
|
120 | case(LFR_MODE_SBM1): | |
114 | #ifdef GSA |
|
121 | #ifdef GSA | |
115 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
122 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
116 | #else |
|
123 | #else | |
117 | if ((new_waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit |
|
124 | if ((new_waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit | |
118 | // (1) change the receiving buffer for the waveform picker |
|
125 | // (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) ) |
|
126 | if ( param_local.local_sbm1_nb_cwf_sent == (param_local.local_sbm1_nb_cwf_max-1) ) | |
120 | { |
|
127 | { | |
121 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm); |
|
128 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm); | |
122 | } |
|
129 | } | |
123 | else if ( new_waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm ) |
|
130 | else if ( new_waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm ) | |
124 | { |
|
131 | { | |
125 | doubleSendCWF1 = 1; |
|
132 | doubleSendCWF1 = 1; | |
126 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); |
|
133 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); | |
127 | } |
|
134 | } | |
128 | else if ( new_waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) { |
|
135 | else if ( new_waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) { | |
129 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis); |
|
136 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis); | |
130 | } |
|
137 | } | |
131 | else { |
|
138 | else { | |
132 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); |
|
139 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); | |
133 | } |
|
140 | } | |
134 | // (2) send an event for the waveforms transmission |
|
141 | // (2) send an event for the waveforms transmission | |
135 | if (rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 ) != RTEMS_SUCCESSFUL) { |
|
142 | 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 ); |
|
143 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
137 | } |
|
144 | } | |
138 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0 |
|
145 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0 | |
139 | } |
|
146 | } | |
140 | if ( ( (new_waveform_picker_regs->status & 0x05) == 0x05 ) ) { // [0101] check the f2 and f0 full bit |
|
147 | if ( ( (new_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) { |
|
148 | 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 ); |
|
149 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
143 | } |
|
150 | } | |
144 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0 |
|
151 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0 | |
145 | reset_local_sbm1_nb_cwf_sent(); |
|
152 | reset_local_sbm1_nb_cwf_sent(); | |
146 | } |
|
153 | } | |
147 |
|
154 | |||
148 | #endif |
|
155 | #endif | |
149 | break; |
|
156 | break; | |
150 |
|
157 | |||
151 | //***** |
|
158 | //***** | |
152 | // SBM2 |
|
159 | // SBM2 | |
153 | case(LFR_MODE_SBM2): |
|
160 | case(LFR_MODE_SBM2): | |
154 | #ifdef GSA |
|
161 | #ifdef GSA | |
155 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
162 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
156 | #else |
|
163 | #else | |
157 | if ((new_waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit |
|
164 | if ((new_waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit | |
158 | // (1) change the receiving buffer for the waveform picker |
|
165 | // (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) ) |
|
166 | if ( param_local.local_sbm2_nb_cwf_sent == (param_local.local_sbm2_nb_cwf_max-1) ) | |
160 | { |
|
167 | { | |
161 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm); |
|
168 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm); | |
162 | } |
|
169 | } | |
163 | else if ( new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) { |
|
170 | else if ( new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) { | |
164 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); |
|
171 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); | |
165 | doubleSendCWF2 = 1; |
|
172 | doubleSendCWF2 = 1; | |
166 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2_WFRM ) != RTEMS_SUCCESSFUL) { |
|
173 | 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 ); |
|
174 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
168 | } |
|
175 | } | |
169 | reset_local_sbm2_nb_cwf_sent(); |
|
176 | reset_local_sbm2_nb_cwf_sent(); | |
170 | } |
|
177 | } | |
171 | else if ( new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) { |
|
178 | else if ( new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) { | |
172 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis); |
|
179 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis); | |
173 | } |
|
180 | } | |
174 | else { |
|
181 | else { | |
175 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); |
|
182 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); | |
176 | } |
|
183 | } | |
177 | // (2) send an event for the waveforms transmission |
|
184 | // (2) send an event for the waveforms transmission | |
178 | if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) { |
|
185 | 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 ); |
|
186 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
180 | } |
|
187 | } | |
181 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0 |
|
188 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0 | |
182 | } |
|
189 | } | |
183 | if ( ( (new_waveform_picker_regs->status & 0x03) == 0x03 ) ) { // [0011] f3 f2 f1 f0, f1 and f0 are full |
|
190 | if ( ( (new_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) { |
|
191 | 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 ); |
|
192 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
186 | } |
|
193 | } | |
187 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 |
|
194 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 | |
188 | } |
|
195 | } | |
189 | #endif |
|
196 | #endif | |
190 | break; |
|
197 | break; | |
191 |
|
198 | |||
192 | //******** |
|
199 | //******** | |
193 | // DEFAULT |
|
200 | // DEFAULT | |
194 | default: |
|
201 | default: | |
195 | break; |
|
202 | break; | |
196 | } |
|
203 | } | |
197 | } |
|
204 | } | |
198 |
|
205 | |||
199 | rtems_isr waveforms_simulator_isr( rtems_vector_number vector ) |
|
206 | rtems_isr waveforms_simulator_isr( rtems_vector_number vector ) | |
200 | { |
|
207 | { | |
201 | /** This is the interrupt sub routine called by the waveform picker simulator. |
|
208 | /** This is the interrupt sub routine called by the waveform picker simulator. | |
202 | * |
|
209 | * | |
203 | * This ISR is for debug purpose only. |
|
210 | * This ISR is for debug purpose only. | |
204 | * |
|
211 | * | |
205 | */ |
|
212 | */ | |
206 |
|
213 | |||
207 | unsigned char lfrMode; |
|
214 | unsigned char lfrMode; | |
208 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
215 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
209 |
|
216 | |||
210 | switch(lfrMode) { |
|
217 | switch(lfrMode) { | |
211 | case (LFR_MODE_STANDBY): |
|
218 | case (LFR_MODE_STANDBY): | |
212 | break; |
|
219 | break; | |
213 | case (LFR_MODE_NORMAL): |
|
220 | case (LFR_MODE_NORMAL): | |
214 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { |
|
221 | 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 ); |
|
222 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_5 ); | |
216 | } |
|
223 | } | |
217 | break; |
|
224 | break; | |
218 | case (LFR_MODE_BURST): |
|
225 | case (LFR_MODE_BURST): | |
219 | break; |
|
226 | break; | |
220 | case (LFR_MODE_SBM1): |
|
227 | case (LFR_MODE_SBM1): | |
221 | break; |
|
228 | break; | |
222 | case (LFR_MODE_SBM2): |
|
229 | case (LFR_MODE_SBM2): | |
223 | break; |
|
230 | break; | |
224 | } |
|
231 | } | |
225 | } |
|
232 | } | |
226 |
|
233 | |||
227 | rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP |
|
234 | rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP | |
228 | { |
|
235 | { | |
229 | /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode. |
|
236 | /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode. | |
230 | * |
|
237 | * | |
231 | * @param unused is the starting argument of the RTEMS task |
|
238 | * @param unused is the starting argument of the RTEMS task | |
232 | * |
|
239 | * | |
233 | * The following data packets are sent by this task: |
|
240 | * The following data packets are sent by this task: | |
234 | * - TM_LFR_SCIENCE_NORMAL_SWF_F0 |
|
241 | * - TM_LFR_SCIENCE_NORMAL_SWF_F0 | |
235 | * - TM_LFR_SCIENCE_NORMAL_SWF_F1 |
|
242 | * - TM_LFR_SCIENCE_NORMAL_SWF_F1 | |
236 | * - TM_LFR_SCIENCE_NORMAL_SWF_F2 |
|
243 | * - TM_LFR_SCIENCE_NORMAL_SWF_F2 | |
237 | * |
|
244 | * | |
238 | */ |
|
245 | */ | |
239 |
|
246 | |||
240 | rtems_event_set event_out; |
|
247 | rtems_event_set event_out; | |
241 | rtems_id queue_id; |
|
248 | rtems_id queue_id; | |
242 |
|
249 | |||
243 | init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 ); |
|
250 | init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 ); | |
244 | init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 ); |
|
251 | init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 ); | |
245 | init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 ); |
|
252 | init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 ); | |
246 |
|
253 | |||
247 | init_waveforms(); |
|
254 | init_waveforms(); | |
248 |
|
255 | |||
249 | queue_id = get_pkts_queue_id(); |
|
256 | queue_id = get_pkts_queue_id(); | |
250 |
|
257 | |||
251 | BOOT_PRINTF("in WFRM ***\n") |
|
258 | BOOT_PRINTF("in WFRM ***\n") | |
252 |
|
259 | |||
253 | while(1){ |
|
260 | while(1){ | |
254 | // wait for an RTEMS_EVENT |
|
261 | // wait for an RTEMS_EVENT | |
255 | rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1 |
|
262 | rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1 | |
256 | | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM, |
|
263 | | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM, | |
257 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
264 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
258 |
|
265 | |||
259 | if (event_out == RTEMS_EVENT_MODE_NORMAL) |
|
266 | if (event_out == RTEMS_EVENT_MODE_NORMAL) | |
260 | { |
|
267 | { | |
261 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); |
|
268 | 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); |
|
269 | 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); |
|
270 | send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id); | |
264 | #ifdef GSA |
|
271 | #ifdef GSA | |
265 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0 |
|
272 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0 | |
266 | #endif |
|
273 | #endif | |
267 | } |
|
274 | } | |
268 | else if (event_out == RTEMS_EVENT_MODE_SBM1) |
|
275 | else if (event_out == RTEMS_EVENT_MODE_SBM1) | |
269 | { |
|
276 | { | |
270 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); |
|
277 | 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); |
|
278 | 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); |
|
279 | send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id); | |
273 | #ifdef GSA |
|
280 | #ifdef GSA | |
274 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0 |
|
281 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0 | |
275 | #endif |
|
282 | #endif | |
276 | } |
|
283 | } | |
277 | else if (event_out == RTEMS_EVENT_MODE_SBM2) |
|
284 | else if (event_out == RTEMS_EVENT_MODE_SBM2) | |
278 | { |
|
285 | { | |
279 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); |
|
286 | 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); |
|
287 | send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id); | |
281 | #ifdef GSA |
|
288 | #ifdef GSA | |
282 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 |
|
289 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 | |
283 | #endif |
|
290 | #endif | |
284 | } |
|
291 | } | |
285 | else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM) |
|
292 | else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM) | |
286 | { |
|
293 | { | |
287 | send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id); |
|
294 | send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id); | |
288 | } |
|
295 | } | |
289 | else |
|
296 | else | |
290 | { |
|
297 | { | |
291 | PRINTF("in WFRM *** unexpected event") |
|
298 | PRINTF("in WFRM *** unexpected event") | |
292 | } |
|
299 | } | |
293 |
|
300 | |||
294 |
|
301 | |||
295 | #ifdef GSA |
|
302 | #ifdef GSA | |
296 | // irq processed, reset the related register of the timer unit |
|
303 | // 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; |
|
304 | gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl = gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl | 0x00000010; | |
298 | // clear the interruption |
|
305 | // clear the interruption | |
299 | LEON_Unmask_interrupt( IRQ_WF ); |
|
306 | LEON_Unmask_interrupt( IRQ_WF ); | |
300 | #endif |
|
307 | #endif | |
301 | } |
|
308 | } | |
302 | } |
|
309 | } | |
303 |
|
310 | |||
304 | rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP |
|
311 | rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP | |
305 | { |
|
312 | { | |
306 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3. |
|
313 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3. | |
307 | * |
|
314 | * | |
308 | * @param unused is the starting argument of the RTEMS task |
|
315 | * @param unused is the starting argument of the RTEMS task | |
309 | * |
|
316 | * | |
310 | * The following data packet is sent by this task: |
|
317 | * The following data packet is sent by this task: | |
311 | * - TM_LFR_SCIENCE_NORMAL_CWF_F3 |
|
318 | * - TM_LFR_SCIENCE_NORMAL_CWF_F3 | |
312 | * |
|
319 | * | |
313 | */ |
|
320 | */ | |
314 |
|
321 | |||
315 | rtems_event_set event_out; |
|
322 | rtems_event_set event_out; | |
316 | rtems_id queue_id; |
|
323 | rtems_id queue_id; | |
317 |
|
324 | |||
318 | init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 ); |
|
325 | init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 ); | |
319 | init_header_continuous_wf3_light_table( headerCWF_F3_light ); |
|
326 | init_header_continuous_wf3_light_table( headerCWF_F3_light ); | |
320 |
|
327 | |||
321 | queue_id = get_pkts_queue_id(); |
|
328 | queue_id = get_pkts_queue_id(); | |
322 |
|
329 | |||
323 | BOOT_PRINTF("in CWF3 ***\n") |
|
330 | BOOT_PRINTF("in CWF3 ***\n") | |
324 |
|
331 | |||
325 | while(1){ |
|
332 | while(1){ | |
326 | // wait for an RTEMS_EVENT |
|
333 | // wait for an RTEMS_EVENT | |
327 | rtems_event_receive( RTEMS_EVENT_0, |
|
334 | rtems_event_receive( RTEMS_EVENT_0, | |
328 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
335 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
329 | PRINTF("send CWF F3 \n") |
|
336 | PRINTF("send CWF F3 \n") | |
330 | #ifdef GSA |
|
337 | #ifdef GSA | |
331 | #else |
|
338 | #else | |
332 | if (new_waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { |
|
339 | if (new_waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { | |
333 | send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id ); |
|
340 | send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id ); | |
334 | } |
|
341 | } | |
335 | else { |
|
342 | else { | |
336 | send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id ); |
|
343 | send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id ); | |
337 | } |
|
344 | } | |
338 | #endif |
|
345 | #endif | |
339 | } |
|
346 | } | |
340 | } |
|
347 | } | |
341 |
|
348 | |||
342 | rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2 |
|
349 | rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2 | |
343 | { |
|
350 | { | |
344 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2. |
|
351 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2. | |
345 | * |
|
352 | * | |
346 | * @param unused is the starting argument of the RTEMS task |
|
353 | * @param unused is the starting argument of the RTEMS task | |
347 | * |
|
354 | * | |
348 | * The following data packet is sent by this function: |
|
355 | * The following data packet is sent by this function: | |
349 | * - TM_LFR_SCIENCE_BURST_CWF_F2 |
|
356 | * - TM_LFR_SCIENCE_BURST_CWF_F2 | |
350 | * - TM_LFR_SCIENCE_SBM2_CWF_F2 |
|
357 | * - TM_LFR_SCIENCE_SBM2_CWF_F2 | |
351 | * |
|
358 | * | |
352 | */ |
|
359 | */ | |
353 |
|
360 | |||
354 | rtems_event_set event_out; |
|
361 | rtems_event_set event_out; | |
355 | rtems_id queue_id; |
|
362 | rtems_id queue_id; | |
356 |
|
363 | |||
357 | init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST ); |
|
364 | 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 ); |
|
365 | init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 ); | |
359 |
|
366 | |||
360 | queue_id = get_pkts_queue_id(); |
|
367 | queue_id = get_pkts_queue_id(); | |
361 |
|
368 | |||
362 | BOOT_PRINTF("in CWF2 ***\n") |
|
369 | BOOT_PRINTF("in CWF2 ***\n") | |
363 |
|
370 | |||
364 | while(1){ |
|
371 | while(1){ | |
365 | // wait for an RTEMS_EVENT |
|
372 | // wait for an RTEMS_EVENT | |
366 | rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2, |
|
373 | rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2, | |
367 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
374 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
368 |
|
375 | |||
369 | if (event_out == RTEMS_EVENT_MODE_BURST) |
|
376 | if (event_out == RTEMS_EVENT_MODE_BURST) | |
370 | { |
|
377 | { | |
371 | // F2 |
|
378 | // F2 | |
372 | #ifdef GSA |
|
379 | #ifdef GSA | |
373 | #else |
|
380 | #else | |
374 | if (new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { |
|
381 | if (new_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 ); |
|
382 | send_waveform_CWF( wf_snap_f2_bis, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); | |
376 | } |
|
383 | } | |
377 | else { |
|
384 | else { | |
378 | send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); |
|
385 | send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); | |
379 | } |
|
386 | } | |
380 | #endif |
|
387 | #endif | |
381 | } |
|
388 | } | |
382 |
|
389 | |||
383 | else if (event_out == RTEMS_EVENT_MODE_SBM2) |
|
390 | else if (event_out == RTEMS_EVENT_MODE_SBM2) | |
384 | { |
|
391 | { | |
385 | #ifdef GSA |
|
392 | #ifdef GSA | |
386 | #else |
|
393 | #else | |
387 | if (doubleSendCWF2 == 1) |
|
394 | if (doubleSendCWF2 == 1) | |
388 | { |
|
395 | { | |
389 | doubleSendCWF2 = 0; |
|
396 | doubleSendCWF2 = 0; | |
390 | send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); |
|
397 | send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); | |
391 | } |
|
398 | } | |
392 | else if (new_waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) { |
|
399 | else if (new_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 ); |
|
400 | send_waveform_CWF( wf_snap_f2_bis, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); | |
394 | } |
|
401 | } | |
395 | else { |
|
402 | else { | |
396 | send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); |
|
403 | send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); | |
397 | } |
|
404 | } | |
398 | param_local.local_sbm2_nb_cwf_sent ++; |
|
405 | param_local.local_sbm2_nb_cwf_sent ++; | |
399 | #endif |
|
406 | #endif | |
400 | } |
|
407 | } | |
401 | else |
|
408 | else | |
402 | { |
|
409 | { | |
403 | PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode) |
|
410 | PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode) | |
404 | } |
|
411 | } | |
405 | } |
|
412 | } | |
406 | } |
|
413 | } | |
407 |
|
414 | |||
408 | rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1 |
|
415 | rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1 | |
409 | { |
|
416 | { | |
410 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1. |
|
417 | /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1. | |
411 | * |
|
418 | * | |
412 | * @param unused is the starting argument of the RTEMS task |
|
419 | * @param unused is the starting argument of the RTEMS task | |
413 | * |
|
420 | * | |
414 | * The following data packet is sent by this function: |
|
421 | * The following data packet is sent by this function: | |
415 | * - TM_LFR_SCIENCE_SBM1_CWF_F1 |
|
422 | * - TM_LFR_SCIENCE_SBM1_CWF_F1 | |
416 | * |
|
423 | * | |
417 | */ |
|
424 | */ | |
418 |
|
425 | |||
419 | rtems_event_set event_out; |
|
426 | rtems_event_set event_out; | |
420 | rtems_id queue_id; |
|
427 | rtems_id queue_id; | |
421 |
|
428 | |||
422 | init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 ); |
|
429 | init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 ); | |
423 |
|
430 | |||
424 | queue_id = get_pkts_queue_id(); |
|
431 | queue_id = get_pkts_queue_id(); | |
425 |
|
432 | |||
426 | BOOT_PRINTF("in CWF1 ***\n") |
|
433 | BOOT_PRINTF("in CWF1 ***\n") | |
427 |
|
434 | |||
428 | while(1){ |
|
435 | while(1){ | |
429 | // wait for an RTEMS_EVENT |
|
436 | // wait for an RTEMS_EVENT | |
430 | rtems_event_receive( RTEMS_EVENT_MODE_SBM1, |
|
437 | rtems_event_receive( RTEMS_EVENT_MODE_SBM1, | |
431 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
438 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
432 | if (event_out == RTEMS_EVENT_MODE_SBM1) |
|
439 | if (event_out == RTEMS_EVENT_MODE_SBM1) | |
433 | { |
|
440 | { | |
434 | #ifdef GSA |
|
441 | #ifdef GSA | |
435 | #else |
|
442 | #else | |
436 | if (doubleSendCWF1 == 1) |
|
443 | if (doubleSendCWF1 == 1) | |
437 | { |
|
444 | { | |
438 | doubleSendCWF1 = 0; |
|
445 | doubleSendCWF1 = 0; | |
439 | send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); |
|
446 | send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); | |
440 | } |
|
447 | } | |
441 | else if (new_waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1) { |
|
448 | else if (new_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 ); |
|
449 | send_waveform_CWF( wf_snap_f1_bis, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); | |
443 | } |
|
450 | } | |
444 | else { |
|
451 | else { | |
445 | send_waveform_CWF( wf_snap_f1, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); |
|
452 | send_waveform_CWF( wf_snap_f1, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); | |
446 | } |
|
453 | } | |
447 | param_local.local_sbm1_nb_cwf_sent ++; |
|
454 | param_local.local_sbm1_nb_cwf_sent ++; | |
448 | #endif |
|
455 | #endif | |
449 | } |
|
456 | } | |
450 | else |
|
457 | else | |
451 | { |
|
458 | { | |
452 | PRINTF1("in CWF1 *** ERR mode = %d\n", lfrCurrentMode) |
|
459 | PRINTF1("in CWF1 *** ERR mode = %d\n", lfrCurrentMode) | |
453 | } |
|
460 | } | |
454 | } |
|
461 | } | |
455 | } |
|
462 | } | |
456 |
|
463 | |||
457 | //****************** |
|
464 | //****************** | |
458 | // general functions |
|
465 | // general functions | |
459 | void init_waveforms( void ) |
|
466 | void init_waveforms( void ) | |
460 | { |
|
467 | { | |
461 | int i = 0; |
|
468 | int i = 0; | |
462 |
|
469 | |||
463 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) |
|
470 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) | |
464 | { |
|
471 | { | |
|
472 | // //*** | |||
|
473 | // // F0 | |||
|
474 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; // | |||
|
475 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; // | |||
|
476 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; // | |||
|
477 | ||||
|
478 | // //*** | |||
|
479 | // // F1 | |||
|
480 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111; | |||
|
481 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333; | |||
|
482 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; | |||
|
483 | ||||
|
484 | // //*** | |||
|
485 | // // F2 | |||
|
486 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333; | |||
|
487 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; | |||
|
488 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; | |||
|
489 | ||||
465 | //*** |
|
490 | //*** | |
466 | // F0 |
|
491 | // F0 | |
467 |
wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x |
|
492 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x0; // | |
468 |
wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x |
|
493 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x0; // | |
469 |
wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x |
|
494 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x0; // | |
470 |
|
495 | |||
471 | //*** |
|
496 | //*** | |
472 | // F1 |
|
497 | // F1 | |
473 |
wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x |
|
498 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x0; | |
474 |
wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x |
|
499 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x0; | |
475 |
wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x |
|
500 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x0; | |
476 |
|
501 | |||
477 | //*** |
|
502 | //*** | |
478 | // F2 |
|
503 | // F2 | |
479 |
wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x |
|
504 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x0; | |
480 |
wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x |
|
505 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x0; | |
481 |
wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x |
|
506 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x0; | |
482 |
|
507 | |||
483 | //*** |
|
508 | //*** | |
484 | // F3 |
|
509 | // F3 | |
485 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1; |
|
510 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1; | |
486 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2; |
|
511 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2; | |
487 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000; |
|
512 | //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000; | |
488 | } |
|
513 | } | |
489 | } |
|
514 | } | |
490 |
|
515 | |||
491 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF) |
|
516 | int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF) | |
492 | { |
|
517 | { | |
493 | unsigned char i; |
|
518 | unsigned char i; | |
494 |
|
519 | |||
495 | for (i=0; i<7; i++) |
|
520 | for (i=0; i<7; i++) | |
496 | { |
|
521 | { | |
497 | headerSWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
522 | headerSWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; | |
498 | headerSWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
523 | headerSWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
499 | headerSWF[ i ].reserved = DEFAULT_RESERVED; |
|
524 | headerSWF[ i ].reserved = DEFAULT_RESERVED; | |
500 | headerSWF[ i ].userApplication = CCSDS_USER_APP; |
|
525 | headerSWF[ i ].userApplication = CCSDS_USER_APP; | |
501 | headerSWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
526 | 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); |
|
527 | headerSWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
503 | if (i == 0) |
|
528 | if (i == 0) | |
504 | { |
|
529 | { | |
505 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; |
|
530 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; | |
506 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8); |
|
531 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8); | |
507 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 ); |
|
532 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 ); | |
508 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
533 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
509 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
534 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
510 | } |
|
535 | } | |
511 | else if (i == 6) |
|
536 | else if (i == 6) | |
512 | { |
|
537 | { | |
513 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; |
|
538 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; | |
514 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_8 >> 8); |
|
539 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_8 >> 8); | |
515 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_8 ); |
|
540 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_8 ); | |
516 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); |
|
541 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); | |
517 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); |
|
542 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); | |
518 | } |
|
543 | } | |
519 | else |
|
544 | else | |
520 | { |
|
545 | { | |
521 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; |
|
546 | headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; | |
522 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8); |
|
547 | headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8); | |
523 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 ); |
|
548 | headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 ); | |
524 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
549 | headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
525 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
550 | headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
526 | } |
|
551 | } | |
527 | headerSWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
552 | headerSWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
528 | headerSWF[ i ].pktCnt = DEFAULT_PKTCNT; // PKT_CNT |
|
553 | headerSWF[ i ].pktCnt = DEFAULT_PKTCNT; // PKT_CNT | |
529 | headerSWF[ i ].pktNr = i+1; // PKT_NR |
|
554 | headerSWF[ i ].pktNr = i+1; // PKT_NR | |
530 | // DATA FIELD HEADER |
|
555 | // DATA FIELD HEADER | |
531 | headerSWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
556 | headerSWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
532 | headerSWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
557 | headerSWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
533 | headerSWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
558 | headerSWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
534 | headerSWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; |
|
559 | headerSWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; | |
535 | // AUXILIARY DATA HEADER |
|
560 | // AUXILIARY DATA HEADER | |
536 | headerSWF[ i ].sid = sid; |
|
561 | headerSWF[ i ].sid = sid; | |
537 | headerSWF[ i ].hkBIA = DEFAULT_HKBIA; |
|
562 | headerSWF[ i ].hkBIA = DEFAULT_HKBIA; | |
538 | headerSWF[ i ].time[0] = 0x00; |
|
563 | headerSWF[ i ].time[0] = 0x00; | |
539 | headerSWF[ i ].time[0] = 0x00; |
|
564 | headerSWF[ i ].time[0] = 0x00; | |
540 | headerSWF[ i ].time[0] = 0x00; |
|
565 | headerSWF[ i ].time[0] = 0x00; | |
541 | headerSWF[ i ].time[0] = 0x00; |
|
566 | headerSWF[ i ].time[0] = 0x00; | |
542 | headerSWF[ i ].time[0] = 0x00; |
|
567 | headerSWF[ i ].time[0] = 0x00; | |
543 | headerSWF[ i ].time[0] = 0x00; |
|
568 | headerSWF[ i ].time[0] = 0x00; | |
544 | } |
|
569 | } | |
545 | return LFR_SUCCESSFUL; |
|
570 | return LFR_SUCCESSFUL; | |
546 | } |
|
571 | } | |
547 |
|
572 | |||
548 | int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ) |
|
573 | int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF ) | |
549 | { |
|
574 | { | |
550 | unsigned int i; |
|
575 | unsigned int i; | |
551 |
|
576 | |||
552 | for (i=0; i<7; i++) |
|
577 | for (i=0; i<7; i++) | |
553 | { |
|
578 | { | |
554 | headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
579 | headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; | |
555 | headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
580 | headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
556 | headerCWF[ i ].reserved = DEFAULT_RESERVED; |
|
581 | headerCWF[ i ].reserved = DEFAULT_RESERVED; | |
557 | headerCWF[ i ].userApplication = CCSDS_USER_APP; |
|
582 | headerCWF[ i ].userApplication = CCSDS_USER_APP; | |
558 | if ( (sid == SID_SBM1_CWF_F1) || (sid == SID_SBM2_CWF_F2) ) |
|
583 | if ( (sid == SID_SBM1_CWF_F1) || (sid == SID_SBM2_CWF_F2) ) | |
559 | { |
|
584 | { | |
560 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2 >> 8); |
|
585 | 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); |
|
586 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2); | |
562 | } |
|
587 | } | |
563 | else |
|
588 | else | |
564 | { |
|
589 | { | |
565 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
590 | 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); |
|
591 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
567 | } |
|
592 | } | |
568 | if (i == 0) |
|
593 | if (i == 0) | |
569 | { |
|
594 | { | |
570 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; |
|
595 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; | |
571 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8); |
|
596 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8); | |
572 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 ); |
|
597 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 ); | |
573 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
598 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
574 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
599 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
575 | } |
|
600 | } | |
576 | else if (i == 6) |
|
601 | else if (i == 6) | |
577 | { |
|
602 | { | |
578 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; |
|
603 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; | |
579 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_8 >> 8); |
|
604 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_8 >> 8); | |
580 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_8 ); |
|
605 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_8 ); | |
581 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); |
|
606 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); | |
582 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); |
|
607 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); | |
583 | } |
|
608 | } | |
584 | else |
|
609 | else | |
585 | { |
|
610 | { | |
586 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; |
|
611 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; | |
587 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8); |
|
612 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8); | |
588 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 ); |
|
613 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 ); | |
589 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
614 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
590 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
615 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
591 | } |
|
616 | } | |
592 | headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
617 | headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
593 | // PKT_CNT |
|
618 | // PKT_CNT | |
594 | // PKT_NR |
|
619 | // PKT_NR | |
595 | // DATA FIELD HEADER |
|
620 | // DATA FIELD HEADER | |
596 | headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
621 | headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
597 | headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
622 | headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
598 | headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
623 | headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
599 | headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; |
|
624 | headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; | |
600 | // AUXILIARY DATA HEADER |
|
625 | // AUXILIARY DATA HEADER | |
601 | headerCWF[ i ].sid = sid; |
|
626 | headerCWF[ i ].sid = sid; | |
602 | headerCWF[ i ].hkBIA = DEFAULT_HKBIA; |
|
627 | headerCWF[ i ].hkBIA = DEFAULT_HKBIA; | |
603 | headerCWF[ i ].time[0] = 0x00; |
|
628 | headerCWF[ i ].time[0] = 0x00; | |
604 | headerCWF[ i ].time[0] = 0x00; |
|
629 | headerCWF[ i ].time[0] = 0x00; | |
605 | headerCWF[ i ].time[0] = 0x00; |
|
630 | headerCWF[ i ].time[0] = 0x00; | |
606 | headerCWF[ i ].time[0] = 0x00; |
|
631 | headerCWF[ i ].time[0] = 0x00; | |
607 | headerCWF[ i ].time[0] = 0x00; |
|
632 | headerCWF[ i ].time[0] = 0x00; | |
608 | headerCWF[ i ].time[0] = 0x00; |
|
633 | headerCWF[ i ].time[0] = 0x00; | |
609 | } |
|
634 | } | |
610 | return LFR_SUCCESSFUL; |
|
635 | return LFR_SUCCESSFUL; | |
611 | } |
|
636 | } | |
612 |
|
637 | |||
613 | int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ) |
|
638 | int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF ) | |
614 | { |
|
639 | { | |
615 | unsigned int i; |
|
640 | unsigned int i; | |
616 |
|
641 | |||
617 | for (i=0; i<7; i++) |
|
642 | for (i=0; i<7; i++) | |
618 | { |
|
643 | { | |
619 | headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
644 | headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID; | |
620 | headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
645 | headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
621 | headerCWF[ i ].reserved = DEFAULT_RESERVED; |
|
646 | headerCWF[ i ].reserved = DEFAULT_RESERVED; | |
622 | headerCWF[ i ].userApplication = CCSDS_USER_APP; |
|
647 | headerCWF[ i ].userApplication = CCSDS_USER_APP; | |
623 |
|
648 | |||
624 | headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8); |
|
649 | 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); |
|
650 | headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST); | |
626 | if (i == 0) |
|
651 | if (i == 0) | |
627 | { |
|
652 | { | |
628 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; |
|
653 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST; | |
629 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8); |
|
654 | 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 ); |
|
655 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 ); | |
631 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
656 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
632 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
657 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
633 | } |
|
658 | } | |
634 | else if (i == 6) |
|
659 | else if (i == 6) | |
635 | { |
|
660 | { | |
636 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; |
|
661 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST; | |
637 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 >> 8); |
|
662 | 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 ); |
|
663 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 ); | |
639 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); |
|
664 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8); | |
640 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); |
|
665 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 ); | |
641 | } |
|
666 | } | |
642 | else |
|
667 | else | |
643 | { |
|
668 | { | |
644 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; |
|
669 | headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION; | |
645 | headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8); |
|
670 | 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 ); |
|
671 | headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 ); | |
647 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); |
|
672 | headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8); | |
648 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); |
|
673 | headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 ); | |
649 | } |
|
674 | } | |
650 | headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
675 | headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
651 | // DATA FIELD HEADER |
|
676 | // DATA FIELD HEADER | |
652 | headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
677 | headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
653 | headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type |
|
678 | headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type | |
654 | headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype |
|
679 | headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype | |
655 | headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; |
|
680 | headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND; | |
656 | // AUXILIARY DATA HEADER |
|
681 | // AUXILIARY DATA HEADER | |
657 | headerCWF[ i ].sid = SID_NORM_CWF_F3; |
|
682 | headerCWF[ i ].sid = SID_NORM_CWF_F3; | |
658 | headerCWF[ i ].hkBIA = DEFAULT_HKBIA; |
|
683 | headerCWF[ i ].hkBIA = DEFAULT_HKBIA; | |
659 | headerCWF[ i ].time[0] = 0x00; |
|
684 | headerCWF[ i ].time[0] = 0x00; | |
660 | headerCWF[ i ].time[0] = 0x00; |
|
685 | headerCWF[ i ].time[0] = 0x00; | |
661 | headerCWF[ i ].time[0] = 0x00; |
|
686 | headerCWF[ i ].time[0] = 0x00; | |
662 | headerCWF[ i ].time[0] = 0x00; |
|
687 | headerCWF[ i ].time[0] = 0x00; | |
663 | headerCWF[ i ].time[0] = 0x00; |
|
688 | headerCWF[ i ].time[0] = 0x00; | |
664 | headerCWF[ i ].time[0] = 0x00; |
|
689 | headerCWF[ i ].time[0] = 0x00; | |
665 | } |
|
690 | } | |
666 | return LFR_SUCCESSFUL; |
|
691 | return LFR_SUCCESSFUL; | |
667 | } |
|
692 | } | |
668 |
|
693 | |||
669 | void reset_waveforms( void ) |
|
694 | void reset_waveforms( void ) | |
670 | { |
|
695 | { | |
671 | int i = 0; |
|
696 | int i = 0; | |
672 |
|
697 | |||
673 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) |
|
698 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) | |
674 | { |
|
699 | { | |
675 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x10002000; |
|
700 | 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; |
|
701 | 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; |
|
702 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000; | |
678 |
|
703 | |||
679 | //*** |
|
704 | //*** | |
680 | // F1 |
|
705 | // F1 | |
681 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x1000f000; |
|
706 | 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; |
|
707 | 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; |
|
708 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000; | |
684 |
|
709 | |||
685 | //*** |
|
710 | //*** | |
686 | // F2 |
|
711 | // F2 | |
687 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x40008000; |
|
712 | 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; |
|
713 | 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; |
|
714 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x10002000; | |
690 |
|
715 | |||
691 | //*** |
|
716 | //*** | |
692 | // F3 |
|
717 | // F3 | |
693 | /*wf_cont_f3[ i* NB_WORDS_SWF_BLK + 0 ] = build_value( i, i ); // v and 1 |
|
718 | /*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 |
|
719 | 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*/ |
|
720 | wf_cont_f3[ i* NB_WORDS_SWF_BLK + 2 ] = build_value( i, i ); // b2 and b3*/ | |
696 | } |
|
721 | } | |
697 | } |
|
722 | } | |
698 |
|
723 | |||
699 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, |
|
724 | int send_waveform_SWF( volatile int *waveform, unsigned int sid, | |
700 | Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ) |
|
725 | Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id ) | |
701 | { |
|
726 | { | |
702 | /** This function sends SWF CCSDS packets (F2, F1 or F0). |
|
727 | /** This function sends SWF CCSDS packets (F2, F1 or F0). | |
703 | * |
|
728 | * | |
704 | * @param waveform points to the buffer containing the data that will be send. |
|
729 | * @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. |
|
730 | * @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. |
|
731 | * @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 |
|
732 | * @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. |
|
733 | * contain information to setup the transmission of the data packets. | |
709 | * |
|
734 | * | |
710 | * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks. |
|
735 | * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks. | |
711 | * |
|
736 | * | |
712 | */ |
|
737 | */ | |
713 |
|
738 | |||
714 | unsigned int i; |
|
739 | unsigned int i; | |
715 | int ret; |
|
740 | int ret; | |
716 | rtems_status_code status; |
|
741 | rtems_status_code status; | |
717 | spw_ioctl_pkt_send spw_ioctl_send_SWF; |
|
742 | spw_ioctl_pkt_send spw_ioctl_send_SWF; | |
718 |
|
743 | |||
719 | spw_ioctl_send_SWF.hlen = TM_HEADER_LEN + 4 + 12; // + 4 is for the protocole extra header, + 12 is for the auxiliary header |
|
744 | 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; |
|
745 | spw_ioctl_send_SWF.options = 0; | |
721 |
|
746 | |||
722 | ret = LFR_DEFAULT; |
|
747 | ret = LFR_DEFAULT; | |
723 |
|
748 | |||
724 | for (i=0; i<7; i++) // send waveform |
|
749 | for (i=0; i<7; i++) // send waveform | |
725 | { |
|
750 | { | |
726 | spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; |
|
751 | spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) + TIME_OFFSET ]; | |
727 | spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ]; |
|
752 | spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ]; | |
728 | // BUILD THE DATA |
|
753 | // BUILD THE DATA | |
729 | if (i==6) { |
|
754 | if (i==6) { | |
730 | spw_ioctl_send_SWF.dlen = 8 * NB_BYTES_SWF_BLK; |
|
755 | spw_ioctl_send_SWF.dlen = 8 * NB_BYTES_SWF_BLK; | |
731 | } |
|
756 | } | |
732 | else { |
|
757 | else { | |
733 | spw_ioctl_send_SWF.dlen = 340 * NB_BYTES_SWF_BLK; |
|
758 | spw_ioctl_send_SWF.dlen = 340 * NB_BYTES_SWF_BLK; | |
734 | } |
|
759 | } | |
735 | // SET PACKET SEQUENCE COUNTER |
|
760 | // SET PACKET SEQUENCE COUNTER | |
736 | increment_seq_counter_source_id( headerSWF[ i ].packetSequenceControl, sid ); |
|
761 | increment_seq_counter_source_id( headerSWF[ i ].packetSequenceControl, sid ); | |
737 | // SET PACKET TIME |
|
762 | // SET PACKET TIME | |
738 | headerSWF[ i ].acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
763 | headerSWF[ i ].acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
739 | headerSWF[ i ].acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
764 | headerSWF[ i ].acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
740 | headerSWF[ i ].acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
765 | headerSWF[ i ].acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
741 | headerSWF[ i ].acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); |
|
766 | headerSWF[ i ].acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time); | |
742 | headerSWF[ i ].acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
767 | headerSWF[ i ].acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
743 | headerSWF[ i ].acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); |
|
768 | headerSWF[ i ].acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time); | |
744 | headerSWF[ i ].time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
769 | headerSWF[ i ].time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
745 | headerSWF[ i ].time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
770 | headerSWF[ i ].time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
746 | headerSWF[ i ].time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
771 | headerSWF[ i ].time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
747 | headerSWF[ i ].time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
772 | headerSWF[ i ].time[3] = (unsigned char) (time_management_regs->coarse_time); | |
748 | headerSWF[ i ].time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
773 | headerSWF[ i ].time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
749 | headerSWF[ i ].time[5] = (unsigned char) (time_management_regs->fine_time); |
|
774 | headerSWF[ i ].time[5] = (unsigned char) (time_management_regs->fine_time); | |
750 | // SEND PACKET |
|
775 | // SEND PACKET | |
751 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_SWF, ACTION_MSG_SPW_IOCTL_SEND_SIZE); |
|
776 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_SWF, ACTION_MSG_SPW_IOCTL_SEND_SIZE); | |
752 | if (status != RTEMS_SUCCESSFUL) { |
|
777 | if (status != RTEMS_SUCCESSFUL) { | |
753 | printf("%d-%d, ERR %d\n", sid, i, (int) status); |
|
778 | printf("%d-%d, ERR %d\n", sid, i, (int) status); | |
754 | ret = LFR_DEFAULT; |
|
779 | ret = LFR_DEFAULT; | |
755 | } |
|
780 | } | |
756 | rtems_task_wake_after(TIME_BETWEEN_TWO_SWF_PACKETS); // 300 ms between each packet => 7 * 3 = 21 packets => 6.3 seconds |
|
781 | rtems_task_wake_after(TIME_BETWEEN_TWO_SWF_PACKETS); // 300 ms between each packet => 7 * 3 = 21 packets => 6.3 seconds | |
757 | } |
|
782 | } | |
758 |
|
783 | |||
759 | return ret; |
|
784 | return ret; | |
760 | } |
|
785 | } | |
761 |
|
786 | |||
762 | int send_waveform_CWF(volatile int *waveform, unsigned int sid, |
|
787 | int send_waveform_CWF(volatile int *waveform, unsigned int sid, | |
763 | Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id) |
|
788 | Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id) | |
764 | { |
|
789 | { | |
765 | /** This function sends CWF CCSDS packets (F2, F1 or F0). |
|
790 | /** This function sends CWF CCSDS packets (F2, F1 or F0). | |
766 | * |
|
791 | * | |
767 | * @param waveform points to the buffer containing the data that will be send. |
|
792 | * @param waveform points to the buffer containing the data that will be send. | |
768 | * @param sid is the source identifier of the data that will be sent. |
|
793 | * @param sid is the source identifier of the data that will be sent. | |
769 | * @param headerCWF points to a table of headers that have been prepared for the data transmission. |
|
794 | * @param headerCWF points to a table of headers that have been prepared for the data transmission. | |
770 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures |
|
795 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures | |
771 | * contain information to setup the transmission of the data packets. |
|
796 | * contain information to setup the transmission of the data packets. | |
772 | * |
|
797 | * | |
773 | * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks. |
|
798 | * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks. | |
774 | * |
|
799 | * | |
775 | */ |
|
800 | */ | |
776 |
|
801 | |||
777 | unsigned int i; |
|
802 | unsigned int i; | |
778 | int ret; |
|
803 | int ret; | |
779 | rtems_status_code status; |
|
804 | rtems_status_code status; | |
780 | spw_ioctl_pkt_send spw_ioctl_send_CWF; |
|
805 | spw_ioctl_pkt_send spw_ioctl_send_CWF; | |
781 |
|
806 | |||
782 | spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header |
|
807 | spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header | |
783 | spw_ioctl_send_CWF.options = 0; |
|
808 | spw_ioctl_send_CWF.options = 0; | |
784 |
|
809 | |||
785 | ret = LFR_DEFAULT; |
|
810 | ret = LFR_DEFAULT; | |
786 |
|
811 | |||
787 | for (i=0; i<7; i++) // send waveform |
|
812 | for (i=0; i<7; i++) // send waveform | |
788 | { |
|
813 | { | |
789 | int coarseTime = 0x00; |
|
814 | int coarseTime = 0x00; | |
790 | int fineTime = 0x00; |
|
815 | int fineTime = 0x00; | |
791 | spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; |
|
816 | spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; | |
792 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; |
|
817 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; | |
793 | // BUILD THE DATA |
|
818 | // BUILD THE DATA | |
794 | if (i==6) { |
|
819 | if (i==6) { | |
795 | spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_SWF_BLK; |
|
820 | spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_SWF_BLK; | |
796 | } |
|
821 | } | |
797 | else { |
|
822 | else { | |
798 | spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_SWF_BLK; |
|
823 | spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_SWF_BLK; | |
799 | } |
|
824 | } | |
800 | // SET PACKET SEQUENCE COUNTER |
|
825 | // SET PACKET SEQUENCE COUNTER | |
801 | increment_seq_counter_source_id( headerCWF[ i ].packetSequenceControl, sid ); |
|
826 | increment_seq_counter_source_id( headerCWF[ i ].packetSequenceControl, sid ); | |
802 | // SET PACKET TIME |
|
827 | // SET PACKET TIME | |
803 | coarseTime = time_management_regs->coarse_time; |
|
828 | coarseTime = time_management_regs->coarse_time; | |
804 | fineTime = time_management_regs->fine_time; |
|
829 | fineTime = time_management_regs->fine_time; | |
805 | headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24); |
|
830 | headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24); | |
806 | headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16); |
|
831 | headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16); | |
807 | headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8); |
|
832 | headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8); | |
808 | headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime); |
|
833 | headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime); | |
809 | headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8); |
|
834 | headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8); | |
810 | headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime); |
|
835 | headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime); | |
811 | headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24); |
|
836 | headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24); | |
812 | headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16); |
|
837 | headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16); | |
813 | headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8); |
|
838 | headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8); | |
814 | headerCWF[ i ].time[3] = (unsigned char) (coarseTime); |
|
839 | headerCWF[ i ].time[3] = (unsigned char) (coarseTime); | |
815 | headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8); |
|
840 | headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8); | |
816 | headerCWF[ i ].time[5] = (unsigned char) (fineTime); |
|
841 | headerCWF[ i ].time[5] = (unsigned char) (fineTime); | |
817 | // SEND PACKET |
|
842 | // SEND PACKET | |
818 | if (sid == SID_NORM_CWF_F3) |
|
843 | if (sid == SID_NORM_CWF_F3) | |
819 | { |
|
844 | { | |
820 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); |
|
845 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); | |
821 | if (status != RTEMS_SUCCESSFUL) { |
|
846 | if (status != RTEMS_SUCCESSFUL) { | |
822 | printf("%d-%d, ERR %d\n", sid, i, (int) status); |
|
847 | printf("%d-%d, ERR %d\n", sid, i, (int) status); | |
823 | ret = LFR_DEFAULT; |
|
848 | ret = LFR_DEFAULT; | |
824 | } |
|
849 | } | |
825 | rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS); |
|
850 | rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS); | |
826 | } |
|
851 | } | |
827 | else |
|
852 | else | |
828 | { |
|
853 | { | |
829 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); |
|
854 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); | |
830 | if (status != RTEMS_SUCCESSFUL) { |
|
855 | if (status != RTEMS_SUCCESSFUL) { | |
831 | printf("%d-%d, ERR %d\n", sid, i, (int) status); |
|
856 | printf("%d-%d, ERR %d\n", sid, i, (int) status); | |
832 | ret = LFR_DEFAULT; |
|
857 | ret = LFR_DEFAULT; | |
833 | } |
|
858 | } | |
834 | } |
|
859 | } | |
835 | } |
|
860 | } | |
836 |
|
861 | |||
837 | return ret; |
|
862 | return ret; | |
838 | } |
|
863 | } | |
839 |
|
864 | |||
840 | int send_waveform_CWF3_light(volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id) |
|
865 | int send_waveform_CWF3_light(volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id) | |
841 | { |
|
866 | { | |
842 | /** This function sends CWF_F3 CCSDS packets without the b1, b2 and b3 data. |
|
867 | /** This function sends CWF_F3 CCSDS packets without the b1, b2 and b3 data. | |
843 | * |
|
868 | * | |
844 | * @param waveform points to the buffer containing the data that will be send. |
|
869 | * @param waveform points to the buffer containing the data that will be send. | |
845 | * @param headerCWF points to a table of headers that have been prepared for the data transmission. |
|
870 | * @param headerCWF points to a table of headers that have been prepared for the data transmission. | |
846 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures |
|
871 | * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures | |
847 | * contain information to setup the transmission of the data packets. |
|
872 | * contain information to setup the transmission of the data packets. | |
848 | * |
|
873 | * | |
849 | * By default, CWF_F3 packet are send without the b1, b2 and b3 data. This function rebuilds a data buffer |
|
874 | * By default, CWF_F3 packet are send without the b1, b2 and b3 data. This function rebuilds a data buffer | |
850 | * from the incoming data and sends it in 7 packets, 6 containing 340 blocks and 1 one containing 8 blocks. |
|
875 | * from the incoming data and sends it in 7 packets, 6 containing 340 blocks and 1 one containing 8 blocks. | |
851 | * |
|
876 | * | |
852 | */ |
|
877 | */ | |
853 |
|
878 | |||
854 | unsigned int i; |
|
879 | unsigned int i; | |
855 | int ret; |
|
880 | int ret; | |
856 | rtems_status_code status; |
|
881 | rtems_status_code status; | |
857 | spw_ioctl_pkt_send spw_ioctl_send_CWF; |
|
882 | spw_ioctl_pkt_send spw_ioctl_send_CWF; | |
858 | char *sample; |
|
883 | char *sample; | |
859 |
|
884 | |||
860 | spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header |
|
885 | spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header | |
861 | spw_ioctl_send_CWF.options = 0; |
|
886 | spw_ioctl_send_CWF.options = 0; | |
862 |
|
887 | |||
863 | ret = LFR_DEFAULT; |
|
888 | ret = LFR_DEFAULT; | |
864 |
|
889 | |||
865 | //********************** |
|
890 | //********************** | |
866 | // BUILD CWF3_light DATA |
|
891 | // BUILD CWF3_light DATA | |
867 | for ( i=0; i< 2048; i++) |
|
892 | for ( i=0; i< 2048; i++) | |
868 | { |
|
893 | { | |
869 | sample = (char*) &waveform[ i * NB_WORDS_SWF_BLK ]; |
|
894 | sample = (char*) &waveform[ i * NB_WORDS_SWF_BLK ]; | |
870 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) ] = sample[ 0 ]; |
|
895 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) ] = sample[ 0 ]; | |
871 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 1 ] = sample[ 1 ]; |
|
896 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 1 ] = sample[ 1 ]; | |
872 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 2 ] = sample[ 2 ]; |
|
897 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 2 ] = sample[ 2 ]; | |
873 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 3 ] = sample[ 3 ]; |
|
898 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 3 ] = sample[ 3 ]; | |
874 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 4 ] = sample[ 4 ]; |
|
899 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 4 ] = sample[ 4 ]; | |
875 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 5 ] = sample[ 5 ]; |
|
900 | wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 5 ] = sample[ 5 ]; | |
876 | } |
|
901 | } | |
877 |
|
902 | |||
878 | //********************* |
|
903 | //********************* | |
879 | // SEND CWF3_light DATA |
|
904 | // SEND CWF3_light DATA | |
880 |
|
905 | |||
881 | for (i=0; i<7; i++) // send waveform |
|
906 | for (i=0; i<7; i++) // send waveform | |
882 | { |
|
907 | { | |
883 | int coarseTime = 0x00; |
|
908 | int coarseTime = 0x00; | |
884 | int fineTime = 0x00; |
|
909 | int fineTime = 0x00; | |
885 | spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ]; |
|
910 | spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ]; | |
886 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; |
|
911 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; | |
887 | // BUILD THE DATA |
|
912 | // BUILD THE DATA | |
888 | if ( i == WFRM_INDEX_OF_LAST_PACKET ) { |
|
913 | if ( i == WFRM_INDEX_OF_LAST_PACKET ) { | |
889 | spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_CWF3_LIGHT_BLK; |
|
914 | spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_CWF3_LIGHT_BLK; | |
890 | } |
|
915 | } | |
891 | else { |
|
916 | else { | |
892 | spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_CWF3_LIGHT_BLK; |
|
917 | spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_CWF3_LIGHT_BLK; | |
893 | } |
|
918 | } | |
894 | // SET PACKET SEQUENCE COUNTER |
|
919 | // SET PACKET SEQUENCE COUNTER | |
895 | increment_seq_counter_source_id( headerCWF[ i ].packetSequenceControl, SID_NORM_CWF_F3 ); |
|
920 | increment_seq_counter_source_id( headerCWF[ i ].packetSequenceControl, SID_NORM_CWF_F3 ); | |
896 | // SET PACKET TIME |
|
921 | // SET PACKET TIME | |
897 | coarseTime = time_management_regs->coarse_time; |
|
922 | coarseTime = time_management_regs->coarse_time; | |
898 | fineTime = time_management_regs->fine_time; |
|
923 | fineTime = time_management_regs->fine_time; | |
899 | headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24); |
|
924 | headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24); | |
900 | headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16); |
|
925 | headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16); | |
901 | headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8); |
|
926 | headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8); | |
902 | headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime); |
|
927 | headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime); | |
903 | headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8); |
|
928 | headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8); | |
904 | headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime); |
|
929 | headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime); | |
905 | headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24); |
|
930 | headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24); | |
906 | headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16); |
|
931 | headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16); | |
907 | headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8); |
|
932 | headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8); | |
908 | headerCWF[ i ].time[3] = (unsigned char) (coarseTime); |
|
933 | headerCWF[ i ].time[3] = (unsigned char) (coarseTime); | |
909 | headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8); |
|
934 | headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8); | |
910 | headerCWF[ i ].time[5] = (unsigned char) (fineTime); |
|
935 | headerCWF[ i ].time[5] = (unsigned char) (fineTime); | |
911 | // SEND PACKET |
|
936 | // SEND PACKET | |
912 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); |
|
937 | status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF)); | |
913 | if (status != RTEMS_SUCCESSFUL) { |
|
938 | if (status != RTEMS_SUCCESSFUL) { | |
914 | printf("%d-%d, ERR %d\n", SID_NORM_CWF_F3, i, (int) status); |
|
939 | printf("%d-%d, ERR %d\n", SID_NORM_CWF_F3, i, (int) status); | |
915 | ret = LFR_DEFAULT; |
|
940 | ret = LFR_DEFAULT; | |
916 | } |
|
941 | } | |
917 | rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS); |
|
942 | rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS); | |
918 | } |
|
943 | } | |
919 |
|
944 | |||
920 | return ret; |
|
945 | return ret; | |
921 | } |
|
946 | } | |
922 |
|
947 | |||
923 |
|
948 | |||
924 | //************** |
|
949 | //************** | |
925 | // wfp registers |
|
950 | // wfp registers | |
926 | void set_wfp_data_shaping() |
|
951 | void set_wfp_data_shaping() | |
927 | { |
|
952 | { | |
928 | /** This function sets the data_shaping register of the waveform picker module. |
|
953 | /** This function sets the data_shaping register of the waveform picker module. | |
929 | * |
|
954 | * | |
930 | * The value is read from one field of the parameter_dump_packet structure:\n |
|
955 | * The value is read from one field of the parameter_dump_packet structure:\n | |
931 | * bw_sp0_sp1_r0_r1 |
|
956 | * bw_sp0_sp1_r0_r1 | |
932 | * |
|
957 | * | |
933 | */ |
|
958 | */ | |
934 |
|
959 | |||
935 | unsigned char data_shaping; |
|
960 | unsigned char data_shaping; | |
936 |
|
961 | |||
937 | // get the parameters for the data shaping [BW SP0 SP1 R0 R1] in sy_lfr_common1 and configure the register |
|
962 | // get the parameters for the data shaping [BW SP0 SP1 R0 R1] in sy_lfr_common1 and configure the register | |
938 | // waveform picker : [R1 R0 SP1 SP0 BW] |
|
963 | // waveform picker : [R1 R0 SP1 SP0 BW] | |
939 |
|
964 | |||
940 | data_shaping = parameter_dump_packet.bw_sp0_sp1_r0_r1; |
|
965 | data_shaping = parameter_dump_packet.bw_sp0_sp1_r0_r1; | |
941 |
|
966 | |||
942 | #ifdef GSA |
|
967 | #ifdef GSA | |
943 | #else |
|
968 | #else | |
944 | new_waveform_picker_regs->data_shaping = |
|
969 | new_waveform_picker_regs->data_shaping = | |
945 | ( (data_shaping & 0x10) >> 4 ) // BW |
|
970 | ( (data_shaping & 0x10) >> 4 ) // BW | |
946 | + ( (data_shaping & 0x08) >> 2 ) // SP0 |
|
971 | + ( (data_shaping & 0x08) >> 2 ) // SP0 | |
947 | + ( (data_shaping & 0x04) ) // SP1 |
|
972 | + ( (data_shaping & 0x04) ) // SP1 | |
948 | + ( (data_shaping & 0x02) << 2 ) // R0 |
|
973 | + ( (data_shaping & 0x02) << 2 ) // R0 | |
949 | + ( (data_shaping & 0x01) << 4 ); // R1 |
|
974 | + ( (data_shaping & 0x01) << 4 ); // R1 | |
950 | #endif |
|
975 | #endif | |
951 | } |
|
976 | } | |
952 |
|
977 | |||
953 | char set_wfp_delta_snapshot() |
|
978 | char set_wfp_delta_snapshot() | |
954 | { |
|
979 | { | |
955 | /** This function sets the delta_snapshot register of the waveform picker module. |
|
980 | /** This function sets the delta_snapshot register of the waveform picker module. | |
956 | * |
|
981 | * | |
957 | * The value is read from two (unsigned char) of the parameter_dump_packet structure: |
|
982 | * The value is read from two (unsigned char) of the parameter_dump_packet structure: | |
958 | * - sy_lfr_n_swf_p[0] |
|
983 | * - sy_lfr_n_swf_p[0] | |
959 | * - sy_lfr_n_swf_p[1] |
|
984 | * - sy_lfr_n_swf_p[1] | |
960 | * |
|
985 | * | |
961 | */ |
|
986 | */ | |
962 |
|
987 | |||
963 | char ret; |
|
988 | char ret; | |
964 | unsigned int delta_snapshot; |
|
989 | unsigned int delta_snapshot; | |
965 | unsigned int aux; |
|
990 | unsigned int aux; | |
966 |
|
991 | |||
967 | aux = 0; |
|
992 | aux = 0; | |
968 | ret = LFR_DEFAULT; |
|
993 | ret = LFR_DEFAULT; | |
969 |
|
994 | |||
970 | delta_snapshot = parameter_dump_packet.sy_lfr_n_swf_p[0]*256 |
|
995 | delta_snapshot = parameter_dump_packet.sy_lfr_n_swf_p[0]*256 | |
971 | + parameter_dump_packet.sy_lfr_n_swf_p[1]; |
|
996 | + parameter_dump_packet.sy_lfr_n_swf_p[1]; | |
972 |
|
997 | |||
973 | #ifdef GSA |
|
998 | #ifdef GSA | |
974 | #else |
|
999 | #else | |
975 | if ( delta_snapshot < MIN_DELTA_SNAPSHOT ) |
|
1000 | if ( delta_snapshot < MIN_DELTA_SNAPSHOT ) | |
976 | { |
|
1001 | { | |
977 | aux = MIN_DELTA_SNAPSHOT; |
|
1002 | aux = MIN_DELTA_SNAPSHOT; | |
978 | ret = LFR_DEFAULT; |
|
1003 | ret = LFR_DEFAULT; | |
979 | } |
|
1004 | } | |
980 | else |
|
1005 | else | |
981 | { |
|
1006 | { | |
982 | aux = delta_snapshot ; |
|
1007 | aux = delta_snapshot ; | |
983 | ret = LFR_SUCCESSFUL; |
|
1008 | ret = LFR_SUCCESSFUL; | |
984 | } |
|
1009 | } | |
985 | new_waveform_picker_regs->delta_snapshot = aux - 1; // max 2 bytes |
|
1010 | new_waveform_picker_regs->delta_snapshot = aux - 1; // max 2 bytes | |
986 | #endif |
|
1011 | #endif | |
987 |
|
1012 | |||
988 | return ret; |
|
1013 | return ret; | |
989 | } |
|
1014 | } | |
990 |
|
1015 | |||
991 | void set_wfp_burst_enable_register( unsigned char mode) |
|
1016 | void set_wfp_burst_enable_register( unsigned char mode) | |
992 | { |
|
1017 | { | |
993 | /** This function sets the waveform picker burst_enable register depending on the mode. |
|
1018 | /** This function sets the waveform picker burst_enable register depending on the mode. | |
994 | * |
|
1019 | * | |
995 | * @param mode is the LFR mode to launch. |
|
1020 | * @param mode is the LFR mode to launch. | |
996 | * |
|
1021 | * | |
997 | * The burst bits shall be before the enable bits. |
|
1022 | * The burst bits shall be before the enable bits. | |
998 | * |
|
1023 | * | |
999 | */ |
|
1024 | */ | |
1000 |
|
1025 | |||
1001 | #ifdef GSA |
|
1026 | #ifdef GSA | |
1002 | #else |
|
1027 | #else | |
1003 | // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0 |
|
1028 | // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0 | |
1004 | // the burst bits shall be set first, before the enable bits |
|
1029 | // the burst bits shall be set first, before the enable bits | |
1005 | switch(mode) { |
|
1030 | switch(mode) { | |
1006 | case(LFR_MODE_NORMAL): |
|
1031 | case(LFR_MODE_NORMAL): | |
1007 | new_waveform_picker_regs->run_burst_enable = 0x00; // [0000 0000] no burst enable |
|
1032 | new_waveform_picker_regs->run_burst_enable = 0x00; // [0000 0000] no burst enable | |
1008 | // new_waveform_picker_regs->run_burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0 |
|
1033 | // new_waveform_picker_regs->run_burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0 | |
1009 | new_waveform_picker_regs->run_burst_enable = 0x07; // [0000 0111] enable f2 f1 f0 |
|
1034 | new_waveform_picker_regs->run_burst_enable = 0x07; // [0000 0111] enable f2 f1 f0 | |
1010 | break; |
|
1035 | break; | |
1011 | case(LFR_MODE_BURST): |
|
1036 | case(LFR_MODE_BURST): | |
1012 | new_waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled |
|
1037 | new_waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled | |
1013 | new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x04; // [0100] enable f2 |
|
1038 | new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x04; // [0100] enable f2 | |
1014 | break; |
|
1039 | break; | |
1015 | case(LFR_MODE_SBM1): |
|
1040 | case(LFR_MODE_SBM1): | |
1016 | new_waveform_picker_regs->run_burst_enable = 0x20; // [0010 0000] f1 burst enabled |
|
1041 | new_waveform_picker_regs->run_burst_enable = 0x20; // [0010 0000] f1 burst enabled | |
1017 | new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 |
|
1042 | new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 | |
1018 | break; |
|
1043 | break; | |
1019 | case(LFR_MODE_SBM2): |
|
1044 | case(LFR_MODE_SBM2): | |
1020 | new_waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled |
|
1045 | new_waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled | |
1021 | new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 |
|
1046 | new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 | |
1022 | break; |
|
1047 | break; | |
1023 | default: |
|
1048 | default: | |
1024 | new_waveform_picker_regs->run_burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled |
|
1049 | new_waveform_picker_regs->run_burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled | |
1025 | break; |
|
1050 | break; | |
1026 | } |
|
1051 | } | |
1027 | #endif |
|
1052 | #endif | |
1028 | } |
|
1053 | } | |
1029 |
|
1054 | |||
1030 | void reset_wfp_run_burst_enable() |
|
1055 | void reset_wfp_run_burst_enable() | |
1031 | { |
|
1056 | { | |
1032 | /** This function resets the waveform picker burst_enable register. |
|
1057 | /** This function resets the waveform picker burst_enable register. | |
1033 | * |
|
1058 | * | |
1034 | * The burst bits [f2 f1 f0] and the enable bits [f3 f2 f1 f0] are set to 0. |
|
1059 | * The burst bits [f2 f1 f0] and the enable bits [f3 f2 f1 f0] are set to 0. | |
1035 | * |
|
1060 | * | |
1036 | */ |
|
1061 | */ | |
1037 |
|
1062 | |||
1038 | #ifdef GSA |
|
1063 | #ifdef GSA | |
1039 | #else |
|
1064 | #else | |
1040 | new_waveform_picker_regs->run_burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 |
|
1065 | new_waveform_picker_regs->run_burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 | |
1041 | #endif |
|
1066 | #endif | |
1042 | } |
|
1067 | } | |
1043 |
|
1068 | |||
1044 | void reset_wfp_status() |
|
1069 | void reset_wfp_status() | |
1045 | { |
|
1070 | { | |
1046 | /** This function resets the waveform picker status register. |
|
1071 | /** This function resets the waveform picker status register. | |
1047 | * |
|
1072 | * | |
1048 | * All status bits are set to 0 [new_err full_err full]. |
|
1073 | * All status bits are set to 0 [new_err full_err full]. | |
1049 | * |
|
1074 | * | |
1050 | */ |
|
1075 | */ | |
1051 |
|
1076 | |||
1052 | #ifdef GSA |
|
1077 | #ifdef GSA | |
1053 | #else |
|
1078 | #else | |
1054 | new_waveform_picker_regs->status = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 |
|
1079 | new_waveform_picker_regs->status = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 | |
1055 | #endif |
|
1080 | #endif | |
1056 | } |
|
1081 | } | |
1057 |
|
1082 | |||
1058 | void reset_new_waveform_picker_regs() |
|
1083 | void reset_new_waveform_picker_regs() | |
1059 | { |
|
1084 | { | |
1060 | /** This function resets the waveform picker module registers. |
|
1085 | /** This function resets the waveform picker module registers. | |
1061 | * |
|
1086 | * | |
1062 | * The registers affected by this function are located at the following offset addresses: |
|
1087 | * The registers affected by this function are located at the following offset addresses: | |
1063 | * - 0x00 data_shaping |
|
1088 | * - 0x00 data_shaping | |
1064 | * - 0x04 run_burst_enable |
|
1089 | * - 0x04 run_burst_enable | |
1065 | * - 0x08 addr_data_f0 |
|
1090 | * - 0x08 addr_data_f0 | |
1066 | * - 0x0C addr_data_f1 |
|
1091 | * - 0x0C addr_data_f1 | |
1067 | * - 0x10 addr_data_f2 |
|
1092 | * - 0x10 addr_data_f2 | |
1068 | * - 0x14 addr_data_f3 |
|
1093 | * - 0x14 addr_data_f3 | |
1069 | * - 0x18 status |
|
1094 | * - 0x18 status | |
1070 | * - 0x1C delta_snapshot |
|
1095 | * - 0x1C delta_snapshot | |
1071 | * - 0x20 delta_f0 |
|
1096 | * - 0x20 delta_f0 | |
1072 | * - 0x24 delta_f0_2 |
|
1097 | * - 0x24 delta_f0_2 | |
1073 | * - 0x28 delta_f1 |
|
1098 | * - 0x28 delta_f1 | |
1074 | * - 0x2c delta_f2 |
|
1099 | * - 0x2c delta_f2 | |
1075 | * - 0x30 nb_data_by_buffer |
|
1100 | * - 0x30 nb_data_by_buffer | |
1076 | * - 0x34 nb_snapshot_param |
|
1101 | * - 0x34 nb_snapshot_param | |
1077 | * - 0x38 start_date |
|
1102 | * - 0x38 start_date | |
1078 | * - 0x3c nb_word_in_buffer |
|
1103 | * - 0x3c nb_word_in_buffer | |
1079 | * |
|
1104 | * | |
1080 | */ |
|
1105 | */ | |
1081 |
|
1106 | |||
1082 | new_waveform_picker_regs->data_shaping = 0x01; // 0x00 *** R1 R0 SP1 SP0 BW |
|
1107 | new_waveform_picker_regs->data_shaping = 0x01; // 0x00 *** R1 R0 SP1 SP0 BW | |
1083 | new_waveform_picker_regs->run_burst_enable = 0x00; // 0x04 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ] |
|
1108 | new_waveform_picker_regs->run_burst_enable = 0x00; // 0x04 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ] | |
1084 | new_waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // 0x08 |
|
1109 | new_waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // 0x08 | |
1085 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); // 0x0c |
|
1110 | new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); // 0x0c | |
1086 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); // 0x10 |
|
1111 | new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); // 0x10 | |
1087 | new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); // 0x14 |
|
1112 | new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); // 0x14 | |
1088 | new_waveform_picker_regs->status = 0x00; // 0x18 |
|
1113 | new_waveform_picker_regs->status = 0x00; // 0x18 | |
1089 | // new_waveform_picker_regs->delta_snapshot = 0x12800; // 0x1c 296 * 256 = 75776 |
|
1114 | // new_waveform_picker_regs->delta_snapshot = 0x12800; // 0x1c 296 * 256 = 75776 | |
1090 | new_waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c 16 * 256 = 4096 |
|
1115 | new_waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c 16 * 256 = 4096 | |
1091 | new_waveform_picker_regs->delta_f0 = 0x3f5; // 0x20 *** 1013 |
|
1116 | new_waveform_picker_regs->delta_f0 = 0x3f5; // 0x20 *** 1013 | |
1092 | new_waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 |
|
1117 | new_waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 [7 bits] | |
1093 | new_waveform_picker_regs->delta_f1 = 0x3c0; // 0x28 *** 960 |
|
1118 | new_waveform_picker_regs->delta_f1 = 0x3c0; // 0x28 *** 960 | |
1094 | // new_waveform_picker_regs->delta_f2 = 0x12200; // 0x2c *** 74240 |
|
1119 | // new_waveform_picker_regs->delta_f2 = 0x12200; // 0x2c *** 74240 | |
1095 |
new_waveform_picker_regs->delta_f2 = 0xc00; // 0x2c *** 12 * 256 = |
|
1120 | new_waveform_picker_regs->delta_f2 = 0xc00; // 0x2c *** 12 * 256 = 3072 | |
1096 | new_waveform_picker_regs->nb_data_by_buffer = 0x7ff; // 0x30 *** 2048 -1 |
|
1121 | new_waveform_picker_regs->nb_data_by_buffer = 0x7ff; // 0x30 *** 2048 -1 | |
1097 | new_waveform_picker_regs->snapshot_param = 0x800; // 0x34 *** 2048 |
|
1122 | new_waveform_picker_regs->snapshot_param = 0x800; // 0x34 *** 2048 | |
1098 | new_waveform_picker_regs->start_date = 0x00; // 0x38 |
|
1123 | new_waveform_picker_regs->start_date = 0x00; // 0x38 | |
1099 | new_waveform_picker_regs->nb_word_in_buffer = 0x1802; // 0x3c *** 2048 * 3 + 2 = 6146 |
|
1124 | new_waveform_picker_regs->nb_word_in_buffer = 0x1802; // 0x3c *** 2048 * 3 + 2 = 6146 | |
1100 | } |
|
1125 | } | |
1101 |
|
1126 | |||
1102 | //***************** |
|
1127 | //***************** | |
1103 | // local parameters |
|
1128 | // local parameters | |
1104 | void set_local_sbm1_nb_cwf_max() |
|
1129 | void set_local_sbm1_nb_cwf_max() | |
1105 | { |
|
1130 | { | |
1106 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. |
|
1131 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. | |
1107 | * |
|
1132 | * | |
1108 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n |
|
1133 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n | |
1109 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.\n\n |
|
1134 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.\n\n | |
1110 | * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot) |
|
1135 | * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot) | |
1111 | * |
|
1136 | * | |
1112 | */ |
|
1137 | */ | |
1113 | param_local.local_sbm1_nb_cwf_max = 2 * |
|
1138 | param_local.local_sbm1_nb_cwf_max = 2 * | |
1114 | (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 |
|
1139 | (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 | |
1115 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2 |
|
1140 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2 | |
1116 | } |
|
1141 | } | |
1117 |
|
1142 | |||
1118 | void set_local_sbm2_nb_cwf_max() |
|
1143 | void set_local_sbm2_nb_cwf_max() | |
1119 | { |
|
1144 | { | |
1120 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. |
|
1145 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. | |
1121 | * |
|
1146 | * | |
1122 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n |
|
1147 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n | |
1123 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n |
|
1148 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n | |
1124 | * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz) |
|
1149 | * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz) | |
1125 | * |
|
1150 | * | |
1126 | */ |
|
1151 | */ | |
1127 |
|
1152 | |||
1128 | param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 |
|
1153 | param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 | |
1129 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8; |
|
1154 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8; | |
1130 | } |
|
1155 | } | |
1131 |
|
1156 | |||
1132 | void set_local_nb_interrupt_f0_MAX() |
|
1157 | void set_local_nb_interrupt_f0_MAX() | |
1133 | { |
|
1158 | { | |
1134 | /** This function sets the value of the nb_interrupt_f0_MAX local parameter. |
|
1159 | /** This function sets the value of the nb_interrupt_f0_MAX local parameter. | |
1135 | * |
|
1160 | * | |
1136 | * This parameter is used for the SM validation only.\n |
|
1161 | * This parameter is used for the SM validation only.\n | |
1137 | * The software waits param_local.local_nb_interrupt_f0_MAX interruptions from the spectral matrices |
|
1162 | * The software waits param_local.local_nb_interrupt_f0_MAX interruptions from the spectral matrices | |
1138 | * module before launching a basic processing. |
|
1163 | * module before launching a basic processing. | |
1139 | * |
|
1164 | * | |
1140 | */ |
|
1165 | */ | |
1141 |
|
1166 | |||
1142 | param_local.local_nb_interrupt_f0_MAX = ( (parameter_dump_packet.sy_lfr_n_asm_p[0]) * 256 |
|
1167 | param_local.local_nb_interrupt_f0_MAX = ( (parameter_dump_packet.sy_lfr_n_asm_p[0]) * 256 | |
1143 | + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100; |
|
1168 | + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100; | |
1144 | } |
|
1169 | } | |
1145 |
|
1170 | |||
1146 | void reset_local_sbm1_nb_cwf_sent() |
|
1171 | void reset_local_sbm1_nb_cwf_sent() | |
1147 | { |
|
1172 | { | |
1148 | /** This function resets the value of the sbm1_nb_cwf_sent local parameter. |
|
1173 | /** This function resets the value of the sbm1_nb_cwf_sent local parameter. | |
1149 | * |
|
1174 | * | |
1150 | * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n |
|
1175 | * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n | |
1151 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active. |
|
1176 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active. | |
1152 | * |
|
1177 | * | |
1153 | */ |
|
1178 | */ | |
1154 |
|
1179 | |||
1155 | param_local.local_sbm1_nb_cwf_sent = 0; |
|
1180 | param_local.local_sbm1_nb_cwf_sent = 0; | |
1156 | } |
|
1181 | } | |
1157 |
|
1182 | |||
1158 | void reset_local_sbm2_nb_cwf_sent() |
|
1183 | void reset_local_sbm2_nb_cwf_sent() | |
1159 | { |
|
1184 | { | |
1160 | /** This function resets the value of the sbm2_nb_cwf_sent local parameter. |
|
1185 | /** This function resets the value of the sbm2_nb_cwf_sent local parameter. | |
1161 | * |
|
1186 | * | |
1162 | * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n |
|
1187 | * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n | |
1163 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active. |
|
1188 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active. | |
1164 | * |
|
1189 | * | |
1165 | */ |
|
1190 | */ | |
1166 |
|
1191 | |||
1167 | param_local.local_sbm2_nb_cwf_sent = 0; |
|
1192 | param_local.local_sbm2_nb_cwf_sent = 0; | |
1168 | } |
|
1193 | } | |
1169 |
|
1194 | |||
1170 | rtems_id get_pkts_queue_id( void ) |
|
1195 | rtems_id get_pkts_queue_id( void ) | |
1171 | { |
|
1196 | { | |
1172 | rtems_id queue_id; |
|
1197 | rtems_id queue_id; | |
1173 | rtems_status_code status; |
|
1198 | rtems_status_code status; | |
1174 | rtems_name queue_send_name; |
|
1199 | rtems_name queue_send_name; | |
1175 |
|
1200 | |||
1176 | queue_send_name = rtems_build_name( 'Q', '_', 'S', 'D' ); |
|
1201 | queue_send_name = rtems_build_name( 'Q', '_', 'S', 'D' ); | |
1177 |
|
1202 | |||
1178 | status = rtems_message_queue_ident( queue_send_name, 0, &queue_id ); |
|
1203 | status = rtems_message_queue_ident( queue_send_name, 0, &queue_id ); | |
1179 | if (status != RTEMS_SUCCESSFUL) |
|
1204 | if (status != RTEMS_SUCCESSFUL) | |
1180 | { |
|
1205 | { | |
1181 | PRINTF1("in get_pkts_queue_id *** ERR %d\n", status) |
|
1206 | PRINTF1("in get_pkts_queue_id *** ERR %d\n", status) | |
1182 | } |
|
1207 | } | |
1183 | return queue_id; |
|
1208 | return queue_id; | |
1184 | } |
|
1209 | } | |
1185 |
|
1210 | |||
1186 | void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid ) |
|
1211 | void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid ) | |
1187 | { |
|
1212 | { | |
1188 | unsigned short *sequence_cnt; |
|
1213 | unsigned short *sequence_cnt; | |
1189 | unsigned short segmentation_grouping_flag; |
|
1214 | unsigned short segmentation_grouping_flag; | |
1190 | unsigned short new_packet_sequence_control; |
|
1215 | unsigned short new_packet_sequence_control; | |
1191 |
|
1216 | |||
1192 | if ( (sid ==SID_NORM_SWF_F0) || (sid ==SID_NORM_SWF_F1) || (sid ==SID_NORM_SWF_F2) |
|
1217 | if ( (sid ==SID_NORM_SWF_F0) || (sid ==SID_NORM_SWF_F1) || (sid ==SID_NORM_SWF_F2) | |
1193 | || (sid ==SID_NORM_CWF_F3) || (sid ==SID_BURST_CWF_F2) ) |
|
1218 | || (sid ==SID_NORM_CWF_F3) || (sid ==SID_BURST_CWF_F2) ) | |
1194 | { |
|
1219 | { | |
1195 | sequence_cnt = &sequenceCounters_SCIENCE_NORMAL_BURST; |
|
1220 | sequence_cnt = &sequenceCounters_SCIENCE_NORMAL_BURST; | |
1196 | } |
|
1221 | } | |
1197 | else if ( (sid ==SID_SBM1_CWF_F1) || (sid ==SID_SBM2_CWF_F2) ) |
|
1222 | else if ( (sid ==SID_SBM1_CWF_F1) || (sid ==SID_SBM2_CWF_F2) ) | |
1198 | { |
|
1223 | { | |
1199 | sequence_cnt = &sequenceCounters_SCIENCE_SBM1_SBM2; |
|
1224 | sequence_cnt = &sequenceCounters_SCIENCE_SBM1_SBM2; | |
1200 | } |
|
1225 | } | |
1201 | else |
|
1226 | else | |
1202 | { |
|
1227 | { | |
1203 | sequence_cnt = &sequenceCounters_TC_EXE[ UNKNOWN ]; |
|
1228 | sequence_cnt = &sequenceCounters_TC_EXE[ UNKNOWN ]; | |
1204 | PRINTF1("in increment_seq_counter_source_id *** ERR apid_destid %d not known\n", sid) |
|
1229 | PRINTF1("in increment_seq_counter_source_id *** ERR apid_destid %d not known\n", sid) | |
1205 | } |
|
1230 | } | |
1206 |
|
1231 | |||
1207 | segmentation_grouping_flag = (packet_sequence_control[ 0 ] & 0xc0) << 8; |
|
1232 | segmentation_grouping_flag = (packet_sequence_control[ 0 ] & 0xc0) << 8; | |
1208 | *sequence_cnt = (*sequence_cnt) & 0x3fff; |
|
1233 | *sequence_cnt = (*sequence_cnt) & 0x3fff; | |
1209 |
|
1234 | |||
1210 | new_packet_sequence_control = segmentation_grouping_flag | *sequence_cnt ; |
|
1235 | new_packet_sequence_control = segmentation_grouping_flag | *sequence_cnt ; | |
1211 |
|
1236 | |||
1212 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); |
|
1237 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); | |
1213 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); |
|
1238 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); | |
1214 |
|
1239 | |||
1215 | // increment the sequence counter for the next packet |
|
1240 | // increment the sequence counter for the next packet | |
1216 | if ( *sequence_cnt < SEQ_CNT_MAX) |
|
1241 | if ( *sequence_cnt < SEQ_CNT_MAX) | |
1217 | { |
|
1242 | { | |
1218 | *sequence_cnt = *sequence_cnt + 1; |
|
1243 | *sequence_cnt = *sequence_cnt + 1; | |
1219 | } |
|
1244 | } | |
1220 | else |
|
1245 | else | |
1221 | { |
|
1246 | { | |
1222 | *sequence_cnt = 0; |
|
1247 | *sequence_cnt = 0; | |
1223 | } |
|
1248 | } | |
1224 | } |
|
1249 | } |
General Comments 0
You need to be logged in to leave comments.
Login now