ObjectManagerIF: remove config include + nullptr check for get call #67
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#67
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The object manager IF includes the system object list from the configuration folder. It does not really need to include that folder from what I have seen. The problem is when there are multiple configuration folders.
For example, I use a separate linux build folder which includes its own config folder.
The build system usually includes the root path
so includes like <framework/...>
and <config/...> work.
If I want to use the linux configuration I have to take special care of using <linux/config/..>, but that's okay given I use multiple configurations. But now the object manager IF includes <config/...> (not the right header file) and I got weird errors and wondered for 20 minutes why the compiler complained about multiple inclusions.
I suggest removing the header file. I had to include <config/objects/systemObjectList.h> at 4-5 other spots in the mission code after I did that but other than that everything still works as before. This is not really an API change but removing that header might lead to code not compiling because new includes are required.
Also a nullptr check for the get function might be a good idea to check whether the global object manager actually was created.. otherwise the software just crashes.
UPDATE: I added back the include, but in the following form
#include "systemObjectList.h"
That means the file has to be included by the build system (config.mk file) but allows multiple systemObjectList.h files for different build configurations.
Object Manager: remove config includeto `ObjectManagerIF`: remove config include`ObjectManagerIF`: remove config includeto ObjectManagerIF: remove config includeObjectManagerIF: remove config includeto ObjectManagerIF: remove config include + nullptr check for get call