Boost logo

Boost Users :

Subject: Re: [Boost-users] [statechart] state_machinesend_event assertion fails
From: Gooding, Dustin R. (JSC-ER411) (dustin.r.gooding_at_[hidden])
Date: 2013-06-14 09:18:38


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 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