-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Phase 1 state machines] Add a protected function for getting the state #530
Comments
The state getter function should work the same way as it does for Phase 2 state machines. The current documentation is here: The current implementation is here: Lines 513 to 525 in d5af763
|
We should add the new function here: fpp/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentStateMachines.scala Lines 26 to 31 in d70098f
|
The unit tests to update are here: https://github.com/nasa/fpp/tree/main/compiler/tools/fpp-to-cpp/test/component/base
|
In Phase 1 state machines, the state machine instance variables are private in the auto-generated component base class. This is so that the implementation can't access the state machine instance directly; it has to go through the interface provided by the component base class. However, the implementation needs to be able to query the state of the state machine. So we need to add a protected function for getting the state to the component interface.
The text was updated successfully, but these errors were encountered: