|
|
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: 7168 (0x1c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Tache_Objet, seg_054768
└─⟦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 Tache_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_Ficus : Transport_Defs.Host_Id (1 .. 4);
Data : Byte_Defs.Byte_String (1 .. 1024);
Count : Natural;
Max_Wait : Duration := 6000.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
Transport.Open (Connection1, Status, Network);
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
Host_Ficus := Trame.Donne_Host (Trame.Fait_Host_String (193, 54, 146, 133));
Transport.Open (Connection, Status, Network);
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_Ficus,
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 (71, Trame.Fait_Host (Host_Ficus),
Trame.Fait_Socket (Local_Socket1),
Bounded_String.Value ("54321" & Ascii.Nul),
Bounded_String.Value
("C est l enregistrement" & 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);
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.Donne_Bounded_String (Data, 2)))));
Text_Io.Put ("Socket: ");
Text_Io.Put_Line (Bounded_String.Image
(Trame.Fait_Socket
(Trame.Donne_Socket
(Trame.Donne_Bounded_String (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.Donne_Bounded_String (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 Tache_Objet;
nblk1=6
nid=0
hdr6=c
[0x00] rec0=22 rec1=00 rec2=01 rec3=05e
[0x01] rec0=1b rec1=00 rec2=02 rec3=010
[0x02] rec0=18 rec1=00 rec2=03 rec3=028
[0x03] rec0=1e rec1=00 rec2=04 rec3=060
[0x04] rec0=19 rec1=00 rec2=05 rec3=096
[0x05] rec0=1f rec1=00 rec2=06 rec3=000
tail 0x2175d8b8087b885721fca 0x42a00088462060003