The processing of events is single threaded within all Hsms. The AsyncExecutionPolicy processes events in its own thread. The SingleThreadedExecutionPolicy class also provides a step method for clients to initiate event processing. By convention, these Policy classes also provide a sendEvent method as a public interface to the state machine. Clients will typically interact with a Policy class at the bottom of the inheritance hierarcy. any type with onEntry and onExit methods that can be overridden. ![]() Policy classes like AsyncExecutionPolicy and SingleThreadedExecutionPolicy are mixins that operate on StateTypes i.e. Note that we are dispatching states in Hsms so that an event can be "dispatched" to the appropriate state. Policy classes will invoke the dispatch method of an Hsm and call execute on the state that is returned by the dispatch mechanism. In one of the policy classes, execute is then invoked on that (innermost) Hsm. Hsm forwards the event to be processed to the innermost Hsm/State. This is different for Hsm and OrthogonalHsm. The dispatch method, when overridden makes decisions on which State gets to process an Event. Methods startSM and stopSM are self explanatory. ![]() ![]() The IHsm interface forces all Hsms to implement functionality that is common to all Hsms.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |