HasActionsIF + CommandMessage Typo #145
No reviewers
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#145
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "KSat/fsfw:mueller/feature/HasActionsIF"
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?
HasActionsIF interface change: size_t used instead of uint32_t
Also fixed CommandMessage Typo.
The initialize() function takes queue to use as nullptr default argument now because it can be set with a separate setter function as well.
What is the usecase for being able to set the queue to use after initialized is called? The helper is intended to be used tightly coupled to one object whose queue should not change after initialize.
DeviceHandlerBase initialize:
ActionHelper is a member class, so it has to be constructed in the initializer list.
The command queue will be created in the constructor, so a nullptr is passed to the action helper in the initializer list and the queue is assigned in the initialize function.
My question is why the queue parameter to initialize() is changed to be optional. I can not see a reason to allow not setting the queue in initialize().
AH, because it does not need to be set if it is set in the constructor.
But it will propably always be set in
initialize
all the time. I can make in non-optional again.Ok, now I see. I did not realize one could set it before initialize(). I am a bit torn, because it is reasonable to not force people to set it twice (have it optional in initialize()), but I also want to make it hard to forget setting it (have it non-optional in initialize()).
But I think we need to trust users at some point so I think you are right with having it optional.
I added documentation to warn users only to omit the queue in initialize() if they have set it in the constructor in commit
78442a8b92
.