-- File: PtDefs.mesa, Last Edit: HGM October 16, 1979 1:31 AM
DIRECTORY
StatsDefs: FROM "StatsDefs" USING [StatCounterIndex],
PupStream: FROM "PupStream" USING [CloseReason],
PupDefs: FROM "PupDefs" USING [PupAddress, PupHostID, PupNetID, PupSocketID];
PtDefs: DEFINITIONS =
BEGIN OPEN PupDefs;
slow: BOOLEAN = TRUE;
-- used by PtPkt and PtSocket
packetCycle: CARDINAL = 500;
-- used by PtBSP and PtOC
byteCycle: INTEGER = 512*10;
blockCycle: INTEGER = 100;
blockSize: INTEGER = 2000;
DataBuffer: TYPE = PACKED ARRAY [0..blockSize) OF [0..377B];
PtInterface: TYPE = POINTER TO PtVector;
PtVector: TYPE = RECORD [
socNum: PupSocketID,
pullMe: PupAddress,
pullHim: PupAddress,
pushMe: PupAddress,
pushHim: PupAddress,
stopFlag: BOOLEAN,
length: {long,short,random,cyclic,ignore,number},
packetLength: CARDINAL,
data: {alternating,cyclic,ignore,ones,random,zeros},
streamData: WORD,
mode: {byte,block},
doStats: BOOLEAN, -- copied from Pup
dataWordsPerPup: CARDINAL,
displaying: BOOLEAN,
info: BOOLEAN,
spying: BOOLEAN,
ticking: BOOLEAN,
localOnly: BOOLEAN,
myHost: PupHostID,
myNet: PupNetID,
whyText: ARRAY PupStream.CloseReason OF STRING
];
LengthMismatch: SIGNAL;
DataMismatch: SIGNAL;
-- PtSocket
statRawPacketsSent: StatsDefs.StatCounterIndex = statSpares0;
statRawPacketsRecv: StatsDefs.StatCounterIndex = statSpares1;
statRawPacketsEarly: StatsDefs.StatCounterIndex = statSpares2;
statRawPacketsMissed: StatsDefs.StatCounterIndex = statSpares3;
statRawPacketsLate: StatsDefs.StatCounterIndex = statSpares4;
statRawPacketsTurnedBack: StatsDefs.StatCounterIndex = statSpares5;
statRawPacketsUnexpected: StatsDefs.StatCounterIndex = statSpares6;
SeeStorms, UnListen: PROCEDURE;
Random: PROCEDURE [CARDINAL] RETURNS [CARDINAL];
WaitUntilDone: PROCEDURE [CARDINAL];
Done: PROCEDURE;
PupTestMainLoop: PROCEDURE;
PtSocEcho, PtSocRecv, PtSocSend, PtSocPushPull, PtSocTurnabout: PROCEDURE;
PtBSPListen, PtBSPUnListen: PROCEDURE;
PtBSPRecv, PtBSPSend, PtBSPDoubleSend, PtBSPPushPull: PROCEDURE;
PtPktListen, PtPktUnListen: PROCEDURE;
PtPktRecv, PtPktSend, PtPktDoubleSend, PtPktPushPull: PROCEDURE;
PtOCRecv, PtOCSend, PtOCDoubleSend, PtOCPushPull: PROCEDURE;
PtOCListen, PtOCUnListen: PROCEDURE;
PtRejListen, PtRejUnListen: PROCEDURE;
PtEchoer, PtEchoOn, PtEchoOff: PROCEDURE;
PtBuffers, PtDisplay, PtHost, PtNames, PtOnOff, PtFixHostAndNet, PtSched: PROCEDURE;
PtStatsOn, PtStatsOff: PROCEDURE;
PtLookerStart, PtLookerReady, PtLookerSince, PtLookerStop: PROCEDURE;
PtPrintThings, PtPRThings: PROCEDURE;
PtCommand, PtBSP, PtEcho, PtOC, PtNS, PtPkt, PtSocket, PtMisc, PtPrint: PROGRAM[PtInterface];
-- ALTO Things
clock: POINTER TO INTEGER = LOOPHOLE[430B];
msPerTick: INTEGER = 39;
Xmax: CARDINAL = 606-16-1;
Ymax: CARDINAL = 808-16-1;
MouseX: POINTER TO CARDINAL = LOOPHOLE[424B];
MouseY: POINTER TO CARDINAL = LOOPHOLE[425B];
CursorX: POINTER TO CARDINAL = LOOPHOLE[426B];
CursorY: POINTER TO CARDINAL = LOOPHOLE[427B];
CursorBits: POINTER TO ARRAY [0..16) OF WORD = LOOPHOLE[431B];
CursorIndex: TYPE = RECORD [[0..16)];
echoIndex: CursorIndex = [2];
turnIndex: CursorIndex = [3];
sendIndex: CursorIndex = [15];
recvIndex: CursorIndex = [10];
lostIndex: CursorIndex = [5];
END.