|
|
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_Second_Agent, seg_0574b4
└─⟦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 V_String;
with Orb_Defs;
procedure My_Second_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 => "HiEurope");
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
begin
if The_Class = "EuHi" then
if The_Funct = "fren" then
return "Bonjour";
end if;
if The_Funct = "germ" then
return "Guten tag";
end if;
if The_Funct = "spai" then
return "Buenas dias";
end if;
if The_Funct = "engl" then
return "Good Morning";
end if;
if The_Funct = "ital" then
return "Tchao";
end if;
end if;
end My_Treat;
begin
Text_Io.Put_Line ("Test of second agent.");
delay (10.0);
-- fabrication du descripteur de contrat
My_Agent.Add_Field (My_Contract_Descriptor, 1);
My_Agent.Add_Field (My_Contract_Descriptor, "EuHi");
My_Agent.Add_Field (My_Contract_Descriptor, 5);
My_Agent.Add_Field (My_Contract_Descriptor, "fren");
My_Agent.Add_Field (My_Contract_Descriptor, "germ");
My_Agent.Add_Field (My_Contract_Descriptor, "spai");
My_Agent.Add_Field (My_Contract_Descriptor, "engl");
My_Agent.Add_Field (My_Contract_Descriptor, "ital");
delay (10.0);
Text_Io.Put_Line ("AGENT IS GOING TO REGISTER !!!");
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 (30.0);
Text_Io.Put_Line ("AGENT IS GOING TO ASK FOR A JOB TO ORB : date month");
My_Agent.Ask_For_A_Job ("date", "mont", 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 (20.0);
Text_Io.Put_Line ("AGENT IS GOING TO ASK FOR A JOB TO ORB : date year");
My_Agent.Ask_For_A_Job ("date", "year", 2);
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 (10.0);
Text_Io.Put_Line ("AGENT IS GOING TO DIE");
My_Agent.Close;
delay (5.0);
Text_Io.Put_Line ("My second agent Terminated");
end My_Second_Agent;
nblk1=5
nid=3
hdr6=8
[0x00] rec0=20 rec1=00 rec2=01 rec3=04c
[0x01] rec0=1f rec1=00 rec2=02 rec3=02c
[0x02] rec0=25 rec1=00 rec2=05 rec3=066
[0x03] rec0=1f rec1=00 rec2=04 rec3=000
[0x04] rec0=c0 rec1=00 rec2=00 rec3=100
tail 0x217645cc087c786ef74eb 0x42a00088462060003
Free Block Chain:
0x3: 0000 00 00 01 19 80 1b 65 72 27 49 6d 61 67 65 20 28 ┆ er'Image (┆