RobotIO.mesa
Created Saturday, June 9, 1984 4:24 pm PDT
Last edited by Eric Nickell, July 4, 1985 10:46:05 am PDT
This interface provide the tools to read and write compiled robot images to and from the disk.
RobotIO:
CEDAR
DEFINITIONS
~ {
ROPE: TYPE ~ Rope.ROPE;
WriteRobot:
PROC [r:
ROPE, robot: RobotDefs.Robot];
ReadRobot: PROC [r: ROPE, wDir: ROPE ← NIL] RETURNS [robot: RobotDefs.Robot];
AssembleRobot:
PROC [r:
ROPE, log:
IO.
STREAM, onlyIfNew:
BOOL ←
TRUE, wDir:
ROPE ←
NIL]
RETURNS [success:
BOOLEAN];
! FS.Error => couldn't find a file to assemble
Will assemble robot found in file r.robot to r.robotc
~onlyIfNew => always assemble, otherwise assemble only if r.robot newer than r.robotc
log is where to put the assembly comments
}.