RapunzelP2200V2ClientImpl.Mesa
Copyright (C) 1986 by Xerox Corporation. All rights reserved.
Edited by Willie-Sue.pa at January 9, 1987 1:20:02 pm PST
Generated by Willie-Sue.pa at January 16, 1987 2:47:27 pm PST
using Sirocco [1.0] of September 25, 1986 3:44:23 am PDT
Remote Procedures
PokeSeqShort:
PUBLIC
PROC [h: CrRPC.Handle, address:
CARD, valueSeq: RapunzelP2200V2.SeqShort]
RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARD[h, address];
CrRPC.PutCARDINAL[h, valueSeq.length];
FOR i0:
CARDINAL
IN [0..valueSeq.length)
DO
CrRPC.PutCARDINAL[h, valueSeq.body[i0]];
ENDLOOP;
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~2200, remotePgmVersion~2, remoteProc~4, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PokeLong:
PUBLIC
PROC [h: CrRPC.Handle, address:
CARD, value:
CARD]
RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARD[h, address];
CrRPC.PutCARD[h, value];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~2200, remotePgmVersion~2, remoteProc~6, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
SetShftAddrs:
PUBLIC
PROC [h: CrRPC.Handle, shftA:
CARD, shftB:
CARD]
RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARD[h, shftA];
CrRPC.PutCARD[h, shftB];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~2200, remotePgmVersion~2, remoteProc~8, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
BadRes: TYPE = RECORD[i: CARDINAL, val: CrRPC.HWORD];
DoCmds:
PUBLIC
PROC [h: CrRPC.Handle, cmdSeq: RapunzelP2200V2.SeqCmd]
RETURNS [resultSeq: RapunzelP2200V2.SeqResult] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARDINAL[h, cmdSeq.length];
FOR i0:
CARDINAL
IN [0..cmdSeq.length)
DO
CrRPC.PutCARDINAL[h, ORD[cmdSeq.body[i0].type]];
WITH cmdSeq.body[i0]
SELECT
FROM
it: peekShort RapunzelP2200V2.Cmd => {
CrRPC.PutCARD[h, it.peekShort.address];
};
it: pokeShort RapunzelP2200V2.Cmd => {
CrRPC.PutCARD[h, it.pokeShort.address];
CrRPC.PutCARDINAL[h, it.pokeShort.value];
};
it: shftRead RapunzelP2200V2.Cmd => {
CrRPC.PutCARD[h, it.shftRead.address];
CrRPC.PutCARDINAL[h, it.shftRead.numRepeats];
};
it: shftWrite RapunzelP2200V2.Cmd => {
CrRPC.PutCARD[h, it.shftWrite.address];
CrRPC.PutCARDINAL[h, it.shftWrite.numRepeats];
};
it: returnLength RapunzelP2200V2.Cmd => {
CrRPC.PutCARDINAL[h, it.returnLength.returnLength];
};
ENDCASE;
ENDLOOP;
};
GetResults: CrRPC.GetResultsProc ~ {
{
length1: CARDINAL ~ CrRPC.GetCARDINAL[h];
badRes: LIST OF BadRes ← NIL;
resultSeq ← NEW[RapunzelP2200V2.SeqResultObject[length1]];
FOR i0:
CARDINAL
IN [0..length1)
DO
TRUSTED {
hw: CrRPC.HWORD ~ CrRPC.GetCARDINAL[h];
tag2: RapunzelP2200V2.OpCode ~ VAL[hw];
SELECT tag2
FROM
peekShort => {
x3: RapunzelP2200V2.PeekShortResult;
x3.value ← CrRPC.GetCARDINAL[h];
resultSeq.body[i0] ← [peekShort[x3]];
};
pokeShort => resultSeq.body[i0] ← [pokeShort[pokeShort~]]; -- RECORD []
shftRead => {
x4: RapunzelP2200V2.ShftReadResult;
x4.numRepeats ← CrRPC.GetCARDINAL[h];
resultSeq.body[i0] ← [shftRead[x4]];
};
shftWrite => {
x5: RapunzelP2200V2.ShftWriteResult;
x5.numRepeats ← CrRPC.GetCARDINAL[h];
resultSeq.body[i0] ← [shftWrite[x5]];
};
returnLength => resultSeq.body[i0] ← [returnLength[returnLength~]]; -- RECORD []
ENDCASE => badRes ← CONS[[ i0, hw], badRes];
};
ENDLOOP;
IF badRes # NIL THEN ERROR;
};
};
CrRPC.Call[h~h, remotePgm~2200, remotePgmVersion~2, remoteProc~7, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PeekLong:
PUBLIC
PROC [h: CrRPC.Handle, address:
CARD]
RETURNS [result:
CARD] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARD[h, address];
};
GetResults: CrRPC.GetResultsProc ~ {
result ← CrRPC.GetCARD[h];
};
CrRPC.Call[h~h, remotePgm~2200, remotePgmVersion~2, remoteProc~5, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PeekSeqShort:
PUBLIC
PROC [h: CrRPC.Handle, address:
CARD, count:
CARDINAL]
RETURNS [resultSeq: RapunzelP2200V2.SeqShort] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARD[h, address];
CrRPC.PutCARDINAL[h, count];
};
GetResults: CrRPC.GetResultsProc ~ {
{
length1: CARDINAL ~ CrRPC.GetCARDINAL[h];
resultSeq ← NEW[RapunzelP2200V2.SeqShortObject[length1]];
FOR i0:
CARDINAL
IN [0..length1)
DO
resultSeq.body[i0] ← CrRPC.GetCARDINAL[h];
ENDLOOP;
};
};
CrRPC.Call[h~h, remotePgm~2200, remotePgmVersion~2, remoteProc~3, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PeekShort:
PUBLIC
PROC [h: CrRPC.Handle, address:
CARD]
RETURNS [result:
CARDINAL] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARD[h, address];
};
GetResults: CrRPC.GetResultsProc ~ {
result ← CrRPC.GetCARDINAL[h];
};
CrRPC.Call[h~h, remotePgm~2200, remotePgmVersion~2, remoteProc~1, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PokeShort:
PUBLIC
PROC [h: CrRPC.Handle, address:
CARD, value:
CARDINAL]
RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARD[h, address];
CrRPC.PutCARDINAL[h, value];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~2200, remotePgmVersion~2, remoteProc~2, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
}...