Boost logo

Boost Users :

Subject: [Boost-users] Statechart problem
From: Iwan Sanders (iwan.sanders_at_[hidden])
Date: 2009-03-25 06:59:52


LS,

I've implemented a state machine (synchronous) with a couple of states and
their events. Its purpose is to implement an USDT CAN stack. Because the
lower level driver (made that too) passes the incoming CAN messages through
a callback function I needed to derive one state in the state machine from:

a) the expected boost state base
b) my own interface which handles the callback for new messages (observer)

The state machine is performing well with one exception, hence this email.

The callback function is a member of a struct which is derived from a & b
and it is called by the CAN driver.

But then when I want to notify the state that the machine is currently in
with a post_event this event seems to be discarded even though it should
react on it (the machine state has transitions defined for this event and
the current state is that state). I also tried using the transit call but
that doesn't do anything either.

It is just this one member-function that is the problem and before rewriting
the state-machine to an asynchronous state machine I wanted to consult some
other users.

Regards,

Iwan Sanders



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