|
|
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: 10240 (0x2800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Task_Objet, seg_056b5d
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io;
with Transport;
with Transport_Defs;
with Transport_Name;
with Byte_Defs;
with Utils;
with String_Utilities;
with Bounded_String;
with Trame;
procedure Task_Objet is
Chaine : String (1 .. 1024);
Connection : Transport.Connection_Id;
Connection1 : Transport.Connection_Id;
Status : Transport_Defs.Status_Code;
Status1 : Transport_Defs.Status_Code;
Network : constant Transport_Defs.Network_Name := "TCP/IP";
Local_Socket : Transport_Defs.Socket_Id (1 .. 2);
Local_Socket1 : Transport_Defs.Socket_Id (1 .. 2);
Host_Ancolie : Transport_Defs.Host_Id (1 .. 4);
Data : Byte_Defs.Byte_String (1 .. 1024);
Count : Natural;
Max_Wait : Duration := 6.0; --Duree d'attente max.: 6000 secondes
More_Data : Boolean := False;
Index : Integer;
Codage : Integer;
Nbr : Integer;
Str_Temp : String (1 .. 1024);
Test : Boolean;
package Mon_Integer_Io is new Text_Io.Integer_Io (Integer);
begin
Local_Socket1 := Trame.Donne_Socket
(Trame.Fait_Socket_String (10, 46));--Socket 2 6 0 6
Transport.Open (Connection1, Status, Network, Local_Socket1);
while not Transport.Is_Open (Connection1) loop
Transport.Open (Connection1, Status, Network, Local_Socket1);
end loop;
if Transport.Is_Open (Connection1) then
Text_Io.New_Line;
Text_Io.Put_Line ("OK: Connect. ouverte...Socket trouve");
else
Text_Io.New_Line;
Text_Io.Put_Line ("ERREUR: Connect. pas ouverte...Socket pas trouve");
end if;
--Local_Socket1 := Transport.Local_Socket (Connection1);
Text_Io.Put ("==> ");
Text_Io.Put_Line (Bounded_String.Image (Trame.Fait_Socket (Local_Socket1)));
--Local_Socket := Trame.Donne_Socket
-- (Trame.Fait_Socket_String (10, 46));--Socket 2 6 0 6
Local_Socket := Trame.Donne_Socket
(Trame.Fait_Socket_String (17, 23));--Socket du serveur
Host_Ancolie := Trame.Donne_Host
(Trame.Fait_Host_String (193, 54, 146, 132));
Transport.Open (Connection, Status, Network);
while not Transport.Is_Open (Connection) loop
Transport.Open (Connection, Status, Network);
end loop;
if Transport.Is_Open (Connection) then
Text_Io.New_Line;
Text_Io.Put_Line ("OK: La connection vers ORB est ouverte...");
else
Text_Io.New_Line;
Text_Io.Put_Line
("ERREUR: La connection vers ORB n'est pas ouverte...");
end if;
Text_Io.Put_Line ("Je tente de me connecter a l ORB...");
while not Transport.Is_Connected (Connection) loop
Transport.Connect (Connection, Status, Host_Ancolie,
Local_Socket, Max_Wait);
end loop;
if Transport.Is_Connected (Connection) then
Text_Io.Put_Line ("OK: On est connecte a l ORB...");
else
Text_Io.Put_Line ("ERREUR: On n'est pas connecte a l ORB...");
end if;
Text_Io.Put_Line ("Je tente de transmettre le message...");
Transport.Transmit (Connection, Status,
Trame.Fait_Trame (1, Trame.Fait_Host (Host_Ancolie),
Trame.Fait_Socket (Local_Socket1),
1, Bounded_String.Value
("Donne_Phil()" & Ascii.Nul)),
Count, Max_Wait, More_Data);
Text_Io.Put (Integer'Image (Count));
Text_Io.Put_Line (" caracteres ont ete envoyes.");
Transport.Disconnect (Connection);
if Transport.Is_Connected (Connection) then
Text_Io.Put_Line ("ERREUR: On est encore connecte...");
else
Text_Io.Put_Line ("OK: On n'est plus connecte..");
end if;
Transport.Close (Connection);
if Transport.Is_Open (Connection) then
Text_Io.Put_Line ("ERREUR: La connection n'est pas fermee...");
else
Text_Io.Put_Line ("OK: La connection est maintenant fermee...");
end if;
Text_Io.Put_Line ("Je tente de me connecter a l ORB...");
Transport.Connect (Connection1, Status, Max_Wait);
while not Transport.Is_Connected (Connection1) loop
Transport.Connect (Connection1, Status, Max_Wait);
end loop;
if Transport.Is_Connected (Connection1) then
Text_Io.Put_Line ("OK: On est connecte a l ORB...");
else
Text_Io.Put_Line ("ERREUR: On n'est pas connecte a l ORB ...");
end if;
Text_Io.Put_Line ("Je tente de recevoir...");
Transport.Receive (Connection1, Status, Data, Count, Max_Wait);
Text_Io.Put ("J'ai recu ");
Text_Io.Put (Integer'Image (Count));
Text_Io.Put_Line (" octets: ");
Text_Io.Put ("Message: ");
Chaine := Utils.Byte_String_To_String (Data);
for Compteur in 1 .. 100 loop --Count loop
--exit when (Chaine (Compteur) = Ascii.Nul);
Text_Io.Put (Chaine (Compteur));
end loop;
Text_Io.New_Line;
Text_Io.Put ("Index: ");
Text_Io.Put_Line (Integer'Image (Trame.Donne_Integer (Data, 1)));
Text_Io.Put ("Host: ");
Text_Io.Put_Line (Bounded_String.Image
(Trame.Fait_Host (Trame.Donne_Host
(Trame.Extrait (Data, 2)))));
Text_Io.Put ("Socket: ");
Text_Io.Put_Line (Bounded_String.Image
(Trame.Fait_Socket (Trame.Donne_Socket
(Trame.Extrait (Data, 3)))));
Text_Io.Put ("Codage: ");
Text_Io.Put_Line (Integer'Image (Trame.Donne_Integer (Data, 4)));
Text_Io.Put ("Commande: ");
Text_Io.Put_Line (Trame.Convert_String (Trame.Donne_String (Data, 5)));
Text_Io.Put_Line (Bounded_String.Image (Trame.Extrait (Data, 5)));
Text_Io.New_Line;
Transport.Disconnect (Connection1);
if Transport.Is_Connected (Connection1) then
Text_Io.Put_Line ("ERREUR: On est encore connecte a l ORB...");
else
Text_Io.Put_Line ("OK: On n'est plus connecte a l ORB...");
end if;
Transport.Close (Connection1);
if Transport.Is_Open (Connection1) then
Text_Io.Put_Line ("ERREUR: La connection a l ORB n'est pas fermee...");
else
Text_Io.Put_Line ("OK: La connection l ORB est maintenant fermee...");
end if;
end Task_Objet;
nblk1=9
nid=0
hdr6=12
[0x00] rec0=22 rec1=00 rec2=01 rec3=062
[0x01] rec0=19 rec1=00 rec2=08 rec3=044
[0x02] rec0=1a rec1=00 rec2=03 rec3=010
[0x03] rec0=05 rec1=00 rec2=06 rec3=040
[0x04] rec0=1b rec1=00 rec2=04 rec3=02a
[0x05] rec0=19 rec1=00 rec2=07 rec3=028
[0x06] rec0=04 rec1=00 rec2=09 rec3=008
[0x07] rec0=16 rec1=00 rec2=05 rec3=044
[0x08] rec0=0d rec1=00 rec2=02 rec3=000
tail 0x21763223e87c5466b6f6f 0x42a00088462060003