|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 8192 (0x2000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bgrb_Generic_Robots, seg_04b353
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Bgrb_Frames;
with Bgrb_Working_Memory;
package body Bgrb_Generic_Robots is
task Object is
entry Work (With_Robot : Fact_Name;
With_Brick : Fact_Name;
Destination_Box : Fact_Name;
Box_Number : Slot.Object);
entry Kill (Which_Robot : Fact_Name);
end Object;
task body Object is
use Bgrb_Frames;
Finish : Boolean := False;
The_Output_Window : Display.Window (Display.Output_Window);
The_Robot : Fact_Name;
The_Brick : Fact_Name;
The_Box : Fact_Name;
The_Box_Number : Slot.Object;
begin
Display.Open_Window (Window_Name, The_Output_Window,
Display.Output_Window);
Display.New_Line (The_Output_Window);
Display.Put_Line
(" --------------------------------------------------------------",
The_Output_Window);
Display.Put_Line
(" -- THE ROBOT WAITS FOR A JOB --",
The_Output_Window);
Display.Put_Line
(" --------------------------------------------------------------",
The_Output_Window);
while not (Finish) loop
select
accept Work (With_Robot : Fact_Name;
With_Brick : Fact_Name;
Destination_Box : Fact_Name;
Box_Number : Slot.Object) do
The_Robot := With_Robot;
The_Brick := The_Brick;
The_Box := Destination_Box;
The_Box_Number := Box_Number;
end Work;
Display.New_Line (The_Output_Window);
Display.Put_Line
(" --------------------------------------------------------------",
The_Output_Window);
Display.Put_Line
(" -- THE ROBOT IS WORKING --",
The_Output_Window);
Display.Put_Line
(" --------------------------------------------------------------",
The_Output_Window);
Robots.Change (The_Robot, Action, Dropping);
delay (Working_Time);
Boxes.Change
(The_Box, State, Full);
Robots.Change (The_Robot, Action, Taking);
Robots.Change (The_Robot, Working, No);
Display.New_Line (The_Output_Window);
Display.Put_Line
(" --------------------------------------------------------------",
The_Output_Window);
Display.Put_Line
(" -- THE ROBOT WAITS FOR A JOB --",
The_Output_Window);
Display.Put_Line
(" --------------------------------------------------------------",
The_Output_Window);
or
accept Kill (Which_Robot : Fact_Name) do
The_Robot := Which_Robot;
end Kill;
Robots.Delete (The_Robot);
Display.New_Line (The_Output_Window);
Display.Put_Line
(" --------------------------------------------------------------",
The_Output_Window);
Display.Put_Line
(" -- THE ROBOT HAS BEEN REMOVED --",
The_Output_Window);
Display.Put_Line
(" --------------------------------------------------------------",
The_Output_Window);
Display.New_Line (The_Output_Window);
Finish := True;
end select;
end loop;
Display.Put_Line ("fin de la tache", The_Output_Window);
Display.Close_Window (The_Output_Window);
end Object;
procedure Work (With_Robot : Fact_Name;
With_Brick : Fact_Name;
Destination_Box : Fact_Name;
Box_Number : Slot.Object) is
begin
Object.Work (With_Robot, With_Brick, Destination_Box, Box_Number);
end Work;
procedure Kill (Which_Robot : Fact_Name) is
begin
Object.Kill (Which_Robot);
end Kill;
end Bgrb_Generic_Robots;
nblk1=7
nid=2
hdr6=a
[0x00] rec0=1f rec1=00 rec2=01 rec3=090
[0x01] rec0=18 rec1=00 rec2=07 rec3=060
[0x02] rec0=19 rec1=00 rec2=05 rec3=036
[0x03] rec0=15 rec1=00 rec2=06 rec3=038
[0x04] rec0=1c rec1=00 rec2=03 rec3=000
[0x05] rec0=16 rec1=00 rec2=03 rec3=016
[0x06] rec0=1b rec1=00 rec2=02 rec3=000
tail 0x2174fed1c867c3d2fd245 0x42a00088462063c03
Free Block Chain:
0x2: 0000 00 04 02 e4 80 1f 79 2e 4e 65 77 5f 4c 69 6e 65 ┆ y.New_Line┆
0x4: 0000 00 00 00 04 80 01 20 01 02 03 04 05 06 07 08 09 ┆ ┆