LarkRemoteControlImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited by: Swinehart, April 3, 1987 5:54:44 pm PST
DIRECTORY
Commander USING [ CommandProc, Register ],
CommandTool USING [ NextArgument ],
Convert USING [ IntFromRope ],
LarkRemoteControl USING [ BootLark ],
LarkRemoteControlRpcControl USING [ ImportInterface ],
NameDB USING [ GetAttribute ],
Pup USING [ nullSocket ],
Rope USING [ ROPE ],
RPC USING [ ImportFailed ],
VoiceUtils USING [ CmdOrToken, MakeRName, NetAddress, NetAddressFromRope ]
;
LarkRemoteControlImpl:
CEDAR
PROGRAM
IMPORTS Commander, CommandTool, Convert, LarkRemoteControl, LarkRemoteControlRpcControl, NameDB, RPC, VoiceUtils = {
BootLark:
PROC[lark: Rope.
ROPE, serverInstance: Rope.
ROPE]
RETURNS [outcome: BOOL←TRUE] ={
hostHint: VoiceUtils.NetAddress ←
VoiceUtils.NetAddressFromRope[NameDB.GetAttribute[serverInstance, $connect]];
IF serverInstance = NIL THEN RETURN[FALSE];
LarkRemoteControlRpcControl.ImportInterface[
interfaceName: [type: "LarkRemoteControl.Lark", instance: serverInstance],
hostHint: hostHint!
RPC.ImportFailed => GOTO ImportFailed];
RETURN[LarkRemoteControl.BootLark[[[173B], [Convert.IntFromRope[lark, 8]], Pup.nullSocket]]];
EXITS ImportFailed => NULL;
};
BootLarkCmd: Commander.CommandProc = {
machine: Rope.ROPE = CommandTool.NextArgument[cmd];
instance: Rope.
ROPE = VoiceUtils.MakeRName[VoiceUtils.CmdOrToken[
cmd: cmd, key: "NamesGVInstance", default: "Strowger.Lark"], rName];
IF machine = NIL THEN RETURN;
[]𡤋ootLark[machine, instance];
};
Commander.Register["BootLark", BootLarkCmd, "BootLark <hostNumber> <server[Strowger]>\nBootLark 110 hardware-boots lark number 110"];
}.