|
Boost Users : |
Subject: Re: [Boost-users] [statechart] state_machinesend_event assertion fails
From: Kelly, Dan (Dan.Kelly_at_[hidden])
Date: 2013-06-14 11:59:34
Your reaction with guard looks fine to me. I've never had a problem implementing it like this.
-- Dan
-----Original Message-----
From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Gooding, Dustin R. (JSC-ER411)
Sent: Friday, June 14, 2013 9:19
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [statechart] state_machinesend_event assertion fails
On Jun 14, 2013, at 6:35 AM, Andreas Huber <ahd6974-spamboostorgtrap_at_[hidden]> wrote:
> Your react function looks fine. Do you by any chance directly or
> indirectly call state_machine::process_event from inside the
> state-machine (e.g. in- state reaction, transition, entry action, exit action, etc.)?
Thanks for the quick response.
I only call process_event directly from outside the state machine. From inside, I do call transit() in a couple of reactions. That's how I understood guards were implemented. Maybe I missed something? Some of those transit() calls are to sibling states but most are to an uncle state (sibling to parent state). I never transit() to the same state. Here's an example:
boost::statechart::result Inactive::react(const i_ready_command&) {
if (state_downcast< const NotFaulted * >() != 0)
{
return transit<Active>();
}
return discard_event();
}
In few state's constructors, I call post_event().
-- dustin _______________________________________________ Boost-users mailing list Boost-users_at_[hidden] http://lists.boost.org/mailman/listinfo.cgi/boost-users ________________________________ IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net