Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to redraw button state diagram in UML state diagram drawn by EA

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces EA drawing UML state diagram in how to achieve redrawing button state diagram, 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 state diagram of the button processing module has been described in the previous article, but when we modeled the signal system engine, we found that the original design could not meet the requirements, so we need to modify the completed model.

Such changes often occur in the process of software development, and what we need to do is not to suppress the changes, but to make them happen as early as possible. This is also a role of modeling.

In the previous example, it was hoped that the stop button and the pedestrian through the request button would be expressed in a sequence diagram, resulting in both cases being inappropriate. Another strategy is adopted in this paper:

Design the state diagram handled by the standard button, which can be applied to the stop button

Pedestrians extend the standard button module through the request button module.

Standard button module state machine

Work statu

The working state of the device, which contains both valid and invalid sub-states. If the Shutdown request is accepted in the Work state, the migration is finished. In terms of the semantics of the UML state machine, the above migration is valid regardless of which substate the state is in Working.

Disable statu

The device does not accept user button operations. After receiving the DeviceEnable event, migrate to the Enable state.

Enable statu

After accepting the DeviceDisable event, migrate to the Disable state; when you receive the button press event, migrate to the Disable state, but send the button press event at the same time.

If compared with the previous button device state diagram, you can see that this scheme is clearer and more focused.

Pedestrians pass the request button state machine

First of all, compared with the standard button module state diagram, we can see that the difference is that the Enable state is further refined, while the corresponding migration has also changed. Only the additions are described below.

LaterReportWait statu

If the user presses the button in this state, the button press event will not be sent immediately, but will be migrated to the CmdReady state. If a SetInstantReport notification is received, it is migrated to the InstantReportWait state.

InstantReportWait statu

When a button press event is received in this state, it transitions to the Disable state, but sends the button press event at the same time.

CmdReady statu

Entering this state means that the user presses the request button. When a HandlerReady event is received, it transitions to the Disable state, but sends the button-pressed event at the same time.

Thank you for reading this article carefully. I hope the article "how to redraw button state diagram in EA drawing UML state diagram" shared by the editor will be helpful to everyone. 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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report