mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-31 01:11:56 -05:00
Till now there was no clear way to register hanlder for message in Service, with this approach one can register function/lambda handler for Message which encurages handling messages in functions rather than in hudge switch cases. With aproach like this our Messages resembe something between Command and State pattern. In state pattern `Message` would be `Event` send, whereas Service would be `Context`.
1.3 KiB
1.3 KiB