2DBarcode.info

Orthogonal state machines in .NET Produce USS Code 128 in .NET Orthogonal state machines

5.7 Orthogonal state machines using visual .net toinsert barcode code 128 for asp.net web,windows application MSI Plessey In the hypot VS .NET barcode standards 128 hetical bottling plant that we have used as a source of examples, bottles move along a continuously moving conveyor belt. When a bottle needs to be held stationary, for filling or capping, it is grabbed by vacuum operated clamps mounted adjacent to the filling and capping machines.

Similar clamps, situated along the conveyor belt, are used to regulate the flow of bottles. We could capture this situation in a statechart, as in figure 5.13.

There are really two distinct state machines in operation here, one to do with filling, capping and packing, the other to do with clamping and unclamping. We can use another notational improvement provided by Harel statecharts, the idea of orthogonal machines, to capture this distinction. The revised statechart is shown in figure 5.

14. The dashed line separates the two machines. An instance of this statechart must, at all times, be in one state from the left-hand machine and one state from the right-hand machine.

Notice how the states in the preceding statechart are made up from all the combinations of states in these two machines; using orthogonal machines greatly reduces the number of states required in complex models. The most common use of orthogonal machines is at the outermost level, as here, but any state can contain two or more orthogonal machines2..

2We do not a llow the statechart to be treated as a state, and thus a source for transition arrows, when it contains two or more orthogonal machines because it would no longer be meaningful to start the arrow from any point on the edge of the statechart. We could require the arrow to start at some point on the edge within the area of the appropriate machine but we dislike notations that use the exact positioning of graphical elements to convey meaning..

Describing behaviour: adding more detail Bottle Empty & Stopped unclamp clamp Empty & Moving squirt(n) [content + n < capacity] squirt(n) [content + n >= capacity] unclamp clamp Full & Stopped cap pack Full & Moving Sealed & Moving pack Sealed & Stopped unclamp clamp Events: squi rt (b : Bottle, n : Number) / [content = content + n] cap (b : Bottle) pack (b : Bottle) clamp (b: Bottle) unclamp (b : Bottle) Creation: (c : Number) / [content = 0 capacity = c]. Figure 5.13 A more complex Bottle statechart Bottle Empty cap squirt Stopped squirt(n) [content + n < capacity] squirt(n) [content + n >= capacity] clamp unclamp Full Moving Sealed pack Events: squi rt (b : Bottle, n : Number) / [content = content + n] cap (b : Bottle) pack (b : Bottle) clamp (b: Bottle) unclamp (b : Bottle) Creation: (c : Number) / [content = 0 capacity = c]. Figure 5.14 Orthogonal machines 5.7 Orthogonal state machines We have put .net vs 2010 Code 128B transitions for the squirt and cap events on the Stopped state to try to show that these events occur only when the bottle is stationary. The same events appear on both machines.

We must determine how this affects our event sequence validity rule. The rule now becomes:. Every event in a valid event sequence which appears on the event list of a statechart and which satisfies the filter for an instance of the statechart must also satisfy the pre-conditions (if any) and must cause zero or one transition in each orthogonal machine, provided it causes at least one transition overall.3. Stopped state has Moving states will We can now s ee that, according to this rule, adding the self-transitions on the not had the desired effect. A cap event occurring in the Full and cause a transition in the left-hand machine but not in the right-hand machine. The rule says this is fine, so we must conclude that cap events can occur while the bottle is moving.

There are two possible ways of changing the statechart to make it mean what we want. The first is to guard the squirt and cap events with a condition that the object must be in the Stopped state. This is fine in most circumstances but tends to clutter the diagram.

The other possibility is to take advantage of the fact that the event sequence validity rule is really defined in terms of the event list (see below). If we wish, we can give each orthogonal machine at the outermost level its own event list; then the rules for event validity apply separately to each machine. Figure 5.

15 use both approaches; the cap event is guarded, the squirt event appears on both event lists. Since the squirt event is on both lists, it must cause a transition in both machines. Therefore squirt cannot occur in state Moving.

Finalisation is always an all-or-nothing event. An object that is finalised ceases to exist in the situation, so it doesn t matter that finalisation is shown in only one orthogonal machine..

5.7.1 Event Visual Studio .

NET ANSI/AIM Code 128 sequence validity rule The full event sequence validity rule can be stated as follows:. A statechart unit is a group of state machines governed by a separate event list. An event sequence is valid for a statechart if and only if every event instance in the sequence, considered in turn, is valid for the statechart..

Copyright © 2DBarcode.info . All rights reserved.