##// END OF EJS Templates
Closed
Pull request !53 Created on Mon, 02 Jan 2017 18:36:56, by
This commit allow to switch to cmake, this allow much better build workflow.
Pull request versions not available.
ver Time Author Commit Description
latest r303:4516b415f0c6
Cmake: added headers in src var to see them in QTC.
v4 r302:04c5ed6433df
added prefix to FSW and timegen options
v3 r301:606a2093de44
Fixed small mistake
v2 r300:94c9c25ace49
Converted timegen to cmake.
v1 r299:04a96444cae4
Switched to cmake, more portable and better conf options!
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
@@ -0,0 +1,83
1 def ieee(f, word=32):
2 """Generate the binary string representing a floating-point value in IEEE754 code."""
3 f = float(f)
4 if word not in (16, 32, 64, 128):
5 raise ValueError("IEEE754 is defined for 16, 32, 64 and 128 bit words.")
6 exp_bin = range({16:5, 32:8, 64:11, 128:15}[word])
7 frac_bin = range(word - len(exp_bin) - 1)
8
9 # Sign.
10 sign_bin = [int(f < 0)]
11 f = abs(f)
12
13 # Find exponent (adding the bias).
14 bias = 2**(len(exp_bin)-1) -1
15 exponent = bias
16 while f >= 2:
17 exponent += 1
18 f /= 2
19 while f < 1 and exponent > 0:
20 exponent -= 1
21 f *= 2
22 if not 0 <= exponent < 2*(bias+1):
23 raise ValueError("Exponent overflow: Absolute exponent must be smaller than %d." % (bias + 1))
24
25 # Encode exponent in binary.
26 for i in exp_bin[::-1]:
27 exp_bin[i] = int(exponent % 2)
28 exponent /= 2
29
30 # Remove the leading 1 bit.
31 f -= 1
32 for i in frac_bin:
33 f *= 2
34 frac_bin[i] = int(f >= 1)
35 f -= frac_bin[i]
36
37 # Join the binary string components together.
38 return "".join(map(str, sign_bin + exp_bin + frac_bin))
39
40 def ieee_decode(binary):
41 """Decode a binary string representing a floating-point value in IEEE754 code."""
42
43 # Determine the word size of the binary.
44 word = len(binary)
45 if word not in (16, 32, 64, 128):
46 raise ValueError("IEEE754 is defined for 16, 32, 64 and 128 bit words.")
47
48 # Determine the length of the exponent.
49 e = {16:5, 32:8, 64:11, 128:15}[word]
50
51 # Turn the binary string into a bit-list.
52 binary = [int(c) for c in binary]
53
54 # Split the components.
55 sign = -2 * binary[0] + 1
56 exp_bin = binary[1:1+e]
57 frac_bin = binary[1+e:]
58
59 # Decode the exponent.
60 bias = 2**(e-1) - 1
61 exponent = -bias
62 c = 1
63 for i in exp_bin[::-1]:
64 exponent += i * c
65 c *= 2
66
67 # Decode the fraction.
68 f = float(2**exponent)
69 power = f
70 for i in frac_bin:
71 power *= 0.5
72 f += i * power
73
74 return sign * f
75
76 if __name__ == "__main__":
77 val = ieee(24.)
78 val
79 print val[:16]
80 print val[0], val[1], val[2]
81 val_in_int = int(val[:16], 2)
82 print val_in_int
83 print hex( val_in_int ) No newline at end of file
@@ -0,0 +1,12
1 target extended-remote :3333
2
3 # Reset to known state
4 monitor reset halt
5 load
6 monitor reset init
7
8 # Set a breakpoint at main().
9 break set_apbuart_scaler_reload_register
10
11 # Run to the breakpoint.
12 continue
@@ -0,0 +1,11
1 {
2 "folders":
3 [
4 {
5 "path": "/opt/DEV_PLE/FSW-qt/bin"
6 },
7 {
8 "path": "spectralmatrix"
9 }
10 ]
11 }
@@ -0,0 +1,282
1 {
2 "auto_complete":
3 {
4 "selected_items":
5 [
6 [
7 "data",
8 "dataInIntReorganized"
9 ],
10 [
11 "index",
12 "indexTransformDecimationInFrequency"
13 ],
14 [
15 "in",
16 "indexTransformDecimationInFrequency"
17 ],
18 [
19 "dft",
20 "dft_val"
21 ],
22 [
23 "butter",
24 "butterflyProcessor"
25 ],
26 [
27 "chec",
28 "checkbox_sy_lfr_bw"
29 ],
30 [
31 "send",
32 "sendLoadCommonPar"
33 ],
34 [
35 "groupbo",
36 "groupbox_tc_lfr_load_common_par"
37 ],
38 [
39 "l",
40 "layout_tc"
41 ],
42 [
43 "button",
44 "button_tc_lfr_load_common_par"
45 ],
46 [
47 "a",
48 "addWidget"
49 ],
50 [
51 "group",
52 "groupbox_tc_lfr_load_common_par"
53 ],
54 [
55 "c",
56 "common"
57 ],
58 [
59 "laben",
60 "label_UNKNOWN_nb"
61 ],
62 [
63 "UN",
64 "UNKNOWN_nb"
65 ]
66 ]
67 },
68 "buffers":
69 [
70 {
71 "file": "spectralmatrix/readmatrix.py",
72 "settings":
73 {
74 "buffer_size": 1115,
75 "line_ending": "Unix"
76 }
77 }
78 ],
79 "build_system": "",
80 "command_palette":
81 {
82 "height": 392.0,
83 "selected_items":
84 [
85 ],
86 "width": 392.0
87 },
88 "console":
89 {
90 "height": 0.0
91 },
92 "distraction_free":
93 {
94 "menu_visible": true,
95 "show_minimap": false,
96 "show_open_files": false,
97 "show_tabs": false,
98 "side_bar_visible": false,
99 "status_bar_visible": false
100 },
101 "file_history":
102 [
103 "/opt/DEV_PLE/FSW-qt/bin/spectralmatrix/asm_f0_test_20140403_case1.txt",
104 "/opt/DEV_PLE/FSW-qt/bin/spectralmatrix/asm_f0_test_paul_1.txt",
105 "/opt/DEV_PLE/FSW-qt/bin/load_spectral_matrix.py",
106 "/opt/DEV_PLE/FSW-qt/bin/floatconversion.py",
107 "/opt/VALIDATION/waveform_analysis/main_sbm2.py",
108 "/opt/VALIDATION/waveform_analysis/main_cwf_f1.py",
109 "/opt/VALIDATION/waveform_analysis/main_cwf_f3.py",
110 "/opt/VALIDATION/waveform_analysis/main_cwf_f2.py",
111 "/opt/VALIDATION/waveform_analysis/main_128.py",
112 "/opt/VALIDATION/waveform_analysis/main_64.py",
113 "/opt/LFR_EMULATOR/SRC/testing_FFT.py",
114 "/opt/LFR_EMULATOR/main.py",
115 "/opt/LFR_EMULATOR/fft_8_decimation_in_frequency.py",
116 "/opt/LFR_EMULATOR/index_transform_decimation_in_frequency.py",
117 "/opt/LFR_EMULATOR/efficient_complex_multiplier.py",
118 "/opt/LFR_EMULATOR/butterfly_processor.py",
119 "/opt/LFR_EMULATOR/twiddle_factors.py",
120 "/opt/LFR_EMULATOR/SRC/filters.py",
121 "/opt/LFR_EMULATOR/SRC/test_cases1.py",
122 "/opt/VALIDATION/lfrverif/LFR_SVS/SVS-0001/Step02/UploadDumpMemory.py",
123 "/opt/VALIDATION/lfrverif/LFR_SVS/SVS-0001/Step02/UploadDumpMemory (copy).py",
124 "/opt/VALIDATION/lfrverif/LFR_SVS/SVS-0001/Step01/grspw_registers.py",
125 "/opt/VALIDATION/lfrverif/LFR_SVS/SVS-0002/tc_during_matrix_transmission.py",
126 "/opt/VALIDATION/lfrverif/common/actions_tc_lfr_launcher.py",
127 "/opt/VALIDATION/lfrverif/common/test_monitor.py",
128 "/opt/VALIDATION/validation.sublime-workspace",
129 "/opt/VALIDATION/validation.sublime-project",
130 "/opt/PYTHON/lfrverif/test1/test1main.py",
131 "/opt/PYTHON/lfrverif/test1/test1launcher.py",
132 "/opt/PYTHON/lfrverif/common/crcforlfr.py",
133 "/opt/PYTHON/lfrverif/common/tcparams.py",
134 "/opt/PYTHON/lfrverif/test1/testgui.py",
135 "/opt/PYTHON/lfrverif/test1/tcmonitor.py",
136 "/opt/PYTHON/lfrverif/test1/lppmoncfg.py",
137 "/opt/PYTHON/lfrverif/test1/wfdisplay.py",
138 "/opt/PYTHON/lfrverif/test1/lppmonplot.py",
139 "/opt/PYTHON/lfrverif/test1/tmmonitor.py"
140 ],
141 "find":
142 {
143 "height": 34.0
144 },
145 "find_in_files":
146 {
147 "height": 0.0,
148 "where_history":
149 [
150 "/opt/VALIDATION/lfrverif",
151 "/opt/VALIDATION/lfrverif/LFR_SVS"
152 ]
153 },
154 "find_state":
155 {
156 "case_sensitive": false,
157 "find_history":
158 [
159 "snapshots",
160 "def displayInfoSendTc",
161 "dump",
162 "tc_lfr_dump_par",
163 "processpac",
164 "WriteSPWDelay",
165 "sendPacket",
166 "sendLoadCommonPar"
167 ],
168 "highlight": true,
169 "in_selection": false,
170 "preserve_case": false,
171 "regex": false,
172 "replace_history":
173 [
174 ],
175 "reverse": false,
176 "show_context": true,
177 "use_buffer2": true,
178 "whole_word": false,
179 "wrap": true
180 },
181 "groups":
182 [
183 {
184 "selected": 0,
185 "sheets":
186 [
187 {
188 "buffer": 0,
189 "file": "spectralmatrix/readmatrix.py",
190 "settings":
191 {
192 "buffer_size": 1115,
193 "regions":
194 {
195 },
196 "selection":
197 [
198 [
199 208,
200 208
201 ]
202 ],
203 "settings":
204 {
205 "syntax": "Packages/Python/Python.tmLanguage"
206 },
207 "translation.x": 0.0,
208 "translation.y": 0.0,
209 "zoom_level": 1.0
210 },
211 "type": "text"
212 }
213 ]
214 }
215 ],
216 "incremental_find":
217 {
218 "height": 0.0
219 },
220 "input":
221 {
222 "height": 0.0
223 },
224 "layout":
225 {
226 "cells":
227 [
228 [
229 0,
230 0,
231 1,
232 1
233 ]
234 ],
235 "cols":
236 [
237 0.0,
238 1.0
239 ],
240 "rows":
241 [
242 0.0,
243 1.0
244 ]
245 },
246 "menu_visible": true,
247 "output.exec":
248 {
249 "height": 257.0
250 },
251 "replace":
252 {
253 "height": 0.0
254 },
255 "save_all_on_build": true,
256 "select_file":
257 {
258 "height": 0.0,
259 "selected_items":
260 [
261 ],
262 "width": 0.0
263 },
264 "select_project":
265 {
266 "height": 500.0,
267 "selected_items":
268 [
269 [
270 "",
271 "/opt/VALIDATION/waveform_analysis/wfmr_plots.sublime-project"
272 ]
273 ],
274 "width": 380.0
275 },
276 "show_minimap": true,
277 "show_open_files": false,
278 "show_tabs": true,
279 "side_bar_visible": true,
280 "side_bar_width": 255.0,
281 "status_bar_visible": true
282 }
@@ -0,0 +1,14
1 # -*- coding: utf-8 *-*
2
3 # setting up LPPMON plugins
4 from __main__ import proxy
5 if not(proxy.instanceExists("RMAPPlugin0")):
6 proxy.loadSysDriver("RMAPPlugin", "RMAPPlugin0")
7 proxy.loadSysDriverToParent("dsu3plugin", "RMAPPlugin0")
8
9 dsu3plugin0.openFile("/opt/DEV_PLE/FSW-qt/bin/fsw")
10 dsu3plugin0.loadFile()
11 dsu3plugin0.run()
12
13 from __main__ import RMAPPlugin0
14
@@ -0,0 +1,21
1 #!/usr/bin/lppmon -e
2
3 address_to_read = 0x80000f08
4 val = RMAPPlugin0.Read( address_to_read, 1)
5 matrixF0_Address0 = val[0]
6 print hex(matrixF0_Address0)
7
8 # BUILD THE DATA
9 dataToWrite = []
10 dataToWrite.append( 0x1234abcd )
11 dataToWrite.append( 0x4321dcba )
12
13 for component in range(25):
14 for frequencyBin in range (64):
15 dataToWrite.append( component + frequencyBin )
16 for frequencyBin in range (64):
17 dataToWrite.append( - (component + frequencyBin) )
18
19 # WRITE THE DATA
20 print len(dataToWrite)
21 RMAPPlugin0.Write( matrixF0_Address0, dataToWrite )
@@ -0,0 +1,72
1 #!/usr/bin/lppmon -e
2
3 ####################
4 ## BUILD THE DATA ##
5 ####################
6
7 with open('/opt/DEV_PLE/FSW-qt/bin/spectralmatrix/asm_f0_test_20140403_case2.txt', 'r') as f:
8 listOfLines = []
9 for line in f.readlines():
10 listOfLines.append(line)
11
12 data = listOfLines[10] # line 10 contains the data
13 data = data.split() # get the data from the global string
14
15 dataInFloat = []
16 nbData = len(data)
17 print "nbData = " + str(nbData)
18 for i in range( nbData ):
19 dataInFloat.append( float( data[i] ) ) # convert each string into a float
20
21 # reorganize the data to have a matrix in the VHDL format
22 # INPUT (ICD format)
23 # matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24]
24 # OUTPUT (VHDL format)
25 # component_0[0 .. 127] component_1[0 .. 127] .. component_24[0 .. 127]
26
27 dataInFloatReorganized = []
28 dataInIntReorganized = []
29 nbComponentsByMatrix = 25
30 nbFrequencyBins = 128
31 for indexComponent in range(nbComponentsByMatrix):
32 for frequencyBin in range(nbFrequencyBins):
33 dataInFloatReorganized.append(
34 dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ]
35 )
36 dataInIntReorganized.append(
37 int( dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ] )
38 )
39
40 ####################
41 ## WRITE THE DATA ##
42 ####################
43
44 # F0 buffer address
45 address_to_read = 0x80000f08
46 val = RMAPPlugin0.Read( address_to_read, 1)
47 matrixF0_Address0 = val[0]
48
49 # F1 buffer address
50 address_to_read = 0x80000f10
51 val = RMAPPlugin0.Read( address_to_read, 1)
52 matrixF1_Address = val[0]
53
54 # F2 buffer address
55 address_to_read = 0x80000f14
56 val = RMAPPlugin0.Read( address_to_read, 1)
57 matrixF2_Address = val[0]
58
59 print str( len(dataInIntReorganized) ) + " data to write"
60 RMAPPlugin0.Write( matrixF0_Address0, dataInIntReorganized )
61 print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF0_Address0)
62 RMAPPlugin0.Write( matrixF1_Address, dataInIntReorganized )
63 print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF1_Address)
64 RMAPPlugin0.Write( matrixF2_Address, dataInIntReorganized )
65 print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF2_Address)
66
67
68
69
70
71
72
@@ -0,0 +1,22
1 #!/usr/bin/lppmon -e
2 import math
3
4 address_to_read = 0x80000f08
5 val = RMAPPlugin0.Read( address_to_read, 1)
6 matrixF0_Address0 = val[0]
7 print hex(matrixF0_Address0)
8
9 teta = []
10 for i in range(128):
11 teta.append( i * 2 * math.pi / 128 )
12 amplitude = 10000
13
14 # BUILD THE DATA
15 dataToWrite = []
16 for frequencyBin in range(128):
17 for component in range (25):
18 dataToWrite.append( amplitude * math.sin( teta[frequencyBin] * component ) )
19
20 # WRITE THE DATA
21 print len(dataToWrite)
22 RMAPPlugin0.Write( matrixF0_Address0, dataToWrite )
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
@@ -0,0 +1,34
1 with open('asm_f0_test_paul_1.txt', 'r') as f:
2 listOfLines = []
3 for line in f.readlines():
4 listOfLines.append(line)
5
6 data = listOfLines[10] # line 9 contains the data
7 data = data.split() # get the data from the global string
8
9 dataInFloat = []
10 nbData = len(data)
11 print "nbData = " + str(nbData)
12 for i in range( nbData ):
13 dataInFloat.append( float( data[i] ) ) # convert each string into a float
14
15 # reorganize the data to have a matrix in the VHDL format
16 # input format (ICD format)
17 # matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 127]
18 # output format (VHDL format)
19 # component_0[0 .. 127] component_1[0 .. 127] .. component_24[0 .. 127]
20
21 dataInFloatReorganized = []
22 dataInIntReorganized = []
23 nbComponentsByMatrix = 25
24 nbFrequencyBins = 128
25 for indexComponent in range(nbComponentsByMatrix):
26 for frequencyBin in range(nbFrequencyBins):
27 dataInFloatReorganized.append(
28 dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ]
29 )
30 dataInIntReorganized.append(
31 int( dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ] )
32 )
33
34 print dataInIntReorganized
@@ -0,0 +1,88
1 cmake_minimum_required (VERSION 2.6)
2 project (timegen)
3
4 include(sparc-rtems)
5
6 include_directories("./src"
7 "./header"
8 "./header/processing"
9 "./src/LFR_basic-parameters")
10
11 set(SOURCES src/tc_handler.c
12 src/fsw_misc.c
13 src/fsw_init.c
14 src/fsw_globals.c
15 src/fsw_spacewire.c
16 src/tc_acceptance.c
17 ../LFR_basic-parameters/basic_parameters.c
18 header/tc_handler.h
19 header/grlib_regs.h
20 header/fsw_params.h
21 header/fsw_misc.h
22 header/fsw_init.h
23 header/ccsds_types.h
24 header/fsw_spacewire.h
25 header/tc_acceptance.h
26 header/fsw_params_nb_bytes.h
27 header/fsw_params_processing.h
28 header/fsw_params_wf_handler.h
29 header/lfr_cpu_usage_report.h
30 ../LFR_basic-parameters/basic_parameters.h
31 ../LFR_basic-parameters/basic_parameters_params.h
32 header/TC_types.h
33 )
34
35
36 option(timegen_verbose "Enable verbose Timegen" ON)
37 option(timegen_boot_messages "Enable Timegen boot messages" ON)
38 option(timegen_debug_messages "Enable Timegen debug messages" ON)
39 option(timegen_cpu_usage_report "Enable Timegen cpu usage report" OFF)
40 option(timegen_stack_report "Enable Timegen stack report" OFF)
41 option(timegen_vhdl_dev "?" OFF)
42 option(timegen_lpp_dpu_destid "Set to debug at LPP" ON)
43 option(timegen_debug_watchdog "Enable debug watchdog" OFF)
44 option(timegen_debug_tch "?" OFF)
45
46 set(TIMEGEN_SW_VERSION_N1 "3" CACHE STRING "Choose N1 FSW Version." FORCE)
47 set(TIMEGEN_SW_VERSION_N2 "1" CACHE STRING "Choose N2 FSW Version." FORCE)
48 set(TIMEGEN_SW_VERSION_N3 "0" CACHE STRING "Choose N3 FSW Version." FORCE)
49 set(TIMEGEN_SW_VERSION_N4 "4" CACHE STRING "Choose N4 FSW Version." FORCE)
50
51
52 if (timegen_verbose)
53 add_definitions(-DPRINT_MESSAGES_ON_CONSOLE)
54 endif()
55 if (timegen_boot_messages)
56 add_definitions(-DBOOT_MESSAGES)
57 endif()
58 if (timegen_debug_messages)
59 add_definitions(-DDEBUG_MESSAGES)
60 endif()
61 if (timegen_cpu_usage_report)
62 add_definitions(-DPRINT_TASK_STATISTICS)
63 endif()
64 if (timegen_stack_report)
65 add_definitions(-DPRINT_STACK_REPORT)
66 endif()
67 if (timegen_vhdl_dev)
68 add_definitions(-DVHDL_DEV)
69 endif()
70 if (timegen_lpp_dpu_destid)
71 add_definitions(-DLPP_DPU_DESTID)
72 endif()
73 if (timegen_debug_watchdog)
74 add_definitions(-DDEBUG_WATCHDOG)
75 endif()
76 if (timegen_debug_tch)
77 add_definitions(-DDEBUG_TCH)
78 endif()
79
80 add_definitions(-DMSB_FIRST_TCH)
81
82 add_definitions(-DSWVERSION=-1-0)
83 add_definitions(-DSW_VERSION_N1=${TIMEGEN_SW_VERSION_N1})
84 add_definitions(-DSW_VERSION_N2=${TIMEGEN_SW_VERSION_N2})
85 add_definitions(-DSW_VERSION_N3=${TIMEGEN_SW_VERSION_N3})
86 add_definitions(-DSW_VERSION_N4=${TIMEGEN_SW_VERSION_N4})
87
88 add_executable(timegen ${SOURCES})
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,219
1 #ifndef TC_TYPES_H
2 #define TC_TYPES_H
3
4 #include <ccsds_types.h>
5
6 #define PROTOCOLE_IDENTIFIER 0x02
7
8 // PACKET ID
9 #define TC_LFR_PACKET_ID 0x1ccc // PID 76 CAT 12
10
11 #define PACKET_LENGTH_TC_LFR_RESET (12 - CCSDS_TC_TM_PACKET_OFFSET)
12 #define PACKET_LENGTH_TC_LFR_LOAD_COMMON_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
13 #define PACKET_LENGTH_TC_LFR_LOAD_NORMAL_PAR (22 - CCSDS_TC_TM_PACKET_OFFSET)
14 #define PACKET_LENGTH_TC_LFR_LOAD_BURST_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
15 #define PACKET_LENGTH_TC_LFR_LOAD_SBM1_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
16 #define PACKET_LENGTH_TC_LFR_LOAD_SBM2_PAR (14 - CCSDS_TC_TM_PACKET_OFFSET)
17 #define PACKET_LENGTH_TC_LFR_DUMP_PAR (12 - CCSDS_TC_TM_PACKET_OFFSET)
18 #define PACKET_LENGTH_TC_LFR_ENTER_MODE (20 - CCSDS_TC_TM_PACKET_OFFSET)
19 #define PACKET_LENGTH_TC_LFR_UPDATE_INFO (46 - CCSDS_TC_TM_PACKET_OFFSET)
20 #define PACKET_LENGTH_TC_LFR_ENABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET)
21 #define PACKET_LENGTH_TC_LFR_DISABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET)
22 #define PACKET_LENGTH_TC_LFR_UPDATE_TIME (18 - CCSDS_TC_TM_PACKET_OFFSET)
23
24 // TC TYPES
25 #define TC_TYPE_DEFAULT 181
26 #define TC_TYPE_LFR_UPDATE_TIME 9
27
28 // TC SUBTYPES
29 #define TC_SUBTYPE_RESET 1
30 #define TC_SUBTYPE_LOAD_COMMON_PAR 11
31 #define TC_SUBTYPE_LOAD_NORMAL_PAR 13
32 #define TC_SUBTYPE_LOAD_BURST_PAR 19
33 #define TC_SUBTYPE_LOAD_SBM1_PAR 25
34 #define TC_SUBTYPE_LOAD_SBM2_PAR 27
35 #define TC_SUBTYPE_DUMP_PAR 31
36 #define TC_SUBTYPE_ENTER_MODE 41
37 #define TC_SUBTYPE_UPDATE_INFO 51
38 #define TC_SUBTYPE_ENABLE_CALIBRATION 61
39 #define TC_SUBTYPE_DISABLE_CALIBRATION 63
40 #define TC_SUBTYPE_UPDATE_TIME 129
41
42 // OTHER CONSTANTS
43 #define TC_LFR_PACKET_SEQUENCE_CONTROL 0xc000 // PID 76 CAT 12
44 #define TC_LFR_DATA_FIELD_HEADER0 0x19
45 #define TC_LFR_LOAD_COMMON_PAR_SPARE 0x00
46
47 struct Packet_TC_LFR_RESET_str
48 { // the CCSDS header is added by LPPMON
49 unsigned char packetID[2];
50 unsigned char packetSequenceControl[2];
51 unsigned char packetLength[2];
52 // DATA FIELD HEADER
53 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
54 unsigned char serviceType;
55 unsigned char serviceSubType;
56 unsigned char sourceID;
57 unsigned char crc[2];
58 };
59 typedef struct Packet_TC_LFR_RESET_str Packet_TC_LFR_RESET_t;
60
61 struct Packet_TC_LFR_ENTER_MODE_str
62 { // the CCSDS header is added by LPPMON
63 unsigned char packetID[2];
64 unsigned char packetSequenceControl[2];
65 unsigned char packetLength[2];
66 // DATA FIELD HEADER
67 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
68 unsigned char serviceType;
69 unsigned char serviceSubType;
70 unsigned char sourceID;
71 unsigned char spare;
72 unsigned char mode;
73 unsigned char enterModeTime[6];
74 unsigned char crc[2];
75 };
76 typedef struct Packet_TC_LFR_ENTER_MODE_str Packet_TC_LFR_ENTER_MODE_t;
77
78 struct Packet_TC_LFR_UPDATE_INFO_str
79 { // the CCSDS header is added by LPPMON
80 unsigned char packetID[2];
81 unsigned char packetSequenceControl[2];
82 unsigned char packetLength[2];
83 // DATA FIELD HEADER
84 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
85 unsigned char serviceType;
86 unsigned char serviceSubType;
87 unsigned char sourceID;
88 unsigned char set1;
89 unsigned char set2;
90 unsigned char set3_bias_setting_set1[6];
91 unsigned char set3_bias_setting_set2[6];
92 unsigned char set3_bias_voltage[4];
93 unsigned char set4[8];
94 unsigned char set5;
95 unsigned char set6;
96 unsigned char set7[8];
97 unsigned char crc[2];
98 };
99 typedef struct Packet_TC_LFR_UPDATE_INFO_str Packet_TC_LFR_UPDATE_INFO_t;
100
101 struct Packet_TC_LFR_DUMP_PAR_str
102 { // the CCSDS header is added by LPPMON
103 unsigned char packetID[2];
104 unsigned char packetSequenceControl[2];
105 unsigned char packetLength[2];
106 // DATA FIELD HEADER
107 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
108 unsigned char serviceType;
109 unsigned