Discussion:
Ask help for boost::statechart in PG
star fan
2014-08-30 12:18:51 UTC
Permalink
I ask the question because I am not good at boost::statechart and I
can't get answer from other way.

To help me to good understand the PG statechart, I hope someone answer
below questions:
In Initial state,
1. why there is not react function for custom_reaction< NullEvt >
2. why there is not custom_reaction definition about
boost::statechart::result react(const MNotifyRec&);

Regards
Vincent
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Sage Weil
2014-08-30 16:14:52 UTC
Permalink
Post by star fan
I ask the question because I am not good at boost::statechart and I
can't get answer from other way.
To help me to good understand the PG statechart, I hope someone answer
In Initial state,
1. why there is not react function for custom_reaction< NullEvt >
2. why there is not custom_reaction definition about
boost::statechart::result react(const MNotifyRec&);
One thing to keep in mind is that the states form a hierarchy. If a state
doesn't explicitly handle/react to an event, the parent will. You'll
notice that Reset and Started both react to NullEvt, and the other states
are substates/children of those.

sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
star fan
2014-09-01 08:30:37 UTC
Permalink
Thanks.
Post by star fan
1. why there is not react function for custom_reaction< NullEvt >
NullEvt event is handled by react(const boost::statechart::event_base&)
Post by star fan
2. why there is not custom_reaction definition about boost::statechart::result react(const MNotifyRec&)
But I can't find any children of Initial which has definition about
MNotifyRec event. Is Primary a children of Initial?

Do I understand correct?
Post by star fan
Post by star fan
I ask the question because I am not good at boost::statechart and I
can't get answer from other way.
To help me to good understand the PG statechart, I hope someone answer
In Initial state,
1. why there is not react function for custom_reaction< NullEvt >
2. why there is not custom_reaction definition about
boost::statechart::result react(const MNotifyRec&);
One thing to keep in mind is that the states form a hierarchy. If a state
doesn't explicitly handle/react to an event, the parent will. You'll
notice that Reset and Started both react to NullEvt, and the other states
are substates/children of those.
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...