In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the EA drawing UML state diagram in the example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
The behavior state machine can be used to define the following scenarios (not limited to)
Category behavior of active classes
The owning behavior for the purpose of a behavioral class in addition to the category behavior.
If the state machine has a behavior category context, then this category defines which signals and invocation events can be applied to that state machine, and which features are available to the behavior owned by the state machine. The signal trigger condition and the invocation event trigger condition of the state machine are defined respectively according to the acceptance and operation of this category. These characteristics can be used to define the message event trigger conditions of the state machine.
-- UML2.5 14.2.3.1 StateMachine (state machine)
To use one that is not very strict, but to put it simply: state machines can be used to define the behavior of categories. At this point, the state machine can invoke the behavior of the context category, or the events defined in the context category can be used to define the trigger conditions of the state machine.
Example
We continue to use the example of a push-button signal system.
Define context categories
In this case, it is a class: TrafficLight.
The TrafficLight class is an active class and the behavior of the active class is the state machine.
The TrafficLight class has two methods, SetCurrentLight and SetShuttingDownFlag. They are called in the state machine.
Add a state machine to a category
Open the context menu of TrafficLight in [Project Browser] and select the [Add]-[State Machine] menu item.
You can get a state machine object and a state diagram.
Draw a state diagram
The next content is what we talked about earlier. The following is the status diagram of the button model system.
The following differences can be seen from the figure:
The outside of the state diagram is surrounded by a box, indicating that this is a state machine.
The entry / exit behavior of the state machine, and the effect behavior of migration invokes the methods of the TrafficLight class.
Setting and representation of entry / exit behavior
Open the enter / exit behavior dialog box
Select the [Behavior] property page
Enter the details of the behavior in the [Behavior] text box
If you want details to be displayed in the class diagram, select the [Show Behavior in Diagram] item in the blue circle.
Thank you for reading this article carefully. I hope the article "sample Analysis of State Machine in EA drawing UML State Diagram" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.