@@ -1,248 +1,248 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 14 08:56:42 2013 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | ####### Compiler, tools and options |
|
9 | ####### Compiler, tools and options | |
10 |
|
10 | |||
11 | CC = sparc-rtems-gcc |
|
11 | CC = sparc-rtems-gcc | |
12 | CXX = sparc-rtems-g++ |
|
12 | CXX = sparc-rtems-g++ | |
13 |
DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=2 |
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=23 -DPRINT_MESSAGES_ON_CONSOLE | |
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header | |
17 | LINK = sparc-rtems-g++ |
|
17 | LINK = sparc-rtems-g++ | |
18 | LFLAGS = |
|
18 | LFLAGS = | |
19 | LIBS = $(SUBLIBS) |
|
19 | LIBS = $(SUBLIBS) | |
20 | AR = sparc-rtems-ar rcs |
|
20 | AR = sparc-rtems-ar rcs | |
21 | RANLIB = |
|
21 | RANLIB = | |
22 | QMAKE = /usr/bin/qmake-qt4 |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
23 | TAR = tar -cf |
|
23 | TAR = tar -cf | |
24 | COMPRESS = gzip -9f |
|
24 | COMPRESS = gzip -9f | |
25 | COPY = cp -f |
|
25 | COPY = cp -f | |
26 | SED = sed |
|
26 | SED = sed | |
27 | COPY_FILE = $(COPY) |
|
27 | COPY_FILE = $(COPY) | |
28 | COPY_DIR = $(COPY) -r |
|
28 | COPY_DIR = $(COPY) -r | |
29 | STRIP = sparc-rtems-strip |
|
29 | STRIP = sparc-rtems-strip | |
30 | INSTALL_FILE = install -m 644 -p |
|
30 | INSTALL_FILE = install -m 644 -p | |
31 | INSTALL_DIR = $(COPY_DIR) |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
32 | INSTALL_PROGRAM = install -m 755 -p |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
33 | DEL_FILE = rm -f |
|
33 | DEL_FILE = rm -f | |
34 | SYMLINK = ln -f -s |
|
34 | SYMLINK = ln -f -s | |
35 | DEL_DIR = rmdir |
|
35 | DEL_DIR = rmdir | |
36 | MOVE = mv -f |
|
36 | MOVE = mv -f | |
37 | CHK_DIR_EXISTS= test -d |
|
37 | CHK_DIR_EXISTS= test -d | |
38 | MKDIR = mkdir -p |
|
38 | MKDIR = mkdir -p | |
39 |
|
39 | |||
40 | ####### Output directory |
|
40 | ####### Output directory | |
41 |
|
41 | |||
42 | OBJECTS_DIR = obj/ |
|
42 | OBJECTS_DIR = obj/ | |
43 |
|
43 | |||
44 | ####### Files |
|
44 | ####### Files | |
45 |
|
45 | |||
46 | SOURCES = ../src/wf_handler.c \ |
|
46 | SOURCES = ../src/wf_handler.c \ | |
47 | ../src/tc_handler.c \ |
|
47 | ../src/tc_handler.c \ | |
48 | ../src/fsw_processing.c \ |
|
48 | ../src/fsw_processing.c \ | |
49 | ../src/fsw_misc.c \ |
|
49 | ../src/fsw_misc.c \ | |
50 | ../src/fsw_init.c \ |
|
50 | ../src/fsw_init.c \ | |
51 | ../src/fsw_globals.c \ |
|
51 | ../src/fsw_globals.c \ | |
52 | ../src/fsw_spacewire.c \ |
|
52 | ../src/fsw_spacewire.c \ | |
53 | ../src/tc_load_dump_parameters.c \ |
|
53 | ../src/tc_load_dump_parameters.c \ | |
54 | ../src/tm_lfr_tc_exe.c \ |
|
54 | ../src/tm_lfr_tc_exe.c \ | |
55 | ../src/tc_acceptance.c |
|
55 | ../src/tc_acceptance.c | |
56 | OBJECTS = obj/wf_handler.o \ |
|
56 | OBJECTS = obj/wf_handler.o \ | |
57 | obj/tc_handler.o \ |
|
57 | obj/tc_handler.o \ | |
58 | obj/fsw_processing.o \ |
|
58 | obj/fsw_processing.o \ | |
59 | obj/fsw_misc.o \ |
|
59 | obj/fsw_misc.o \ | |
60 | obj/fsw_init.o \ |
|
60 | obj/fsw_init.o \ | |
61 | obj/fsw_globals.o \ |
|
61 | obj/fsw_globals.o \ | |
62 | obj/fsw_spacewire.o \ |
|
62 | obj/fsw_spacewire.o \ | |
63 | obj/tc_load_dump_parameters.o \ |
|
63 | obj/tc_load_dump_parameters.o \ | |
64 | obj/tm_lfr_tc_exe.o \ |
|
64 | obj/tm_lfr_tc_exe.o \ | |
65 | obj/tc_acceptance.o |
|
65 | obj/tc_acceptance.o | |
66 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
66 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
67 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
67 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
68 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
68 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
69 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
69 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
70 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
70 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
71 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
71 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
72 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
72 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
73 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
73 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
74 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
74 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
75 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
75 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
76 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
76 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
77 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
77 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
78 | sparc.pri \ |
|
78 | sparc.pri \ | |
79 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
79 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
81 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
81 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
82 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
82 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
83 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
83 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
84 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
86 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
86 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
87 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
88 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
88 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
89 | fsw-qt.pro |
|
89 | fsw-qt.pro | |
90 | QMAKE_TARGET = fsw |
|
90 | QMAKE_TARGET = fsw | |
91 | DESTDIR = bin/ |
|
91 | DESTDIR = bin/ | |
92 | TARGET = bin/fsw |
|
92 | TARGET = bin/fsw | |
93 |
|
93 | |||
94 | first: all |
|
94 | first: all | |
95 | ####### Implicit rules |
|
95 | ####### Implicit rules | |
96 |
|
96 | |||
97 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
97 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
98 |
|
98 | |||
99 | .cpp.o: |
|
99 | .cpp.o: | |
100 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
100 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
101 |
|
101 | |||
102 | .cc.o: |
|
102 | .cc.o: | |
103 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
103 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
104 |
|
104 | |||
105 | .cxx.o: |
|
105 | .cxx.o: | |
106 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
106 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
107 |
|
107 | |||
108 | .C.o: |
|
108 | .C.o: | |
109 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
109 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
110 |
|
110 | |||
111 | .c.o: |
|
111 | .c.o: | |
112 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
112 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
113 |
|
113 | |||
114 | ####### Build rules |
|
114 | ####### Build rules | |
115 |
|
115 | |||
116 | all: Makefile $(TARGET) |
|
116 | all: Makefile $(TARGET) | |
117 |
|
117 | |||
118 | $(TARGET): $(OBJECTS) |
|
118 | $(TARGET): $(OBJECTS) | |
119 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
119 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
120 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
120 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
121 |
|
121 | |||
122 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
122 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
123 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
123 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
124 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
124 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
125 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
125 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
126 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
126 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
127 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
127 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
128 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
128 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
129 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
129 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
130 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
130 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
131 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
131 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
132 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
132 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
133 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
133 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
134 | sparc.pri \ |
|
134 | sparc.pri \ | |
135 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
135 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
136 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
136 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
137 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
137 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
138 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
138 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
139 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
139 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
140 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
140 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
141 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
141 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
142 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
142 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
143 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
143 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
144 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
144 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
145 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
145 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
146 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
146 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
147 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
147 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
148 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
148 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
149 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
149 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
150 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
150 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
151 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
151 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
152 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
152 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
153 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
153 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
154 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
154 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
155 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
155 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
156 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
156 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
157 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
157 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
158 | sparc.pri: |
|
158 | sparc.pri: | |
159 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
159 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
160 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
160 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
161 | /usr/lib64/qt4/mkspecs/features/shared.prf: |
|
161 | /usr/lib64/qt4/mkspecs/features/shared.prf: | |
162 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
162 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
163 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
163 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
164 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
164 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
165 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
165 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
166 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
166 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
167 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
167 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
168 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
168 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
169 | qmake: FORCE |
|
169 | qmake: FORCE | |
170 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
170 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
171 |
|
171 | |||
172 | dist: |
|
172 | dist: | |
173 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
|
173 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 | |
174 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 |
|
174 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 | |
175 |
|
175 | |||
176 |
|
176 | |||
177 | clean:compiler_clean |
|
177 | clean:compiler_clean | |
178 | -$(DEL_FILE) $(OBJECTS) |
|
178 | -$(DEL_FILE) $(OBJECTS) | |
179 | -$(DEL_FILE) *~ core *.core |
|
179 | -$(DEL_FILE) *~ core *.core | |
180 |
|
180 | |||
181 |
|
181 | |||
182 | ####### Sub-libraries |
|
182 | ####### Sub-libraries | |
183 |
|
183 | |||
184 | distclean: clean |
|
184 | distclean: clean | |
185 | -$(DEL_FILE) $(TARGET) |
|
185 | -$(DEL_FILE) $(TARGET) | |
186 | -$(DEL_FILE) Makefile |
|
186 | -$(DEL_FILE) Makefile | |
187 |
|
187 | |||
188 |
|
188 | |||
189 | grmon: |
|
189 | grmon: | |
190 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u |
|
190 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u | |
191 |
|
191 | |||
192 | check: first |
|
192 | check: first | |
193 |
|
193 | |||
194 | compiler_rcc_make_all: |
|
194 | compiler_rcc_make_all: | |
195 | compiler_rcc_clean: |
|
195 | compiler_rcc_clean: | |
196 | compiler_uic_make_all: |
|
196 | compiler_uic_make_all: | |
197 | compiler_uic_clean: |
|
197 | compiler_uic_clean: | |
198 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
198 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
199 | compiler_image_collection_clean: |
|
199 | compiler_image_collection_clean: | |
200 | -$(DEL_FILE) qmake_image_collection.cpp |
|
200 | -$(DEL_FILE) qmake_image_collection.cpp | |
201 | compiler_yacc_decl_make_all: |
|
201 | compiler_yacc_decl_make_all: | |
202 | compiler_yacc_decl_clean: |
|
202 | compiler_yacc_decl_clean: | |
203 | compiler_yacc_impl_make_all: |
|
203 | compiler_yacc_impl_make_all: | |
204 | compiler_yacc_impl_clean: |
|
204 | compiler_yacc_impl_clean: | |
205 | compiler_lex_make_all: |
|
205 | compiler_lex_make_all: | |
206 | compiler_lex_clean: |
|
206 | compiler_lex_clean: | |
207 | compiler_clean: |
|
207 | compiler_clean: | |
208 |
|
208 | |||
209 | ####### Compile |
|
209 | ####### Compile | |
210 |
|
210 | |||
211 | obj/wf_handler.o: ../src/wf_handler.c |
|
211 | obj/wf_handler.o: ../src/wf_handler.c | |
212 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c |
|
212 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c | |
213 |
|
213 | |||
214 | obj/tc_handler.o: ../src/tc_handler.c |
|
214 | obj/tc_handler.o: ../src/tc_handler.c | |
215 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c |
|
215 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c | |
216 |
|
216 | |||
217 | obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c |
|
217 | obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c | |
218 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c |
|
218 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c | |
219 |
|
219 | |||
220 | obj/fsw_misc.o: ../src/fsw_misc.c |
|
220 | obj/fsw_misc.o: ../src/fsw_misc.c | |
221 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c |
|
221 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c | |
222 |
|
222 | |||
223 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c |
|
223 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c | |
224 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c |
|
224 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c | |
225 |
|
225 | |||
226 | obj/fsw_globals.o: ../src/fsw_globals.c |
|
226 | obj/fsw_globals.o: ../src/fsw_globals.c | |
227 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c |
|
227 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c | |
228 |
|
228 | |||
229 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c |
|
229 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c | |
230 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c |
|
230 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c | |
231 |
|
231 | |||
232 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c |
|
232 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c | |
233 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c |
|
233 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c | |
234 |
|
234 | |||
235 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c |
|
235 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c | |
236 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c |
|
236 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c | |
237 |
|
237 | |||
238 | obj/tc_acceptance.o: ../src/tc_acceptance.c |
|
238 | obj/tc_acceptance.o: ../src/tc_acceptance.c | |
239 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c |
|
239 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c | |
240 |
|
240 | |||
241 | ####### Install |
|
241 | ####### Install | |
242 |
|
242 | |||
243 | install: FORCE |
|
243 | install: FORCE | |
244 |
|
244 | |||
245 | uninstall: FORCE |
|
245 | uninstall: FORCE | |
246 |
|
246 | |||
247 | FORCE: |
|
247 | FORCE: | |
248 |
|
248 |
@@ -1,78 +1,78 | |||||
1 | TEMPLATE = app |
|
1 | TEMPLATE = app | |
2 | # CONFIG += console v8 sim |
|
2 | # CONFIG += console v8 sim | |
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa | |
4 | CONFIG += console verbose |
|
4 | CONFIG += console verbose | |
5 | CONFIG -= qt |
|
5 | CONFIG -= qt | |
6 |
|
6 | |||
7 | include(./sparc.pri) |
|
7 | include(./sparc.pri) | |
8 |
|
8 | |||
9 | # flight software version |
|
9 | # flight software version | |
10 |
SWVERSION=-0-2 |
|
10 | SWVERSION=-0-23 | |
11 | DEFINES += SW_VERSION_N1=0 |
|
11 | DEFINES += SW_VERSION_N1=0 | |
12 | DEFINES += SW_VERSION_N2=0 |
|
12 | DEFINES += SW_VERSION_N2=0 | |
13 | DEFINES += SW_VERSION_N3=0 |
|
13 | DEFINES += SW_VERSION_N3=0 | |
14 |
DEFINES += SW_VERSION_N4=2 |
|
14 | DEFINES += SW_VERSION_N4=23 | |
15 |
|
15 | |||
16 | contains( CONFIG, verbose ) { |
|
16 | contains( CONFIG, verbose ) { | |
17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
|
17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE | |
18 | } |
|
18 | } | |
19 |
|
19 | |||
20 | contains( CONFIG, debug_messages ) { |
|
20 | contains( CONFIG, debug_messages ) { | |
21 | DEFINES += DEBUG_MESSAGES |
|
21 | DEFINES += DEBUG_MESSAGES | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | contains( CONFIG, cpu_usage_report ) { |
|
24 | contains( CONFIG, cpu_usage_report ) { | |
25 | DEFINES += PRINT_TASK_STATISTICS |
|
25 | DEFINES += PRINT_TASK_STATISTICS | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | contains( CONFIG, stack_report ) { |
|
28 | contains( CONFIG, stack_report ) { | |
29 | DEFINES += PRINT_STACK_REPORT |
|
29 | DEFINES += PRINT_STACK_REPORT | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
32 | contains( CONFIG, boot_messages ) { |
|
32 | contains( CONFIG, boot_messages ) { | |
33 | DEFINES += BOOT_MESSAGES |
|
33 | DEFINES += BOOT_MESSAGES | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | #doxygen.target = doxygen |
|
36 | #doxygen.target = doxygen | |
37 | #doxygen.commands = doxygen ../doc/Doxyfile |
|
37 | #doxygen.commands = doxygen ../doc/Doxyfile | |
38 | #QMAKE_EXTRA_TARGETS += doxygen |
|
38 | #QMAKE_EXTRA_TARGETS += doxygen | |
39 |
|
39 | |||
40 | TARGET = fsw |
|
40 | TARGET = fsw | |
41 | contains( CONFIG, gsa ) { |
|
41 | contains( CONFIG, gsa ) { | |
42 | DEFINES += GSA |
|
42 | DEFINES += GSA | |
43 | TARGET = fsw-gsa |
|
43 | TARGET = fsw-gsa | |
44 | } |
|
44 | } | |
45 |
|
45 | |||
46 | INCLUDEPATH += \ |
|
46 | INCLUDEPATH += \ | |
47 | ../src \ |
|
47 | ../src \ | |
48 | ../header |
|
48 | ../header | |
49 |
|
49 | |||
50 | SOURCES += \ |
|
50 | SOURCES += \ | |
51 | ../src/wf_handler.c \ |
|
51 | ../src/wf_handler.c \ | |
52 | ../src/tc_handler.c \ |
|
52 | ../src/tc_handler.c \ | |
53 | ../src/fsw_processing.c \ |
|
53 | ../src/fsw_processing.c \ | |
54 | ../src/fsw_misc.c \ |
|
54 | ../src/fsw_misc.c \ | |
55 | ../src/fsw_init.c \ |
|
55 | ../src/fsw_init.c \ | |
56 | ../src/fsw_globals.c \ |
|
56 | ../src/fsw_globals.c \ | |
57 | ../src/fsw_spacewire.c \ |
|
57 | ../src/fsw_spacewire.c \ | |
58 | ../src/tc_load_dump_parameters.c \ |
|
58 | ../src/tc_load_dump_parameters.c \ | |
59 | ../src/tm_lfr_tc_exe.c \ |
|
59 | ../src/tm_lfr_tc_exe.c \ | |
60 | ../src/tc_acceptance.c |
|
60 | ../src/tc_acceptance.c | |
61 |
|
61 | |||
62 |
|
62 | |||
63 | HEADERS += \ |
|
63 | HEADERS += \ | |
64 | ../header/wf_handler.h \ |
|
64 | ../header/wf_handler.h \ | |
65 | ../header/tc_handler.h \ |
|
65 | ../header/tc_handler.h \ | |
66 | ../header/grlib_regs.h \ |
|
66 | ../header/grlib_regs.h \ | |
67 | ../header/fsw_processing.h \ |
|
67 | ../header/fsw_processing.h \ | |
68 | ../header/fsw_params.h \ |
|
68 | ../header/fsw_params.h \ | |
69 | ../header/fsw_misc.h \ |
|
69 | ../header/fsw_misc.h \ | |
70 | ../header/fsw_init.h \ |
|
70 | ../header/fsw_init.h \ | |
71 | ../header/ccsds_types.h \ |
|
71 | ../header/ccsds_types.h \ | |
72 | ../header/fsw_params_processing.h \ |
|
72 | ../header/fsw_params_processing.h \ | |
73 | ../header/fsw_spacewire.h \ |
|
73 | ../header/fsw_spacewire.h \ | |
74 | ../header/tm_byte_positions.h \ |
|
74 | ../header/tm_byte_positions.h \ | |
75 | ../header/tc_load_dump_parameters.h \ |
|
75 | ../header/tc_load_dump_parameters.h \ | |
76 | ../header/tm_lfr_tc_exe.h \ |
|
76 | ../header/tm_lfr_tc_exe.h \ | |
77 | ../header/tc_acceptance.h |
|
77 | ../header/tc_acceptance.h | |
78 |
|
78 |
@@ -1,305 +1,305 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 2.8.1, 2013-11-1 |
|
3 | <!-- Written by QtCreator 2.8.1, 2013-11-14T09:19:44. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">0</value> |
|
7 | <value type="int">0</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | |
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
16 | <value type="QString" key="language">Cpp</value> |
|
16 | <value type="QString" key="language">Cpp</value> | |
17 | <valuemap type="QVariantMap" key="value"> |
|
17 | <valuemap type="QVariantMap" key="value"> | |
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QString" key="CurrentPreferences">CppGlobal</value> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | </valuemap> |
|
20 | </valuemap> | |
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
22 | <value type="QString" key="language">QmlJS</value> |
|
22 | <value type="QString" key="language">QmlJS</value> | |
23 | <valuemap type="QVariantMap" key="value"> |
|
23 | <valuemap type="QVariantMap" key="value"> | |
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QString" key="CurrentPreferences">QmlJSGlobal</value> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | </valuemap> |
|
26 | </valuemap> | |
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
|
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | |
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
45 | </valuemap> |
|
45 | </valuemap> | |
46 | </data> |
|
46 | </data> | |
47 | <data> |
|
47 | <data> | |
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
49 | <valuemap type="QVariantMap"/> |
|
49 | <valuemap type="QVariantMap"/> | |
50 | </data> |
|
50 | </data> | |
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
61 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
63 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
64 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
67 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
69 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
70 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
71 | </valuemap> |
|
71 | </valuemap> | |
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
72 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
73 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
74 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
77 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
78 | <value type="QString">-w</value> |
|
78 | <value type="QString">-w</value> | |
79 | <value type="QString">-r</value> |
|
79 | <value type="QString">-r</value> | |
80 | </valuelist> |
|
80 | </valuelist> | |
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
81 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w -j 4</value> |
|
82 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w -j 4</value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
84 | </valuemap> |
|
84 | </valuemap> | |
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
85 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
86 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
89 | </valuemap> |
|
89 | </valuemap> | |
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
90 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
92 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
93 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
96 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
97 | <value type="QString">-w</value> |
|
97 | <value type="QString">-w</value> | |
98 | <value type="QString">-r</value> |
|
98 | <value type="QString">-r</value> | |
99 | </valuelist> |
|
99 | </valuelist> | |
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
100 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> |
|
101 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
103 | </valuemap> |
|
103 | </valuemap> | |
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
104 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
105 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
108 | </valuemap> |
|
108 | </valuemap> | |
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
109 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
110 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
111 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> |
|
112 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
115 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> |
|
116 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> |
|
119 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
122 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
122 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
126 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
126 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
127 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> |
|
127 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
128 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
128 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
129 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
129 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
130 | </valuemap> |
|
130 | </valuemap> | |
131 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
131 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
132 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
132 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
133 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
133 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
134 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
134 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
135 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
136 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
136 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
137 | <value type="QString">-w</value> |
|
137 | <value type="QString">-w</value> | |
138 | <value type="QString">-r</value> |
|
138 | <value type="QString">-r</value> | |
139 | </valuelist> |
|
139 | </valuelist> | |
140 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
140 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
141 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> |
|
141 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> | |
142 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
142 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
143 | </valuemap> |
|
143 | </valuemap> | |
144 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
144 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
145 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
146 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
146 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
147 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
147 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
148 | </valuemap> |
|
148 | </valuemap> | |
149 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
149 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
150 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
150 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
151 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
151 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
152 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
153 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
153 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
154 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
154 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
155 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
155 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
156 | <value type="QString">-w</value> |
|
156 | <value type="QString">-w</value> | |
157 | <value type="QString">-r</value> |
|
157 | <value type="QString">-r</value> | |
158 | </valuelist> |
|
158 | </valuelist> | |
159 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
159 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
160 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> |
|
160 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> | |
161 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
161 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
162 | </valuemap> |
|
162 | </valuemap> | |
163 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
163 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
164 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
165 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
165 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
166 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
166 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
167 | </valuemap> |
|
167 | </valuemap> | |
168 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
168 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
169 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
169 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
170 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
170 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> |
|
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> | |
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
174 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> |
|
174 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | |
175 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> |
|
175 | <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> | |
176 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
176 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> | |
177 | </valuemap> |
|
177 | </valuemap> | |
178 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> |
|
178 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> | |
179 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
179 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
180 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
180 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
181 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
181 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
182 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
182 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
183 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
183 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
184 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
184 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
185 | </valuemap> |
|
185 | </valuemap> | |
186 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
186 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
187 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> |
|
187 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
188 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
188 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
189 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
189 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
190 | </valuemap> |
|
190 | </valuemap> | |
191 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
191 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
192 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
192 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
193 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
193 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
194 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
194 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
195 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
196 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
196 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
197 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
197 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
198 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
198 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
199 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
199 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
200 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
200 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
201 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
201 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
202 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
202 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
203 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
203 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
204 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
204 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
205 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
205 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
206 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
206 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
207 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
207 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
208 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
208 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
209 | <value type="int">0</value> |
|
209 | <value type="int">0</value> | |
210 | <value type="int">1</value> |
|
210 | <value type="int">1</value> | |
211 | <value type="int">2</value> |
|
211 | <value type="int">2</value> | |
212 | <value type="int">3</value> |
|
212 | <value type="int">3</value> | |
213 | <value type="int">4</value> |
|
213 | <value type="int">4</value> | |
214 | <value type="int">5</value> |
|
214 | <value type="int">5</value> | |
215 | <value type="int">6</value> |
|
215 | <value type="int">6</value> | |
216 | <value type="int">7</value> |
|
216 | <value type="int">7</value> | |
217 | <value type="int">8</value> |
|
217 | <value type="int">8</value> | |
218 | <value type="int">9</value> |
|
218 | <value type="int">9</value> | |
219 | <value type="int">10</value> |
|
219 | <value type="int">10</value> | |
220 | <value type="int">11</value> |
|
220 | <value type="int">11</value> | |
221 | <value type="int">12</value> |
|
221 | <value type="int">12</value> | |
222 | <value type="int">13</value> |
|
222 | <value type="int">13</value> | |
223 | <value type="int">14</value> |
|
223 | <value type="int">14</value> | |
224 | </valuelist> |
|
224 | </valuelist> | |
225 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
225 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
226 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
226 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> | |
228 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
228 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
229 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
229 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
230 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
230 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
231 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
231 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
232 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
232 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
233 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
233 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
234 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
234 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
235 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
235 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
236 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
236 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
237 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
237 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
238 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
238 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
239 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
239 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
240 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> |
|
240 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
241 | </valuemap> |
|
241 | </valuemap> | |
242 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> |
|
242 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> | |
243 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> |
|
243 | <value type="bool" key="Analyzer.Project.UseGlobal">true</value> | |
244 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
244 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
245 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
245 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
246 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
246 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
247 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
247 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
248 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
248 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
249 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
249 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
250 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
250 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
251 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
251 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
252 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
252 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
253 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
253 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
254 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
254 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
255 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
255 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
256 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
256 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
257 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
257 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
258 | <value type="int">0</value> |
|
258 | <value type="int">0</value> | |
259 | <value type="int">1</value> |
|
259 | <value type="int">1</value> | |
260 | <value type="int">2</value> |
|
260 | <value type="int">2</value> | |
261 | <value type="int">3</value> |
|
261 | <value type="int">3</value> | |
262 | <value type="int">4</value> |
|
262 | <value type="int">4</value> | |
263 | <value type="int">5</value> |
|
263 | <value type="int">5</value> | |
264 | <value type="int">6</value> |
|
264 | <value type="int">6</value> | |
265 | <value type="int">7</value> |
|
265 | <value type="int">7</value> | |
266 | <value type="int">8</value> |
|
266 | <value type="int">8</value> | |
267 | <value type="int">9</value> |
|
267 | <value type="int">9</value> | |
268 | <value type="int">10</value> |
|
268 | <value type="int">10</value> | |
269 | <value type="int">11</value> |
|
269 | <value type="int">11</value> | |
270 | <value type="int">12</value> |
|
270 | <value type="int">12</value> | |
271 | <value type="int">13</value> |
|
271 | <value type="int">13</value> | |
272 | <value type="int">14</value> |
|
272 | <value type="int">14</value> | |
273 | </valuelist> |
|
273 | </valuelist> | |
274 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
274 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
275 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
275 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
276 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
276 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> | |
277 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value> |
|
277 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value> | |
278 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value> |
|
278 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value> | |
279 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value> |
|
279 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value> | |
280 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value> |
|
280 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value> | |
281 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
281 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
282 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> |
|
282 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> | |
283 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
283 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
284 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
284 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
285 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
285 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
286 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
286 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
287 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
287 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
288 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
288 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
289 | </valuemap> |
|
289 | </valuemap> | |
290 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value> |
|
290 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value> | |
291 | </valuemap> |
|
291 | </valuemap> | |
292 | </data> |
|
292 | </data> | |
293 | <data> |
|
293 | <data> | |
294 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
294 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
295 | <value type="int">1</value> |
|
295 | <value type="int">1</value> | |
296 | </data> |
|
296 | </data> | |
297 | <data> |
|
297 | <data> | |
298 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
298 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
299 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
299 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
300 | </data> |
|
300 | </data> | |
301 | <data> |
|
301 | <data> | |
302 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
302 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
303 | <value type="int">14</value> |
|
303 | <value type="int">14</value> | |
304 | </data> |
|
304 | </data> | |
305 | </qtcreator> |
|
305 | </qtcreator> |
@@ -1,63 +1,63 | |||||
1 | #ifndef TC_HANDLER_H_INCLUDED |
|
1 | #ifndef TC_HANDLER_H_INCLUDED | |
2 | #define TC_HANDLER_H_INCLUDED |
|
2 | #define TC_HANDLER_H_INCLUDED | |
3 |
|
3 | |||
4 | #include <rtems.h> |
|
4 | #include <rtems.h> | |
5 | #include <leon.h> |
|
5 | #include <leon.h> | |
6 |
|
6 | |||
7 | #include "tc_load_dump_parameters.h" |
|
7 | #include "tc_load_dump_parameters.h" | |
8 | #include "tc_acceptance.h" |
|
8 | #include "tc_acceptance.h" | |
9 | #include "tm_lfr_tc_exe.h" |
|
9 | #include "tm_lfr_tc_exe.h" | |
10 | #include "wf_handler.h" |
|
10 | #include "wf_handler.h" | |
11 |
|
11 | |||
12 | // MODE PARAMETERS |
|
12 | // MODE PARAMETERS | |
13 | extern struct param_sbm1_str param_sbm1; |
|
13 | extern struct param_sbm1_str param_sbm1; | |
14 | extern struct param_sbm2_str param_sbm2; |
|
14 | extern struct param_sbm2_str param_sbm2; | |
15 | extern time_management_regs_t *time_management_regs; |
|
15 | extern time_management_regs_t *time_management_regs; | |
16 | extern waveform_picker_regs_t *waveform_picker_regs; |
|
16 | extern waveform_picker_regs_t *waveform_picker_regs; | |
17 | extern gptimer_regs_t *gptimer_regs; |
|
17 | extern gptimer_regs_t *gptimer_regs; | |
18 | extern rtems_name misc_name[5]; |
|
18 | extern rtems_name misc_name[5]; | |
19 | extern rtems_id Task_id[20]; /* array of task ids */ |
|
19 | extern rtems_id Task_id[20]; /* array of task ids */ | |
20 | extern unsigned char lfrCurrentMode; |
|
20 | extern unsigned char lfrCurrentMode; | |
21 | extern unsigned int maxCount; |
|
21 | extern unsigned int maxCount; | |
22 |
|
22 | |||
23 |
|
23 | |||
24 | //**** |
|
24 | //**** | |
25 | // ISR |
|
25 | // ISR | |
26 | rtems_isr commutation_isr1( rtems_vector_number vector ); |
|
26 | rtems_isr commutation_isr1( rtems_vector_number vector ); | |
27 | rtems_isr commutation_isr2( rtems_vector_number vector ); |
|
27 | rtems_isr commutation_isr2( rtems_vector_number vector ); | |
28 |
|
28 | |||
29 | //*********** |
|
29 | //*********** | |
30 | // RTEMS TASK |
|
30 | // RTEMS TASK | |
31 | rtems_task actn_task( rtems_task_argument unused ); |
|
31 | rtems_task actn_task( rtems_task_argument unused ); | |
32 |
|
32 | |||
33 | //*********** |
|
33 | //*********** | |
34 | // TC ACTIONS |
|
34 | // TC ACTIONS | |
35 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
35 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
36 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
36 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
37 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
37 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
38 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
38 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
39 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
39 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
40 | int action_update_time(ccsdsTelecommandPacket_t *TC); |
|
40 | int action_update_time(ccsdsTelecommandPacket_t *TC); | |
41 |
|
41 | |||
42 | // mode transition |
|
42 | // mode transition | |
43 | int transition_validation(unsigned char requestedMode); |
|
43 | int transition_validation(unsigned char requestedMode); | |
44 | int stop_current_mode(); |
|
44 | int stop_current_mode(); | |
45 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC); |
|
45 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC); | |
46 | int enter_standby_mode(); |
|
46 | int enter_standby_mode(); | |
47 | int enter_normal_mode(); |
|
47 | int enter_normal_mode(); | |
48 | int enter_burst_mode(); |
|
48 | int enter_burst_mode(); | |
49 | int enter_sbm1_mode(); |
|
49 | int enter_sbm1_mode(); | |
50 | int enter_sbm2_mode(); |
|
50 | int enter_sbm2_mode(); | |
51 | int restart_science_tasks(); |
|
51 | int restart_science_tasks(); | |
52 | int suspend_science_tasks(); |
|
52 | int suspend_science_tasks(); | |
53 |
|
53 | |||
54 | // other functions |
|
54 | // other functions | |
55 | void updateLFRCurrentMode(); |
|
55 | void updateLFRCurrentMode(); | |
56 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC); |
|
56 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time); | |
57 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC); |
|
57 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time); | |
58 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id); |
|
58 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id); | |
59 |
|
59 | |||
60 | #endif // TC_HANDLER_H_INCLUDED |
|
60 | #endif // TC_HANDLER_H_INCLUDED | |
61 |
|
61 | |||
62 |
|
62 | |||
63 |
|
63 |
@@ -1,28 +1,28 | |||||
1 | #ifndef TM_LFR_TC_EXE_H_INCLUDED |
|
1 | #ifndef TM_LFR_TC_EXE_H_INCLUDED | |
2 | #define TM_LFR_TC_EXE_H_INCLUDED |
|
2 | #define TM_LFR_TC_EXE_H_INCLUDED | |
3 |
|
3 | |||
4 | #include <rtems.h> |
|
4 | #include <rtems.h> | |
5 | #include <stdio.h> |
|
5 | #include <stdio.h> | |
6 |
|
6 | |||
7 | #include "fsw_params.h" |
|
7 | #include "fsw_params.h" | |
8 | #include "fsw_spacewire.h" |
|
8 | #include "fsw_spacewire.h" | |
9 |
|
9 | |||
10 | extern time_management_regs_t *time_management_regs; |
|
10 | extern time_management_regs_t *time_management_regs; | |
11 | extern Packet_TM_LFR_HK_t housekeeping_packet; |
|
11 | extern Packet_TM_LFR_HK_t housekeeping_packet; | |
12 | extern unsigned short sequenceCounters_TC_EXE[]; |
|
12 | extern unsigned short sequenceCounters_TC_EXE[]; | |
13 |
|
13 | |||
14 | int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
14 | int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); | |
15 | int send_tm_lfr_tc_exe_inconsistent(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
15 | int send_tm_lfr_tc_exe_inconsistent(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, | |
16 | unsigned char byte_position, unsigned char rcv_value); |
|
16 | unsigned char byte_position, unsigned char rcv_value); | |
17 | int send_tm_lfr_tc_exe_not_executable(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
17 | int send_tm_lfr_tc_exe_not_executable(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
18 | int send_tm_lfr_tc_exe_not_implemented(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
18 | int send_tm_lfr_tc_exe_not_implemented(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
19 | int send_tm_lfr_tc_exe_error(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
19 | int send_tm_lfr_tc_exe_error(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | |
20 | int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
20 | int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, | |
21 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV, unsigned char destinationID); |
|
21 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV, unsigned char destinationID); | |
22 |
|
22 | |||
23 | void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id ); |
|
23 | void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id ); | |
24 |
|
24 | |||
25 | #endif // TM_LFR_TC_EXE_H_INCLUDED |
|
25 | #endif // TM_LFR_TC_EXE_H_INCLUDED | |
26 |
|
26 | |||
27 |
|
27 | |||
28 |
|
28 |
@@ -1,768 +1,777 | |||||
1 | /** Functions and tasks related to TeleCommand handling. |
|
1 | /** Functions and tasks related to TeleCommand handling. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * A group of functions to handle TeleCommands:\n |
|
6 | * A group of functions to handle TeleCommands:\n | |
7 | * action launching\n |
|
7 | * action launching\n | |
8 | * TC parsing\n |
|
8 | * TC parsing\n | |
9 | * ... |
|
9 | * ... | |
10 | * |
|
10 | * | |
11 | */ |
|
11 | */ | |
12 |
|
12 | |||
13 | #include "tc_handler.h" |
|
13 | #include "tc_handler.h" | |
14 |
|
14 | |||
15 | //*********** |
|
15 | //*********** | |
16 | // RTEMS TASK |
|
16 | // RTEMS TASK | |
17 |
|
17 | |||
18 | rtems_task actn_task( rtems_task_argument unused ) |
|
18 | rtems_task actn_task( rtems_task_argument unused ) | |
19 | { |
|
19 | { | |
20 | /** This RTEMS task is responsible for launching actions upton the reception of valid TeleCommands. |
|
20 | /** This RTEMS task is responsible for launching actions upton the reception of valid TeleCommands. | |
21 | * |
|
21 | * | |
22 | * @param unused is the starting argument of the RTEMS task |
|
22 | * @param unused is the starting argument of the RTEMS task | |
23 | * |
|
23 | * | |
24 | * The ACTN task waits for data coming from an RTEMS msesage queue. When data arrives, it launches specific actions depending |
|
24 | * The ACTN task waits for data coming from an RTEMS msesage queue. When data arrives, it launches specific actions depending | |
25 | * on the incoming TeleCommand. |
|
25 | * on the incoming TeleCommand. | |
26 | * |
|
26 | * | |
27 | */ |
|
27 | */ | |
28 |
|
28 | |||
29 | int result; |
|
29 | int result; | |
30 | rtems_status_code status; // RTEMS status code |
|
30 | rtems_status_code status; // RTEMS status code | |
31 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task |
|
31 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task | |
32 | size_t size; // size of the incoming TC packet |
|
32 | size_t size; // size of the incoming TC packet | |
33 | unsigned char subtype; // subtype of the current TC packet |
|
33 | unsigned char subtype; // subtype of the current TC packet | |
34 | rtems_id queue_rcv_id; |
|
34 | rtems_id queue_rcv_id; | |
35 | rtems_id queue_snd_id; |
|
35 | rtems_id queue_snd_id; | |
36 |
|
36 | |||
37 | status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_rcv_id ); |
|
37 | status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_rcv_id ); | |
38 | if (status != RTEMS_SUCCESSFUL) |
|
38 | if (status != RTEMS_SUCCESSFUL) | |
39 | { |
|
39 | { | |
40 | PRINTF1("in ACTN *** ERR getting queue_rcv_id %d\n", status) |
|
40 | PRINTF1("in ACTN *** ERR getting queue_rcv_id %d\n", status) | |
41 | } |
|
41 | } | |
42 |
|
42 | |||
43 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_snd_id ); |
|
43 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_snd_id ); | |
44 | if (status != RTEMS_SUCCESSFUL) |
|
44 | if (status != RTEMS_SUCCESSFUL) | |
45 | { |
|
45 | { | |
46 | PRINTF1("in ACTN *** ERR getting queue_snd_id %d\n", status) |
|
46 | PRINTF1("in ACTN *** ERR getting queue_snd_id %d\n", status) | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | result = LFR_SUCCESSFUL; |
|
49 | result = LFR_SUCCESSFUL; | |
50 | subtype = 0; // subtype of the current TC packet |
|
50 | subtype = 0; // subtype of the current TC packet | |
51 |
|
51 | |||
52 | BOOT_PRINTF("in ACTN *** \n") |
|
52 | BOOT_PRINTF("in ACTN *** \n") | |
53 |
|
53 | |||
54 | while(1) |
|
54 | while(1) | |
55 | { |
|
55 | { | |
56 | status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size, |
|
56 | status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size, | |
57 | RTEMS_WAIT, RTEMS_NO_TIMEOUT); |
|
57 | RTEMS_WAIT, RTEMS_NO_TIMEOUT); | |
58 | if (status!=RTEMS_SUCCESSFUL) PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status) |
|
58 | if (status!=RTEMS_SUCCESSFUL) PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status) | |
59 | else |
|
59 | else | |
60 | { |
|
60 | { | |
61 | subtype = TC.serviceSubType; |
|
61 | subtype = TC.serviceSubType; | |
62 | switch(subtype) |
|
62 | switch(subtype) | |
63 | { |
|
63 | { | |
64 | case TC_SUBTYPE_RESET: |
|
64 | case TC_SUBTYPE_RESET: | |
65 | result = action_reset( &TC, queue_snd_id ); |
|
65 | result = action_reset( &TC, queue_snd_id ); | |
66 | close_action( &TC, result, queue_snd_id ); |
|
66 | close_action( &TC, result, queue_snd_id ); | |
67 | break; |
|
67 | break; | |
68 | // |
|
68 | // | |
69 | case TC_SUBTYPE_LOAD_COMM: |
|
69 | case TC_SUBTYPE_LOAD_COMM: | |
70 | result = action_load_common_par( &TC ); |
|
70 | result = action_load_common_par( &TC ); | |
71 | close_action( &TC, result, queue_snd_id ); |
|
71 | close_action( &TC, result, queue_snd_id ); | |
72 | break; |
|
72 | break; | |
73 | // |
|
73 | // | |
74 | case TC_SUBTYPE_LOAD_NORM: |
|
74 | case TC_SUBTYPE_LOAD_NORM: | |
75 | result = action_load_normal_par( &TC, queue_snd_id ); |
|
75 | result = action_load_normal_par( &TC, queue_snd_id ); | |
76 | close_action( &TC, result, queue_snd_id ); |
|
76 | close_action( &TC, result, queue_snd_id ); | |
77 | break; |
|
77 | break; | |
78 | // |
|
78 | // | |
79 | case TC_SUBTYPE_LOAD_BURST: |
|
79 | case TC_SUBTYPE_LOAD_BURST: | |
80 | result = action_load_burst_par( &TC, queue_snd_id ); |
|
80 | result = action_load_burst_par( &TC, queue_snd_id ); | |
81 | close_action( &TC, result, queue_snd_id ); |
|
81 | close_action( &TC, result, queue_snd_id ); | |
82 | break; |
|
82 | break; | |
83 | // |
|
83 | // | |
84 | case TC_SUBTYPE_LOAD_SBM1: |
|
84 | case TC_SUBTYPE_LOAD_SBM1: | |
85 | result = action_load_sbm1_par( &TC, queue_snd_id ); |
|
85 | result = action_load_sbm1_par( &TC, queue_snd_id ); | |
86 | close_action( &TC, result, queue_snd_id ); |
|
86 | close_action( &TC, result, queue_snd_id ); | |
87 | break; |
|
87 | break; | |
88 | // |
|
88 | // | |
89 | case TC_SUBTYPE_LOAD_SBM2: |
|
89 | case TC_SUBTYPE_LOAD_SBM2: | |
90 | result = action_load_sbm2_par( &TC, queue_snd_id ); |
|
90 | result = action_load_sbm2_par( &TC, queue_snd_id ); | |
91 | close_action( &TC, result, queue_snd_id ); |
|
91 | close_action( &TC, result, queue_snd_id ); | |
92 | break; |
|
92 | break; | |
93 | // |
|
93 | // | |
94 | case TC_SUBTYPE_DUMP: |
|
94 | case TC_SUBTYPE_DUMP: | |
95 | result = action_dump_par( queue_snd_id ); |
|
95 | result = action_dump_par( queue_snd_id ); | |
96 | close_action( &TC, result, queue_snd_id ); |
|
96 | close_action( &TC, result, queue_snd_id ); | |
97 | break; |
|
97 | break; | |
98 | // |
|
98 | // | |
99 | case TC_SUBTYPE_ENTER: |
|
99 | case TC_SUBTYPE_ENTER: | |
100 | result = action_enter_mode( &TC, queue_snd_id ); |
|
100 | result = action_enter_mode( &TC, queue_snd_id ); | |
101 | close_action( &TC, result, queue_snd_id ); |
|
101 | close_action( &TC, result, queue_snd_id ); | |
102 | break; |
|
102 | break; | |
103 | // |
|
103 | // | |
104 | case TC_SUBTYPE_UPDT_INFO: |
|
104 | case TC_SUBTYPE_UPDT_INFO: | |
105 | result = action_update_info( &TC, queue_snd_id ); |
|
105 | result = action_update_info( &TC, queue_snd_id ); | |
106 | close_action( &TC, result, queue_snd_id ); |
|
106 | close_action( &TC, result, queue_snd_id ); | |
107 | break; |
|
107 | break; | |
108 | // |
|
108 | // | |
109 | case TC_SUBTYPE_EN_CAL: |
|
109 | case TC_SUBTYPE_EN_CAL: | |
110 | result = action_enable_calibration( &TC, queue_snd_id ); |
|
110 | result = action_enable_calibration( &TC, queue_snd_id ); | |
111 | close_action( &TC, result, queue_snd_id ); |
|
111 | close_action( &TC, result, queue_snd_id ); | |
112 | break; |
|
112 | break; | |
113 | // |
|
113 | // | |
114 | case TC_SUBTYPE_DIS_CAL: |
|
114 | case TC_SUBTYPE_DIS_CAL: | |
115 | result = action_disable_calibration( &TC, queue_snd_id ); |
|
115 | result = action_disable_calibration( &TC, queue_snd_id ); | |
116 | close_action( &TC, result, queue_snd_id ); |
|
116 | close_action( &TC, result, queue_snd_id ); | |
117 | break; |
|
117 | break; | |
118 | // |
|
118 | // | |
119 | case TC_SUBTYPE_UPDT_TIME: |
|
119 | case TC_SUBTYPE_UPDT_TIME: | |
120 | result = action_update_time( &TC ); |
|
120 | result = action_update_time( &TC ); | |
121 | close_action( &TC, result, queue_snd_id ); |
|
121 | close_action( &TC, result, queue_snd_id ); | |
122 | break; |
|
122 | break; | |
123 | // |
|
123 | // | |
124 | default: |
|
124 | default: | |
125 | break; |
|
125 | break; | |
126 | } |
|
126 | } | |
127 | } |
|
127 | } | |
128 | } |
|
128 | } | |
129 | } |
|
129 | } | |
130 |
|
130 | |||
131 | //*********** |
|
131 | //*********** | |
132 | // TC ACTIONS |
|
132 | // TC ACTIONS | |
133 |
|
133 | |||
134 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
134 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
135 | { |
|
135 | { | |
136 | /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received. |
|
136 | /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received. | |
137 | * |
|
137 | * | |
138 | * @param TC points to the TeleCommand packet that is being processed |
|
138 | * @param TC points to the TeleCommand packet that is being processed | |
139 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
139 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
140 | * |
|
140 | * | |
141 | */ |
|
141 | */ | |
142 |
|
142 | |||
143 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); |
|
143 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |
144 | return LFR_DEFAULT; |
|
144 | return LFR_DEFAULT; | |
145 | } |
|
145 | } | |
146 |
|
146 | |||
147 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
147 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
148 | { |
|
148 | { | |
149 | /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received. |
|
149 | /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received. | |
150 | * |
|
150 | * | |
151 | * @param TC points to the TeleCommand packet that is being processed |
|
151 | * @param TC points to the TeleCommand packet that is being processed | |
152 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
152 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
153 | * |
|
153 | * | |
154 | */ |
|
154 | */ | |
155 |
|
155 | |||
156 | rtems_status_code status; |
|
156 | rtems_status_code status; | |
157 | unsigned char requestedMode; |
|
157 | unsigned char requestedMode; | |
158 |
|
158 | |||
159 | requestedMode = TC->dataAndCRC[1]; |
|
159 | requestedMode = TC->dataAndCRC[1]; | |
160 |
|
160 | |||
161 | if ( (requestedMode != LFR_MODE_STANDBY) |
|
161 | if ( (requestedMode != LFR_MODE_STANDBY) | |
162 | && (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST) |
|
162 | && (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST) | |
163 | && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) ) |
|
163 | && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) ) | |
164 | { |
|
164 | { | |
165 | status = RTEMS_UNSATISFIED; |
|
165 | status = RTEMS_UNSATISFIED; | |
166 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode ); |
|
166 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode ); | |
167 | } |
|
167 | } | |
168 | else |
|
168 | else | |
169 | { |
|
169 | { | |
170 | printf("try to enter mode %d\n", requestedMode); |
|
170 | printf("try to enter mode %d\n", requestedMode); | |
171 |
|
171 | |||
172 | #ifdef PRINT_TASK_STATISTICS |
|
172 | #ifdef PRINT_TASK_STATISTICS | |
173 | if (requestedMode != LFR_MODE_STANDBY) |
|
173 | if (requestedMode != LFR_MODE_STANDBY) | |
174 | { |
|
174 | { | |
175 | rtems_cpu_usage_reset(); |
|
175 | rtems_cpu_usage_reset(); | |
176 | maxCount = 0; |
|
176 | maxCount = 0; | |
177 | } |
|
177 | } | |
178 | #endif |
|
178 | #endif | |
179 |
|
179 | |||
180 | status = transition_validation(requestedMode); |
|
180 | status = transition_validation(requestedMode); | |
181 |
|
181 | |||
182 | if ( status == LFR_SUCCESSFUL ) { |
|
182 | if ( status == LFR_SUCCESSFUL ) { | |
183 | if ( lfrCurrentMode != LFR_MODE_STANDBY) |
|
183 | if ( lfrCurrentMode != LFR_MODE_STANDBY) | |
184 | { |
|
184 | { | |
185 | status = stop_current_mode(); |
|
185 | status = stop_current_mode(); | |
186 | } |
|
186 | } | |
187 | if (status != RTEMS_SUCCESSFUL) |
|
187 | if (status != RTEMS_SUCCESSFUL) | |
188 | { |
|
188 | { | |
189 | PRINTF("ERR *** in action_enter *** stop_current_mode\n") |
|
189 | PRINTF("ERR *** in action_enter *** stop_current_mode\n") | |
190 | } |
|
190 | } | |
191 | status = enter_mode(requestedMode, TC); |
|
191 | status = enter_mode(requestedMode, TC); | |
192 | } |
|
192 | } | |
193 | else |
|
193 | else | |
194 | { |
|
194 | { | |
195 | PRINTF("ERR *** in action_enter *** transition rejected\n") |
|
195 | PRINTF("ERR *** in action_enter *** transition rejected\n") | |
196 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
196 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
197 | } |
|
197 | } | |
198 | } |
|
198 | } | |
199 |
|
199 | |||
200 | return status; |
|
200 | return status; | |
201 | } |
|
201 | } | |
202 |
|
202 | |||
203 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
203 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
204 | { |
|
204 | { | |
205 | /** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received. |
|
205 | /** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received. | |
206 | * |
|
206 | * | |
207 | * @param TC points to the TeleCommand packet that is being processed |
|
207 | * @param TC points to the TeleCommand packet that is being processed | |
208 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
208 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
209 | * |
|
209 | * | |
210 | * @return LFR directive status code: |
|
210 | * @return LFR directive status code: | |
211 | * - LFR_DEFAULT |
|
211 | * - LFR_DEFAULT | |
212 | * - LFR_SUCCESSFUL |
|
212 | * - LFR_SUCCESSFUL | |
213 | * |
|
213 | * | |
214 | */ |
|
214 | */ | |
215 |
|
215 | |||
216 | unsigned int val; |
|
216 | unsigned int val; | |
217 | int result; |
|
217 | int result; | |
218 |
|
218 | |||
219 | result = LFR_DEFAULT; |
|
219 | result = LFR_DEFAULT; | |
220 |
|
220 | |||
221 | val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256 |
|
221 | val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256 | |
222 | + housekeeping_packet.hk_lfr_update_info_tc_cnt[1]; |
|
222 | + housekeeping_packet.hk_lfr_update_info_tc_cnt[1]; | |
223 | val++; |
|
223 | val++; | |
224 | housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8); |
|
224 | housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8); | |
225 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); |
|
225 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); | |
226 |
|
226 | |||
227 | return result; |
|
227 | return result; | |
228 | } |
|
228 | } | |
229 |
|
229 | |||
230 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
230 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
231 | { |
|
231 | { | |
232 | /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received. |
|
232 | /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received. | |
233 | * |
|
233 | * | |
234 | * @param TC points to the TeleCommand packet that is being processed |
|
234 | * @param TC points to the TeleCommand packet that is being processed | |
235 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
235 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
236 | * |
|
236 | * | |
237 | */ |
|
237 | */ | |
238 |
|
238 | |||
239 | int result; |
|
239 | int result; | |
240 | unsigned char lfrMode; |
|
240 | unsigned char lfrMode; | |
241 |
|
241 | |||
242 | result = LFR_DEFAULT; |
|
242 | result = LFR_DEFAULT; | |
243 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
243 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
244 |
|
244 | |||
245 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { |
|
245 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { | |
246 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
246 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
247 | result = LFR_DEFAULT; |
|
247 | result = LFR_DEFAULT; | |
248 | } |
|
248 | } | |
249 | else { |
|
249 | else { | |
250 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); |
|
250 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |
251 | result = LFR_DEFAULT; |
|
251 | result = LFR_DEFAULT; | |
252 | } |
|
252 | } | |
253 | return result; |
|
253 | return result; | |
254 | } |
|
254 | } | |
255 |
|
255 | |||
256 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
256 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
257 | { |
|
257 | { | |
258 | /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received. |
|
258 | /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received. | |
259 | * |
|
259 | * | |
260 | * @param TC points to the TeleCommand packet that is being processed |
|
260 | * @param TC points to the TeleCommand packet that is being processed | |
261 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
261 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
262 | * |
|
262 | * | |
263 | */ |
|
263 | */ | |
264 |
|
264 | |||
265 | int result; |
|
265 | int result; | |
266 | unsigned char lfrMode; |
|
266 | unsigned char lfrMode; | |
267 |
|
267 | |||
268 | result = LFR_DEFAULT; |
|
268 | result = LFR_DEFAULT; | |
269 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
269 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
270 |
|
270 | |||
271 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { |
|
271 | if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) { | |
272 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
272 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
273 | result = LFR_DEFAULT; |
|
273 | result = LFR_DEFAULT; | |
274 | } |
|
274 | } | |
275 | else { |
|
275 | else { | |
276 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); |
|
276 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id ); | |
277 | result = LFR_DEFAULT; |
|
277 | result = LFR_DEFAULT; | |
278 | } |
|
278 | } | |
279 | return result; |
|
279 | return result; | |
280 | } |
|
280 | } | |
281 |
|
281 | |||
282 | int action_update_time(ccsdsTelecommandPacket_t *TC) |
|
282 | int action_update_time(ccsdsTelecommandPacket_t *TC) | |
283 | { |
|
283 | { | |
284 | /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received. |
|
284 | /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received. | |
285 | * |
|
285 | * | |
286 | * @param TC points to the TeleCommand packet that is being processed |
|
286 | * @param TC points to the TeleCommand packet that is being processed | |
287 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
287 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
288 | * |
|
288 | * | |
289 | * @return LFR_SUCCESSFUL |
|
289 | * @return LFR_SUCCESSFUL | |
290 | * |
|
290 | * | |
291 | */ |
|
291 | */ | |
292 |
|
292 | |||
293 | unsigned int val; |
|
293 | unsigned int val; | |
294 |
|
294 | |||
295 | time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24) |
|
295 | time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24) | |
296 | + (TC->dataAndCRC[1] << 16) |
|
296 | + (TC->dataAndCRC[1] << 16) | |
297 | + (TC->dataAndCRC[2] << 8) |
|
297 | + (TC->dataAndCRC[2] << 8) | |
298 | + TC->dataAndCRC[3]; |
|
298 | + TC->dataAndCRC[3]; | |
299 | val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256 |
|
299 | val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256 | |
300 | + housekeeping_packet.hk_lfr_update_time_tc_cnt[1]; |
|
300 | + housekeeping_packet.hk_lfr_update_time_tc_cnt[1]; | |
301 | val++; |
|
301 | val++; | |
302 | housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8); |
|
302 | housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8); | |
303 | housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val); |
|
303 | housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val); | |
304 | time_management_regs->ctrl = time_management_regs->ctrl | 1; |
|
304 | time_management_regs->ctrl = time_management_regs->ctrl | 1; | |
305 |
|
305 | |||
306 | return LFR_SUCCESSFUL; |
|
306 | return LFR_SUCCESSFUL; | |
307 | } |
|
307 | } | |
308 |
|
308 | |||
309 | //******************* |
|
309 | //******************* | |
310 | // ENTERING THE MODES |
|
310 | // ENTERING THE MODES | |
311 |
|
311 | |||
312 | int transition_validation(unsigned char requestedMode) |
|
312 | int transition_validation(unsigned char requestedMode) | |
313 | { |
|
313 | { | |
314 | int status; |
|
314 | int status; | |
315 |
|
315 | |||
316 | switch (requestedMode) |
|
316 | switch (requestedMode) | |
317 | { |
|
317 | { | |
318 | case LFR_MODE_STANDBY: |
|
318 | case LFR_MODE_STANDBY: | |
319 | if ( lfrCurrentMode == LFR_MODE_STANDBY ) { |
|
319 | if ( lfrCurrentMode == LFR_MODE_STANDBY ) { | |
320 | status = LFR_DEFAULT; |
|
320 | status = LFR_DEFAULT; | |
321 | } |
|
321 | } | |
322 | else |
|
322 | else | |
323 | { |
|
323 | { | |
324 | status = LFR_SUCCESSFUL; |
|
324 | status = LFR_SUCCESSFUL; | |
325 | } |
|
325 | } | |
326 | break; |
|
326 | break; | |
327 | case LFR_MODE_NORMAL: |
|
327 | case LFR_MODE_NORMAL: | |
328 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { |
|
328 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { | |
329 | status = LFR_DEFAULT; |
|
329 | status = LFR_DEFAULT; | |
330 | } |
|
330 | } | |
331 | else { |
|
331 | else { | |
332 | status = LFR_SUCCESSFUL; |
|
332 | status = LFR_SUCCESSFUL; | |
333 | } |
|
333 | } | |
334 | break; |
|
334 | break; | |
335 | case LFR_MODE_BURST: |
|
335 | case LFR_MODE_BURST: | |
336 | if ( lfrCurrentMode == LFR_MODE_BURST ) { |
|
336 | if ( lfrCurrentMode == LFR_MODE_BURST ) { | |
337 | status = LFR_DEFAULT; |
|
337 | status = LFR_DEFAULT; | |
338 | } |
|
338 | } | |
339 | else { |
|
339 | else { | |
340 | status = LFR_SUCCESSFUL; |
|
340 | status = LFR_SUCCESSFUL; | |
341 | } |
|
341 | } | |
342 | break; |
|
342 | break; | |
343 | case LFR_MODE_SBM1: |
|
343 | case LFR_MODE_SBM1: | |
344 | if ( lfrCurrentMode == LFR_MODE_SBM1 ) { |
|
344 | if ( lfrCurrentMode == LFR_MODE_SBM1 ) { | |
345 | status = LFR_DEFAULT; |
|
345 | status = LFR_DEFAULT; | |
346 | } |
|
346 | } | |
347 | else { |
|
347 | else { | |
348 | status = LFR_SUCCESSFUL; |
|
348 | status = LFR_SUCCESSFUL; | |
349 | } |
|
349 | } | |
350 | break; |
|
350 | break; | |
351 | case LFR_MODE_SBM2: |
|
351 | case LFR_MODE_SBM2: | |
352 | if ( lfrCurrentMode == LFR_MODE_SBM2 ) { |
|
352 | if ( lfrCurrentMode == LFR_MODE_SBM2 ) { | |
353 | status = LFR_DEFAULT; |
|
353 | status = LFR_DEFAULT; | |
354 | } |
|
354 | } | |
355 | else { |
|
355 | else { | |
356 | status = LFR_SUCCESSFUL; |
|
356 | status = LFR_SUCCESSFUL; | |
357 | } |
|
357 | } | |
358 | break; |
|
358 | break; | |
359 | default: |
|
359 | default: | |
360 | status = LFR_DEFAULT; |
|
360 | status = LFR_DEFAULT; | |
361 | break; |
|
361 | break; | |
362 | } |
|
362 | } | |
363 |
|
363 | |||
364 | return status; |
|
364 | return status; | |
365 | } |
|
365 | } | |
366 |
|
366 | |||
367 | int stop_current_mode() |
|
367 | int stop_current_mode() | |
368 | { |
|
368 | { | |
369 | /** This function stops the current mode by masking interrupt lines and suspending science tasks. |
|
369 | /** This function stops the current mode by masking interrupt lines and suspending science tasks. | |
370 | * |
|
370 | * | |
371 | * @return RTEMS directive status codes: |
|
371 | * @return RTEMS directive status codes: | |
372 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
372 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
373 | * - RTEMS_INVALID_ID - task id invalid |
|
373 | * - RTEMS_INVALID_ID - task id invalid | |
374 | * - RTEMS_ALREADY_SUSPENDED - task already suspended |
|
374 | * - RTEMS_ALREADY_SUSPENDED - task already suspended | |
375 | * |
|
375 | * | |
376 | */ |
|
376 | */ | |
377 |
|
377 | |||
378 | rtems_status_code status; |
|
378 | rtems_status_code status; | |
379 |
|
379 | |||
380 | status = RTEMS_SUCCESSFUL; |
|
380 | status = RTEMS_SUCCESSFUL; | |
381 |
|
381 | |||
382 | #ifdef GSA |
|
382 | #ifdef GSA | |
383 | LEON_Mask_interrupt( IRQ_WF ); // mask waveform interrupt (coming from the timer VHDL IP) |
|
383 | LEON_Mask_interrupt( IRQ_WF ); // mask waveform interrupt (coming from the timer VHDL IP) | |
384 | LEON_Clear_interrupt( IRQ_WF ); // clear waveform interrupt (coming from the timer VHDL IP) |
|
384 | LEON_Clear_interrupt( IRQ_WF ); // clear waveform interrupt (coming from the timer VHDL IP) | |
385 | timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); |
|
385 | timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); | |
386 | #else |
|
386 | #else | |
387 | // mask interruptions |
|
387 | // mask interruptions | |
388 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt |
|
388 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt | |
389 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt |
|
389 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt | |
390 | // reset registers |
|
390 | // reset registers | |
391 | reset_wfp_burst_enable(); // reset burst and enable bits |
|
391 | reset_wfp_burst_enable(); // reset burst and enable bits | |
392 | reset_wfp_status(); // reset all the status bits |
|
392 | reset_wfp_status(); // reset all the status bits | |
393 | // creal interruptions |
|
393 | // creal interruptions | |
394 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt |
|
394 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt | |
395 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectarl matrix interrupt |
|
395 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectarl matrix interrupt | |
396 | #endif |
|
396 | #endif | |
397 | //********************** |
|
397 | //********************** | |
398 | // suspend several tasks |
|
398 | // suspend several tasks | |
399 | if (lfrCurrentMode != LFR_MODE_STANDBY) { |
|
399 | if (lfrCurrentMode != LFR_MODE_STANDBY) { | |
400 | status = suspend_science_tasks(); |
|
400 | status = suspend_science_tasks(); | |
401 | } |
|
401 | } | |
402 |
|
402 | |||
403 | if (status != RTEMS_SUCCESSFUL) |
|
403 | if (status != RTEMS_SUCCESSFUL) | |
404 | { |
|
404 | { | |
405 | PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status) |
|
405 | PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status) | |
406 | } |
|
406 | } | |
407 |
|
407 | |||
408 | return status; |
|
408 | return status; | |
409 | } |
|
409 | } | |
410 |
|
410 | |||
411 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC ) |
|
411 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC ) | |
412 | { |
|
412 | { | |
413 | rtems_status_code status; |
|
413 | rtems_status_code status; | |
414 |
|
414 | |||
415 | status = RTEMS_UNSATISFIED; |
|
415 | status = RTEMS_UNSATISFIED; | |
416 |
|
416 | |||
417 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d); |
|
417 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d); | |
418 | updateLFRCurrentMode(); |
|
418 | updateLFRCurrentMode(); | |
419 |
|
419 | |||
420 | switch(mode){ |
|
420 | switch(mode){ | |
421 | case LFR_MODE_STANDBY: |
|
421 | case LFR_MODE_STANDBY: | |
422 | status = enter_standby_mode( ); |
|
422 | status = enter_standby_mode( ); | |
423 | break; |
|
423 | break; | |
424 | case LFR_MODE_NORMAL: |
|
424 | case LFR_MODE_NORMAL: | |
425 | status = enter_normal_mode( ); |
|
425 | status = enter_normal_mode( ); | |
426 | break; |
|
426 | break; | |
427 | case LFR_MODE_BURST: |
|
427 | case LFR_MODE_BURST: | |
428 | status = enter_burst_mode( ); |
|
428 | status = enter_burst_mode( ); | |
429 | break; |
|
429 | break; | |
430 | case LFR_MODE_SBM1: |
|
430 | case LFR_MODE_SBM1: | |
431 | status = enter_sbm1_mode( ); |
|
431 | status = enter_sbm1_mode( ); | |
432 | break; |
|
432 | break; | |
433 | case LFR_MODE_SBM2: |
|
433 | case LFR_MODE_SBM2: | |
434 | status = enter_sbm2_mode( ); |
|
434 | status = enter_sbm2_mode( ); | |
435 | break; |
|
435 | break; | |
436 | default: |
|
436 | default: | |
437 | status = RTEMS_UNSATISFIED; |
|
437 | status = RTEMS_UNSATISFIED; | |
438 | } |
|
438 | } | |
439 |
|
439 | |||
440 | if (status != RTEMS_SUCCESSFUL) |
|
440 | if (status != RTEMS_SUCCESSFUL) | |
441 | { |
|
441 | { | |
442 | PRINTF("in enter_mode *** ERR\n") |
|
442 | PRINTF("in enter_mode *** ERR\n") | |
443 | status = RTEMS_UNSATISFIED; |
|
443 | status = RTEMS_UNSATISFIED; | |
444 | } |
|
444 | } | |
445 |
|
445 | |||
446 | return status; |
|
446 | return status; | |
447 | } |
|
447 | } | |
448 |
|
448 | |||
449 | int enter_standby_mode() |
|
449 | int enter_standby_mode() | |
450 | { |
|
450 | { | |
451 | PRINTF1("maxCount = %d\n", maxCount) |
|
451 | PRINTF1("maxCount = %d\n", maxCount) | |
452 |
|
452 | |||
453 | #ifdef PRINT_TASK_STATISTICS |
|
453 | #ifdef PRINT_TASK_STATISTICS | |
454 | rtems_cpu_usage_report(); |
|
454 | rtems_cpu_usage_report(); | |
455 | #endif |
|
455 | #endif | |
456 |
|
456 | |||
457 | #ifdef PRINT_STACK_REPORT |
|
457 | #ifdef PRINT_STACK_REPORT | |
458 | rtems_stack_checker_report_usage(); |
|
458 | rtems_stack_checker_report_usage(); | |
459 | #endif |
|
459 | #endif | |
460 |
|
460 | |||
461 | return LFR_SUCCESSFUL; |
|
461 | return LFR_SUCCESSFUL; | |
462 | } |
|
462 | } | |
463 |
|
463 | |||
464 | int enter_normal_mode() |
|
464 | int enter_normal_mode() | |
465 | { |
|
465 | { | |
466 | rtems_status_code status; |
|
466 | rtems_status_code status; | |
467 |
|
467 | |||
468 | status = restart_science_tasks(); |
|
468 | status = restart_science_tasks(); | |
469 |
|
469 | |||
470 | #ifdef GSA |
|
470 | #ifdef GSA | |
471 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); |
|
471 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); | |
472 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
472 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
473 | LEON_Clear_interrupt( IRQ_WF ); |
|
473 | LEON_Clear_interrupt( IRQ_WF ); | |
474 | LEON_Unmask_interrupt( IRQ_WF ); |
|
474 | LEON_Unmask_interrupt( IRQ_WF ); | |
475 | // |
|
475 | // | |
476 | set_local_nb_interrupt_f0_MAX(); |
|
476 | set_local_nb_interrupt_f0_MAX(); | |
477 | LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board |
|
477 | LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board | |
478 | LEON_Unmask_interrupt( IRQ_SM ); |
|
478 | LEON_Unmask_interrupt( IRQ_SM ); | |
479 | #else |
|
479 | #else | |
480 | //**************** |
|
480 | //**************** | |
481 | // waveform picker |
|
481 | // waveform picker | |
482 | reset_waveform_picker_regs(); |
|
482 | reset_waveform_picker_regs(); | |
483 | set_wfp_burst_enable_register(LFR_MODE_NORMAL); |
|
483 | set_wfp_burst_enable_register(LFR_MODE_NORMAL); | |
484 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
484 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
485 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
485 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
486 | //**************** |
|
486 | //**************** | |
487 | // spectral matrix |
|
487 | // spectral matrix | |
488 | #endif |
|
488 | #endif | |
489 |
|
489 | |||
490 | return status; |
|
490 | return status; | |
491 | } |
|
491 | } | |
492 |
|
492 | |||
493 | int enter_burst_mode() |
|
493 | int enter_burst_mode() | |
494 | { |
|
494 | { | |
495 | rtems_status_code status; |
|
495 | rtems_status_code status; | |
496 |
|
496 | |||
497 | status = restart_science_tasks(); |
|
497 | status = restart_science_tasks(); | |
498 |
|
498 | |||
499 | #ifdef GSA |
|
499 | #ifdef GSA | |
500 | LEON_Unmask_interrupt( IRQ_SM ); |
|
500 | LEON_Unmask_interrupt( IRQ_SM ); | |
501 | #else |
|
501 | #else | |
502 | reset_waveform_picker_regs(); |
|
502 | reset_waveform_picker_regs(); | |
503 | set_wfp_burst_enable_register(LFR_MODE_BURST); |
|
503 | set_wfp_burst_enable_register(LFR_MODE_BURST); | |
504 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
504 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
505 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
505 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
506 | #endif |
|
506 | #endif | |
507 |
|
507 | |||
508 | return status; |
|
508 | return status; | |
509 | } |
|
509 | } | |
510 |
|
510 | |||
511 | int enter_sbm1_mode() |
|
511 | int enter_sbm1_mode() | |
512 | { |
|
512 | { | |
513 | rtems_status_code status; |
|
513 | rtems_status_code status; | |
514 |
|
514 | |||
515 | status = restart_science_tasks(); |
|
515 | status = restart_science_tasks(); | |
516 |
|
516 | |||
517 | set_local_sbm1_nb_cwf_max(); |
|
517 | set_local_sbm1_nb_cwf_max(); | |
518 |
|
518 | |||
519 | reset_local_sbm1_nb_cwf_sent(); |
|
519 | reset_local_sbm1_nb_cwf_sent(); | |
520 |
|
520 | |||
521 | #ifdef GSA |
|
521 | #ifdef GSA | |
522 | LEON_Unmask_interrupt( IRQ_SM ); |
|
522 | LEON_Unmask_interrupt( IRQ_SM ); | |
523 | #else |
|
523 | #else | |
524 | reset_waveform_picker_regs(); |
|
524 | reset_waveform_picker_regs(); | |
525 | set_wfp_burst_enable_register(LFR_MODE_SBM1); |
|
525 | set_wfp_burst_enable_register(LFR_MODE_SBM1); | |
526 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
526 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
527 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
527 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
528 | // SM simulation |
|
528 | // SM simulation | |
529 | // timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
529 | // timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
530 | // LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board |
|
530 | // LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board | |
531 | // LEON_Unmask_interrupt( IRQ_SM ); |
|
531 | // LEON_Unmask_interrupt( IRQ_SM ); | |
532 | #endif |
|
532 | #endif | |
533 |
|
533 | |||
534 | return status; |
|
534 | return status; | |
535 | } |
|
535 | } | |
536 |
|
536 | |||
537 | int enter_sbm2_mode() |
|
537 | int enter_sbm2_mode() | |
538 | { |
|
538 | { | |
539 | rtems_status_code status; |
|
539 | rtems_status_code status; | |
540 |
|
540 | |||
541 | status = restart_science_tasks(); |
|
541 | status = restart_science_tasks(); | |
542 |
|
542 | |||
543 | set_local_sbm2_nb_cwf_max(); |
|
543 | set_local_sbm2_nb_cwf_max(); | |
544 |
|
544 | |||
545 | reset_local_sbm2_nb_cwf_sent(); |
|
545 | reset_local_sbm2_nb_cwf_sent(); | |
546 |
|
546 | |||
547 | #ifdef GSA |
|
547 | #ifdef GSA | |
548 | LEON_Unmask_interrupt( IRQ_SM ); |
|
548 | LEON_Unmask_interrupt( IRQ_SM ); | |
549 | #else |
|
549 | #else | |
550 | reset_waveform_picker_regs(); |
|
550 | reset_waveform_picker_regs(); | |
551 | set_wfp_burst_enable_register(LFR_MODE_SBM2); |
|
551 | set_wfp_burst_enable_register(LFR_MODE_SBM2); | |
552 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
552 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
553 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
553 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
554 | #endif |
|
554 | #endif | |
555 |
|
555 | |||
556 | return status; |
|
556 | return status; | |
557 | } |
|
557 | } | |
558 |
|
558 | |||
559 | int restart_science_tasks() |
|
559 | int restart_science_tasks() | |
560 | { |
|
560 | { | |
561 | rtems_status_code status[6]; |
|
561 | rtems_status_code status[6]; | |
562 | rtems_status_code ret; |
|
562 | rtems_status_code ret; | |
563 |
|
563 | |||
564 | ret = RTEMS_SUCCESSFUL; |
|
564 | ret = RTEMS_SUCCESSFUL; | |
565 |
|
565 | |||
566 | status[0] = rtems_task_restart( Task_id[TASKID_AVF0], 1 ); |
|
566 | status[0] = rtems_task_restart( Task_id[TASKID_AVF0], 1 ); | |
567 | if (status[0] != RTEMS_SUCCESSFUL) |
|
567 | if (status[0] != RTEMS_SUCCESSFUL) | |
568 | { |
|
568 | { | |
569 | PRINTF1("in restart_science_task *** 0 ERR %d\n", status[0]) |
|
569 | PRINTF1("in restart_science_task *** 0 ERR %d\n", status[0]) | |
570 | } |
|
570 | } | |
571 |
|
571 | |||
572 | status[1] = rtems_task_restart( Task_id[TASKID_BPF0],1 ); |
|
572 | status[1] = rtems_task_restart( Task_id[TASKID_BPF0],1 ); | |
573 | if (status[1] != RTEMS_SUCCESSFUL) |
|
573 | if (status[1] != RTEMS_SUCCESSFUL) | |
574 | { |
|
574 | { | |
575 | PRINTF1("in restart_science_task *** 1 ERR %d\n", status[1]) |
|
575 | PRINTF1("in restart_science_task *** 1 ERR %d\n", status[1]) | |
576 | } |
|
576 | } | |
577 |
|
577 | |||
578 | status[2] = rtems_task_restart( Task_id[TASKID_WFRM],1 ); |
|
578 | status[2] = rtems_task_restart( Task_id[TASKID_WFRM],1 ); | |
579 | if (status[2] != RTEMS_SUCCESSFUL) |
|
579 | if (status[2] != RTEMS_SUCCESSFUL) | |
580 | { |
|
580 | { | |
581 | PRINTF1("in restart_science_task *** 2 ERR %d\n", status[2]) |
|
581 | PRINTF1("in restart_science_task *** 2 ERR %d\n", status[2]) | |
582 | } |
|
582 | } | |
583 |
|
583 | |||
584 | status[3] = rtems_task_restart( Task_id[TASKID_CWF3],1 ); |
|
584 | status[3] = rtems_task_restart( Task_id[TASKID_CWF3],1 ); | |
585 | if (status[3] != RTEMS_SUCCESSFUL) |
|
585 | if (status[3] != RTEMS_SUCCESSFUL) | |
586 | { |
|
586 | { | |
587 | PRINTF1("in restart_science_task *** 3 ERR %d\n", status[3]) |
|
587 | PRINTF1("in restart_science_task *** 3 ERR %d\n", status[3]) | |
588 | } |
|
588 | } | |
589 |
|
589 | |||
590 | status[4] = rtems_task_restart( Task_id[TASKID_CWF2],1 ); |
|
590 | status[4] = rtems_task_restart( Task_id[TASKID_CWF2],1 ); | |
591 | if (status[4] != RTEMS_SUCCESSFUL) |
|
591 | if (status[4] != RTEMS_SUCCESSFUL) | |
592 | { |
|
592 | { | |
593 | PRINTF1("in restart_science_task *** 4 ERR %d\n", status[4]) |
|
593 | PRINTF1("in restart_science_task *** 4 ERR %d\n", status[4]) | |
594 | } |
|
594 | } | |
595 |
|
595 | |||
596 | status[5] = rtems_task_restart( Task_id[TASKID_CWF1],1 ); |
|
596 | status[5] = rtems_task_restart( Task_id[TASKID_CWF1],1 ); | |
597 | if (status[5] != RTEMS_SUCCESSFUL) |
|
597 | if (status[5] != RTEMS_SUCCESSFUL) | |
598 | { |
|
598 | { | |
599 | PRINTF1("in restart_science_task *** 5 ERR %d\n", status[5]) |
|
599 | PRINTF1("in restart_science_task *** 5 ERR %d\n", status[5]) | |
600 | } |
|
600 | } | |
601 |
|
601 | |||
602 | if ( (status[0] != RTEMS_SUCCESSFUL) || (status[1] != RTEMS_SUCCESSFUL) || (status[2] != RTEMS_SUCCESSFUL) || |
|
602 | if ( (status[0] != RTEMS_SUCCESSFUL) || (status[1] != RTEMS_SUCCESSFUL) || (status[2] != RTEMS_SUCCESSFUL) || | |
603 | (status[3] != RTEMS_SUCCESSFUL) || (status[4] != RTEMS_SUCCESSFUL) || (status[5] != RTEMS_SUCCESSFUL) ) |
|
603 | (status[3] != RTEMS_SUCCESSFUL) || (status[4] != RTEMS_SUCCESSFUL) || (status[5] != RTEMS_SUCCESSFUL) ) | |
604 | { |
|
604 | { | |
605 | ret = RTEMS_UNSATISFIED; |
|
605 | ret = RTEMS_UNSATISFIED; | |
606 | } |
|
606 | } | |
607 |
|
607 | |||
608 | return ret; |
|
608 | return ret; | |
609 | } |
|
609 | } | |
610 |
|
610 | |||
611 | int suspend_science_tasks() |
|
611 | int suspend_science_tasks() | |
612 | { |
|
612 | { | |
613 | /** This function suspends the science tasks. |
|
613 | /** This function suspends the science tasks. | |
614 | * |
|
614 | * | |
615 | * @return RTEMS directive status codes: |
|
615 | * @return RTEMS directive status codes: | |
616 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
616 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
617 | * - RTEMS_INVALID_ID - task id invalid |
|
617 | * - RTEMS_INVALID_ID - task id invalid | |
618 | * - RTEMS_ALREADY_SUSPENDED - task already suspended |
|
618 | * - RTEMS_ALREADY_SUSPENDED - task already suspended | |
619 | * |
|
619 | * | |
620 | */ |
|
620 | */ | |
621 |
|
621 | |||
622 | rtems_status_code status; |
|
622 | rtems_status_code status; | |
623 |
|
623 | |||
624 | status = rtems_task_suspend( Task_id[TASKID_AVF0] ); |
|
624 | status = rtems_task_suspend( Task_id[TASKID_AVF0] ); | |
625 | if (status != RTEMS_SUCCESSFUL) |
|
625 | if (status != RTEMS_SUCCESSFUL) | |
626 | { |
|
626 | { | |
627 | PRINTF1("in suspend_science_task *** AVF0 ERR %d\n", status) |
|
627 | PRINTF1("in suspend_science_task *** AVF0 ERR %d\n", status) | |
628 | } |
|
628 | } | |
629 |
|
629 | |||
630 | if (status == RTEMS_SUCCESSFUL) // suspend BPF0 |
|
630 | if (status == RTEMS_SUCCESSFUL) // suspend BPF0 | |
631 | { |
|
631 | { | |
632 | status = rtems_task_suspend( Task_id[TASKID_BPF0] ); |
|
632 | status = rtems_task_suspend( Task_id[TASKID_BPF0] ); | |
633 | if (status != RTEMS_SUCCESSFUL) |
|
633 | if (status != RTEMS_SUCCESSFUL) | |
634 | { |
|
634 | { | |
635 | PRINTF1("in suspend_science_task *** BPF0 ERR %d\n", status) |
|
635 | PRINTF1("in suspend_science_task *** BPF0 ERR %d\n", status) | |
636 | } |
|
636 | } | |
637 | } |
|
637 | } | |
638 |
|
638 | |||
639 | if (status == RTEMS_SUCCESSFUL) // suspend WFRM |
|
639 | if (status == RTEMS_SUCCESSFUL) // suspend WFRM | |
640 | { |
|
640 | { | |
641 | status = rtems_task_suspend( Task_id[TASKID_WFRM] ); |
|
641 | status = rtems_task_suspend( Task_id[TASKID_WFRM] ); | |
642 | if (status != RTEMS_SUCCESSFUL) |
|
642 | if (status != RTEMS_SUCCESSFUL) | |
643 | { |
|
643 | { | |
644 | PRINTF1("in suspend_science_task *** WFRM ERR %d\n", status) |
|
644 | PRINTF1("in suspend_science_task *** WFRM ERR %d\n", status) | |
645 | } |
|
645 | } | |
646 | } |
|
646 | } | |
647 |
|
647 | |||
648 | if (status == RTEMS_SUCCESSFUL) // suspend CWF3 |
|
648 | if (status == RTEMS_SUCCESSFUL) // suspend CWF3 | |
649 | { |
|
649 | { | |
650 | status = rtems_task_suspend( Task_id[TASKID_CWF3] ); |
|
650 | status = rtems_task_suspend( Task_id[TASKID_CWF3] ); | |
651 | if (status != RTEMS_SUCCESSFUL) |
|
651 | if (status != RTEMS_SUCCESSFUL) | |
652 | { |
|
652 | { | |
653 | PRINTF1("in suspend_science_task *** CWF3 ERR %d\n", status) |
|
653 | PRINTF1("in suspend_science_task *** CWF3 ERR %d\n", status) | |
654 | } |
|
654 | } | |
655 | } |
|
655 | } | |
656 |
|
656 | |||
657 | if (status == RTEMS_SUCCESSFUL) // suspend CWF2 |
|
657 | if (status == RTEMS_SUCCESSFUL) // suspend CWF2 | |
658 | { |
|
658 | { | |
659 | status = rtems_task_suspend( Task_id[TASKID_CWF2] ); |
|
659 | status = rtems_task_suspend( Task_id[TASKID_CWF2] ); | |
660 | if (status != RTEMS_SUCCESSFUL) |
|
660 | if (status != RTEMS_SUCCESSFUL) | |
661 | { |
|
661 | { | |
662 | PRINTF1("in suspend_science_task *** CWF2 ERR %d\n", status) |
|
662 | PRINTF1("in suspend_science_task *** CWF2 ERR %d\n", status) | |
663 | } |
|
663 | } | |
664 | } |
|
664 | } | |
665 |
|
665 | |||
666 | if (status == RTEMS_SUCCESSFUL) // suspend CWF1 |
|
666 | if (status == RTEMS_SUCCESSFUL) // suspend CWF1 | |
667 | { |
|
667 | { | |
668 | status = rtems_task_suspend( Task_id[TASKID_CWF1] ); |
|
668 | status = rtems_task_suspend( Task_id[TASKID_CWF1] ); | |
669 | if (status != RTEMS_SUCCESSFUL) |
|
669 | if (status != RTEMS_SUCCESSFUL) | |
670 | { |
|
670 | { | |
671 | PRINTF1("in suspend_science_task *** CWF1 ERR %d\n", status) |
|
671 | PRINTF1("in suspend_science_task *** CWF1 ERR %d\n", status) | |
672 | } |
|
672 | } | |
673 | } |
|
673 | } | |
674 |
|
674 | |||
675 | return status; |
|
675 | return status; | |
676 | } |
|
676 | } | |
677 |
|
677 | |||
678 | //**************** |
|
678 | //**************** | |
679 | // CLOSING ACTIONS |
|
679 | // CLOSING ACTIONS | |
680 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC) |
|
680 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time) | |
681 | { |
|
681 | { | |
682 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; |
|
682 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; | |
683 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; |
|
683 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; | |
684 | housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00; |
|
684 | housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00; | |
685 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; |
|
685 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; | |
686 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; |
|
686 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; | |
687 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; |
|
687 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; | |
688 |
housekeeping_packet.hk_lfr_last_exe_tc_time[0] = |
|
688 | housekeeping_packet.hk_lfr_last_exe_tc_time[0] = time[0]; | |
689 |
housekeeping_packet.hk_lfr_last_exe_tc_time[1] = |
|
689 | housekeeping_packet.hk_lfr_last_exe_tc_time[1] = time[1]; | |
690 |
housekeeping_packet.hk_lfr_last_exe_tc_time[2] = |
|
690 | housekeeping_packet.hk_lfr_last_exe_tc_time[2] = time[2]; | |
691 |
housekeeping_packet.hk_lfr_last_exe_tc_time[3] = |
|
691 | housekeeping_packet.hk_lfr_last_exe_tc_time[3] = time[3]; | |
692 |
housekeeping_packet.hk_lfr_last_exe_tc_time[4] = |
|
692 | housekeeping_packet.hk_lfr_last_exe_tc_time[4] = time[4]; | |
693 |
housekeeping_packet.hk_lfr_last_exe_tc_time[5] = |
|
693 | housekeeping_packet.hk_lfr_last_exe_tc_time[5] = time[5]; | |
694 | } |
|
694 | } | |
695 |
|
695 | |||
696 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC) |
|
696 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time) | |
697 | { |
|
697 | { | |
698 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; |
|
698 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; | |
699 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; |
|
699 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; | |
700 | housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00; |
|
700 | housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00; | |
701 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; |
|
701 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; | |
702 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; |
|
702 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; | |
703 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; |
|
703 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; | |
704 |
housekeeping_packet.hk_lfr_last_rej_tc_time[0] = |
|
704 | housekeeping_packet.hk_lfr_last_rej_tc_time[0] = time[0]; | |
705 |
housekeeping_packet.hk_lfr_last_rej_tc_time[1] = |
|
705 | housekeeping_packet.hk_lfr_last_rej_tc_time[1] = time[1]; | |
706 |
housekeeping_packet.hk_lfr_last_rej_tc_time[2] = |
|
706 | housekeeping_packet.hk_lfr_last_rej_tc_time[2] = time[2]; | |
707 |
housekeeping_packet.hk_lfr_last_rej_tc_time[3] = |
|
707 | housekeeping_packet.hk_lfr_last_rej_tc_time[3] = time[3]; | |
708 |
housekeeping_packet.hk_lfr_last_rej_tc_time[4] = |
|
708 | housekeeping_packet.hk_lfr_last_rej_tc_time[4] = time[4]; | |
709 |
housekeeping_packet.hk_lfr_last_rej_tc_time[5] = |
|
709 | housekeeping_packet.hk_lfr_last_rej_tc_time[5] = time[5]; | |
710 | } |
|
710 | } | |
711 |
|
711 | |||
712 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id) |
|
712 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id) | |
713 | { |
|
713 | { | |
714 | unsigned int val = 0; |
|
714 | unsigned int val = 0; | |
|
715 | unsigned char time[6]; | |||
|
716 | ||||
|
717 | time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |||
|
718 | time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |||
|
719 | time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |||
|
720 | time[3] = (unsigned char) (time_management_regs->coarse_time); | |||
|
721 | time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |||
|
722 | time[5] = (unsigned char) (time_management_regs->fine_time); | |||
|
723 | ||||
715 | if (result == LFR_SUCCESSFUL) |
|
724 | if (result == LFR_SUCCESSFUL) | |
716 | { |
|
725 | { | |
717 | if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) |
|
726 | if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) | |
718 | && |
|
727 | && | |
719 | !( (TC->serviceType==TC_TYPE_GEN) && (TC->serviceSubType==TC_SUBTYPE_UPDT_INFO)) |
|
728 | !( (TC->serviceType==TC_TYPE_GEN) && (TC->serviceSubType==TC_SUBTYPE_UPDT_INFO)) | |
720 | ) |
|
729 | ) | |
721 | { |
|
730 | { | |
722 | send_tm_lfr_tc_exe_success( TC, queue_id ); |
|
731 | send_tm_lfr_tc_exe_success( TC, queue_id, time ); | |
723 | } |
|
732 | } | |
724 | update_last_TC_exe( TC ); |
|
733 | update_last_TC_exe( TC, time ); | |
725 | val = housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1]; |
|
734 | val = housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1]; | |
726 | val++; |
|
735 | val++; | |
727 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] = (unsigned char) (val >> 8); |
|
736 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] = (unsigned char) (val >> 8); | |
728 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1] = (unsigned char) (val); |
|
737 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1] = (unsigned char) (val); | |
729 | } |
|
738 | } | |
730 | else |
|
739 | else | |
731 | { |
|
740 | { | |
732 | update_last_TC_rej( TC ); |
|
741 | update_last_TC_rej( TC, time ); | |
733 | val = housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1]; |
|
742 | val = housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1]; | |
734 | val++; |
|
743 | val++; | |
735 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] = (unsigned char) (val >> 8); |
|
744 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] = (unsigned char) (val >> 8); | |
736 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1] = (unsigned char) (val); |
|
745 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1] = (unsigned char) (val); | |
737 | } |
|
746 | } | |
738 | } |
|
747 | } | |
739 |
|
748 | |||
740 | //*************************** |
|
749 | //*************************** | |
741 | // Interrupt Service Routines |
|
750 | // Interrupt Service Routines | |
742 | rtems_isr commutation_isr1( rtems_vector_number vector ) |
|
751 | rtems_isr commutation_isr1( rtems_vector_number vector ) | |
743 | { |
|
752 | { | |
744 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
753 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
745 | printf("In commutation_isr1 *** Error sending event to DUMB\n"); |
|
754 | printf("In commutation_isr1 *** Error sending event to DUMB\n"); | |
746 | } |
|
755 | } | |
747 | } |
|
756 | } | |
748 |
|
757 | |||
749 | rtems_isr commutation_isr2( rtems_vector_number vector ) |
|
758 | rtems_isr commutation_isr2( rtems_vector_number vector ) | |
750 | { |
|
759 | { | |
751 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
760 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
752 | printf("In commutation_isr2 *** Error sending event to DUMB\n"); |
|
761 | printf("In commutation_isr2 *** Error sending event to DUMB\n"); | |
753 | } |
|
762 | } | |
754 | } |
|
763 | } | |
755 |
|
764 | |||
756 | //**************** |
|
765 | //**************** | |
757 | // OTHER FUNCTIONS |
|
766 | // OTHER FUNCTIONS | |
758 | void updateLFRCurrentMode() |
|
767 | void updateLFRCurrentMode() | |
759 | { |
|
768 | { | |
760 | /** This function updates the value of the global variable lfrCurrentMode. |
|
769 | /** This function updates the value of the global variable lfrCurrentMode. | |
761 | * |
|
770 | * | |
762 | * lfrCurrentMode is a parameter used by several functions to know in which mode LFR is running. |
|
771 | * lfrCurrentMode is a parameter used by several functions to know in which mode LFR is running. | |
763 | * |
|
772 | * | |
764 | */ |
|
773 | */ | |
765 | // update the local value of lfrCurrentMode with the value contained in the housekeeping_packet structure |
|
774 | // update the local value of lfrCurrentMode with the value contained in the housekeeping_packet structure | |
766 | lfrCurrentMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
775 | lfrCurrentMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
767 | } |
|
776 | } | |
768 |
|
777 |
@@ -1,491 +1,491 | |||||
1 | /** Functions to send TM packets related to TC parsing and execution. |
|
1 | /** Functions to send TM packets related to TC parsing and execution. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * A group of functions to send appropriate TM packets after parsing and execution: |
|
6 | * A group of functions to send appropriate TM packets after parsing and execution: | |
7 | * - TM_LFR_TC_EXE_SUCCESS |
|
7 | * - TM_LFR_TC_EXE_SUCCESS | |
8 | * - TM_LFR_TC_EXE_INCONSISTENT |
|
8 | * - TM_LFR_TC_EXE_INCONSISTENT | |
9 | * - TM_LFR_TC_EXE_NOT_EXECUTABLE |
|
9 | * - TM_LFR_TC_EXE_NOT_EXECUTABLE | |
10 | * - TM_LFR_TC_EXE_NOT_IMPLEMENTED |
|
10 | * - TM_LFR_TC_EXE_NOT_IMPLEMENTED | |
11 | * - TM_LFR_TC_EXE_ERROR |
|
11 | * - TM_LFR_TC_EXE_ERROR | |
12 | * - TM_LFR_TC_EXE_CORRUPTED |
|
12 | * - TM_LFR_TC_EXE_CORRUPTED | |
13 | * |
|
13 | * | |
14 | */ |
|
14 | */ | |
15 |
|
15 | |||
16 | #include "tm_lfr_tc_exe.h" |
|
16 | #include "tm_lfr_tc_exe.h" | |
17 |
|
17 | |||
18 | int send_tm_lfr_tc_exe_success( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
18 | int send_tm_lfr_tc_exe_success( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ) | |
19 | { |
|
19 | { | |
20 | /** This function sends a TM_LFR_TC_EXE_SUCCESS packet in the dedicated RTEMS message queue. |
|
20 | /** This function sends a TM_LFR_TC_EXE_SUCCESS packet in the dedicated RTEMS message queue. | |
21 | * |
|
21 | * | |
22 | * @param TC points to the TeleCommand packet that is being processed |
|
22 | * @param TC points to the TeleCommand packet that is being processed | |
23 | * @param queue_id is the id of the queue which handles TM |
|
23 | * @param queue_id is the id of the queue which handles TM | |
24 | * |
|
24 | * | |
25 | * @return RTEMS directive status code: |
|
25 | * @return RTEMS directive status code: | |
26 | * - RTEMS_SUCCESSFUL - message sent successfully |
|
26 | * - RTEMS_SUCCESSFUL - message sent successfully | |
27 | * - RTEMS_INVALID_ID - invalid queue id |
|
27 | * - RTEMS_INVALID_ID - invalid queue id | |
28 | * - RTEMS_INVALID_SIZE - invalid message size |
|
28 | * - RTEMS_INVALID_SIZE - invalid message size | |
29 | * - RTEMS_INVALID_ADDRESS - buffer is NULL |
|
29 | * - RTEMS_INVALID_ADDRESS - buffer is NULL | |
30 | * - RTEMS_UNSATISFIED - out of message buffers |
|
30 | * - RTEMS_UNSATISFIED - out of message buffers | |
31 | * - RTEMS_TOO_MANY - queue s limit has been reached |
|
31 | * - RTEMS_TOO_MANY - queue s limit has been reached | |
32 | * |
|
32 | * | |
33 | */ |
|
33 | */ | |
34 |
|
34 | |||
35 | rtems_status_code status; |
|
35 | rtems_status_code status; | |
36 | Packet_TM_LFR_TC_EXE_SUCCESS_t TM; |
|
36 | Packet_TM_LFR_TC_EXE_SUCCESS_t TM; | |
37 | unsigned char messageSize; |
|
37 | unsigned char messageSize; | |
38 |
|
38 | |||
39 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
39 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
40 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
40 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
41 | TM.reserved = DEFAULT_RESERVED; |
|
41 | TM.reserved = DEFAULT_RESERVED; | |
42 | TM.userApplication = CCSDS_USER_APP; |
|
42 | TM.userApplication = CCSDS_USER_APP; | |
43 | // PACKET HEADER |
|
43 | // PACKET HEADER | |
44 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); |
|
44 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); | |
45 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); |
|
45 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); | |
46 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); |
|
46 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); | |
47 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_SUCCESS >> 8); |
|
47 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_SUCCESS >> 8); | |
48 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_SUCCESS ); |
|
48 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_SUCCESS ); | |
49 | // DATA FIELD HEADER |
|
49 | // DATA FIELD HEADER | |
50 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
50 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
51 | TM.serviceType = TM_TYPE_TC_EXE; |
|
51 | TM.serviceType = TM_TYPE_TC_EXE; | |
52 | TM.serviceSubType = TM_SUBTYPE_EXE_OK; |
|
52 | TM.serviceSubType = TM_SUBTYPE_EXE_OK; | |
53 | TM.destinationID = TC->sourceID; |
|
53 | TM.destinationID = TC->sourceID; | |
54 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
54 | TM.time[0] = time[0]; | |
55 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
55 | TM.time[1] = time[1]; | |
56 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
56 | TM.time[2] = time[2]; | |
57 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
57 | TM.time[3] = time[3]; | |
58 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
58 | TM.time[4] = time[4]; | |
59 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
59 | TM.time[5] = time[5]; | |
60 | // |
|
60 | // | |
61 | TM.telecommand_pkt_id[0] = TC->packetID[0]; |
|
61 | TM.telecommand_pkt_id[0] = TC->packetID[0]; | |
62 | TM.telecommand_pkt_id[1] = TC->packetID[1]; |
|
62 | TM.telecommand_pkt_id[1] = TC->packetID[1]; | |
63 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; |
|
63 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; | |
64 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; |
|
64 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; | |
65 |
|
65 | |||
66 | messageSize = PACKET_LENGTH_TC_EXE_SUCCESS + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
66 | messageSize = PACKET_LENGTH_TC_EXE_SUCCESS + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
67 |
|
67 | |||
68 | // SEND DATA |
|
68 | // SEND DATA | |
69 | status = rtems_message_queue_send( queue_id, &TM, messageSize); |
|
69 | status = rtems_message_queue_send( queue_id, &TM, messageSize); | |
70 | if (status != RTEMS_SUCCESSFUL) { |
|
70 | if (status != RTEMS_SUCCESSFUL) { | |
71 | PRINTF("in send_tm_lfr_tc_exe_success *** ERR\n") |
|
71 | PRINTF("in send_tm_lfr_tc_exe_success *** ERR\n") | |
72 | } |
|
72 | } | |
73 |
|
73 | |||
74 | return status; |
|
74 | return status; | |
75 | } |
|
75 | } | |
76 |
|
76 | |||
77 | int send_tm_lfr_tc_exe_inconsistent( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
77 | int send_tm_lfr_tc_exe_inconsistent( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, | |
78 | unsigned char byte_position, unsigned char rcv_value ) |
|
78 | unsigned char byte_position, unsigned char rcv_value ) | |
79 | { |
|
79 | { | |
80 | /** This function sends a TM_LFR_TC_EXE_INCONSISTENT packet in the dedicated RTEMS message queue. |
|
80 | /** This function sends a TM_LFR_TC_EXE_INCONSISTENT packet in the dedicated RTEMS message queue. | |
81 | * |
|
81 | * | |
82 | * @param TC points to the TeleCommand packet that is being processed |
|
82 | * @param TC points to the TeleCommand packet that is being processed | |
83 | * @param queue_id is the id of the queue which handles TM |
|
83 | * @param queue_id is the id of the queue which handles TM | |
84 | * @param byte_position is the byte position of the MSB of the parameter that has been seen as inconsistent |
|
84 | * @param byte_position is the byte position of the MSB of the parameter that has been seen as inconsistent | |
85 | * @param rcv_value is the value of the LSB of the parameter that has been deteced as inconsistent |
|
85 | * @param rcv_value is the value of the LSB of the parameter that has been deteced as inconsistent | |
86 | * |
|
86 | * | |
87 | * @return RTEMS directive status code: |
|
87 | * @return RTEMS directive status code: | |
88 | * - RTEMS_SUCCESSFUL - message sent successfully |
|
88 | * - RTEMS_SUCCESSFUL - message sent successfully | |
89 | * - RTEMS_INVALID_ID - invalid queue id |
|
89 | * - RTEMS_INVALID_ID - invalid queue id | |
90 | * - RTEMS_INVALID_SIZE - invalid message size |
|
90 | * - RTEMS_INVALID_SIZE - invalid message size | |
91 | * - RTEMS_INVALID_ADDRESS - buffer is NULL |
|
91 | * - RTEMS_INVALID_ADDRESS - buffer is NULL | |
92 | * - RTEMS_UNSATISFIED - out of message buffers |
|
92 | * - RTEMS_UNSATISFIED - out of message buffers | |
93 | * - RTEMS_TOO_MANY - queue s limit has been reached |
|
93 | * - RTEMS_TOO_MANY - queue s limit has been reached | |
94 | * |
|
94 | * | |
95 | */ |
|
95 | */ | |
96 |
|
96 | |||
97 | rtems_status_code status; |
|
97 | rtems_status_code status; | |
98 | Packet_TM_LFR_TC_EXE_INCONSISTENT_t TM; |
|
98 | Packet_TM_LFR_TC_EXE_INCONSISTENT_t TM; | |
99 | unsigned char messageSize; |
|
99 | unsigned char messageSize; | |
100 |
|
100 | |||
101 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
101 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
102 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
102 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
103 | TM.reserved = DEFAULT_RESERVED; |
|
103 | TM.reserved = DEFAULT_RESERVED; | |
104 | TM.userApplication = CCSDS_USER_APP; |
|
104 | TM.userApplication = CCSDS_USER_APP; | |
105 | // PACKET HEADER |
|
105 | // PACKET HEADER | |
106 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); |
|
106 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); | |
107 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); |
|
107 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); | |
108 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); |
|
108 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); | |
109 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_INCONSISTENT >> 8); |
|
109 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_INCONSISTENT >> 8); | |
110 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_INCONSISTENT ); |
|
110 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_INCONSISTENT ); | |
111 | // DATA FIELD HEADER |
|
111 | // DATA FIELD HEADER | |
112 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
112 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
113 | TM.serviceType = TM_TYPE_TC_EXE; |
|
113 | TM.serviceType = TM_TYPE_TC_EXE; | |
114 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; |
|
114 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; | |
115 | TM.destinationID = TC->sourceID; |
|
115 | TM.destinationID = TC->sourceID; | |
116 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
116 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
117 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
117 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
118 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
118 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
119 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
119 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
120 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
120 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
121 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
121 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); | |
122 | // |
|
122 | // | |
123 | TM.tc_failure_code[0] = (char) (WRONG_APP_DATA >> 8); |
|
123 | TM.tc_failure_code[0] = (char) (WRONG_APP_DATA >> 8); | |
124 | TM.tc_failure_code[1] = (char) (WRONG_APP_DATA ); |
|
124 | TM.tc_failure_code[1] = (char) (WRONG_APP_DATA ); | |
125 | TM.telecommand_pkt_id[0] = TC->packetID[0]; |
|
125 | TM.telecommand_pkt_id[0] = TC->packetID[0]; | |
126 | TM.telecommand_pkt_id[1] = TC->packetID[1]; |
|
126 | TM.telecommand_pkt_id[1] = TC->packetID[1]; | |
127 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; |
|
127 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; | |
128 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; |
|
128 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; | |
129 | TM.tc_service = TC->serviceType; // type of the rejected TC |
|
129 | TM.tc_service = TC->serviceType; // type of the rejected TC | |
130 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC |
|
130 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC | |
131 | TM.byte_position = byte_position; |
|
131 | TM.byte_position = byte_position; | |
132 | TM.rcv_value = rcv_value; |
|
132 | TM.rcv_value = rcv_value; | |
133 |
|
133 | |||
134 | messageSize = PACKET_LENGTH_TC_EXE_INCONSISTENT + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
134 | messageSize = PACKET_LENGTH_TC_EXE_INCONSISTENT + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
135 |
|
135 | |||
136 | // SEND DATA |
|
136 | // SEND DATA | |
137 | status = rtems_message_queue_send( queue_id, &TM, messageSize); |
|
137 | status = rtems_message_queue_send( queue_id, &TM, messageSize); | |
138 | if (status != RTEMS_SUCCESSFUL) { |
|
138 | if (status != RTEMS_SUCCESSFUL) { | |
139 | PRINTF("in send_tm_lfr_tc_exe_inconsistent *** ERR\n") |
|
139 | PRINTF("in send_tm_lfr_tc_exe_inconsistent *** ERR\n") | |
140 | } |
|
140 | } | |
141 |
|
141 | |||
142 | return status; |
|
142 | return status; | |
143 | } |
|
143 | } | |
144 |
|
144 | |||
145 | int send_tm_lfr_tc_exe_not_executable( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
145 | int send_tm_lfr_tc_exe_not_executable( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
146 | { |
|
146 | { | |
147 | /** This function sends a TM_LFR_TC_EXE_NOT_EXECUTABLE packet in the dedicated RTEMS message queue. |
|
147 | /** This function sends a TM_LFR_TC_EXE_NOT_EXECUTABLE packet in the dedicated RTEMS message queue. | |
148 | * |
|
148 | * | |
149 | * @param TC points to the TeleCommand packet that is being processed |
|
149 | * @param TC points to the TeleCommand packet that is being processed | |
150 | * @param queue_id is the id of the queue which handles TM |
|
150 | * @param queue_id is the id of the queue which handles TM | |
151 | * |
|
151 | * | |
152 | * @return RTEMS directive status code: |
|
152 | * @return RTEMS directive status code: | |
153 | * - RTEMS_SUCCESSFUL - message sent successfully |
|
153 | * - RTEMS_SUCCESSFUL - message sent successfully | |
154 | * - RTEMS_INVALID_ID - invalid queue id |
|
154 | * - RTEMS_INVALID_ID - invalid queue id | |
155 | * - RTEMS_INVALID_SIZE - invalid message size |
|
155 | * - RTEMS_INVALID_SIZE - invalid message size | |
156 | * - RTEMS_INVALID_ADDRESS - buffer is NULL |
|
156 | * - RTEMS_INVALID_ADDRESS - buffer is NULL | |
157 | * - RTEMS_UNSATISFIED - out of message buffers |
|
157 | * - RTEMS_UNSATISFIED - out of message buffers | |
158 | * - RTEMS_TOO_MANY - queue s limit has been reached |
|
158 | * - RTEMS_TOO_MANY - queue s limit has been reached | |
159 | * |
|
159 | * | |
160 | */ |
|
160 | */ | |
161 |
|
161 | |||
162 | rtems_status_code status; |
|
162 | rtems_status_code status; | |
163 | Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t TM; |
|
163 | Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t TM; | |
164 | unsigned char messageSize; |
|
164 | unsigned char messageSize; | |
165 |
|
165 | |||
166 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
166 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
167 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
167 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
168 | TM.reserved = DEFAULT_RESERVED; |
|
168 | TM.reserved = DEFAULT_RESERVED; | |
169 | TM.userApplication = CCSDS_USER_APP; |
|
169 | TM.userApplication = CCSDS_USER_APP; | |
170 | // PACKET HEADER |
|
170 | // PACKET HEADER | |
171 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); |
|
171 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); | |
172 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); |
|
172 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); | |
173 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); |
|
173 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); | |
174 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE >> 8); |
|
174 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE >> 8); | |
175 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE ); |
|
175 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE ); | |
176 | // DATA FIELD HEADER |
|
176 | // DATA FIELD HEADER | |
177 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
177 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
178 | TM.serviceType = TM_TYPE_TC_EXE; |
|
178 | TM.serviceType = TM_TYPE_TC_EXE; | |
179 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; |
|
179 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; | |
180 | TM.destinationID = TC->sourceID; // default destination id |
|
180 | TM.destinationID = TC->sourceID; // default destination id | |
181 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
181 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
182 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
182 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
183 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
183 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
184 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
184 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
185 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
185 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
186 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
186 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); | |
187 | // |
|
187 | // | |
188 | TM.tc_failure_code[0] = (char) (TC_NOT_EXE >> 8); |
|
188 | TM.tc_failure_code[0] = (char) (TC_NOT_EXE >> 8); | |
189 | TM.tc_failure_code[1] = (char) (TC_NOT_EXE ); |
|
189 | TM.tc_failure_code[1] = (char) (TC_NOT_EXE ); | |
190 | TM.telecommand_pkt_id[0] = TC->packetID[0]; |
|
190 | TM.telecommand_pkt_id[0] = TC->packetID[0]; | |
191 | TM.telecommand_pkt_id[1] = TC->packetID[1]; |
|
191 | TM.telecommand_pkt_id[1] = TC->packetID[1]; | |
192 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; |
|
192 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; | |
193 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; |
|
193 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; | |
194 | TM.tc_service = TC->serviceType; // type of the rejected TC |
|
194 | TM.tc_service = TC->serviceType; // type of the rejected TC | |
195 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC |
|
195 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC | |
196 | TM.lfr_status_word[0] = housekeeping_packet.lfr_status_word[0]; |
|
196 | TM.lfr_status_word[0] = housekeeping_packet.lfr_status_word[0]; | |
197 | TM.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1]; |
|
197 | TM.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1]; | |
198 |
|
198 | |||
199 | messageSize = PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
199 | messageSize = PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
200 |
|
200 | |||
201 | // SEND DATA |
|
201 | // SEND DATA | |
202 | status = rtems_message_queue_send( queue_id, &TM, messageSize); |
|
202 | status = rtems_message_queue_send( queue_id, &TM, messageSize); | |
203 | if (status != RTEMS_SUCCESSFUL) { |
|
203 | if (status != RTEMS_SUCCESSFUL) { | |
204 | PRINTF("in send_tm_lfr_tc_exe_not_executable *** ERR\n") |
|
204 | PRINTF("in send_tm_lfr_tc_exe_not_executable *** ERR\n") | |
205 | } |
|
205 | } | |
206 |
|
206 | |||
207 | return status; |
|
207 | return status; | |
208 | } |
|
208 | } | |
209 |
|
209 | |||
210 | int send_tm_lfr_tc_exe_not_implemented( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
210 | int send_tm_lfr_tc_exe_not_implemented( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
211 | { |
|
211 | { | |
212 | /** This function sends a TM_LFR_TC_EXE_NOT_IMPLEMENTED packet in the dedicated RTEMS message queue. |
|
212 | /** This function sends a TM_LFR_TC_EXE_NOT_IMPLEMENTED packet in the dedicated RTEMS message queue. | |
213 | * |
|
213 | * | |
214 | * @param TC points to the TeleCommand packet that is being processed |
|
214 | * @param TC points to the TeleCommand packet that is being processed | |
215 | * @param queue_id is the id of the queue which handles TM |
|
215 | * @param queue_id is the id of the queue which handles TM | |
216 | * |
|
216 | * | |
217 | * @return RTEMS directive status code: |
|
217 | * @return RTEMS directive status code: | |
218 | * - RTEMS_SUCCESSFUL - message sent successfully |
|
218 | * - RTEMS_SUCCESSFUL - message sent successfully | |
219 | * - RTEMS_INVALID_ID - invalid queue id |
|
219 | * - RTEMS_INVALID_ID - invalid queue id | |
220 | * - RTEMS_INVALID_SIZE - invalid message size |
|
220 | * - RTEMS_INVALID_SIZE - invalid message size | |
221 | * - RTEMS_INVALID_ADDRESS - buffer is NULL |
|
221 | * - RTEMS_INVALID_ADDRESS - buffer is NULL | |
222 | * - RTEMS_UNSATISFIED - out of message buffers |
|
222 | * - RTEMS_UNSATISFIED - out of message buffers | |
223 | * - RTEMS_TOO_MANY - queue s limit has been reached |
|
223 | * - RTEMS_TOO_MANY - queue s limit has been reached | |
224 | * |
|
224 | * | |
225 | */ |
|
225 | */ | |
226 |
|
226 | |||
227 | rtems_status_code status; |
|
227 | rtems_status_code status; | |
228 | Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t TM; |
|
228 | Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t TM; | |
229 | unsigned char messageSize; |
|
229 | unsigned char messageSize; | |
230 |
|
230 | |||
231 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
231 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
232 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
232 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
233 | TM.reserved = DEFAULT_RESERVED; |
|
233 | TM.reserved = DEFAULT_RESERVED; | |
234 | TM.userApplication = CCSDS_USER_APP; |
|
234 | TM.userApplication = CCSDS_USER_APP; | |
235 | // PACKET HEADER |
|
235 | // PACKET HEADER | |
236 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); |
|
236 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); | |
237 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); |
|
237 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); | |
238 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); |
|
238 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); | |
239 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED >> 8); |
|
239 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED >> 8); | |
240 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED ); |
|
240 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED ); | |
241 | // DATA FIELD HEADER |
|
241 | // DATA FIELD HEADER | |
242 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
242 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
243 | TM.serviceType = TM_TYPE_TC_EXE; |
|
243 | TM.serviceType = TM_TYPE_TC_EXE; | |
244 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; |
|
244 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; | |
245 | TM.destinationID = TC->sourceID; // default destination id |
|
245 | TM.destinationID = TC->sourceID; // default destination id | |
246 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
246 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
247 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
247 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
248 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
248 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
249 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
249 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
250 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
250 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
251 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
251 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); | |
252 | // |
|
252 | // | |
253 | TM.tc_failure_code[0] = (char) (FUNCT_NOT_IMPL >> 8); |
|
253 | TM.tc_failure_code[0] = (char) (FUNCT_NOT_IMPL >> 8); | |
254 | TM.tc_failure_code[1] = (char) (FUNCT_NOT_IMPL ); |
|
254 | TM.tc_failure_code[1] = (char) (FUNCT_NOT_IMPL ); | |
255 | TM.telecommand_pkt_id[0] = TC->packetID[0]; |
|
255 | TM.telecommand_pkt_id[0] = TC->packetID[0]; | |
256 | TM.telecommand_pkt_id[1] = TC->packetID[1]; |
|
256 | TM.telecommand_pkt_id[1] = TC->packetID[1]; | |
257 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; |
|
257 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; | |
258 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; |
|
258 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; | |
259 | TM.tc_service = TC->serviceType; // type of the rejected TC |
|
259 | TM.tc_service = TC->serviceType; // type of the rejected TC | |
260 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC |
|
260 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC | |
261 |
|
261 | |||
262 | messageSize = PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
262 | messageSize = PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
263 |
|
263 | |||
264 | // SEND DATA |
|
264 | // SEND DATA | |
265 | status = rtems_message_queue_send( queue_id, &TM, messageSize); |
|
265 | status = rtems_message_queue_send( queue_id, &TM, messageSize); | |
266 | if (status != RTEMS_SUCCESSFUL) { |
|
266 | if (status != RTEMS_SUCCESSFUL) { | |
267 | PRINTF("in send_tm_lfr_tc_exe_not_implemented *** ERR\n") |
|
267 | PRINTF("in send_tm_lfr_tc_exe_not_implemented *** ERR\n") | |
268 | } |
|
268 | } | |
269 |
|
269 | |||
270 | return status; |
|
270 | return status; | |
271 | } |
|
271 | } | |
272 |
|
272 | |||
273 | int send_tm_lfr_tc_exe_error( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
273 | int send_tm_lfr_tc_exe_error( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
274 | { |
|
274 | { | |
275 | /** This function sends a TM_LFR_TC_EXE_ERROR packet in the dedicated RTEMS message queue. |
|
275 | /** This function sends a TM_LFR_TC_EXE_ERROR packet in the dedicated RTEMS message queue. | |
276 | * |
|
276 | * | |
277 | * @param TC points to the TeleCommand packet that is being processed |
|
277 | * @param TC points to the TeleCommand packet that is being processed | |
278 | * @param queue_id is the id of the queue which handles TM |
|
278 | * @param queue_id is the id of the queue which handles TM | |
279 | * |
|
279 | * | |
280 | * @return RTEMS directive status code: |
|
280 | * @return RTEMS directive status code: | |
281 | * - RTEMS_SUCCESSFUL - message sent successfully |
|
281 | * - RTEMS_SUCCESSFUL - message sent successfully | |
282 | * - RTEMS_INVALID_ID - invalid queue id |
|
282 | * - RTEMS_INVALID_ID - invalid queue id | |
283 | * - RTEMS_INVALID_SIZE - invalid message size |
|
283 | * - RTEMS_INVALID_SIZE - invalid message size | |
284 | * - RTEMS_INVALID_ADDRESS - buffer is NULL |
|
284 | * - RTEMS_INVALID_ADDRESS - buffer is NULL | |
285 | * - RTEMS_UNSATISFIED - out of message buffers |
|
285 | * - RTEMS_UNSATISFIED - out of message buffers | |
286 | * - RTEMS_TOO_MANY - queue s limit has been reached |
|
286 | * - RTEMS_TOO_MANY - queue s limit has been reached | |
287 | * |
|
287 | * | |
288 | */ |
|
288 | */ | |
289 |
|
289 | |||
290 | rtems_status_code status; |
|
290 | rtems_status_code status; | |
291 | Packet_TM_LFR_TC_EXE_ERROR_t TM; |
|
291 | Packet_TM_LFR_TC_EXE_ERROR_t TM; | |
292 | unsigned char messageSize; |
|
292 | unsigned char messageSize; | |
293 |
|
293 | |||
294 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
294 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
295 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
295 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
296 | TM.reserved = DEFAULT_RESERVED; |
|
296 | TM.reserved = DEFAULT_RESERVED; | |
297 | TM.userApplication = CCSDS_USER_APP; |
|
297 | TM.userApplication = CCSDS_USER_APP; | |
298 | // PACKET HEADER |
|
298 | // PACKET HEADER | |
299 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); |
|
299 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); | |
300 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); |
|
300 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); | |
301 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); |
|
301 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); | |
302 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_ERROR >> 8); |
|
302 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_ERROR >> 8); | |
303 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_ERROR ); |
|
303 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_ERROR ); | |
304 | // DATA FIELD HEADER |
|
304 | // DATA FIELD HEADER | |
305 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
305 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
306 | TM.serviceType = TM_TYPE_TC_EXE; |
|
306 | TM.serviceType = TM_TYPE_TC_EXE; | |
307 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; |
|
307 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; | |
308 | TM.destinationID = TC->sourceID; // default destination id |
|
308 | TM.destinationID = TC->sourceID; // default destination id | |
309 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
309 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
310 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
310 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
311 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
311 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
312 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
312 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
313 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
313 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
314 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
314 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); | |
315 | // |
|
315 | // | |
316 | TM.tc_failure_code[0] = (char) (FAIL_DETECTED >> 8); |
|
316 | TM.tc_failure_code[0] = (char) (FAIL_DETECTED >> 8); | |
317 | TM.tc_failure_code[1] = (char) (FAIL_DETECTED ); |
|
317 | TM.tc_failure_code[1] = (char) (FAIL_DETECTED ); | |
318 | TM.telecommand_pkt_id[0] = TC->packetID[0]; |
|
318 | TM.telecommand_pkt_id[0] = TC->packetID[0]; | |
319 | TM.telecommand_pkt_id[1] = TC->packetID[1]; |
|
319 | TM.telecommand_pkt_id[1] = TC->packetID[1]; | |
320 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; |
|
320 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; | |
321 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; |
|
321 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; | |
322 | TM.tc_service = TC->serviceType; // type of the rejected TC |
|
322 | TM.tc_service = TC->serviceType; // type of the rejected TC | |
323 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC |
|
323 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC | |
324 |
|
324 | |||
325 | messageSize = PACKET_LENGTH_TC_EXE_ERROR + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
325 | messageSize = PACKET_LENGTH_TC_EXE_ERROR + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
326 |
|
326 | |||
327 | // SEND DATA |
|
327 | // SEND DATA | |
328 | status = rtems_message_queue_send( queue_id, &TM, messageSize); |
|
328 | status = rtems_message_queue_send( queue_id, &TM, messageSize); | |
329 | if (status != RTEMS_SUCCESSFUL) { |
|
329 | if (status != RTEMS_SUCCESSFUL) { | |
330 | PRINTF("in send_tm_lfr_tc_exe_error *** ERR\n") |
|
330 | PRINTF("in send_tm_lfr_tc_exe_error *** ERR\n") | |
331 | } |
|
331 | } | |
332 |
|
332 | |||
333 | return status; |
|
333 | return status; | |
334 | } |
|
334 | } | |
335 |
|
335 | |||
336 | int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
336 | int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, | |
337 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV, |
|
337 | unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV, | |
338 | unsigned char destinationID) |
|
338 | unsigned char destinationID) | |
339 | { |
|
339 | { | |
340 | /** This function sends a TM_LFR_TC_EXE_CORRUPTED packet in the dedicated RTEMS message queue. |
|
340 | /** This function sends a TM_LFR_TC_EXE_CORRUPTED packet in the dedicated RTEMS message queue. | |
341 | * |
|
341 | * | |
342 | * @param TC points to the TeleCommand packet that is being processed |
|
342 | * @param TC points to the TeleCommand packet that is being processed | |
343 | * @param queue_id is the id of the queue which handles TM |
|
343 | * @param queue_id is the id of the queue which handles TM | |
344 | * @param computed_CRC points to a buffer of two bytes containing the CRC computed during the parsing of the TeleCommand |
|
344 | * @param computed_CRC points to a buffer of two bytes containing the CRC computed during the parsing of the TeleCommand | |
345 | * @param currentTC_LEN_RCV points to a buffer of two bytes containing a packet size field computed on the received data |
|
345 | * @param currentTC_LEN_RCV points to a buffer of two bytes containing a packet size field computed on the received data | |
346 | * |
|
346 | * | |
347 | * @return RTEMS directive status code: |
|
347 | * @return RTEMS directive status code: | |
348 | * - RTEMS_SUCCESSFUL - message sent successfully |
|
348 | * - RTEMS_SUCCESSFUL - message sent successfully | |
349 | * - RTEMS_INVALID_ID - invalid queue id |
|
349 | * - RTEMS_INVALID_ID - invalid queue id | |
350 | * - RTEMS_INVALID_SIZE - invalid message size |
|
350 | * - RTEMS_INVALID_SIZE - invalid message size | |
351 | * - RTEMS_INVALID_ADDRESS - buffer is NULL |
|
351 | * - RTEMS_INVALID_ADDRESS - buffer is NULL | |
352 | * - RTEMS_UNSATISFIED - out of message buffers |
|
352 | * - RTEMS_UNSATISFIED - out of message buffers | |
353 | * - RTEMS_TOO_MANY - queue s limit has been reached |
|
353 | * - RTEMS_TOO_MANY - queue s limit has been reached | |
354 | * |
|
354 | * | |
355 | */ |
|
355 | */ | |
356 |
|
356 | |||
357 | rtems_status_code status; |
|
357 | rtems_status_code status; | |
358 | Packet_TM_LFR_TC_EXE_CORRUPTED_t TM; |
|
358 | Packet_TM_LFR_TC_EXE_CORRUPTED_t TM; | |
359 | unsigned char messageSize; |
|
359 | unsigned char messageSize; | |
360 | unsigned int packetLength; |
|
360 | unsigned int packetLength; | |
361 | unsigned char *packetDataField; |
|
361 | unsigned char *packetDataField; | |
362 |
|
362 | |||
363 | packetLength = (TC->packetLength[0] * 256) + TC->packetLength[1]; // compute the packet length parameter |
|
363 | packetLength = (TC->packetLength[0] * 256) + TC->packetLength[1]; // compute the packet length parameter | |
364 | packetDataField = (unsigned char *) &TC->headerFlag_pusVersion_Ack; // get the beginning of the data field |
|
364 | packetDataField = (unsigned char *) &TC->headerFlag_pusVersion_Ack; // get the beginning of the data field | |
365 |
|
365 | |||
366 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
366 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
367 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
367 | TM.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
368 | TM.reserved = DEFAULT_RESERVED; |
|
368 | TM.reserved = DEFAULT_RESERVED; | |
369 | TM.userApplication = CCSDS_USER_APP; |
|
369 | TM.userApplication = CCSDS_USER_APP; | |
370 | // PACKET HEADER |
|
370 | // PACKET HEADER | |
371 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); |
|
371 | TM.packetID[0] = (unsigned char) (TM_PACKET_ID_TC_EXE >> 8); | |
372 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); |
|
372 | TM.packetID[1] = (unsigned char) (TM_PACKET_ID_TC_EXE ); | |
373 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); |
|
373 | increment_seq_counter_destination_id( TM.packetSequenceControl, TC->sourceID ); | |
374 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_CORRUPTED >> 8); |
|
374 | TM.packetLength[0] = (unsigned char) (PACKET_LENGTH_TC_EXE_CORRUPTED >> 8); | |
375 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_CORRUPTED ); |
|
375 | TM.packetLength[1] = (unsigned char) (PACKET_LENGTH_TC_EXE_CORRUPTED ); | |
376 | // DATA FIELD HEADER |
|
376 | // DATA FIELD HEADER | |
377 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
377 | TM.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
378 | TM.serviceType = TM_TYPE_TC_EXE; |
|
378 | TM.serviceType = TM_TYPE_TC_EXE; | |
379 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; |
|
379 | TM.serviceSubType = TM_SUBTYPE_EXE_NOK; | |
380 | TM.destinationID = destinationID; |
|
380 | TM.destinationID = destinationID; | |
381 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
381 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
382 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
382 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
383 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
383 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
384 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
384 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
385 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
385 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
386 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
386 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); | |
387 | // |
|
387 | // | |
388 | TM.tc_failure_code[0] = (unsigned char) (CORRUPTED >> 8); |
|
388 | TM.tc_failure_code[0] = (unsigned char) (CORRUPTED >> 8); | |
389 | TM.tc_failure_code[1] = (unsigned char) (CORRUPTED ); |
|
389 | TM.tc_failure_code[1] = (unsigned char) (CORRUPTED ); | |
390 | TM.telecommand_pkt_id[0] = TC->packetID[0]; |
|
390 | TM.telecommand_pkt_id[0] = TC->packetID[0]; | |
391 | TM.telecommand_pkt_id[1] = TC->packetID[1]; |
|
391 | TM.telecommand_pkt_id[1] = TC->packetID[1]; | |
392 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; |
|
392 | TM.pkt_seq_control[0] = TC->packetSequenceControl[0]; | |
393 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; |
|
393 | TM.pkt_seq_control[1] = TC->packetSequenceControl[1]; | |
394 | TM.tc_service = TC->serviceType; // type of the rejected TC |
|
394 | TM.tc_service = TC->serviceType; // type of the rejected TC | |
395 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC |
|
395 | TM.tc_subtype = TC->serviceSubType; // subtype of the rejected TC | |
396 | TM.pkt_len_rcv_value[0] = TC->packetLength[0]; |
|
396 | TM.pkt_len_rcv_value[0] = TC->packetLength[0]; | |
397 | TM.pkt_len_rcv_value[1] = TC->packetLength[1]; |
|
397 | TM.pkt_len_rcv_value[1] = TC->packetLength[1]; | |
398 | TM.pkt_datafieldsize_cnt[0] = currentTC_LEN_RCV[0]; |
|
398 | TM.pkt_datafieldsize_cnt[0] = currentTC_LEN_RCV[0]; | |
399 | TM.pkt_datafieldsize_cnt[1] = currentTC_LEN_RCV[1]; |
|
399 | TM.pkt_datafieldsize_cnt[1] = currentTC_LEN_RCV[1]; | |
400 | TM.rcv_crc[0] = packetDataField[ packetLength - 1 ]; |
|
400 | TM.rcv_crc[0] = packetDataField[ packetLength - 1 ]; | |
401 | TM.rcv_crc[1] = packetDataField[ packetLength ]; |
|
401 | TM.rcv_crc[1] = packetDataField[ packetLength ]; | |
402 | TM.computed_crc[0] = computed_CRC[0]; |
|
402 | TM.computed_crc[0] = computed_CRC[0]; | |
403 | TM.computed_crc[1] = computed_CRC[1]; |
|
403 | TM.computed_crc[1] = computed_CRC[1]; | |
404 |
|
404 | |||
405 | messageSize = PACKET_LENGTH_TC_EXE_CORRUPTED + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; |
|
405 | messageSize = PACKET_LENGTH_TC_EXE_CORRUPTED + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES; | |
406 |
|
406 | |||
407 | // SEND DATA |
|
407 | // SEND DATA | |
408 | status = rtems_message_queue_send( queue_id, &TM, messageSize); |
|
408 | status = rtems_message_queue_send( queue_id, &TM, messageSize); | |
409 | if (status != RTEMS_SUCCESSFUL) { |
|
409 | if (status != RTEMS_SUCCESSFUL) { | |
410 | PRINTF("in send_tm_lfr_tc_exe_error *** ERR\n") |
|
410 | PRINTF("in send_tm_lfr_tc_exe_error *** ERR\n") | |
411 | } |
|
411 | } | |
412 |
|
412 | |||
413 | return status; |
|
413 | return status; | |
414 | } |
|
414 | } | |
415 |
|
415 | |||
416 | void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id ) |
|
416 | void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id ) | |
417 | { |
|
417 | { | |
418 | unsigned short sequence_cnt; |
|
418 | unsigned short sequence_cnt; | |
419 | unsigned short segmentation_grouping_flag; |
|
419 | unsigned short segmentation_grouping_flag; | |
420 | unsigned short new_packet_sequence_control; |
|
420 | unsigned short new_packet_sequence_control; | |
421 | unsigned char i; |
|
421 | unsigned char i; | |
422 |
|
422 | |||
423 | switch (destination_id) |
|
423 | switch (destination_id) | |
424 | { |
|
424 | { | |
425 | case SID_TC_GROUND: |
|
425 | case SID_TC_GROUND: | |
426 | i = GROUND; |
|
426 | i = GROUND; | |
427 | break; |
|
427 | break; | |
428 | case SID_TC_MISSION_TIMELINE: |
|
428 | case SID_TC_MISSION_TIMELINE: | |
429 | i = MISSION_TIMELINE; |
|
429 | i = MISSION_TIMELINE; | |
430 | break; |
|
430 | break; | |
431 | case SID_TC_TC_SEQUENCES: |
|
431 | case SID_TC_TC_SEQUENCES: | |
432 | i = TC_SEQUENCES; |
|
432 | i = TC_SEQUENCES; | |
433 | break; |
|
433 | break; | |
434 | case SID_TC_RECOVERY_ACTION_CMD: |
|
434 | case SID_TC_RECOVERY_ACTION_CMD: | |
435 | i = RECOVERY_ACTION_CMD; |
|
435 | i = RECOVERY_ACTION_CMD; | |
436 | break; |
|
436 | break; | |
437 | case SID_TC_BACKUP_MISSION_TIMELINE: |
|
437 | case SID_TC_BACKUP_MISSION_TIMELINE: | |
438 | i = BACKUP_MISSION_TIMELINE; |
|
438 | i = BACKUP_MISSION_TIMELINE; | |
439 | break; |
|
439 | break; | |
440 | case SID_TC_DIRECT_CMD: |
|
440 | case SID_TC_DIRECT_CMD: | |
441 | i = DIRECT_CMD; |
|
441 | i = DIRECT_CMD; | |
442 | break; |
|
442 | break; | |
443 | case SID_TC_SPARE_GRD_SRC1: |
|
443 | case SID_TC_SPARE_GRD_SRC1: | |
444 | i = SPARE_GRD_SRC1; |
|
444 | i = SPARE_GRD_SRC1; | |
445 | break; |
|
445 | break; | |
446 | case SID_TC_SPARE_GRD_SRC2: |
|
446 | case SID_TC_SPARE_GRD_SRC2: | |
447 | i = SPARE_GRD_SRC2; |
|
447 | i = SPARE_GRD_SRC2; | |
448 | break; |
|
448 | break; | |
449 | case SID_TC_OBCP: |
|
449 | case SID_TC_OBCP: | |
450 | i = OBCP; |
|
450 | i = OBCP; | |
451 | break; |
|
451 | break; | |
452 | case SID_TC_SYSTEM_CONTROL: |
|
452 | case SID_TC_SYSTEM_CONTROL: | |
453 | i = SYSTEM_CONTROL; |
|
453 | i = SYSTEM_CONTROL; | |
454 | break; |
|
454 | break; | |
455 | case SID_TC_AOCS: |
|
455 | case SID_TC_AOCS: | |
456 | i = AOCS; |
|
456 | i = AOCS; | |
457 | break; |
|
457 | break; | |
458 | case SID_TC_RPW_INTERNAL: |
|
458 | case SID_TC_RPW_INTERNAL: | |
459 | i = RPW_INTERNAL; |
|
459 | i = RPW_INTERNAL; | |
460 | break; |
|
460 | break; | |
461 | default: |
|
461 | default: | |
462 | i = UNKNOWN; |
|
462 | i = UNKNOWN; | |
463 | break; |
|
463 | break; | |
464 | } |
|
464 | } | |
465 |
|
465 | |||
466 | if (i != UNKNOWN) |
|
466 | if (i != UNKNOWN) | |
467 | { |
|
467 | { | |
468 | segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; |
|
468 | segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; | |
469 | sequence_cnt = sequenceCounters_TC_EXE[ i ] & 0x3fff; |
|
469 | sequence_cnt = sequenceCounters_TC_EXE[ i ] & 0x3fff; | |
470 |
|
470 | |||
471 | new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ; |
|
471 | new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ; | |
472 |
|
472 | |||
473 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); |
|
473 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); | |
474 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); |
|
474 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); | |
475 |
|
475 | |||
476 | // increment the sequence counter for the next packet |
|
476 | // increment the sequence counter for the next packet | |
477 | if ( sequenceCounters_TC_EXE[ i ] < SEQ_CNT_MAX) |
|
477 | if ( sequenceCounters_TC_EXE[ i ] < SEQ_CNT_MAX) | |
478 | { |
|
478 | { | |
479 | sequenceCounters_TC_EXE[ i ] = sequenceCounters_TC_EXE[ i ] + 1; |
|
479 | sequenceCounters_TC_EXE[ i ] = sequenceCounters_TC_EXE[ i ] + 1; | |
480 | } |
|
480 | } | |
481 | else |
|
481 | else | |
482 | { |
|
482 | { | |
483 | sequenceCounters_TC_EXE[ i ] = 0; |
|
483 | sequenceCounters_TC_EXE[ i ] = 0; | |
484 | } |
|
484 | } | |
485 | } |
|
485 | } | |
486 | else |
|
486 | else | |
487 | { |
|
487 | { | |
488 | DEBUG_PRINTF1("in increment_seq_counter_destination_id *** ERR destination ID %d not known\n", destination_id) |
|
488 | DEBUG_PRINTF1("in increment_seq_counter_destination_id *** ERR destination ID %d not known\n", destination_id) | |
489 | } |
|
489 | } | |
490 |
|
490 | |||
491 | } |
|
491 | } |
General Comments 0
You need to be logged in to leave comments.
Login now