##// END OF EJS Templates
Bug 861...
paul -
r84:335d64d1e4bf VHDLib206
parent child
Show More
@@ -1,248 +1,248
1 #############################################################################
1 #############################################################################
2 # Makefile for building: bin/fsw
2 # Makefile for building: bin/fsw
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Nov 19 10:04:58 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 21 17:20:36 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=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=0 -DPRINT_MESSAGES_ON_CONSOLE
13 DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=1 -DPRINT_MESSAGES_ON_CONSOLE
14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
17 LINK = sparc-rtems-g++
17 LINK = sparc-rtems-g++
18 LFLAGS =
18 LFLAGS =
19 LIBS = $(SUBLIBS)
19 LIBS = $(SUBLIBS)
20 AR = sparc-rtems-ar rcs
20 AR = sparc-rtems-ar rcs
21 RANLIB =
21 RANLIB =
22 QMAKE = /usr/bin/qmake-qt4
22 QMAKE = /usr/bin/qmake-qt4
23 TAR = tar -cf
23 TAR = tar -cf
24 COMPRESS = gzip -9f
24 COMPRESS = gzip -9f
25 COPY = cp -f
25 COPY = cp -f
26 SED = sed
26 SED = sed
27 COPY_FILE = $(COPY)
27 COPY_FILE = $(COPY)
28 COPY_DIR = $(COPY) -r
28 COPY_DIR = $(COPY) -r
29 STRIP = sparc-rtems-strip
29 STRIP = sparc-rtems-strip
30 INSTALL_FILE = install -m 644 -p
30 INSTALL_FILE = install -m 644 -p
31 INSTALL_DIR = $(COPY_DIR)
31 INSTALL_DIR = $(COPY_DIR)
32 INSTALL_PROGRAM = install -m 755 -p
32 INSTALL_PROGRAM = install -m 755 -p
33 DEL_FILE = rm -f
33 DEL_FILE = rm -f
34 SYMLINK = ln -f -s
34 SYMLINK = ln -f -s
35 DEL_DIR = rmdir
35 DEL_DIR = rmdir
36 MOVE = mv -f
36 MOVE = mv -f
37 CHK_DIR_EXISTS= test -d
37 CHK_DIR_EXISTS= test -d
38 MKDIR = mkdir -p
38 MKDIR = mkdir -p
39
39
40 ####### Output directory
40 ####### Output directory
41
41
42 OBJECTS_DIR = obj/
42 OBJECTS_DIR = obj/
43
43
44 ####### Files
44 ####### Files
45
45
46 SOURCES = ../src/wf_handler.c \
46 SOURCES = ../src/wf_handler.c \
47 ../src/tc_handler.c \
47 ../src/tc_handler.c \
48 ../src/fsw_processing.c \
48 ../src/fsw_processing.c \
49 ../src/fsw_misc.c \
49 ../src/fsw_misc.c \
50 ../src/fsw_init.c \
50 ../src/fsw_init.c \
51 ../src/fsw_globals.c \
51 ../src/fsw_globals.c \
52 ../src/fsw_spacewire.c \
52 ../src/fsw_spacewire.c \
53 ../src/tc_load_dump_parameters.c \
53 ../src/tc_load_dump_parameters.c \
54 ../src/tm_lfr_tc_exe.c \
54 ../src/tm_lfr_tc_exe.c \
55 ../src/tc_acceptance.c
55 ../src/tc_acceptance.c
56 OBJECTS = obj/wf_handler.o \
56 OBJECTS = obj/wf_handler.o \
57 obj/tc_handler.o \
57 obj/tc_handler.o \
58 obj/fsw_processing.o \
58 obj/fsw_processing.o \
59 obj/fsw_misc.o \
59 obj/fsw_misc.o \
60 obj/fsw_init.o \
60 obj/fsw_init.o \
61 obj/fsw_globals.o \
61 obj/fsw_globals.o \
62 obj/fsw_spacewire.o \
62 obj/fsw_spacewire.o \
63 obj/tc_load_dump_parameters.o \
63 obj/tc_load_dump_parameters.o \
64 obj/tm_lfr_tc_exe.o \
64 obj/tm_lfr_tc_exe.o \
65 obj/tc_acceptance.o
65 obj/tc_acceptance.o
66 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
66 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
67 /usr/lib64/qt4/mkspecs/common/linux.conf \
67 /usr/lib64/qt4/mkspecs/common/linux.conf \
68 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
68 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
69 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
69 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
70 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
70 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
71 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
71 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
72 /usr/lib64/qt4/mkspecs/qconfig.pri \
72 /usr/lib64/qt4/mkspecs/qconfig.pri \
73 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
73 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
74 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
74 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
75 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
75 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
76 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
76 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
77 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
77 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
78 sparc.pri \
78 sparc.pri \
79 /usr/lib64/qt4/mkspecs/features/release.prf \
79 /usr/lib64/qt4/mkspecs/features/release.prf \
80 /usr/lib64/qt4/mkspecs/features/default_post.prf \
80 /usr/lib64/qt4/mkspecs/features/default_post.prf \
81 /usr/lib64/qt4/mkspecs/features/shared.prf \
81 /usr/lib64/qt4/mkspecs/features/shared.prf \
82 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
82 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
83 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
83 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
84 /usr/lib64/qt4/mkspecs/features/resources.prf \
84 /usr/lib64/qt4/mkspecs/features/resources.prf \
85 /usr/lib64/qt4/mkspecs/features/uic.prf \
85 /usr/lib64/qt4/mkspecs/features/uic.prf \
86 /usr/lib64/qt4/mkspecs/features/yacc.prf \
86 /usr/lib64/qt4/mkspecs/features/yacc.prf \
87 /usr/lib64/qt4/mkspecs/features/lex.prf \
87 /usr/lib64/qt4/mkspecs/features/lex.prf \
88 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
88 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
89 fsw-qt.pro
89 fsw-qt.pro
90 QMAKE_TARGET = fsw
90 QMAKE_TARGET = fsw
91 DESTDIR = bin/
91 DESTDIR = bin/
92 TARGET = bin/fsw
92 TARGET = bin/fsw
93
93
94 first: all
94 first: all
95 ####### Implicit rules
95 ####### Implicit rules
96
96
97 .SUFFIXES: .o .c .cpp .cc .cxx .C
97 .SUFFIXES: .o .c .cpp .cc .cxx .C
98
98
99 .cpp.o:
99 .cpp.o:
100 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
100 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
101
101
102 .cc.o:
102 .cc.o:
103 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
103 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
104
104
105 .cxx.o:
105 .cxx.o:
106 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
106 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
107
107
108 .C.o:
108 .C.o:
109 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
109 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
110
110
111 .c.o:
111 .c.o:
112 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
112 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
113
113
114 ####### Build rules
114 ####### Build rules
115
115
116 all: Makefile $(TARGET)
116 all: Makefile $(TARGET)
117
117
118 $(TARGET): $(OBJECTS)
118 $(TARGET): $(OBJECTS)
119 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
119 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
120 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
120 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
121
121
122 Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
122 Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
123 /usr/lib64/qt4/mkspecs/common/linux.conf \
123 /usr/lib64/qt4/mkspecs/common/linux.conf \
124 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
124 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
125 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
125 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
126 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
126 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
127 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
127 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
128 /usr/lib64/qt4/mkspecs/qconfig.pri \
128 /usr/lib64/qt4/mkspecs/qconfig.pri \
129 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
129 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
130 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
130 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
131 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
131 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
132 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
132 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
133 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
133 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
134 sparc.pri \
134 sparc.pri \
135 /usr/lib64/qt4/mkspecs/features/release.prf \
135 /usr/lib64/qt4/mkspecs/features/release.prf \
136 /usr/lib64/qt4/mkspecs/features/default_post.prf \
136 /usr/lib64/qt4/mkspecs/features/default_post.prf \
137 /usr/lib64/qt4/mkspecs/features/shared.prf \
137 /usr/lib64/qt4/mkspecs/features/shared.prf \
138 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
138 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
139 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
139 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
140 /usr/lib64/qt4/mkspecs/features/resources.prf \
140 /usr/lib64/qt4/mkspecs/features/resources.prf \
141 /usr/lib64/qt4/mkspecs/features/uic.prf \
141 /usr/lib64/qt4/mkspecs/features/uic.prf \
142 /usr/lib64/qt4/mkspecs/features/yacc.prf \
142 /usr/lib64/qt4/mkspecs/features/yacc.prf \
143 /usr/lib64/qt4/mkspecs/features/lex.prf \
143 /usr/lib64/qt4/mkspecs/features/lex.prf \
144 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf
144 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf
145 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
145 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
146 /usr/lib64/qt4/mkspecs/common/unix.conf:
146 /usr/lib64/qt4/mkspecs/common/unix.conf:
147 /usr/lib64/qt4/mkspecs/common/linux.conf:
147 /usr/lib64/qt4/mkspecs/common/linux.conf:
148 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
148 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
149 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
149 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
150 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
150 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
151 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
151 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
152 /usr/lib64/qt4/mkspecs/qconfig.pri:
152 /usr/lib64/qt4/mkspecs/qconfig.pri:
153 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri:
153 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri:
154 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
154 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
155 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
155 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
156 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
156 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
157 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
157 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
158 sparc.pri:
158 sparc.pri:
159 /usr/lib64/qt4/mkspecs/features/release.prf:
159 /usr/lib64/qt4/mkspecs/features/release.prf:
160 /usr/lib64/qt4/mkspecs/features/default_post.prf:
160 /usr/lib64/qt4/mkspecs/features/default_post.prf:
161 /usr/lib64/qt4/mkspecs/features/shared.prf:
161 /usr/lib64/qt4/mkspecs/features/shared.prf:
162 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
162 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
163 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
163 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
164 /usr/lib64/qt4/mkspecs/features/resources.prf:
164 /usr/lib64/qt4/mkspecs/features/resources.prf:
165 /usr/lib64/qt4/mkspecs/features/uic.prf:
165 /usr/lib64/qt4/mkspecs/features/uic.prf:
166 /usr/lib64/qt4/mkspecs/features/yacc.prf:
166 /usr/lib64/qt4/mkspecs/features/yacc.prf:
167 /usr/lib64/qt4/mkspecs/features/lex.prf:
167 /usr/lib64/qt4/mkspecs/features/lex.prf:
168 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
168 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
169 qmake: FORCE
169 qmake: FORCE
170 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
170 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
171
171
172 dist:
172 dist:
173 @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0
173 @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0
174 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0
174 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0
175
175
176
176
177 clean:compiler_clean
177 clean:compiler_clean
178 -$(DEL_FILE) $(OBJECTS)
178 -$(DEL_FILE) $(OBJECTS)
179 -$(DEL_FILE) *~ core *.core
179 -$(DEL_FILE) *~ core *.core
180
180
181
181
182 ####### Sub-libraries
182 ####### Sub-libraries
183
183
184 distclean: clean
184 distclean: clean
185 -$(DEL_FILE) $(TARGET)
185 -$(DEL_FILE) $(TARGET)
186 -$(DEL_FILE) Makefile
186 -$(DEL_FILE) Makefile
187
187
188
188
189 grmon:
189 grmon:
190 cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u
190 cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u
191
191
192 check: first
192 check: first
193
193
194 compiler_rcc_make_all:
194 compiler_rcc_make_all:
195 compiler_rcc_clean:
195 compiler_rcc_clean:
196 compiler_uic_make_all:
196 compiler_uic_make_all:
197 compiler_uic_clean:
197 compiler_uic_clean:
198 compiler_image_collection_make_all: qmake_image_collection.cpp
198 compiler_image_collection_make_all: qmake_image_collection.cpp
199 compiler_image_collection_clean:
199 compiler_image_collection_clean:
200 -$(DEL_FILE) qmake_image_collection.cpp
200 -$(DEL_FILE) qmake_image_collection.cpp
201 compiler_yacc_decl_make_all:
201 compiler_yacc_decl_make_all:
202 compiler_yacc_decl_clean:
202 compiler_yacc_decl_clean:
203 compiler_yacc_impl_make_all:
203 compiler_yacc_impl_make_all:
204 compiler_yacc_impl_clean:
204 compiler_yacc_impl_clean:
205 compiler_lex_make_all:
205 compiler_lex_make_all:
206 compiler_lex_clean:
206 compiler_lex_clean:
207 compiler_clean:
207 compiler_clean:
208
208
209 ####### Compile
209 ####### Compile
210
210
211 obj/wf_handler.o: ../src/wf_handler.c
211 obj/wf_handler.o: ../src/wf_handler.c
212 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c
212 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c
213
213
214 obj/tc_handler.o: ../src/tc_handler.c
214 obj/tc_handler.o: ../src/tc_handler.c
215 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c
215 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c
216
216
217 obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c
217 obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c
218 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c
218 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c
219
219
220 obj/fsw_misc.o: ../src/fsw_misc.c
220 obj/fsw_misc.o: ../src/fsw_misc.c
221 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c
221 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c
222
222
223 obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c
223 obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c
224 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c
224 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c
225
225
226 obj/fsw_globals.o: ../src/fsw_globals.c
226 obj/fsw_globals.o: ../src/fsw_globals.c
227 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c
227 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c
228
228
229 obj/fsw_spacewire.o: ../src/fsw_spacewire.c
229 obj/fsw_spacewire.o: ../src/fsw_spacewire.c
230 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c
230 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c
231
231
232 obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c
232 obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c
233 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c
233 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c
234
234
235 obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c
235 obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c
236 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c
236 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c
237
237
238 obj/tc_acceptance.o: ../src/tc_acceptance.c
238 obj/tc_acceptance.o: ../src/tc_acceptance.c
239 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c
239 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c
240
240
241 ####### Install
241 ####### Install
242
242
243 install: FORCE
243 install: FORCE
244
244
245 uninstall: FORCE
245 uninstall: FORCE
246
246
247 FORCE:
247 FORCE:
248
248
@@ -1,79 +1,79
1 TEMPLATE = app
1 TEMPLATE = app
2 # CONFIG += console v8 sim
2 # CONFIG += console v8 sim
3 # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa
3 # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa
4 CONFIG += console verbose
4 CONFIG += console verbose
5 CONFIG -= qt
5 CONFIG -= qt
6
6
7 include(./sparc.pri)
7 include(./sparc.pri)
8
8
9 # flight software version
9 # flight software version
10 SWVERSION=-1-0
10 SWVERSION=-1-0
11 DEFINES += SW_VERSION_N1=1 # major
11 DEFINES += SW_VERSION_N1=1 # major
12 DEFINES += SW_VERSION_N2=0 # minor
12 DEFINES += SW_VERSION_N2=0 # minor
13 DEFINES += SW_VERSION_N3=0 # patch
13 DEFINES += SW_VERSION_N3=0 # patch
14 DEFINES += SW_VERSION_N4=0 # internal
14 DEFINES += SW_VERSION_N4=1 # internal
15
15
16 contains( CONFIG, verbose ) {
16 contains( CONFIG, verbose ) {
17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
18 }
18 }
19
19
20 contains( CONFIG, debug_messages ) {
20 contains( CONFIG, debug_messages ) {
21 DEFINES += DEBUG_MESSAGES
21 DEFINES += DEBUG_MESSAGES
22 }
22 }
23
23
24 contains( CONFIG, cpu_usage_report ) {
24 contains( CONFIG, cpu_usage_report ) {
25 DEFINES += PRINT_TASK_STATISTICS
25 DEFINES += PRINT_TASK_STATISTICS
26 }
26 }
27
27
28 contains( CONFIG, stack_report ) {
28 contains( CONFIG, stack_report ) {
29 DEFINES += PRINT_STACK_REPORT
29 DEFINES += PRINT_STACK_REPORT
30 }
30 }
31
31
32 contains( CONFIG, boot_messages ) {
32 contains( CONFIG, boot_messages ) {
33 DEFINES += BOOT_MESSAGES
33 DEFINES += BOOT_MESSAGES
34 }
34 }
35
35
36 #doxygen.target = doxygen
36 #doxygen.target = doxygen
37 #doxygen.commands = doxygen ../doc/Doxyfile
37 #doxygen.commands = doxygen ../doc/Doxyfile
38 #QMAKE_EXTRA_TARGETS += doxygen
38 #QMAKE_EXTRA_TARGETS += doxygen
39
39
40 TARGET = fsw
40 TARGET = fsw
41 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 ../header/fsw_params_nb_bytes.h
78 ../header/fsw_params_nb_bytes.h
79
79
@@ -1,439 +1,439
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-19T10:04:48. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-21T16:58:13. -->
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">UTF-8</value>
28 <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
29 <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
29 <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
30 <value type="int" key="EditorConfiguration.IndentSize">4</value>
30 <value type="int" key="EditorConfiguration.IndentSize">4</value>
31 <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
31 <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
32 <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
32 <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
33 <value type="int" key="EditorConfiguration.PaddingMode">1</value>
33 <value type="int" key="EditorConfiguration.PaddingMode">1</value>
34 <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
34 <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
35 <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
35 <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
36 <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
36 <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
37 <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
37 <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
38 <value type="int" key="EditorConfiguration.TabSize">8</value>
38 <value type="int" key="EditorConfiguration.TabSize">8</value>
39 <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
39 <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
40 <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
40 <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
41 <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
41 <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
42 <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
42 <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
43 <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
43 <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
44 <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
44 <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
45 </valuemap>
45 </valuemap>
46 </data>
46 </data>
47 <data>
47 <data>
48 <variable>ProjectExplorer.Project.PluginSettings</variable>
48 <variable>ProjectExplorer.Project.PluginSettings</variable>
49 <valuemap type="QVariantMap"/>
49 <valuemap type="QVariantMap"/>
50 </data>
50 </data>
51 <data>
51 <data>
52 <variable>ProjectExplorer.Project.Target.0</variable>
52 <variable>ProjectExplorer.Project.Target.0</variable>
53 <valuemap type="QVariantMap">
53 <valuemap type="QVariantMap">
54 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-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">0</value>
59 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
60 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
60 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
61 <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">false</value>
68 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</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"></value>
82 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></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">clean</value>
101 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">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">Release</value>
112 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">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">false</value>
127 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</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"></value>
141 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></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">clean</value>
160 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">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">Release2</value>
171 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release2</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">0</value>
174 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</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">Deploy locally</value>
187 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</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">true</value>
240 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
241 </valuemap>
241 </valuemap>
242 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
242 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
243 </valuemap>
243 </valuemap>
244 </data>
244 </data>
245 <data>
245 <data>
246 <variable>ProjectExplorer.Project.Target.1</variable>
246 <variable>ProjectExplorer.Project.Target.1</variable>
247 <valuemap type="QVariantMap">
247 <valuemap type="QVariantMap">
248 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop2</value>
248 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop2</value>
249 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop2</value>
249 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop2</value>
250 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e96c4de1-323d-4095-8746-d006ca3bd573}</value>
250 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e96c4de1-323d-4095-8746-d006ca3bd573}</value>
251 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
251 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
252 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
252 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
253 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
253 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
254 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
254 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
255 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
255 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
256 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
256 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
257 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
257 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
258 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
258 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
259 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
259 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
260 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
260 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
261 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
261 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
262 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
262 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
263 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
263 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
264 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
264 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
265 </valuemap>
265 </valuemap>
266 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
266 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
267 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
267 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
268 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
268 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
269 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
269 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
270 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
270 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
271 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
271 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
272 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
272 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
273 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
273 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
274 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
274 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
275 </valuemap>
275 </valuemap>
276 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
276 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
277 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
277 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
278 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
278 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
279 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
279 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
280 </valuemap>
280 </valuemap>
281 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
281 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
282 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
282 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
283 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
283 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
284 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
284 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
285 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
285 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
286 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
286 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
287 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
287 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
288 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
288 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
289 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
289 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
290 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
290 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
291 </valuemap>
291 </valuemap>
292 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
292 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
293 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
293 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
294 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
294 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
295 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
295 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
296 </valuemap>
296 </valuemap>
297 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
297 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
298 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
298 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
299 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
299 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
300 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
300 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
301 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
301 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
302 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
302 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
303 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
303 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
304 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
304 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
305 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
305 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
306 </valuemap>
306 </valuemap>
307 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
307 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
308 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
308 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
309 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
309 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
310 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
310 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
311 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
311 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
312 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
312 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
313 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
313 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
314 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
314 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
315 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
315 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
316 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
316 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
317 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
317 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
318 </valuemap>
318 </valuemap>
319 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
319 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
320 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
320 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
321 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
321 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
322 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
322 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
323 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
323 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
324 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
324 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
325 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
325 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
326 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
326 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
327 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
327 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
328 </valuemap>
328 </valuemap>
329 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
329 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
330 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
330 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
331 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
331 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
332 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
332 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
333 </valuemap>
333 </valuemap>
334 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
334 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
335 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
335 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
336 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
336 <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
337 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
337 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
338 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
338 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
339 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
339 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
340 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
340 <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
341 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
341 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
342 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
342 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
343 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
343 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
344 </valuemap>
344 </valuemap>
345 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
345 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
346 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
346 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
347 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
347 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
348 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
348 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
349 </valuemap>
349 </valuemap>
350 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
350 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
351 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
351 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
352 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
352 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
353 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release2</value>
353 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release2</value>
354 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
354 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
355 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
355 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
356 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
356 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
357 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
357 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
358 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
358 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
359 </valuemap>
359 </valuemap>
360 <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
360 <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
361 <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
361 <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
362 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
362 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
363 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
363 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
364 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
364 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
365 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
365 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
366 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
366 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
367 </valuemap>
367 </valuemap>
368 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
368 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
369 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
369 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
370 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
370 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
371 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
371 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
372 </valuemap>
372 </valuemap>
373 <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
373 <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
374 <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
374 <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
375 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
375 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
376 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
376 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
377 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
377 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
378 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
378 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
379 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
379 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
380 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
380 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
381 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
381 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
382 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
382 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
383 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
383 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
384 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
384 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
385 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
385 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
386 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
386 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
387 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
387 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
388 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
388 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
389 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
389 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
390 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
390 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
391 <value type="int">0</value>
391 <value type="int">0</value>
392 <value type="int">1</value>
392 <value type="int">1</value>
393 <value type="int">2</value>
393 <value type="int">2</value>
394 <value type="int">3</value>
394 <value type="int">3</value>
395 <value type="int">4</value>
395 <value type="int">4</value>
396 <value type="int">5</value>
396 <value type="int">5</value>
397 <value type="int">6</value>
397 <value type="int">6</value>
398 <value type="int">7</value>
398 <value type="int">7</value>
399 <value type="int">8</value>
399 <value type="int">8</value>
400 <value type="int">9</value>
400 <value type="int">9</value>
401 <value type="int">10</value>
401 <value type="int">10</value>
402 <value type="int">11</value>
402 <value type="int">11</value>
403 <value type="int">12</value>
403 <value type="int">12</value>
404 <value type="int">13</value>
404 <value type="int">13</value>
405 <value type="int">14</value>
405 <value type="int">14</value>
406 </valuelist>
406 </valuelist>
407 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
407 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
408 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
408 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
409 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
409 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
410 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
410 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
411 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value>
411 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value>
412 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
412 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
413 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
413 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
414 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
414 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
415 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
415 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
416 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
416 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
417 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
417 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
418 <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
418 <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
419 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
419 <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
420 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
420 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
421 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
421 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
422 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
422 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
423 </valuemap>
423 </valuemap>
424 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
424 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
425 </valuemap>
425 </valuemap>
426 </data>
426 </data>
427 <data>
427 <data>
428 <variable>ProjectExplorer.Project.TargetCount</variable>
428 <variable>ProjectExplorer.Project.TargetCount</variable>
429 <value type="int">2</value>
429 <value type="int">2</value>
430 </data>
430 </data>
431 <data>
431 <data>
432 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
432 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
433 <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
433 <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
434 </data>
434 </data>
435 <data>
435 <data>
436 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
436 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
437 <value type="int">14</value>
437 <value type="int">14</value>
438 </data>
438 </data>
439 </qtcreator>
439 </qtcreator>
@@ -1,600 +1,599
1 #ifndef CCSDS_TYPES_H_INCLUDED
1 #ifndef CCSDS_TYPES_H_INCLUDED
2 #define CCSDS_TYPES_H_INCLUDED
2 #define CCSDS_TYPES_H_INCLUDED
3
3
4 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
4 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
5 #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4
5 #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4
6 #define CCSDS_TM_PKT_MAX_SIZE 4412
6 #define CCSDS_TM_PKT_MAX_SIZE 4412
7 #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4
7 #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4
8 #define CCSDS_TC_PKT_MAX_SIZE 256
8 #define CCSDS_TC_PKT_MAX_SIZE 256
9 #define CCSDS_TC_PKT_MIN_SIZE 16
9 #define CCSDS_TC_PKT_MIN_SIZE 16
10 #define CCSDS_TC_TM_PACKET_OFFSET 7
10 #define CCSDS_TC_TM_PACKET_OFFSET 7
11 #define CCSDS_PROCESS_ID 76
11 #define CCSDS_PROCESS_ID 76
12 #define CCSDS_PACKET_CATEGORY 12
12 #define CCSDS_PACKET_CATEGORY 12
13 #define CCSDS_NODE_ADDRESS 0xfe
13 #define CCSDS_NODE_ADDRESS 0xfe
14 #define CCSDS_USER_APP 0x00
14 #define CCSDS_USER_APP 0x00
15
15
16 #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10
16 #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10
17 #define DEFAULT_RESERVED 0x00
17 #define DEFAULT_RESERVED 0x00
18 #define DEFAULT_HKBIA 0x1e // 0001 1110
18 #define DEFAULT_HKBIA 0x1e // 0001 1110
19
19
20 // PACKET ID
20 // PACKET ID
21 #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1
21 #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1
22 #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4
22 #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4
23 #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9
23 #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9
24 #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12
24 #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12
25 #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
25 #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
26 #define TM_PACKET_PID_DEFAULT 76
26 #define TM_PACKET_PID_DEFAULT 76
27 #define TM_PACKET_PID_BURST_SBM1_SBM2 79
27 #define TM_PACKET_PID_BURST_SBM1_SBM2 79
28 #define TM_PACKET_CAT_TC_EXE 1
28 #define TM_PACKET_CAT_TC_EXE 1
29 #define TM_PACKET_CAT_HK 4
29 #define TM_PACKET_CAT_HK 4
30 #define TM_PACKET_CAT_PARAMETER_DUMP 9
30 #define TM_PACKET_CAT_PARAMETER_DUMP 9
31 #define TM_PACKET_CAT_SCIENCE 12
31 #define TM_PACKET_CAT_SCIENCE 12
32
32
33 // PACKET SEQUENCE CONTROL
33 // PACKET SEQUENCE CONTROL
34 #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000]
34 #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000]
35 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
35 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
36 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
36 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
37 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
37 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
38 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
38 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
39
39
40 // DESTINATION ID
40 // DESTINATION ID
41 #define TM_DESTINATION_ID_GROUND 0
41 #define TM_DESTINATION_ID_GROUND 0
42 #define TM_DESTINATION_ID_MISSION_TIMELINE 110
42 #define TM_DESTINATION_ID_MISSION_TIMELINE 110
43 #define TM_DESTINATION_ID_TC_SEQUENCES 111
43 #define TM_DESTINATION_ID_TC_SEQUENCES 111
44 #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112
44 #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112
45 #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113
45 #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113
46 #define TM_DESTINATION_ID_DIRECT_CMD 120
46 #define TM_DESTINATION_ID_DIRECT_CMD 120
47 #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121
47 #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121
48 #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122
48 #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122
49 #define TM_DESTINATION_ID_OBCP 15
49 #define TM_DESTINATION_ID_OBCP 15
50 #define TM_DESTINATION_ID_SYSTEM_CONTROL 14
50 #define TM_DESTINATION_ID_SYSTEM_CONTROL 14
51 #define TM_DESTINATION_ID_AOCS 11
51 #define TM_DESTINATION_ID_AOCS 11
52
52
53 #define CCSDS_DESTINATION_ID 0x01
53 #define CCSDS_DESTINATION_ID 0x01
54 #define CCSDS_PROTOCOLE_ID 0x02
54 #define CCSDS_PROTOCOLE_ID 0x02
55 #define CCSDS_RESERVED 0x00
55 #define CCSDS_RESERVED 0x00
56 #define CCSDS_USER_APP 0x00
56 #define CCSDS_USER_APP 0x00
57
57
58 #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24
58 #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24
59 #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32
59 #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32
60 #define SIZE_HK_PARAMETERS 112
60 #define SIZE_HK_PARAMETERS 112
61
61
62 // TC TYPES
62 // TC TYPES
63 #define TC_TYPE_GEN 181
63 #define TC_TYPE_GEN 181
64 #define TC_TYPE_TIME 9
64 #define TC_TYPE_TIME 9
65
65
66 // TC SUBTYPES
66 // TC SUBTYPES
67 #define TC_SUBTYPE_RESET 1
67 #define TC_SUBTYPE_RESET 1
68 #define TC_SUBTYPE_LOAD_COMM 11
68 #define TC_SUBTYPE_LOAD_COMM 11
69 #define TC_SUBTYPE_LOAD_NORM 13
69 #define TC_SUBTYPE_LOAD_NORM 13
70 #define TC_SUBTYPE_LOAD_BURST 19
70 #define TC_SUBTYPE_LOAD_BURST 19
71 #define TC_SUBTYPE_LOAD_SBM1 25
71 #define TC_SUBTYPE_LOAD_SBM1 25
72 #define TC_SUBTYPE_LOAD_SBM2 27
72 #define TC_SUBTYPE_LOAD_SBM2 27
73 #define TC_SUBTYPE_DUMP 31
73 #define TC_SUBTYPE_DUMP 31
74 #define TC_SUBTYPE_ENTER 41
74 #define TC_SUBTYPE_ENTER 41
75 #define TC_SUBTYPE_UPDT_INFO 51
75 #define TC_SUBTYPE_UPDT_INFO 51
76 #define TC_SUBTYPE_EN_CAL 61
76 #define TC_SUBTYPE_EN_CAL 61
77 #define TC_SUBTYPE_DIS_CAL 63
77 #define TC_SUBTYPE_DIS_CAL 63
78 #define TC_SUBTYPE_UPDT_TIME 129
78 #define TC_SUBTYPE_UPDT_TIME 129
79
79
80 // TC LEN
80 // TC LEN
81 #define TC_LEN_RESET 12
81 #define TC_LEN_RESET 12
82 #define TC_LEN_LOAD_COMM 14
82 #define TC_LEN_LOAD_COMM 14
83 #define TC_LEN_LOAD_NORM 20
83 #define TC_LEN_LOAD_NORM 20
84 #define TC_LEN_LOAD_BURST 14
84 #define TC_LEN_LOAD_BURST 14
85 #define TC_LEN_LOAD_SBM1 14
85 #define TC_LEN_LOAD_SBM1 14
86 #define TC_LEN_LOAD_SBM2 14
86 #define TC_LEN_LOAD_SBM2 14
87 #define TC_LEN_DUMP 12
87 #define TC_LEN_DUMP 12
88 #define TC_LEN_ENTER 20
88 #define TC_LEN_ENTER 20
89 #define TC_LEN_UPDT_INFO 48
89 #define TC_LEN_UPDT_INFO 48
90 #define TC_LEN_EN_CAL 12
90 #define TC_LEN_EN_CAL 12
91 #define TC_LEN_DIS_CAL 12
91 #define TC_LEN_DIS_CAL 12
92 #define TC_LEN_UPDT_TIME 18
92 #define TC_LEN_UPDT_TIME 18
93
93
94 // TM TYPES
94 // TM TYPES
95 #define TM_TYPE_TC_EXE 1
95 #define TM_TYPE_TC_EXE 1
96 #define TM_TYPE_HK 3
96 #define TM_TYPE_HK 3
97 #define TM_TYPE_PARAMETER_DUMP 3
97 #define TM_TYPE_PARAMETER_DUMP 3
98 #define TM_TYPE_LFR_SCIENCE 21
98 #define TM_TYPE_LFR_SCIENCE 21
99
99
100 // TM SUBTYPES
100 // TM SUBTYPES
101 #define TM_SUBTYPE_EXE_OK 7
101 #define TM_SUBTYPE_EXE_OK 7
102 #define TM_SUBTYPE_EXE_NOK 8
102 #define TM_SUBTYPE_EXE_NOK 8
103 #define TM_SUBTYPE_HK 25
103 #define TM_SUBTYPE_HK 25
104 #define TM_SUBTYPE_PARAMETER_DUMP 25
104 #define TM_SUBTYPE_PARAMETER_DUMP 25
105 #define TM_SUBTYPE_SCIENCE 3
105 #define TM_SUBTYPE_SCIENCE 3
106 #define TM_SUBTYPE_LFR_SCIENCE 3
106 #define TM_SUBTYPE_LFR_SCIENCE 3
107
107
108 // FAILURE CODES
108 // FAILURE CODES
109 #define ILLEGAL_APID 0
109 #define ILLEGAL_APID 0
110 #define WRONG_LEN_PKT 1
110 #define WRONG_LEN_PKT 1
111 #define INCOR_CHECKSUM 2
111 #define INCOR_CHECKSUM 2
112 #define ILL_TYPE 3
112 #define ILL_TYPE 3
113 #define ILL_SUBTYPE 4
113 #define ILL_SUBTYPE 4
114 #define WRONG_APP_DATA 5 // 0x00 0x05
114 #define WRONG_APP_DATA 5 // 0x00 0x05
115 #define TC_NOT_EXE 42000 // 0xa4 0x10
115 #define TC_NOT_EXE 42000 // 0xa4 0x10
116 #define WRONG_SRC_ID 42001 // 0xa4 0x11
116 #define WRONG_SRC_ID 42001 // 0xa4 0x11
117 #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12
117 #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12
118 #define FAIL_DETECTED 42003 // 0xa4 0x13
118 #define FAIL_DETECTED 42003 // 0xa4 0x13
119 #define NOT_ALLOWED 42004 // 0xa4 0x14
119 #define NOT_ALLOWED 42004 // 0xa4 0x14
120 #define CORRUPTED 42005 // 0xa4 0x15
120 #define CORRUPTED 42005 // 0xa4 0x15
121 #define CCSDS_TM_VALID 7
121 #define CCSDS_TM_VALID 7
122
122
123 // TC SID
123 // TC SID
124 #define SID_TC_GROUND 0
124 #define SID_TC_GROUND 0
125 #define SID_TC_MISSION_TIMELINE 110
125 #define SID_TC_MISSION_TIMELINE 110
126 #define SID_TC_TC_SEQUENCES 111
126 #define SID_TC_TC_SEQUENCES 111
127 #define SID_TC_RECOVERY_ACTION_CMD 112
127 #define SID_TC_RECOVERY_ACTION_CMD 112
128 #define SID_TC_BACKUP_MISSION_TIMELINE 113
128 #define SID_TC_BACKUP_MISSION_TIMELINE 113
129 #define SID_TC_DIRECT_CMD 120
129 #define SID_TC_DIRECT_CMD 120
130 #define SID_TC_SPARE_GRD_SRC1 121
130 #define SID_TC_SPARE_GRD_SRC1 121
131 #define SID_TC_SPARE_GRD_SRC2 122
131 #define SID_TC_SPARE_GRD_SRC2 122
132 #define SID_TC_OBCP 15
132 #define SID_TC_OBCP 15
133 #define SID_TC_SYSTEM_CONTROL 14
133 #define SID_TC_SYSTEM_CONTROL 14
134 #define SID_TC_AOCS 11
134 #define SID_TC_AOCS 11
135 #define SID_TC_RPW_INTERNAL 254
135 #define SID_TC_RPW_INTERNAL 254
136
136
137 enum apid_destid{
137 enum apid_destid{
138 GROUND,
138 GROUND,
139 MISSION_TIMELINE,
139 MISSION_TIMELINE,
140 TC_SEQUENCES,
140 TC_SEQUENCES,
141 RECOVERY_ACTION_CMD,
141 RECOVERY_ACTION_CMD,
142 BACKUP_MISSION_TIMELINE,
142 BACKUP_MISSION_TIMELINE,
143 DIRECT_CMD,
143 DIRECT_CMD,
144 SPARE_GRD_SRC1,
144 SPARE_GRD_SRC1,
145 SPARE_GRD_SRC2,
145 SPARE_GRD_SRC2,
146 OBCP,
146 OBCP,
147 SYSTEM_CONTROL,
147 SYSTEM_CONTROL,
148 AOCS,
148 AOCS,
149 RPW_INTERNAL,
149 RPW_INTERNAL
150 UNKNOWN
151 };
150 };
152 // SEQUENCE COUNTERS
151 // SEQUENCE COUNTERS
153 #define SEQ_CNT_MAX 16383
152 #define SEQ_CNT_MAX 16383
154 #define SEQ_CNT_NB_DEST_ID 12
153 #define SEQ_CNT_NB_DEST_ID 12
155
154
156 // TM SID
155 // TM SID
157 #define SID_HK 1
156 #define SID_HK 1
158 #define SID_PARAMETER_DUMP 10
157 #define SID_PARAMETER_DUMP 10
159
158
160 #define SID_NORM_SWF_F0 3
159 #define SID_NORM_SWF_F0 3
161 #define SID_NORM_SWF_F1 4
160 #define SID_NORM_SWF_F1 4
162 #define SID_NORM_SWF_F2 5
161 #define SID_NORM_SWF_F2 5
163 #define SID_NORM_CWF_F3 1
162 #define SID_NORM_CWF_F3 1
164 #define SID_BURST_CWF_F2 2
163 #define SID_BURST_CWF_F2 2
165 #define SID_SBM1_CWF_F1 24
164 #define SID_SBM1_CWF_F1 24
166 #define SID_SBM2_CWF_F2 25
165 #define SID_SBM2_CWF_F2 25
167 #define SID_NORM_ASM_F0 11
166 #define SID_NORM_ASM_F0 11
168 #define SID_NORM_ASM_F1 12
167 #define SID_NORM_ASM_F1 12
169 #define SID_NORM_ASM_F2 13
168 #define SID_NORM_ASM_F2 13
170 #define SID_NORM_BP1_F0 14
169 #define SID_NORM_BP1_F0 14
171 #define SID_NORM_BP1_F1 15
170 #define SID_NORM_BP1_F1 15
172 #define SID_NORM_BP1_F2 16
171 #define SID_NORM_BP1_F2 16
173 #define SID_NORM_BP2_F0 19
172 #define SID_NORM_BP2_F0 19
174 #define SID_NORM_BP2_F1 20
173 #define SID_NORM_BP2_F1 20
175 #define SID_NORM_BP2_F2 21
174 #define SID_NORM_BP2_F2 21
176 #define SID_BURST_BP1_F0 17
175 #define SID_BURST_BP1_F0 17
177 #define SID_BURST_BP2_F0 22
176 #define SID_BURST_BP2_F0 22
178 #define SID_BURST_BP1_F1 18
177 #define SID_BURST_BP1_F1 18
179 #define SID_BURST_BP2_F1 23
178 #define SID_BURST_BP2_F1 23
180 #define SID_SBM1_BP1_F0 28
179 #define SID_SBM1_BP1_F0 28
181 #define SID_SBM1_BP2_F0 31
180 #define SID_SBM1_BP2_F0 31
182 #define SID_SBM2_BP1_F0 29
181 #define SID_SBM2_BP1_F0 29
183 #define SID_SBM2_BP2_F0 32
182 #define SID_SBM2_BP2_F0 32
184 #define SID_SBM2_BP1_F1 30
183 #define SID_SBM2_BP1_F1 30
185 #define SID_SBM2_BP2_F1 33
184 #define SID_SBM2_BP2_F1 33
186
185
187 // LENGTH (BYTES)
186 // LENGTH (BYTES)
188 #define LENGTH_TM_LFR_TC_EXE_MAX 32
187 #define LENGTH_TM_LFR_TC_EXE_MAX 32
189 #define LENGTH_TM_LFR_HK 126
188 #define LENGTH_TM_LFR_HK 126
190
189
191 // HEADER_LENGTH
190 // HEADER_LENGTH
192 #define TM_HEADER_LEN 16
191 #define TM_HEADER_LEN 16
193 #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28
192 #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28
194 // PACKET_LENGTH
193 // PACKET_LENGTH
195 #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET)
194 #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET)
196 #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET)
195 #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET)
197 #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET)
196 #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET)
198 #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET)
197 #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET)
199 #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET)
198 #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET)
200 #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET)
199 #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET)
201 #define PACKET_LENGTH_HK (126 - CCSDS_TC_TM_PACKET_OFFSET)
200 #define PACKET_LENGTH_HK (126 - CCSDS_TC_TM_PACKET_OFFSET)
202 #define PACKET_LENGTH_PARAMETER_DUMP (34 - CCSDS_TC_TM_PACKET_OFFSET)
201 #define PACKET_LENGTH_PARAMETER_DUMP (34 - CCSDS_TC_TM_PACKET_OFFSET)
203 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM (TOTAL_SIZE_SM + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET)
202 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM (TOTAL_SIZE_SM + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET)
204
203
205 #define SPARE1_PUSVERSION_SPARE2 0x10
204 #define SPARE1_PUSVERSION_SPARE2 0x10
206
205
207 #define LEN_TM_LFR_HK 130 // 126 + 4
206 #define LEN_TM_LFR_HK 130 // 126 + 4
208 #define LEN_TM_LFR_TC_EXE_NOT_IMP 28 // 24 + 4
207 #define LEN_TM_LFR_TC_EXE_NOT_IMP 28 // 24 + 4
209
208
210 #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1
209 #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1
211 #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1
210 #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1
212 #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1
211 #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1
213 #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1
212 #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1
214 #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1
213 #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1
215 #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1
214 #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1
216 #define DEFAULT_PKTCNT 0x07
215 #define DEFAULT_PKTCNT 0x07
217 #define BLK_NR_340 0x0154
216 #define BLK_NR_340 0x0154
218 #define BLK_NR_8 0x0008
217 #define BLK_NR_8 0x0008
219
218
220 enum TM_TYPE{
219 enum TM_TYPE{
221 TM_LFR_TC_EXE_OK,
220 TM_LFR_TC_EXE_OK,
222 TM_LFR_TC_EXE_ERR,
221 TM_LFR_TC_EXE_ERR,
223 TM_LFR_HK,
222 TM_LFR_HK,
224 TM_LFR_SCI,
223 TM_LFR_SCI,
225 TM_LFR_SCI_SBM,
224 TM_LFR_SCI_SBM,
226 TM_LFR_PAR_DUMP
225 TM_LFR_PAR_DUMP
227 };
226 };
228
227
229 typedef struct {
228 typedef struct {
230 unsigned char targetLogicalAddress;
229 unsigned char targetLogicalAddress;
231 unsigned char protocolIdentifier;
230 unsigned char protocolIdentifier;
232 unsigned char reserved;
231 unsigned char reserved;
233 unsigned char userApplication;
232 unsigned char userApplication;
234 // PACKET HEADER
233 // PACKET HEADER
235 unsigned char packetID[2];
234 unsigned char packetID[2];
236 unsigned char packetSequenceControl[2];
235 unsigned char packetSequenceControl[2];
237 unsigned char packetLength[2];
236 unsigned char packetLength[2];
238 // DATA FIELD HEADER
237 // DATA FIELD HEADER
239 unsigned char spare1_pusVersion_spare2;
238 unsigned char spare1_pusVersion_spare2;
240 unsigned char serviceType;
239 unsigned char serviceType;
241 unsigned char serviceSubType;
240 unsigned char serviceSubType;
242 unsigned char destinationID;
241 unsigned char destinationID;
243 unsigned char time[6];
242 unsigned char time[6];
244 //
243 //
245 unsigned char telecommand_pkt_id[2];
244 unsigned char telecommand_pkt_id[2];
246 unsigned char pkt_seq_control[2];
245 unsigned char pkt_seq_control[2];
247 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
246 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
248
247
249 typedef struct {
248 typedef struct {
250 unsigned char targetLogicalAddress;
249 unsigned char targetLogicalAddress;
251 unsigned char protocolIdentifier;
250 unsigned char protocolIdentifier;
252 unsigned char reserved;
251 unsigned char reserved;
253 unsigned char userApplication;
252 unsigned char userApplication;
254 // PACKET HEADER
253 // PACKET HEADER
255 unsigned char packetID[2];
254 unsigned char packetID[2];
256 unsigned char packetSequenceControl[2];
255 unsigned char packetSequenceControl[2];
257 unsigned char packetLength[2];
256 unsigned char packetLength[2];
258 // DATA FIELD HEADER
257 // DATA FIELD HEADER
259 unsigned char spare1_pusVersion_spare2;
258 unsigned char spare1_pusVersion_spare2;
260 unsigned char serviceType;
259 unsigned char serviceType;
261 unsigned char serviceSubType;
260 unsigned char serviceSubType;
262 unsigned char destinationID;
261 unsigned char destinationID;
263 unsigned char time[6];
262 unsigned char time[6];
264 //
263 //
265 unsigned char tc_failure_code[2];
264 unsigned char tc_failure_code[2];
266 unsigned char telecommand_pkt_id[2];
265 unsigned char telecommand_pkt_id[2];
267 unsigned char pkt_seq_control[2];
266 unsigned char pkt_seq_control[2];
268 unsigned char tc_service;
267 unsigned char tc_service;
269 unsigned char tc_subtype;
268 unsigned char tc_subtype;
270 unsigned char byte_position;
269 unsigned char byte_position;
271 unsigned char rcv_value;
270 unsigned char rcv_value;
272 } Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
271 } Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
273
272
274 typedef struct {
273 typedef struct {
275 unsigned char targetLogicalAddress;
274 unsigned char targetLogicalAddress;
276 unsigned char protocolIdentifier;
275 unsigned char protocolIdentifier;
277 unsigned char reserved;
276 unsigned char reserved;
278 unsigned char userApplication;
277 unsigned char userApplication;
279 // PACKET HEADER
278 // PACKET HEADER
280 unsigned char packetID[2];
279 unsigned char packetID[2];
281 unsigned char packetSequenceControl[2];
280 unsigned char packetSequenceControl[2];
282 unsigned char packetLength[2];
281 unsigned char packetLength[2];
283 // DATA FIELD HEADER
282 // DATA FIELD HEADER
284 unsigned char spare1_pusVersion_spare2;
283 unsigned char spare1_pusVersion_spare2;
285 unsigned char serviceType;
284 unsigned char serviceType;
286 unsigned char serviceSubType;
285 unsigned char serviceSubType;
287 unsigned char destinationID;
286 unsigned char destinationID;
288 unsigned char time[6];
287 unsigned char time[6];
289 //
288 //
290 unsigned char tc_failure_code[2];
289 unsigned char tc_failure_code[2];
291 unsigned char telecommand_pkt_id[2];
290 unsigned char telecommand_pkt_id[2];
292 unsigned char pkt_seq_control[2];
291 unsigned char pkt_seq_control[2];
293 unsigned char tc_service;
292 unsigned char tc_service;
294 unsigned char tc_subtype;
293 unsigned char tc_subtype;
295 unsigned char lfr_status_word[2];
294 unsigned char lfr_status_word[2];
296 } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
295 } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
297
296
298 typedef struct {
297 typedef struct {
299 unsigned char targetLogicalAddress;
298 unsigned char targetLogicalAddress;
300 unsigned char protocolIdentifier;
299 unsigned char protocolIdentifier;
301 unsigned char reserved;
300 unsigned char reserved;
302 unsigned char userApplication;
301 unsigned char userApplication;
303 // PACKET HEADER
302 // PACKET HEADER
304 unsigned char packetID[2];
303 unsigned char packetID[2];
305 unsigned char packetSequenceControl[2];
304 unsigned char packetSequenceControl[2];
306 unsigned char packetLength[2];
305 unsigned char packetLength[2];
307 // DATA FIELD HEADER
306 // DATA FIELD HEADER
308 unsigned char spare1_pusVersion_spare2;
307 unsigned char spare1_pusVersion_spare2;
309 unsigned char serviceType;
308 unsigned char serviceType;
310 unsigned char serviceSubType;
309 unsigned char serviceSubType;
311 unsigned char destinationID;
310 unsigned char destinationID;
312 unsigned char time[6];
311 unsigned char time[6];
313 //
312 //
314 unsigned char tc_failure_code[2];
313 unsigned char tc_failure_code[2];
315 unsigned char telecommand_pkt_id[2];
314 unsigned char telecommand_pkt_id[2];
316 unsigned char pkt_seq_control[2];
315 unsigned char pkt_seq_control[2];
317 unsigned char tc_service;
316 unsigned char tc_service;
318 unsigned char tc_subtype;
317 unsigned char tc_subtype;
319 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
318 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
320
319
321 typedef struct {
320 typedef struct {
322 unsigned char targetLogicalAddress;
321 unsigned char targetLogicalAddress;
323 unsigned char protocolIdentifier;
322 unsigned char protocolIdentifier;
324 unsigned char reserved;
323 unsigned char reserved;
325 unsigned char userApplication;
324 unsigned char userApplication;
326 // PACKET HEADER
325 // PACKET HEADER
327 unsigned char packetID[2];
326 unsigned char packetID[2];
328 unsigned char packetSequenceControl[2];
327 unsigned char packetSequenceControl[2];
329 unsigned char packetLength[2];
328 unsigned char packetLength[2];
330 // DATA FIELD HEADER
329 // DATA FIELD HEADER
331 unsigned char spare1_pusVersion_spare2;
330 unsigned char spare1_pusVersion_spare2;
332 unsigned char serviceType;
331 unsigned char serviceType;
333 unsigned char serviceSubType;
332 unsigned char serviceSubType;
334 unsigned char destinationID;
333 unsigned char destinationID;
335 unsigned char time[6];
334 unsigned char time[6];
336 //
335 //
337 unsigned char tc_failure_code[2];
336 unsigned char tc_failure_code[2];
338 unsigned char telecommand_pkt_id[2];
337 unsigned char telecommand_pkt_id[2];
339 unsigned char pkt_seq_control[2];
338 unsigned char pkt_seq_control[2];
340 unsigned char tc_service;
339 unsigned char tc_service;
341 unsigned char tc_subtype;
340 unsigned char tc_subtype;
342 } Packet_TM_LFR_TC_EXE_ERROR_t;
341 } Packet_TM_LFR_TC_EXE_ERROR_t;
343
342
344 typedef struct {
343 typedef struct {
345 unsigned char targetLogicalAddress;
344 unsigned char targetLogicalAddress;
346 unsigned char protocolIdentifier;
345 unsigned char protocolIdentifier;
347 unsigned char reserved;
346 unsigned char reserved;
348 unsigned char userApplication;
347 unsigned char userApplication;
349 // PACKET HEADER
348 // PACKET HEADER
350 unsigned char packetID[2];
349 unsigned char packetID[2];
351 unsigned char packetSequenceControl[2];
350 unsigned char packetSequenceControl[2];
352 unsigned char packetLength[2];
351 unsigned char packetLength[2];
353 // DATA FIELD HEADER
352 // DATA FIELD HEADER
354 unsigned char spare1_pusVersion_spare2;
353 unsigned char spare1_pusVersion_spare2;
355 unsigned char serviceType;
354 unsigned char serviceType;
356 unsigned char serviceSubType;
355 unsigned char serviceSubType;
357 unsigned char destinationID;
356 unsigned char destinationID;
358 unsigned char time[6];
357 unsigned char time[6];
359 //
358 //
360 unsigned char tc_failure_code[2];
359 unsigned char tc_failure_code[2];
361 unsigned char telecommand_pkt_id[2];
360 unsigned char telecommand_pkt_id[2];
362 unsigned char pkt_seq_control[2];
361 unsigned char pkt_seq_control[2];
363 unsigned char tc_service;
362 unsigned char tc_service;
364 unsigned char tc_subtype;
363 unsigned char tc_subtype;
365 unsigned char pkt_len_rcv_value[2];
364 unsigned char pkt_len_rcv_value[2];
366 unsigned char pkt_datafieldsize_cnt[2];
365 unsigned char pkt_datafieldsize_cnt[2];
367 unsigned char rcv_crc[2];
366 unsigned char rcv_crc[2];
368 unsigned char computed_crc[2];
367 unsigned char computed_crc[2];
369 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
368 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
370
369
371 typedef struct {
370 typedef struct {
372 unsigned char targetLogicalAddress;
371 unsigned char targetLogicalAddress;
373 unsigned char protocolIdentifier;
372 unsigned char protocolIdentifier;
374 unsigned char reserved;
373 unsigned char reserved;
375 unsigned char userApplication;
374 unsigned char userApplication;
376 unsigned char packetID[2];
375 unsigned char packetID[2];
377 unsigned char packetSequenceControl[2];
376 unsigned char packetSequenceControl[2];
378 unsigned char packetLength[2];
377 unsigned char packetLength[2];
379 // DATA FIELD HEADER
378 // DATA FIELD HEADER
380 unsigned char spare1_pusVersion_spare2;
379 unsigned char spare1_pusVersion_spare2;
381 unsigned char serviceType;
380 unsigned char serviceType;
382 unsigned char serviceSubType;
381 unsigned char serviceSubType;
383 unsigned char destinationID;
382 unsigned char destinationID;
384 unsigned char time[6];
383 unsigned char time[6];
385 // AUXILIARY HEADER
384 // AUXILIARY HEADER
386 unsigned char sid;
385 unsigned char sid;
387 unsigned char hkBIA;
386 unsigned char hkBIA;
388 unsigned char pktCnt;
387 unsigned char pktCnt;
389 unsigned char pktNr;
388 unsigned char pktNr;
390 unsigned char acquisitionTime[6];
389 unsigned char acquisitionTime[6];
391 unsigned char blkNr[2];
390 unsigned char blkNr[2];
392 } Header_TM_LFR_SCIENCE_SWF_t;
391 } Header_TM_LFR_SCIENCE_SWF_t;
393
392
394 typedef struct {
393 typedef struct {
395 unsigned char targetLogicalAddress;
394 unsigned char targetLogicalAddress;
396 unsigned char protocolIdentifier;
395 unsigned char protocolIdentifier;
397 unsigned char reserved;
396 unsigned char reserved;
398 unsigned char userApplication;
397 unsigned char userApplication;
399 unsigned char packetID[2];
398 unsigned char packetID[2];
400 unsigned char packetSequenceControl[2];
399 unsigned char packetSequenceControl[2];
401 unsigned char packetLength[2];
400 unsigned char packetLength[2];
402 // DATA FIELD HEADER
401 // DATA FIELD HEADER
403 unsigned char spare1_pusVersion_spare2;
402 unsigned char spare1_pusVersion_spare2;
404 unsigned char serviceType;
403 unsigned char serviceType;
405 unsigned char serviceSubType;
404 unsigned char serviceSubType;
406 unsigned char destinationID;
405 unsigned char destinationID;
407 unsigned char time[6];
406 unsigned char time[6];
408 // AUXILIARY DATA HEADER
407 // AUXILIARY DATA HEADER
409 unsigned char sid;
408 unsigned char sid;
410 unsigned char hkBIA;
409 unsigned char hkBIA;
411 unsigned char acquisitionTime[6];
410 unsigned char acquisitionTime[6];
412 unsigned char blkNr[2];
411 unsigned char blkNr[2];
413 } Header_TM_LFR_SCIENCE_CWF_t;
412 } Header_TM_LFR_SCIENCE_CWF_t;
414
413
415 typedef struct {
414 typedef struct {
416 unsigned char targetLogicalAddress;
415 unsigned char targetLogicalAddress;
417 unsigned char protocolIdentifier;
416 unsigned char protocolIdentifier;
418 unsigned char reserved;
417 unsigned char reserved;
419 unsigned char userApplication;
418 unsigned char userApplication;
420 unsigned char packetID[2];
419 unsigned char packetID[2];
421 unsigned char packetSequenceControl[2];
420 unsigned char packetSequenceControl[2];
422 unsigned char packetLength[2];
421 unsigned char packetLength[2];
423 // DATA FIELD HEADER
422 // DATA FIELD HEADER
424 unsigned char spare1_pusVersion_spare2;
423 unsigned char spare1_pusVersion_spare2;
425 unsigned char serviceType;
424 unsigned char serviceType;
426 unsigned char serviceSubType;
425 unsigned char serviceSubType;
427 unsigned char destinationID;
426 unsigned char destinationID;
428 unsigned char time[6];
427 unsigned char time[6];
429 // AUXILIARY HEADER
428 // AUXILIARY HEADER
430 unsigned char sid;
429 unsigned char sid;
431 unsigned char biaStatusInfo;
430 unsigned char biaStatusInfo;
432 unsigned char cntASM;
431 unsigned char cntASM;
433 unsigned char nrASM;
432 unsigned char nrASM;
434 unsigned char acquisitionTime[6];
433 unsigned char acquisitionTime[6];
435 unsigned char blkNr[2];
434 unsigned char blkNr[2];
436 } Header_TM_LFR_SCIENCE_ASM_t;
435 } Header_TM_LFR_SCIENCE_ASM_t;
437
436
438 typedef struct {
437 typedef struct {
439 //targetLogicalAddress is removed by the grspw module
438 //targetLogicalAddress is removed by the grspw module
440 unsigned char protocolIdentifier;
439 unsigned char protocolIdentifier;
441 unsigned char reserved;
440 unsigned char reserved;
442 unsigned char userApplication;
441 unsigned char userApplication;
443 unsigned char packetID[2];
442 unsigned char packetID[2];
444 unsigned char packetSequenceControl[2];
443 unsigned char packetSequenceControl[2];
445 unsigned char packetLength[2];
444 unsigned char packetLength[2];
446 // DATA FIELD HEADER
445 // DATA FIELD HEADER
447 unsigned char headerFlag_pusVersion_Ack;
446 unsigned char headerFlag_pusVersion_Ack;
448 unsigned char serviceType;
447 unsigned char serviceType;
449 unsigned char serviceSubType;
448 unsigned char serviceSubType;
450 unsigned char sourceID;
449 unsigned char sourceID;
451 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
450 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
452 } ccsdsTelecommandPacket_t;
451 } ccsdsTelecommandPacket_t;
453
452
454 typedef struct {
453 typedef struct {
455 unsigned char targetLogicalAddress;
454 unsigned char targetLogicalAddress;
456 unsigned char protocolIdentifier;
455 unsigned char protocolIdentifier;
457 unsigned char reserved;
456 unsigned char reserved;
458 unsigned char userApplication;
457 unsigned char userApplication;
459 unsigned char packetID[2];
458 unsigned char packetID[2];
460 unsigned char packetSequenceControl[2];
459 unsigned char packetSequenceControl[2];
461 unsigned char packetLength[2];
460 unsigned char packetLength[2];
462 unsigned char spare1_pusVersion_spare2;
461 unsigned char spare1_pusVersion_spare2;
463 unsigned char serviceType;
462 unsigned char serviceType;
464 unsigned char serviceSubType;
463 unsigned char serviceSubType;
465 unsigned char destinationID;
464 unsigned char destinationID;
466 unsigned char time[6];
465 unsigned char time[6];
467 unsigned char sid;
466 unsigned char sid;
468
467
469 //**************
468 //**************
470 // HK PARAMETERS
469 // HK PARAMETERS
471 unsigned char lfr_status_word[2];
470 unsigned char lfr_status_word[2];
472 unsigned char lfr_sw_version[4];
471 unsigned char lfr_sw_version[4];
473 // tc statistics
472 // tc statistics
474 unsigned char hk_lfr_update_info_tc_cnt[2];
473 unsigned char hk_lfr_update_info_tc_cnt[2];
475 unsigned char hk_lfr_update_time_tc_cnt[2];
474 unsigned char hk_lfr_update_time_tc_cnt[2];
476 unsigned char hk_dpu_exe_tc_lfr_cnt[2];
475 unsigned char hk_dpu_exe_tc_lfr_cnt[2];
477 unsigned char hk_dpu_rej_tc_lfr_cnt[2];
476 unsigned char hk_dpu_rej_tc_lfr_cnt[2];
478 unsigned char hk_lfr_last_exe_tc_id[2];
477 unsigned char hk_lfr_last_exe_tc_id[2];
479 unsigned char hk_lfr_last_exe_tc_type[2];
478 unsigned char hk_lfr_last_exe_tc_type[2];
480 unsigned char hk_lfr_last_exe_tc_subtype[2];
479 unsigned char hk_lfr_last_exe_tc_subtype[2];
481 unsigned char hk_lfr_last_exe_tc_time[6];
480 unsigned char hk_lfr_last_exe_tc_time[6];
482 unsigned char hk_lfr_last_rej_tc_id[2];
481 unsigned char hk_lfr_last_rej_tc_id[2];
483 unsigned char hk_lfr_last_rej_tc_type[2];
482 unsigned char hk_lfr_last_rej_tc_type[2];
484 unsigned char hk_lfr_last_rej_tc_subtype[2];
483 unsigned char hk_lfr_last_rej_tc_subtype[2];
485 unsigned char hk_lfr_last_rej_tc_time[6];
484 unsigned char hk_lfr_last_rej_tc_time[6];
486 // anomaly statistics
485 // anomaly statistics
487 unsigned char hk_lfr_le_cnt[2];
486 unsigned char hk_lfr_le_cnt[2];
488 unsigned char hk_lfr_me_cnt[2];
487 unsigned char hk_lfr_me_cnt[2];
489 unsigned char hk_lfr_he_cnt[2];
488 unsigned char hk_lfr_he_cnt[2];
490 unsigned char hk_lfr_last_er_rid[2];
489 unsigned char hk_lfr_last_er_rid[2];
491 unsigned char hk_lfr_last_er_code;
490 unsigned char hk_lfr_last_er_code;
492 unsigned char hk_lfr_last_er_time[6];
491 unsigned char hk_lfr_last_er_time[6];
493 // vhdl_blk_status
492 // vhdl_blk_status
494 unsigned char hk_lfr_vhdl_aa_sm;
493 unsigned char hk_lfr_vhdl_aa_sm;
495 unsigned char hk_lfr_vhdl_fft_sr;
494 unsigned char hk_lfr_vhdl_fft_sr;
496 unsigned char hk_lfr_vhdl_cic_hk;
495 unsigned char hk_lfr_vhdl_cic_hk;
497 unsigned char hk_lfr_vhdl_iir_cal;
496 unsigned char hk_lfr_vhdl_iir_cal;
498 // spacewire_if_statistics
497 // spacewire_if_statistics
499 unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2];
498 unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2];
500 unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2];
499 unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2];
501 unsigned char hk_lfr_dpu_spw_tick_out_cnt;
500 unsigned char hk_lfr_dpu_spw_tick_out_cnt;
502 unsigned char hk_lfr_dpu_spw_last_time;
501 unsigned char hk_lfr_dpu_spw_last_time;
503 // ahb error statistics
502 // ahb error statistics
504 unsigned int hk_lfr_last_fail_addr;
503 unsigned int hk_lfr_last_fail_addr;
505 // temperatures
504 // temperatures
506 unsigned char hk_lfr_temp_scm[2];
505 unsigned char hk_lfr_temp_scm[2];
507 unsigned char hk_lfr_temp_pcb[2];
506 unsigned char hk_lfr_temp_pcb[2];
508 unsigned char hk_lfr_temp_fpga[2];
507 unsigned char hk_lfr_temp_fpga[2];
509 // error counters
508 // error counters
510 unsigned char hk_lfr_dpu_spw_parity;
509 unsigned char hk_lfr_dpu_spw_parity;
511 unsigned char hk_lfr_dpu_spw_disconnect;
510 unsigned char hk_lfr_dpu_spw_disconnect;
512 unsigned char hk_lfr_dpu_spw_escape;
511 unsigned char hk_lfr_dpu_spw_escape;
513 unsigned char hk_lfr_dpu_spw_credit;
512 unsigned char hk_lfr_dpu_spw_credit;
514 unsigned char hk_lfr_dpu_spw_write_sync;
513 unsigned char hk_lfr_dpu_spw_write_sync;
515 unsigned char hk_lfr_dpu_spw_rx_ahb;
514 unsigned char hk_lfr_dpu_spw_rx_ahb;
516 unsigned char hk_lfr_dpu_spw_tx_ahb;
515 unsigned char hk_lfr_dpu_spw_tx_ahb;
517 unsigned char hk_lfr_dpu_spw_header_crc;
516 unsigned char hk_lfr_dpu_spw_header_crc;
518 unsigned char hk_lfr_dpu_spw_data_crc;
517 unsigned char hk_lfr_dpu_spw_data_crc;
519 unsigned char hk_lfr_dpu_spw_early_eop;
518 unsigned char hk_lfr_dpu_spw_early_eop;
520 unsigned char hk_lfr_dpu_spw_invalid_addr;
519 unsigned char hk_lfr_dpu_spw_invalid_addr;
521 unsigned char hk_lfr_dpu_spw_eep;
520 unsigned char hk_lfr_dpu_spw_eep;
522 unsigned char hk_lfr_dpu_spw_rx_too_big;
521 unsigned char hk_lfr_dpu_spw_rx_too_big;
523 // timecode
522 // timecode
524 unsigned char hk_lfr_timecode_erroneous;
523 unsigned char hk_lfr_timecode_erroneous;
525 unsigned char hk_lfr_timecode_missing;
524 unsigned char hk_lfr_timecode_missing;
526 unsigned char hk_lfr_timecode_invalid;
525 unsigned char hk_lfr_timecode_invalid;
527 // time
526 // time
528 unsigned char hk_lfr_time_timecode_it;
527 unsigned char hk_lfr_time_timecode_it;
529 unsigned char hk_lfr_time_not_synchro;
528 unsigned char hk_lfr_time_not_synchro;
530 unsigned char hk_lfr_time_timecode_ctr;
529 unsigned char hk_lfr_time_timecode_ctr;
531 // hk_lfr_buffer_dpu_
530 // hk_lfr_buffer_dpu_
532 unsigned char hk_lfr_buffer_dpu_tc_fifo;
531 unsigned char hk_lfr_buffer_dpu_tc_fifo;
533 unsigned char hk_lfr_buffer_dpu_tm_fifo;
532 unsigned char hk_lfr_buffer_dpu_tm_fifo;
534 // hk_lfr_ahb_
533 // hk_lfr_ahb_
535 unsigned char hk_lfr_ahb_correctable;
534 unsigned char hk_lfr_ahb_correctable;
536 unsigned char hk_lfr_ahb_uncorrectable;
535 unsigned char hk_lfr_ahb_uncorrectable;
537 unsigned char hk_lfr_ahb_fails_trans;
536 unsigned char hk_lfr_ahb_fails_trans;
538 // hk_lfr_adc_
537 // hk_lfr_adc_
539 unsigned char hk_lfr_adc_failure;
538 unsigned char hk_lfr_adc_failure;
540 unsigned char hk_lfr_adc_timeout;
539 unsigned char hk_lfr_adc_timeout;
541 unsigned char hk_lfr_toomany_err;
540 unsigned char hk_lfr_toomany_err;
542 // hk_lfr_cpu_
541 // hk_lfr_cpu_
543 unsigned char hk_lfr_cpu_write_err;
542 unsigned char hk_lfr_cpu_write_err;
544 unsigned char hk_lfr_cpu_ins_access_err;
543 unsigned char hk_lfr_cpu_ins_access_err;
545 unsigned char hk_lfr_cpu_illegal_ins;
544 unsigned char hk_lfr_cpu_illegal_ins;
546 unsigned char hk_lfr_cpu_privilegied_ins;
545 unsigned char hk_lfr_cpu_privilegied_ins;
547 unsigned char hk_lfr_cpu_register_hw;
546 unsigned char hk_lfr_cpu_register_hw;
548 unsigned char hk_lfr_cpu_not_aligned;
547 unsigned char hk_lfr_cpu_not_aligned;
549 unsigned char hk_lfr_cpu_data_exception;
548 unsigned char hk_lfr_cpu_data_exception;
550 unsigned char hk_lfr_cpu_div_exception;
549 unsigned char hk_lfr_cpu_div_exception;
551 unsigned char hk_lfr_cpu_arith_overflow;
550 unsigned char hk_lfr_cpu_arith_overflow;
552 } Packet_TM_LFR_HK_t;
551 } Packet_TM_LFR_HK_t;
553
552
554 typedef struct {
553 typedef struct {
555 unsigned char targetLogicalAddress;
554 unsigned char targetLogicalAddress;
556 unsigned char protocolIdentifier;
555 unsigned char protocolIdentifier;
557 unsigned char reserved;
556 unsigned char reserved;
558 unsigned char userApplication;
557 unsigned char userApplication;
559 unsigned char packetID[2];
558 unsigned char packetID[2];
560 unsigned char packetSequenceControl[2];
559 unsigned char packetSequenceControl[2];
561 unsigned char packetLength[2];
560 unsigned char packetLength[2];
562 // DATA FIELD HEADER
561 // DATA FIELD HEADER
563 unsigned char spare1_pusVersion_spare2;
562 unsigned char spare1_pusVersion_spare2;
564 unsigned char serviceType;
563 unsigned char serviceType;
565 unsigned char serviceSubType;
564 unsigned char serviceSubType;
566 unsigned char destinationID;
565 unsigned char destinationID;
567 unsigned char time[6];
566 unsigned char time[6];
568 unsigned char sid;
567 unsigned char sid;
569
568
570 //******************
569 //******************
571 // COMMON PARAMETERS
570 // COMMON PARAMETERS
572 unsigned char unused0;
571 unsigned char unused0;
573 unsigned char bw_sp0_sp1_r0_r1;
572 unsigned char bw_sp0_sp1_r0_r1;
574
573
575 //******************
574 //******************
576 // NORMAL PARAMETERS
575 // NORMAL PARAMETERS
577 unsigned char sy_lfr_n_swf_l[2];
576 unsigned char sy_lfr_n_swf_l[2];
578 unsigned char sy_lfr_n_swf_p[2];
577 unsigned char sy_lfr_n_swf_p[2];
579 unsigned char sy_lfr_n_asm_p[2];
578 unsigned char sy_lfr_n_asm_p[2];
580 unsigned char sy_lfr_n_bp_p0;
579 unsigned char sy_lfr_n_bp_p0;
581 unsigned char sy_lfr_n_bp_p1;
580 unsigned char sy_lfr_n_bp_p1;
582
581
583 //*****************
582 //*****************
584 // BURST PARAMETERS
583 // BURST PARAMETERS
585 unsigned char sy_lfr_b_bp_p0;
584 unsigned char sy_lfr_b_bp_p0;
586 unsigned char sy_lfr_b_bp_p1;
585 unsigned char sy_lfr_b_bp_p1;
587
586
588 //****************
587 //****************
589 // SBM1 PARAMETERS
588 // SBM1 PARAMETERS
590 unsigned char sy_lfr_s1_bp_p0;
589 unsigned char sy_lfr_s1_bp_p0;
591 unsigned char sy_lfr_s1_bp_p1;
590 unsigned char sy_lfr_s1_bp_p1;
592
591
593 //****************
592 //****************
594 // SBM2 PARAMETERS
593 // SBM2 PARAMETERS
595 unsigned char sy_lfr_s2_bp_p0;
594 unsigned char sy_lfr_s2_bp_p0;
596 unsigned char sy_lfr_s2_bp_p1;
595 unsigned char sy_lfr_s2_bp_p1;
597 } Packet_TM_LFR_PARAMETER_DUMP_t;
596 } Packet_TM_LFR_PARAMETER_DUMP_t;
598
597
599
598
600 #endif // CCSDS_TYPES_H_INCLUDED
599 #endif // CCSDS_TYPES_H_INCLUDED
@@ -1,501 +1,494
1 /** Functions to send TM packets related to TC parsing and execution.
1 /** Functions to send TM packets related to TC parsing and execution.
2 *
2 *
3 * @file
3 * @file
4 * @author P. LEROY
4 * @author P. LEROY
5 *
5 *
6 * A group of functions to send appropriate TM packets after parsing and execution:
6 * A group of functions to send appropriate TM packets after parsing and execution:
7 * - TM_LFR_TC_EXE_SUCCESS
7 * - TM_LFR_TC_EXE_SUCCESS
8 * - TM_LFR_TC_EXE_INCONSISTENT
8 * - TM_LFR_TC_EXE_INCONSISTENT
9 * - TM_LFR_TC_EXE_NOT_EXECUTABLE
9 * - TM_LFR_TC_EXE_NOT_EXECUTABLE
10 * - TM_LFR_TC_EXE_NOT_IMPLEMENTED
10 * - TM_LFR_TC_EXE_NOT_IMPLEMENTED
11 * - TM_LFR_TC_EXE_ERROR
11 * - TM_LFR_TC_EXE_ERROR
12 * - TM_LFR_TC_EXE_CORRUPTED
12 * - TM_LFR_TC_EXE_CORRUPTED
13 *
13 *
14 */
14 */
15
15
16 #include "tm_lfr_tc_exe.h"
16 #include "tm_lfr_tc_exe.h"
17
17
18 int send_tm_lfr_tc_exe_success( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
18 int send_tm_lfr_tc_exe_success( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
19 {
19 {
20 /** This function sends a TM_LFR_TC_EXE_SUCCESS packet in the dedicated RTEMS message queue.
20 /** This function sends a TM_LFR_TC_EXE_SUCCESS packet in the dedicated RTEMS message queue.
21 *
21 *
22 * @param TC points to the TeleCommand packet that is being processed
22 * @param TC points to the TeleCommand packet that is being processed
23 * @param queue_id is the id of the queue which handles TM
23 * @param queue_id is the id of the queue which handles TM
24 *
24 *
25 * @return RTEMS directive status code:
25 * @return RTEMS directive status code:
26 * - RTEMS_SUCCESSFUL - message sent successfully
26 * - RTEMS_SUCCESSFUL - message sent successfully
27 * - RTEMS_INVALID_ID - invalid queue id
27 * - RTEMS_INVALID_ID - invalid queue id
28 * - RTEMS_INVALID_SIZE - invalid message size
28 * - RTEMS_INVALID_SIZE - invalid message size
29 * - RTEMS_INVALID_ADDRESS - buffer is NULL
29 * - RTEMS_INVALID_ADDRESS - buffer is NULL
30 * - RTEMS_UNSATISFIED - out of message buffers
30 * - RTEMS_UNSATISFIED - out of message buffers
31 * - RTEMS_TOO_MANY - queue s limit has been reached
31 * - RTEMS_TOO_MANY - queue s limit has been reached
32 *
32 *
33 */
33 */
34
34
35 rtems_status_code status;
35 rtems_status_code status;
36 Packet_TM_LFR_TC_EXE_SUCCESS_t TM;
36 Packet_TM_LFR_TC_EXE_SUCCESS_t TM;
37 unsigned char messageSize;
37 unsigned char messageSize;
38
38
39 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
39 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
40 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
40 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
41 TM.reserved = DEFAULT_RESERVED;
41 TM.reserved = DEFAULT_RESERVED;
42 TM.userApplication = CCSDS_USER_APP;
42 TM.userApplication = CCSDS_USER_APP;
43 // PACKET HEADER
43 // PACKET HEADER
44 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
44 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
45 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
45 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
46 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
46 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
47 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_SUCCESS >> 8);
47 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_SUCCESS >> 8);
48 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_SUCCESS );
48 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_SUCCESS );
49 // DATA FIELD HEADER
49 // DATA FIELD HEADER
50 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
50 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
51 TM.serviceType = TM_TYPE_TC_EXE;
51 TM.serviceType = TM_TYPE_TC_EXE;
52 TM.serviceSubType = TM_SUBTYPE_EXE_OK;
52 TM.serviceSubType = TM_SUBTYPE_EXE_OK;
53 TM.destinationID = TC->sourceID;
53 TM.destinationID = TC->sourceID;
54 TM.time[0] = time[0];
54 TM.time[0] = time[0];
55 TM.time[1] = time[1];
55 TM.time[1] = time[1];
56 TM.time[2] = time[2];
56 TM.time[2] = time[2];
57 TM.time[3] = time[3];
57 TM.time[3] = time[3];
58 TM.time[4] = time[4];
58 TM.time[4] = time[4];
59 TM.time[5] = time[5];
59 TM.time[5] = time[5];
60 //
60 //
61 TM.telecommand_pkt_id[0] = TC->packetID[0];
61 TM.telecommand_pkt_id[0] = TC->packetID[0];
62 TM.telecommand_pkt_id[1] = TC->packetID[1];
62 TM.telecommand_pkt_id[1] = TC->packetID[1];
63 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
63 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
64 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
64 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
65
65
66 messageSize = PACKET_LENGTH_TC_EXE_SUCCESS + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
66 messageSize = PACKET_LENGTH_TC_EXE_SUCCESS + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
67
67
68 // SEND DATA
68 // SEND DATA
69 status = rtems_message_queue_send( queue_id, &TM, messageSize);
69 status = rtems_message_queue_send( queue_id, &TM, messageSize);
70 if (status != RTEMS_SUCCESSFUL) {
70 if (status != RTEMS_SUCCESSFUL) {
71 PRINTF("in send_tm_lfr_tc_exe_success *** ERR\n")
71 PRINTF("in send_tm_lfr_tc_exe_success *** ERR\n")
72 }
72 }
73
73
74 return status;
74 return status;
75 }
75 }
76
76
77 int send_tm_lfr_tc_exe_inconsistent( ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
77 int send_tm_lfr_tc_exe_inconsistent( ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
78 unsigned char byte_position, unsigned char rcv_value,
78 unsigned char byte_position, unsigned char rcv_value,
79 unsigned char *time)
79 unsigned char *time)
80 {
80 {
81 /** This function sends a TM_LFR_TC_EXE_INCONSISTENT packet in the dedicated RTEMS message queue.
81 /** This function sends a TM_LFR_TC_EXE_INCONSISTENT packet in the dedicated RTEMS message queue.
82 *
82 *
83 * @param TC points to the TeleCommand packet that is being processed
83 * @param TC points to the TeleCommand packet that is being processed
84 * @param queue_id is the id of the queue which handles TM
84 * @param queue_id is the id of the queue which handles TM
85 * @param byte_position is the byte position of the MSB of the parameter that has been seen as inconsistent
85 * @param byte_position is the byte position of the MSB of the parameter that has been seen as inconsistent
86 * @param rcv_value is the value of the LSB of the parameter that has been deteced as inconsistent
86 * @param rcv_value is the value of the LSB of the parameter that has been deteced as inconsistent
87 *
87 *
88 * @return RTEMS directive status code:
88 * @return RTEMS directive status code:
89 * - RTEMS_SUCCESSFUL - message sent successfully
89 * - RTEMS_SUCCESSFUL - message sent successfully
90 * - RTEMS_INVALID_ID - invalid queue id
90 * - RTEMS_INVALID_ID - invalid queue id
91 * - RTEMS_INVALID_SIZE - invalid message size
91 * - RTEMS_INVALID_SIZE - invalid message size
92 * - RTEMS_INVALID_ADDRESS - buffer is NULL
92 * - RTEMS_INVALID_ADDRESS - buffer is NULL
93 * - RTEMS_UNSATISFIED - out of message buffers
93 * - RTEMS_UNSATISFIED - out of message buffers
94 * - RTEMS_TOO_MANY - queue s limit has been reached
94 * - RTEMS_TOO_MANY - queue s limit has been reached
95 *
95 *
96 */
96 */
97
97
98 rtems_status_code status;
98 rtems_status_code status;
99 Packet_TM_LFR_TC_EXE_INCONSISTENT_t TM;
99 Packet_TM_LFR_TC_EXE_INCONSISTENT_t TM;
100 unsigned char messageSize;
100 unsigned char messageSize;
101
101
102 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
102 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
103 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
103 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
104 TM.reserved = DEFAULT_RESERVED;
104 TM.reserved = DEFAULT_RESERVED;
105 TM.userApplication = CCSDS_USER_APP;
105 TM.userApplication = CCSDS_USER_APP;
106 // PACKET HEADER
106 // PACKET HEADER
107 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
107 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
108 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
108 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
109 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
109 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
110 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_INCONSISTENT >> 8);
110 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_INCONSISTENT >> 8);
111 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_INCONSISTENT );
111 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_INCONSISTENT );
112 // DATA FIELD HEADER
112 // DATA FIELD HEADER
113 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
113 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
114 TM.serviceType = TM_TYPE_TC_EXE;
114 TM.serviceType = TM_TYPE_TC_EXE;
115 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
115 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
116 TM.destinationID = TC->sourceID;
116 TM.destinationID = TC->sourceID;
117 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
117 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
118 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
118 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
119 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
119 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
120 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
120 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
121 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
121 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
122 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
122 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
123 //
123 //
124 TM.tc_failure_code[0] = (char) (WRONG_APP_DATA >> 8);
124 TM.tc_failure_code[0] = (char) (WRONG_APP_DATA >> 8);
125 TM.tc_failure_code[1] = (char) (WRONG_APP_DATA );
125 TM.tc_failure_code[1] = (char) (WRONG_APP_DATA );
126 TM.telecommand_pkt_id[0] = TC->packetID[0];
126 TM.telecommand_pkt_id[0] = TC->packetID[0];
127 TM.telecommand_pkt_id[1] = TC->packetID[1];
127 TM.telecommand_pkt_id[1] = TC->packetID[1];
128 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
128 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
129 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
129 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
130 TM.tc_service = TC->serviceType; // type of the rejected TC
130 TM.tc_service = TC->serviceType; // type of the rejected TC
131 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
131 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
132 TM.byte_position = byte_position;
132 TM.byte_position = byte_position;
133 TM.rcv_value = rcv_value;
133 TM.rcv_value = rcv_value;
134
134
135 messageSize = PACKET_LENGTH_TC_EXE_INCONSISTENT + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
135 messageSize = PACKET_LENGTH_TC_EXE_INCONSISTENT + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
136
136
137 // SEND DATA
137 // SEND DATA
138 status = rtems_message_queue_send( queue_id, &TM, messageSize);
138 status = rtems_message_queue_send( queue_id, &TM, messageSize);
139 if (status != RTEMS_SUCCESSFUL) {
139 if (status != RTEMS_SUCCESSFUL) {
140 PRINTF("in send_tm_lfr_tc_exe_inconsistent *** ERR\n")
140 PRINTF("in send_tm_lfr_tc_exe_inconsistent *** ERR\n")
141 }
141 }
142
142
143 return status;
143 return status;
144 }
144 }
145
145
146 int send_tm_lfr_tc_exe_not_executable( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
146 int send_tm_lfr_tc_exe_not_executable( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
147 {
147 {
148 /** This function sends a TM_LFR_TC_EXE_NOT_EXECUTABLE packet in the dedicated RTEMS message queue.
148 /** This function sends a TM_LFR_TC_EXE_NOT_EXECUTABLE packet in the dedicated RTEMS message queue.
149 *
149 *
150 * @param TC points to the TeleCommand packet that is being processed
150 * @param TC points to the TeleCommand packet that is being processed
151 * @param queue_id is the id of the queue which handles TM
151 * @param queue_id is the id of the queue which handles TM
152 *
152 *
153 * @return RTEMS directive status code:
153 * @return RTEMS directive status code:
154 * - RTEMS_SUCCESSFUL - message sent successfully
154 * - RTEMS_SUCCESSFUL - message sent successfully
155 * - RTEMS_INVALID_ID - invalid queue id
155 * - RTEMS_INVALID_ID - invalid queue id
156 * - RTEMS_INVALID_SIZE - invalid message size
156 * - RTEMS_INVALID_SIZE - invalid message size
157 * - RTEMS_INVALID_ADDRESS - buffer is NULL
157 * - RTEMS_INVALID_ADDRESS - buffer is NULL
158 * - RTEMS_UNSATISFIED - out of message buffers
158 * - RTEMS_UNSATISFIED - out of message buffers
159 * - RTEMS_TOO_MANY - queue s limit has been reached
159 * - RTEMS_TOO_MANY - queue s limit has been reached
160 *
160 *
161 */
161 */
162
162
163 rtems_status_code status;
163 rtems_status_code status;
164 Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t TM;
164 Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t TM;
165 unsigned char messageSize;
165 unsigned char messageSize;
166
166
167 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
167 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
168 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
168 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
169 TM.reserved = DEFAULT_RESERVED;
169 TM.reserved = DEFAULT_RESERVED;
170 TM.userApplication = CCSDS_USER_APP;
170 TM.userApplication = CCSDS_USER_APP;
171 // PACKET HEADER
171 // PACKET HEADER
172 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
172 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
173 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
173 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
174 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
174 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
175 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE >> 8);
175 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE >> 8);
176 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE );
176 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE );
177 // DATA FIELD HEADER
177 // DATA FIELD HEADER
178 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
178 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
179 TM.serviceType = TM_TYPE_TC_EXE;
179 TM.serviceType = TM_TYPE_TC_EXE;
180 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
180 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
181 TM.destinationID = TC->sourceID; // default destination id
181 TM.destinationID = TC->sourceID; // default destination id
182 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
182 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
183 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
183 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
184 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
184 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
185 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
185 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
186 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
186 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
187 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
187 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
188 //
188 //
189 TM.tc_failure_code[0] = (char) (TC_NOT_EXE >> 8);
189 TM.tc_failure_code[0] = (char) (TC_NOT_EXE >> 8);
190 TM.tc_failure_code[1] = (char) (TC_NOT_EXE );
190 TM.tc_failure_code[1] = (char) (TC_NOT_EXE );
191 TM.telecommand_pkt_id[0] = TC->packetID[0];
191 TM.telecommand_pkt_id[0] = TC->packetID[0];
192 TM.telecommand_pkt_id[1] = TC->packetID[1];
192 TM.telecommand_pkt_id[1] = TC->packetID[1];
193 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
193 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
194 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
194 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
195 TM.tc_service = TC->serviceType; // type of the rejected TC
195 TM.tc_service = TC->serviceType; // type of the rejected TC
196 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
196 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
197 TM.lfr_status_word[0] = housekeeping_packet.lfr_status_word[0];
197 TM.lfr_status_word[0] = housekeeping_packet.lfr_status_word[0];
198 TM.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1];
198 TM.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1];
199
199
200 messageSize = PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
200 messageSize = PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
201
201
202 // SEND DATA
202 // SEND DATA
203 status = rtems_message_queue_send( queue_id, &TM, messageSize);
203 status = rtems_message_queue_send( queue_id, &TM, messageSize);
204 if (status != RTEMS_SUCCESSFUL) {
204 if (status != RTEMS_SUCCESSFUL) {
205 PRINTF("in send_tm_lfr_tc_exe_not_executable *** ERR\n")
205 PRINTF("in send_tm_lfr_tc_exe_not_executable *** ERR\n")
206 }
206 }
207
207
208 return status;
208 return status;
209 }
209 }
210
210
211 int send_tm_lfr_tc_exe_not_implemented( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
211 int send_tm_lfr_tc_exe_not_implemented( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
212 {
212 {
213 /** This function sends a TM_LFR_TC_EXE_NOT_IMPLEMENTED packet in the dedicated RTEMS message queue.
213 /** This function sends a TM_LFR_TC_EXE_NOT_IMPLEMENTED packet in the dedicated RTEMS message queue.
214 *
214 *
215 * @param TC points to the TeleCommand packet that is being processed
215 * @param TC points to the TeleCommand packet that is being processed
216 * @param queue_id is the id of the queue which handles TM
216 * @param queue_id is the id of the queue which handles TM
217 *
217 *
218 * @return RTEMS directive status code:
218 * @return RTEMS directive status code:
219 * - RTEMS_SUCCESSFUL - message sent successfully
219 * - RTEMS_SUCCESSFUL - message sent successfully
220 * - RTEMS_INVALID_ID - invalid queue id
220 * - RTEMS_INVALID_ID - invalid queue id
221 * - RTEMS_INVALID_SIZE - invalid message size
221 * - RTEMS_INVALID_SIZE - invalid message size
222 * - RTEMS_INVALID_ADDRESS - buffer is NULL
222 * - RTEMS_INVALID_ADDRESS - buffer is NULL
223 * - RTEMS_UNSATISFIED - out of message buffers
223 * - RTEMS_UNSATISFIED - out of message buffers
224 * - RTEMS_TOO_MANY - queue s limit has been reached
224 * - RTEMS_TOO_MANY - queue s limit has been reached
225 *
225 *
226 */
226 */
227
227
228 rtems_status_code status;
228 rtems_status_code status;
229 Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t TM;
229 Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t TM;
230 unsigned char messageSize;
230 unsigned char messageSize;
231
231
232 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
232 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
233 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
233 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
234 TM.reserved = DEFAULT_RESERVED;
234 TM.reserved = DEFAULT_RESERVED;
235 TM.userApplication = CCSDS_USER_APP;
235 TM.userApplication = CCSDS_USER_APP;
236 // PACKET HEADER
236 // PACKET HEADER
237 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
237 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
238 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
238 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
239 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
239 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
240 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED >> 8);
240 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED >> 8);
241 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED );
241 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED );
242 // DATA FIELD HEADER
242 // DATA FIELD HEADER
243 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
243 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
244 TM.serviceType = TM_TYPE_TC_EXE;
244 TM.serviceType = TM_TYPE_TC_EXE;
245 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
245 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
246 TM.destinationID = TC->sourceID; // default destination id
246 TM.destinationID = TC->sourceID; // default destination id
247 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
247 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
248 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
248 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
249 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
249 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
250 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
250 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
251 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
251 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
252 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
252 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
253 //
253 //
254 TM.tc_failure_code[0] = (char) (FUNCT_NOT_IMPL >> 8);
254 TM.tc_failure_code[0] = (char) (FUNCT_NOT_IMPL >> 8);
255 TM.tc_failure_code[1] = (char) (FUNCT_NOT_IMPL );
255 TM.tc_failure_code[1] = (char) (FUNCT_NOT_IMPL );
256 TM.telecommand_pkt_id[0] = TC->packetID[0];
256 TM.telecommand_pkt_id[0] = TC->packetID[0];
257 TM.telecommand_pkt_id[1] = TC->packetID[1];
257 TM.telecommand_pkt_id[1] = TC->packetID[1];
258 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
258 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
259 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
259 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
260 TM.tc_service = TC->serviceType; // type of the rejected TC
260 TM.tc_service = TC->serviceType; // type of the rejected TC
261 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
261 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
262
262
263 messageSize = PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
263 messageSize = PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
264
264
265 // SEND DATA
265 // SEND DATA
266 status = rtems_message_queue_send( queue_id, &TM, messageSize);
266 status = rtems_message_queue_send( queue_id, &TM, messageSize);
267 if (status != RTEMS_SUCCESSFUL) {
267 if (status != RTEMS_SUCCESSFUL) {
268 PRINTF("in send_tm_lfr_tc_exe_not_implemented *** ERR\n")
268 PRINTF("in send_tm_lfr_tc_exe_not_implemented *** ERR\n")
269 }
269 }
270
270
271 return status;
271 return status;
272 }
272 }
273
273
274 int send_tm_lfr_tc_exe_error( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
274 int send_tm_lfr_tc_exe_error( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
275 {
275 {
276 /** This function sends a TM_LFR_TC_EXE_ERROR packet in the dedicated RTEMS message queue.
276 /** This function sends a TM_LFR_TC_EXE_ERROR packet in the dedicated RTEMS message queue.
277 *
277 *
278 * @param TC points to the TeleCommand packet that is being processed
278 * @param TC points to the TeleCommand packet that is being processed
279 * @param queue_id is the id of the queue which handles TM
279 * @param queue_id is the id of the queue which handles TM
280 *
280 *
281 * @return RTEMS directive status code:
281 * @return RTEMS directive status code:
282 * - RTEMS_SUCCESSFUL - message sent successfully
282 * - RTEMS_SUCCESSFUL - message sent successfully
283 * - RTEMS_INVALID_ID - invalid queue id
283 * - RTEMS_INVALID_ID - invalid queue id
284 * - RTEMS_INVALID_SIZE - invalid message size
284 * - RTEMS_INVALID_SIZE - invalid message size
285 * - RTEMS_INVALID_ADDRESS - buffer is NULL
285 * - RTEMS_INVALID_ADDRESS - buffer is NULL
286 * - RTEMS_UNSATISFIED - out of message buffers
286 * - RTEMS_UNSATISFIED - out of message buffers
287 * - RTEMS_TOO_MANY - queue s limit has been reached
287 * - RTEMS_TOO_MANY - queue s limit has been reached
288 *
288 *
289 */
289 */
290
290
291 rtems_status_code status;
291 rtems_status_code status;
292 Packet_TM_LFR_TC_EXE_ERROR_t TM;
292 Packet_TM_LFR_TC_EXE_ERROR_t TM;
293 unsigned char messageSize;
293 unsigned char messageSize;
294
294
295 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
295 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
296 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
296 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
297 TM.reserved = DEFAULT_RESERVED;
297 TM.reserved = DEFAULT_RESERVED;
298 TM.userApplication = CCSDS_USER_APP;
298 TM.userApplication = CCSDS_USER_APP;
299 // PACKET HEADER
299 // PACKET HEADER
300 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
300 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
301 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
301 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
302 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
302 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
303 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_ERROR >> 8);
303 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_ERROR >> 8);
304 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_ERROR );
304 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_ERROR );
305 // DATA FIELD HEADER
305 // DATA FIELD HEADER
306 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
306 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
307 TM.serviceType = TM_TYPE_TC_EXE;
307 TM.serviceType = TM_TYPE_TC_EXE;
308 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
308 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
309 TM.destinationID = TC->sourceID; // default destination id
309 TM.destinationID = TC->sourceID; // default destination id
310 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
310 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
311 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
311 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
312 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
312 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
313 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
313 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
314 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
314 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
315 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
315 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
316 //
316 //
317 TM.tc_failure_code[0] = (char) (FAIL_DETECTED >> 8);
317 TM.tc_failure_code[0] = (char) (FAIL_DETECTED >> 8);
318 TM.tc_failure_code[1] = (char) (FAIL_DETECTED );
318 TM.tc_failure_code[1] = (char) (FAIL_DETECTED );
319 TM.telecommand_pkt_id[0] = TC->packetID[0];
319 TM.telecommand_pkt_id[0] = TC->packetID[0];
320 TM.telecommand_pkt_id[1] = TC->packetID[1];
320 TM.telecommand_pkt_id[1] = TC->packetID[1];
321 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
321 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
322 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
322 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
323 TM.tc_service = TC->serviceType; // type of the rejected TC
323 TM.tc_service = TC->serviceType; // type of the rejected TC
324 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
324 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
325
325
326 messageSize = PACKET_LENGTH_TC_EXE_ERROR + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
326 messageSize = PACKET_LENGTH_TC_EXE_ERROR + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
327
327
328 // SEND DATA
328 // SEND DATA
329 status = rtems_message_queue_send( queue_id, &TM, messageSize);
329 status = rtems_message_queue_send( queue_id, &TM, messageSize);
330 if (status != RTEMS_SUCCESSFUL) {
330 if (status != RTEMS_SUCCESSFUL) {
331 PRINTF("in send_tm_lfr_tc_exe_error *** ERR\n")
331 PRINTF("in send_tm_lfr_tc_exe_error *** ERR\n")
332 }
332 }
333
333
334 return status;
334 return status;
335 }
335 }
336
336
337 int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
337 int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
338 unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV,
338 unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV,
339 unsigned char destinationID, unsigned char *time)
339 unsigned char destinationID, unsigned char *time)
340 {
340 {
341 /** This function sends a TM_LFR_TC_EXE_CORRUPTED packet in the dedicated RTEMS message queue.
341 /** This function sends a TM_LFR_TC_EXE_CORRUPTED packet in the dedicated RTEMS message queue.
342 *
342 *
343 * @param TC points to the TeleCommand packet that is being processed
343 * @param TC points to the TeleCommand packet that is being processed
344 * @param queue_id is the id of the queue which handles TM
344 * @param queue_id is the id of the queue which handles TM
345 * @param computed_CRC points to a buffer of two bytes containing the CRC computed during the parsing of the TeleCommand
345 * @param computed_CRC points to a buffer of two bytes containing the CRC computed during the parsing of the TeleCommand
346 * @param currentTC_LEN_RCV points to a buffer of two bytes containing a packet size field computed on the received data
346 * @param currentTC_LEN_RCV points to a buffer of two bytes containing a packet size field computed on the received data
347 *
347 *
348 * @return RTEMS directive status code:
348 * @return RTEMS directive status code:
349 * - RTEMS_SUCCESSFUL - message sent successfully
349 * - RTEMS_SUCCESSFUL - message sent successfully
350 * - RTEMS_INVALID_ID - invalid queue id
350 * - RTEMS_INVALID_ID - invalid queue id
351 * - RTEMS_INVALID_SIZE - invalid message size
351 * - RTEMS_INVALID_SIZE - invalid message size
352 * - RTEMS_INVALID_ADDRESS - buffer is NULL
352 * - RTEMS_INVALID_ADDRESS - buffer is NULL
353 * - RTEMS_UNSATISFIED - out of message buffers
353 * - RTEMS_UNSATISFIED - out of message buffers
354 * - RTEMS_TOO_MANY - queue s limit has been reached
354 * - RTEMS_TOO_MANY - queue s limit has been reached
355 *
355 *
356 */
356 */
357
357
358 rtems_status_code status;
358 rtems_status_code status;
359 Packet_TM_LFR_TC_EXE_CORRUPTED_t TM;
359 Packet_TM_LFR_TC_EXE_CORRUPTED_t TM;
360 unsigned char messageSize;
360 unsigned char messageSize;
361 unsigned int packetLength;
361 unsigned int packetLength;
362 unsigned char *packetDataField;
362 unsigned char *packetDataField;
363
363
364 packetLength = (TC->packetLength[0] * 256) + TC->packetLength[1]; // compute the packet length parameter
364 packetLength = (TC->packetLength[0] * 256) + TC->packetLength[1]; // compute the packet length parameter
365 packetDataField = (unsigned char *) &TC->headerFlag_pusVersion_Ack; // get the beginning of the data field
365 packetDataField = (unsigned char *) &TC->headerFlag_pusVersion_Ack; // get the beginning of the data field
366
366
367 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
367 TM.targetLogicalAddress = CCSDS_DESTINATION_ID;
368 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
368 TM.protocolIdentifier = CCSDS_PROTOCOLE_ID;
369 TM.reserved = DEFAULT_RESERVED;
369 TM.reserved = DEFAULT_RESERVED;
370 TM.userApplication = CCSDS_USER_APP;
370 TM.userApplication = CCSDS_USER_APP;
371 // PACKET HEADER
371 // PACKET HEADER
372 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
372 TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8);
373 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
373 TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE );
374 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
374 increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID );
375 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_CORRUPTED >> 8);
375 TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_CORRUPTED >> 8);
376 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_CORRUPTED );
376 TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_CORRUPTED );
377 // DATA FIELD HEADER
377 // DATA FIELD HEADER
378 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
378 TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
379 TM.serviceType = TM_TYPE_TC_EXE;
379 TM.serviceType = TM_TYPE_TC_EXE;
380 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
380 TM.serviceSubType = TM_SUBTYPE_EXE_NOK;
381 TM.destinationID = destinationID;
381 TM.destinationID = destinationID;
382 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
382 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
383 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
383 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
384 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
384 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
385 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
385 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
386 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
386 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
387 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
387 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
388 //
388 //
389 TM.tc_failure_code[0] = (unsigned char) (CORRUPTED >> 8);
389 TM.tc_failure_code[0] = (unsigned char) (CORRUPTED >> 8);
390 TM.tc_failure_code[1] = (unsigned char) (CORRUPTED );
390 TM.tc_failure_code[1] = (unsigned char) (CORRUPTED );
391 TM.telecommand_pkt_id[0] = TC->packetID[0];
391 TM.telecommand_pkt_id[0] = TC->packetID[0];
392 TM.telecommand_pkt_id[1] = TC->packetID[1];
392 TM.telecommand_pkt_id[1] = TC->packetID[1];
393 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
393 TM.pkt_seq_control[0] = TC->packetSequenceControl[0];
394 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
394 TM.pkt_seq_control[1] = TC->packetSequenceControl[1];
395 TM.tc_service = TC->serviceType; // type of the rejected TC
395 TM.tc_service = TC->serviceType; // type of the rejected TC
396 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
396 TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC
397 TM.pkt_len_rcv_value[0] = TC->packetLength[0];
397 TM.pkt_len_rcv_value[0] = TC->packetLength[0];
398 TM.pkt_len_rcv_value[1] = TC->packetLength[1];
398 TM.pkt_len_rcv_value[1] = TC->packetLength[1];
399 TM.pkt_datafieldsize_cnt[0] = currentTC_LEN_RCV[0];
399 TM.pkt_datafieldsize_cnt[0] = currentTC_LEN_RCV[0];
400 TM.pkt_datafieldsize_cnt[1] = currentTC_LEN_RCV[1];
400 TM.pkt_datafieldsize_cnt[1] = currentTC_LEN_RCV[1];
401 TM.rcv_crc[0] = packetDataField[ packetLength - 1 ];
401 TM.rcv_crc[0] = packetDataField[ packetLength - 1 ];
402 TM.rcv_crc[1] = packetDataField[ packetLength ];
402 TM.rcv_crc[1] = packetDataField[ packetLength ];
403 TM.computed_crc[0] = computed_CRC[0];
403 TM.computed_crc[0] = computed_CRC[0];
404 TM.computed_crc[1] = computed_CRC[1];
404 TM.computed_crc[1] = computed_CRC[1];
405
405
406 messageSize = PACKET_LENGTH_TC_EXE_CORRUPTED + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
406 messageSize = PACKET_LENGTH_TC_EXE_CORRUPTED + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES;
407
407
408 // SEND DATA
408 // SEND DATA
409 status = rtems_message_queue_send( queue_id, &TM, messageSize);
409 status = rtems_message_queue_send( queue_id, &TM, messageSize);
410 if (status != RTEMS_SUCCESSFUL) {
410 if (status != RTEMS_SUCCESSFUL) {
411 PRINTF("in send_tm_lfr_tc_exe_error *** ERR\n")
411 PRINTF("in send_tm_lfr_tc_exe_error *** ERR\n")
412 }
412 }
413
413
414 return status;
414 return status;
415 }
415 }
416
416
417 void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id )
417 void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id )
418 {
418 {
419 /** This function increment the packet sequence control parameter of a TC, depending on its destination ID.
419 /** This function increment the packet sequence control parameter of a TC, depending on its destination ID.
420 *
420 *
421 * @param packet_sequence_control points to the packet sequence control which will be incremented
421 * @param packet_sequence_control points to the packet sequence control which will be incremented
422 * @param destination_id is the destination ID of the TM, there is one counter by destination ID
422 * @param destination_id is the destination ID of the TM, there is one counter by destination ID
423 *
423 *
424 * If the destination ID is not known, a dedicated counter is incremented.
424 * If the destination ID is not known, a dedicated counter is incremented.
425 *
425 *
426 */
426 */
427
427
428 unsigned short sequence_cnt;
428 unsigned short sequence_cnt;
429 unsigned short segmentation_grouping_flag;
429 unsigned short segmentation_grouping_flag;
430 unsigned short new_packet_sequence_control;
430 unsigned short new_packet_sequence_control;
431 unsigned char i;
431 unsigned char i;
432
432
433 switch (destination_id)
433 switch (destination_id)
434 {
434 {
435 case SID_TC_GROUND:
435 case SID_TC_GROUND:
436 i = GROUND;
436 i = GROUND;
437 break;
437 break;
438 case SID_TC_MISSION_TIMELINE:
438 case SID_TC_MISSION_TIMELINE:
439 i = MISSION_TIMELINE;
439 i = MISSION_TIMELINE;
440 break;
440 break;
441 case SID_TC_TC_SEQUENCES:
441 case SID_TC_TC_SEQUENCES:
442 i = TC_SEQUENCES;
442 i = TC_SEQUENCES;
443 break;
443 break;
444 case SID_TC_RECOVERY_ACTION_CMD:
444 case SID_TC_RECOVERY_ACTION_CMD:
445 i = RECOVERY_ACTION_CMD;
445 i = RECOVERY_ACTION_CMD;
446 break;
446 break;
447 case SID_TC_BACKUP_MISSION_TIMELINE:
447 case SID_TC_BACKUP_MISSION_TIMELINE:
448 i = BACKUP_MISSION_TIMELINE;
448 i = BACKUP_MISSION_TIMELINE;
449 break;
449 break;
450 case SID_TC_DIRECT_CMD:
450 case SID_TC_DIRECT_CMD:
451 i = DIRECT_CMD;
451 i = DIRECT_CMD;
452 break;
452 break;
453 case SID_TC_SPARE_GRD_SRC1:
453 case SID_TC_SPARE_GRD_SRC1:
454 i = SPARE_GRD_SRC1;
454 i = SPARE_GRD_SRC1;
455 break;
455 break;
456 case SID_TC_SPARE_GRD_SRC2:
456 case SID_TC_SPARE_GRD_SRC2:
457 i = SPARE_GRD_SRC2;
457 i = SPARE_GRD_SRC2;
458 break;
458 break;
459 case SID_TC_OBCP:
459 case SID_TC_OBCP:
460 i = OBCP;
460 i = OBCP;
461 break;
461 break;
462 case SID_TC_SYSTEM_CONTROL:
462 case SID_TC_SYSTEM_CONTROL:
463 i = SYSTEM_CONTROL;
463 i = SYSTEM_CONTROL;
464 break;
464 break;
465 case SID_TC_AOCS:
465 case SID_TC_AOCS:
466 i = AOCS;
466 i = AOCS;
467 break;
467 break;
468 case SID_TC_RPW_INTERNAL:
468 case SID_TC_RPW_INTERNAL:
469 i = RPW_INTERNAL;
469 i = RPW_INTERNAL;
470 break;
470 break;
471 default:
471 default:
472 i = UNKNOWN;
472 i = GROUND;
473 break;
473 break;
474 }
474 }
475
475
476 if (i != UNKNOWN)
476 segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8;
477 {
477 sequence_cnt = sequenceCounters_TC_EXE[ i ] & 0x3fff;
478 segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8;
479 sequence_cnt = sequenceCounters_TC_EXE[ i ] & 0x3fff;
480
478
481 new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ;
479 new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ;
482
483 packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8);
484 packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control );
485
480
486 // increment the sequence counter for the next packet
481 packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8);
487 if ( sequenceCounters_TC_EXE[ i ] < SEQ_CNT_MAX)
482 packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control );
488 {
483
489 sequenceCounters_TC_EXE[ i ] = sequenceCounters_TC_EXE[ i ] + 1;
484 // increment the sequence counter for the next packet
490 }
485 if ( sequenceCounters_TC_EXE[ i ] < SEQ_CNT_MAX)
491 else
486 {
492 {
487 sequenceCounters_TC_EXE[ i ] = sequenceCounters_TC_EXE[ i ] + 1;
493 sequenceCounters_TC_EXE[ i ] = 0;
494 }
495 }
488 }
496 else
489 else
497 {
490 {
498 DEBUG_PRINTF1("in increment_seq_counter_destination_id *** ERR destination ID %d not known\n", destination_id)
491 sequenceCounters_TC_EXE[ i ] = 0;
499 }
492 }
500
493
501 }
494 }
@@ -1,1223 +1,1225
1 /** Functions and tasks related to waveform packet generation.
1 /** Functions and tasks related to waveform packet generation.
2 *
2 *
3 * @file
3 * @file
4 * @author P. LEROY
4 * @author P. LEROY
5 *
5 *
6 * A group of functions to handle waveforms, in snapshot or continuous format.\n
6 * A group of functions to handle waveforms, in snapshot or continuous format.\n
7 *
7 *
8 */
8 */
9
9
10 #include "wf_handler.h"
10 #include "wf_handler.h"
11
11
12 // SWF
12 // SWF
13 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F0[7];
13 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F0[7];
14 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F1[7];
14 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F1[7];
15 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F2[7];
15 Header_TM_LFR_SCIENCE_SWF_t headerSWF_F2[7];
16 // CWF
16 // CWF
17 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[7];
17 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[7];
18 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[7];
18 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[7];
19 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[7];
19 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[7];
20 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[7];
20 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[7];
21 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[7];
21 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[7];
22
22
23 unsigned char doubleSendCWF1 = 0;
23 unsigned char doubleSendCWF1 = 0;
24 unsigned char doubleSendCWF2 = 0;
24 unsigned char doubleSendCWF2 = 0;
25
25
26 rtems_isr waveforms_isr( rtems_vector_number vector )
26 rtems_isr waveforms_isr( rtems_vector_number vector )
27 {
27 {
28 /** This is the interrupt sub routine called by the waveform picker core.
28 /** This is the interrupt sub routine called by the waveform picker core.
29 *
29 *
30 * This ISR launch different actions depending mainly on two pieces of information:
30 * This ISR launch different actions depending mainly on two pieces of information:
31 * 1. the values read in the registers of the waveform picker.
31 * 1. the values read in the registers of the waveform picker.
32 * 2. the current LFR mode.
32 * 2. the current LFR mode.
33 *
33 *
34 */
34 */
35
35
36 #ifdef GSA
36 #ifdef GSA
37 #else
37 #else
38 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
38 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
39 || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) )
39 || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) )
40 { // in modes other than STANDBY and BURST, send the CWF_F3 data
40 { // in modes other than STANDBY and BURST, send the CWF_F3 data
41 if ((waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full
41 if ((waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full
42 // (1) change the receiving buffer for the waveform picker
42 // (1) change the receiving buffer for the waveform picker
43 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
43 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
44 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis);
44 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_bis);
45 }
45 }
46 else {
46 else {
47 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3);
47 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3);
48 }
48 }
49 // (2) send an event for the waveforms transmission
49 // (2) send an event for the waveforms transmission
50 if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) {
50 if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) {
51 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
51 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
52 }
52 }
53 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111]
53 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111]
54 }
54 }
55 }
55 }
56 #endif
56 #endif
57
57
58 switch(lfrCurrentMode)
58 switch(lfrCurrentMode)
59 {
59 {
60 //********
60 //********
61 // STANDBY
61 // STANDBY
62 case(LFR_MODE_STANDBY):
62 case(LFR_MODE_STANDBY):
63 break;
63 break;
64
64
65 //******
65 //******
66 // NORMAL
66 // NORMAL
67 case(LFR_MODE_NORMAL):
67 case(LFR_MODE_NORMAL):
68 #ifdef GSA
68 #ifdef GSA
69 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
69 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
70 #else
70 #else
71 if ( (waveform_picker_regs->burst_enable & 0x7) == 0x0 ){ // if no channel is enable
71 if ( (waveform_picker_regs->burst_enable & 0x7) == 0x0 ){ // if no channel is enable
72 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
72 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
73 }
73 }
74 else {
74 else {
75 if ( (waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full
75 if ( (waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full
76 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable & 0x08;
76 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable & 0x08;
77 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
77 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
78 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
78 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
79 }
79 }
80 // waveform_picker_regs->status = waveform_picker_regs->status & 0x00;
80 // waveform_picker_regs->status = waveform_picker_regs->status & 0x00;
81 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888;
81 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888;
82 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x07; // [0111] enable f2 f1 f0
82 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x07; // [0111] enable f2 f1 f0
83 }
83 }
84 }
84 }
85 #endif
85 #endif
86 break;
86 break;
87
87
88 //******
88 //******
89 // BURST
89 // BURST
90 case(LFR_MODE_BURST):
90 case(LFR_MODE_BURST):
91 #ifdef GSA
91 #ifdef GSA
92 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
92 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
93 #else
93 #else
94 if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
94 if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
95 // (1) change the receiving buffer for the waveform picker
95 // (1) change the receiving buffer for the waveform picker
96 if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
96 if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
97 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
97 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
98 }
98 }
99 else {
99 else {
100 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
100 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
101 }
101 }
102 // (2) send an event for the waveforms transmission
102 // (2) send an event for the waveforms transmission
103 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) {
103 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) {
104 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
104 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
105 }
105 }
106 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0
106 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0
107 }
107 }
108 #endif
108 #endif
109 break;
109 break;
110
110
111 //*****
111 //*****
112 // SBM1
112 // SBM1
113 case(LFR_MODE_SBM1):
113 case(LFR_MODE_SBM1):
114 #ifdef GSA
114 #ifdef GSA
115 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
115 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
116 #else
116 #else
117 if ((waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit
117 if ((waveform_picker_regs->status & 0x02) == 0x02){ // [0010] check the f1 full bit
118 // (1) change the receiving buffer for the waveform picker
118 // (1) change the receiving buffer for the waveform picker
119 if ( param_local.local_sbm1_nb_cwf_sent == (param_local.local_sbm1_nb_cwf_max-1) )
119 if ( param_local.local_sbm1_nb_cwf_sent == (param_local.local_sbm1_nb_cwf_max-1) )
120 {
120 {
121 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm);
121 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_norm);
122 }
122 }
123 else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm )
123 else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1_norm )
124 {
124 {
125 doubleSendCWF1 = 1;
125 doubleSendCWF1 = 1;
126 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
126 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
127 }
127 }
128 else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) {
128 else if ( waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1 ) {
129 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis);
129 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1_bis);
130 }
130 }
131 else {
131 else {
132 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
132 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1);
133 }
133 }
134 // (2) send an event for the waveforms transmission
134 // (2) send an event for the waveforms transmission
135 if (rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 ) != RTEMS_SUCCESSFUL) {
135 if (rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 ) != RTEMS_SUCCESSFUL) {
136 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
136 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
137 }
137 }
138 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0
138 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bit = 0
139 }
139 }
140 if ( ( (waveform_picker_regs->status & 0x05) == 0x05 ) ) { // [0101] check the f2 and f0 full bit
140 if ( ( (waveform_picker_regs->status & 0x05) == 0x05 ) ) { // [0101] check the f2 and f0 full bit
141 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
141 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
142 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
142 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
143 }
143 }
144 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0
144 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0
145 reset_local_sbm1_nb_cwf_sent();
145 reset_local_sbm1_nb_cwf_sent();
146 }
146 }
147
147
148 #endif
148 #endif
149 break;
149 break;
150
150
151 //*****
151 //*****
152 // SBM2
152 // SBM2
153 case(LFR_MODE_SBM2):
153 case(LFR_MODE_SBM2):
154 #ifdef GSA
154 #ifdef GSA
155 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
155 PRINTF("in waveform_isr *** unexpected waveform picker interruption\n")
156 #else
156 #else
157 if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
157 if ((waveform_picker_regs->status & 0x04) == 0x04){ // [0100] check the f2 full bit
158 // (1) change the receiving buffer for the waveform picker
158 // (1) change the receiving buffer for the waveform picker
159 if ( param_local.local_sbm2_nb_cwf_sent == (param_local.local_sbm2_nb_cwf_max-1) )
159 if ( param_local.local_sbm2_nb_cwf_sent == (param_local.local_sbm2_nb_cwf_max-1) )
160 {
160 {
161 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm);
161 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_norm);
162 }
162 }
163 else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) {
163 else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2_norm ) {
164 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
164 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
165 doubleSendCWF2 = 1;
165 doubleSendCWF2 = 1;
166 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2_WFRM ) != RTEMS_SUCCESSFUL) {
166 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2_WFRM ) != RTEMS_SUCCESSFUL) {
167 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
167 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
168 }
168 }
169 reset_local_sbm2_nb_cwf_sent();
169 reset_local_sbm2_nb_cwf_sent();
170 }
170 }
171 else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) {
171 else if ( waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2 ) {
172 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
172 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2_bis);
173 }
173 }
174 else {
174 else {
175 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
175 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2);
176 }
176 }
177 // (2) send an event for the waveforms transmission
177 // (2) send an event for the waveforms transmission
178 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
178 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
179 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
179 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
180 }
180 }
181 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
181 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
182 }
182 }
183 if ( ( (waveform_picker_regs->status & 0x03) == 0x03 ) ) { // [0011] f3 f2 f1 f0, f1 and f0 are full
183 if ( ( (waveform_picker_regs->status & 0x03) == 0x03 ) ) { // [0011] f3 f2 f1 f0, f1 and f0 are full
184 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
184 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
185 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
185 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
186 }
186 }
187 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
187 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
188 }
188 }
189 #endif
189 #endif
190 break;
190 break;
191
191
192 //********
192 //********
193 // DEFAULT
193 // DEFAULT
194 default:
194 default:
195 break;
195 break;
196 }
196 }
197 }
197 }
198
198
199 rtems_isr waveforms_simulator_isr( rtems_vector_number vector )
199 rtems_isr waveforms_simulator_isr( rtems_vector_number vector )
200 {
200 {
201 /** This is the interrupt sub routine called by the waveform picker simulator.
201 /** This is the interrupt sub routine called by the waveform picker simulator.
202 *
202 *
203 * This ISR is for debug purpose only.
203 * This ISR is for debug purpose only.
204 *
204 *
205 */
205 */
206
206
207 unsigned char lfrMode;
207 unsigned char lfrMode;
208 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
208 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
209
209
210 switch(lfrMode) {
210 switch(lfrMode) {
211 case (LFR_MODE_STANDBY):
211 case (LFR_MODE_STANDBY):
212 break;
212 break;
213 case (LFR_MODE_NORMAL):
213 case (LFR_MODE_NORMAL):
214 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
214 if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
215 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_5 );
215 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_5 );
216 }
216 }
217 break;
217 break;
218 case (LFR_MODE_BURST):
218 case (LFR_MODE_BURST):
219 break;
219 break;
220 case (LFR_MODE_SBM1):
220 case (LFR_MODE_SBM1):
221 break;
221 break;
222 case (LFR_MODE_SBM2):
222 case (LFR_MODE_SBM2):
223 break;
223 break;
224 }
224 }
225 }
225 }
226
226
227 rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
227 rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
228 {
228 {
229 /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode.
229 /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode.
230 *
230 *
231 * @param unused is the starting argument of the RTEMS task
231 * @param unused is the starting argument of the RTEMS task
232 *
232 *
233 * The following data packets are sent by this task:
233 * The following data packets are sent by this task:
234 * - TM_LFR_SCIENCE_NORMAL_SWF_F0
234 * - TM_LFR_SCIENCE_NORMAL_SWF_F0
235 * - TM_LFR_SCIENCE_NORMAL_SWF_F1
235 * - TM_LFR_SCIENCE_NORMAL_SWF_F1
236 * - TM_LFR_SCIENCE_NORMAL_SWF_F2
236 * - TM_LFR_SCIENCE_NORMAL_SWF_F2
237 *
237 *
238 */
238 */
239
239
240 rtems_event_set event_out;
240 rtems_event_set event_out;
241 rtems_id queue_id;
241 rtems_id queue_id;
242 rtems_status_code status;
242 rtems_status_code status;
243
243
244 init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 );
244 init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 );
245 init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 );
245 init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 );
246 init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 );
246 init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 );
247
247
248 init_waveforms();
248 init_waveforms();
249
249
250 status = get_message_queue_id_send( &queue_id );
250 status = get_message_queue_id_send( &queue_id );
251 if (status != RTEMS_SUCCESSFUL)
251 if (status != RTEMS_SUCCESSFUL)
252 {
252 {
253 PRINTF1("in WFRM *** ERR get_message_queue_id_send %d\n", status)
253 PRINTF1("in WFRM *** ERR get_message_queue_id_send %d\n", status)
254 }
254 }
255
255
256 BOOT_PRINTF("in WFRM ***\n")
256 BOOT_PRINTF("in WFRM ***\n")
257
257
258 while(1){
258 while(1){
259 // wait for an RTEMS_EVENT
259 // wait for an RTEMS_EVENT
260 rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1
260 rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1
261 | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM,
261 | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM,
262 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
262 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
263
263
264 if (event_out == RTEMS_EVENT_MODE_NORMAL)
264 if (event_out == RTEMS_EVENT_MODE_NORMAL)
265 {
265 {
266 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
266 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
267 send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
267 send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
268 send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
268 send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
269 #ifdef GSA
269 #ifdef GSA
270 waveform_picker_regs->status = waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0
270 waveform_picker_regs->status = waveform_picker_regs->status & 0xf888; // [1111 1000 1000 1000] f2, f1, f0 bits =0
271 #endif
271 #endif
272 }
272 }
273 else if (event_out == RTEMS_EVENT_MODE_SBM1)
273 else if (event_out == RTEMS_EVENT_MODE_SBM1)
274 {
274 {
275 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
275 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
276 send_waveform_SWF(wf_snap_f1_norm, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
276 send_waveform_SWF(wf_snap_f1_norm, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
277 send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
277 send_waveform_SWF(wf_snap_f2, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
278 #ifdef GSA
278 #ifdef GSA
279 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0
279 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2, f0 bits = 0
280 #endif
280 #endif
281 }
281 }
282 else if (event_out == RTEMS_EVENT_MODE_SBM2)
282 else if (event_out == RTEMS_EVENT_MODE_SBM2)
283 {
283 {
284 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
284 send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
285 send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
285 send_waveform_SWF(wf_snap_f1, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
286 #ifdef GSA
286 #ifdef GSA
287 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
287 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0
288 #endif
288 #endif
289 }
289 }
290 else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM)
290 else if (event_out == RTEMS_EVENT_MODE_SBM2_WFRM)
291 {
291 {
292 send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
292 send_waveform_SWF(wf_snap_f2_norm, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
293 }
293 }
294 else
294 else
295 {
295 {
296 PRINTF("in WFRM *** unexpected event")
296 PRINTF("in WFRM *** unexpected event")
297 }
297 }
298
298
299
299
300 #ifdef GSA
300 #ifdef GSA
301 // irq processed, reset the related register of the timer unit
301 // irq processed, reset the related register of the timer unit
302 gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl = gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl | 0x00000010;
302 gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl = gptimer_regs->timer[TIMER_WF_SIMULATOR].ctrl | 0x00000010;
303 // clear the interruption
303 // clear the interruption
304 LEON_Unmask_interrupt( IRQ_WF );
304 LEON_Unmask_interrupt( IRQ_WF );
305 #endif
305 #endif
306 }
306 }
307 }
307 }
308
308
309 rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
309 rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
310 {
310 {
311 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3.
311 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3.
312 *
312 *
313 * @param unused is the starting argument of the RTEMS task
313 * @param unused is the starting argument of the RTEMS task
314 *
314 *
315 * The following data packet is sent by this task:
315 * The following data packet is sent by this task:
316 * - TM_LFR_SCIENCE_NORMAL_CWF_F3
316 * - TM_LFR_SCIENCE_NORMAL_CWF_F3
317 *
317 *
318 */
318 */
319
319
320 rtems_event_set event_out;
320 rtems_event_set event_out;
321 rtems_id queue_id;
321 rtems_id queue_id;
322 rtems_status_code status;
322 rtems_status_code status;
323
323
324 init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 );
324 init_header_continuous_wf_table( SID_NORM_CWF_F3, headerCWF_F3 );
325 init_header_continuous_wf3_light_table( headerCWF_F3_light );
325 init_header_continuous_wf3_light_table( headerCWF_F3_light );
326
326
327 status = get_message_queue_id_send( &queue_id );
327 status = get_message_queue_id_send( &queue_id );
328 if (status != RTEMS_SUCCESSFUL)
328 if (status != RTEMS_SUCCESSFUL)
329 {
329 {
330 PRINTF1("in CWF3 *** ERR get_message_queue_id_send %d\n", status)
330 PRINTF1("in CWF3 *** ERR get_message_queue_id_send %d\n", status)
331 }
331 }
332
332
333 BOOT_PRINTF("in CWF3 ***\n")
333 BOOT_PRINTF("in CWF3 ***\n")
334
334
335 while(1){
335 while(1){
336 // wait for an RTEMS_EVENT
336 // wait for an RTEMS_EVENT
337 rtems_event_receive( RTEMS_EVENT_0,
337 rtems_event_receive( RTEMS_EVENT_0,
338 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
338 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
339 PRINTF("send CWF F3 \n")
339 PRINTF("send CWF F3 \n")
340 #ifdef GSA
340 #ifdef GSA
341 #else
341 #else
342 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
342 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) {
343 send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id );
343 send_waveform_CWF3_light( wf_cont_f3_bis, headerCWF_F3_light, queue_id );
344 }
344 }
345 else {
345 else {
346 send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id );
346 send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id );
347 }
347 }
348 #endif
348 #endif
349 }
349 }
350 }
350 }
351
351
352 rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2
352 rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2
353 {
353 {
354 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2.
354 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2.
355 *
355 *
356 * @param unused is the starting argument of the RTEMS task
356 * @param unused is the starting argument of the RTEMS task
357 *
357 *
358 * The following data packet is sent by this function:
358 * The following data packet is sent by this function:
359 * - TM_LFR_SCIENCE_BURST_CWF_F2
359 * - TM_LFR_SCIENCE_BURST_CWF_F2
360 * - TM_LFR_SCIENCE_SBM2_CWF_F2
360 * - TM_LFR_SCIENCE_SBM2_CWF_F2
361 *
361 *
362 */
362 */
363
363
364 rtems_event_set event_out;
364 rtems_event_set event_out;
365 rtems_id queue_id;
365 rtems_id queue_id;
366 rtems_status_code status;
366 rtems_status_code status;
367
367
368 init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST );
368 init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST );
369 init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 );
369 init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 );
370
370
371 status = get_message_queue_id_send( &queue_id );
371 status = get_message_queue_id_send( &queue_id );
372 if (status != RTEMS_SUCCESSFUL)
372 if (status != RTEMS_SUCCESSFUL)
373 {
373 {
374 PRINTF1("in CWF2 *** ERR get_message_queue_id_send %d\n", status)
374 PRINTF1("in CWF2 *** ERR get_message_queue_id_send %d\n", status)
375 }
375 }
376
376
377 BOOT_PRINTF("in CWF2 ***\n")
377 BOOT_PRINTF("in CWF2 ***\n")
378
378
379 while(1){
379 while(1){
380 // wait for an RTEMS_EVENT
380 // wait for an RTEMS_EVENT
381 rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2,
381 rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2,
382 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
382 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
383
383
384 if (event_out == RTEMS_EVENT_MODE_BURST)
384 if (event_out == RTEMS_EVENT_MODE_BURST)
385 {
385 {
386 // F2
386 // F2
387 #ifdef GSA
387 #ifdef GSA
388 #else
388 #else
389 if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
389 if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
390 send_waveform_CWF( wf_snap_f2_bis, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
390 send_waveform_CWF( wf_snap_f2_bis, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
391 }
391 }
392 else {
392 else {
393 send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
393 send_waveform_CWF( wf_snap_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
394 }
394 }
395 #endif
395 #endif
396 }
396 }
397
397
398 else if (event_out == RTEMS_EVENT_MODE_SBM2)
398 else if (event_out == RTEMS_EVENT_MODE_SBM2)
399 {
399 {
400 #ifdef GSA
400 #ifdef GSA
401 #else
401 #else
402 if (doubleSendCWF2 == 1)
402 if (doubleSendCWF2 == 1)
403 {
403 {
404 doubleSendCWF2 = 0;
404 doubleSendCWF2 = 0;
405 send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
405 send_waveform_CWF( wf_snap_f2_norm, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
406 }
406 }
407 else if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
407 else if (waveform_picker_regs->addr_data_f2 == (int) wf_snap_f2) {
408 send_waveform_CWF( wf_snap_f2_bis, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
408 send_waveform_CWF( wf_snap_f2_bis, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
409 }
409 }
410 else {
410 else {
411 send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
411 send_waveform_CWF( wf_snap_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
412 }
412 }
413 param_local.local_sbm2_nb_cwf_sent ++;
413 param_local.local_sbm2_nb_cwf_sent ++;
414 #endif
414 #endif
415 }
415 }
416 else
416 else
417 {
417 {
418 PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode)
418 PRINTF1("in CWF2 *** ERR mode = %d\n", lfrCurrentMode)
419 }
419 }
420 }
420 }
421 }
421 }
422
422
423 rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1
423 rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1
424 {
424 {
425 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1.
425 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1.
426 *
426 *
427 * @param unused is the starting argument of the RTEMS task
427 * @param unused is the starting argument of the RTEMS task
428 *
428 *
429 * The following data packet is sent by this function:
429 * The following data packet is sent by this function:
430 * - TM_LFR_SCIENCE_SBM1_CWF_F1
430 * - TM_LFR_SCIENCE_SBM1_CWF_F1
431 *
431 *
432 */
432 */
433
433
434 rtems_event_set event_out;
434 rtems_event_set event_out;
435 rtems_id queue_id;
435 rtems_id queue_id;
436 rtems_status_code status;
436 rtems_status_code status;
437
437
438 init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 );
438 init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 );
439
439
440 status = get_message_queue_id_send( &queue_id );
440 status = get_message_queue_id_send( &queue_id );
441 if (status != RTEMS_SUCCESSFUL)
441 if (status != RTEMS_SUCCESSFUL)
442 {
442 {
443 PRINTF1("in CWF1 *** ERR get_message_queue_id_send %d\n", status)
443 PRINTF1("in CWF1 *** ERR get_message_queue_id_send %d\n", status)
444 }
444 }
445
445
446 BOOT_PRINTF("in CWF1 ***\n")
446 BOOT_PRINTF("in CWF1 ***\n")
447
447
448 while(1){
448 while(1){
449 // wait for an RTEMS_EVENT
449 // wait for an RTEMS_EVENT
450 rtems_event_receive( RTEMS_EVENT_MODE_SBM1,
450 rtems_event_receive( RTEMS_EVENT_MODE_SBM1,
451 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
451 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
452 if (event_out == RTEMS_EVENT_MODE_SBM1)
452 if (event_out == RTEMS_EVENT_MODE_SBM1)
453 {
453 {
454 #ifdef GSA
454 #ifdef GSA
455 #else
455 #else
456 if (doubleSendCWF1 == 1)
456 if (doubleSendCWF1 == 1)
457 {
457 {
458 doubleSendCWF1 = 0;
458 doubleSendCWF1 = 0;
459 send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
459 send_waveform_CWF( wf_snap_f1_norm, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
460 }
460 }
461 else if (waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1) {
461 else if (waveform_picker_regs->addr_data_f1 == (int) wf_snap_f1) {
462 send_waveform_CWF( wf_snap_f1_bis, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
462 send_waveform_CWF( wf_snap_f1_bis, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
463 }
463 }
464 else {
464 else {
465 send_waveform_CWF( wf_snap_f1, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
465 send_waveform_CWF( wf_snap_f1, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
466 }
466 }
467 param_local.local_sbm1_nb_cwf_sent ++;
467 param_local.local_sbm1_nb_cwf_sent ++;
468 #endif
468 #endif
469 }
469 }
470 else
470 else
471 {
471 {
472 PRINTF1("in CWF1 *** ERR mode = %d\n", lfrCurrentMode)
472 PRINTF1("in CWF1 *** ERR mode = %d\n", lfrCurrentMode)
473 }
473 }
474 }
474 }
475 }
475 }
476
476
477 //******************
477 //******************
478 // general functions
478 // general functions
479 void init_waveforms( void )
479 void init_waveforms( void )
480 {
480 {
481 int i = 0;
481 int i = 0;
482
482
483 for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
483 for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
484 {
484 {
485 //***
485 //***
486 // F0
486 // F0
487 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; //
487 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; //
488 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; //
488 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; //
489 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; //
489 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; //
490
490
491 //***
491 //***
492 // F1
492 // F1
493 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111;
493 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111;
494 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333;
494 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333;
495 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
495 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
496
496
497 //***
497 //***
498 // F2
498 // F2
499 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333;
499 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333;
500 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111;
500 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111;
501 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
501 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
502
502
503 //***
503 //***
504 // F3
504 // F3
505 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1;
505 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1;
506 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2;
506 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2;
507 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000;
507 //wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000;
508 }
508 }
509 }
509 }
510
510
511 int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF)
511 int init_header_snapshot_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_SWF_t *headerSWF)
512 {
512 {
513 unsigned char i;
513 unsigned char i;
514
514
515 for (i=0; i<7; i++)
515 for (i=0; i<7; i++)
516 {
516 {
517 headerSWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
517 headerSWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
518 headerSWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
518 headerSWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
519 headerSWF[ i ].reserved = DEFAULT_RESERVED;
519 headerSWF[ i ].reserved = DEFAULT_RESERVED;
520 headerSWF[ i ].userApplication = CCSDS_USER_APP;
520 headerSWF[ i ].userApplication = CCSDS_USER_APP;
521 headerSWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
521 headerSWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
522 headerSWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
522 headerSWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
523 if (i == 0)
523 if (i == 0)
524 {
524 {
525 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
525 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
526 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8);
526 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8);
527 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 );
527 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 );
528 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
528 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
529 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
529 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
530 }
530 }
531 else if (i == 6)
531 else if (i == 6)
532 {
532 {
533 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
533 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
534 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_8 >> 8);
534 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_8 >> 8);
535 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_8 );
535 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_8 );
536 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
536 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
537 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
537 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
538 }
538 }
539 else
539 else
540 {
540 {
541 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
541 headerSWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
542 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8);
542 headerSWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_SWF_340 >> 8);
543 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 );
543 headerSWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_SWF_340 );
544 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
544 headerSWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
545 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
545 headerSWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
546 }
546 }
547 headerSWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
547 headerSWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
548 headerSWF[ i ].pktCnt = DEFAULT_PKTCNT; // PKT_CNT
548 headerSWF[ i ].pktCnt = DEFAULT_PKTCNT; // PKT_CNT
549 headerSWF[ i ].pktNr = i+1; // PKT_NR
549 headerSWF[ i ].pktNr = i+1; // PKT_NR
550 // DATA FIELD HEADER
550 // DATA FIELD HEADER
551 headerSWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
551 headerSWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
552 headerSWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
552 headerSWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
553 headerSWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
553 headerSWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
554 headerSWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
554 headerSWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
555 // AUXILIARY DATA HEADER
555 // AUXILIARY DATA HEADER
556 headerSWF[ i ].time[0] = 0x00;
556 headerSWF[ i ].time[0] = 0x00;
557 headerSWF[ i ].time[0] = 0x00;
557 headerSWF[ i ].time[0] = 0x00;
558 headerSWF[ i ].time[0] = 0x00;
558 headerSWF[ i ].time[0] = 0x00;
559 headerSWF[ i ].time[0] = 0x00;
559 headerSWF[ i ].time[0] = 0x00;
560 headerSWF[ i ].time[0] = 0x00;
560 headerSWF[ i ].time[0] = 0x00;
561 headerSWF[ i ].time[0] = 0x00;
561 headerSWF[ i ].time[0] = 0x00;
562 headerSWF[ i ].sid = sid;
562 headerSWF[ i ].sid = sid;
563 headerSWF[ i ].hkBIA = DEFAULT_HKBIA;
563 headerSWF[ i ].hkBIA = DEFAULT_HKBIA;
564 }
564 }
565 return LFR_SUCCESSFUL;
565 return LFR_SUCCESSFUL;
566 }
566 }
567
567
568 int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF )
568 int init_header_continuous_wf_table( unsigned int sid, Header_TM_LFR_SCIENCE_CWF_t *headerCWF )
569 {
569 {
570 unsigned int i;
570 unsigned int i;
571
571
572 for (i=0; i<7; i++)
572 for (i=0; i<7; i++)
573 {
573 {
574 headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
574 headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
575 headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
575 headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
576 headerCWF[ i ].reserved = DEFAULT_RESERVED;
576 headerCWF[ i ].reserved = DEFAULT_RESERVED;
577 headerCWF[ i ].userApplication = CCSDS_USER_APP;
577 headerCWF[ i ].userApplication = CCSDS_USER_APP;
578 if ( (sid == SID_SBM1_CWF_F1) || (sid == SID_SBM2_CWF_F2) )
578 if ( (sid == SID_SBM1_CWF_F1) || (sid == SID_SBM2_CWF_F2) )
579 {
579 {
580 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2 >> 8);
580 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2 >> 8);
581 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2);
581 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_SBM1_SBM2);
582 }
582 }
583 else
583 else
584 {
584 {
585 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
585 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
586 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
586 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
587 }
587 }
588 if (i == 0)
588 if (i == 0)
589 {
589 {
590 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
590 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
591 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8);
591 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8);
592 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 );
592 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 );
593 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
593 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
594 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
594 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
595 }
595 }
596 else if (i == 6)
596 else if (i == 6)
597 {
597 {
598 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
598 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
599 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_8 >> 8);
599 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_8 >> 8);
600 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_8 );
600 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_8 );
601 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
601 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
602 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
602 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
603 }
603 }
604 else
604 else
605 {
605 {
606 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
606 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
607 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8);
607 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF_340 >> 8);
608 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 );
608 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF_340 );
609 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
609 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
610 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
610 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
611 }
611 }
612 headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
612 headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
613 // PKT_CNT
613 // PKT_CNT
614 // PKT_NR
614 // PKT_NR
615 // DATA FIELD HEADER
615 // DATA FIELD HEADER
616 headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
616 headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
617 headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
617 headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
618 headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
618 headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
619 headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
619 headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
620 // AUXILIARY DATA HEADER
620 // AUXILIARY DATA HEADER
621 headerCWF[ i ].sid = sid;
621 headerCWF[ i ].sid = sid;
622 headerCWF[ i ].hkBIA = DEFAULT_HKBIA;
622 headerCWF[ i ].hkBIA = DEFAULT_HKBIA;
623 headerCWF[ i ].time[0] = 0x00;
623 headerCWF[ i ].time[0] = 0x00;
624 headerCWF[ i ].time[0] = 0x00;
624 headerCWF[ i ].time[0] = 0x00;
625 headerCWF[ i ].time[0] = 0x00;
625 headerCWF[ i ].time[0] = 0x00;
626 headerCWF[ i ].time[0] = 0x00;
626 headerCWF[ i ].time[0] = 0x00;
627 headerCWF[ i ].time[0] = 0x00;
627 headerCWF[ i ].time[0] = 0x00;
628 headerCWF[ i ].time[0] = 0x00;
628 headerCWF[ i ].time[0] = 0x00;
629 }
629 }
630 return LFR_SUCCESSFUL;
630 return LFR_SUCCESSFUL;
631 }
631 }
632
632
633 int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF )
633 int init_header_continuous_wf3_light_table( Header_TM_LFR_SCIENCE_CWF_t *headerCWF )
634 {
634 {
635 unsigned int i;
635 unsigned int i;
636
636
637 for (i=0; i<7; i++)
637 for (i=0; i<7; i++)
638 {
638 {
639 headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
639 headerCWF[ i ].targetLogicalAddress = CCSDS_DESTINATION_ID;
640 headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
640 headerCWF[ i ].protocolIdentifier = CCSDS_PROTOCOLE_ID;
641 headerCWF[ i ].reserved = DEFAULT_RESERVED;
641 headerCWF[ i ].reserved = DEFAULT_RESERVED;
642 headerCWF[ i ].userApplication = CCSDS_USER_APP;
642 headerCWF[ i ].userApplication = CCSDS_USER_APP;
643
643
644 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
644 headerCWF[ i ].packetID[0] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST >> 8);
645 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
645 headerCWF[ i ].packetID[1] = (unsigned char) (TM_PACKET_ID_SCIENCE_NORMAL_BURST);
646 if (i == 0)
646 if (i == 0)
647 {
647 {
648 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
648 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_FIRST;
649 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8);
649 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8);
650 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 );
650 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 );
651 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
651 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
652 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
652 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
653 }
653 }
654 else if (i == 6)
654 else if (i == 6)
655 {
655 {
656 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
656 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_LAST;
657 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 >> 8);
657 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 >> 8);
658 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 );
658 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_8 );
659 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
659 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_8 >> 8);
660 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
660 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_8 );
661 }
661 }
662 else
662 else
663 {
663 {
664 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
664 headerCWF[ i ].packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_CONTINUATION;
665 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8);
665 headerCWF[ i ].packetLength[0] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 >> 8);
666 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 );
666 headerCWF[ i ].packetLength[1] = (unsigned char) (TM_LEN_SCI_CWF3_LIGHT_340 );
667 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
667 headerCWF[ i ].blkNr[0] = (unsigned char) (BLK_NR_340 >> 8);
668 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
668 headerCWF[ i ].blkNr[1] = (unsigned char) (BLK_NR_340 );
669 }
669 }
670 headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
670 headerCWF[ i ].packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT;
671 // DATA FIELD HEADER
671 // DATA FIELD HEADER
672 headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
672 headerCWF[ i ].spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2;
673 headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
673 headerCWF[ i ].serviceType = TM_TYPE_LFR_SCIENCE; // service type
674 headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
674 headerCWF[ i ].serviceSubType = TM_SUBTYPE_LFR_SCIENCE; // service subtype
675 headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
675 headerCWF[ i ].destinationID = TM_DESTINATION_ID_GROUND;
676 // AUXILIARY DATA HEADER
676 // AUXILIARY DATA HEADER
677 headerCWF[ i ].sid = SID_NORM_CWF_F3;
677 headerCWF[ i ].sid = SID_NORM_CWF_F3;
678 headerCWF[ i ].hkBIA = DEFAULT_HKBIA;
678 headerCWF[ i ].hkBIA = DEFAULT_HKBIA;
679 headerCWF[ i ].time[0] = 0x00;
679 headerCWF[ i ].time[0] = 0x00;
680 headerCWF[ i ].time[0] = 0x00;
680 headerCWF[ i ].time[0] = 0x00;
681 headerCWF[ i ].time[0] = 0x00;
681 headerCWF[ i ].time[0] = 0x00;
682 headerCWF[ i ].time[0] = 0x00;
682 headerCWF[ i ].time[0] = 0x00;
683 headerCWF[ i ].time[0] = 0x00;
683 headerCWF[ i ].time[0] = 0x00;
684 headerCWF[ i ].time[0] = 0x00;
684 headerCWF[ i ].time[0] = 0x00;
685 }
685 }
686 return LFR_SUCCESSFUL;
686 return LFR_SUCCESSFUL;
687 }
687 }
688
688
689 void reset_waveforms( void )
689 void reset_waveforms( void )
690 {
690 {
691 int i = 0;
691 int i = 0;
692
692
693 for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
693 for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
694 {
694 {
695 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x10002000;
695 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x10002000;
696 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000;
696 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000;
697 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000;
697 wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000;
698
698
699 //***
699 //***
700 // F1
700 // F1
701 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x1000f000;
701 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x1000f000;
702 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0xf0001000;
702 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0xf0001000;
703 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000;
703 wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x40008000;
704
704
705 //***
705 //***
706 // F2
706 // F2
707 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x40008000;
707 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET] = 0x40008000;
708 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000;
708 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET] = 0x20001000;
709 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x10002000;
709 wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET] = 0x10002000;
710
710
711 //***
711 //***
712 // F3
712 // F3
713 /*wf_cont_f3[ i* NB_WORDS_SWF_BLK + 0 ] = build_value( i, i ); // v and 1
713 /*wf_cont_f3[ i* NB_WORDS_SWF_BLK + 0 ] = build_value( i, i ); // v and 1
714 wf_cont_f3[ i* NB_WORDS_SWF_BLK + 1 ] = build_value( i, i ); // e2 and b1
714 wf_cont_f3[ i* NB_WORDS_SWF_BLK + 1 ] = build_value( i, i ); // e2 and b1
715 wf_cont_f3[ i* NB_WORDS_SWF_BLK + 2 ] = build_value( i, i ); // b2 and b3*/
715 wf_cont_f3[ i* NB_WORDS_SWF_BLK + 2 ] = build_value( i, i ); // b2 and b3*/
716 }
716 }
717 }
717 }
718
718
719 int send_waveform_SWF( volatile int *waveform, unsigned int sid,
719 int send_waveform_SWF( volatile int *waveform, unsigned int sid,
720 Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id )
720 Header_TM_LFR_SCIENCE_SWF_t *headerSWF, rtems_id queue_id )
721 {
721 {
722 /** This function sends SWF CCSDS packets (F2, F1 or F0).
722 /** This function sends SWF CCSDS packets (F2, F1 or F0).
723 *
723 *
724 * @param waveform points to the buffer containing the data that will be send.
724 * @param waveform points to the buffer containing the data that will be send.
725 * @param sid is the source identifier of the data that will be sent.
725 * @param sid is the source identifier of the data that will be sent.
726 * @param headerSWF points to a table of headers that have been prepared for the data transmission.
726 * @param headerSWF points to a table of headers that have been prepared for the data transmission.
727 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
727 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
728 * contain information to setup the transmission of the data packets.
728 * contain information to setup the transmission of the data packets.
729 *
729 *
730 * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks.
730 * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks.
731 *
731 *
732 */
732 */
733
733
734 unsigned int i;
734 unsigned int i;
735 int ret;
735 int ret;
736 rtems_status_code status;
736 rtems_status_code status;
737 spw_ioctl_pkt_send spw_ioctl_send_SWF;
737 spw_ioctl_pkt_send spw_ioctl_send_SWF;
738
738
739 spw_ioctl_send_SWF.hlen = TM_HEADER_LEN + 4 + 12; // + 4 is for the protocole extra header, + 12 is for the auxiliary header
739 spw_ioctl_send_SWF.hlen = TM_HEADER_LEN + 4 + 12; // + 4 is for the protocole extra header, + 12 is for the auxiliary header
740 spw_ioctl_send_SWF.options = 0;
740 spw_ioctl_send_SWF.options = 0;
741
741
742 ret = LFR_DEFAULT;
742 ret = LFR_DEFAULT;
743
743
744 for (i=0; i<7; i++) // send waveform
744 for (i=0; i<7; i++) // send waveform
745 {
745 {
746 spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ];
746 spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ];
747 spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ];
747 spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ];
748 // BUILD THE DATA
748 // BUILD THE DATA
749 if (i==6) {
749 if (i==6) {
750 spw_ioctl_send_SWF.dlen = 8 * NB_BYTES_SWF_BLK;
750 spw_ioctl_send_SWF.dlen = 8 * NB_BYTES_SWF_BLK;
751 }
751 }
752 else {
752 else {
753 spw_ioctl_send_SWF.dlen = 340 * NB_BYTES_SWF_BLK;
753 spw_ioctl_send_SWF.dlen = 340 * NB_BYTES_SWF_BLK;
754 }
754 }
755 // SET PACKET SEQUENCE COUNTER
755 // SET PACKET SEQUENCE COUNTER
756 increment_seq_counter_source_id( headerSWF[ i ].packetSequenceControl, sid );
756 increment_seq_counter_source_id( headerSWF[ i ].packetSequenceControl, sid );
757 // SET PACKET TIME
757 // SET PACKET TIME
758 headerSWF[ i ].acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24);
758 headerSWF[ i ].acquisitionTime[0] = (unsigned char) (time_management_regs->coarse_time>>24);
759 headerSWF[ i ].acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16);
759 headerSWF[ i ].acquisitionTime[1] = (unsigned char) (time_management_regs->coarse_time>>16);
760 headerSWF[ i ].acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8);
760 headerSWF[ i ].acquisitionTime[2] = (unsigned char) (time_management_regs->coarse_time>>8);
761 headerSWF[ i ].acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time);
761 headerSWF[ i ].acquisitionTime[3] = (unsigned char) (time_management_regs->coarse_time);
762 headerSWF[ i ].acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8);
762 headerSWF[ i ].acquisitionTime[4] = (unsigned char) (time_management_regs->fine_time>>8);
763 headerSWF[ i ].acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time);
763 headerSWF[ i ].acquisitionTime[5] = (unsigned char) (time_management_regs->fine_time);
764 headerSWF[ i ].time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
764 headerSWF[ i ].time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
765 headerSWF[ i ].time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
765 headerSWF[ i ].time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
766 headerSWF[ i ].time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
766 headerSWF[ i ].time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
767 headerSWF[ i ].time[3] = (unsigned char) (time_management_regs->coarse_time);
767 headerSWF[ i ].time[3] = (unsigned char) (time_management_regs->coarse_time);
768 headerSWF[ i ].time[4] = (unsigned char) (time_management_regs->fine_time>>8);
768 headerSWF[ i ].time[4] = (unsigned char) (time_management_regs->fine_time>>8);
769 headerSWF[ i ].time[5] = (unsigned char) (time_management_regs->fine_time);
769 headerSWF[ i ].time[5] = (unsigned char) (time_management_regs->fine_time);
770 // SEND PACKET
770 // SEND PACKET
771 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_SWF, ACTION_MSG_SPW_IOCTL_SEND_SIZE);
771 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_SWF, ACTION_MSG_SPW_IOCTL_SEND_SIZE);
772 if (status != RTEMS_SUCCESSFUL) {
772 if (status != RTEMS_SUCCESSFUL) {
773 printf("%d-%d, ERR %d\n", sid, i, (int) status);
773 printf("%d-%d, ERR %d\n", sid, i, (int) status);
774 ret = LFR_DEFAULT;
774 ret = LFR_DEFAULT;
775 }
775 }
776 rtems_task_wake_after(TIME_BETWEEN_TWO_SWF_PACKETS); // 300 ms between each packet => 7 * 3 = 21 packets => 6.3 seconds
776 rtems_task_wake_after(TIME_BETWEEN_TWO_SWF_PACKETS); // 300 ms between each packet => 7 * 3 = 21 packets => 6.3 seconds
777 }
777 }
778
778
779 return ret;
779 return ret;
780 }
780 }
781
781
782 int send_waveform_CWF(volatile int *waveform, unsigned int sid,
782 int send_waveform_CWF(volatile int *waveform, unsigned int sid,
783 Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id)
783 Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id)
784 {
784 {
785 /** This function sends CWF CCSDS packets (F2, F1 or F0).
785 /** This function sends CWF CCSDS packets (F2, F1 or F0).
786 *
786 *
787 * @param waveform points to the buffer containing the data that will be send.
787 * @param waveform points to the buffer containing the data that will be send.
788 * @param sid is the source identifier of the data that will be sent.
788 * @param sid is the source identifier of the data that will be sent.
789 * @param headerCWF points to a table of headers that have been prepared for the data transmission.
789 * @param headerCWF points to a table of headers that have been prepared for the data transmission.
790 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
790 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
791 * contain information to setup the transmission of the data packets.
791 * contain information to setup the transmission of the data packets.
792 *
792 *
793 * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks.
793 * One group of 2048 samples is sent as 7 consecutive packets, 6 packets containing 340 blocks and 8 packets containing 8 blocks.
794 *
794 *
795 */
795 */
796
796
797 unsigned int i;
797 unsigned int i;
798 int ret;
798 int ret;
799 rtems_status_code status;
799 rtems_status_code status;
800 spw_ioctl_pkt_send spw_ioctl_send_CWF;
800 spw_ioctl_pkt_send spw_ioctl_send_CWF;
801
801
802 spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header
802 spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header
803 spw_ioctl_send_CWF.options = 0;
803 spw_ioctl_send_CWF.options = 0;
804
804
805 ret = LFR_DEFAULT;
805 ret = LFR_DEFAULT;
806
806
807 for (i=0; i<7; i++) // send waveform
807 for (i=0; i<7; i++) // send waveform
808 {
808 {
809 int coarseTime = 0x00;
809 int coarseTime = 0x00;
810 int fineTime = 0x00;
810 int fineTime = 0x00;
811 spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ];
811 spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ];
812 spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ];
812 spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ];
813 // BUILD THE DATA
813 // BUILD THE DATA
814 if (i==6) {
814 if (i==6) {
815 spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_SWF_BLK;
815 spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_SWF_BLK;
816 }
816 }
817 else {
817 else {
818 spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_SWF_BLK;
818 spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_SWF_BLK;
819 }
819 }
820 // SET PACKET SEQUENCE COUNTER
820 // SET PACKET SEQUENCE COUNTER
821 increment_seq_counter_source_id( headerCWF[ i ].packetSequenceControl, sid );
821 increment_seq_counter_source_id( headerCWF[ i ].packetSequenceControl, sid );
822 // SET PACKET TIME
822 // SET PACKET TIME
823 coarseTime = time_management_regs->coarse_time;
823 coarseTime = time_management_regs->coarse_time;
824 fineTime = time_management_regs->fine_time;
824 fineTime = time_management_regs->fine_time;
825 headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24);
825 headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24);
826 headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16);
826 headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16);
827 headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8);
827 headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8);
828 headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime);
828 headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime);
829 headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8);
829 headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8);
830 headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime);
830 headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime);
831 headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24);
831 headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24);
832 headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16);
832 headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16);
833 headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8);
833 headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8);
834 headerCWF[ i ].time[3] = (unsigned char) (coarseTime);
834 headerCWF[ i ].time[3] = (unsigned char) (coarseTime);
835 headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8);
835 headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8);
836 headerCWF[ i ].time[5] = (unsigned char) (fineTime);
836 headerCWF[ i ].time[5] = (unsigned char) (fineTime);
837 // SEND PACKET
837 // SEND PACKET
838 if (sid == SID_NORM_CWF_F3)
838 if (sid == SID_NORM_CWF_F3)
839 {
839 {
840 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
840 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
841 if (status != RTEMS_SUCCESSFUL) {
841 if (status != RTEMS_SUCCESSFUL) {
842 printf("%d-%d, ERR %d\n", sid, i, (int) status);
842 printf("%d-%d, ERR %d\n", sid, i, (int) status);
843 ret = LFR_DEFAULT;
843 ret = LFR_DEFAULT;
844 }
844 }
845 rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS);
845 rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS);
846 }
846 }
847 else
847 else
848 {
848 {
849 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
849 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
850 if (status != RTEMS_SUCCESSFUL) {
850 if (status != RTEMS_SUCCESSFUL) {
851 printf("%d-%d, ERR %d\n", sid, i, (int) status);
851 printf("%d-%d, ERR %d\n", sid, i, (int) status);
852 ret = LFR_DEFAULT;
852 ret = LFR_DEFAULT;
853 }
853 }
854 }
854 }
855 }
855 }
856
856
857 return ret;
857 return ret;
858 }
858 }
859
859
860 int send_waveform_CWF3_light(volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id)
860 int send_waveform_CWF3_light(volatile int *waveform, Header_TM_LFR_SCIENCE_CWF_t *headerCWF, rtems_id queue_id)
861 {
861 {
862 /** This function sends CWF_F3 CCSDS packets without the b1, b2 and b3 data.
862 /** This function sends CWF_F3 CCSDS packets without the b1, b2 and b3 data.
863 *
863 *
864 * @param waveform points to the buffer containing the data that will be send.
864 * @param waveform points to the buffer containing the data that will be send.
865 * @param headerCWF points to a table of headers that have been prepared for the data transmission.
865 * @param headerCWF points to a table of headers that have been prepared for the data transmission.
866 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
866 * @param queue_id is the id of the rtems queue to which spw_ioctl_pkt_send structures will be send. The structures
867 * contain information to setup the transmission of the data packets.
867 * contain information to setup the transmission of the data packets.
868 *
868 *
869 * By default, CWF_F3 packet are send without the b1, b2 and b3 data. This function rebuilds a data buffer
869 * By default, CWF_F3 packet are send without the b1, b2 and b3 data. This function rebuilds a data buffer
870 * from the incoming data and sends it in 7 packets, 6 containing 340 blocks and 1 one containing 8 blocks.
870 * from the incoming data and sends it in 7 packets, 6 containing 340 blocks and 1 one containing 8 blocks.
871 *
871 *
872 */
872 */
873
873
874 unsigned int i;
874 unsigned int i;
875 int ret;
875 int ret;
876 rtems_status_code status;
876 rtems_status_code status;
877 spw_ioctl_pkt_send spw_ioctl_send_CWF;
877 spw_ioctl_pkt_send spw_ioctl_send_CWF;
878 char *sample;
878 char *sample;
879
879
880 spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header
880 spw_ioctl_send_CWF.hlen = TM_HEADER_LEN + 4 + 10; // + 4 is for the protocole extra header, + 10 is for the auxiliary header
881 spw_ioctl_send_CWF.options = 0;
881 spw_ioctl_send_CWF.options = 0;
882
882
883 ret = LFR_DEFAULT;
883 ret = LFR_DEFAULT;
884
884
885 //**********************
885 //**********************
886 // BUILD CWF3_light DATA
886 // BUILD CWF3_light DATA
887 for ( i=0; i< 2048; i++)
887 for ( i=0; i< 2048; i++)
888 {
888 {
889 sample = (char*) &waveform[ i * NB_WORDS_SWF_BLK ];
889 sample = (char*) &waveform[ i * NB_WORDS_SWF_BLK ];
890 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) ] = sample[ 0 ];
890 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) ] = sample[ 0 ];
891 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 1 ] = sample[ 1 ];
891 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 1 ] = sample[ 1 ];
892 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 2 ] = sample[ 2 ];
892 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 2 ] = sample[ 2 ];
893 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 3 ] = sample[ 3 ];
893 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 3 ] = sample[ 3 ];
894 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 4 ] = sample[ 4 ];
894 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 4 ] = sample[ 4 ];
895 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 5 ] = sample[ 5 ];
895 wf_cont_f3_light[ (i * NB_BYTES_CWF3_LIGHT_BLK) + 5 ] = sample[ 5 ];
896 }
896 }
897
897
898 //*********************
898 //*********************
899 // SEND CWF3_light DATA
899 // SEND CWF3_light DATA
900
900
901 for (i=0; i<7; i++) // send waveform
901 for (i=0; i<7; i++) // send waveform
902 {
902 {
903 int coarseTime = 0x00;
903 int coarseTime = 0x00;
904 int fineTime = 0x00;
904 int fineTime = 0x00;
905 spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ];
905 spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ];
906 spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ];
906 spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ];
907 // BUILD THE DATA
907 // BUILD THE DATA
908 if ( i == WFRM_INDEX_OF_LAST_PACKET ) {
908 if ( i == WFRM_INDEX_OF_LAST_PACKET ) {
909 spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_CWF3_LIGHT_BLK;
909 spw_ioctl_send_CWF.dlen = 8 * NB_BYTES_CWF3_LIGHT_BLK;
910 }
910 }
911 else {
911 else {
912 spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_CWF3_LIGHT_BLK;
912 spw_ioctl_send_CWF.dlen = 340 * NB_BYTES_CWF3_LIGHT_BLK;
913 }
913 }
914 // SET PACKET SEQUENCE COUNTER
914 // SET PACKET SEQUENCE COUNTER
915 increment_seq_counter_source_id( headerCWF[ i ].packetSequenceControl, SID_NORM_CWF_F3 );
915 increment_seq_counter_source_id( headerCWF[ i ].packetSequenceControl, SID_NORM_CWF_F3 );
916 // SET PACKET TIME
916 // SET PACKET TIME
917 coarseTime = time_management_regs->coarse_time;
917 coarseTime = time_management_regs->coarse_time;
918 fineTime = time_management_regs->fine_time;
918 fineTime = time_management_regs->fine_time;
919 headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24);
919 headerCWF[ i ].acquisitionTime[0] = (unsigned char) (coarseTime>>24);
920 headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16);
920 headerCWF[ i ].acquisitionTime[1] = (unsigned char) (coarseTime>>16);
921 headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8);
921 headerCWF[ i ].acquisitionTime[2] = (unsigned char) (coarseTime>>8);
922 headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime);
922 headerCWF[ i ].acquisitionTime[3] = (unsigned char) (coarseTime);
923 headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8);
923 headerCWF[ i ].acquisitionTime[4] = (unsigned char) (fineTime>>8);
924 headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime);
924 headerCWF[ i ].acquisitionTime[5] = (unsigned char) (fineTime);
925 headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24);
925 headerCWF[ i ].time[0] = (unsigned char) (coarseTime>>24);
926 headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16);
926 headerCWF[ i ].time[1] = (unsigned char) (coarseTime>>16);
927 headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8);
927 headerCWF[ i ].time[2] = (unsigned char) (coarseTime>>8);
928 headerCWF[ i ].time[3] = (unsigned char) (coarseTime);
928 headerCWF[ i ].time[3] = (unsigned char) (coarseTime);
929 headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8);
929 headerCWF[ i ].time[4] = (unsigned char) (fineTime>>8);
930 headerCWF[ i ].time[5] = (unsigned char) (fineTime);
930 headerCWF[ i ].time[5] = (unsigned char) (fineTime);
931 // SEND PACKET
931 // SEND PACKET
932 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
932 status = rtems_message_queue_send( queue_id, &spw_ioctl_send_CWF, sizeof(spw_ioctl_send_CWF));
933 if (status != RTEMS_SUCCESSFUL) {
933 if (status != RTEMS_SUCCESSFUL) {
934 printf("%d-%d, ERR %d\n", SID_NORM_CWF_F3, i, (int) status);
934 printf("%d-%d, ERR %d\n", SID_NORM_CWF_F3, i, (int) status);
935 ret = LFR_DEFAULT;
935 ret = LFR_DEFAULT;
936 }
936 }
937 rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS);
937 rtems_task_wake_after(TIME_BETWEEN_TWO_CWF3_PACKETS);
938 }
938 }
939
939
940 return ret;
940 return ret;
941 }
941 }
942
942
943
943
944 //**************
944 //**************
945 // wfp registers
945 // wfp registers
946 void set_wfp_data_shaping()
946 void set_wfp_data_shaping()
947 {
947 {
948 /** This function sets the data_shaping register of the waveform picker module.
948 /** This function sets the data_shaping register of the waveform picker module.
949 *
949 *
950 * The value is read from one field of the parameter_dump_packet structure:\n
950 * The value is read from one field of the parameter_dump_packet structure:\n
951 * bw_sp0_sp1_r0_r1
951 * bw_sp0_sp1_r0_r1
952 *
952 *
953 */
953 */
954
954
955 unsigned char data_shaping;
955 unsigned char data_shaping;
956
956
957 // get the parameters for the data shaping [BW SP0 SP1 R0 R1] in sy_lfr_common1 and configure the register
957 // get the parameters for the data shaping [BW SP0 SP1 R0 R1] in sy_lfr_common1 and configure the register
958 // waveform picker : [R1 R0 SP1 SP0 BW]
958 // waveform picker : [R1 R0 SP1 SP0 BW]
959
959
960 data_shaping = parameter_dump_packet.bw_sp0_sp1_r0_r1;
960 data_shaping = parameter_dump_packet.bw_sp0_sp1_r0_r1;
961
961
962 #ifdef GSA
962 #ifdef GSA
963 #else
963 #else
964 waveform_picker_regs->data_shaping =
964 waveform_picker_regs->data_shaping =
965 ( (data_shaping & 0x10) >> 4 ) // BW
965 ( (data_shaping & 0x10) >> 4 ) // BW
966 + ( (data_shaping & 0x08) >> 2 ) // SP0
966 + ( (data_shaping & 0x08) >> 2 ) // SP0
967 + ( (data_shaping & 0x04) ) // SP1
967 + ( (data_shaping & 0x04) ) // SP1
968 + ( (data_shaping & 0x02) << 2 ) // R0
968 + ( (data_shaping & 0x02) << 2 ) // R0
969 + ( (data_shaping & 0x01) << 4 ); // R1
969 + ( (data_shaping & 0x01) << 4 ); // R1
970 #endif
970 #endif
971 }
971 }
972
972
973 char set_wfp_delta_snapshot()
973 char set_wfp_delta_snapshot()
974 {
974 {
975 /** This function sets the delta_snapshot register of the waveform picker module.
975 /** This function sets the delta_snapshot register of the waveform picker module.
976 *
976 *
977 * The value is read from two (unsigned char) of the parameter_dump_packet structure:
977 * The value is read from two (unsigned char) of the parameter_dump_packet structure:
978 * - sy_lfr_n_swf_p[0]
978 * - sy_lfr_n_swf_p[0]
979 * - sy_lfr_n_swf_p[1]
979 * - sy_lfr_n_swf_p[1]
980 *
980 *
981 */
981 */
982
982
983 char ret;
983 char ret;
984 unsigned int delta_snapshot;
984 unsigned int delta_snapshot;
985 unsigned int aux;
985 unsigned int aux;
986
986
987 aux = 0;
987 aux = 0;
988 ret = LFR_DEFAULT;
988 ret = LFR_DEFAULT;
989
989
990 delta_snapshot = parameter_dump_packet.sy_lfr_n_swf_p[0]*256
990 delta_snapshot = parameter_dump_packet.sy_lfr_n_swf_p[0]*256
991 + parameter_dump_packet.sy_lfr_n_swf_p[1];
991 + parameter_dump_packet.sy_lfr_n_swf_p[1];
992
992
993 #ifdef GSA
993 #ifdef GSA
994 #else
994 #else
995 if ( delta_snapshot < MIN_DELTA_SNAPSHOT )
995 if ( delta_snapshot < MIN_DELTA_SNAPSHOT )
996 {
996 {
997 aux = MIN_DELTA_SNAPSHOT;
997 aux = MIN_DELTA_SNAPSHOT;
998 ret = LFR_DEFAULT;
998 ret = LFR_DEFAULT;
999 }
999 }
1000 else
1000 else
1001 {
1001 {
1002 aux = delta_snapshot ;
1002 aux = delta_snapshot ;
1003 ret = LFR_SUCCESSFUL;
1003 ret = LFR_SUCCESSFUL;
1004 }
1004 }
1005 waveform_picker_regs->delta_snapshot = aux - 1; // max 2 bytes
1005 waveform_picker_regs->delta_snapshot = aux - 1; // max 2 bytes
1006 #endif
1006 #endif
1007
1007
1008 return ret;
1008 return ret;
1009 }
1009 }
1010
1010
1011 void set_wfp_burst_enable_register( unsigned char mode)
1011 void set_wfp_burst_enable_register( unsigned char mode)
1012 {
1012 {
1013 /** This function sets the waveform picker burst_enable register depending on the mode.
1013 /** This function sets the waveform picker burst_enable register depending on the mode.
1014 *
1014 *
1015 * @param mode is the LFR mode to launch.
1015 * @param mode is the LFR mode to launch.
1016 *
1016 *
1017 * The burst bits shall be before the enable bits.
1017 * The burst bits shall be before the enable bits.
1018 *
1018 *
1019 */
1019 */
1020
1020
1021 #ifdef GSA
1021 #ifdef GSA
1022 #else
1022 #else
1023 // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0
1023 // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0
1024 // the burst bits shall be set first, before the enable bits
1024 // the burst bits shall be set first, before the enable bits
1025 switch(mode) {
1025 switch(mode) {
1026 case(LFR_MODE_NORMAL):
1026 case(LFR_MODE_NORMAL):
1027 waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enable
1027 waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enable
1028 waveform_picker_regs->burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0
1028 waveform_picker_regs->burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0
1029 break;
1029 break;
1030 case(LFR_MODE_BURST):
1030 case(LFR_MODE_BURST):
1031 waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled
1031 waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled
1032 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x04; // [0100] enable f2
1032 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x04; // [0100] enable f2
1033 break;
1033 break;
1034 case(LFR_MODE_SBM1):
1034 case(LFR_MODE_SBM1):
1035 waveform_picker_regs->burst_enable = 0x20; // [0010 0000] f1 burst enabled
1035 waveform_picker_regs->burst_enable = 0x20; // [0010 0000] f1 burst enabled
1036 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0
1036 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0
1037 break;
1037 break;
1038 case(LFR_MODE_SBM2):
1038 case(LFR_MODE_SBM2):
1039 waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled
1039 waveform_picker_regs->burst_enable = 0x40; // [0100 0000] f2 burst enabled
1040 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0
1040 waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0
1041 break;
1041 break;
1042 default:
1042 default:
1043 waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled
1043 waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled
1044 break;
1044 break;
1045 }
1045 }
1046 #endif
1046 #endif
1047 }
1047 }
1048
1048
1049 void reset_wfp_burst_enable()
1049 void reset_wfp_burst_enable()
1050 {
1050 {
1051 /** This function resets the waveform picker burst_enable register.
1051 /** This function resets the waveform picker burst_enable register.
1052 *
1052 *
1053 * The burst bits [f2 f1 f0] and the enable bits [f3 f2 f1 f0] are set to 0.
1053 * The burst bits [f2 f1 f0] and the enable bits [f3 f2 f1 f0] are set to 0.
1054 *
1054 *
1055 */
1055 */
1056
1056
1057 #ifdef GSA
1057 #ifdef GSA
1058 #else
1058 #else
1059 waveform_picker_regs->burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0
1059 waveform_picker_regs->burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0
1060 #endif
1060 #endif
1061 }
1061 }
1062
1062
1063 void reset_wfp_status()
1063 void reset_wfp_status()
1064 {
1064 {
1065 /** This function resets the waveform picker status register.
1065 /** This function resets the waveform picker status register.
1066 *
1066 *
1067 * All status bits are set to 0 [new_err full_err full].
1067 * All status bits are set to 0 [new_err full_err full].
1068 *
1068 *
1069 */
1069 */
1070
1070
1071 #ifdef GSA
1071 #ifdef GSA
1072 #else
1072 #else
1073 waveform_picker_regs->status = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0
1073 waveform_picker_regs->status = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0
1074 #endif
1074 #endif
1075 }
1075 }
1076
1076
1077 void reset_waveform_picker_regs()
1077 void reset_waveform_picker_regs()
1078 {
1078 {
1079 /** This function resets the waveform picker module registers.
1079 /** This function resets the waveform picker module registers.
1080 *
1080 *
1081 * The registers affected by this function are located at the following offset addresses:
1081 * The registers affected by this function are located at the following offset addresses:
1082 * - 0x00 data_shaping
1082 * - 0x00 data_shaping
1083 * - 0x04 burst_enable
1083 * - 0x04 burst_enable
1084 * - 0x08 addr_data_f0
1084 * - 0x08 addr_data_f0
1085 * - 0x0C addr_data_f1
1085 * - 0x0C addr_data_f1
1086 * - 0x10 addr_data_f2
1086 * - 0x10 addr_data_f2
1087 * - 0x14 addr_data_f3
1087 * - 0x14 addr_data_f3
1088 * - 0x18 status
1088 * - 0x18 status
1089 * - 0x1C delta_snapshot
1089 * - 0x1C delta_snapshot
1090 * - 0x20 delta_f2_f1
1090 * - 0x20 delta_f2_f1
1091 * - 0x24 delta_f2_f0
1091 * - 0x24 delta_f2_f0
1092 * - 0x28 nb_burst
1092 * - 0x28 nb_burst
1093 * - 0x2C nb_snapshot
1093 * - 0x2C nb_snapshot
1094 *
1094 *
1095 */
1095 */
1096
1096
1097 #ifdef GSA
1097 #ifdef GSA
1098 #else
1098 #else
1099 reset_wfp_burst_enable();
1099 reset_wfp_burst_enable();
1100 reset_wfp_status();
1100 reset_wfp_status();
1101 // set buffer addresses
1101 // set buffer addresses
1102 waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); //
1102 waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); //
1103 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); //
1103 waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); //
1104 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); //
1104 waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); //
1105 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); //
1105 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); //
1106 // set other parameters
1106 // set other parameters
1107 set_wfp_data_shaping();
1107 set_wfp_data_shaping();
1108 set_wfp_delta_snapshot(); // time in seconds between two snapshots
1108 set_wfp_delta_snapshot(); // time in seconds between two snapshots
1109 waveform_picker_regs->delta_f2_f1 = 0xffff; // 0x16800 => 92160 (max 4 bytes)
1109 waveform_picker_regs->delta_f2_f1 = 0xffff; // 0x16800 => 92160 (max 4 bytes)
1110 waveform_picker_regs->delta_f2_f0 = 0x17c00; // 97 280 (max 5 bytes)
1110 waveform_picker_regs->delta_f2_f0 = 0x17c00; // 97 280 (max 5 bytes)
1111 waveform_picker_regs->nb_burst_available = 0x180; // max 3 bytes, size of the buffer in burst (1 burst = 16 x 4 octets)
1111 waveform_picker_regs->nb_burst_available = 0x180; // max 3 bytes, size of the buffer in burst (1 burst = 16 x 4 octets)
1112 waveform_picker_regs->nb_snapshot_param = 0x7ff; // max 3 octets, 2048 - 1
1112 waveform_picker_regs->nb_snapshot_param = 0x7ff; // max 3 octets, 2048 - 1
1113 #endif
1113 #endif
1114 }
1114 }
1115
1115
1116 //*****************
1116 //*****************
1117 // local parameters
1117 // local parameters
1118 void set_local_sbm1_nb_cwf_max( void )
1118 void set_local_sbm1_nb_cwf_max( void )
1119 {
1119 {
1120 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1120 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1121 *
1121 *
1122 * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n
1122 * 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_F1 data as normal data when the SBM1 is active.\n\n
1123 * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.\n\n
1124 * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot)
1124 * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot)
1125 *
1125 *
1126 */
1126 */
1127 param_local.local_sbm1_nb_cwf_max = 2 *
1127 param_local.local_sbm1_nb_cwf_max = 2 *
1128 (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
1128 (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
1129 + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2
1129 + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2
1130 }
1130 }
1131
1131
1132 void set_local_sbm2_nb_cwf_max(void)
1132 void set_local_sbm2_nb_cwf_max(void)
1133 {
1133 {
1134 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1134 /** This function sets the value of the sbm1_nb_cwf_max local parameter.
1135 *
1135 *
1136 * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n
1136 * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n
1137 * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n
1137 * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n
1138 * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz)
1138 * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz)
1139 *
1139 *
1140 */
1140 */
1141
1141
1142 param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
1142 param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
1143 + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8;
1143 + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8;
1144 }
1144 }
1145
1145
1146 void set_local_nb_interrupt_f0_MAX( void )
1146 void set_local_nb_interrupt_f0_MAX( void )
1147 {
1147 {
1148 /** This function sets the value of the nb_interrupt_f0_MAX local parameter.
1148 /** This function sets the value of the nb_interrupt_f0_MAX local parameter.
1149 *
1149 *
1150 * This parameter is used for the SM validation only.\n
1150 * This parameter is used for the SM validation only.\n
1151 * The software waits param_local.local_nb_interrupt_f0_MAX interruptions from the spectral matrices
1151 * The software waits param_local.local_nb_interrupt_f0_MAX interruptions from the spectral matrices
1152 * module before launching a basic processing.
1152 * module before launching a basic processing.
1153 *
1153 *
1154 */
1154 */
1155
1155
1156 param_local.local_nb_interrupt_f0_MAX = ( (parameter_dump_packet.sy_lfr_n_asm_p[0]) * 256
1156 param_local.local_nb_interrupt_f0_MAX = ( (parameter_dump_packet.sy_lfr_n_asm_p[0]) * 256
1157 + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100;
1157 + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100;
1158 }
1158 }
1159
1159
1160 void reset_local_sbm1_nb_cwf_sent( void )
1160 void reset_local_sbm1_nb_cwf_sent( void )
1161 {
1161 {
1162 /** This function resets the value of the sbm1_nb_cwf_sent local parameter.
1162 /** This function resets the value of the sbm1_nb_cwf_sent local parameter.
1163 *
1163 *
1164 * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n
1164 * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n
1165 * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.
1165 * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.
1166 *
1166 *
1167 */
1167 */
1168
1168
1169 param_local.local_sbm1_nb_cwf_sent = 0;
1169 param_local.local_sbm1_nb_cwf_sent = 0;
1170 }
1170 }
1171
1171
1172 void reset_local_sbm2_nb_cwf_sent( void )
1172 void reset_local_sbm2_nb_cwf_sent( void )
1173 {
1173 {
1174 /** This function resets the value of the sbm2_nb_cwf_sent local parameter.
1174 /** This function resets the value of the sbm2_nb_cwf_sent local parameter.
1175 *
1175 *
1176 * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n
1176 * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n
1177 * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active.
1177 * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active.
1178 *
1178 *
1179 */
1179 */
1180
1180
1181 param_local.local_sbm2_nb_cwf_sent = 0;
1181 param_local.local_sbm2_nb_cwf_sent = 0;
1182 }
1182 }
1183
1183
1184 void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid )
1184 void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid )
1185 {
1185 {
1186 unsigned short *sequence_cnt;
1186 unsigned short *sequence_cnt;
1187 unsigned short segmentation_grouping_flag;
1187 unsigned short segmentation_grouping_flag;
1188 unsigned short new_packet_sequence_control;
1188 unsigned short new_packet_sequence_control;
1189
1189
1190 if ( (sid ==SID_NORM_SWF_F0) || (sid ==SID_NORM_SWF_F1) || (sid ==SID_NORM_SWF_F2)
1190 if ( (sid ==SID_NORM_SWF_F0) || (sid ==SID_NORM_SWF_F1) || (sid ==SID_NORM_SWF_F2)
1191 || (sid ==SID_NORM_CWF_F3) || (sid ==SID_BURST_CWF_F2) )
1191 || (sid ==SID_NORM_CWF_F3) || (sid ==SID_BURST_CWF_F2) )
1192 {
1192 {
1193 sequence_cnt = &sequenceCounters_SCIENCE_NORMAL_BURST;
1193 sequence_cnt = &sequenceCounters_SCIENCE_NORMAL_BURST;
1194 }
1194 }
1195 else if ( (sid ==SID_SBM1_CWF_F1) || (sid ==SID_SBM2_CWF_F2) )
1195 else if ( (sid ==SID_SBM1_CWF_F1) || (sid ==SID_SBM2_CWF_F2) )
1196 {
1196 {
1197 sequence_cnt = &sequenceCounters_SCIENCE_SBM1_SBM2;
1197 sequence_cnt = &sequenceCounters_SCIENCE_SBM1_SBM2;
1198 }
1198 }
1199 else
1199 else
1200 {
1200 {
1201 sequence_cnt = &sequenceCounters_TC_EXE[ UNKNOWN ];
1201 sequence_cnt = NULL;
1202 PRINTF1("in increment_seq_counter_source_id *** ERR apid_destid %d not known\n", sid)
1202 PRINTF1("in increment_seq_counter_source_id *** ERR apid_destid %d not known\n", sid)
1203 }
1203 }
1204
1204
1205 segmentation_grouping_flag = (packet_sequence_control[ 0 ] & 0xc0) << 8;
1205 if (sequence_cnt != NULL)
1206 *sequence_cnt = (*sequence_cnt) & 0x3fff;
1206 {
1207 segmentation_grouping_flag = (packet_sequence_control[ 0 ] & 0xc0) << 8;
1208 *sequence_cnt = (*sequence_cnt) & 0x3fff;
1207
1209
1208 new_packet_sequence_control = segmentation_grouping_flag | *sequence_cnt ;
1210 new_packet_sequence_control = segmentation_grouping_flag | *sequence_cnt ;
1209
1211
1210 packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8);
1212 packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8);
1211 packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control );
1213 packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control );
1212
1214
1213 // increment the seuqence counter for the next packet
1215 // increment the sequence counter for the next packet
1214 if ( *sequence_cnt < SEQ_CNT_MAX)
1216 if ( *sequence_cnt < SEQ_CNT_MAX)
1215 {
1217 {
1216 *sequence_cnt = *sequence_cnt + 1;
1218 *sequence_cnt = *sequence_cnt + 1;
1219 }
1220 else
1221 {
1222 *sequence_cnt = 0;
1223 }
1217 }
1224 }
1218 else
1219 {
1220 *sequence_cnt = 0;
1221 }
1222
1223 }
1225 }
General Comments 0
You need to be logged in to leave comments. Login now