Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technical Debt: Refactor Block/Scheduler initialisation API and implementation #289

Open
frankosterfeld opened this issue Feb 26, 2024 · 0 comments

Comments

@frankosterfeld
Copy link
Contributor

frankosterfeld commented Feb 26, 2024

Currently, Block has a init() function taking arguments, that is called by addBlock/emplaceBlock, and triggers the state machine going from IDLE to INITIALISED state.
At the same time, lifecycle::StateMachine is designed so that state changes are triggered via calls to changeStateTo(), which then calls callbacks such as start/stop/pause/reset and, conflicting with Block::init(), init().

It should be reviewed if Block::init() can be refactored in a way where it is not called by addBlock()/emplaceBlock(), but by the state machine, either by addBlock()/emplaceBlock() calling changeStateTo(INITIALISED), or by addBlock()/emplaceBlock() leaving the block in IDLE state, and the scheduler triggering init() instead. For both approaches, the arguments to init() need to be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Ideas (∞)
Development

No branches or pull requests

2 participants