Hierachical State transition with matlab OOP !!!!!!!!!!!!!!!!!
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Class Introspection and Metadata 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!