##// END OF EJS Templates
sy_lfr_n_swf_p implemented...
paul -
r32:796c5aa15417 default
parent child
Show More
@@ -0,0 +1,119
1 #ifndef TC_TYPES_H
2 #define TC_TYPES_H
3
4 #include <ccsds_types.h>
5
6 // PACKET ID
7 #define TC_LFR_PACKET_ID 0x1ccc // PID 76 CAT 12
8
9 #define PACKET_LENGTH_TC_LFR_LOAD_COMMON_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
10 #define PACKET_LENGTH_TC_LFR_LOAD_NORMAL_PAR (20 - CCSDS_TC_TM_PACKET_OFFSET)
11 #define PACKET_LENGTH_TC_LFR_LOAD_BURST_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
12 #define PACKET_LENGTH_TC_LFR_LOAD_SBM1_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
13 #define PACKET_LENGTH_TC_LFR_LOAD_SBM2_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
14 #define PACKET_LENGTH_TC_LFR_DUMP_PAR (12 - CCSDS_TC_TM_PACKET_OFFSET)
15 #define PACKET_LENGTH_TC_LFR_ENTER_MODE (20 - CCSDS_TC_TM_PACKET_OFFSET)
16
17 // TC TYPES
18 #define TC_TYPE_DEFAULT 181
19 #define TC_TYPE_LFR_UPDATE_TIME 9
20
21 // TC SUBTYPES
22 #define TC_SUBTYPE_LOAD_COMMON_PAR 11
23 #define TC_SUBTYPE_LOAD_NORMAL_PAR 13
24 #define TC_SUBTYPE_LOAD_BURST_PAR 19
25 #define TC_SUBTYPE_LOAD_SBM1_PAR 25
26 #define TC_SUBTYPE_LOAD_SBM2_PAR 27
27 #define TC_SUBTYPE_DUMP_PAR 31
28 #define TC_SUBTYPE_ENTER_MODE 41
29
30 // OTHER CONSTANTS
31 #define TC_LFR_PACKET_SEQUENCE_CONTROL 0xc000 // PID 76 CAT 12
32 #define TC_LFR_DATA_FIELD_HEADER0 0x19
33 #define TC_LFR_LOAD_COMMON_PAR_SPARE 0x00
34
35 struct Packet_TC_LFR_ENTER_MODE_str
36 { // the CCSDS header is added by LPPMON
37 unsigned char packetID[2];
38 unsigned char packetSequenceControl[2];
39 unsigned char packetLength[2];
40 // DATA FIELD HEADER
41 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
42 unsigned char serviceType;
43 unsigned char serviceSubType;
44 unsigned char sourceID;
45 unsigned char spare;
46 unsigned char mode;
47 unsigned char enterModeTime[6];
48 unsigned char crc[2];
49 };
50 typedef struct Packet_TC_LFR_ENTER_MODE_str Packet_TC_LFR_ENTER_MODE_t;
51
52 struct Packet_TC_LFR_DUMP_PAR_str
53 { // the CCSDS header is added by LPPMON
54 unsigned char packetID[2];
55 unsigned char packetSequenceControl[2];
56 unsigned char packetLength[2];
57 // DATA FIELD HEADER
58 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
59 unsigned char serviceType;
60 unsigned char serviceSubType;
61 unsigned char sourceID;
62 unsigned char crc[2];
63
64 };
65 typedef struct Packet_TC_LFR_DUMP_PAR_str Packet_TC_LFR_DUMP_PAR_t;
66
67 struct Packet_TC_LFR_LOAD_COMMON_PAR_str
68 { // the CCSDS header is added by LPPMON
69 unsigned char packetID[2];
70 unsigned char packetSequenceControl[2];
71 unsigned char packetLength[2];
72 // DATA FIELD HEADER
73 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
74 unsigned char serviceType;
75 unsigned char serviceSubType;
76 unsigned char sourceID;
77 unsigned char spare;
78 unsigned char bw_sp0_sp1_r0_r1;
79 unsigned char crc[2];
80
81 };
82 typedef struct Packet_TC_LFR_LOAD_COMMON_PAR_str Packet_TC_LFR_LOAD_COMMON_PAR_t;
83
84 struct Packet_TC_LFR_LOAD_NORMAL_PAR_str
85 { // the CCSDS header is added by LPPMON
86 unsigned char packetID[2];
87 unsigned char packetSequenceControl[2];
88 unsigned char packetLength[2];
89 // DATA FIELD HEADER
90 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
91 unsigned char serviceType;
92 unsigned char serviceSubType;
93 unsigned char sourceID;
94 unsigned char sy_lfr_n_swf_l[2];
95 unsigned char sy_lfr_n_swf_p[2];
96 unsigned char sy_lfr_n_asm_p[2];
97 unsigned char sy_lfr_n_bp_p0;
98 unsigned char sy_lfr_n_bp_p1;
99 unsigned char crc[2];
100 };
101 typedef struct Packet_TC_LFR_LOAD_NORMAL_PAR_str Packet_TC_LFR_LOAD_NORMAL_PAR_t;
102
103 struct Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_str
104 { // the CCSDS header is added by LPPMON
105 unsigned char packetID[2];
106 unsigned char packetSequenceControl[2];
107 unsigned char packetLength[2];
108 // DATA FIELD HEADER
109 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
110 unsigned char serviceType;
111 unsigned char serviceSubType;
112 unsigned char sourceID;
113 unsigned char sy_lfr_bp_p0;
114 unsigned char sy_lfr_bp_p1;
115 unsigned char crc[2];
116 };
117 typedef struct Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_str Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_t;
118
119 #endif // TC_TYPES_H
@@ -1,6 +1,6
1 #############################################################################
1 #############################################################################
2 # Makefile for building: bin/fsw-gsa
2 # Makefile for building: bin/fsw
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Jul 25 10:29:57 2013
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Aug 1 15:31:06 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
@@ -10,7 +10,7
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=11 -DPRINT_MESSAGES_ON_CONSOLE -DGSA
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=12 -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
@@ -78,9 +78,9 DIST = /usr/lib64/qt4/mkspecs/c
78 /usr/lib64/qt4/mkspecs/features/lex.prf \
78 /usr/lib64/qt4/mkspecs/features/lex.prf \
79 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
79 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
80 fsw-qt.pro
80 fsw-qt.pro
81 QMAKE_TARGET = fsw-gsa
81 QMAKE_TARGET = fsw
82 DESTDIR = bin/
82 DESTDIR = bin/
83 TARGET = bin/fsw-gsa
83 TARGET = bin/fsw
84
84
85 first: all
85 first: all
86 ####### Implicit rules
86 ####### Implicit rules
@@ -159,8 +159,8 qmake: FORCE
159 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
159 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
160
160
161 dist:
161 dist:
162 @$(CHK_DIR_EXISTS) obj/fsw-gsa1.0.0 || $(MKDIR) obj/fsw-gsa1.0.0
162 @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0
163 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw-gsa1.0.0/ && (cd `dirname obj/fsw-gsa1.0.0` && $(TAR) fsw-gsa1.0.0.tar fsw-gsa1.0.0 && $(COMPRESS) fsw-gsa1.0.0.tar) && $(MOVE) `dirname obj/fsw-gsa1.0.0`/fsw-gsa1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw-gsa1.0.0
163 $(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
164
164
165
165
166 clean:compiler_clean
166 clean:compiler_clean
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -1,17 +1,17
1 TEMPLATE = app
1 TEMPLATE = app
2 # CONFIG += console v8 sim
2 # CONFIG += console v8 sim
3 # CONFIG options = verbose *** cpu_usage_report *** gsa
3 # CONFIG options = verbose *** cpu_usage_report *** gsa
4 CONFIG += console verbose gsa
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-11
10 SWVERSION=-0-12
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=11
14 DEFINES += SW_VERSION_N4=12
15
15
16 contains( CONFIG, verbose ) {
16 contains( CONFIG, verbose ) {
17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
@@ -1,6 +1,6
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.7.0, 2013-07-25T07:26:34. -->
3 <!-- Written by QtCreator 2.8.0, 2013-08-01T13:38:09. -->
4 <qtcreator>
4 <qtcreator>
5 <data>
5 <data>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -13,13 +13,13
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="QByteArray" 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="QByteArray" 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>
@@ -53,7 +53,7
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="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value>
56 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value>
57 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
57 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
58 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
58 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
59 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
59 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
@@ -63,7 +63,7
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="QByteArray" 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>
@@ -73,7 +73,7
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="QByteArray" 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>
@@ -85,14 +85,14
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="QByteArray" 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="QByteArray" 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>
@@ -104,14 +104,14
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="QByteArray" 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="QByteArray" 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>
@@ -122,7 +122,7
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="QByteArray" 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>
@@ -132,7 +132,7
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="QByteArray" 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>
@@ -144,14 +144,14
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="QByteArray" 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="QByteArray" 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>
@@ -163,14 +163,14
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="QByteArray" 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="QByteArray" 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>
@@ -181,14 +181,15
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="QByteArray" 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="QByteArray" 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.RunConfiguration.0">
193 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
193 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
194 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
194 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
195 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
@@ -221,18 +222,19
221 <value type="int">13</value>
222 <value type="int">13</value>
222 <value type="int">14</value>
223 <value type="int">14</value>
223 </valuelist>
224 </valuelist>
225 <value type="int" key="PE.EnvironmentAspect.Base">2</value>
226 <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
224 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
227 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
225 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
228 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
226 <value type="QByteArray" 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>
227 <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value>
228 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
230 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
229 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
231 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
230 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
232 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
231 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
233 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
232 <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/>
233 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
234 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
234 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
235 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
235 <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>
236 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
238 <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
237 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
239 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
238 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
240 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
@@ -246,10 +248,10
246 </data>
248 </data>
247 <data>
249 <data>
248 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
250 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
249 <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
251 <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
250 </data>
252 </data>
251 <data>
253 <data>
252 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
254 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
253 <value type="int">12</value>
255 <value type="int">14</value>
254 </data>
256 </data>
255 </qtcreator>
257 </qtcreator>
@@ -11,6 +11,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
15
15 // PACKET ID
16 // PACKET ID
16 #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1
17 #define TM_PACKET_ID_TC_EXE 0x0cc1 // PID 76 CAT 1
@@ -17,12 +17,14
17 #define LFR_MODE_BURST 2
17 #define LFR_MODE_BURST 2
18 #define LFR_MODE_SBM1 3
18 #define LFR_MODE_SBM1 3
19 #define LFR_MODE_SBM2 4
19 #define LFR_MODE_SBM2 4
20 #define LFR_MODE_NORMAL_CWF_F3 5
20
21
21 #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0
22 #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0
22 #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1
23 #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1
23 #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2
24 #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2
24 #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3
25 #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3
25 #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4
26 #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4
27 #define RTEMS_EVENT_MODE_NORMAL_CWF_F3 RTEMS_EVENT_5
26
28
27 //****************************
29 //****************************
28 // LFR DEFAULT MODE PARAMETERS
30 // LFR DEFAULT MODE PARAMETERS
@@ -32,9 +34,10
32 // NORM
34 // NORM
33 #define DEFAULT_SY_LFR_N_SWF_L 2048 // nb sample
35 #define DEFAULT_SY_LFR_N_SWF_L 2048 // nb sample
34 #define DEFAULT_SY_LFR_N_SWF_P 16 // sec
36 #define DEFAULT_SY_LFR_N_SWF_P 16 // sec
35 #define DEFAULT_SY_LFR_N_ASM_P 16 // sec
37 #define DEFAULT_SY_LFR_N_ASM_P 16 // sec
36 #define DEFAULT_SY_LFR_N_BP_P0 4 // sec
38 #define DEFAULT_SY_LFR_N_BP_P0 4 // sec
37 #define DEFAULT_SY_LFR_N_BP_P1 20 // sec
39 #define DEFAULT_SY_LFR_N_BP_P1 20 // sec
40 #define MIN_DELTA_SNAPSHOT 16 // sec
38 // BURST
41 // BURST
39 #define DEFAULT_SY_LFR_B_BP_P0 1 // sec
42 #define DEFAULT_SY_LFR_B_BP_P0 1 // sec
40 #define DEFAULT_SY_LFR_B_BP_P1 5 // sec
43 #define DEFAULT_SY_LFR_B_BP_P1 5 // sec
@@ -102,6 +105,7
102 #define TASKID_DUMB 9
105 #define TASKID_DUMB 9
103 #define TASKID_HOUS 10
106 #define TASKID_HOUS 10
104 #define TASKID_MATR 11
107 #define TASKID_MATR 11
108 #define TASKID_CWF3 12
105
109
106 #define ACTION_MSG_QUEUE_COUNT 10
110 #define ACTION_MSG_QUEUE_COUNT 10
107
111
@@ -154,6 +158,7 struct param_local_str{
154 unsigned int local_sbm1_nb_cwf_max;
158 unsigned int local_sbm1_nb_cwf_max;
155 unsigned int local_sbm2_nb_cwf_sent;
159 unsigned int local_sbm2_nb_cwf_sent;
156 unsigned int local_sbm2_nb_cwf_max;
160 unsigned int local_sbm2_nb_cwf_max;
161 unsigned int local_nb_interrupt_f0_MAX;
157 };
162 };
158
163
159 #endif // FSW_RTEMS_CONFIG_H_INCLUDED
164 #endif // FSW_RTEMS_CONFIG_H_INCLUDED
@@ -4,6 +4,7
4 #define NB_BINS_PER_SM 128
4 #define NB_BINS_PER_SM 128
5 #define NB_VALUES_PER_SM 25
5 #define NB_VALUES_PER_SM 25
6 #define TOTAL_SIZE_SM (NB_BINS_PER_SM * NB_VALUES_PER_SM)
6 #define TOTAL_SIZE_SM (NB_BINS_PER_SM * NB_VALUES_PER_SM)
7 #define SM_HEADER 4
7
8
8 #define NB_BINS_COMPRESSED_SM_F0 11
9 #define NB_BINS_COMPRESSED_SM_F0 11
9 #define NB_BINS_COMPRESSED_SM_F1 13
10 #define NB_BINS_COMPRESSED_SM_F1 13
@@ -13,8 +13,8
13 #include <stdio.h>
13 #include <stdio.h>
14 #include <stdlib.h>
14 #include <stdlib.h>
15
15
16 extern volatile int spec_mat_f0_a[ ];
16 extern volatile int spec_mat_f0_0[ ];
17 extern volatile int spec_mat_f0_b[ ];
17 extern volatile int spec_mat_f0_1[ ];
18 extern volatile int spec_mat_f0_c[ ];
18 extern volatile int spec_mat_f0_c[ ];
19 extern volatile int spec_mat_f0_d[ ];
19 extern volatile int spec_mat_f0_d[ ];
20 extern volatile int spec_mat_f0_e[ ];
20 extern volatile int spec_mat_f0_e[ ];
@@ -22,8 +22,20 extern volatile int spec_mat_f0_f[ ];
22 extern volatile int spec_mat_f0_g[ ];
22 extern volatile int spec_mat_f0_g[ ];
23 extern volatile int spec_mat_f0_h[ ];
23 extern volatile int spec_mat_f0_h[ ];
24
24
25 extern volatile int spec_mat_f1[ ];
26 extern volatile int spec_mat_f2[ ];
27
28 extern volatile int spec_mat_f1_bis[ ];
29 extern volatile int spec_mat_f2_bis[ ];
30 extern volatile int spec_mat_f0_0_bis[ ];
31 extern volatile int spec_mat_f0_1_bis[ ];
32
25 extern rtems_id Task_id[ ]; /* array of task ids */
33 extern rtems_id Task_id[ ]; /* array of task ids */
26
34
35 // parameters
36 extern struct param_local_str param_local;
37
38 // registers
27 extern time_management_regs_t *time_management_regs;
39 extern time_management_regs_t *time_management_regs;
28 extern spectral_matrix_regs_t *spectral_matrix_regs;
40 extern spectral_matrix_regs_t *spectral_matrix_regs;
29
41
@@ -49,7 +61,7 void init_header_asm( Header_TM_LFR_SCIE
49 void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix,
61 void send_spectral_matrix(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix,
50 unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send);
62 unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send);
51 void convert_averaged_spectral_matrix(volatile float *input_matrix, char *output_matrix);
63 void convert_averaged_spectral_matrix(volatile float *input_matrix, char *output_matrix);
52 void init_averaged_spectral_matrix();
64 void fill_averaged_spectral_matrix();
53 void reset_spectral_matrix_regs();
65 void reset_spectral_matrix_regs();
54
66
55 #endif // FSW_RTEMS_PROCESSING_H_INCLUDED
67 #endif // FSW_RTEMS_PROCESSING_H_INCLUDED
@@ -66,6 +66,8 int enter_normal_mode(ccsdsTelecommandPa
66 int enter_burst_mode(ccsdsTelecommandPacket_t *TC);
66 int enter_burst_mode(ccsdsTelecommandPacket_t *TC);
67 int enter_sbm1_mode(ccsdsTelecommandPacket_t *TC);
67 int enter_sbm1_mode(ccsdsTelecommandPacket_t *TC);
68 int enter_sbm2_mode(ccsdsTelecommandPacket_t *TC);
68 int enter_sbm2_mode(ccsdsTelecommandPacket_t *TC);
69 int restart_science_tasks();
70 int suspend_science_tasks();
69 // parameters loading
71 // parameters loading
70 int action_load_comm(ccsdsTelecommandPacket_t *TC);
72 int action_load_comm(ccsdsTelecommandPacket_t *TC);
71 int action_load_norm(ccsdsTelecommandPacket_t *TC);
73 int action_load_norm(ccsdsTelecommandPacket_t *TC);
@@ -22,11 +22,13 extern volatile int wf_snap_f1_bis[ ];
22 extern volatile int wf_snap_f2[ ];
22 extern volatile int wf_snap_f2[ ];
23 extern volatile int wf_snap_f2_bis[ ];
23 extern volatile int wf_snap_f2_bis[ ];
24 extern volatile int wf_cont_f3[ ];
24 extern volatile int wf_cont_f3[ ];
25 extern volatile int wf_cont_f3_bis[ ];
25 extern waveform_picker_regs_t *waveform_picker_regs;
26 extern waveform_picker_regs_t *waveform_picker_regs;
26
27
27 rtems_isr waveforms_isr( rtems_vector_number vector );
28 rtems_isr waveforms_isr( rtems_vector_number vector );
28 rtems_isr waveforms_simulator_isr( rtems_vector_number vector );
29 rtems_isr waveforms_simulator_isr( rtems_vector_number vector );
29 rtems_task wfrm_task(rtems_task_argument argument);
30 rtems_task wfrm_task(rtems_task_argument argument);
31 rtems_task cwf3_task(rtems_task_argument argument);
30
32
31 //******************
33 //******************
32 // general functions
34 // general functions
@@ -34,22 +36,31 void init_waveforms( void );
34 void init_header_snapshot_wf( Header_TM_LFR_SCIENCE_SWF_t *header );
36 void init_header_snapshot_wf( Header_TM_LFR_SCIENCE_SWF_t *header );
35 void init_header_continuous_wf( Header_TM_LFR_SCIENCE_CWF_t *header );
37 void init_header_continuous_wf( Header_TM_LFR_SCIENCE_CWF_t *header );
36 void reset_waveforms( void );
38 void reset_waveforms( void );
37 void send_waveform_norm(Header_TM_LFR_SCIENCE_SWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send);
39 void send_waveform_norm( Header_TM_LFR_SCIENCE_SWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send );
38 void send_waveform_burst(Header_TM_LFR_SCIENCE_CWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send);
40 void send_waveform_burst( Header_TM_LFR_SCIENCE_CWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send );
39 void send_waveform_sbm1(Header_TM_LFR_SCIENCE_CWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send);
41 void send_waveform_sbm1( Header_TM_LFR_SCIENCE_CWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send );
40 void send_waveform_sbm2(Header_TM_LFR_SCIENCE_CWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send);
42 void send_waveform_sbm2( Header_TM_LFR_SCIENCE_CWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send );
43 void send_waveform_norm_cwf_f3(Header_TM_LFR_SCIENCE_CWF_t *header, spw_ioctl_pkt_send *spw_ioctl_send );
44
41 void send_waveform_SWF( Header_TM_LFR_SCIENCE_SWF_t *header, volatile int *waveform,
45 void send_waveform_SWF( Header_TM_LFR_SCIENCE_SWF_t *header, volatile int *waveform,
42 unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send);
46 unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send );
43 void send_waveform_CWF( Header_TM_LFR_SCIENCE_CWF_t *header, volatile int *waveform,
47 void send_waveform_CWF( Header_TM_LFR_SCIENCE_CWF_t *header, volatile int *waveform,
44 unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send);
48 unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send );
45
49
46 //**************
50 //**************
47 // wfp registers
51 // wfp registers
48 void set_wfp_data_shaping(unsigned char data_shaping);
52 void set_wfp_data_shaping();
49 void set_wfp_delta_snapshot(unsigned int delta_snapshot);
53 char set_wfp_delta_snapshot();
54 void set_wfp_burst_enable_register( unsigned char mode);
50 void reset_wfp_burst_enable();
55 void reset_wfp_burst_enable();
51 void reset_waveform_picker_regs();
56 void reset_waveform_picker_regs();
52 //
57
53 int build_value(int value1, int value0);
58 //*****************
59 // local parameters
60 void set_local_sbm1_nb_cwf_max();
61 void set_local_sbm2_nb_cwf_max();
62 void set_local_nb_interrupt_f0_MAX();
63 void reset_local_sbm1_nb_cwf_sent();
64 void reset_local_sbm2_nb_cwf_sent();
54
65
55 #endif // WF_HANDLER_H_INCLUDED
66 #endif // WF_HANDLER_H_INCLUDED
@@ -29,23 +29,25 volatile int wf_snap_f1_bis[ NB_SAMPLES_
29 volatile int wf_snap_f2[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
29 volatile int wf_snap_f2[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
30 volatile int wf_snap_f2_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
30 volatile int wf_snap_f2_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
31 volatile int wf_cont_f3[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
31 volatile int wf_cont_f3[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
32 volatile int wf_cont_f3_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
32
33
33 // SPECTRAL MATRICES GLOBAL VARIABLES
34 // SPECTRAL MATRICES GLOBAL VARIABLES
34 volatile int spec_mat_f0_a[ TOTAL_SIZE_SM ];
35 volatile int spec_mat_f0_0[ SM_HEADER + TOTAL_SIZE_SM ];
35 volatile int spec_mat_f0_b[ TOTAL_SIZE_SM ];
36 volatile int spec_mat_f0_1[ SM_HEADER + TOTAL_SIZE_SM ];
36 volatile int spec_mat_f0_c[ TOTAL_SIZE_SM ];
37 volatile int spec_mat_f0_c[ SM_HEADER + TOTAL_SIZE_SM ];
37 volatile int spec_mat_f0_d[ TOTAL_SIZE_SM ];
38 volatile int spec_mat_f0_d[ SM_HEADER + TOTAL_SIZE_SM ];
38 volatile int spec_mat_f0_e[ TOTAL_SIZE_SM ];
39 volatile int spec_mat_f0_e[ SM_HEADER + TOTAL_SIZE_SM ];
39 volatile int spec_mat_f0_f[ TOTAL_SIZE_SM ];
40 volatile int spec_mat_f0_f[ SM_HEADER + TOTAL_SIZE_SM ];
40 volatile int spec_mat_f0_g[ TOTAL_SIZE_SM ];
41 volatile int spec_mat_f0_g[ SM_HEADER + TOTAL_SIZE_SM ];
41 volatile int spec_mat_f0_h[ TOTAL_SIZE_SM ];
42 volatile int spec_mat_f0_h[ SM_HEADER + TOTAL_SIZE_SM ];
43 volatile int spec_mat_f0_0_bis[ SM_HEADER + TOTAL_SIZE_SM ];
44 volatile int spec_mat_f0_1_bis[ SM_HEADER + TOTAL_SIZE_SM ];
42 //
45 //
43 volatile int spec_mat_f1_a[ TOTAL_SIZE_SM ];
46 volatile int spec_mat_f1[ SM_HEADER + TOTAL_SIZE_SM ];
44 volatile int spec_mat_f2_a[ TOTAL_SIZE_SM ];
47 volatile int spec_mat_f1_bis[ SM_HEADER + TOTAL_SIZE_SM ];
45 //
48 //
46 volatile int spec_mat_f0_a_bis[ TOTAL_SIZE_SM ];
49 volatile int spec_mat_f2[ SM_HEADER + TOTAL_SIZE_SM ];
47 volatile int spec_mat_f1_a_bis[ TOTAL_SIZE_SM ];
50 volatile int spec_mat_f2_bis[ SM_HEADER + TOTAL_SIZE_SM ];
48 volatile int spec_mat_f2_a_bis[ TOTAL_SIZE_SM ];
49
51
50 // MODE PARAMETERS
52 // MODE PARAMETERS
51 Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
53 Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet;
@@ -81,31 +81,30 rtems_task Init( rtems_task_argument ign
81
81
82 spacewire_configure_link();
82 spacewire_configure_link();
83
83
84 //****************************
84 #ifdef GSA
85 // Spectral Matrices simulator
85 // Spectral Matrices simulator
86 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR,
86 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR,
87 IRQ_SPARC_SM, spectral_matrices_isr );
87 IRQ_SPARC_SM, spectral_matrices_isr );
88
89 //**********
88 //**********
90 // WAVEFORMS
89 // WAVEFORMS
91
92 #ifdef GSA
93 // simulator
94 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR, CLKDIV_WF_SIMULATOR,
90 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR, CLKDIV_WF_SIMULATOR,
95 IRQ_SPARC_WF, waveforms_simulator_isr );
91 IRQ_SPARC_WF, waveforms_simulator_isr );
92 LEON_Mask_interrupt( IRQ_SM );
96 LEON_Mask_interrupt( IRQ_WF );
93 LEON_Mask_interrupt( IRQ_WF );
97 #else
94 #else
98 // configure the waveform picker
95 // reset configuration registers
99 reset_waveform_picker_regs();
96 reset_waveform_picker_regs();
97 reset_spectral_matrix_regs();
98 // configure IRQ handling for the waveform picker unit
100 status = rtems_interrupt_catch( waveforms_isr,
99 status = rtems_interrupt_catch( waveforms_isr,
101 IRQ_SPARC_WAVEFORM_PICKER,
100 IRQ_SPARC_WAVEFORM_PICKER,
102 &old_isr_handler) ;
101 &old_isr_handler) ;
103 LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER );
102 // configure IRQ handling for the spectral matrix unit
104 // configure the spectral matrix
103 status = rtems_interrupt_catch( spectral_matrices_isr,
105 reset_spectral_matrix_regs();
106 status = rtems_interrupt_catch( waveforms_isr,
107 IRQ_SPARC_SPECTRAL_MATRIX,
104 IRQ_SPARC_SPECTRAL_MATRIX,
108 &old_isr_handler) ;
105 &old_isr_handler) ;
106 // mask IRQ lines
107 LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER );
109 LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX );
108 LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX );
110 #endif
109 #endif
111
110
@@ -163,34 +162,28 void init_parameter_dump(void)
163
162
164 //****************
163 //****************
165 // SBM1 PARAMETERS
164 // SBM1 PARAMETERS
166 parameter_dump_packet.sy_lfr_s1_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P0;
165 parameter_dump_packet.sy_lfr_s1_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P0; // min value is 0.25 s for the period
167 parameter_dump_packet.sy_lfr_s1_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P0;
166 parameter_dump_packet.sy_lfr_s1_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S1_BP_P1;
168
167
169 //****************
168 //****************
170 // SBM2 PARAMETERS
169 // SBM2 PARAMETERS
171 parameter_dump_packet.sy_lfr_s2_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P0;
170 parameter_dump_packet.sy_lfr_s2_bp_p0 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P0;
172 parameter_dump_packet.sy_lfr_s2_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P0;
171 parameter_dump_packet.sy_lfr_s2_bp_p1 = (unsigned char) DEFAULT_SY_LFR_S2_BP_P1;
173 }
172 }
174
173
175 void init_local_mode_parameters(void)
174 void init_local_mode_parameters(void)
176 {
175 {
177 // LOCAL PARAMETERS
176 // LOCAL PARAMETERS
178 // (2 snapshots of 2048 points per seconds) * (period of the NORM snashots)
177 set_local_sbm1_nb_cwf_max();
179 param_local.local_sbm1_nb_cwf_max = 2 * (
178 set_local_sbm2_nb_cwf_max();
180 parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
179 set_local_nb_interrupt_f0_MAX();
181 + parameter_dump_packet.sy_lfr_n_swf_p[1]
182 );
183 // (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz)
184 param_local.local_sbm2_nb_cwf_max = (
185 parameter_dump_packet.sy_lfr_n_swf_p[0] * 256
186 + parameter_dump_packet.sy_lfr_n_swf_p[1]
187 )/ 8;
188
180
189 PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max)
181 PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max)
190 PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max)
182 PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max)
183 PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX)
191
184
192 param_local.local_sbm1_nb_cwf_sent = 0;
185 reset_local_sbm1_nb_cwf_sent();
193 param_local.local_sbm2_nb_cwf_sent = 0;
186 reset_local_sbm2_nb_cwf_sent();
194 }
187 }
195
188
196 void init_housekeeping_parameters(void)
189 void init_housekeeping_parameters(void)
@@ -240,6 +233,7 int create_names( void )
240 Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' );
233 Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' );
241 Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' );
234 Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' );
242 Task_name[TASKID_MATR] = rtems_build_name( 'M', 'A', 'T', 'R' );
235 Task_name[TASKID_MATR] = rtems_build_name( 'M', 'A', 'T', 'R' );
236 Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' );
243
237
244 // rate monotonic period name
238 // rate monotonic period name
245 HK_name = rtems_build_name( 'H', 'O', 'U', 'S' );
239 HK_name = rtems_build_name( 'H', 'O', 'U', 'S' );
@@ -277,7 +271,7 int create_all_tasks( void )
277 );
271 );
278 // STAT
272 // STAT
279 status = rtems_task_create(
273 status = rtems_task_create(
280 Task_name[TASKID_STAT], 150, RTEMS_MINIMUM_STACK_SIZE * 2,
274 Task_name[TASKID_STAT], 251, RTEMS_MINIMUM_STACK_SIZE * 2,
281 RTEMS_DEFAULT_MODES,
275 RTEMS_DEFAULT_MODES,
282 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT]
276 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT]
283 );
277 );
@@ -317,6 +311,12 int create_all_tasks( void )
317 RTEMS_DEFAULT_MODES,
311 RTEMS_DEFAULT_MODES,
318 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_MATR]
312 RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_MATR]
319 );
313 );
314 // CWF3
315 status = rtems_task_create(
316 Task_name[TASKID_CWF3], 250, RTEMS_MINIMUM_STACK_SIZE * 2,
317 RTEMS_DEFAULT_MODES,
318 RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_CWF3]
319 );
320
320
321 return 0;
321 return 0;
322 }
322 }
@@ -327,57 +327,62 int start_all_tasks( void )
327
327
328 status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 );
328 status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 );
329 if (status!=RTEMS_SUCCESSFUL) {
329 if (status!=RTEMS_SUCCESSFUL) {
330 PRINTF("In INIT *** Error starting TASK_SPIQ\n")
330 PRINTF("in INIT *** Error starting TASK_SPIQ\n")
331 }
331 }
332
332
333 status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 );
333 status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 );
334 if (status!=RTEMS_SUCCESSFUL) {
334 if (status!=RTEMS_SUCCESSFUL) {
335 PRINTF("In INIT *** Error starting TASK_RECV\n")
335 PRINTF("in INIT *** Error starting TASK_RECV\n")
336 }
336 }
337
337
338 status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 );
338 status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 );
339 if (status!=RTEMS_SUCCESSFUL) {
339 if (status!=RTEMS_SUCCESSFUL) {
340 PRINTF("In INIT *** Error starting TASK_ACTN\n")
340 PRINTF("in INIT *** Error starting TASK_ACTN\n")
341 }
341 }
342
342
343 status = rtems_task_start( Task_id[TASKID_SMIQ], smiq_task, 1 );
343 status = rtems_task_start( Task_id[TASKID_SMIQ], smiq_task, 1 );
344 if (status!=RTEMS_SUCCESSFUL) {
344 if (status!=RTEMS_SUCCESSFUL) {
345 PRINTF("In INIT *** Error starting TASK_BPPR\n")
345 PRINTF("in INIT *** Error starting TASK_BPPR\n")
346 }
346 }
347
347
348 status = rtems_task_start( Task_id[