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

feat: add state machine base #58

Merged
merged 13 commits into from
Oct 17, 2023
Merged

feat: add state machine base #58

merged 13 commits into from
Oct 17, 2023

Conversation

willyrgf
Copy link
Owner

@willyrgf willyrgf commented Oct 11, 2023

This is part of the v0.2 described here: #57


This PR delivers:

  • mfm_machine crate that will carry all state related implementation as an lib
  • State module
    • State: enum describing all states possible and connecting them with the concrete implementation of StateHandler + StateConfig traits
    • StateError: enum describing all errors possible for each state return; it also enables us to check the StateErrorRecoverability of each error, which will be used to recover from errors using the State depends_on and dependency_strategy
    • Context: to handle the states context, where each state will receive a &mut impl Context to read/write
    • StateMachine: the executor of n-states handling the context's and transitions between states
    • states: sub-module of States that implements all states, currently just with simple states used to prove the design
  • mfm_machine_macros: a crate that implements macros for the whole mfm_machine crate, currently implementing StateConfigReqs derive macro that implements all the required methods for StateConfig trait for states.

@willyrgf willyrgf self-assigned this Oct 11, 2023
@willyrgf willyrgf changed the base branch from main to v0.2 October 11, 2023 09:37
@willyrgf willyrgf changed the title Add state machine and scheduler base Add state machine base Oct 13, 2023
@willyrgf willyrgf force-pushed the feat/state-scheduler-base branch from c0dd392 to 4287567 Compare October 14, 2023 19:35
@willyrgf willyrgf merged commit fd9f756 into v0.2 Oct 17, 2023
@willyrgf willyrgf mentioned this pull request Oct 17, 2023
Merged
@willyrgf willyrgf changed the title Add state machine base feat: add state machine base Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant