@@ -1,95 +1,95 | |||||
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 *** vhdl_dev *** debug_tch |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch | |
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=-1-0 |
|
10 | SWVERSION=-1-0 | |
11 | DEFINES += SW_VERSION_N1=1 # major |
|
11 | DEFINES += SW_VERSION_N1=1 # major | |
12 | DEFINES += SW_VERSION_N2=0 # minor |
|
12 | DEFINES += SW_VERSION_N2=0 # minor | |
13 | DEFINES += SW_VERSION_N3=0 # patch |
|
13 | DEFINES += SW_VERSION_N3=0 # patch | |
14 |
DEFINES += SW_VERSION_N4= |
|
14 | DEFINES += SW_VERSION_N4=9 # internal | |
15 |
|
15 | |||
16 | contains( CONFIG, debug_tch ) { |
|
16 | contains( CONFIG, debug_tch ) { | |
17 | DEFINES += DEBUG_TCH |
|
17 | DEFINES += DEBUG_TCH | |
18 | } |
|
18 | } | |
19 |
|
19 | |||
20 | contains( CONFIG, vhdl_dev ) { |
|
20 | contains( CONFIG, vhdl_dev ) { | |
21 | DEFINES += VHDL_DEV |
|
21 | DEFINES += VHDL_DEV | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | contains( CONFIG, verbose ) { |
|
24 | contains( CONFIG, verbose ) { | |
25 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
|
25 | DEFINES += PRINT_MESSAGES_ON_CONSOLE | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | contains( CONFIG, debug_messages ) { |
|
28 | contains( CONFIG, debug_messages ) { | |
29 | DEFINES += DEBUG_MESSAGES |
|
29 | DEFINES += DEBUG_MESSAGES | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
32 | contains( CONFIG, cpu_usage_report ) { |
|
32 | contains( CONFIG, cpu_usage_report ) { | |
33 | DEFINES += PRINT_TASK_STATISTICS |
|
33 | DEFINES += PRINT_TASK_STATISTICS | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | contains( CONFIG, stack_report ) { |
|
36 | contains( CONFIG, stack_report ) { | |
37 | DEFINES += PRINT_STACK_REPORT |
|
37 | DEFINES += PRINT_STACK_REPORT | |
38 | } |
|
38 | } | |
39 |
|
39 | |||
40 | contains( CONFIG, boot_messages ) { |
|
40 | contains( CONFIG, boot_messages ) { | |
41 | DEFINES += BOOT_MESSAGES |
|
41 | DEFINES += BOOT_MESSAGES | |
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | #doxygen.target = doxygen |
|
44 | #doxygen.target = doxygen | |
45 | #doxygen.commands = doxygen ../doc/Doxyfile |
|
45 | #doxygen.commands = doxygen ../doc/Doxyfile | |
46 | #QMAKE_EXTRA_TARGETS += doxygen |
|
46 | #QMAKE_EXTRA_TARGETS += doxygen | |
47 |
|
47 | |||
48 | TARGET = fsw |
|
48 | TARGET = fsw | |
49 |
|
49 | |||
50 | INCLUDEPATH += \ |
|
50 | INCLUDEPATH += \ | |
51 | ../src \ |
|
51 | ../src \ | |
52 | ../header \ |
|
52 | ../header \ | |
53 | ../header/processing \ |
|
53 | ../header/processing \ | |
54 | ../src/LFR_basic-parameters |
|
54 | ../src/LFR_basic-parameters | |
55 |
|
55 | |||
56 | SOURCES += \ |
|
56 | SOURCES += \ | |
57 | ../src/wf_handler.c \ |
|
57 | ../src/wf_handler.c \ | |
58 | ../src/tc_handler.c \ |
|
58 | ../src/tc_handler.c \ | |
59 | ../src/fsw_misc.c \ |
|
59 | ../src/fsw_misc.c \ | |
60 | ../src/fsw_init.c \ |
|
60 | ../src/fsw_init.c \ | |
61 | ../src/fsw_globals.c \ |
|
61 | ../src/fsw_globals.c \ | |
62 | ../src/fsw_spacewire.c \ |
|
62 | ../src/fsw_spacewire.c \ | |
63 | ../src/tc_load_dump_parameters.c \ |
|
63 | ../src/tc_load_dump_parameters.c \ | |
64 | ../src/tm_lfr_tc_exe.c \ |
|
64 | ../src/tm_lfr_tc_exe.c \ | |
65 | ../src/tc_acceptance.c \ |
|
65 | ../src/tc_acceptance.c \ | |
66 | ../src/processing/fsw_processing.c \ |
|
66 | ../src/processing/fsw_processing.c \ | |
67 | ../src/processing/avf0_prc0.c \ |
|
67 | ../src/processing/avf0_prc0.c \ | |
68 | ../src/processing/avf1_prc1.c \ |
|
68 | ../src/processing/avf1_prc1.c \ | |
69 | ../src/processing/avf2_prc2.c \ |
|
69 | ../src/processing/avf2_prc2.c \ | |
70 | ../src/lfr_cpu_usage_report.c \ |
|
70 | ../src/lfr_cpu_usage_report.c \ | |
71 | ../src/LFR_basic-parameters/basic_parameters.c |
|
71 | ../src/LFR_basic-parameters/basic_parameters.c | |
72 |
|
72 | |||
73 | HEADERS += \ |
|
73 | HEADERS += \ | |
74 | ../header/wf_handler.h \ |
|
74 | ../header/wf_handler.h \ | |
75 | ../header/tc_handler.h \ |
|
75 | ../header/tc_handler.h \ | |
76 | ../header/grlib_regs.h \ |
|
76 | ../header/grlib_regs.h \ | |
77 | ../header/fsw_params.h \ |
|
77 | ../header/fsw_params.h \ | |
78 | ../header/fsw_misc.h \ |
|
78 | ../header/fsw_misc.h \ | |
79 | ../header/fsw_init.h \ |
|
79 | ../header/fsw_init.h \ | |
80 | ../header/ccsds_types.h \ |
|
80 | ../header/ccsds_types.h \ | |
81 | ../header/fsw_spacewire.h \ |
|
81 | ../header/fsw_spacewire.h \ | |
82 | ../header/tc_load_dump_parameters.h \ |
|
82 | ../header/tc_load_dump_parameters.h \ | |
83 | ../header/tm_lfr_tc_exe.h \ |
|
83 | ../header/tm_lfr_tc_exe.h \ | |
84 | ../header/tc_acceptance.h \ |
|
84 | ../header/tc_acceptance.h \ | |
85 | ../header/fsw_params_nb_bytes.h \ |
|
85 | ../header/fsw_params_nb_bytes.h \ | |
86 | ../header/fsw_params_processing.h \ |
|
86 | ../header/fsw_params_processing.h \ | |
87 | ../header/processing/fsw_processing.h \ |
|
87 | ../header/processing/fsw_processing.h \ | |
88 | ../header/processing/avf0_prc0.h \ |
|
88 | ../header/processing/avf0_prc0.h \ | |
89 | ../header/processing/avf1_prc1.h \ |
|
89 | ../header/processing/avf1_prc1.h \ | |
90 | ../header/processing/avf2_prc2.h \ |
|
90 | ../header/processing/avf2_prc2.h \ | |
91 | ../header/fsw_params_wf_handler.h \ |
|
91 | ../header/fsw_params_wf_handler.h \ | |
92 | ../header/lfr_cpu_usage_report.h \ |
|
92 | ../header/lfr_cpu_usage_report.h \ | |
93 | ../src/LFR_basic-parameters/basic_parameters.h \ |
|
93 | ../src/LFR_basic-parameters/basic_parameters.h \ | |
94 | ../src/LFR_basic-parameters/basic_parameters_params.h |
|
94 | ../src/LFR_basic-parameters/basic_parameters_params.h | |
95 |
|
95 |
@@ -1,201 +1,201 | |||||
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 3.0.1, 2014-06-1 |
|
3 | <!-- Written by QtCreator 3.0.1, 2014-06-12T07:00:58. --> | |
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="QByteArray" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QByteArray" 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="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QByteArray" 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">UTF-8</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</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. |
|
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. |
|
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">{ |
|
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> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> |
|
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
72 | </valuemap> |
|
72 | </valuemap> | |
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
79 | <value type="QString">-w</value> |
|
79 | <value type="QString">-w</value> | |
80 | <value type="QString">-r</value> |
|
80 | <value type="QString">-r</value> | |
81 | </valuelist> |
|
81 | </valuelist> | |
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
85 | </valuemap> |
|
85 | </valuemap> | |
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
90 | </valuemap> |
|
90 | </valuemap> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
98 | <value type="QString">-w</value> |
|
98 | <value type="QString">-w</value> | |
99 | <value type="QString">-r</value> |
|
99 | <value type="QString">-r</value> | |
100 | </valuelist> |
|
100 | </valuelist> | |
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
104 | </valuemap> |
|
104 | </valuemap> | |
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
109 | </valuemap> |
|
109 | </valuemap> | |
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | |
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</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">ProjectExplorer.BuildSteps.Deploy</value> |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
126 | </valuemap> |
|
126 | </valuemap> | |
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
|
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
131 | </valuemap> |
|
131 | </valuemap> | |
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> |
|
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | |
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> |
|
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | |
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
|
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | |
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> |
|
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | |
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
153 | <value type="int">0</value> |
|
153 | <value type="int">0</value> | |
154 | <value type="int">1</value> |
|
154 | <value type="int">1</value> | |
155 | <value type="int">2</value> |
|
155 | <value type="int">2</value> | |
156 | <value type="int">3</value> |
|
156 | <value type="int">3</value> | |
157 | <value type="int">4</value> |
|
157 | <value type="int">4</value> | |
158 | <value type="int">5</value> |
|
158 | <value type="int">5</value> | |
159 | <value type="int">6</value> |
|
159 | <value type="int">6</value> | |
160 | <value type="int">7</value> |
|
160 | <value type="int">7</value> | |
161 | <value type="int">8</value> |
|
161 | <value type="int">8</value> | |
162 | <value type="int">9</value> |
|
162 | <value type="int">9</value> | |
163 | <value type="int">10</value> |
|
163 | <value type="int">10</value> | |
164 | <value type="int">11</value> |
|
164 | <value type="int">11</value> | |
165 | <value type="int">12</value> |
|
165 | <value type="int">12</value> | |
166 | <value type="int">13</value> |
|
166 | <value type="int">13</value> | |
167 | <value type="int">14</value> |
|
167 | <value type="int">14</value> | |
168 | </valuelist> |
|
168 | </valuelist> | |
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</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.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
185 | </valuemap> |
|
185 | </valuemap> | |
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
187 | </valuemap> |
|
187 | </valuemap> | |
188 | </data> |
|
188 | </data> | |
189 | <data> |
|
189 | <data> | |
190 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
190 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
191 | <value type="int">1</value> |
|
191 | <value type="int">1</value> | |
192 | </data> |
|
192 | </data> | |
193 | <data> |
|
193 | <data> | |
194 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
194 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
195 |
<value type="QByteArray">{ |
|
195 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
196 | </data> |
|
196 | </data> | |
197 | <data> |
|
197 | <data> | |
198 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
198 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
199 | <value type="int">15</value> |
|
199 | <value type="int">15</value> | |
200 | </data> |
|
200 | </data> | |
201 | </qtcreator> |
|
201 | </qtcreator> |
@@ -1,665 +1,665 | |||||
1 | #ifndef CCSDS_TYPES_H_INCLUDED |
|
1 | #ifndef CCSDS_TYPES_H_INCLUDED | |
2 | #define CCSDS_TYPES_H_INCLUDED |
|
2 | #define CCSDS_TYPES_H_INCLUDED | |
3 |
|
3 | |||
4 | #include "fsw_params_processing.h" |
|
4 | #include "fsw_params_processing.h" | |
5 |
|
5 | |||
6 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 |
|
6 | #define CCSDS_PROTOCOLE_EXTRA_BYTES 4 | |
7 | #define CCSDS_TC_TM_PACKET_OFFSET 7 |
|
7 | #define CCSDS_TC_TM_PACKET_OFFSET 7 | |
8 | #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4 |
|
8 | #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4 | |
9 | #define CCSDS_TM_PKT_MAX_SIZE 4412 |
|
9 | #define CCSDS_TM_PKT_MAX_SIZE 4412 | |
10 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 |
|
10 | #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4 | |
11 | #define CCSDS_TC_PKT_MAX_SIZE 256 |
|
11 | #define CCSDS_TC_PKT_MAX_SIZE 256 | |
12 | #define CCSDS_TC_PKT_MIN_SIZE 16 |
|
12 | #define CCSDS_TC_PKT_MIN_SIZE 16 | |
13 | #define CCSDS_PROCESS_ID 76 |
|
13 | #define CCSDS_PROCESS_ID 76 | |
14 | #define CCSDS_PACKET_CATEGORY 12 |
|
14 | #define CCSDS_PACKET_CATEGORY 12 | |
15 | #define CCSDS_NODE_ADDRESS 0xfe |
|
15 | #define CCSDS_NODE_ADDRESS 0xfe | |
16 | #define CCSDS_USER_APP 0x00 |
|
16 | #define CCSDS_USER_APP 0x00 | |
17 |
|
17 | |||
18 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 |
|
18 | #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10 | |
19 | #define DEFAULT_RESERVED 0x00 |
|
19 | #define DEFAULT_RESERVED 0x00 | |
20 | #define DEFAULT_HKBIA 0x1e // 0001 1110 |
|
20 | #define DEFAULT_HKBIA 0x1e // 0001 1110 | |
21 |
|
21 | |||
22 | // PACKET ID |
|
22 | // PACKET ID | |
23 | #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1 |
|
23 | #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1 | |
24 | #define APID_TM_HK 0x0cc4 // PID 76 CAT 4 |
|
24 | #define APID_TM_HK 0x0cc4 // PID 76 CAT 4 | |
25 | #define APID_TM_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9 |
|
25 | #define APID_TM_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9 | |
26 | #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 |
|
26 | #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 | |
27 | #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 |
|
27 | #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 | |
28 | #define TM_PACKET_PID_DEFAULT 76 |
|
28 | #define TM_PACKET_PID_DEFAULT 76 | |
29 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 |
|
29 | #define TM_PACKET_PID_BURST_SBM1_SBM2 79 | |
30 | #define TM_PACKET_CAT_TC_EXE 1 |
|
30 | #define TM_PACKET_CAT_TC_EXE 1 | |
31 | #define TM_PACKET_CAT_HK 4 |
|
31 | #define TM_PACKET_CAT_HK 4 | |
32 | #define TM_PACKET_CAT_PARAMETER_DUMP 9 |
|
32 | #define TM_PACKET_CAT_PARAMETER_DUMP 9 | |
33 | #define TM_PACKET_CAT_SCIENCE 12 |
|
33 | #define TM_PACKET_CAT_SCIENCE 12 | |
34 | #define TC_PACKET_CAT 12 |
|
34 | #define TC_PACKET_CAT 12 | |
35 |
|
35 | |||
36 | // PACKET SEQUENCE CONTROL |
|
36 | // PACKET SEQUENCE CONTROL | |
37 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] |
|
37 | #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] | |
38 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] |
|
38 | #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000] | |
39 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] |
|
39 | #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000] | |
40 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] |
|
40 | #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000] | |
41 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] |
|
41 | #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000] | |
42 |
|
42 | |||
43 | // DESTINATION ID |
|
43 | // DESTINATION ID | |
44 | #define TM_DESTINATION_ID_GROUND 0 |
|
44 | #define TM_DESTINATION_ID_GROUND 0 | |
45 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 |
|
45 | #define TM_DESTINATION_ID_MISSION_TIMELINE 110 | |
46 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 |
|
46 | #define TM_DESTINATION_ID_TC_SEQUENCES 111 | |
47 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 |
|
47 | #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112 | |
48 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 |
|
48 | #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113 | |
49 | #define TM_DESTINATION_ID_DIRECT_CMD 120 |
|
49 | #define TM_DESTINATION_ID_DIRECT_CMD 120 | |
50 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 |
|
50 | #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121 | |
51 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 |
|
51 | #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122 | |
52 | #define TM_DESTINATION_ID_OBCP 15 |
|
52 | #define TM_DESTINATION_ID_OBCP 15 | |
53 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 |
|
53 | #define TM_DESTINATION_ID_SYSTEM_CONTROL 14 | |
54 | #define TM_DESTINATION_ID_AOCS 11 |
|
54 | #define TM_DESTINATION_ID_AOCS 11 | |
55 |
|
55 | |||
56 | #define CCSDS_DESTINATION_ID 0x01 |
|
56 | #define CCSDS_DESTINATION_ID 0x01 | |
57 | #define CCSDS_PROTOCOLE_ID 0x02 |
|
57 | #define CCSDS_PROTOCOLE_ID 0x02 | |
58 | #define CCSDS_RESERVED 0x00 |
|
58 | #define CCSDS_RESERVED 0x00 | |
59 | #define CCSDS_USER_APP 0x00 |
|
59 | #define CCSDS_USER_APP 0x00 | |
60 |
|
60 | |||
61 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 |
|
61 | #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24 | |
62 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 |
|
62 | #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32 | |
63 | #define SIZE_HK_PARAMETERS 112 |
|
63 | #define SIZE_HK_PARAMETERS 112 | |
64 |
|
64 | |||
65 | // TC TYPES |
|
65 | // TC TYPES | |
66 | #define TC_TYPE_GEN 181 |
|
66 | #define TC_TYPE_GEN 181 | |
67 | #define TC_TYPE_TIME 9 |
|
67 | #define TC_TYPE_TIME 9 | |
68 |
|
68 | |||
69 | // TC SUBTYPES |
|
69 | // TC SUBTYPES | |
70 | #define TC_SUBTYPE_RESET 1 |
|
70 | #define TC_SUBTYPE_RESET 1 | |
71 | #define TC_SUBTYPE_LOAD_COMM 11 |
|
71 | #define TC_SUBTYPE_LOAD_COMM 11 | |
72 | #define TC_SUBTYPE_LOAD_NORM 13 |
|
72 | #define TC_SUBTYPE_LOAD_NORM 13 | |
73 | #define TC_SUBTYPE_LOAD_BURST 19 |
|
73 | #define TC_SUBTYPE_LOAD_BURST 19 | |
74 | #define TC_SUBTYPE_LOAD_SBM1 25 |
|
74 | #define TC_SUBTYPE_LOAD_SBM1 25 | |
75 | #define TC_SUBTYPE_LOAD_SBM2 27 |
|
75 | #define TC_SUBTYPE_LOAD_SBM2 27 | |
76 | #define TC_SUBTYPE_DUMP 31 |
|
76 | #define TC_SUBTYPE_DUMP 31 | |
77 | #define TC_SUBTYPE_ENTER 41 |
|
77 | #define TC_SUBTYPE_ENTER 41 | |
78 | #define TC_SUBTYPE_UPDT_INFO 51 |
|
78 | #define TC_SUBTYPE_UPDT_INFO 51 | |
79 | #define TC_SUBTYPE_EN_CAL 61 |
|
79 | #define TC_SUBTYPE_EN_CAL 61 | |
80 | #define TC_SUBTYPE_DIS_CAL 63 |
|
80 | #define TC_SUBTYPE_DIS_CAL 63 | |
81 | #define TC_SUBTYPE_UPDT_TIME 129 |
|
81 | #define TC_SUBTYPE_UPDT_TIME 129 | |
82 |
|
82 | |||
83 | // TC LEN |
|
83 | // TC LEN | |
84 | #define TC_LEN_RESET 12 |
|
84 | #define TC_LEN_RESET 12 | |
85 | #define TC_LEN_LOAD_COMM 14 |
|
85 | #define TC_LEN_LOAD_COMM 14 | |
86 | #define TC_LEN_LOAD_NORM 22 |
|
86 | #define TC_LEN_LOAD_NORM 22 | |
87 | #define TC_LEN_LOAD_BURST 14 |
|
87 | #define TC_LEN_LOAD_BURST 14 | |
88 | #define TC_LEN_LOAD_SBM1 14 |
|
88 | #define TC_LEN_LOAD_SBM1 14 | |
89 | #define TC_LEN_LOAD_SBM2 14 |
|
89 | #define TC_LEN_LOAD_SBM2 14 | |
90 | #define TC_LEN_DUMP 12 |
|
90 | #define TC_LEN_DUMP 12 | |
91 | #define TC_LEN_ENTER 20 |
|
91 | #define TC_LEN_ENTER 20 | |
92 | #define TC_LEN_UPDT_INFO 46 |
|
92 | #define TC_LEN_UPDT_INFO 46 | |
93 | #define TC_LEN_EN_CAL 12 |
|
93 | #define TC_LEN_EN_CAL 12 | |
94 | #define TC_LEN_DIS_CAL 12 |
|
94 | #define TC_LEN_DIS_CAL 12 | |
95 | #define TC_LEN_UPDT_TIME 18 |
|
95 | #define TC_LEN_UPDT_TIME 18 | |
96 |
|
96 | |||
97 | // TM TYPES |
|
97 | // TM TYPES | |
98 | #define TM_TYPE_TC_EXE 1 |
|
98 | #define TM_TYPE_TC_EXE 1 | |
99 | #define TM_TYPE_HK 3 |
|
99 | #define TM_TYPE_HK 3 | |
100 | #define TM_TYPE_PARAMETER_DUMP 3 |
|
100 | #define TM_TYPE_PARAMETER_DUMP 3 | |
101 | #define TM_TYPE_LFR_SCIENCE 21 |
|
101 | #define TM_TYPE_LFR_SCIENCE 21 | |
102 |
|
102 | |||
103 | // TM SUBTYPES |
|
103 | // TM SUBTYPES | |
104 | #define TM_SUBTYPE_EXE_OK 7 |
|
104 | #define TM_SUBTYPE_EXE_OK 7 | |
105 | #define TM_SUBTYPE_EXE_NOK 8 |
|
105 | #define TM_SUBTYPE_EXE_NOK 8 | |
106 | #define TM_SUBTYPE_HK 25 |
|
106 | #define TM_SUBTYPE_HK 25 | |
107 | #define TM_SUBTYPE_PARAMETER_DUMP 25 |
|
107 | #define TM_SUBTYPE_PARAMETER_DUMP 25 | |
108 | #define TM_SUBTYPE_SCIENCE 3 |
|
108 | #define TM_SUBTYPE_SCIENCE 3 | |
109 | #define TM_SUBTYPE_LFR_SCIENCE 3 |
|
109 | #define TM_SUBTYPE_LFR_SCIENCE 3 | |
110 |
|
110 | |||
111 | // FAILURE CODES |
|
111 | // FAILURE CODES | |
112 | #define ILLEGAL_APID 0 |
|
112 | #define ILLEGAL_APID 0 | |
113 | #define WRONG_LEN_PKT 1 |
|
113 | #define WRONG_LEN_PKT 1 | |
114 | #define INCOR_CHECKSUM 2 |
|
114 | #define INCOR_CHECKSUM 2 | |
115 | #define ILL_TYPE 3 |
|
115 | #define ILL_TYPE 3 | |
116 | #define ILL_SUBTYPE 4 |
|
116 | #define ILL_SUBTYPE 4 | |
117 | #define WRONG_APP_DATA 5 // 0x00 0x05 |
|
117 | #define WRONG_APP_DATA 5 // 0x00 0x05 | |
118 | #define TC_NOT_EXE 42000 // 0xa4 0x10 |
|
118 | #define TC_NOT_EXE 42000 // 0xa4 0x10 | |
119 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 |
|
119 | #define WRONG_SRC_ID 42001 // 0xa4 0x11 | |
120 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 |
|
120 | #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12 | |
121 | #define FAIL_DETECTED 42003 // 0xa4 0x13 |
|
121 | #define FAIL_DETECTED 42003 // 0xa4 0x13 | |
122 | #define NOT_ALLOWED 42004 // 0xa4 0x14 |
|
122 | #define NOT_ALLOWED 42004 // 0xa4 0x14 | |
123 | #define CORRUPTED 42005 // 0xa4 0x15 |
|
123 | #define CORRUPTED 42005 // 0xa4 0x15 | |
124 | #define CCSDS_TM_VALID 7 |
|
124 | #define CCSDS_TM_VALID 7 | |
125 |
|
125 | |||
126 | // TC SID |
|
126 | // TC SID | |
127 | #define SID_TC_GROUND 0 |
|
127 | #define SID_TC_GROUND 0 | |
128 | #define SID_TC_MISSION_TIMELINE 110 |
|
128 | #define SID_TC_MISSION_TIMELINE 110 | |
129 | #define SID_TC_TC_SEQUENCES 111 |
|
129 | #define SID_TC_TC_SEQUENCES 111 | |
130 | #define SID_TC_RECOVERY_ACTION_CMD 112 |
|
130 | #define SID_TC_RECOVERY_ACTION_CMD 112 | |
131 | #define SID_TC_BACKUP_MISSION_TIMELINE 113 |
|
131 | #define SID_TC_BACKUP_MISSION_TIMELINE 113 | |
132 | #define SID_TC_DIRECT_CMD 120 |
|
132 | #define SID_TC_DIRECT_CMD 120 | |
133 | #define SID_TC_SPARE_GRD_SRC1 121 |
|
133 | #define SID_TC_SPARE_GRD_SRC1 121 | |
134 | #define SID_TC_SPARE_GRD_SRC2 122 |
|
134 | #define SID_TC_SPARE_GRD_SRC2 122 | |
135 | #define SID_TC_OBCP 15 |
|
135 | #define SID_TC_OBCP 15 | |
136 | #define SID_TC_SYSTEM_CONTROL 14 |
|
136 | #define SID_TC_SYSTEM_CONTROL 14 | |
137 | #define SID_TC_AOCS 11 |
|
137 | #define SID_TC_AOCS 11 | |
138 | #define SID_TC_RPW_INTERNAL 254 |
|
138 | #define SID_TC_RPW_INTERNAL 254 | |
139 |
|
139 | |||
140 | enum apid_destid{ |
|
140 | enum apid_destid{ | |
141 | GROUND, |
|
141 | GROUND, | |
142 | MISSION_TIMELINE, |
|
142 | MISSION_TIMELINE, | |
143 | TC_SEQUENCES, |
|
143 | TC_SEQUENCES, | |
144 | RECOVERY_ACTION_CMD, |
|
144 | RECOVERY_ACTION_CMD, | |
145 | BACKUP_MISSION_TIMELINE, |
|
145 | BACKUP_MISSION_TIMELINE, | |
146 | DIRECT_CMD, |
|
146 | DIRECT_CMD, | |
147 | SPARE_GRD_SRC1, |
|
147 | SPARE_GRD_SRC1, | |
148 | SPARE_GRD_SRC2, |
|
148 | SPARE_GRD_SRC2, | |
149 | OBCP, |
|
149 | OBCP, | |
150 | SYSTEM_CONTROL, |
|
150 | SYSTEM_CONTROL, | |
151 | AOCS, |
|
151 | AOCS, | |
152 | RPW_INTERNAL |
|
152 | RPW_INTERNAL | |
153 | }; |
|
153 | }; | |
154 | // SEQUENCE COUNTERS |
|
154 | // SEQUENCE COUNTERS | |
155 | #define SEQ_CNT_MAX 16383 |
|
155 | #define SEQ_CNT_MAX 16383 | |
156 | #define SEQ_CNT_NB_DEST_ID 12 |
|
156 | #define SEQ_CNT_NB_DEST_ID 12 | |
157 |
|
157 | |||
158 | // TM SID |
|
158 | // TM SID | |
159 | #define SID_HK 1 |
|
159 | #define SID_HK 1 | |
160 | #define SID_PARAMETER_DUMP 10 |
|
160 | #define SID_PARAMETER_DUMP 10 | |
161 |
|
161 | |||
162 | #define SID_NORM_SWF_F0 3 |
|
162 | #define SID_NORM_SWF_F0 3 | |
163 | #define SID_NORM_SWF_F1 4 |
|
163 | #define SID_NORM_SWF_F1 4 | |
164 | #define SID_NORM_SWF_F2 5 |
|
164 | #define SID_NORM_SWF_F2 5 | |
165 | #define SID_NORM_CWF_F3 1 |
|
165 | #define SID_NORM_CWF_F3 1 | |
166 | #define SID_BURST_CWF_F2 2 |
|
166 | #define SID_BURST_CWF_F2 2 | |
167 | #define SID_SBM1_CWF_F1 24 |
|
167 | #define SID_SBM1_CWF_F1 24 | |
168 | #define SID_SBM2_CWF_F2 25 |
|
168 | #define SID_SBM2_CWF_F2 25 | |
169 | #define SID_NORM_ASM_F0 11 |
|
169 | #define SID_NORM_ASM_F0 11 | |
170 | #define SID_NORM_ASM_F1 12 |
|
170 | #define SID_NORM_ASM_F1 12 | |
171 | #define SID_NORM_ASM_F2 13 |
|
171 | #define SID_NORM_ASM_F2 13 | |
172 | #define SID_NORM_BP1_F0 14 |
|
172 | #define SID_NORM_BP1_F0 14 | |
173 | #define SID_NORM_BP1_F1 15 |
|
173 | #define SID_NORM_BP1_F1 15 | |
174 | #define SID_NORM_BP1_F2 16 |
|
174 | #define SID_NORM_BP1_F2 16 | |
175 | #define SID_NORM_BP2_F0 19 |
|
175 | #define SID_NORM_BP2_F0 19 | |
176 | #define SID_NORM_BP2_F1 20 |
|
176 | #define SID_NORM_BP2_F1 20 | |
177 | #define SID_NORM_BP2_F2 21 |
|
177 | #define SID_NORM_BP2_F2 21 | |
178 | #define SID_BURST_BP1_F0 17 |
|
178 | #define SID_BURST_BP1_F0 17 | |
179 | #define SID_BURST_BP2_F0 22 |
|
179 | #define SID_BURST_BP2_F0 22 | |
180 | #define SID_BURST_BP1_F1 18 |
|
180 | #define SID_BURST_BP1_F1 18 | |
181 | #define SID_BURST_BP2_F1 23 |
|
181 | #define SID_BURST_BP2_F1 23 | |
182 | #define SID_SBM1_BP1_F0 28 |
|
182 | #define SID_SBM1_BP1_F0 28 | |
183 | #define SID_SBM1_BP2_F0 31 |
|
183 | #define SID_SBM1_BP2_F0 31 | |
184 | #define SID_SBM2_BP1_F0 29 |
|
184 | #define SID_SBM2_BP1_F0 29 | |
185 | #define SID_SBM2_BP2_F0 32 |
|
185 | #define SID_SBM2_BP2_F0 32 | |
186 | #define SID_SBM2_BP1_F1 30 |
|
186 | #define SID_SBM2_BP1_F1 30 | |
187 | #define SID_SBM2_BP2_F1 33 |
|
187 | #define SID_SBM2_BP2_F1 33 | |
188 | #define SID_NORM_CWF_LONG_F3 34 |
|
188 | #define SID_NORM_CWF_LONG_F3 34 | |
189 |
|
189 | |||
190 | // LENGTH (BYTES) |
|
190 | // LENGTH (BYTES) | |
191 | #define LENGTH_TM_LFR_TC_EXE_MAX 32 |
|
191 | #define LENGTH_TM_LFR_TC_EXE_MAX 32 | |
192 | #define LENGTH_TM_LFR_HK 126 |
|
192 | #define LENGTH_TM_LFR_HK 126 | |
193 |
|
193 | |||
194 | // HEADER_LENGTH |
|
194 | // HEADER_LENGTH | |
195 | #define TM_HEADER_LEN 16 |
|
195 | #define TM_HEADER_LEN 16 | |
196 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28 |
|
196 | #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28 | |
197 | // PACKET_LENGTH |
|
197 | // PACKET_LENGTH | |
198 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) |
|
198 | #define PACKET_LENGTH_TC_EXE_SUCCESS (20 - CCSDS_TC_TM_PACKET_OFFSET) | |
199 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
199 | #define PACKET_LENGTH_TC_EXE_INCONSISTENT (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
200 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) |
|
200 | #define PACKET_LENGTH_TC_EXE_NOT_EXECUTABLE (26 - CCSDS_TC_TM_PACKET_OFFSET) | |
201 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
201 | #define PACKET_LENGTH_TC_EXE_NOT_IMPLEMENTED (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
202 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) |
|
202 | #define PACKET_LENGTH_TC_EXE_ERROR (24 - CCSDS_TC_TM_PACKET_OFFSET) | |
203 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) |
|
203 | #define PACKET_LENGTH_TC_EXE_CORRUPTED (32 - CCSDS_TC_TM_PACKET_OFFSET) | |
204 | #define PACKET_LENGTH_HK (124 - CCSDS_TC_TM_PACKET_OFFSET) |
|
204 | #define PACKET_LENGTH_HK (124 - CCSDS_TC_TM_PACKET_OFFSET) | |
205 | #define PACKET_LENGTH_PARAMETER_DUMP (36 - CCSDS_TC_TM_PACKET_OFFSET) |
|
205 | #define PACKET_LENGTH_PARAMETER_DUMP (36 - CCSDS_TC_TM_PACKET_OFFSET) | |
206 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0 (2228 - CCSDS_TC_TM_PACKET_OFFSET) // 44 * 25 * 2 + 28 |
|
206 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F0 (2228 - CCSDS_TC_TM_PACKET_OFFSET) // 44 * 25 * 2 + 28 | |
207 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1 (2628 - CCSDS_TC_TM_PACKET_OFFSET) // 52 * 25 * 2 + 28 |
|
207 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F1 (2628 - CCSDS_TC_TM_PACKET_OFFSET) // 52 * 25 * 2 + 28 | |
208 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F2 (2428 - CCSDS_TC_TM_PACKET_OFFSET) // 48 * 25 * 2 + 28 |
|
208 | #define PACKET_LENGTH_TM_LFR_SCIENCE_ASM_F2 (2428 - CCSDS_TC_TM_PACKET_OFFSET) // 48 * 25 * 2 + 28 | |
209 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (126 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 9 + 27 |
|
209 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 (126 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 9 + 27 (1 spare bit in the header) | |
210 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (356 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 26 |
|
210 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 (356 - CCSDS_TC_TM_PACKET_OFFSET) // 11 * 30 + 26 | |
211 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (144 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 9 + 27 |
|
211 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 (144 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 9 + 27 (1 spare bit in the header) | |
212 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (416 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 26 |
|
212 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 (416 - CCSDS_TC_TM_PACKET_OFFSET) // 13 * 30 + 26 | |
213 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (134 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 9 + 26 |
|
213 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 (134 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 9 + 26 | |
214 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (386 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 26 |
|
214 | #define PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 (386 - CCSDS_TC_TM_PACKET_OFFSET) // 12 * 30 + 26 | |
215 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (224 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 9 + 26 |
|
215 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 (224 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 9 + 26 | |
216 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (686 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 26 |
|
216 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 (686 - CCSDS_TC_TM_PACKET_OFFSET) // 22 * 30 + 26 | |
217 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (260 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 9 + 26 |
|
217 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 (260 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 9 + 26 | |
218 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (806 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 26 |
|
218 | #define PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 (806 - CCSDS_TC_TM_PACKET_OFFSET) // 26 * 30 + 26 | |
219 |
|
219 | |||
220 | #define PACKET_LENGTH_DELTA 11 // 7 + 4 |
|
220 | #define PACKET_LENGTH_DELTA 11 // 7 + 4 | |
221 |
|
221 | |||
222 | #define SPARE1_PUSVERSION_SPARE2 0x10 |
|
222 | #define SPARE1_PUSVERSION_SPARE2 0x10 | |
223 |
|
223 | |||
224 | // R1 |
|
224 | // R1 | |
225 | #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1 |
|
225 | #define TM_LEN_SCI_SWF_340 4101 // 340 * 12 + 10 + 12 - 1 | |
226 | #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1 |
|
226 | #define TM_LEN_SCI_SWF_8 117 // 8 * 12 + 10 + 12 - 1 | |
227 | #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1 |
|
227 | #define TM_LEN_SCI_CWF_340 4099 // 340 * 12 + 10 + 10 - 1 | |
228 | #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1 |
|
228 | #define TM_LEN_SCI_CWF_8 115 // 8 * 12 + 10 + 10 - 1 | |
229 | #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1 |
|
229 | #define TM_LEN_SCI_CWF3_LIGHT_340 2059 // 340 * 6 + 10 + 10 - 1 | |
230 | #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1 |
|
230 | #define TM_LEN_SCI_CWF3_LIGHT_8 67 // 8 * 6 + 10 + 10 - 1 | |
231 | // R2 |
|
231 | // R2 | |
232 | #define TM_LEN_SCI_SWF_304 3669 // 304 * 12 + 10 + 12 - 1 |
|
232 | #define TM_LEN_SCI_SWF_304 3669 // 304 * 12 + 10 + 12 - 1 | |
233 | #define TM_LEN_SCI_SWF_224 2709 // 224 * 12 + 10 + 12 - 1 |
|
233 | #define TM_LEN_SCI_SWF_224 2709 // 224 * 12 + 10 + 12 - 1 | |
234 | #define TM_LEN_SCI_CWF_336 4051 // 336 * 12 + 10 + 10 - 1 |
|
234 | #define TM_LEN_SCI_CWF_336 4051 // 336 * 12 + 10 + 10 - 1 | |
235 | #define TM_LEN_SCI_CWF_672 4051 // 672 * 6 + 10 + 10 - 1 |
|
235 | #define TM_LEN_SCI_CWF_672 4051 // 672 * 6 + 10 + 10 - 1 | |
236 | // |
|
236 | // | |
237 | #define DEFAULT_PKTCNT 0x07 |
|
237 | #define DEFAULT_PKTCNT 0x07 | |
238 | #define BLK_NR_304 0x0130 |
|
238 | #define BLK_NR_304 0x0130 | |
239 | #define BLK_NR_224 0x00e0 |
|
239 | #define BLK_NR_224 0x00e0 | |
240 | #define BLK_NR_CWF 0x0150 // 336 |
|
240 | #define BLK_NR_CWF 0x0150 // 336 | |
241 | #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672 |
|
241 | #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672 | |
242 |
|
242 | |||
243 | enum TM_TYPE{ |
|
243 | enum TM_TYPE{ | |
244 | TM_LFR_TC_EXE_OK, |
|
244 | TM_LFR_TC_EXE_OK, | |
245 | TM_LFR_TC_EXE_ERR, |
|
245 | TM_LFR_TC_EXE_ERR, | |
246 | TM_LFR_HK, |
|
246 | TM_LFR_HK, | |
247 | TM_LFR_SCI, |
|
247 | TM_LFR_SCI, | |
248 | TM_LFR_SCI_SBM, |
|
248 | TM_LFR_SCI_SBM, | |
249 | TM_LFR_PAR_DUMP |
|
249 | TM_LFR_PAR_DUMP | |
250 | }; |
|
250 | }; | |
251 |
|
251 | |||
252 | typedef struct { |
|
252 | typedef struct { | |
253 | unsigned char targetLogicalAddress; |
|
253 | unsigned char targetLogicalAddress; | |
254 | unsigned char protocolIdentifier; |
|
254 | unsigned char protocolIdentifier; | |
255 | unsigned char reserved; |
|
255 | unsigned char reserved; | |
256 | unsigned char userApplication; |
|
256 | unsigned char userApplication; | |
257 | // PACKET HEADER |
|
257 | // PACKET HEADER | |
258 | unsigned char packetID[2]; |
|
258 | unsigned char packetID[2]; | |
259 | unsigned char packetSequenceControl[2]; |
|
259 | unsigned char packetSequenceControl[2]; | |
260 | unsigned char packetLength[2]; |
|
260 | unsigned char packetLength[2]; | |
261 | // DATA FIELD HEADER |
|
261 | // DATA FIELD HEADER | |
262 | unsigned char spare1_pusVersion_spare2; |
|
262 | unsigned char spare1_pusVersion_spare2; | |
263 | unsigned char serviceType; |
|
263 | unsigned char serviceType; | |
264 | unsigned char serviceSubType; |
|
264 | unsigned char serviceSubType; | |
265 | unsigned char destinationID; |
|
265 | unsigned char destinationID; | |
266 | unsigned char time[6]; |
|
266 | unsigned char time[6]; | |
267 | // |
|
267 | // | |
268 | unsigned char telecommand_pkt_id[2]; |
|
268 | unsigned char telecommand_pkt_id[2]; | |
269 | unsigned char pkt_seq_control[2]; |
|
269 | unsigned char pkt_seq_control[2]; | |
270 | } Packet_TM_LFR_TC_EXE_SUCCESS_t; |
|
270 | } Packet_TM_LFR_TC_EXE_SUCCESS_t; | |
271 |
|
271 | |||
272 | typedef struct { |
|
272 | typedef struct { | |
273 | unsigned char targetLogicalAddress; |
|
273 | unsigned char targetLogicalAddress; | |
274 | unsigned char protocolIdentifier; |
|
274 | unsigned char protocolIdentifier; | |
275 | unsigned char reserved; |
|
275 | unsigned char reserved; | |
276 | unsigned char userApplication; |
|
276 | unsigned char userApplication; | |
277 | // PACKET HEADER |
|
277 | // PACKET HEADER | |
278 | unsigned char packetID[2]; |
|
278 | unsigned char packetID[2]; | |
279 | unsigned char packetSequenceControl[2]; |
|
279 | unsigned char packetSequenceControl[2]; | |
280 | unsigned char packetLength[2]; |
|
280 | unsigned char packetLength[2]; | |
281 | // DATA FIELD HEADER |
|
281 | // DATA FIELD HEADER | |
282 | unsigned char spare1_pusVersion_spare2; |
|
282 | unsigned char spare1_pusVersion_spare2; | |
283 | unsigned char serviceType; |
|
283 | unsigned char serviceType; | |
284 | unsigned char serviceSubType; |
|
284 | unsigned char serviceSubType; | |
285 | unsigned char destinationID; |
|
285 | unsigned char destinationID; | |
286 | unsigned char time[6]; |
|
286 | unsigned char time[6]; | |
287 | // |
|
287 | // | |
288 | unsigned char tc_failure_code[2]; |
|
288 | unsigned char tc_failure_code[2]; | |
289 | unsigned char telecommand_pkt_id[2]; |
|
289 | unsigned char telecommand_pkt_id[2]; | |
290 | unsigned char pkt_seq_control[2]; |
|
290 | unsigned char pkt_seq_control[2]; | |
291 | unsigned char tc_service; |
|
291 | unsigned char tc_service; | |
292 | unsigned char tc_subtype; |
|
292 | unsigned char tc_subtype; | |
293 | unsigned char byte_position; |
|
293 | unsigned char byte_position; | |
294 | unsigned char rcv_value; |
|
294 | unsigned char rcv_value; | |
295 | } Packet_TM_LFR_TC_EXE_INCONSISTENT_t; |
|
295 | } Packet_TM_LFR_TC_EXE_INCONSISTENT_t; | |
296 |
|
296 | |||
297 | typedef struct { |
|
297 | typedef struct { | |
298 | unsigned char targetLogicalAddress; |
|
298 | unsigned char targetLogicalAddress; | |
299 | unsigned char protocolIdentifier; |
|
299 | unsigned char protocolIdentifier; | |
300 | unsigned char reserved; |
|
300 | unsigned char reserved; | |
301 | unsigned char userApplication; |
|
301 | unsigned char userApplication; | |
302 | // PACKET HEADER |
|
302 | // PACKET HEADER | |
303 | unsigned char packetID[2]; |
|
303 | unsigned char packetID[2]; | |
304 | unsigned char packetSequenceControl[2]; |
|
304 | unsigned char packetSequenceControl[2]; | |
305 | unsigned char packetLength[2]; |
|
305 | unsigned char packetLength[2]; | |
306 | // DATA FIELD HEADER |
|
306 | // DATA FIELD HEADER | |
307 | unsigned char spare1_pusVersion_spare2; |
|
307 | unsigned char spare1_pusVersion_spare2; | |
308 | unsigned char serviceType; |
|
308 | unsigned char serviceType; | |
309 | unsigned char serviceSubType; |
|
309 | unsigned char serviceSubType; | |
310 | unsigned char destinationID; |
|
310 | unsigned char destinationID; | |
311 | unsigned char time[6]; |
|
311 | unsigned char time[6]; | |
312 | // |
|
312 | // | |
313 | unsigned char tc_failure_code[2]; |
|
313 | unsigned char tc_failure_code[2]; | |
314 | unsigned char telecommand_pkt_id[2]; |
|
314 | unsigned char telecommand_pkt_id[2]; | |
315 | unsigned char pkt_seq_control[2]; |
|
315 | unsigned char pkt_seq_control[2]; | |
316 | unsigned char tc_service; |
|
316 | unsigned char tc_service; | |
317 | unsigned char tc_subtype; |
|
317 | unsigned char tc_subtype; | |
318 | unsigned char lfr_status_word[2]; |
|
318 | unsigned char lfr_status_word[2]; | |
319 | } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; |
|
319 | } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t; | |
320 |
|
320 | |||
321 | typedef struct { |
|
321 | typedef struct { | |
322 | unsigned char targetLogicalAddress; |
|
322 | unsigned char targetLogicalAddress; | |
323 | unsigned char protocolIdentifier; |
|
323 | unsigned char protocolIdentifier; | |
324 | unsigned char reserved; |
|
324 | unsigned char reserved; | |
325 | unsigned char userApplication; |
|
325 | unsigned char userApplication; | |
326 | // PACKET HEADER |
|
326 | // PACKET HEADER | |
327 | unsigned char packetID[2]; |
|
327 | unsigned char packetID[2]; | |
328 | unsigned char packetSequenceControl[2]; |
|
328 | unsigned char packetSequenceControl[2]; | |
329 | unsigned char packetLength[2]; |
|
329 | unsigned char packetLength[2]; | |
330 | // DATA FIELD HEADER |
|
330 | // DATA FIELD HEADER | |
331 | unsigned char spare1_pusVersion_spare2; |
|
331 | unsigned char spare1_pusVersion_spare2; | |
332 | unsigned char serviceType; |
|
332 | unsigned char serviceType; | |
333 | unsigned char serviceSubType; |
|
333 | unsigned char serviceSubType; | |
334 | unsigned char destinationID; |
|
334 | unsigned char destinationID; | |
335 | unsigned char time[6]; |
|
335 | unsigned char time[6]; | |
336 | // |
|
336 | // | |
337 | unsigned char tc_failure_code[2]; |
|
337 | unsigned char tc_failure_code[2]; | |
338 | unsigned char telecommand_pkt_id[2]; |
|
338 | unsigned char telecommand_pkt_id[2]; | |
339 | unsigned char pkt_seq_control[2]; |
|
339 | unsigned char pkt_seq_control[2]; | |
340 | unsigned char tc_service; |
|
340 | unsigned char tc_service; | |
341 | unsigned char tc_subtype; |
|
341 | unsigned char tc_subtype; | |
342 | } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; |
|
342 | } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t; | |
343 |
|
343 | |||
344 | typedef struct { |
|
344 | typedef struct { | |
345 | unsigned char targetLogicalAddress; |
|
345 | unsigned char targetLogicalAddress; | |
346 | unsigned char protocolIdentifier; |
|
346 | unsigned char protocolIdentifier; | |
347 | unsigned char reserved; |
|
347 | unsigned char reserved; | |
348 | unsigned char userApplication; |
|
348 | unsigned char userApplication; | |
349 | // PACKET HEADER |
|
349 | // PACKET HEADER | |
350 | unsigned char packetID[2]; |
|
350 | unsigned char packetID[2]; | |
351 | unsigned char packetSequenceControl[2]; |
|
351 | unsigned char packetSequenceControl[2]; | |
352 | unsigned char packetLength[2]; |
|
352 | unsigned char packetLength[2]; | |
353 | // DATA FIELD HEADER |
|
353 | // DATA FIELD HEADER | |
354 | unsigned char spare1_pusVersion_spare2; |
|
354 | unsigned char spare1_pusVersion_spare2; | |
355 | unsigned char serviceType; |
|
355 | unsigned char serviceType; | |
356 | unsigned char serviceSubType; |
|
356 | unsigned char serviceSubType; | |
357 | unsigned char destinationID; |
|
357 | unsigned char destinationID; | |
358 | unsigned char time[6]; |
|
358 | unsigned char time[6]; | |
359 | // |
|
359 | // | |
360 | unsigned char tc_failure_code[2]; |
|
360 | unsigned char tc_failure_code[2]; | |
361 | unsigned char telecommand_pkt_id[2]; |
|
361 | unsigned char telecommand_pkt_id[2]; | |
362 | unsigned char pkt_seq_control[2]; |
|
362 | unsigned char pkt_seq_control[2]; | |
363 | unsigned char tc_service; |
|
363 | unsigned char tc_service; | |
364 | unsigned char tc_subtype; |
|
364 | unsigned char tc_subtype; | |
365 | } Packet_TM_LFR_TC_EXE_ERROR_t; |
|
365 | } Packet_TM_LFR_TC_EXE_ERROR_t; | |
366 |
|
366 | |||
367 | typedef struct { |
|
367 | typedef struct { | |
368 | unsigned char targetLogicalAddress; |
|
368 | unsigned char targetLogicalAddress; | |
369 | unsigned char protocolIdentifier; |
|
369 | unsigned char protocolIdentifier; | |
370 | unsigned char reserved; |
|
370 | unsigned char reserved; | |
371 | unsigned char userApplication; |
|
371 | unsigned char userApplication; | |
372 | // PACKET HEADER |
|
372 | // PACKET HEADER | |
373 | unsigned char packetID[2]; |
|
373 | unsigned char packetID[2]; | |
374 | unsigned char packetSequenceControl[2]; |
|
374 | unsigned char packetSequenceControl[2]; | |
375 | unsigned char packetLength[2]; |
|
375 | unsigned char packetLength[2]; | |
376 | // DATA FIELD HEADER |
|
376 | // DATA FIELD HEADER | |
377 | unsigned char spare1_pusVersion_spare2; |
|
377 | unsigned char spare1_pusVersion_spare2; | |
378 | unsigned char serviceType; |
|
378 | unsigned char serviceType; | |
379 | unsigned char serviceSubType; |
|
379 | unsigned char serviceSubType; | |
380 | unsigned char destinationID; |
|
380 | unsigned char destinationID; | |
381 | unsigned char time[6]; |
|
381 | unsigned char time[6]; | |
382 | // |
|
382 | // | |
383 | unsigned char tc_failure_code[2]; |
|
383 | unsigned char tc_failure_code[2]; | |
384 | unsigned char telecommand_pkt_id[2]; |
|
384 | unsigned char telecommand_pkt_id[2]; | |
385 | unsigned char pkt_seq_control[2]; |
|
385 | unsigned char pkt_seq_control[2]; | |
386 | unsigned char tc_service; |
|
386 | unsigned char tc_service; | |
387 | unsigned char tc_subtype; |
|
387 | unsigned char tc_subtype; | |
388 | unsigned char pkt_len_rcv_value[2]; |
|
388 | unsigned char pkt_len_rcv_value[2]; | |
389 | unsigned char pkt_datafieldsize_cnt[2]; |
|
389 | unsigned char pkt_datafieldsize_cnt[2]; | |
390 | unsigned char rcv_crc[2]; |
|
390 | unsigned char rcv_crc[2]; | |
391 | unsigned char computed_crc[2]; |
|
391 | unsigned char computed_crc[2]; | |
392 | } Packet_TM_LFR_TC_EXE_CORRUPTED_t; |
|
392 | } Packet_TM_LFR_TC_EXE_CORRUPTED_t; | |
393 |
|
393 | |||
394 | typedef struct { |
|
394 | typedef struct { | |
395 | unsigned char targetLogicalAddress; |
|
395 | unsigned char targetLogicalAddress; | |
396 | unsigned char protocolIdentifier; |
|
396 | unsigned char protocolIdentifier; | |
397 | unsigned char reserved; |
|
397 | unsigned char reserved; | |
398 | unsigned char userApplication; |
|
398 | unsigned char userApplication; | |
399 | unsigned char packetID[2]; |
|
399 | unsigned char packetID[2]; | |
400 | unsigned char packetSequenceControl[2]; |
|
400 | unsigned char packetSequenceControl[2]; | |
401 | unsigned char packetLength[2]; |
|
401 | unsigned char packetLength[2]; | |
402 | // DATA FIELD HEADER |
|
402 | // DATA FIELD HEADER | |
403 | unsigned char spare1_pusVersion_spare2; |
|
403 | unsigned char spare1_pusVersion_spare2; | |
404 | unsigned char serviceType; |
|
404 | unsigned char serviceType; | |
405 | unsigned char serviceSubType; |
|
405 | unsigned char serviceSubType; | |
406 | unsigned char destinationID; |
|
406 | unsigned char destinationID; | |
407 | unsigned char time[6]; |
|
407 | unsigned char time[6]; | |
408 | // AUXILIARY HEADER |
|
408 | // AUXILIARY HEADER | |
409 | unsigned char sid; |
|
409 | unsigned char sid; | |
410 | unsigned char hkBIA; |
|
410 | unsigned char hkBIA; | |
411 | unsigned char pktCnt; |
|
411 | unsigned char pktCnt; | |
412 | unsigned char pktNr; |
|
412 | unsigned char pktNr; | |
413 | unsigned char acquisitionTime[6]; |
|
413 | unsigned char acquisitionTime[6]; | |
414 | unsigned char blkNr[2]; |
|
414 | unsigned char blkNr[2]; | |
415 | } Header_TM_LFR_SCIENCE_SWF_t; |
|
415 | } Header_TM_LFR_SCIENCE_SWF_t; | |
416 |
|
416 | |||
417 | typedef struct { |
|
417 | typedef struct { | |
418 | unsigned char targetLogicalAddress; |
|
418 | unsigned char targetLogicalAddress; | |
419 | unsigned char protocolIdentifier; |
|
419 | unsigned char protocolIdentifier; | |
420 | unsigned char reserved; |
|
420 | unsigned char reserved; | |
421 | unsigned char userApplication; |
|
421 | unsigned char userApplication; | |
422 | unsigned char packetID[2]; |
|
422 | unsigned char packetID[2]; | |
423 | unsigned char packetSequenceControl[2]; |
|
423 | unsigned char packetSequenceControl[2]; | |
424 | unsigned char packetLength[2]; |
|
424 | unsigned char packetLength[2]; | |
425 | // DATA FIELD HEADER |
|
425 | // DATA FIELD HEADER | |
426 | unsigned char spare1_pusVersion_spare2; |
|
426 | unsigned char spare1_pusVersion_spare2; | |
427 | unsigned char serviceType; |
|
427 | unsigned char serviceType; | |
428 | unsigned char serviceSubType; |
|
428 | unsigned char serviceSubType; | |
429 | unsigned char destinationID; |
|
429 | unsigned char destinationID; | |
430 | unsigned char time[6]; |
|
430 | unsigned char time[6]; | |
431 | // AUXILIARY DATA HEADER |
|
431 | // AUXILIARY DATA HEADER | |
432 | unsigned char sid; |
|
432 | unsigned char sid; | |
433 | unsigned char hkBIA; |
|
433 | unsigned char hkBIA; | |
434 | unsigned char acquisitionTime[6]; |
|
434 | unsigned char acquisitionTime[6]; | |
435 | unsigned char blkNr[2]; |
|
435 | unsigned char blkNr[2]; | |
436 | } Header_TM_LFR_SCIENCE_CWF_t; |
|
436 | } Header_TM_LFR_SCIENCE_CWF_t; | |
437 |
|
437 | |||
438 | typedef struct { |
|
438 | typedef struct { | |
439 | unsigned char targetLogicalAddress; |
|
439 | unsigned char targetLogicalAddress; | |
440 | unsigned char protocolIdentifier; |
|
440 | unsigned char protocolIdentifier; | |
441 | unsigned char reserved; |
|
441 | unsigned char reserved; | |
442 | unsigned char userApplication; |
|
442 | unsigned char userApplication; | |
443 | unsigned char packetID[2]; |
|
443 | unsigned char packetID[2]; | |
444 | unsigned char packetSequenceControl[2]; |
|
444 | unsigned char packetSequenceControl[2]; | |
445 | unsigned char packetLength[2]; |
|
445 | unsigned char packetLength[2]; | |
446 | // DATA FIELD HEADER |
|
446 | // DATA FIELD HEADER | |
447 | unsigned char spare1_pusVersion_spare2; |
|
447 | unsigned char spare1_pusVersion_spare2; | |
448 | unsigned char serviceType; |
|
448 | unsigned char serviceType; | |
449 | unsigned char serviceSubType; |
|
449 | unsigned char serviceSubType; | |
450 | unsigned char destinationID; |
|
450 | unsigned char destinationID; | |
451 | unsigned char time[6]; |
|
451 | unsigned char time[6]; | |
452 | // AUXILIARY HEADER |
|
452 | // AUXILIARY HEADER | |
453 | unsigned char sid; |
|
453 | unsigned char sid; | |
454 | unsigned char biaStatusInfo; |
|
454 | unsigned char biaStatusInfo; | |
455 | unsigned char pa_lfr_pkt_cnt_asm; |
|
455 | unsigned char pa_lfr_pkt_cnt_asm; | |
456 | unsigned char pa_lfr_pkt_nr_asm; |
|
456 | unsigned char pa_lfr_pkt_nr_asm; | |
457 | unsigned char acquisitionTime[6]; |
|
457 | unsigned char acquisitionTime[6]; | |
458 | unsigned char pa_lfr_asm_blk_nr[2]; |
|
458 | unsigned char pa_lfr_asm_blk_nr[2]; | |
459 | } Header_TM_LFR_SCIENCE_ASM_t; |
|
459 | } Header_TM_LFR_SCIENCE_ASM_t; | |
460 |
|
460 | |||
461 | typedef struct { |
|
461 | typedef struct { | |
462 | unsigned char targetLogicalAddress; |
|
462 | unsigned char targetLogicalAddress; | |
463 | unsigned char protocolIdentifier; |
|
463 | unsigned char protocolIdentifier; | |
464 | unsigned char reserved; |
|
464 | unsigned char reserved; | |
465 | unsigned char userApplication; |
|
465 | unsigned char userApplication; | |
466 | unsigned char packetID[2]; |
|
466 | unsigned char packetID[2]; | |
467 | unsigned char packetSequenceControl[2]; |
|
467 | unsigned char packetSequenceControl[2]; | |
468 | unsigned char packetLength[2]; |
|
468 | unsigned char packetLength[2]; | |
469 | // DATA FIELD HEADER |
|
469 | // DATA FIELD HEADER | |
470 | unsigned char spare1_pusVersion_spare2; |
|
470 | unsigned char spare1_pusVersion_spare2; | |
471 | unsigned char serviceType; |
|
471 | unsigned char serviceType; | |
472 | unsigned char serviceSubType; |
|
472 | unsigned char serviceSubType; | |
473 | unsigned char destinationID; |
|
473 | unsigned char destinationID; | |
474 | unsigned char time[6]; |
|
474 | unsigned char time[6]; | |
475 | // AUXILIARY HEADER |
|
475 | // AUXILIARY HEADER | |
476 | unsigned char sid; |
|
476 | unsigned char sid; | |
477 | unsigned char biaStatusInfo; |
|
477 | unsigned char biaStatusInfo; | |
478 | unsigned char acquisitionTime[6]; |
|
478 | unsigned char acquisitionTime[6]; | |
479 | unsigned char source_data_spare; |
|
479 | unsigned char source_data_spare; | |
480 | unsigned char pa_lfr_bp_blk_nr[2]; |
|
480 | unsigned char pa_lfr_bp_blk_nr[2]; | |
481 | } Header_TM_LFR_SCIENCE_BP_with_spare_t; |
|
481 | } Header_TM_LFR_SCIENCE_BP_with_spare_t; | |
482 |
|
482 | |||
483 | typedef struct { |
|
483 | typedef struct { | |
484 | unsigned char targetLogicalAddress; |
|
484 | unsigned char targetLogicalAddress; | |
485 | unsigned char protocolIdentifier; |
|
485 | unsigned char protocolIdentifier; | |
486 | unsigned char reserved; |
|
486 | unsigned char reserved; | |
487 | unsigned char userApplication; |
|
487 | unsigned char userApplication; | |
488 | unsigned char packetID[2]; |
|
488 | unsigned char packetID[2]; | |
489 | unsigned char packetSequenceControl[2]; |
|
489 | unsigned char packetSequenceControl[2]; | |
490 | unsigned char packetLength[2]; |
|
490 | unsigned char packetLength[2]; | |
491 | // DATA FIELD HEADER |
|
491 | // DATA FIELD HEADER | |
492 | unsigned char spare1_pusVersion_spare2; |
|
492 | unsigned char spare1_pusVersion_spare2; | |
493 | unsigned char serviceType; |
|
493 | unsigned char serviceType; | |
494 | unsigned char serviceSubType; |
|
494 | unsigned char serviceSubType; | |
495 | unsigned char destinationID; |
|
495 | unsigned char destinationID; | |
496 | unsigned char time[6]; |
|
496 | unsigned char time[6]; | |
497 | // AUXILIARY HEADER |
|
497 | // AUXILIARY HEADER | |
498 | unsigned char sid; |
|
498 | unsigned char sid; | |
499 | unsigned char biaStatusInfo; |
|
499 | unsigned char biaStatusInfo; | |
500 | unsigned char acquisitionTime[6]; |
|
500 | unsigned char acquisitionTime[6]; | |
501 | unsigned char pa_lfr_bp_blk_nr[2]; |
|
501 | unsigned char pa_lfr_bp_blk_nr[2]; | |
502 | } Header_TM_LFR_SCIENCE_BP_t; |
|
502 | } Header_TM_LFR_SCIENCE_BP_t; | |
503 |
|
503 | |||
504 | typedef struct { |
|
504 | typedef struct { | |
505 | //targetLogicalAddress is removed by the grspw module |
|
505 | //targetLogicalAddress is removed by the grspw module | |
506 | unsigned char protocolIdentifier; |
|
506 | unsigned char protocolIdentifier; | |
507 | unsigned char reserved; |
|
507 | unsigned char reserved; | |
508 | unsigned char userApplication; |
|
508 | unsigned char userApplication; | |
509 | unsigned char packetID[2]; |
|
509 | unsigned char packetID[2]; | |
510 | unsigned char packetSequenceControl[2]; |
|
510 | unsigned char packetSequenceControl[2]; | |
511 | unsigned char packetLength[2]; |
|
511 | unsigned char packetLength[2]; | |
512 | // DATA FIELD HEADER |
|
512 | // DATA FIELD HEADER | |
513 | unsigned char headerFlag_pusVersion_Ack; |
|
513 | unsigned char headerFlag_pusVersion_Ack; | |
514 | unsigned char serviceType; |
|
514 | unsigned char serviceType; | |
515 | unsigned char serviceSubType; |
|
515 | unsigned char serviceSubType; | |
516 | unsigned char sourceID; |
|
516 | unsigned char sourceID; | |
517 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; |
|
517 | unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10]; | |
518 | } ccsdsTelecommandPacket_t; |
|
518 | } ccsdsTelecommandPacket_t; | |
519 |
|
519 | |||
520 | typedef struct { |
|
520 | typedef struct { | |
521 | unsigned char targetLogicalAddress; |
|
521 | unsigned char targetLogicalAddress; | |
522 | unsigned char protocolIdentifier; |
|
522 | unsigned char protocolIdentifier; | |
523 | unsigned char reserved; |
|
523 | unsigned char reserved; | |
524 | unsigned char userApplication; |
|
524 | unsigned char userApplication; | |
525 | unsigned char packetID[2]; |
|
525 | unsigned char packetID[2]; | |
526 | unsigned char packetSequenceControl[2]; |
|
526 | unsigned char packetSequenceControl[2]; | |
527 | unsigned char packetLength[2]; |
|
527 | unsigned char packetLength[2]; | |
528 | unsigned char spare1_pusVersion_spare2; |
|
528 | unsigned char spare1_pusVersion_spare2; | |
529 | unsigned char serviceType; |
|
529 | unsigned char serviceType; | |
530 | unsigned char serviceSubType; |
|
530 | unsigned char serviceSubType; | |
531 | unsigned char destinationID; |
|
531 | unsigned char destinationID; | |
532 | unsigned char time[6]; |
|
532 | unsigned char time[6]; | |
533 | unsigned char sid; |
|
533 | unsigned char sid; | |
534 |
|
534 | |||
535 | //************** |
|
535 | //************** | |
536 | // HK PARAMETERS |
|
536 | // HK PARAMETERS | |
537 | unsigned char lfr_status_word[2]; |
|
537 | unsigned char lfr_status_word[2]; | |
538 | unsigned char lfr_sw_version[4]; |
|
538 | unsigned char lfr_sw_version[4]; | |
539 | unsigned char lfr_fpga_version[3]; |
|
539 | unsigned char lfr_fpga_version[3]; | |
540 | // ressource statistics |
|
540 | // ressource statistics | |
541 | unsigned char hk_lfr_cpu_load; |
|
541 | unsigned char hk_lfr_cpu_load; | |
542 | unsigned char hk_lfr_cpu_load_max; |
|
542 | unsigned char hk_lfr_cpu_load_max; | |
543 | unsigned char hk_lfr_cpu_load_aver; |
|
543 | unsigned char hk_lfr_cpu_load_aver; | |
544 | // tc statistics |
|
544 | // tc statistics | |
545 | unsigned char hk_lfr_update_info_tc_cnt[2]; |
|
545 | unsigned char hk_lfr_update_info_tc_cnt[2]; | |
546 | unsigned char hk_lfr_update_time_tc_cnt[2]; |
|
546 | unsigned char hk_lfr_update_time_tc_cnt[2]; | |
547 | unsigned char hk_lfr_exe_tc_cnt[2]; |
|
547 | unsigned char hk_lfr_exe_tc_cnt[2]; | |
548 | unsigned char hk_lfr_rej_tc_cnt[2]; |
|
548 | unsigned char hk_lfr_rej_tc_cnt[2]; | |
549 | unsigned char hk_lfr_last_exe_tc_id[2]; |
|
549 | unsigned char hk_lfr_last_exe_tc_id[2]; | |
550 | unsigned char hk_lfr_last_exe_tc_type[2]; |
|
550 | unsigned char hk_lfr_last_exe_tc_type[2]; | |
551 | unsigned char hk_lfr_last_exe_tc_subtype[2]; |
|
551 | unsigned char hk_lfr_last_exe_tc_subtype[2]; | |
552 | unsigned char hk_lfr_last_exe_tc_time[6]; |
|
552 | unsigned char hk_lfr_last_exe_tc_time[6]; | |
553 | unsigned char hk_lfr_last_rej_tc_id[2]; |
|
553 | unsigned char hk_lfr_last_rej_tc_id[2]; | |
554 | unsigned char hk_lfr_last_rej_tc_type[2]; |
|
554 | unsigned char hk_lfr_last_rej_tc_type[2]; | |
555 | unsigned char hk_lfr_last_rej_tc_subtype[2]; |
|
555 | unsigned char hk_lfr_last_rej_tc_subtype[2]; | |
556 | unsigned char hk_lfr_last_rej_tc_time[6]; |
|
556 | unsigned char hk_lfr_last_rej_tc_time[6]; | |
557 | // anomaly statistics |
|
557 | // anomaly statistics | |
558 | unsigned char hk_lfr_le_cnt[2]; |
|
558 | unsigned char hk_lfr_le_cnt[2]; | |
559 | unsigned char hk_lfr_me_cnt[2]; |
|
559 | unsigned char hk_lfr_me_cnt[2]; | |
560 | unsigned char hk_lfr_he_cnt[2]; |
|
560 | unsigned char hk_lfr_he_cnt[2]; | |
561 | unsigned char hk_lfr_last_er_rid[2]; |
|
561 | unsigned char hk_lfr_last_er_rid[2]; | |
562 | unsigned char hk_lfr_last_er_code; |
|
562 | unsigned char hk_lfr_last_er_code; | |
563 | unsigned char hk_lfr_last_er_time[6]; |
|
563 | unsigned char hk_lfr_last_er_time[6]; | |
564 | // vhdl_blk_status |
|
564 | // vhdl_blk_status | |
565 | unsigned char hk_lfr_vhdl_aa_sm; |
|
565 | unsigned char hk_lfr_vhdl_aa_sm; | |
566 | unsigned char hk_lfr_vhdl_fft_sr; |
|
566 | unsigned char hk_lfr_vhdl_fft_sr; | |
567 | unsigned char hk_lfr_vhdl_cic_hk; |
|
567 | unsigned char hk_lfr_vhdl_cic_hk; | |
568 | unsigned char hk_lfr_vhdl_iir_cal; |
|
568 | unsigned char hk_lfr_vhdl_iir_cal; | |
569 | // spacewire_if_statistics |
|
569 | // spacewire_if_statistics | |
570 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; |
|
570 | unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2]; | |
571 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; |
|
571 | unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2]; | |
572 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; |
|
572 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; | |
573 | unsigned char hk_lfr_dpu_spw_last_timc; |
|
573 | unsigned char hk_lfr_dpu_spw_last_timc; | |
574 | // ahb error statistics |
|
574 | // ahb error statistics | |
575 | unsigned char hk_lfr_last_fail_addr[4]; |
|
575 | unsigned char hk_lfr_last_fail_addr[4]; | |
576 | // temperatures |
|
576 | // temperatures | |
577 | unsigned char hk_lfr_temp_scm[2]; |
|
577 | unsigned char hk_lfr_temp_scm[2]; | |
578 | unsigned char hk_lfr_temp_pcb[2]; |
|
578 | unsigned char hk_lfr_temp_pcb[2]; | |
579 | unsigned char hk_lfr_temp_fpga[2]; |
|
579 | unsigned char hk_lfr_temp_fpga[2]; | |
580 | // spacecraft potential |
|
580 | // spacecraft potential | |
581 | unsigned char hk_lfr_sc_v_f3[2]; |
|
581 | unsigned char hk_lfr_sc_v_f3[2]; | |
582 | unsigned char hk_lfr_sc_e1_f3[2]; |
|
582 | unsigned char hk_lfr_sc_e1_f3[2]; | |
583 | unsigned char hk_lfr_sc_e2_f3[2]; |
|
583 | unsigned char hk_lfr_sc_e2_f3[2]; | |
584 | // error counters |
|
584 | // error counters | |
585 | unsigned char hk_lfr_dpu_spw_parity; |
|
585 | unsigned char hk_lfr_dpu_spw_parity; | |
586 | unsigned char hk_lfr_dpu_spw_disconnect; |
|
586 | unsigned char hk_lfr_dpu_spw_disconnect; | |
587 | unsigned char hk_lfr_dpu_spw_escape; |
|
587 | unsigned char hk_lfr_dpu_spw_escape; | |
588 | unsigned char hk_lfr_dpu_spw_credit; |
|
588 | unsigned char hk_lfr_dpu_spw_credit; | |
589 | unsigned char hk_lfr_dpu_spw_write_sync; |
|
589 | unsigned char hk_lfr_dpu_spw_write_sync; | |
590 | unsigned char hk_lfr_dpu_spw_rx_ahb; |
|
590 | unsigned char hk_lfr_dpu_spw_rx_ahb; | |
591 | unsigned char hk_lfr_dpu_spw_tx_ahb; |
|
591 | unsigned char hk_lfr_dpu_spw_tx_ahb; | |
592 | unsigned char hk_lfr_dpu_spw_early_eop; |
|
592 | unsigned char hk_lfr_dpu_spw_early_eop; | |
593 | unsigned char hk_lfr_dpu_spw_invalid_addr; |
|
593 | unsigned char hk_lfr_dpu_spw_invalid_addr; | |
594 | unsigned char hk_lfr_dpu_spw_eep; |
|
594 | unsigned char hk_lfr_dpu_spw_eep; | |
595 | unsigned char hk_lfr_dpu_spw_rx_too_big; |
|
595 | unsigned char hk_lfr_dpu_spw_rx_too_big; | |
596 | // timecode |
|
596 | // timecode | |
597 | unsigned char hk_lfr_timecode_erroneous; |
|
597 | unsigned char hk_lfr_timecode_erroneous; | |
598 | unsigned char hk_lfr_timecode_missing; |
|
598 | unsigned char hk_lfr_timecode_missing; | |
599 | unsigned char hk_lfr_timecode_invalid; |
|
599 | unsigned char hk_lfr_timecode_invalid; | |
600 | // time |
|
600 | // time | |
601 | unsigned char hk_lfr_time_timecode_it; |
|
601 | unsigned char hk_lfr_time_timecode_it; | |
602 | unsigned char hk_lfr_time_not_synchro; |
|
602 | unsigned char hk_lfr_time_not_synchro; | |
603 | unsigned char hk_lfr_time_timecode_ctr; |
|
603 | unsigned char hk_lfr_time_timecode_ctr; | |
604 | // hk_lfr_buffer_dpu_ |
|
604 | // hk_lfr_buffer_dpu_ | |
605 | unsigned char hk_lfr_buffer_dpu_tc_fifo; |
|
605 | unsigned char hk_lfr_buffer_dpu_tc_fifo; | |
606 | unsigned char hk_lfr_buffer_dpu_tm_fifo; |
|
606 | unsigned char hk_lfr_buffer_dpu_tm_fifo; | |
607 | // hk_lfr_ahb_ |
|
607 | // hk_lfr_ahb_ | |
608 | unsigned char hk_lfr_ahb_correctable; |
|
608 | unsigned char hk_lfr_ahb_correctable; | |
609 | unsigned char hk_lfr_ahb_uncorrectable; |
|
609 | unsigned char hk_lfr_ahb_uncorrectable; | |
610 | // spare |
|
610 | // spare | |
611 | unsigned char parameters_spare; |
|
611 | unsigned char parameters_spare; | |
612 | } Packet_TM_LFR_HK_t; |
|
612 | } Packet_TM_LFR_HK_t; | |
613 |
|
613 | |||
614 | typedef struct { |
|
614 | typedef struct { | |
615 | unsigned char targetLogicalAddress; |
|
615 | unsigned char targetLogicalAddress; | |
616 | unsigned char protocolIdentifier; |
|
616 | unsigned char protocolIdentifier; | |
617 | unsigned char reserved; |
|
617 | unsigned char reserved; | |
618 | unsigned char userApplication; |
|
618 | unsigned char userApplication; | |
619 | unsigned char packetID[2]; |
|
619 | unsigned char packetID[2]; | |
620 | unsigned char packetSequenceControl[2]; |
|
620 | unsigned char packetSequenceControl[2]; | |
621 | unsigned char packetLength[2]; |
|
621 | unsigned char packetLength[2]; | |
622 | // DATA FIELD HEADER |
|
622 | // DATA FIELD HEADER | |
623 | unsigned char spare1_pusVersion_spare2; |
|
623 | unsigned char spare1_pusVersion_spare2; | |
624 | unsigned char serviceType; |
|
624 | unsigned char serviceType; | |
625 | unsigned char serviceSubType; |
|
625 | unsigned char serviceSubType; | |
626 | unsigned char destinationID; |
|
626 | unsigned char destinationID; | |
627 | unsigned char time[6]; |
|
627 | unsigned char time[6]; | |
628 | unsigned char sid; |
|
628 | unsigned char sid; | |
629 |
|
629 | |||
630 | //****************** |
|
630 | //****************** | |
631 | // COMMON PARAMETERS |
|
631 | // COMMON PARAMETERS | |
632 | unsigned char unused0; |
|
632 | unsigned char unused0; | |
633 | unsigned char bw_sp0_sp1_r0_r1; |
|
633 | unsigned char bw_sp0_sp1_r0_r1; | |
634 |
|
634 | |||
635 | //****************** |
|
635 | //****************** | |
636 | // NORMAL PARAMETERS |
|
636 | // NORMAL PARAMETERS | |
637 | unsigned char sy_lfr_n_swf_l[2]; |
|
637 | unsigned char sy_lfr_n_swf_l[2]; | |
638 | unsigned char sy_lfr_n_swf_p[2]; |
|
638 | unsigned char sy_lfr_n_swf_p[2]; | |
639 | unsigned char sy_lfr_n_asm_p[2]; |
|
639 | unsigned char sy_lfr_n_asm_p[2]; | |
640 | unsigned char sy_lfr_n_bp_p0; |
|
640 | unsigned char sy_lfr_n_bp_p0; | |
641 | unsigned char sy_lfr_n_bp_p1; |
|
641 | unsigned char sy_lfr_n_bp_p1; | |
642 | unsigned char sy_lfr_n_cwf_long_f3; |
|
642 | unsigned char sy_lfr_n_cwf_long_f3; | |
643 | unsigned char lfr_normal_parameters_spare; |
|
643 | unsigned char lfr_normal_parameters_spare; | |
644 |
|
644 | |||
645 | //***************** |
|
645 | //***************** | |
646 | // BURST PARAMETERS |
|
646 | // BURST PARAMETERS | |
647 | unsigned char sy_lfr_b_bp_p0; |
|
647 | unsigned char sy_lfr_b_bp_p0; | |
648 | unsigned char sy_lfr_b_bp_p1; |
|
648 | unsigned char sy_lfr_b_bp_p1; | |
649 |
|
649 | |||
650 | //**************** |
|
650 | //**************** | |
651 | // SBM1 PARAMETERS |
|
651 | // SBM1 PARAMETERS | |
652 | unsigned char sy_lfr_s1_bp_p0; |
|
652 | unsigned char sy_lfr_s1_bp_p0; | |
653 | unsigned char sy_lfr_s1_bp_p1; |
|
653 | unsigned char sy_lfr_s1_bp_p1; | |
654 |
|
654 | |||
655 | //**************** |
|
655 | //**************** | |
656 | // SBM2 PARAMETERS |
|
656 | // SBM2 PARAMETERS | |
657 | unsigned char sy_lfr_s2_bp_p0; |
|
657 | unsigned char sy_lfr_s2_bp_p0; | |
658 | unsigned char sy_lfr_s2_bp_p1; |
|
658 | unsigned char sy_lfr_s2_bp_p1; | |
659 |
|
659 | |||
660 | // SPARE |
|
660 | // SPARE | |
661 | unsigned char source_data_spare; |
|
661 | unsigned char source_data_spare; | |
662 | } Packet_TM_LFR_PARAMETER_DUMP_t; |
|
662 | } Packet_TM_LFR_PARAMETER_DUMP_t; | |
663 |
|
663 | |||
664 |
|
664 | |||
665 | #endif // CCSDS_TYPES_H_INCLUDED |
|
665 | #endif // CCSDS_TYPES_H_INCLUDED |
@@ -1,349 +1,349 | |||||
1 | /** Functions related to data processing. |
|
1 | /** Functions related to data processing. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. |
|
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. | |
7 | * |
|
7 | * | |
8 | */ |
|
8 | */ | |
9 |
|
9 | |||
10 | #include "avf1_prc1.h" |
|
10 | #include "avf1_prc1.h" | |
11 |
|
11 | |||
12 | nb_sm_before_bp_asm_f1 nb_sm_before_f1; |
|
12 | nb_sm_before_bp_asm_f1 nb_sm_before_f1; | |
13 |
|
13 | |||
14 | //*** |
|
14 | //*** | |
15 | // F1 |
|
15 | // F1 | |
16 | ring_node_asm asm_ring_norm_f1 [ NB_RING_NODES_ASM_NORM_F1 ]; |
|
16 | ring_node_asm asm_ring_norm_f1 [ NB_RING_NODES_ASM_NORM_F1 ]; | |
17 | ring_node_asm asm_ring_burst_sbm_f1[ NB_RING_NODES_ASM_BURST_SBM_F1 ]; |
|
17 | ring_node_asm asm_ring_burst_sbm_f1[ NB_RING_NODES_ASM_BURST_SBM_F1 ]; | |
18 |
|
18 | |||
19 | float asm_f1_reorganized [ TOTAL_SIZE_SM ]; |
|
19 | float asm_f1_reorganized [ TOTAL_SIZE_SM ]; | |
20 | char asm_f1_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; |
|
20 | char asm_f1_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; | |
21 | float compressed_sm_norm_f1[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F1]; |
|
21 | float compressed_sm_norm_f1[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F1]; | |
22 | float compressed_sm_sbm_f1 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 ]; |
|
22 | float compressed_sm_sbm_f1 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 ]; | |
23 |
|
23 | |||
24 | //************ |
|
24 | //************ | |
25 | // RTEMS TASKS |
|
25 | // RTEMS TASKS | |
26 |
|
26 | |||
27 | rtems_task avf1_task( rtems_task_argument lfrRequestedMode ) |
|
27 | rtems_task avf1_task( rtems_task_argument lfrRequestedMode ) | |
28 | { |
|
28 | { | |
29 | int i; |
|
29 | int i; | |
30 |
|
30 | |||
31 | rtems_event_set event_out; |
|
31 | rtems_event_set event_out; | |
32 | rtems_status_code status; |
|
32 | rtems_status_code status; | |
33 | rtems_id queue_id_prc1; |
|
33 | rtems_id queue_id_prc1; | |
34 | asm_msg msgForMATR; |
|
34 | asm_msg msgForMATR; | |
35 | ring_node_sm *ring_node_tab[8]; |
|
35 | ring_node_sm *ring_node_tab[8]; | |
36 | ring_node_asm *current_ring_node_asm_burst_sbm_f1; |
|
36 | ring_node_asm *current_ring_node_asm_burst_sbm_f1; | |
37 | ring_node_asm *current_ring_node_asm_norm_f1; |
|
37 | ring_node_asm *current_ring_node_asm_norm_f1; | |
38 |
|
38 | |||
39 | unsigned int nb_norm_bp1; |
|
39 | unsigned int nb_norm_bp1; | |
40 | unsigned int nb_norm_bp2; |
|
40 | unsigned int nb_norm_bp2; | |
41 | unsigned int nb_norm_asm; |
|
41 | unsigned int nb_norm_asm; | |
42 | unsigned int nb_sbm_bp1; |
|
42 | unsigned int nb_sbm_bp1; | |
43 | unsigned int nb_sbm_bp2; |
|
43 | unsigned int nb_sbm_bp2; | |
44 |
|
44 | |||
45 | nb_norm_bp1 = 0; |
|
45 | nb_norm_bp1 = 0; | |
46 | nb_norm_bp2 = 0; |
|
46 | nb_norm_bp2 = 0; | |
47 | nb_norm_asm = 0; |
|
47 | nb_norm_asm = 0; | |
48 | nb_sbm_bp1 = 0; |
|
48 | nb_sbm_bp1 = 0; | |
49 | nb_sbm_bp2 = 0; |
|
49 | nb_sbm_bp2 = 0; | |
50 |
|
50 | |||
51 | reset_nb_sm_f1( lfrRequestedMode ); // reset the sm counters that drive the BP and ASM computations / transmissions |
|
51 | reset_nb_sm_f1( lfrRequestedMode ); // reset the sm counters that drive the BP and ASM computations / transmissions | |
52 | ASM_generic_init_ring( asm_ring_norm_f1, NB_RING_NODES_ASM_NORM_F1 ); |
|
52 | ASM_generic_init_ring( asm_ring_norm_f1, NB_RING_NODES_ASM_NORM_F1 ); | |
53 | ASM_generic_init_ring( asm_ring_burst_sbm_f1, NB_RING_NODES_ASM_BURST_SBM_F1 ); |
|
53 | ASM_generic_init_ring( asm_ring_burst_sbm_f1, NB_RING_NODES_ASM_BURST_SBM_F1 ); | |
54 | current_ring_node_asm_norm_f1 = asm_ring_norm_f1; |
|
54 | current_ring_node_asm_norm_f1 = asm_ring_norm_f1; | |
55 | current_ring_node_asm_burst_sbm_f1 = asm_ring_burst_sbm_f1; |
|
55 | current_ring_node_asm_burst_sbm_f1 = asm_ring_burst_sbm_f1; | |
56 |
|
56 | |||
57 | BOOT_PRINTF1("in AVF1 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) |
|
57 | BOOT_PRINTF1("in AVF1 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) | |
58 |
|
58 | |||
59 | status = get_message_queue_id_prc1( &queue_id_prc1 ); |
|
59 | status = get_message_queue_id_prc1( &queue_id_prc1 ); | |
60 | if (status != RTEMS_SUCCESSFUL) |
|
60 | if (status != RTEMS_SUCCESSFUL) | |
61 | { |
|
61 | { | |
62 | PRINTF1("in AVF1 *** ERR get_message_queue_id_prc1 %d\n", status) |
|
62 | PRINTF1("in AVF1 *** ERR get_message_queue_id_prc1 %d\n", status) | |
63 | } |
|
63 | } | |
64 |
|
64 | |||
65 | while(1){ |
|
65 | while(1){ | |
66 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
66 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
67 | ring_node_tab[NB_SM_BEFORE_AVF1-1] = ring_node_for_averaging_sm_f1; |
|
67 | ring_node_tab[NB_SM_BEFORE_AVF1-1] = ring_node_for_averaging_sm_f1; | |
68 | for ( i = 2; i < (NB_SM_BEFORE_AVF1+1); i++ ) |
|
68 | for ( i = 2; i < (NB_SM_BEFORE_AVF1+1); i++ ) | |
69 | { |
|
69 | { | |
70 | ring_node_for_averaging_sm_f1 = ring_node_for_averaging_sm_f1->previous; |
|
70 | ring_node_for_averaging_sm_f1 = ring_node_for_averaging_sm_f1->previous; | |
71 | ring_node_tab[NB_SM_BEFORE_AVF1-i] = ring_node_for_averaging_sm_f1; |
|
71 | ring_node_tab[NB_SM_BEFORE_AVF1-i] = ring_node_for_averaging_sm_f1; | |
72 | } |
|
72 | } | |
73 |
|
73 | |||
74 | // compute the average and store it in the averaged_sm_f1 buffer |
|
74 | // compute the average and store it in the averaged_sm_f1 buffer | |
75 | SM_average( current_ring_node_asm_norm_f1->matrix, |
|
75 | SM_average( current_ring_node_asm_norm_f1->matrix, | |
76 | current_ring_node_asm_burst_sbm_f1->matrix, |
|
76 | current_ring_node_asm_burst_sbm_f1->matrix, | |
77 | ring_node_tab, |
|
77 | ring_node_tab, | |
78 | nb_norm_bp1, nb_sbm_bp1 ); |
|
78 | nb_norm_bp1, nb_sbm_bp1 ); | |
79 |
|
79 | |||
80 | // update nb_average |
|
80 | // update nb_average | |
81 | nb_norm_bp1 = nb_norm_bp1 + NB_SM_BEFORE_AVF1; |
|
81 | nb_norm_bp1 = nb_norm_bp1 + NB_SM_BEFORE_AVF1; | |
82 | nb_norm_bp2 = nb_norm_bp2 + NB_SM_BEFORE_AVF1; |
|
82 | nb_norm_bp2 = nb_norm_bp2 + NB_SM_BEFORE_AVF1; | |
83 | nb_norm_asm = nb_norm_asm + NB_SM_BEFORE_AVF1; |
|
83 | nb_norm_asm = nb_norm_asm + NB_SM_BEFORE_AVF1; | |
84 | nb_sbm_bp1 = nb_sbm_bp1 + NB_SM_BEFORE_AVF1; |
|
84 | nb_sbm_bp1 = nb_sbm_bp1 + NB_SM_BEFORE_AVF1; | |
85 | nb_sbm_bp2 = nb_sbm_bp2 + NB_SM_BEFORE_AVF1; |
|
85 | nb_sbm_bp2 = nb_sbm_bp2 + NB_SM_BEFORE_AVF1; | |
86 |
|
86 | |||
87 | //**************************************** |
|
87 | //**************************************** | |
88 | // initialize the mesage for the MATR task |
|
88 | // initialize the mesage for the MATR task | |
89 | msgForMATR.event = 0x00; // this composite event will be sent to the PRC1 task |
|
89 | msgForMATR.event = 0x00; // this composite event will be sent to the PRC1 task | |
90 | msgForMATR.burst_sbm = current_ring_node_asm_burst_sbm_f1; |
|
90 | msgForMATR.burst_sbm = current_ring_node_asm_burst_sbm_f1; | |
91 | msgForMATR.norm = current_ring_node_asm_norm_f1; |
|
91 | msgForMATR.norm = current_ring_node_asm_norm_f1; | |
92 | // msgForMATR.coarseTime = ( (unsigned int *) (ring_node_tab[0]->buffer_address) )[0]; |
|
92 | // msgForMATR.coarseTime = ( (unsigned int *) (ring_node_tab[0]->buffer_address) )[0]; | |
93 | // msgForMATR.fineTime = ( (unsigned int *) (ring_node_tab[0]->buffer_address) )[1]; |
|
93 | // msgForMATR.fineTime = ( (unsigned int *) (ring_node_tab[0]->buffer_address) )[1]; | |
94 | msgForMATR.coarseTime = time_management_regs->coarse_time; |
|
94 | msgForMATR.coarseTime = time_management_regs->coarse_time; | |
95 | msgForMATR.fineTime = time_management_regs->fine_time; |
|
95 | msgForMATR.fineTime = time_management_regs->fine_time; | |
96 |
|
96 | |||
97 | if (nb_sbm_bp1 == nb_sm_before_f1.burst_sbm_bp1) |
|
97 | if (nb_sbm_bp1 == nb_sm_before_f1.burst_sbm_bp1) | |
98 | { |
|
98 | { | |
99 | nb_sbm_bp1 = 0; |
|
99 | nb_sbm_bp1 = 0; | |
100 | // set another ring for the ASM storage |
|
100 | // set another ring for the ASM storage | |
101 | current_ring_node_asm_burst_sbm_f1 = current_ring_node_asm_burst_sbm_f1->next; |
|
101 | current_ring_node_asm_burst_sbm_f1 = current_ring_node_asm_burst_sbm_f1->next; | |
102 | if ( (lfrCurrentMode == LFR_MODE_BURST) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
102 | if ( (lfrCurrentMode == LFR_MODE_BURST) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
103 | { |
|
103 | { | |
104 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_SBM_BP1_F1; |
|
104 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_SBM_BP1_F1; | |
105 | } |
|
105 | } | |
106 | } |
|
106 | } | |
107 |
|
107 | |||
108 | if (nb_sbm_bp2 == nb_sm_before_f1.burst_sbm_bp2) |
|
108 | if (nb_sbm_bp2 == nb_sm_before_f1.burst_sbm_bp2) | |
109 | { |
|
109 | { | |
110 | nb_sbm_bp2 = 0; |
|
110 | nb_sbm_bp2 = 0; | |
111 | if ( (lfrCurrentMode == LFR_MODE_BURST) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
111 | if ( (lfrCurrentMode == LFR_MODE_BURST) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
112 | { |
|
112 | { | |
113 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_SBM_BP2_F1; |
|
113 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_SBM_BP2_F1; | |
114 | } |
|
114 | } | |
115 | } |
|
115 | } | |
116 |
|
116 | |||
117 | if (nb_norm_bp1 == nb_sm_before_f1.norm_bp1) |
|
117 | if (nb_norm_bp1 == nb_sm_before_f1.norm_bp1) | |
118 | { |
|
118 | { | |
119 | nb_norm_bp1 = 0; |
|
119 | nb_norm_bp1 = 0; | |
120 | // set another ring for the ASM storage |
|
120 | // set another ring for the ASM storage | |
121 | current_ring_node_asm_norm_f1 = current_ring_node_asm_norm_f1->next; |
|
121 | current_ring_node_asm_norm_f1 = current_ring_node_asm_norm_f1->next; | |
122 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
122 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
123 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
123 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
124 | { |
|
124 | { | |
125 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP1_F1; |
|
125 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP1_F1; | |
126 | } |
|
126 | } | |
127 | } |
|
127 | } | |
128 |
|
128 | |||
129 | if (nb_norm_bp2 == nb_sm_before_f1.norm_bp2) |
|
129 | if (nb_norm_bp2 == nb_sm_before_f1.norm_bp2) | |
130 | { |
|
130 | { | |
131 | nb_norm_bp2 = 0; |
|
131 | nb_norm_bp2 = 0; | |
132 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
132 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
133 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
133 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
134 | { |
|
134 | { | |
135 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP2_F1; |
|
135 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP2_F1; | |
136 | } |
|
136 | } | |
137 | } |
|
137 | } | |
138 |
|
138 | |||
139 | if (nb_norm_asm == nb_sm_before_f1.norm_asm) |
|
139 | if (nb_norm_asm == nb_sm_before_f1.norm_asm) | |
140 | { |
|
140 | { | |
141 | nb_norm_asm = 0; |
|
141 | nb_norm_asm = 0; | |
142 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
142 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
143 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
143 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
144 | { |
|
144 | { | |
145 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_ASM_F1; |
|
145 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_ASM_F1; | |
146 | } |
|
146 | } | |
147 | } |
|
147 | } | |
148 |
|
148 | |||
149 | //************************* |
|
149 | //************************* | |
150 | // send the message to MATR |
|
150 | // send the message to MATR | |
151 | if (msgForMATR.event != 0x00) |
|
151 | if (msgForMATR.event != 0x00) | |
152 | { |
|
152 | { | |
153 | status = rtems_message_queue_send( queue_id_prc1, (char *) &msgForMATR, MSG_QUEUE_SIZE_PRC1); |
|
153 | status = rtems_message_queue_send( queue_id_prc1, (char *) &msgForMATR, MSG_QUEUE_SIZE_PRC1); | |
154 | } |
|
154 | } | |
155 |
|
155 | |||
156 | if (status != RTEMS_SUCCESSFUL) { |
|
156 | if (status != RTEMS_SUCCESSFUL) { | |
157 | printf("in AVF1 *** Error sending message to PRC1, code %d\n", status); |
|
157 | printf("in AVF1 *** Error sending message to PRC1, code %d\n", status); | |
158 | } |
|
158 | } | |
159 | } |
|
159 | } | |
160 | } |
|
160 | } | |
161 |
|
161 | |||
162 | rtems_task prc1_task( rtems_task_argument lfrRequestedMode ) |
|
162 | rtems_task prc1_task( rtems_task_argument lfrRequestedMode ) | |
163 | { |
|
163 | { | |
164 | char incomingData[MSG_QUEUE_SIZE_SEND]; // incoming data buffer |
|
164 | char incomingData[MSG_QUEUE_SIZE_SEND]; // incoming data buffer | |
165 | size_t size; // size of the incoming TC packet |
|
165 | size_t size; // size of the incoming TC packet | |
166 | asm_msg *incomingMsg; |
|
166 | asm_msg *incomingMsg; | |
167 | // |
|
167 | // | |
168 | spw_ioctl_pkt_send spw_ioctl_send_ASM; |
|
168 | spw_ioctl_pkt_send spw_ioctl_send_ASM; | |
169 | rtems_status_code status; |
|
169 | rtems_status_code status; | |
170 | rtems_id queue_id_send; |
|
170 | rtems_id queue_id_send; | |
171 | rtems_id queue_id_q_p1; |
|
171 | rtems_id queue_id_q_p1; | |
172 | Header_TM_LFR_SCIENCE_ASM_t headerASM; |
|
172 | Header_TM_LFR_SCIENCE_ASM_t headerASM; | |
173 | bp_packet_with_spare packet_norm_bp1; |
|
173 | bp_packet_with_spare packet_norm_bp1; | |
174 | bp_packet packet_norm_bp2; |
|
174 | bp_packet packet_norm_bp2; | |
175 | bp_packet packet_sbm_bp1; |
|
175 | bp_packet packet_sbm_bp1; | |
176 | bp_packet packet_sbm_bp2; |
|
176 | bp_packet packet_sbm_bp2; | |
177 |
|
177 | |||
178 | unsigned long long int localTime; |
|
178 | unsigned long long int localTime; | |
179 |
|
179 | |||
180 | ASM_init_header( &headerASM ); |
|
180 | ASM_init_header( &headerASM ); | |
181 |
|
181 | |||
182 | //************* |
|
182 | //************* | |
183 | // NORM headers |
|
183 | // NORM headers | |
184 | BP_init_header_with_spare( &packet_norm_bp1.header, |
|
184 | BP_init_header_with_spare( &packet_norm_bp1.header, | |
185 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP1_F1, |
|
185 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP1_F1, | |
186 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1, NB_BINS_COMPRESSED_SM_F1 ); |
|
186 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1, NB_BINS_COMPRESSED_SM_F1 ); | |
187 | BP_init_header( &packet_norm_bp2.header, |
|
187 | BP_init_header( &packet_norm_bp2.header, | |
188 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP2_F1, |
|
188 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP2_F1, | |
189 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1, NB_BINS_COMPRESSED_SM_F1); |
|
189 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1, NB_BINS_COMPRESSED_SM_F1); | |
190 |
|
190 | |||
191 | //*********************** |
|
191 | //*********************** | |
192 | // BURST and SBM2 headers |
|
192 | // BURST and SBM2 headers | |
193 | if ( lfrRequestedMode == LFR_MODE_BURST ) |
|
193 | if ( lfrRequestedMode == LFR_MODE_BURST ) | |
194 | { |
|
194 | { | |
195 | BP_init_header( &packet_sbm_bp1.header, |
|
195 | BP_init_header( &packet_sbm_bp1.header, | |
196 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP1_F1, |
|
196 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP1_F1, | |
197 |
PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F |
|
197 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1, NB_BINS_COMPRESSED_SM_SBM_F1); | |
198 | BP_init_header( &packet_sbm_bp2.header, |
|
198 | BP_init_header( &packet_sbm_bp2.header, | |
199 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP2_F1, |
|
199 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP2_F1, | |
200 |
PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F |
|
200 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1, NB_BINS_COMPRESSED_SM_SBM_F1); | |
201 | } |
|
201 | } | |
202 | else if ( lfrRequestedMode == LFR_MODE_SBM2 ) |
|
202 | else if ( lfrRequestedMode == LFR_MODE_SBM2 ) | |
203 | { |
|
203 | { | |
204 | BP_init_header( &packet_sbm_bp1.header, |
|
204 | BP_init_header( &packet_sbm_bp1.header, | |
205 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP1_F1, |
|
205 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP1_F1, | |
206 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1, NB_BINS_COMPRESSED_SM_SBM_F1); |
|
206 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1, NB_BINS_COMPRESSED_SM_SBM_F1); | |
207 | BP_init_header( &packet_sbm_bp2.header, |
|
207 | BP_init_header( &packet_sbm_bp2.header, | |
208 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP2_F1, |
|
208 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP2_F1, | |
209 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1, NB_BINS_COMPRESSED_SM_SBM_F1); |
|
209 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1, NB_BINS_COMPRESSED_SM_SBM_F1); | |
210 | } |
|
210 | } | |
211 | else |
|
211 | else | |
212 | { |
|
212 | { | |
213 | PRINTF1("in PRC1 *** lfrRequestedMode is %d, several headers not initialized\n", (unsigned int) lfrRequestedMode) |
|
213 | PRINTF1("in PRC1 *** lfrRequestedMode is %d, several headers not initialized\n", (unsigned int) lfrRequestedMode) | |
214 | } |
|
214 | } | |
215 |
|
215 | |||
216 | status = get_message_queue_id_send( &queue_id_send ); |
|
216 | status = get_message_queue_id_send( &queue_id_send ); | |
217 | if (status != RTEMS_SUCCESSFUL) |
|
217 | if (status != RTEMS_SUCCESSFUL) | |
218 | { |
|
218 | { | |
219 | PRINTF1("in PRC1 *** ERR get_message_queue_id_send %d\n", status) |
|
219 | PRINTF1("in PRC1 *** ERR get_message_queue_id_send %d\n", status) | |
220 | } |
|
220 | } | |
221 | status = get_message_queue_id_prc1( &queue_id_q_p1); |
|
221 | status = get_message_queue_id_prc1( &queue_id_q_p1); | |
222 | if (status != RTEMS_SUCCESSFUL) |
|
222 | if (status != RTEMS_SUCCESSFUL) | |
223 | { |
|
223 | { | |
224 | PRINTF1("in PRC1 *** ERR get_message_queue_id_prc1 %d\n", status) |
|
224 | PRINTF1("in PRC1 *** ERR get_message_queue_id_prc1 %d\n", status) | |
225 | } |
|
225 | } | |
226 |
|
226 | |||
227 | BOOT_PRINTF1("in PRC1 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) |
|
227 | BOOT_PRINTF1("in PRC1 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) | |
228 |
|
228 | |||
229 | while(1){ |
|
229 | while(1){ | |
230 | status = rtems_message_queue_receive( queue_id_q_p1, incomingData, &size, //************************************ |
|
230 | status = rtems_message_queue_receive( queue_id_q_p1, incomingData, &size, //************************************ | |
231 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); // wait for a message coming from AVF0 |
|
231 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); // wait for a message coming from AVF0 | |
232 |
|
232 | |||
233 | incomingMsg = (asm_msg*) incomingData; |
|
233 | incomingMsg = (asm_msg*) incomingData; | |
234 |
|
234 | |||
235 | localTime = getTimeAsUnsignedLongLongInt( ); |
|
235 | localTime = getTimeAsUnsignedLongLongInt( ); | |
236 | //*********** |
|
236 | //*********** | |
237 | //*********** |
|
237 | //*********** | |
238 | // BURST SBM2 |
|
238 | // BURST SBM2 | |
239 | //*********** |
|
239 | //*********** | |
240 | //*********** |
|
240 | //*********** | |
241 | if (incomingMsg->event & RTEMS_EVENT_BURST_SBM_BP1_F1 ) |
|
241 | if (incomingMsg->event & RTEMS_EVENT_BURST_SBM_BP1_F1 ) | |
242 | { |
|
242 | { | |
243 | // 1) compress the matrix for Basic Parameters calculation |
|
243 | // 1) compress the matrix for Basic Parameters calculation | |
244 | ASM_compress_reorganize_and_divide( incomingMsg->burst_sbm->matrix, compressed_sm_sbm_f1, |
|
244 | ASM_compress_reorganize_and_divide( incomingMsg->burst_sbm->matrix, compressed_sm_sbm_f1, | |
245 | nb_sm_before_f1.burst_sbm_bp1, |
|
245 | nb_sm_before_f1.burst_sbm_bp1, | |
246 | NB_BINS_COMPRESSED_SM_SBM_F1, NB_BINS_TO_AVERAGE_ASM_SBM_F1, |
|
246 | NB_BINS_COMPRESSED_SM_SBM_F1, NB_BINS_TO_AVERAGE_ASM_SBM_F1, | |
247 | ASM_F1_INDICE_START); |
|
247 | ASM_F1_INDICE_START); | |
248 | // 2) compute the BP1 set |
|
248 | // 2) compute the BP1 set | |
249 |
|
249 | |||
250 | // 3) send the BP1 set |
|
250 | // 3) send the BP1 set | |
251 | set_time( packet_sbm_bp1.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
251 | set_time( packet_sbm_bp1.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
252 | set_time( packet_sbm_bp1.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
252 | set_time( packet_sbm_bp1.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
253 | BP_send( (char *) &packet_sbm_bp1, queue_id_send, |
|
253 | BP_send( (char *) &packet_sbm_bp1, queue_id_send, | |
254 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 + PACKET_LENGTH_DELTA, |
|
254 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 + PACKET_LENGTH_DELTA, | |
255 | SID_SBM2_BP1_F1 ); |
|
255 | SID_SBM2_BP1_F1 ); | |
256 | // 4) compute the BP2 set if needed |
|
256 | // 4) compute the BP2 set if needed | |
257 | if ( incomingMsg->event & RTEMS_EVENT_BURST_SBM_BP2_F1 ) |
|
257 | if ( incomingMsg->event & RTEMS_EVENT_BURST_SBM_BP2_F1 ) | |
258 | { |
|
258 | { | |
259 | // 1) compute the BP2 set |
|
259 | // 1) compute the BP2 set | |
260 |
|
260 | |||
261 | // 2) send the BP2 set |
|
261 | // 2) send the BP2 set | |
262 | set_time( packet_sbm_bp2.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
262 | set_time( packet_sbm_bp2.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
263 | set_time( packet_sbm_bp2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
263 | set_time( packet_sbm_bp2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
264 | BP_send( (char *) &packet_sbm_bp2, queue_id_send, |
|
264 | BP_send( (char *) &packet_sbm_bp2, queue_id_send, | |
265 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 + PACKET_LENGTH_DELTA, |
|
265 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 + PACKET_LENGTH_DELTA, | |
266 | SID_SBM2_BP2_F1 ); |
|
266 | SID_SBM2_BP2_F1 ); | |
267 | } |
|
267 | } | |
268 | } |
|
268 | } | |
269 |
|
269 | |||
270 | //***** |
|
270 | //***** | |
271 | //***** |
|
271 | //***** | |
272 | // NORM |
|
272 | // NORM | |
273 | //***** |
|
273 | //***** | |
274 | //***** |
|
274 | //***** | |
275 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F1) |
|
275 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F1) | |
276 | { |
|
276 | { | |
277 | // 1) compress the matrix for Basic Parameters calculation |
|
277 | // 1) compress the matrix for Basic Parameters calculation | |
278 | ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f1, |
|
278 | ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f1, | |
279 | nb_sm_before_f1.norm_bp1, |
|
279 | nb_sm_before_f1.norm_bp1, | |
280 | NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0, |
|
280 | NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0, | |
281 | ASM_F0_INDICE_START ); |
|
281 | ASM_F0_INDICE_START ); | |
282 | // 2) compute the BP1 set |
|
282 | // 2) compute the BP1 set | |
283 |
|
283 | |||
284 | // 3) send the BP1 set |
|
284 | // 3) send the BP1 set | |
285 | set_time( packet_norm_bp1.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
285 | set_time( packet_norm_bp1.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
286 | set_time( packet_norm_bp1.header.acquisitionTime, (unsigned char *) &incomingMsg->fineTime ); |
|
286 | set_time( packet_norm_bp1.header.acquisitionTime, (unsigned char *) &incomingMsg->fineTime ); | |
287 | BP_send( (char *) &packet_norm_bp1, queue_id_send, |
|
287 | BP_send( (char *) &packet_norm_bp1, queue_id_send, | |
288 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 + PACKET_LENGTH_DELTA, |
|
288 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 + PACKET_LENGTH_DELTA, | |
289 | SID_NORM_BP1_F1 ); |
|
289 | SID_NORM_BP1_F1 ); | |
290 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP2_F1) |
|
290 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP2_F1) | |
291 | { |
|
291 | { | |
292 | // 1) compute the BP2 set |
|
292 | // 1) compute the BP2 set | |
293 |
|
293 | |||
294 | // 2) send the BP2 set |
|
294 | // 2) send the BP2 set | |
295 | set_time( packet_norm_bp2.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
295 | set_time( packet_norm_bp2.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
296 | set_time( packet_norm_bp2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
296 | set_time( packet_norm_bp2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
297 | BP_send( (char *) &packet_norm_bp2, queue_id_send, |
|
297 | BP_send( (char *) &packet_norm_bp2, queue_id_send, | |
298 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 + PACKET_LENGTH_DELTA, |
|
298 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 + PACKET_LENGTH_DELTA, | |
299 | SID_NORM_BP2_F1 ); |
|
299 | SID_NORM_BP2_F1 ); | |
300 | } |
|
300 | } | |
301 | } |
|
301 | } | |
302 |
|
302 | |||
303 | if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F1) |
|
303 | if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F1) | |
304 | { |
|
304 | { | |
305 | // 1) reorganize the ASM and divide |
|
305 | // 1) reorganize the ASM and divide | |
306 | ASM_reorganize_and_divide( incomingMsg->norm->matrix, |
|
306 | ASM_reorganize_and_divide( incomingMsg->norm->matrix, | |
307 | asm_f1_reorganized, |
|
307 | asm_f1_reorganized, | |
308 | nb_sm_before_f1.norm_bp1 ); |
|
308 | nb_sm_before_f1.norm_bp1 ); | |
309 | // 2) convert the float array in a char array |
|
309 | // 2) convert the float array in a char array | |
310 | ASM_convert( asm_f1_reorganized, asm_f1_char); |
|
310 | ASM_convert( asm_f1_reorganized, asm_f1_char); | |
311 | // 3) send the spectral matrix packets |
|
311 | // 3) send the spectral matrix packets | |
312 | set_time( headerASM.time , (unsigned char *) &incomingMsg->coarseTime ); |
|
312 | set_time( headerASM.time , (unsigned char *) &incomingMsg->coarseTime ); | |
313 | set_time( headerASM.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
313 | set_time( headerASM.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
314 | ASM_send( &headerASM, asm_f1_char, SID_NORM_ASM_F1, &spw_ioctl_send_ASM, queue_id_send); |
|
314 | ASM_send( &headerASM, asm_f1_char, SID_NORM_ASM_F1, &spw_ioctl_send_ASM, queue_id_send); | |
315 | } |
|
315 | } | |
316 |
|
316 | |||
317 | } |
|
317 | } | |
318 | } |
|
318 | } | |
319 |
|
319 | |||
320 | //********** |
|
320 | //********** | |
321 | // FUNCTIONS |
|
321 | // FUNCTIONS | |
322 |
|
322 | |||
323 | void reset_nb_sm_f1( unsigned char lfrMode ) |
|
323 | void reset_nb_sm_f1( unsigned char lfrMode ) | |
324 | { |
|
324 | { | |
325 | nb_sm_before_f1.norm_bp1 = parameter_dump_packet.sy_lfr_n_bp_p0 * 16; |
|
325 | nb_sm_before_f1.norm_bp1 = parameter_dump_packet.sy_lfr_n_bp_p0 * 16; | |
326 | nb_sm_before_f1.norm_bp2 = parameter_dump_packet.sy_lfr_n_bp_p1 * 16; |
|
326 | nb_sm_before_f1.norm_bp2 = parameter_dump_packet.sy_lfr_n_bp_p1 * 16; | |
327 | nb_sm_before_f1.norm_asm = (parameter_dump_packet.sy_lfr_n_asm_p[0] * 256 + parameter_dump_packet.sy_lfr_n_asm_p[1]) * 16; |
|
327 | nb_sm_before_f1.norm_asm = (parameter_dump_packet.sy_lfr_n_asm_p[0] * 256 + parameter_dump_packet.sy_lfr_n_asm_p[1]) * 16; | |
328 | nb_sm_before_f1.sbm2_bp1 = parameter_dump_packet.sy_lfr_s2_bp_p0 * 16; |
|
328 | nb_sm_before_f1.sbm2_bp1 = parameter_dump_packet.sy_lfr_s2_bp_p0 * 16; | |
329 | nb_sm_before_f1.sbm2_bp2 = parameter_dump_packet.sy_lfr_s2_bp_p1 * 16; |
|
329 | nb_sm_before_f1.sbm2_bp2 = parameter_dump_packet.sy_lfr_s2_bp_p1 * 16; | |
330 | nb_sm_before_f1.burst_bp1 = parameter_dump_packet.sy_lfr_b_bp_p0 * 16; |
|
330 | nb_sm_before_f1.burst_bp1 = parameter_dump_packet.sy_lfr_b_bp_p0 * 16; | |
331 | nb_sm_before_f1.burst_bp2 = parameter_dump_packet.sy_lfr_b_bp_p1 * 16; |
|
331 | nb_sm_before_f1.burst_bp2 = parameter_dump_packet.sy_lfr_b_bp_p1 * 16; | |
332 |
|
332 | |||
333 | if (lfrMode == LFR_MODE_SBM2) |
|
333 | if (lfrMode == LFR_MODE_SBM2) | |
334 | { |
|
334 | { | |
335 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.sbm2_bp1; |
|
335 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.sbm2_bp1; | |
336 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.sbm2_bp2; |
|
336 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.sbm2_bp2; | |
337 | } |
|
337 | } | |
338 | else if (lfrMode == LFR_MODE_BURST) |
|
338 | else if (lfrMode == LFR_MODE_BURST) | |
339 | { |
|
339 | { | |
340 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.burst_bp1; |
|
340 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.burst_bp1; | |
341 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.burst_bp2; |
|
341 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.burst_bp2; | |
342 | } |
|
342 | } | |
343 | else |
|
343 | else | |
344 | { |
|
344 | { | |
345 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.burst_bp1; |
|
345 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.burst_bp1; | |
346 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.burst_bp2; |
|
346 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.burst_bp2; | |
347 | } |
|
347 | } | |
348 | } |
|
348 | } | |
349 |
|
349 |
General Comments 0
You need to be logged in to leave comments.
Login now