@@ -126,6 +126,78 @@ extern CFE_ConfigKeyValue_t CFE_MODULE_VERSION_TABLE[];
126
126
*/
127
127
extern CFE_StaticModuleLoadEntry_t CFE_PSP_MODULE_LIST[];
128
128
129
+ #ifdef CFE_EDS_ENABLED_BUILD
130
+
131
+ #include "cfe_mission_eds_parameters.h"
132
+ #include "cfe_mission_eds_interface_parameters.h"
133
+
134
+ #define CFE_SB_INTF_DB_PTR &CFE_SOFTWAREBUS_INTERFACE
135
+
136
+ #endif /* CFE_EDS_ENABLED_BUILD */
137
+
138
+ /*
139
+ * Determine the proper values for populating the EDS-related
140
+ * fields of the configuration structure. This depends on the
141
+ * selected linkage mode (static or dynamic).
142
+ */
143
+
144
+ /*
145
+ * Static (const) EDS object link mode:
146
+ * Only the const pointer gets assigned to the EDS object, and the
147
+ * non-const pointer gets set NULL. There are no "write" operations
148
+ * in this mode -- registration and de-registration is not necessary.
149
+ */
150
+ #ifdef CFE_EDS_LINK_MODE_GLOBAL
151
+
152
+ /* This mode is simple, just point directly at the object defined in the external DB */
153
+ #define CFE_CONST_EDS_DB_PTR &EDS_DATABASE
154
+
155
+ #endif /* CFE_EDS_LINK_MODE_GLOBAL */
156
+
157
+ /*
158
+ * Dynamic (non-const) runtime EDS database object
159
+ * This is filled in as additional EDS datasheet objects are registered
160
+ */
161
+ #ifdef CFE_EDS_LINK_MODE_LOCAL
162
+
163
+ static EdsLib_DataTypeDB_t CFE_DYNAMIC_EDS_TABLE[EDS_MAX_DATASHEETS] = {NULL};
164
+
165
+ static EdsLib_DatabaseObject_t CFE_DYNAMIC_EDSDB_OBJECT = {.AppTableSize = EDS_MAX_DATASHEETS,
166
+ .DataTypeDB_Table = CFE_DYNAMIC_EDS_TABLE};
167
+
168
+ /* The object registered in config points at the local (empty) object */
169
+ #define CFE_NONCONST_EDS_DB_PTR &CFE_DYNAMIC_EDSDB_OBJECT
170
+
171
+ #endif /* CFE_EDS_LINK_MODE_LOCAL */
172
+
173
+ /*
174
+ * For all of these DB objects, use NULL if not defined.
175
+ * This covers the case where EDS is not being used.
176
+ */
177
+ #ifndef CFE_NONCONST_EDS_DB_PTR
178
+ #define CFE_NONCONST_EDS_DB_PTR NULL
179
+ #endif
180
+
181
+ /*
182
+ * Note that the non-const object can be used as a const object,
183
+ * but not the other way around. This can also be NULL.
184
+ */
185
+ #ifndef CFE_CONST_EDS_DB_PTR
186
+ #define CFE_CONST_EDS_DB_PTR CFE_NONCONST_EDS_DB_PTR
187
+ #endif
188
+
189
+ /*
190
+ * The SB intf DB serves as the lookup table for identification
191
+ * of the software bus messages. This can also be NULL if
192
+ * EDS is not being used.
193
+ */
194
+ #ifndef CFE_SB_INTF_DB_PTR
195
+ #define CFE_SB_INTF_DB_PTR NULL
196
+ #endif
197
+
198
+ /* Disable clang-format for the rest of this file, to preserve columns in the struct defs */
199
+ /* clang-format off */
200
+
129
201
/**
130
202
* A structure that encapsulates all the CFE static configuration
131
203
*/
@@ -152,7 +224,9 @@ Target_CfeConfigData GLOBAL_CFE_CONFIGDATA = {
152
224
.UserReservedSize = CFE_PLATFORM_ES_USER_RESERVED_SIZE,
153
225
154
226
.RamDiskSectorSize = CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE,
155
- .RamDiskTotalSectors = CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS};
227
+ .RamDiskTotalSectors = CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS
228
+ };
229
+
156
230
157
231
/**
158
232
* Instantiation of global system-wide configuration struct
@@ -176,4 +250,8 @@ Target_ConfigData GLOBAL_CONFIGDATA = {
176
250
.ModuleVersionList = CFE_MODULE_VERSION_TABLE,
177
251
.CoreModuleList = CFE_CORE_MODULE_LIST,
178
252
.StaticAppList = CFE_STATIC_APP_LIST,
253
+ .EdsDb = CFE_CONST_EDS_DB_PTR,
254
+ .DynamicEdsDb = CFE_NONCONST_EDS_DB_PTR,
255
+ .SbIntfDb = CFE_SB_INTF_DB_PTR
179
256
};
257
+
0 commit comments