##// END OF EJS Templates
Converted timegen to cmake.
jeandet -
r300:94c9c25ace49 R3_plus draft
parent child
Show More
@@ -0,0 +1,8
1 [default]
2 name=Défaut
3 device=local
4 runtime=host
5 config-opts=
6 prefix=/home/jeandet/.cache/gnome-builder/install/DEV_PLE/host
7 app-id=
8 default=true
@@ -0,0 +1,67
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
19
20 option(verbose "Enable verbose LFR" ON)
21 option(boot_messages "Enable LFR boot messages" ON)
22 option(debug_messages "Enable LFR debug messages" ON)
23 option(cpu_usage_report "Enable LFR cpu usage report" OFF)
24 option(stack_report "Enable LFR stack report" OFF)
25 option(vhdl_dev "?" OFF)
26 option(lpp_dpu_destid "Set to debug at LPP" ON)
27 option(debug_watchdog "Enable debug watchdog" OFF)
28 option(debug_tch "?" OFF)
29
30
31 if (verbose)
32 add_definitions(-DPRINT_MESSAGES_ON_CONSOLE)
33 endif()
34 if (boot_messages)
35 add_definitions(-DBOOT_MESSAGES)
36 endif()
37 if (debug_messages)
38 add_definitions(-DDEBUG_MESSAGES)
39 endif()
40 if (cpu_usage_report)
41 add_definitions(-DPRINT_TASK_STATISTICS)
42 endif()
43 if (stack_report)
44 add_definitions(-DPRINT_STACK_REPORT)
45 endif()
46 if (vhdl_dev)
47 add_definitions(-DVHDL_DEV)
48 endif()
49 if (lpp_dpu_destid)
50 add_definitions(-DLPP_DPU_DESTID)
51 endif()
52 if (debug_watchdog)
53 add_definitions(-DDEBUG_WATCHDOG)
54 endif()
55 if (debug_tch)
56 add_definitions(-DDEBUG_TCH)
57 endif()
58
59 add_definitions(-DMSB_FIRST_TCH)
60
61 add_definitions(-DSWVERSION=-1-0)
62 add_definitions(-DSW_VERSION_N1=3)
63 add_definitions(-DSW_VERSION_N2=1)
64 add_definitions(-DSW_VERSION_N3=0)
65 add_definitions(-DSW_VERSION_N4=4)
66
67 add_executable(timegen ${SOURCES})
1 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 char serviceSubType;
110 unsigned char sourceID;
111 unsigned char crc[2];
112
113 };
114 typedef struct Packet_TC_LFR_DUMP_PAR_str Packet_TC_LFR_DUMP_PAR_t;
115
116 struct Packet_TC_LFR_LOAD_COMMON_PAR_str
117 { // the CCSDS header is added by LPPMON
118 unsigned char packetID[2];
119 unsigned char packetSequenceControl[2];
120 unsigned char packetLength[2];
121 // DATA FIELD HEADER
122 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
123 unsigned char serviceType;
124 unsigned char serviceSubType;
125 unsigned char sourceID;
126 unsigned char spare;
127 unsigned char bw_sp0_sp1_r0_r1;
128 unsigned char crc[2];
129
130 };
131 typedef struct Packet_TC_LFR_LOAD_COMMON_PAR_str Packet_TC_LFR_LOAD_COMMON_PAR_t;
132
133 struct Packet_TC_LFR_LOAD_NORMAL_PAR_str
134 { // the CCSDS header is added by LPPMON
135 unsigned char packetID[2];
136 unsigned char packetSequenceControl[2];
137 unsigned char packetLength[2];
138 // DATA FIELD HEADER
139 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
140 unsigned char serviceType;
141 unsigned char serviceSubType;
142 unsigned char sourceID;
143 unsigned char sy_lfr_n_swf_l[2];
144 unsigned char sy_lfr_n_swf_p[2];
145 unsigned char sy_lfr_n_asm_p[2];
146 unsigned char sy_lfr_n_bp_p0;
147 unsigned char sy_lfr_n_bp_p1;
148 unsigned char sy_lfr_n_cwf_long_f3;
149 unsigned char lfr_normal_parameters_spare;
150 unsigned char crc[2];
151 };
152 typedef struct Packet_TC_LFR_LOAD_NORMAL_PAR_str Packet_TC_LFR_LOAD_NORMAL_PAR_t;
153
154 struct Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_str
155 { // the CCSDS header is added by LPPMON
156 unsigned char packetID[2];
157 unsigned char packetSequenceControl[2];
158 unsigned char packetLength[2];
159 // DATA FIELD HEADER
160 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
161 unsigned char serviceType;
162 unsigned char serviceSubType;
163 unsigned char sourceID;
164 unsigned char sy_lfr_bp_p0;
165 unsigned char sy_lfr_bp_p1;
166 unsigned char crc[2];
167 };
168 typedef struct Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_str Packet_TC_LFR_LOAD_BURST_SBM1_SBM2_PAR_t;
169
170 struct Packet_TC_LFR_ENABLE_DISABLE_CALIBRATION_str
171 { // the CCSDS header is added by LPPMON
172 unsigned char packetID[2];
173 unsigned char packetSequenceControl[2];
174 unsigned char packetLength[2];
175 // DATA FIELD HEADER
176 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
177 unsigned char serviceType;
178 unsigned char serviceSubType;
179 unsigned char sourceID;
180 unsigned char crc[2];
181 };
182 typedef struct Packet_TC_LFR_ENABLE_DISABLE_CALIBRATION_str Packet_TC_LFR_ENABLE_DISABLE_CALIBRATION_t;
183
184 struct Packet_TC_LFR_UPDATE_TIME_str
185 { // the CCSDS header is added by LPPMON
186 unsigned char packetID[2];
187 unsigned char packetSequenceControl[2];
188 unsigned char packetLength[2];
189 // DATA FIELD HEADER
190 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
191 unsigned char serviceType;
192 unsigned char serviceSubType;
193 unsigned char sourceID;
194 unsigned char cp_rpw_time[6];
195 unsigned char crc[2];
196 };
197 typedef struct Packet_TC_LFR_UPDATE_TIME_str Packet_TC_LFR_UPDATE_TIME_t;
198
199 struct Packet_TC_LFR_UPDATE_TIME_WITH_HEADER_str
200 {
201 unsigned char targetLogicalAddress;
202 unsigned char protocolIdentifier;
203 unsigned char reserved;
204 unsigned char userApplication;
205 //
206 unsigned char packetID[2];
207 unsigned char packetSequenceControl[2];
208 unsigned char packetLength[2];
209 // DATA FIELD HEADER
210 unsigned char ccsdsSecHeaderFlag_pusVersion_ack;
211 unsigned char serviceType;
212 unsigned char serviceSubType;
213 unsigned char sourceID;
214 unsigned char cp_rpw_time[6];
215 unsigned char crc[2];
216 };
217 typedef struct Packet_TC_LFR_UPDATE_TIME_WITH_HEADER_str Packet_TC_LFR_UPDATE_TIME_WITH_HEADER_t;
218
219 #endif // TC_TYPES_H
This diff has been collapsed as it changes many lines, (665 lines changed) Show them Hide them
@@ -0,0 +1,665
1 #ifndef CCSDS_TYPES_H_INCLUDED
2 #define CCSDS_TYPES_H_INCLUDED
3
4 #include "fsw_params_processing.h"
5
6 #define CCSDS_PROTOCOLE_EXTRA_BYTES 4
7 #define CCSDS_TC_TM_PACKET_OFFSET 7
8 #define CCSDS_TELEMETRY_HEADER_LENGTH 16+4
9 #define CCSDS_TM_PKT_MAX_SIZE 4412
10 #define CCSDS_TELECOMMAND_HEADER_LENGTH 10+4
11 #define CCSDS_TC_PKT_MAX_SIZE 256
12 #define CCSDS_TC_PKT_MIN_SIZE 16
13 #define CCSDS_PROCESS_ID 76
14 #define CCSDS_PACKET_CATEGORY 12
15 #define CCSDS_NODE_ADDRESS 0xfe
16 #define CCSDS_USER_APP 0x00
17
18 #define DEFAULT_SPARE1_PUSVERSION_SPARE2 0x10
19 #define DEFAULT_RESERVED 0x00
20 #define DEFAULT_HKBIA 0x1e // 0001 1110
21
22 // PACKET ID
23 #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1
24 #define APID_TM_HK 0x0cc4 // PID 76 CAT 4
25 #define APID_TM_PARAMETER_DUMP 0x0cc9 // PID 76 CAT 9
26 #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12
27 #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12
28 #define TM_PACKET_PID_DEFAULT 76
29 #define TM_PACKET_PID_BURST_SBM1_SBM2 79
30 #define TM_PACKET_CAT_TC_EXE 1
31 #define TM_PACKET_CAT_HK 4
32 #define TM_PACKET_CAT_PARAMETER_DUMP 9
33 #define TM_PACKET_CAT_SCIENCE 12
34 #define TC_PACKET_CAT 12
35
36 // PACKET SEQUENCE CONTROL
37 #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000]
38 #define TM_PACKET_SEQ_CTRL_FIRST 0x40 // [0100 0000]
39 #define TM_PACKET_SEQ_CTRL_LAST 0x80 // [1000 0000]
40 #define TM_PACKET_SEQ_CTRL_STANDALONE 0xc0 // [1100 0000]
41 #define TM_PACKET_SEQ_CNT_DEFAULT 0x00 // [0000 0000]
42
43 // DESTINATION ID
44 #define TM_DESTINATION_ID_GROUND 0
45 #define TM_DESTINATION_ID_MISSION_TIMELINE 110
46 #define TM_DESTINATION_ID_TC_SEQUENCES 111
47 #define TM_DESTINATION_ID_RECOVERY_ACTION_COMMAND 112
48 #define TM_DESTINATION_ID_BACKUP_MISSION_TIMELINE 113
49 #define TM_DESTINATION_ID_DIRECT_CMD 120
50 #define TM_DESTINATION_ID_SPARE_GRD_SRC1 121
51 #define TM_DESTINATION_ID_SPARE_GRD_SRC2 122
52 #define TM_DESTINATION_ID_OBCP 15
53 #define TM_DESTINATION_ID_SYSTEM_CONTROL 14
54 #define TM_DESTINATION_ID_AOCS 11
55
56 #define CCSDS_DESTINATION_ID 0x01
57 #define CCSDS_PROTOCOLE_ID 0x02
58 #define CCSDS_RESERVED 0x00
59 #define CCSDS_USER_APP 0x00
60
61 #define SIZE_TM_LFR_TC_EXE_NOT_IMPLEMENTED 24
62 #define SIZE_TM_LFR_TC_EXE_CORRUPTED 32
63 #define SIZE_HK_PARAMETERS 112
64
65 // TC TYPES
66 #define TC_TYPE_GEN 181
67 #define TC_TYPE_TIME 9
68
69 // TC SUBTYPES
70 #define TC_SUBTYPE_RESET 1
71 #define TC_SUBTYPE_LOAD_COMM 11
72 #define TC_SUBTYPE_LOAD_NORM 13
73 #define TC_SUBTYPE_LOAD_BURST 19
74 #define TC_SUBTYPE_LOAD_SBM1 25
75 #define TC_SUBTYPE_LOAD_SBM2 27
76 #define TC_SUBTYPE_DUMP 31
77 #define TC_SUBTYPE_ENTER 41
78 #define TC_SUBTYPE_UPDT_INFO 51
79 #define TC_SUBTYPE_EN_CAL 61
80 #define TC_SUBTYPE_DIS_CAL 63
81 #define TC_SUBTYPE_UPDT_TIME 129
82
83 // TC LEN
84 #define TC_LEN_RESET 12
85 #define TC_LEN_LOAD_COMM 14
86 #define TC_LEN_LOAD_NORM 22
87 #define TC_LEN_LOAD_BURST 14
88 #define TC_LEN_LOAD_SBM1 14
89 #define TC_LEN_LOAD_SBM2 14
90 #define TC_LEN_DUMP 12
91 #define TC_LEN_ENTER 20
92 #define TC_LEN_UPDT_INFO 46
93 #define TC_LEN_EN_CAL 12
94 #define TC_LEN_DIS_CAL 12
95 #define TC_LEN_UPDT_TIME 18
96
97 // TM TYPES
98 #define TM_TYPE_TC_EXE 1
99 #define TM_TYPE_HK 3
100 #define TM_TYPE_PARAMETER_DUMP 3
101 #define TM_TYPE_LFR_SCIENCE 21
102
103 // TM SUBTYPES
104 #define TM_SUBTYPE_EXE_OK 7
105 #define TM_SUBTYPE_EXE_NOK 8
106 #define TM_SUBTYPE_HK 25
107 #define TM_SUBTYPE_PARAMETER_DUMP 25
108 #define TM_SUBTYPE_SCIENCE 3
109 #define TM_SUBTYPE_LFR_SCIENCE 3
110
111 // FAILURE CODES
112 #define ILLEGAL_APID 0
113 #define WRONG_LEN_PKT 1
114 #define INCOR_CHECKSUM 2
115 #define ILL_TYPE 3
116 #define ILL_SUBTYPE 4
117 #define WRONG_APP_DATA 5 // 0x00 0x05
118 #define TC_NOT_EXE 42000 // 0xa4 0x10
119 #define WRONG_SRC_ID 42001 // 0xa4 0x11
120 #define FUNCT_NOT_IMPL 42002 // 0xa4 0x12
121 #define FAIL_DETECTED 42003 // 0xa4 0x13
122 #define NOT_ALLOWED 42004 // 0xa4 0x14
123 #define CORRUPTED 42005 // 0xa4 0x15
124 #define CCSDS_TM_VALID 7
125
126 // TC SID
127 #define SID_TC_GROUND 0
128 #define SID_TC_MISSION_TIMELINE 110
129 #define SID_TC_TC_SEQUENCES 111
130 #define SID_TC_RECOVERY_ACTION_CMD 112
131 #define SID_TC_BACKUP_MISSION_TIMELINE 113
132 #define SID_TC_DIRECT_CMD 120
133 #define SID_TC_SPARE_GRD_SRC1 121
134 #define SID_TC_SPARE_GRD_SRC2 122
135 #define SID_TC_OBCP 15
136 #define SID_TC_SYSTEM_CONTROL 14
137 #define SID_TC_AOCS 11
138 #define SID_TC_RPW_INTERNAL 254
139
140 enum apid_destid{
141 GROUND,
142 MISSION_TIMELINE,
143 TC_SEQUENCES,
144 RECOVERY_ACTION_CMD,
145 BACKUP_MISSION_TIMELINE,
146 DIRECT_CMD,
147 SPARE_GRD_SRC1,
148 SPARE_GRD_SRC2,
149 OBCP,
150 SYSTEM_CONTROL,
151 AOCS,
152 RPW_INTERNAL
153 };
154 // SEQUENCE COUNTERS
155 #define SEQ_CNT_MAX 16383
156 #define SEQ_CNT_NB_DEST_ID 12
157
158 // TM SID
159 #define SID_HK 1
160 #define SID_PARAMETER_DUMP 10
161
162 #define SID_NORM_SWF_F0 3
163 #define SID_NORM_SWF_F1 4
164 #define SID_NORM_SWF_F2 5
165 #define SID_NORM_CWF_F3 1
166 #define SID_BURST_CWF_F2 2
167 #define SID_SBM1_CWF_F1 24
168 #define SID_SBM2_CWF_F2 25
169 #define SID_NORM_ASM_F0 11
170 #define SID_NORM_ASM_F1 12
171 #define SID_NORM_ASM_F2 13
172 #define SID_NORM_BP1_F0 14
173 #define SID_NORM_BP1_F1 15
174 #define SID_NORM_BP1_F2 16
175 #define SID_NORM_BP2_F0 19
176 #define SID_NORM_BP2_F1 20
177 #define SID_NORM_BP2_F2 21
178 #define SID_BURST_BP1_F0 17
179 #define SID_BURST_BP2_F0 22
180 #define SID_BURST_BP1_F1 18
181 #define SID_BURST_BP2_F1 23
182 #define SID_SBM1_BP1_F0 28
183 #define SID_SBM1_BP2_F0 31
184 #define SID_SBM2_BP1_F0 29
185 #define SID_SBM2_BP2_F0 32
186 #define SID_SBM2_BP1_F1 30
187 #define SID_SBM2_BP2_F1 33
188 #define SID_NORM_CWF_LONG_F3 34
189
190 // LENGTH (BYTES)
191 #define LENGTH_TM_LFR_TC_EXE_MAX 32
192 #define LENGTH_TM_LFR_HK 126
193
194 // HEADER_LENGTH
195 #define TM_HEADER_LEN 16
196 #define HEADER_LENGTH_TM_LFR_SCIENCE_ASM 28
197 // PACKET_LENGTH
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)
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)
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)
204 #define PACKET_LENGTH_HK (124 - 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
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
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
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
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
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
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
219
220 #define PACKET_LENGTH_DELTA 11 // 7 + 4
221
222 #define SPARE1_PUSVERSION_SPARE2 0x10
223
224 // R1
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
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
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
231 // R2
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
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
236 //
237 #define DEFAULT_PKTCNT 0x07
238 #define BLK_NR_304 0x0130
239 #define BLK_NR_224 0x00e0
240 #define BLK_NR_CWF 0x0150 // 336
241 #define BLK_NR_CWF_SHORT_F3 0x02a0 // 672
242
243 enum TM_TYPE{
244 TM_LFR_TC_EXE_OK,
245 TM_LFR_TC_EXE_ERR,
246 TM_LFR_HK,
247 TM_LFR_SCI,
248 TM_LFR_SCI_SBM,
249 TM_LFR_PAR_DUMP
250 };
251
252 typedef struct {
253 unsigned char targetLogicalAddress;
254 unsigned char protocolIdentifier;
255 unsigned char reserved;
256 unsigned char userApplication;
257 // PACKET HEADER
258 unsigned char packetID[2];
259 unsigned char packetSequenceControl[2];
260 unsigned char packetLength[2];
261 // DATA FIELD HEADER
262 unsigned char spare1_pusVersion_spare2;
263 unsigned char serviceType;
264 unsigned char serviceSubType;
265 unsigned char destinationID;
266 unsigned char time[6];
267 //
268 unsigned char telecommand_pkt_id[2];
269 unsigned char pkt_seq_control[2];
270 } Packet_TM_LFR_TC_EXE_SUCCESS_t;
271
272 typedef struct {
273 unsigned char targetLogicalAddress;
274 unsigned char protocolIdentifier;
275 unsigned char reserved;
276 unsigned char userApplication;
277 // PACKET HEADER
278 unsigned char packetID[2];
279 unsigned char packetSequenceControl[2];
280 unsigned char packetLength[2];
281 // DATA FIELD HEADER
282 unsigned char spare1_pusVersion_spare2;
283 unsigned char serviceType;
284 unsigned char serviceSubType;
285 unsigned char destinationID;
286 unsigned char time[6];
287 //
288 unsigned char tc_failure_code[2];
289 unsigned char telecommand_pkt_id[2];
290 unsigned char pkt_seq_control[2];
291 unsigned char tc_service;
292 unsigned char tc_subtype;
293 unsigned char byte_position;
294 unsigned char rcv_value;
295 } Packet_TM_LFR_TC_EXE_INCONSISTENT_t;
296
297 typedef struct {
298 unsigned char targetLogicalAddress;
299 unsigned char protocolIdentifier;
300 unsigned char reserved;
301 unsigned char userApplication;
302 // PACKET HEADER
303 unsigned char packetID[2];
304 unsigned char packetSequenceControl[2];
305 unsigned char packetLength[2];
306 // DATA FIELD HEADER
307 unsigned char spare1_pusVersion_spare2;
308 unsigned char serviceType;
309 unsigned char serviceSubType;
310 unsigned char destinationID;
311 unsigned char time[6];
312 //
313 unsigned char tc_failure_code[2];
314 unsigned char telecommand_pkt_id[2];
315 unsigned char pkt_seq_control[2];
316 unsigned char tc_service;
317 unsigned char tc_subtype;
318 unsigned char lfr_status_word[2];
319 } Packet_TM_LFR_TC_EXE_NOT_EXECUTABLE_t;
320
321 typedef struct {
322 unsigned char targetLogicalAddress;
323 unsigned char protocolIdentifier;
324 unsigned char reserved;
325 unsigned char userApplication;
326 // PACKET HEADER
327 unsigned char packetID[2];
328 unsigned char packetSequenceControl[2];
329 unsigned char packetLength[2];
330 // DATA FIELD HEADER
331 unsigned char spare1_pusVersion_spare2;
332 unsigned char serviceType;
333 unsigned char serviceSubType;
334 unsigned char destinationID;
335 unsigned char time[6];
336 //
337 unsigned char tc_failure_code[2];
338 unsigned char telecommand_pkt_id[2];
339 unsigned char pkt_seq_control[2];
340 unsigned char tc_service;
341 unsigned char tc_subtype;
342 } Packet_TM_LFR_TC_EXE_NOT_IMPLEMENTED_t;
343
344 typedef struct {
345 unsigned char targetLogicalAddress;
346 unsigned char protocolIdentifier;
347 unsigned char reserved;
348 unsigned char userApplication;
349 // PACKET HEADER
350 unsigned char packetID[2];
351 unsigned char packetSequenceControl[2];
352 unsigned char packetLength[2];
353 // DATA FIELD HEADER
354 unsigned char spare1_pusVersion_spare2;
355 unsigned char serviceType;
356 unsigned char serviceSubType;
357 unsigned char destinationID;
358 unsigned char time[6];
359 //
360 unsigned char tc_failure_code[2];
361 unsigned char telecommand_pkt_id[2];
362 unsigned char pkt_seq_control[2];
363 unsigned char tc_service;
364 unsigned char tc_subtype;
365 } Packet_TM_LFR_TC_EXE_ERROR_t;
366
367 typedef struct {
368 unsigned char targetLogicalAddress;
369 unsigned char protocolIdentifier;
370 unsigned char reserved;
371 unsigned char userApplication;
372 // PACKET HEADER
373 unsigned char packetID[2];
374 unsigned char packetSequenceControl[2];
375 unsigned char packetLength[2];
376 // DATA FIELD HEADER
377 unsigned char spare1_pusVersion_spare2;
378 unsigned char serviceType;
379 unsigned char serviceSubType;
380 unsigned char destinationID;
381 unsigned char time[6];
382 //
383 unsigned char tc_failure_code[2];
384 unsigned char telecommand_pkt_id[2];
385 unsigned char pkt_seq_control[2];
386 unsigned char tc_service;
387 unsigned char tc_subtype;
388 unsigned char pkt_len_rcv_value[2];
389 unsigned char pkt_datafieldsize_cnt[2];
390 unsigned char rcv_crc[2];
391 unsigned char computed_crc[2];
392 } Packet_TM_LFR_TC_EXE_CORRUPTED_t;
393
394 typedef struct {
395 unsigned char targetLogicalAddress;
396 unsigned char protocolIdentifier;
397 unsigned char reserved;
398 unsigned char userApplication;
399 unsigned char packetID[2];
400 unsigned char packetSequenceControl[2];
401 unsigned char packetLength[2];
402 // DATA FIELD HEADER
403 unsigned char spare1_pusVersion_spare2;
404 unsigned char serviceType;
405 unsigned char serviceSubType;
406 unsigned char destinationID;
407 unsigned char time[6];
408 // AUXILIARY HEADER
409 unsigned char sid;
410 unsigned char hkBIA;
411 unsigned char pktCnt;
412 unsigned char pktNr;
413 unsigned char acquisitionTime[6];
414 unsigned char blkNr[2];
415 } Header_TM_LFR_SCIENCE_SWF_t;
416
417 typedef struct {
418 unsigned char targetLogicalAddress;
419 unsigned char protocolIdentifier;
420 unsigned char reserved;
421 unsigned char userApplication;
422 unsigned char packetID[2];
423 unsigned char packetSequenceControl[2];
424 unsigned char packetLength[2];
425 // DATA FIELD HEADER
426 unsigned char spare1_pusVersion_spare2;
427 unsigned char serviceType;
428 unsigned char serviceSubType;
429 unsigned char destinationID;
430 unsigned char time[6];
431 // AUXILIARY DATA HEADER
432 unsigned char sid;
433 unsigned char hkBIA;
434 unsigned char acquisitionTime[6];
435 unsigned char blkNr[2];
436 } Header_TM_LFR_SCIENCE_CWF_t;
437
438 typedef struct {
439 unsigned char targetLogicalAddress;
440 unsigned char protocolIdentifier;
441 unsigned char reserved;
442 unsigned char userApplication;
443 unsigned char packetID[2];
444 unsigned char packetSequenceControl[2];
445 unsigned char packetLength[2];
446 // DATA FIELD HEADER
447 unsigned char spare1_pusVersion_spare2;
448 unsigned char serviceType;
449 unsigned char serviceSubType;
450 unsigned char destinationID;
451 unsigned char time[6];
452 // AUXILIARY HEADER
453 unsigned char sid;
454 unsigned char biaStatusInfo;
455 unsigned char pa_lfr_pkt_cnt_asm;
456 unsigned char pa_lfr_pkt_nr_asm;
457 unsigned char acquisitionTime[6];
458 unsigned char pa_lfr_asm_blk_nr[2];
459 } Header_TM_LFR_SCIENCE_ASM_t;
460
461 typedef struct {
462 unsigned char targetLogicalAddress;
463 unsigned char protocolIdentifier;
464 unsigned char reserved;
465 unsigned char userApplication;
466 unsigned char packetID[2];
467 unsigned char packetSequenceControl[2];
468 unsigned char packetLength[2];
469 // DATA FIELD HEADER
470 unsigned char spare1_pusVersion_spare2;
471 unsigned char serviceType;
472 unsigned char serviceSubType;
473 unsigned char destinationID;
474 unsigned char time[6];
475 // AUXILIARY HEADER
476 unsigned char sid;
477 unsigned char biaStatusInfo;
478 unsigned char acquisitionTime[6];
479 unsigned char source_data_spare;
480 unsigned char pa_lfr_bp_blk_nr[2];
481 } Header_TM_LFR_SCIENCE_BP_with_spare_t;
482
483 typedef struct {
484 unsigned char targetLogicalAddress;
485 unsigned char protocolIdentifier;
486 unsigned char reserved;
487 unsigned char userApplication;
488 unsigned char packetID[2];
489 unsigned char packetSequenceControl[2];
490 unsigned char packetLength[2];
491 // DATA FIELD HEADER
492 unsigned char spare1_pusVersion_spare2;
493 unsigned char serviceType;
494 unsigned char serviceSubType;
495 unsigned char destinationID;
496 unsigned char time[6];
497 // AUXILIARY HEADER
498 unsigned char sid;
499 unsigned char biaStatusInfo;
500 unsigned char acquisitionTime[6];
501 unsigned char pa_lfr_bp_blk_nr[2];
502 } Header_TM_LFR_SCIENCE_BP_t;
503
504 typedef struct {
505 //targetLogicalAddress is removed by the grspw module
506 unsigned char protocolIdentifier;
507 unsigned char reserved;
508 unsigned char userApplication;
509 unsigned char packetID[2];
510 unsigned char packetSequenceControl[2];
511 unsigned char packetLength[2];
512 // DATA FIELD HEADER
513 unsigned char headerFlag_pusVersion_Ack;
514 unsigned char serviceType;
515 unsigned char serviceSubType;
516 unsigned char sourceID;
517 unsigned char dataAndCRC[CCSDS_TC_PKT_MAX_SIZE-10];
518 } ccsdsTelecommandPacket_t;
519
520 typedef struct {
521 unsigned char targetLogicalAddress;
522 unsigned char protocolIdentifier;
523 unsigned char reserved;
524 unsigned char userApplication;
525 unsigned char packetID[2];
526 unsigned char packetSequenceControl[2];
527 unsigned char packetLength[2];
528 unsigned char spare1_pusVersion_spare2;
529 unsigned char serviceType;
530 unsigned char serviceSubType;
531 unsigned char destinationID;
532 unsigned char time[6];
533 unsigned char sid;
534
535 //**************
536 // HK PARAMETERS
537 unsigned char lfr_status_word[2];
538 unsigned char lfr_sw_version[4];
539 unsigned char lfr_fpga_version[3];
540 // ressource statistics
541 unsigned char hk_lfr_cpu_load;
542 unsigned char hk_lfr_cpu_load_max;
543 unsigned char hk_lfr_cpu_load_aver;
544 // tc statistics
545 unsigned char hk_lfr_update_info_tc_cnt[2];
546 unsigned char hk_lfr_update_time_tc_cnt[2];
547 unsigned char hk_lfr_exe_tc_cnt[2];
548 unsigned char hk_lfr_rej_tc_cnt[2];
549 unsigned char hk_lfr_last_exe_tc_id[2];
550 unsigned char hk_lfr_last_exe_tc_type[2];
551 unsigned char hk_lfr_last_exe_tc_subtype[2];
552 unsigned char hk_lfr_last_exe_tc_time[6];
553 unsigned char hk_lfr_last_rej_tc_id[2];
554 unsigned char hk_lfr_last_rej_tc_type[2];
555 unsigned char hk_lfr_last_rej_tc_subtype[2];
556 unsigned char hk_lfr_last_rej_tc_time[6];
557 // anomaly statistics
558 unsigned char hk_lfr_le_cnt[2];
559 unsigned char hk_lfr_me_cnt[2];
560 unsigned char hk_lfr_he_cnt[2];
561 unsigned char hk_lfr_last_er_rid[2];
562 unsigned char hk_lfr_last_er_code;
563 unsigned char hk_lfr_last_er_time[6];
564 // vhdl_blk_status
565 unsigned char hk_lfr_vhdl_aa_sm;
566 unsigned char hk_lfr_vhdl_fft_sr;
567 unsigned char hk_lfr_vhdl_cic_hk;
568 unsigned char hk_lfr_vhdl_iir_cal;
569 // spacewire_if_statistics
570 unsigned char hk_lfr_dpu_spw_pkt_rcv_cnt[2];
571 unsigned char hk_lfr_dpu_spw_pkt_sent_cnt[2];
572 unsigned char hk_lfr_dpu_spw_tick_out_cnt;
573 unsigned char hk_lfr_dpu_spw_last_timc;
574 // ahb error statistics
575 unsigned char hk_lfr_last_fail_addr[4];
576 // temperatures
577 unsigned char hk_lfr_temp_scm[2];
578 unsigned char hk_lfr_temp_pcb[2];
579 unsigned char hk_lfr_temp_fpga[2];
580 // spacecraft potential
581 unsigned char hk_lfr_sc_v_f3[2];
582 unsigned char hk_lfr_sc_e1_f3[2];
583 unsigned char hk_lfr_sc_e2_f3[2];
584 // error counters
585 unsigned char hk_lfr_dpu_spw_parity;
586 unsigned char hk_lfr_dpu_spw_disconnect;
587 unsigned char hk_lfr_dpu_spw_escape;
588 unsigned char hk_lfr_dpu_spw_credit;
589 unsigned char hk_lfr_dpu_spw_write_sync;
590 unsigned char hk_lfr_dpu_spw_rx_ahb;
591 unsigned char hk_lfr_dpu_spw_tx_ahb;
592 unsigned char hk_lfr_dpu_spw_early_eop;
593 unsigned char hk_lfr_dpu_spw_invalid_addr;
594 unsigned char hk_lfr_dpu_spw_eep;
595 unsigned char hk_lfr_dpu_spw_rx_too_big;
596 // timecode
597 unsigned char hk_lfr_timecode_erroneous;
598 unsigned char hk_lfr_timecode_missing;
599 unsigned char hk_lfr_timecode_invalid;
600 // time
601 unsigned char hk_lfr_time_timecode_it;
602 unsigned char hk_lfr_time_not_synchro;
603 unsigned char hk_lfr_time_timecode_ctr;
604 // hk_lfr_buffer_dpu_
605 unsigned char hk_lfr_buffer_dpu_tc_fifo;
606 unsigned char hk_lfr_buffer_dpu_tm_fifo;
607 // hk_lfr_ahb_
608 unsigned char hk_lfr_ahb_correctable;
609 unsigned char hk_lfr_ahb_uncorrectable;
610 // spare
611 unsigned char parameters_spare;
612 } Packet_TM_LFR_HK_t;
613
614 typedef struct {
615 unsigned char targetLogicalAddress;
616 unsigned char protocolIdentifier;
617 unsigned char reserved;
618 unsigned char userApplication;
619 unsigned char packetID[2];
620 unsigned char packetSequenceControl[2];
621 unsigned char packetLength[2];
622 // DATA FIELD HEADER
623 unsigned char spare1_pusVersion_spare2;
624 unsigned char serviceType;
625 unsigned char serviceSubType;
626 unsigned char destinationID;
627 unsigned char time[6];
628 unsigned char sid;
629
630 //******************
631 // COMMON PARAMETERS
632 unsigned char unused0;
633 unsigned char bw_sp0_sp1_r0_r1;
634
635 //******************
636 // NORMAL PARAMETERS
637 unsigned char sy_lfr_n_swf_l[2];
638 unsigned char sy_lfr_n_swf_p[2];
639 unsigned char sy_lfr_n_asm_p[2];
640 unsigned char sy_lfr_n_bp_p0;
641 unsigned char sy_lfr_n_bp_p1;
642 unsigned char sy_lfr_n_cwf_long_f3;
643 unsigned char lfr_normal_parameters_spare;
644
645 //*****************
646 // BURST PARAMETERS
647 unsigned char sy_lfr_b_bp_p0;
648 unsigned char sy_lfr_b_bp_p1;
649
650 //****************
651 // SBM1 PARAMETERS
652 unsigned char sy_lfr_s1_bp_p0;
653 unsigned char sy_lfr_s1_bp_p1;
654
655 //****************
656 // SBM2 PARAMETERS
657 unsigned char sy_lfr_s2_bp_p0;
658 unsigned char sy_lfr_s2_bp_p1;
659
660 // SPARE
661 unsigned char source_data_spare;
662 } Packet_TM_LFR_PARAMETER_DUMP_t;
663
664
665 #endif // CCSDS_TYPES_H_INCLUDED
@@ -0,0 +1,39
1 #ifndef FSW_INIT_H_INCLUDED
2 #define FSW_INIT_H_INCLUDED
3
4 #include <rtems.h>
5 #include <leon.h>
6
7 #include "fsw_params.h"
8 #include "fsw_misc.h"
9
10 #include "tc_handler.h"
11 #include "fsw_spacewire.h"
12
13 extern rtems_name Task_name[20]; /* array of task names */
14 extern rtems_id Task_id[20]; /* array of task ids */
15
16 // RTEMS TASKS
17 rtems_task Init( rtems_task_argument argument);
18
19 // OTHER functions
20 void create_names( void );
21 int create_all_tasks( void );
22 int start_all_tasks( void );
23 //
24 rtems_status_code create_message_queues( void );
25 rtems_status_code get_message_queue_id_send( rtems_id *queue_id );
26 rtems_status_code get_message_queue_id_recv( rtems_id *queue_id );
27 //
28 int start_recv_send_tasks( void );
29 //
30 void init_local_mode_parameters( void );
31 void reset_local_time( void );
32
33 extern void rtems_cpu_usage_report( void );
34 extern void rtems_cpu_usage_reset( void );
35 extern void rtems_stack_checker_report_usage( void );
36
37 extern int sched_yield( void );
38
39 #endif // FSW_INIT_H_INCLUDED
@@ -0,0 +1,45
1 #ifndef FSW_MISC_H_INCLUDED
2 #define FSW_MISC_H_INCLUDED
3
4 #include <rtems.h>
5 #include <stdio.h>
6 #include <grspw.h>
7
8 #include "fsw_params.h"
9 #include "fsw_spacewire.h"
10 #include "lfr_cpu_usage_report.h"
11
12 rtems_name name_hk_rate_monotonic; // name of the HK rate monotonic
13 rtems_id HK_id; // id of the HK rate monotonic period
14
15 void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider,
16 unsigned char interrupt_level, rtems_isr (*timer_isr)() );
17 void timer_start( gptimer_regs_t *gptimer_regs, unsigned char timer );
18 void timer_stop( gptimer_regs_t *gptimer_regs, unsigned char timer );
19 void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider);
20
21 // SERIAL LINK
22 int send_console_outputs_on_apbuart_port( void );
23 int enable_apbuart_transmitter( void );
24 void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value);
25
26 // RTEMS TASKS
27 rtems_task stat_task( rtems_task_argument argument );
28 rtems_task hous_task( rtems_task_argument argument );
29 rtems_task dumb_task( rtems_task_argument unused );
30
31 void init_housekeeping_parameters( void );
32 void increment_seq_counter(unsigned short *packetSequenceControl);
33 void getTime( unsigned char *time);
34 unsigned long long int getTimeAsUnsignedLongLongInt( );
35 void send_dumb_hk( void );
36 void get_v_e1_e2_f3 (unsigned char *spacecraft_potential);
37 void get_cpu_load( unsigned char *resource_statistics );
38
39 extern int sched_yield( void );
40 extern void rtems_cpu_usage_reset();
41 extern ring_node *current_ring_node_f3;
42 extern ring_node *ring_node_to_send_cwf_f3;
43 extern unsigned short sequenceCounterHK;
44
45 #endif // FSW_MISC_H_INCLUDED
@@ -0,0 +1,255
1 #ifndef FSW_PARAMS_H_INCLUDED
2 #define FSW_PARAMS_H_INCLUDED
3
4 #include "grlib_regs.h"
5 #include "fsw_params_processing.h"
6 #include "fsw_params_nb_bytes.h"
7 #include "tm_byte_positions.h"
8 #include "ccsds_types.h"
9
10 #define GRSPW_DEVICE_NAME "/dev/grspw0"
11 #define UART_DEVICE_NAME "/dev/console"
12
13 typedef struct ring_node
14 {
15 struct ring_node *previous;
16 int buffer_address;
17 struct ring_node *next;
18 unsigned int status;
19 } ring_node;