LarkFeepSunRPCServerStub.Mesa
Copyright Ó 1990 by Xerox Corporation. All rights reserved.
Derived from LarkFeepP914V1ServerImpl.mesa
Generated by Pier.pa at May 18, 1990 3:25:01 pm PDT
using Sirocco [2.0] of February 10, 1989 6:26:26 pm PST
Swinehart, September 18, 1990 8:03:41 am PDT
DIRECTORY
SRPCCalls USING [ ExportSunRPCInterface ],
SunRPC,
ThrushSunRPC,
LarkFeepSunRPC,
LarkFeepSunExport,
LarkFeepSunRPCServer;
LarkFeepSunRPCServerStub: CEDAR PROGRAM
IMPORTS SRPCCalls, SunRPC, LarkFeepSunRPCServer
EXPORTS LarkFeepSunExport ~ {
OPEN LarkFeepSunRPC, LarkFeepSunRPCServer;
Handle: TYPE ~ SunRPC.Handle;
FlashCaller: PROC [h: SunRPC.Handle, beginReturn: SunRPCBeginReturnProc] ~ {
shhh: CARD32;
serviceID: CARD32;
convID: CARD32;
requestingParty: CARD32;
actionID: CARD32;
extraTime: CARD16;
nb: ROPE;
{
shhh ← SunRPC.GetCard32[h];
};
{
serviceID ← SunRPC.GetCard32[h];
};
{
convID ← SunRPC.GetCard32[h];
};
{
requestingParty ← SunRPC.GetCard32[h];
};
{
actionID ← SunRPC.GetCard32[h];
};
{
extraTime ← SunRPC.GetCard32[h];
};
[nb] ← Flash[h, shhh, serviceID, convID, requestingParty, actionID, extraTime];
beginReturn[h];
{
SunRPC.PutRope[h, nb];
};
};
FeepCaller: PROC [h: SunRPC.Handle, beginReturn: SunRPCBeginReturnProc] ~ {
shhh: CARD32;
serviceID: CARD32;
convID: CARD32;
requestingParty: CARD32;
number: ROPE;
noisy: BOOLEAN;
on: CARD16;
off: CARD16;
nb: ROPE;
{
shhh ← SunRPC.GetCard32[h];
};
{
serviceID ← SunRPC.GetCard32[h];
};
{
convID ← SunRPC.GetCard32[h];
};
{
requestingParty ← SunRPC.GetCard32[h];
};
{
number ← SunRPC.GetRope[h];
};
{
noisy ← SunRPCGetBool[h];
};
{
on ← SunRPC.GetCard32[h];
};
{
off ← SunRPC.GetCard32[h];
};
[nb] ← Feep[h, shhh, serviceID, convID, requestingParty, number, noisy, on, off];
beginReturn[h];
{
SunRPC.PutRope[h, nb];
};
};
SunRPCBeginReturnProc: TYPE ~ PROC [h: Handle];
Server: SunRPC.ServerProc ~ {
ENABLE {
};
beginReturn: SunRPCBeginReturnProc ~ {
SunRPC.StartReply[h];
};
doReply ← TRUE;
replyTimeToLive ← 2;
SELECT proc FROM
2 => FlashCaller[h, beginReturn];
1 => FeepCaller[h, beginReturn];
ENDCASE => {
ERROR SunRPC.Error[$wrongProc];
};
};
SunRPCGetBool: PROC [h: Handle] RETURNS [BOOL] ~ INLINE {
RETURN [SunRPC.GetCard32[h] # 0] };
SunRPCPutBool: PROC [h: Handle, bool: BOOL] ~ INLINE {
SunRPC.PutCard32[h, IF bool THEN 1 ELSE 0] };
Initialize server
sunPgm: CARD ← 390914; -- decimal program number
sunPgmVersion: CARD ← 1;
ExportInterface: PUBLIC PROC [port: CARD𡤀] RETURNS [uniquePort: CARD] ~ {
uniquePort ← SRPCCalls.ExportSunRPCInterface[port, Server, sunPgm, sunPgmVersion];
};
}...