Object and Class Specfication

Class: Destination Panel

1.0 Precise and Concise Description

  1. Conceptually, a destination panel is a panel containing a number of destination buttons (typically one for each reachable destination), a number of lamps (typically one lamp for each destination button) and, potentially, other devices. The destination panel also contains some computer processing capability. This computer processing capability allows the destination panel to turn particular lamps on and off based on requests, and to inform the outside world when a particular destination button has been pressed.

  2. At any one time, any number of lamps in the destination panel may be lit (i.e., on). A given lamp in the destination panel becomes lit (i.e., is turned on) based on an invocation of the Turn_On_Lamp operation. Once a lamp becomes lit, it stays lit until the destination panel receives a request to turn that lamp off, i.e., via an invocation of the Turn_Off_Lamp operation. Likewise, a lamp remains off until a request is received to turn it on. Once a particular lamp is lit (or turned off), any additional requests for the lamp to be lit (or turned off) are ignored. No facility is provided to determine the state of individual lamps contained in the destination panel.

  3. Obviously, any request to turn a given lamp on or off must contain some way of uniquely identifying the specific lamp, and whether that lamp is to be turned on or off. If the lamp identified in the request is not contained in the destination panel, the exception Lamp_Not_Found will be raised.

  4. The destination panel must notify the outside world that a particular destination button has been pressed. It does this through a required operation, Signal. Each destination button is associated with a specific lamp, and the panel has the (internal) capability of determining which of its lamps are lit. If someone presses a destination button for which the associated lamp that is already lit, no (new) notification is passed to the outside world. No facility is provided to determine the state of individual buttons contained in the destination panel.

  5. Obviously, any notification (to the outside world) that a specific destination button has been pressed (i.e., done through the "Signal" operation) must contain some way of uniquely identifying the specific desired destination.

  6. Since, to all who must deal with the destination panel abstraction, the destination panel appears to be changing its state spontaneously (i.e., specific destinations will be periodically requested), the destination panel is an "object with life."

  7. The required operation for the destination panel is: "Signal" (the user of a destination panel that a button has been pressed).

  8. The suffered operations for the destination panel are "Turn_On_Lamp" (for a given destination), "Turn_Off_Lamp" (for a given destination), and Assign (the state of one destination panel to another destination panel).

  9. Users of the Destination_Panel class must also supply:

  10. The state for a destination panel may be defined as:

  11. The exception Lamp_Not_Found is associated with a destination panel.

2.0 Graphical Representations

2.1 Static Representations

2.1.1 Semantic Networks

2.1.2 Notes On the Semantic Networks

  1. From the outside view, there is no discernible structure or attributes for a destination panel.

  2. Though it seems obvious that the destination panel deals with buttons and lamps, these objects can neither be detected or affected directly from the "outside". It is for that reason that these objects do not appear on the semantic net.

2.2 Dynamic Representations

2.2.1 State Transition Diagrams

2.2.1.1 State Transition Diagrams for Non-Spontaneous State Changes

2.2.1.1.1 Notes on State Transition Diagrams for Non-Spontaneous State Changes

  1. The states shown in the diagram cannot be interrogated. Specifically, there are no operations provided that will allow a client of the abstraction to determine if a particular destination panel lamp is on or off.

  2. A client may not interact directly with a specific destination panel lamp. Clients deliver a request to turn a particular destination panel lamp on or off to the "lamp on/off request port." It is the computer circuitry in the destination panel which will actually turn a lamp on or off, or leave a lamp in its particular state.

  3. Since a given lamp will only be turned on or off based on a specific request, a destination panel with any given number of lamps lit and not lit represents a persistent state.

  4. Assign: This constructor operation copies the state of one destination panel object to another instance of the same class. Since the Assign operation produces an exact copy of an existing destination panel, the resulting copy may be in any one of the states shown in the STD. The Petri Net Graph representation of the Assign operation is:

2.2.1.2 State Transition Diagrams for Spontaneous State Changes

2.2.1.2.1 Notes on State Transition Diagrams for Spontaneous State Changes

  1. Clients of the destination panel cannot "press" any of the destination panel buttons.

  2. After a button is pressed, the destination panel immediately returns to the state where that button is not pressed, i.e., a destination panel with any given button pressed is a highly non-persistent state.

  3. Clients of the destination panel are notified that a particular destination panel button has been pressed via the "Signal" operation. It is the computer circuitry in the destination panel which will actually provide the notification that a particular destination button has been pressed.

  4. Pressing a destination button whose corresponding lamp is already lit will have no effect.

  5. If an attempt is made to simultaneously press two, or more, destination buttons will result in the following:

3.0 Operations

3.1 Required Operations

Operation Method
Signal Alerts the destination panel's client that a button corresponding to a specific destination has been pressed.

3.2 Suffered Operations

Operation Method
Turn_On_Lamp Turns on the lamp corresponding to the given destination. If the lamp is already on, then there is no effect.
Turn_Off_Lamp Turns off the lamp corresponding to the given destination. If the lamp is already off, then there is no effect.
Assign The state of one instance of this class to another instance of this class.

4.0 State Information

  1. The state for a destination panel may be defined as:

5.0 Constants and Exceptions

5.1 Constants

  1. This class will not provide any constants.

5.2 Exceptions

  1. The exception Lamp_Not_Found will be raised if a "lamp on/off request" is received and there is no lamp in the panel which corresponds to the specific lamp referred to in the request.

[TOA Home Page] [HTML
Documents] [Contact TOA]