IPPortTab.mesa
Last Edited by: CSChow, February 2, 1985 2:17:42 am PST
Don Curry December 4, 1987 2:23:52 pm PST
Bryan Preas September 9, 1986 2:39:08 pm PDT
Preas, August 1, 1986 11:51:21 pm PDT
DIRECTORY
IO,
Imager USING [Context],
IP,
IPConstants,
IPParams,
IPNetTab,
IPChipRose,
Rope,
SymTab,
CoreRouteFlat;
IPPortTab: CEDAR DEFINITIONS
-- Intro: This is the table of (I/O) port abstraction. Havent actually used it.
IMPORTS IPParams = BEGIN
Ref: TYPE = REF Rep;
Rep: TYPE = RECORD[ports: SymTab.Ref];
Port: TYPE = REF PortRep;
PortRep: TYPE = IP.PortRep; --name, pinPorts, length
EachPortAction: TYPE = PROC[port: Port] RETURNS [quit: BOOLFALSE];
Create: PROC[chipRose: IPChipRose.Ref, netTab: IPNetTab.Ref] RETURNS [Ref];
CreateFromStructure: PROC[structure: CoreRouteFlat.Structure, netTab: IPNetTab.Ref]
RETURNS [Ref];
FetchPort: PROC[portTab: Ref, name: Rope.ROPE] RETURNS [Port];
Ports: PROC[portTab: Ref, action: EachPortAction];
DescribeSelf: PROC[portTab: Ref, stream: IO.STREAM];
ReconstructSelf: PROC[stream: IO.STREAM, netTab: IPNetTab.Ref] RETURNS [Ref];
--Operation on individual port
PaintPort: PROC [port: Port, context: Imager.Context, xOffset, yOffset: REAL ← 0.0, scaleFactor: REAL ← 1.0, stipple: CARDINAL ← IPConstants.White, size: INT ← IPParams.DefaultPortSize, showPortName: BOOLTRUE];
PortActive: PROC[port: Port] RETURNS [BOOL] = INLINE {RETURN [port.position # NIL]};--PortActive
END.