##// END OF EJS Templates
TM_LFR_TC_EXE packet sending reworked...
paul -
r37:ce861ac72296 default
parent child
Show More
@@ -0,0 +1,6
1 #ifndef TM_BYTE_POSITIONS_H
2 #define TM_BYTE_POSITIONS_H
3
4 #define BYTE_POS_CP_LFR_MODE 11
5
6 #endif // TM_BYTE_POSITIONS_H
@@ -1,233 +1,233
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: Thu Oct 10 08:47:12 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Oct 10 15:46:11 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=14 -DPRINT_MESSAGES_ON_CONSOLE
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=14 -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 OBJECTS = obj/wf_handler.o \
53 OBJECTS = obj/wf_handler.o \
54 obj/tc_handler.o \
54 obj/tc_handler.o \
55 obj/fsw_processing.o \
55 obj/fsw_processing.o \
56 obj/fsw_misc.o \
56 obj/fsw_misc.o \
57 obj/fsw_init.o \
57 obj/fsw_init.o \
58 obj/fsw_globals.o \
58 obj/fsw_globals.o \
59 obj/fsw_spacewire.o
59 obj/fsw_spacewire.o
60 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
60 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
61 /usr/lib64/qt4/mkspecs/common/linux.conf \
61 /usr/lib64/qt4/mkspecs/common/linux.conf \
62 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
62 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
63 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
63 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
64 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
64 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
65 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
65 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
66 /usr/lib64/qt4/mkspecs/qconfig.pri \
66 /usr/lib64/qt4/mkspecs/qconfig.pri \
67 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
67 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
68 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
68 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
69 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
69 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
70 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
70 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
71 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
71 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
72 sparc.pri \
72 sparc.pri \
73 /usr/lib64/qt4/mkspecs/features/release.prf \
73 /usr/lib64/qt4/mkspecs/features/release.prf \
74 /usr/lib64/qt4/mkspecs/features/default_post.prf \
74 /usr/lib64/qt4/mkspecs/features/default_post.prf \
75 /usr/lib64/qt4/mkspecs/features/shared.prf \
75 /usr/lib64/qt4/mkspecs/features/shared.prf \
76 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
76 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
77 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
77 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
78 /usr/lib64/qt4/mkspecs/features/resources.prf \
78 /usr/lib64/qt4/mkspecs/features/resources.prf \
79 /usr/lib64/qt4/mkspecs/features/uic.prf \
79 /usr/lib64/qt4/mkspecs/features/uic.prf \
80 /usr/lib64/qt4/mkspecs/features/yacc.prf \
80 /usr/lib64/qt4/mkspecs/features/yacc.prf \
81 /usr/lib64/qt4/mkspecs/features/lex.prf \
81 /usr/lib64/qt4/mkspecs/features/lex.prf \
82 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
82 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
83 fsw-qt.pro
83 fsw-qt.pro
84 QMAKE_TARGET = fsw
84 QMAKE_TARGET = fsw
85 DESTDIR = bin/
85 DESTDIR = bin/
86 TARGET = bin/fsw
86 TARGET = bin/fsw
87
87
88 first: all
88 first: all
89 ####### Implicit rules
89 ####### Implicit rules
90
90
91 .SUFFIXES: .o .c .cpp .cc .cxx .C
91 .SUFFIXES: .o .c .cpp .cc .cxx .C
92
92
93 .cpp.o:
93 .cpp.o:
94 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
94 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
95
95
96 .cc.o:
96 .cc.o:
97 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
97 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
98
98
99 .cxx.o:
99 .cxx.o:
100 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
100 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
101
101
102 .C.o:
102 .C.o:
103 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
103 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
104
104
105 .c.o:
105 .c.o:
106 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
106 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
107
107
108 ####### Build rules
108 ####### Build rules
109
109
110 all: Makefile $(TARGET)
110 all: Makefile $(TARGET)
111
111
112 $(TARGET): $(OBJECTS)
112 $(TARGET): $(OBJECTS)
113 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
113 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
114 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
114 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
115
115
116 Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
116 Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
117 /usr/lib64/qt4/mkspecs/common/linux.conf \
117 /usr/lib64/qt4/mkspecs/common/linux.conf \
118 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
118 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
119 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
119 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
120 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
120 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
121 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
121 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
122 /usr/lib64/qt4/mkspecs/qconfig.pri \
122 /usr/lib64/qt4/mkspecs/qconfig.pri \
123 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
123 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
124 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
124 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
125 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
125 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
126 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
126 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
127 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
127 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
128 sparc.pri \
128 sparc.pri \
129 /usr/lib64/qt4/mkspecs/features/release.prf \
129 /usr/lib64/qt4/mkspecs/features/release.prf \
130 /usr/lib64/qt4/mkspecs/features/default_post.prf \
130 /usr/lib64/qt4/mkspecs/features/default_post.prf \
131 /usr/lib64/qt4/mkspecs/features/shared.prf \
131 /usr/lib64/qt4/mkspecs/features/shared.prf \
132 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
132 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
133 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
133 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
134 /usr/lib64/qt4/mkspecs/features/resources.prf \
134 /usr/lib64/qt4/mkspecs/features/resources.prf \
135 /usr/lib64/qt4/mkspecs/features/uic.prf \
135 /usr/lib64/qt4/mkspecs/features/uic.prf \
136 /usr/lib64/qt4/mkspecs/features/yacc.prf \
136 /usr/lib64/qt4/mkspecs/features/yacc.prf \
137 /usr/lib64/qt4/mkspecs/features/lex.prf \
137 /usr/lib64/qt4/mkspecs/features/lex.prf \
138 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf
138 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf
139 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
139 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
140 /usr/lib64/qt4/mkspecs/common/unix.conf:
140 /usr/lib64/qt4/mkspecs/common/unix.conf:
141 /usr/lib64/qt4/mkspecs/common/linux.conf:
141 /usr/lib64/qt4/mkspecs/common/linux.conf:
142 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
142 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
143 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
143 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
144 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
144 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
145 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
145 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
146 /usr/lib64/qt4/mkspecs/qconfig.pri:
146 /usr/lib64/qt4/mkspecs/qconfig.pri:
147 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri:
147 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri:
148 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
148 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
149 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
149 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
150 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
150 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
151 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
151 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
152 sparc.pri:
152 sparc.pri:
153 /usr/lib64/qt4/mkspecs/features/release.prf:
153 /usr/lib64/qt4/mkspecs/features/release.prf:
154 /usr/lib64/qt4/mkspecs/features/default_post.prf:
154 /usr/lib64/qt4/mkspecs/features/default_post.prf:
155 /usr/lib64/qt4/mkspecs/features/shared.prf:
155 /usr/lib64/qt4/mkspecs/features/shared.prf:
156 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
156 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
157 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
157 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
158 /usr/lib64/qt4/mkspecs/features/resources.prf:
158 /usr/lib64/qt4/mkspecs/features/resources.prf:
159 /usr/lib64/qt4/mkspecs/features/uic.prf:
159 /usr/lib64/qt4/mkspecs/features/uic.prf:
160 /usr/lib64/qt4/mkspecs/features/yacc.prf:
160 /usr/lib64/qt4/mkspecs/features/yacc.prf:
161 /usr/lib64/qt4/mkspecs/features/lex.prf:
161 /usr/lib64/qt4/mkspecs/features/lex.prf:
162 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
162 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
163 qmake: FORCE
163 qmake: FORCE
164 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
164 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
165
165
166 dist:
166 dist:
167 @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0
167 @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0
168 $(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
168 $(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
169
169
170
170
171 clean:compiler_clean
171 clean:compiler_clean
172 -$(DEL_FILE) $(OBJECTS)
172 -$(DEL_FILE) $(OBJECTS)
173 -$(DEL_FILE) *~ core *.core
173 -$(DEL_FILE) *~ core *.core
174
174
175
175
176 ####### Sub-libraries
176 ####### Sub-libraries
177
177
178 distclean: clean
178 distclean: clean
179 -$(DEL_FILE) $(TARGET)
179 -$(DEL_FILE) $(TARGET)
180 -$(DEL_FILE) Makefile
180 -$(DEL_FILE) Makefile
181
181
182
182
183 grmon:
183 grmon:
184 cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u
184 cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u
185
185
186 check: first
186 check: first
187
187
188 compiler_rcc_make_all:
188 compiler_rcc_make_all:
189 compiler_rcc_clean:
189 compiler_rcc_clean:
190 compiler_uic_make_all:
190 compiler_uic_make_all:
191 compiler_uic_clean:
191 compiler_uic_clean:
192 compiler_image_collection_make_all: qmake_image_collection.cpp
192 compiler_image_collection_make_all: qmake_image_collection.cpp
193 compiler_image_collection_clean:
193 compiler_image_collection_clean:
194 -$(DEL_FILE) qmake_image_collection.cpp
194 -$(DEL_FILE) qmake_image_collection.cpp
195 compiler_yacc_decl_make_all:
195 compiler_yacc_decl_make_all:
196 compiler_yacc_decl_clean:
196 compiler_yacc_decl_clean:
197 compiler_yacc_impl_make_all:
197 compiler_yacc_impl_make_all:
198 compiler_yacc_impl_clean:
198 compiler_yacc_impl_clean:
199 compiler_lex_make_all:
199 compiler_lex_make_all:
200 compiler_lex_clean:
200 compiler_lex_clean:
201 compiler_clean:
201 compiler_clean:
202
202
203 ####### Compile
203 ####### Compile
204
204
205 obj/wf_handler.o: ../src/wf_handler.c
205 obj/wf_handler.o: ../src/wf_handler.c
206 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c
206 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c
207
207
208 obj/tc_handler.o: ../src/tc_handler.c
208 obj/tc_handler.o: ../src/tc_handler.c
209 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c
209 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c
210
210
211 obj/fsw_processing.o: ../src/fsw_processing.c
211 obj/fsw_processing.o: ../src/fsw_processing.c
212 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c
212 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c
213
213
214 obj/fsw_misc.o: ../src/fsw_misc.c
214 obj/fsw_misc.o: ../src/fsw_misc.c
215 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c
215 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c
216
216
217 obj/fsw_init.o: ../src/fsw_init.c
217 obj/fsw_init.o: ../src/fsw_init.c
218 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c
218 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c
219
219
220 obj/fsw_globals.o: ../src/fsw_globals.c
220 obj/fsw_globals.o: ../src/fsw_globals.c
221 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c
221 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c
222
222
223 obj/fsw_spacewire.o: ../src/fsw_spacewire.c
223 obj/fsw_spacewire.o: ../src/fsw_spacewire.c
224 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c
224 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c
225
225
226 ####### Install
226 ####### Install
227
227
228 install: FORCE
228 install: FORCE
229
229
230 uninstall: FORCE
230 uninstall: FORCE
231
231
232 FORCE:
232 FORCE:
233
233
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -1,62 +1,63
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-14
10 SWVERSION=-0-14
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=14
14 DEFINES += SW_VERSION_N4=14
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, cpu_usage_report ) {
20 contains( CONFIG, cpu_usage_report ) {
21 DEFINES += PRINT_TASK_STATISTICS
21 DEFINES += PRINT_TASK_STATISTICS
22 }
22 }
23
23
24 contains( CONFIG, stack_report ) {
24 contains( CONFIG, stack_report ) {
25 DEFINES += PRINT_STACK_REPORT
25 DEFINES += PRINT_STACK_REPORT
26 }
26 }
27
27
28 contains( CONFIG, boot_messages ) {
28 contains( CONFIG, boot_messages ) {
29 DEFINES += BOOT_MESSAGES
29 DEFINES += BOOT_MESSAGES
30 }
30 }
31
31
32 TARGET = fsw
32 TARGET = fsw
33 contains( CONFIG, gsa ) {
33 contains( CONFIG, gsa ) {
34 DEFINES += GSA
34 DEFINES += GSA
35 TARGET = fsw-gsa
35 TARGET = fsw-gsa
36 }
36 }
37
37
38 INCLUDEPATH += \
38 INCLUDEPATH += \
39 ../src \
39 ../src \
40 ../header
40 ../header
41
41
42 SOURCES += \
42 SOURCES += \
43 ../src/wf_handler.c \
43 ../src/wf_handler.c \
44 ../src/tc_handler.c \
44 ../src/tc_handler.c \
45 ../src/fsw_processing.c \
45 ../src/fsw_processing.c \
46 ../src/fsw_misc.c \
46 ../src/fsw_misc.c \
47 ../src/fsw_init.c \
47 ../src/fsw_init.c \
48 ../src/fsw_globals.c \
48 ../src/fsw_globals.c \
49 ../src/fsw_spacewire.c
49 ../src/fsw_spacewire.c
50
50
51 HEADERS += \
51 HEADERS += \
52 ../header/wf_handler.h \
52 ../header/wf_handler.h \
53 ../header/tc_handler.h \
53 ../header/tc_handler.h \
54 ../header/grlib_regs.h \
54 ../header/grlib_regs.h \
55 ../header/fsw_processing.h \
55 ../header/fsw_processing.h \
56 ../header/fsw_params.h \
56 ../header/fsw_params.h \
57 ../header/fsw_misc.h \
57 ../header/fsw_misc.h \
58 ../header/fsw_init.h \
58 ../header/fsw_init.h \
59 ../header/ccsds_types.h \
59 ../header/ccsds_types.h \
60 ../header/fsw_params_processing.h \
60 ../header/fsw_params_processing.h \
61 ../header/fsw_spacewire.h
61 ../header/fsw_spacewire.h \
62 ../header/tm_byte_positions.h
62
63
@@ -1,508 +1,633
1 #ifndef CCSDS_H_INCLUDED
1 #ifndef CCSDS_H_INCLUDED
2 #define CCSDS_H_INCLUDED
2 #define CCSDS_H_INCLUDED
3
3
4 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
4 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
5 #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4
5 #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4
6 #define CCSDS_TM_PKT_MAX_SIZE 4412
6 #define CCSDS_TM_PKT_MAX_SIZE 4412
7 #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4
7 #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4
8 #define CCSDS_TC_PKT_MAX_SIZE 256
8 #define CCSDS_TC_PKT_MAX_SIZE 256
9 #define CCSDS_TC_PKT_MIN_SIZE 16
9 #define CCSDS_TC_PKT_MIN_SIZE 16
10 #define CCSDS_TC_TM_PACKET_OFFSET 7
10 #define CCSDS_TC_TM_PACKET_OFFSET 7
11 #define CCSDS_PROCESS_ID 76
11 #define CCSDS_PROCESS_ID 76
12 #define CCSDS_PACKET_CATEGORY 12
12 #define CCSDS_PACKET_CATEGORY 12
13 #define CCSDS_NODE_ADDRESS 0xfe
13 #define CCSDS_NODE_ADDRESS 0xfe
14 #define CCSDS_USER_APP 0x00
14 #define CCSDS_USER_APP 0x00
15
15
16 #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10
16 #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10
17 #define DEFAULT_RESERVED 0x00
17 #define DEFAULT_RESERVED 0x00
18 #define DEFAULT_HKBIA 0x1e // 0001 1110
18 #define DEFAULT_HKBIA 0x1e // 0001 1110
19
19
20 // PACKET ID
20 // PACKET ID
21 #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1
21 #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1
22 #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4
22 #define TM_PACKET_ID_HK 0x0cc4 // PID 76 CAT 4
23 #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9
23 #define TM_PACKET_ID_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9
24 #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12
24 #define TM_PACKET_ID_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12
25 #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
25 #define TM_PACKET_ID_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
26 #define TM_PACKET_PID_DEFAULT 76
26 #define TM_PACKET_PID_DEFAULT 76
27 #define TM_PACKET_PID_BURST_SBM1_SBM2 79
27 #define TM_PACKET_PID_BURST_SBM1_SBM2 79
28 #define TM_PACKET_CAT_TC_EXE 1
28 #define TM_PACKET_CAT_TC_EXE 1
29 #define TM_PACKET_CAT_HK 4
29 #define TM_PACKET_CAT_HK 4
30 #define TM_PACKET_CAT_PARAMETER_DUMP 9
30 #define TM_PACKET_CAT_PARAMETER_DUMP 9
31 #define TM_PACKET_CAT_SCIENCE 12
31 #define TM_PACKET_CAT_SCIENCE 12
32
32
33 // PACKET SEQUENCE CONTROL
33 // PACKET SEQUENCE CONTROL
34 #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000]
34 #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000]
35 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
35 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
36 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
36 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
37 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
37 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
38 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
38 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
39
39
40 // DESTINATION ID
40 // DESTINATION ID
41 #define TM_DESTINATION_ID_GROUND 0
41 #define TM_DESTINATION_ID_GROUND 0
42 #define TM_DESTINATION_ID_MISSION_TIMELINE 110
42 #define TM_DESTINATION_ID_MISSION_TIMELINE 110
43 #define TM_DESTINATION_ID_TC_SEQUENCES 111
43 #define TM_DESTINATION_ID_TC_SEQUENCES 111
44 #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112
44 #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112
45 #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113
45 #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113
46 #define TM_DESTINATION_ID_DIRECT_CMD 120
46 #define TM_DESTINATION_ID_DIRECT_CMD 120
47 #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121
47 #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121
48 #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122
48 #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122
49 #define TM_DESTINATION_ID_OBCP 15
49 #define TM_DESTINATION_ID_OBCP 15
50 #define TM_DESTINATION_ID_SYSTEM_CONTROL 14
50 #define TM_DESTINATION_ID_SYSTEM_CONTROL 14
51 #define TM_DESTINATION_ID_AOCS 11
51 #define TM_DESTINATION_ID_AOCS 11
52
52
53 #define CCSDS_DESTINATION_ID 0x01
53 #define CCSDS_DESTINATION_ID 0x01
54 #define CCSDS_PROTOCOLE_ID 0x02
54 #define CCSDS_PROTOCOLE_ID 0x02
55 #define CCSDS_RESERVED 0x00
55 #define CCSDS_RESERVED 0x00
56 #define CCSDS_USER_APP 0x00
56 #define CCSDS_USER_APP 0x00
57
57
58 #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24
58 #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24
59 #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32
59 #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32
60 #define SIZE_HK_PARAMETERS 112
60 #define SIZE_HK_PARAMETERS 112
61
61
62 // TC TYPES
62 // TC TYPES
63 #define TC_TYPE_GEN 181
63 #define TC_TYPE_GEN 181
64 #define TC_TYPE_TIME 9
64 #define TC_TYPE_TIME 9
65
65
66 // TC SUBTYPES
66 // TC SUBTYPES
67 #define TC_SUBTYPE_RESET 1
67 #define TC_SUBTYPE_RESET 1
68 #define TC_SUBTYPE_LOAD_COMM 11
68 #define TC_SUBTYPE_LOAD_COMM 11
69 #define TC_SUBTYPE_LOAD_NORM 13
69 #define TC_SUBTYPE_LOAD_NORM 13
70 #define TC_SUBTYPE_LOAD_BURST 19
70 #define TC_SUBTYPE_LOAD_BURST 19
71 #define TC_SUBTYPE_LOAD_SBM1 25
71 #define TC_SUBTYPE_LOAD_SBM1 25
72 #define TC_SUBTYPE_LOAD_SBM2 27
72 #define TC_SUBTYPE_LOAD_SBM2 27
73 #define TC_SUBTYPE_DUMP 31
73 #define TC_SUBTYPE_DUMP 31
74 #define TC_SUBTYPE_ENTER 41
74 #define TC_SUBTYPE_ENTER 41
75 #define TC_SUBTYPE_UPDT_INFO 51
75 #define TC_SUBTYPE_UPDT_INFO 51
76 #define TC_SUBTYPE_EN_CAL 61
76 #define TC_SUBTYPE_EN_CAL 61
77 #define TC_SUBTYPE_DIS_CAL 63
77 #define TC_SUBTYPE_DIS_CAL 63
78 #define TC_SUBTYPE_UPDT_TIME 129
78 #define TC_SUBTYPE_UPDT_TIME 129
79
79
80 // TC LEN
80 // TC LEN
81 #define TC_LEN_RESET 12
81 #define TC_LEN_RESET 12
82 #define TC_LEN_LOAD_COMM 14
82 #define TC_LEN_LOAD_COMM 14
83 #define TC_LEN_LOAD_NORM 20
83 #define TC_LEN_LOAD_NORM 20
84 #define TC_LEN_LOAD_BURST 14
84 #define TC_LEN_LOAD_BURST 14
85 #define TC_LEN_LOAD_SBM1 14
85 #define TC_LEN_LOAD_SBM1 14
86 #define TC_LEN_LOAD_SBM2 14
86 #define TC_LEN_LOAD_SBM2 14
87 #define TC_LEN_DUMP 12
87 #define TC_LEN_DUMP 12
88 #define TC_LEN_ENTER 20
88 #define TC_LEN_ENTER 20
89 #define TC_LEN_UPDT_INFO 48
89 #define TC_LEN_UPDT_INFO 48
90 #define TC_LEN_EN_CAL 12
90 #define TC_LEN_EN_CAL 12
91 #define TC_LEN_DIS_CAL 12
91 #define TC_LEN_DIS_CAL 12
92 #define TC_LEN_UPDT_TIME 18
92 #define TC_LEN_UPDT_TIME 18
93
93
94 // TM TYPES
94 // TM TYPES
95 #define TM_TYPE_TC_EXE 1
95 #define TM_TYPE_TC_EXE 1
96 #define TM_TYPE_HK 3
96 #define TM_TYPE_HK 3
97 #define TM_TYPE_PARAMETER_DUMP 3
97 #define TM_TYPE_PARAMETER_DUMP 3
98 #define TM_TYPE_LFR_SCIENCE 21
98 #define TM_TYPE_LFR_SCIENCE 21
99
99
100 // TM SUBTYPES
100 // TM SUBTYPES
101 #define TM_SUBTYPE_EXE_OK 7
101 #define TM_SUBTYPE_EXE_OK 7
102 #define TM_SUBTYPE_EXE_NOK 8
102 #define TM_SUBTYPE_EXE_NOK 8
103 #define TM_SUBTYPE_HK 25
103 #define TM_SUBTYPE_HK 25
104 #define TM_SUBTYPE_PARAMETER_DUMP 25
104 #define TM_SUBTYPE_PARAMETER_DUMP 25
105 #define TM_SUBTYPE_SCIENCE 3
105 #define TM_SUBTYPE_SCIENCE 3
106 #define TM_SUBTYPE_LFR_SCIENCE 3
106 #define TM_SUBTYPE_LFR_SCIENCE 3
107
107
108 // FAILURE CODES
108 // FAILURE CODES
109 #define ILLEGAL_APID 0
109 #define ILLEGAL_APID 0
110 #define WRONG_LEN_PACKET 1
110 #define WRONG_LEN_PACKET 1
111 #define INCOR_CHECKSUM 2
111 #define INCOR_CHECKSUM 2
112 #define ILL_TYPE 3
112 #define ILL_TYPE 3
113 #define ILL_SUBTYPE 4
113 #define ILL_SUBTYPE 4
114 #define WRONG_APP_DATA 5
114 #define WRONG_APP_DATA 5
115 //
115 //
116 #define WRONG_CMD_CODE 6
116 #define WRONG_CMD_CODE 6
117 #define CCSDS_TM_VALID 7
117 #define CCSDS_TM_VALID 7
118 #define FAILURE_CODE_INCONSISTENT 5 // 0x00 0x05
118 #define FAILURE_CODE_INCONSISTENT 5 // 0x00 0x05
119 #define FAILURE_CODE_NOT_EXECUTABLE 42000 // 0xa4 0x10
119 #define FAILURE_CODE_NOT_EXECUTABLE 42000 // 0xa4 0x10
120 #define FAILURE_CODE_NOT_IMPLEMENTED 42002 // 0xa4 0x12
120 #define FAILURE_CODE_NOT_IMPLEMENTED 42002 // 0xa4 0x12
121 #define FAILURE_CODE_ERROR 42003 // 0xa4 0x13
121 #define FAILURE_CODE_ERROR 42003 // 0xa4 0x13
122 #define FAILURE_CODE_CORRUPTED 42005 // 0xa4 0x15
122 #define FAILURE_CODE_CORRUPTED 42005 // 0xa4 0x15
123
123
124 // TM SID
124 // TM SID
125 #define SID_DEFAULT 0
125 #define SID_DEFAULT 0
126 #define SID_EXE_INC 5
126 #define SID_EXE_INC 5
127 #define SID_NOT_EXE 42000 // 0xa4 0x10
127 #define SID_NOT_EXE 42000 // 0xa4 0x10
128 #define SID_NOT_IMP 42002 // 0xa4 0x12
128 #define SID_NOT_IMP 42002 // 0xa4 0x12
129 #define SID_EXE_ERR 42003 // 0xa4 0x13
129 #define SID_EXE_ERR 42003 // 0xa4 0x13
130 #define SID_EXE_CORR 42005 // 0xa4 0x15
130 #define SID_EXE_CORR 42005 // 0xa4 0x15
131 #define SID_HK 1
131 #define SID_HK 1
132 #define SID_PARAMETER_DUMP 10
132 #define SID_PARAMETER_DUMP 10
133
133
134 #define SID_NORM_SWF_F0 3
134 #define SID_NORM_SWF_F0 3
135 #define SID_NORM_SWF_F1 4
135 #define SID_NORM_SWF_F1 4
136 #define SID_NORM_SWF_F2 5
136 #define SID_NORM_SWF_F2 5
137 #define SID_NORM_CWF_F3 1
137 #define SID_NORM_CWF_F3 1
138 #define SID_BURST_CWF_F2 2
138 #define SID_BURST_CWF_F2 2
139 #define SID_SBM1_CWF_F1 24
139 #define SID_SBM1_CWF_F1 24
140 #define SID_SBM2_CWF_F2 25
140 #define SID_SBM2_CWF_F2 25
141 #define SID_NORM_ASM_F0 11
141 #define SID_NORM_ASM_F0 11
142 #define SID_NORM_ASM_F1 12
142 #define SID_NORM_ASM_F1 12
143 #define SID_NORM_ASM_F2 13
143 #define SID_NORM_ASM_F2 13
144 #define SID_NORM_BP1_F0 14
144 #define SID_NORM_BP1_F0 14
145 #define SID_NORM_BP1_F1 15
145 #define SID_NORM_BP1_F1 15
146 #define SID_NORM_BP1_F2 16
146 #define SID_NORM_BP1_F2 16
147 #define SID_NORM_BP2_F0 19
147 #define SID_NORM_BP2_F0 19
148 #define SID_NORM_BP2_F1 20
148 #define SID_NORM_BP2_F1 20
149 #define SID_NORM_BP2_F2 21
149 #define SID_NORM_BP2_F2 21
150 #define SID_BURST_BP1_F0 17
150 #define SID_BURST_BP1_F0 17
151 #define SID_BURST_BP2_F0 22
151 #define SID_BURST_BP2_F0 22
152 #define SID_BURST_BP1_F1 18
152 #define SID_BURST_BP1_F1 18
153 #define SID_BURST_BP2_F1 23
153 #define SID_BURST_BP2_F1 23
154 #define SID_SBM1_BP1_F0 28
154 #define SID_SBM1_BP1_F0 28
155 #define SID_SBM1_BP2_F0 31
155 #define SID_SBM1_BP2_F0 31
156 #define SID_SBM2_BP1_F0 29
156 #define SID_SBM2_BP1_F0 29
157 #define SID_SBM2_BP2_F0 32
157 #define SID_SBM2_BP2_F0 32
158 #define SID_SBM2_BP1_F1 30
158 #define SID_SBM2_BP1_F1 30
159 #define SID_SBM2_BP2_F1 33
159 #define SID_SBM2_BP2_F1 33
160
160
161 // LENGTH (BYTES)
161 // LENGTH (BYTES)
162 #define LENGTH_TM_LFR_TC_EXE_MAX 32
162 #define LENGTH_TM_LFR_TC_EXE_MAX 32
163 #define LENGTH_TM_LFR_HK 126
163 #define LENGTH_TM_LFR_HK 126
164
164
165 // HEADER_LENGTH
165 // HEADER_LENGTH
166 #define TM_HEADER_LEN 16
166 #define TM_HEADER_LEN 16
167 #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28
167 #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28
168 // PACKET_LENGTH
168 // PACKET_LENGTH
169 #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET)
169 #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET)
170 #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET)
170 #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET)
171 #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET)
171 #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET)
172 #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET)
172 #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET)
173 #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET)
173 #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET)
174 #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET)
174 #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET)
175 #define PACKET_LENGTH_HK (126 - CCSDS_TC_TM_PACKET_OFFSET)
175 #define PACKET_LENGTH_HK (126 - CCSDS_TC_TM_PACKET_OFFSET)
176 #define PACKET_LENGTH_PARAMETER_DUMP (34 - CCSDS_TC_TM_PACKET_OFFSET)
176 #define PACKET_LENGTH_PARAMETER_DUMP (34 - CCSDS_TC_TM_PACKET_OFFSET)
177 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM (TOTAL_SIZE_SM + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET)
177 #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM (TOTAL_SIZE_SM + HEADER_LENGTH_TM_LFR_SCIENCE_ASM - CCSDS_TC_TM_PACKET_OFFSET)
178
178
179 #define SPARE1_PUSVERSION_SPARE2 0x10
179 #define SPARE1_PUSVERSION_SPARE2 0x10
180
180
181 #define LEN_TM_LFR_HK 126 + 4
181 #define LEN_TM_LFR_HK 126 + 4
182 #define LEN_TM_LFR_TC_EXE_NOT_IMP 24 +4
182 #define LEN_TM_LFR_TC_EXE_NOT_IMP 24 +4
183
183
184 #define TM_LEN_SCI_SWF_340 (340 * 12 + 10 + 12 - 1)
184 #define TM_LEN_SCI_SWF_340 (340 * 12 + 10 + 12 - 1)
185 #define TM_LEN_SCI_SWF_8 (8 * 12 + 10 + 12 - 1)
185 #define TM_LEN_SCI_SWF_8 (8 * 12 + 10 + 12 - 1)
186 #define TM_LEN_SCI_CWF_340 (340 * 12 + 10 + 10 - 1)
186 #define TM_LEN_SCI_CWF_340 (340 * 12 + 10 + 10 - 1)
187 #define TM_LEN_SCI_CWF_8 (8 * 12 + 10 + 10 - 1)
187 #define TM_LEN_SCI_CWF_8 (8 * 12 + 10 + 10 - 1)
188 #define DEFAULT_PKTCNT 0x07
188 #define DEFAULT_PKTCNT 0x07
189 #define BLK_NR_340 0x0154
189 #define BLK_NR_340 0x0154
190 #define BLK_NR_8 0x0008
190 #define BLK_NR_8 0x0008
191
191
192 enum TM_TYPE{
192 enum TM_TYPE{
193 TM_LFR_TC_EXE_OK,
193 TM_LFR_TC_EXE_OK,
194 TM_LFR_TC_EXE_ERR,
194 TM_LFR_TC_EXE_ERR,
195 TM_LFR_HK,
195 TM_LFR_HK,
196 TM_LFR_SCI,
196 TM_LFR_SCI,
197 TM_LFR_SCI_SBM,
197 TM_LFR_SCI_SBM,
198 TM_LFR_PAR_DUMP
198 TM_LFR_PAR_DUMP
199 };
199 };
200
200
201 struct TMHeader_str
201 struct TMHeader_str
202 {
202 {
203 volatile unsigned char targetLogicalAddress;
203 volatile unsigned char targetLogicalAddress;
204 volatile unsigned char protocolIdentifier;
204 volatile unsigned char protocolIdentifier;
205 volatile unsigned char reserved;
205 volatile unsigned char reserved;
206 volatile unsigned char userApplication;
206 volatile unsigned char userApplication;
207 volatile unsigned char packetID[2];
207 volatile unsigned char packetID[2];
208 volatile unsigned char packetSequenceControl[2];
208 volatile unsigned char packetSequenceControl[2];
209 volatile unsigned char packetLength[2];
209 volatile unsigned char packetLength[2];
210 // DATA FIELD HEADER
210 // DATA FIELD HEADER
211 volatile unsigned char spare1_pusVersion_spare2;
211 volatile unsigned char spare1_pusVersion_spare2;
212 volatile unsigned char serviceType;
212 volatile unsigned char serviceType;
213 volatile unsigned char serviceSubType;
213 volatile unsigned char serviceSubType;
214 volatile unsigned char destinationID;
214 volatile unsigned char destinationID;
215 volatile unsigned char time[6];
215 volatile unsigned char time[6];
216 };
216 };
217 typedef struct TMHeader_str TMHeader_t;
217 typedef struct TMHeader_str TMHeader_t;
218
218
219 struct Packet_TM_LFR_TC_EXE_str
219 struct Packet_TM_LFR_TC_EXE_str
220 {
220 {
221 volatile unsigned char targetLogicalAddress;
221 volatile unsigned char targetLogicalAddress;
222 volatile unsigned char protocolIdentifier;
222 volatile unsigned char protocolIdentifier;
223 volatile unsigned char reserved;
223 volatile unsigned char reserved;
224 volatile unsigned char userApplication;
224 volatile unsigned char userApplication;
225 volatile unsigned char packetID[2];
225 volatile unsigned char packetID[2];
226 volatile unsigned char packetSequenceControl[2];
226 volatile unsigned char packetSequenceControl[2];
227 volatile unsigned char packetLength[2];
227 volatile unsigned char packetLength[2];
228 // DATA FIELD HEADER
228 // DATA FIELD HEADER
229 volatile unsigned char spare1_pusVersion_spare2;
229 volatile unsigned char spare1_pusVersion_spare2;
230 volatile unsigned char serviceType;
230 volatile unsigned char serviceType;
231 volatile unsigned char serviceSubType;
231 volatile unsigned char serviceSubType;
232 volatile unsigned char destinationID;
232 volatile unsigned char destinationID;
233 volatile unsigned char time[6];
233 volatile unsigned char time[6];
234 volatile unsigned char data[LENGTH_TM_LFR_TC_EXE_MAX - 10 + 1];
234 volatile unsigned char data[LENGTH_TM_LFR_TC_EXE_MAX - 10 + 1];
235 };
235 };
236 typedef struct Packet_TM_LFR_TC_EXE_str Packet_TM_LFR_TC_EXE_t;
236 typedef struct Packet_TM_LFR_TC_EXE_str Packet_TM_LFR_TC_EXE_t;
237
237
238 struct Packet_TM_LFR_TC_EXE_SUCCESS_str
239 {
240 volatile unsigned char targetLogicalAddress;
241 volatile unsigned char protocolIdentifier;
242 volatile unsigned char reserved;
243 volatile unsigned char userApplication;
244 // PACKET HEADER
245 volatile unsigned char packetID[2];
246 volatile unsigned char packetSequenceControl[2];
247 volatile unsigned char packetLength[2];
248 // DATA FIELD HEADER
249 volatile unsigned char spare1_pusVersion_spare2;
250 volatile unsigned char serviceType;
251 volatile unsigned char serviceSubType;
252 volatile unsigned char destinationID;
253 volatile unsigned char time[6];
254 //
255 volatile unsigned char telecommand_pkt_id[2];
256 volatile unsigned char pkt_seq_control[2];
257 };
258 typedef struct Packet_TM_LFR_TC_EXE_SUCCESS_str Packet_TM_LFR_TC_EXE_SUCCESS_t;
259
260 struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str
261 {
262 volatile unsigned char targetLogicalAddress;
263 volatile unsigned char protocolIdentifier;
264 volatile unsigned char reserved;
265 volatile unsigned char userApplication;
266 // PACKET HEADER
267 volatile unsigned char packetID[2];
268 volatile unsigned char packetSequenceControl[2];
269 volatile unsigned char packetLength[2];
270 // DATA FIELD HEADER
271 volatile unsigned char spare1_pusVersion_spare2;
272 volatile unsigned char serviceType;
273 volatile unsigned char serviceSubType;
274 volatile unsigned char destinationID;
275 volatile unsigned char time[6];
276 //
277 volatile unsigned char tc_failure_code[2];
278 volatile unsigned char telecommand_pkt_id[2];
279 volatile unsigned char pkt_seq_control[2];
280 volatile unsigned char tc_service;
281 volatile unsigned char tc_subtype;
282 volatile unsigned char byte_position;
283 volatile unsigned char rcv_value;
284 };
285 typedef struct Packet_TM_LFR_TC_EXE_INCONSISTENT_str Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
286
287 struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str
288 {
289 volatile unsigned char targetLogicalAddress;
290 volatile unsigned char protocolIdentifier;
291 volatile unsigned char reserved;
292 volatile unsigned char userApplication;
293 // PACKET HEADER
294 volatile unsigned char packetID[2];
295 volatile unsigned char packetSequenceControl[2];
296 volatile unsigned char packetLength[2];
297 // DATA FIELD HEADER
298 volatile unsigned char spare1_pusVersion_spare2;
299 volatile unsigned char serviceType;
300 volatile unsigned char serviceSubType;
301 volatile unsigned char destinationID;
302 volatile unsigned char time[6];
303 //
304 volatile unsigned char tc_failure_code[2];
305 volatile unsigned char telecommand_pkt_id[2];
306 volatile unsigned char pkt_seq_control[2];
307 volatile unsigned char tc_service;
308 volatile unsigned char tc_subtype;
309 volatile unsigned char lfr_status_word[2];
310 };
311 typedef struct Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_str Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
312
313 struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str
314 {
315 volatile unsigned char targetLogicalAddress;
316 volatile unsigned char protocolIdentifier;
317 volatile unsigned char reserved;
318 volatile unsigned char userApplication;
319 // PACKET HEADER
320 volatile unsigned char packetID[2];
321 volatile unsigned char packetSequenceControl[2];
322 volatile unsigned char packetLength[2];
323 // DATA FIELD HEADER
324 volatile unsigned char spare1_pusVersion_spare2;
325 volatile unsigned char serviceType;
326 volatile unsigned char serviceSubType;
327 volatile unsigned char destinationID;
328 volatile unsigned char time[6];
329 //
330 volatile unsigned char tc_failure_code[2];
331 volatile unsigned char telecommand_pkt_id[2];
332 volatile unsigned char pkt_seq_control[2];
333 volatile unsigned char tc_service;
334 volatile unsigned char tc_subtype;
335 };
336 typedef struct Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_str Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
337
338 struct Packet_TM_LFR_TC_EXE_ERROR_str
339 {
340 volatile unsigned char targetLogicalAddress;