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 are the UML state machine view events

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article is about what UML state machine view events are about. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

UML state machine view event

Events are noteworthy things that happen in time and space. It happens at a point in time and has no duration. If something happens that has an impact, it is an event in the state machine model. When we use the word event, we usually refer to the description symbol of an event, that is, the description of all independent events with the same form, just as the word class refers to all independent classes with the same structure. The specific occurrence of an event is called an instance of the event. Events may have parameters to identify each instance, just as a class uses properties to identify each object. For classes, signals are organized using generalization relationships so that different classes share a common structure. UML state machine view events can be divided into explicit or implicit events: signal events, call events, repair events, time events, and so on. Table 6 Mur1 shows several event types and their descriptions.

1. Signal event

First take a look at the signal events in the UML state machine view event. A signal is a named entity that acts as a communication medium between two objects, and the reception of a signal is an event of the signal receiving object. The sending object explicitly creates and initializes a signal instance and sends it to one or a group of objects. The most basic signal is asynchronous one-way communication, and the sender does its own work independently instead of waiting for the receiver to process the signal. In the two-way communication model, multiple signals are used, that is, there must be at least one signal in each direction. The sender and receiver can be the same object.

The signal can be declared as a class element in the class diagram and represented by the keyword "signal", and the parameters of the signal are declared as attributes. Like similar elements, there can be a generalization relationship between signals, which can be child signals of other signals, which inherit the parameters of the parent signal, and can trigger transformations that depend on the parent signal (as shown in figure 6 Mel 1).

two。 Call event

The invocation event in the UML state machine view event is the reception of the call by an object that implements the operation with a state transition rather than a fixed handler. For the caller, a normal call (a call implemented with a method) is not identified by the calling event. The receiver either implements the operation in a method or triggers a state transition to implement the operation. The parameters of the operation are the parameters of the event. Once the calling receiving object completes the processing of the calling event or fails without any state transition through the event-triggered transformation, the control returns to the calling object. However, unlike a normal call, the recipient of the calling event continues its own execution, in parallel with the caller.

3. Modify event

The modification event in the UML state machine view event is the fulfillment of the condition represented by a Boolean expression that relies on a specific property value. This is a declarative way to wait until a particular condition is met, but be sure to use it carefully, because it represents a time-persistent and possibly global computing process (a long-distance action, because the value being tested may be remote). This has both advantages and disadvantages, and its advantage is that it focuses the model on real dependencies-a function that occurs when a given condition is met-rather than on a mechanism for testing conditions. The disadvantage is that it blurs the causal relationship between the activities that modify the potential value of the system and the final effect. Testing modification events can be costly because, in principle, modification events are continuous. In fact, there are ways to avoid unnecessary calculations. Modification events should be used only when a form of communication with a clearer form of expression seems unnatural.

Please pay attention to the difference between guardianship conditions and modification events. The guardianship condition is assigned only once when the trigger event that causes the conversion is triggered and when the event receiver processes the event. If it is false, the conversion will not be fired and the condition will no longer be assigned. The modification event is assigned multiple times until the condition is true, and the transformation is also fired.

4. Time event

Time events in the UML state machine view events represent the passage of time. Time events can be specified either in absolute form (days) or in relative form (time experienced since the occurrence of a specified event). In the high-level model, time events can be thought of as events from the whole world; in the implementation model, they are caused by signals from specific objects that may be either applied or applied.

Thank you for reading! This is the end of this article on "what are the UML state machine view events?". 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, you can share it 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

Development

Wechat

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

12
Report