Object and Class Specfication

Class: Write 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. 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.

  5. In reality, the Write_Only_Port class is a metaclass. Users of the Write_Only_Port class must supply:

  6. The suffered operations for the Write_Only_Port are Set_Address (dynamically set the address for the port), Address_Of (the specified port), Assign (one the value of one Write_Only_Port to another), and Write (a specified bit pattern to a given Write_Only_Port).

  7. The Write_Only_Port class will provide no constants.

  8. The Write_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 write only port "remembers" its system address.

2.2 Dynamic Representations

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

  1. A given Write_Only_Port object cannot be read from, or queried about its address until it has been assigned an address.

  2. After writing a value the Write_Only_Port immediately returns to an inactive state.

  3. The Assign operation requires two instances of the class Write_Only_Port, and therefore cannot be shown on a state transition diagram. The Petri Net Graph for the Assign operation is:

3.0 Operations

3.1 Required Operations

  1. The Write_Only_Port class has no required operations.

3.2 Suffered Operations

Operation Method
Set_Address Dynamically assigns an address to a Write_Only_Port
Address_Of Returns the address of a port
Assign Assigns the state of one Write_Only_Port object to another
Write A value of the given integer class to a given Write_Only_Port

4.0 State Information

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

  2. A Write_Only_Port is momentarily in a different state when it is writing 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 write to 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]