All of lore.kernel.org
 help / color / mirror / Atom feed
* Ask help for boost::statechart in PG
@ 2014-08-30 12:18 star fan
  2014-08-30 16:14 ` Sage Weil
  0 siblings, 1 reply; 3+ messages in thread
From: star fan @ 2014-08-30 12:18 UTC (permalink / raw)
  To: Ceph-devel, Loic Dachary

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ask help for boost::statechart in PG
  2014-08-30 12:18 Ask help for boost::statechart in PG star fan
@ 2014-08-30 16:14 ` Sage Weil
  2014-09-01  8:30   ` star fan
  0 siblings, 1 reply; 3+ messages in thread
From: Sage Weil @ 2014-08-30 16:14 UTC (permalink / raw)
  To: star fan; +Cc: Ceph-devel, Loic Dachary

On Sat, 30 Aug 2014, star fan wrote:
> 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&);

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ask help for boost::statechart in PG
  2014-08-30 16:14 ` Sage Weil
@ 2014-09-01  8:30   ` star fan
  0 siblings, 0 replies; 3+ messages in thread
From: star fan @ 2014-09-01  8:30 UTC (permalink / raw)
  To: Sage Weil; +Cc: Ceph-devel

Thanks.

Follow your explanation,  I understand as below:
>1.  why there is not react function for custom_reaction< NullEvt >
 NullEvt event is handled by react(const boost::statechart::event_base&)
> 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?


2014-08-31 0:14 GMT+08:00 Sage Weil <sweil@redhat.com>:
> On Sat, 30 Aug 2014, star fan wrote:
>> 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&);
>
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-01  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-30 12:18 Ask help for boost::statechart in PG star fan
2014-08-30 16:14 ` Sage Weil
2014-09-01  8:30   ` star fan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.