Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-08-16 16:47:39


on Sat Aug 16 2008, Michael Caisse <boost-AT-objectmodelingdesigns.com> wrote:

> While the term state machine can mean a lot of things, I'm not sure that
> the ad-hoc implementation would represent what we all have in mind. For
> example, according to your fsm.png diagram the only valid transition from
> the Attached state is to Powered. However, nothing stops me from simply
> calling the set_address method which will result in either a Default or
> Configured state.

He intentionally described that as undefined behavior.

> Even an ad-hoc state machine implementation should have some type of "tick"
> or "clock" type method that takes a token or message (with or without
> payload).

I can't picture what you have in mind here.

> So, while your ad-hoc machine will track a state if the methods are
> called in a valid order, I'm not sure I would refer to it as a state
> machine.

I would. It's certainly no less valid than the one presented in C++TMP.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk