|
|
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: 6144 (0x1800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure My_First_Agent, seg_0574b0
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Generic_Agent;
with Text_Io;
with Calendar;
with Orb_Defs;
with V_String;
procedure My_First_Agent is
function My_Treat (The_Class : Orb_Defs.Class; The_Funct : Orb_Defs.Funct)
return String;
package My_Agent is new Generic_Agent
(Treat => My_Treat, Name => "calendar");
My_Contract_Descriptor : My_Agent.Contract_Descriptor;
The_Job_Number : Natural;
The_Job_Answer : V_String.Variable_String;
function My_Treat (The_Class : Orb_Defs.Class; The_Funct : Orb_Defs.Funct)
return String is
The_Time : Calendar.Time;
begin
Text_Io.Put_Line ("Beginning of treating.");
The_Time := Calendar.Clock;
if The_Class = "date" then
if The_Funct = "year" then
Text_Io.Put_Line ("Year: " &
Integer'Image (Calendar.Year (The_Time)));
return Integer'Image (Calendar.Year (The_Time));
end if;
if The_Funct = "mont" then
Text_Io.Put_Line ("Month: " &
Integer'Image (Calendar.Month (The_Time)));
return Integer'Image (Calendar.Month (The_Time));
end if;
if The_Funct = "day " then
Text_Io.Put_Line ("Day : " &
Integer'Image (Calendar.Day (The_Time)));
return Integer'Image (Calendar.Day (The_Time));
end if;
end if;
end My_Treat;
begin
delay (5.0);
-- fabrication du descripteur de contrat
My_Agent.Add_Field (My_Contract_Descriptor, 1);
My_Agent.Add_Field (My_Contract_Descriptor, "date");
My_Agent.Add_Field (My_Contract_Descriptor, 3);
My_Agent.Add_Field (My_Contract_Descriptor, "year");
My_Agent.Add_Field (My_Contract_Descriptor, "mont");
My_Agent.Add_Field (My_Contract_Descriptor, "day ");
delay (5.0);
Text_Io.Put_Line ("AGENT IS GOING TO UNREGISTER !!!");
My_Agent.Register (My_Contract_Descriptor);
loop
if My_Agent.Is_Registrated = True then
Text_Io.Put_Line ("I AM REGISTRATED !");
else
Text_Io.Put_Line ("NOT REGISTRATED YET.");
end if;
exit when My_Agent.Is_Registrated = True;
delay (5.0);
end loop;
delay (40.0);
Text_Io.Put_Line ("AGENT IS GOING TO ASK A JOB TO ORB : EuHi ital");
My_Agent.Ask_For_A_Job ("EuHi", "ital", 1);
loop
exit when My_Agent.Is_There_A_Job_Result = True;
end loop;
My_Agent.Get_Job_Result (The_Job_Number, The_Job_Answer);
Text_Io.Put_Line ("RESULTAT DU JOB Numero " &
Integer'Image (The_Job_Number) & " : " &
V_String.Image (The_Job_Answer));
delay (10.0);
Text_Io.Put_Line ("AGENT IS GOING TO UNREGISTER");
My_Agent.Unregister;
loop
exit when My_Agent.Is_Registrated = False;
end loop;
delay (5.0);
Text_Io.Put_Line ("AGENT IS GOING TO DIE");
My_Agent.Close;
delay (5.0);
Text_Io.Put_Line ("My first agent Terminated");
end My_First_Agent;
nblk1=5
nid=5
hdr6=8
[0x00] rec0=20 rec1=00 rec2=01 rec3=02e
[0x01] rec0=1b rec1=00 rec2=04 rec3=02c
[0x02] rec0=29 rec1=00 rec2=03 rec3=018
[0x03] rec0=11 rec1=00 rec2=02 rec3=000
[0x04] rec0=04 rec1=00 rec2=05 rec3=000
tail 0x217645bd087c7850faa30 0x42a00088462060003
Free Block Chain:
0x5: 0000 00 00 01 12 80 29 65 78 74 5f 69 6f 2e 70 75 74 ┆ )ext_io.put┆