Object and Class Specfication

Class: Read Only Port

1.0 Precise and Concise Description

  1. A "port" is an abstraction of a highly-localized interface between two pieces of hardware in a (potentially embedded) computer system. A port is a place where information can be transferred into, out of, or to and from, a hardware component.

  2. A port has several distinguishing characteristics:

  3. The purpose of the port abstraction is to provide a uniform interface for instances of other classes which use ports. Internally, ports deal with the unique characteristics of the hardware for which they were created. Externally, they present a constant and uniform interface for objects which must deal with ports.

  4. A Read_Only_Port is an "object with life," i.e., there is no software mechanism for changing some aspects of the state of the port. Clients of the Read_Only_Port, for example, cannot force the Read_Only_Port to provide them with information at any given time. They must wait for the port to provide them with information. Ports do not buffer information, i.e., if the information is not read when it becomes available, the information is lost.

  5. Ports view information only as "bit patterns." For example, if a four-bit wide port provides the value 10112 , it places no special significance, or meaning, on this value. Interpretations of bit patterns are left to the clients of the port.

  6. The Read_Only_Port has one required operation ("Signal") which contains the actions the client wishes to accomplish when information arrives at the hardware port -- usually includes the transference of that information.

  7. The suffered operations for the Read_Only_Port are Set_Address (dynamically set the address for the port), Address_Of (the specified port), and Assign (one the value of one Read_Only_Port to another).

  8. In reality, the Read_Only_Port class is a metaclass. Users of the Read_Only_Port class must supply:

  9. The Read_Only_Port class will provide no constants.

  10. The Read_Only_Port class will provide an exception: Address_Not_Defined.

2.0 Graphical Representations

2.1 Static Representations

2.1.1 Semantic Networks

2.1.2 Notes On the Semantic Networks

  1. The read only port "remembers" its system address.

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. A given Read_Only_Port object cannot be read from, or queried about its address until it has been assigned an address.

  2. The Assign operation requires two instances of the class Read_Only_Port, and therefore cannot be shown on a state transition diagram. The Petri Net Graph for 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. When information arrives at the hardware port that information will be transferred to software clients of the port via a Signal operation. Thus, clients of a port will not have to poll the port.

3.0 Operations

3.1 Required Operations

Operation Method
Signal The action(s) clients of the Read_Only_Port want the port to take when information arrives at the port. This usually involves the actual transference of the information.

3.2 Suffered Operations

Operation Method
Set_Address Dynamically assigns an address to a Read_Only_Port
Address_Of Returns the address of a port
Assign Assigns the state of one Read_Only_Port object to another

4.0 State Information

  1. The address of a Read_Only_Port object can be changed and queried.

  2. A Read_Only_Port is an object with life. Specifically, it periodically and "spontaneously" produces values represented as bit patterns.

5.0 Constants and Exceptions

5.1 Constants

  1. This class provides no constants.

5.2 Exceptions

  1. This class provides an exception Address_Not_Defined which is raised if an attempt is made to read from a port which has not been assigned to an address, or if a port which has not been assigned an address is queried as to its address.

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