Hierachical State transition with matlab OOP !!!!!!!!!!!!!!!!!

2 views (last 30 days)
Hello,
I want to implement a state machine in MATLAB OOP. But I'm andicaped, by the implementation of state transition. In my implementation, the root state define event which are handle in distincts states. (n) denote notification action and (l) listening. State which do not implement notify action for a event inherit callback for this event from root state class. to help you figure out what I mean, assume :
classdef stateRoot
events
event1
event2
event3
event4
event5
event6
end
end %end stateRoot
classdef state1 < stateRoot
events
events1(n)
event2(l)
end
end % end state1
classdef state2 < stateRoot
events
event3(n)
event4(l)
end
end % %end state2
classdef state3 < stateRoot
events
event4(l)
event5(l)
end
end % end stat3
classdef machine < state1&state2&state3
methods
%
%
end
end %end machine
The machine change state from state1 to state3 and then comback to state1. So now my question : How can I implement the transition from one state to another? Ist any way achieving this other than evently triggering? cause I've already got to many evnts in my code so it become slowly confusing.
Thanks for your help
Bolivar

Answers (0)

Categories

Find more on Class Introspection and Metadata in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!