EtherTesterViewer.mesa
last edited by Willie-Sue, January 9, 1986 1:50:21 pm PST
lifted from EtherTesterDefs.mesa, AOF, 26-Sep-83 16:19:51
DIRECTORY
NSPilotSystem USING [HostNumber],
NewEthernetFace USING [Status],
EtherTesterOps USING [StatsType],
NumberLabels USING [NumberLabel],
Rope USING [ROPE],
ViewerClasses USING [Viewer];
EtherTesterViewer: DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
Viewer: TYPE = ViewerClasses.Viewer;
entryHeight: INTEGER = 14;
xFudge: INTEGER = 4;
ParseError: SIGNAL;
ButtonItem: TYPE = REF ButtonItemObject;
ButtonItemObject: TYPE = RECORD[
button, text: Viewer,
default: ROPE,
valType: ValueType];
ValueType: TYPE = {int, cardinal, rope, hostNum};
BoolItem: TYPE = REF BoolItemObject;
BoolItemObject: TYPE = RECORD[
button: Viewer,
proc: BoolItemProc,
value: BOOL];
BoolItemProc: TYPE = PROC[value: BOOL];
StatsItem: TYPE = REF StatsItemObject;
StatsItemObject: TYPE = RECORD[
box, label: Viewer,
num: NumberLabels.NumberLabel,
val: whichFlipper← left,
which: EtherTesterOps.StatsType,
currentlyDisplayed: INT← 0,
next: StatsItem];
whichFlipper: TYPE = {left, right};
variables shared between EtherTesterControlImpl and EtherTesterViewerImpl
boardNum, sourceHost, destHost, myHost: ButtonItem;
numRecvBuffers, inputBuffLen, numSendBuffers, outputBuffLen: ButtonItem;
ticksBefore: ButtonItem;
patternButton, hwModeButton: Viewer;
statsDisplayer: StatsItem;
Procedures
ButtonAndText: PROC[name: ROPE, sib: Viewer, width: INTEGER, newLine: BOOLFALSE,
  default: ROPENIL, valType: ValueType← cardinal] RETURNS[item: ButtonItem];
ReadCard: PROC [item: ButtonItem] RETURNS[val: CARDINAL];
ReadINT: PROC[item: ButtonItem] RETURNS[val: INT];
ReadHostNum: PROC[v: Viewer] RETURNS[num: NSPilotSystem.HostNumber];
StatusToRope: PROC[s: NewEthernetFace.Status] RETURNS [r: ROPE];
MakeBoolItem: PROC[
 name: ROPE, proc: BoolItemProc, sib: Viewer, init: BOOL, newLine: BOOLFALSE]
  RETURNS[button: Viewer];
PatternButton: PROC[sib: Viewer, newLine: BOOLFALSE];
HWModeButton: PROC[sib: Viewer, newLine: BOOLFALSE];
MakeStatsDisplayers: PROC[y: INTEGER, parent: Viewer];
UpdateStatsBoxes: PROC;
StatsTypeToRope: PROC[which: EtherTesterOps.StatsType] RETURNS[r: ROPE];
END.