|
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 - download
Length: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Tache_Orb, seg_05476a
└─⟦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_Orb is Chaine : String (1 .. 1024); Connection : Transport.Connection_Id; Status : Transport_Defs.Status_Code; Network : constant Transport_Defs.Network_Name := "TCP/IP"; Local_Socket : 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; begin Local_Socket := Trame.Donne_Socket (Trame.Fait_Socket_String (10, 46));--Socket 2 6 0 6 Transport.Open (Connection, Status, Network, Local_Socket); if Transport.Is_Open (Connection) then Text_Io.New_Line; Text_Io.Put_Line ("OK: La connection vers l Objet est ouverte..."); else Text_Io.New_Line; Text_Io.Put_Line ("ERREUR: La connection vers l Objet n'est pas ouverte..."); end if; Text_Io.Put_Line ("Je tente de me connecter a l Objet..."); Transport.Connect (Connection, Status, Max_Wait); if Transport.Is_Connected (Connection) then Text_Io.Put_Line ("OK: On est connecte a l Objet..."); else Text_Io.Put_Line ("ERREUR: On n'est pas connecte a l Objet ..."); end if; Text_Io.Put_Line ("Je tente de recevoir..."); Transport.Receive (Connection, 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 (Connection); if Transport.Is_Connected (Connection) then Text_Io.Put_Line ("ERREUR: On est encore connecte a l Objet..."); else Text_Io.Put_Line ("OK: On n'est plus connecte a l Objet.."); end if; Transport.Close (Connection); if Transport.Is_Open (Connection) then Text_Io.Put_Line ("ERREUR: La connection a l Objet n'est pas fermee..."); else Text_Io.Put_Line ("OK: La connection a l Objet est maintenant fermee..."); end if; Transport.Open (Connection, Status, Network); if Transport.Is_Open (Connection) then Text_Io.New_Line; Text_Io.Put_Line ("OK: La connection est ouverte..."); else Text_Io.New_Line; Text_Io.Put_Line ("ERREUR: La connection n'est pas ouverte..."); end if; Text_Io.Put_Line ("Je tente de me connecter..."); while not Transport.Is_Connected (Connection) loop Transport.Connect (Connection, Status, Trame.Donne_Host (Trame.Donne_Bounded_String (Data, 2)), Trame.Donne_Socket (Trame.Donne_Bounded_String (Data, 3)), Max_Wait); end loop; if Transport.Is_Connected (Connection) then Text_Io.Put_Line ("OK: On est connecte..."); else Text_Io.Put_Line ("ERREUR: On n'est pas connecte.."); end if; Text_Io.Put_Line ("Je tente de transmettre le message..."); Transport.Transmit (Connection, Status, Trame.Fait_Trame (69, Trame.Fait_Host (Host_Ficus), Trame.Fait_Socket (Local_Socket), Bounded_String.Value ("12345" & Ascii.Nul), Bounded_String.Value ("C est la reponse" & 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; end Tache_Orb;
nblk1=6 nid=0 hdr6=c [0x00] rec0=1f rec1=00 rec2=01 rec3=076 [0x01] rec0=1b rec1=00 rec2=02 rec3=016 [0x02] rec0=19 rec1=00 rec2=03 rec3=05c [0x03] rec0=1e rec1=00 rec2=04 rec3=040 [0x04] rec0=16 rec1=00 rec2=05 rec3=01a [0x05] rec0=11 rec1=00 rec2=06 rec3=000 tail 0x2175d8bae87b88575c1e5 0x42a00088462060003