All of the ASL script examples used in this chapter interact with a small correlation model. The model defines two types of objects: cards and ports, as shown in Relationship between cards and ports.
Cards and ports are separate classes. Each class has its own set of attributes and events. An instance of one class can be related to an instance of another class.
Cards have the following:
-
A single attribute, CardDesc. This attribute is a string and has no default value.
-
Two types of events.
-
The first type is a problem called Down. When all of a card’s ports are OperationallyDown, the card is Down.
-
The second type is an aggregate called Impaired. If any of the ports associated with a card is Down or if the card is Down, the card is Impaired.
Ports have the following:
-
-
A single attribute, OperStatus. This attribute has a special data type that limits the values of the attribute to TESTING, UP, and DOWN. DOWN is the default value.
-
Two types of events.
-
The first type is a problem called Down. A port is Down when it is OperationallyDown.
-
A second type is a symptomatic event called OperationallyDown. When the port’s OperStatus attribute is set to DOWN, it causes the OperationallyDown event.
In Events that affect ports and their related card, the port’s attribute OperStatus is equal to DOWN. The attribute’s value causes the event OperationallyDown, which, in turn, causes the problem Down. Since the port participates in a PartOf relationship with the card, the card is also affected. The port has the problem Down and, as a result, the card has the compound event (aggregate), Impaired. The card is probably not down, because only one port (not all ports) is experiencing a problem.
The section Appendix C, “Card-Port MODEL Code,” describes the MODEL language code for this example. Diagram of the card and port model is a diagram of this card and port model.
-