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

Callback for every Event #28

Open
dbedrenko opened this issue Nov 2, 2015 · 1 comment
Open

Callback for every Event #28

dbedrenko opened this issue Nov 2, 2015 · 1 comment

Comments

@dbedrenko
Copy link

Firstly, many thanks for this very useful and well-written module.

It would be good to have another callback, oneveryevent() (or onanyevent()), that is run when any event is triggered.

In my use case, my FSM has events like "receive_command_packet", "receive_ack_packet", "receive_error_packet", etc. Each time I receive a packet, an FSM event is triggered, and I need to store the last received packet in a data member.

The current ugly workaround is to define on_event_() callbacks for every event in my FSM.

@mriehl
Copy link
Owner

mriehl commented Nov 3, 2015

Sounds useful! I'll add this when I find some time. You could also file a pull request ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants