Comments (4)
I had the same problem with sml::back::process
, I get around that by observing the state of the state machine from outside to decide what event to emit appropriately, and have sml::process
directly in the make_transition_table
call. In your case, to fix it, you can have a dummy transition to introduce the quit
type to the state machine, otherwise it doesn't know about the quit
type, hence the compilation error. https://godbolt.org/z/Pz1fsTrr8
from sml.
An even "cleaner" workaround https://godbolt.org/z/T35ed6Ka9
from sml.
Thanks a lot for this helpful trick to declare an otherwise unknown event.
from sml.
An even "cleaner" workaround https://godbolt.org/z/T35ed6Ka9
@uyha It looks like although there are no compile error for your work around, the "quit" event isn't propagated to the parent state. The only type of work around I know for now involves working from outside the state machine.
from sml.
Related Issues (20)
- How to achieve shallow history behavior? HOT 1
- dependency injection through process_event() to save sm memory footprint HOT 2
- [Question] Can you know upfront if an event can be processed?
- What's the actual point of this all? HOT 9
- sm.is("state"_s) suddenly doesn't compile anymore HOT 5
- How to store a "dispatch table" in a class? HOT 1
- sml::aux::get_type_name<TAction>() not returning name of lambda function HOT 2
- Compilation error when using logger, process_queue and member function action HOT 1
- how to know weather state is a sub-state machine or a normal state HOT 1
- How to make a state transition that changes to the next state upon completion of its action?
- Question: Debugging in STM32CubeIDE
- copy of class containing transition table is made when boost::sml::sm is instantiated HOT 1
- [Documentation] Who is using it HOT 2
- can not work with CLion HOT 1
- deferred event not processed when in any orthogonal region other than first
- gcc 10.5 warning: array subscript is outside array bounds HOT 4
- SML version change caused static assert fail in state machine constructor HOT 4
- Adding boost-ext-sml to conan-center-index HOT 2
- Anonymous event HOT 1
- Hello World error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sml.