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