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

What does EA mean by drawing UML state diagrams with neutron state machines?

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

Share

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

This article will explain in detail what the neutron state machine means when EA draws UML state diagrams. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

Digital vehicle signal lamp

After the system is decomposed, the next work is to model each module. Module: digital vehicle signal light DigitalVehicleLight.

Look at the picture first.

Sub-state machine

In order to be called as a module in the traffic signal system, the behavior of DigitalVehicleLight is defined by sub-state machine.

A sub-state machine is a state machine definition that can be reused multiple times. It also needs to bind the entry and exit migration to internal vertices, which is similar to the encapsulation combination state. In the case of encapsulation composition, the state and its contents are contained by the state machine that defines them, and the sub-state machine is more like a macro in a programming language than a behavior definition.

-- UML2.5 14.2.3.4.7 Submachine States and submachines

(sub-state machines and sub-state machines)

In this sub-state machine, four states are defined: red light, green light, green light countdown, yellow light, and the transition of each state is driven by the corresponding event.

In the green countdown state, there is an internal migration to accept the count notification event, and the actual action is to call the ShowCounter method of DigitalVehicleLight.

When you are in the red light state, you can accept the ShowDown event in order to migrate to ExitPoint.

There is an effect behavior in the migration from EntryPoint to Red. The action starts with the LightReady signal. The purpose is to synchronize the actions of the device and the signal engine, which will be described in subsequent articles.

Entry point / exit point

The semantics of EntryPoint and ExitPoint are defined in UML2.5 as follows.

Entry point-entry point pseudo state represents a state machine or an entry point that encapsulates a combined state of internal state / state machine. In each area of a state machine or combined state that contains an entry point, there can be at most one migration from the entry point to the vertices within the region.

Exit point-the exit point pseudo state represents the state machine or the exit point that encapsulates the combined state of the internal state / state machine. The exit point in the region of the state machine referenced by the combined state or quilt state machine means the exit of the combined state or sub-state machine state (accompanied by the execution of the associated exit behavior). If there are multiple transitions from an orthogonal region in the state machine to this pseudo state, it behaves like a rendezvous pseudo state.

-- UML2.5 14.2.3.7 Pseudostate and PseudostateKind (pseudo-state and pseudo-state types)

Supplementary explanation

All the signals involved in the sub-state machine exist as part of the state machine. That is, all will be instantiated along with the instantiation of the DigitalVehicleLight, thus achieving reuse.

This is the end of the article on "what is the meaning of neutron state machine in EA drawing UML state diagram". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

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