[statechart] state behaviour

Hi, two questions about states in statechart: 1. How (if possible) to implement this: a state upon an event generates an event and transits to another state? 2. Can a state have private nondestroyable memory? Regards liquid

Hi
Hi, two questions about states in statechart: 1. How (if possible) to implement this: a state upon an event generates an event and transits to another state?
With "generates an event", I guess you mean posts an event. Yes, you can do that in a custom reaction
2. Can a state have private nondestroyable memory?
No. As a workaround you can put the variables into an outer state or the state machine itself, but of course then they aren't private anymore. HTH, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.

1. How (if possible) to implement this: a state upon an event generates an event and transits to another state?
With "generates an event", I guess you mean posts an event. Yes, you can do that in a custom reaction So, if I post an event and then execute "template< class DestinationState > result transit();" in custom reaction this destination state will be given posted event. Am I right?
Regards Krzysztof
participants (2)
-
Andreas Huber
-
liquid