statechart - time event...implementation ?
It seems the current implementation of statechart library does not have timed event. It is possible to extend or specialize the current event<> class to achieve this ? Has anyone done this yet ? Looks like a common requirement for this type of event. Any reason why it is not part of this library offering ? Is it expected that users of this library do it themselves ? Thanks in advance. - Raja
Hi Raja
It seems the current implementation of statechart library does not have timed event.
Correct.
It is possible to extend or specialize the current event<> class to achieve this ?
You'd probably also need a special type of state, see link below.
Has anyone done this yet ?
Chris seems to have implemented a platform-specific solution (see link below), I'm not aware of a general solution.
Looks like a common requirement for this type of event.
You mean that many people would need such an event? I agree.
Any reason why it is not part of this library offering ?
For a rationale, please see at the bottom of the following message: http://article.gmane.org/gmane.comp.lib.boost.user/29563
Is it expected that users of this library do it themselves ?
Yes, unfortunately. At least with the current version. Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
Thanks Andreas, I was thinking more on the lines of implementing: 1. time_event : sc::event<> And a scheduler that delays by doing a peak into Every event ( to see if it has delay set ). 2. delay_scheduler : sc::fifo_scheduler<... And use the rest of the library un-changed. Could you advise if this is a workable approach ? Thank You Raja -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Andreas Huber Sent: Tuesday, October 02, 2007 1:18 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] statechart - time event...implementation ? Hi Raja
It seems the current implementation of statechart library does not have timed event.
Correct.
It is possible to extend or specialize the current event<> class to achieve this ?
You'd probably also need a special type of state, see link below.
Has anyone done this yet ?
Chris seems to have implemented a platform-specific solution (see link below), I'm not aware of a general solution.
Looks like a common requirement for this type of event.
You mean that many people would need such an event? I agree.
Any reason why it is not part of this library offering ?
For a rationale, please see at the bottom of the following message: http://article.gmane.org/gmane.comp.lib.boost.user/29563
Is it expected that users of this library do it themselves ?
Yes, unfortunately. At least with the current version. Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I was thinking more on the lines of implementing: 1. time_event : sc::event<>
And a scheduler that delays by doing a peak into Every event ( to see if it has delay set ). 2. delay_scheduler : sc::fifo_scheduler<...
And use the rest of the library un-changed.
Could you advise if this is a workable approach ?
Given proper OS support, this seems workable. However, note that the behavior of a thus implemented time event would not be in line with the UML specs. Pre-2.0 UML pretty clearly states that a time event is only dispatched when the FSM has been residing in a state for the specified amount of time *and* a transition triggered by a time event originates at said state. HTH, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
participants (2)
-
Andreas Huber
-
Raja Cherukuri