捕获 boost 状态图库中丢弃的事件
我正在查看 Boost StateChart lib 文档,但无法找到捕获异常事件的方法。
例如,如果我处于状态 A,它只处理 EventA,并且我调用
machine.proces_event(EventB())
该事件似乎会被默默地忽略。有没有办法让我捕捉到这些,以便我可以记录状态和信息?非法行为?
谢谢。
I am looking at Boost StateChart lib documentation, and I am not able to find out a way to catch abnormal events.
For example, if I am in state A, which handles only EventA, and I call
machine.proces_event(EventB())
The event seems to get silently ignored. Is there a way for me to catch those, so I can log the state & the illegal action?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从那以后我找到了这个问题的答案。我们只需要在状态机中实现consumed_event函数。
I have since found the answer to this. We just need to implement consumed_event function in our stateMachine.