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