|
|
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: 9216 (0x2400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Objet_Client, seg_05733c
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Message;
with Orb_Tools;
with Text_Io;
with Transport_Defs;
with Byte_Defs;
with Transport;
with Identification;
procedure Objet_Client is
My_Mess : Message.Tmessage;
My_Content : Orb_Tools.Content_String;
My_Command : Message.Command_Type;
My_Id : Identification.Tclient_Id := 0;
My_Host : Orb_Tools.Host_String;
My_Socket : Orb_Tools.Socket_String;
My_Name : Orb_Tools.Content_String;
Cpt : Natural;
My_Connection : Transport.Connection_Id;
My_Status : Transport_Defs.Status_Code;
To_Transmit : Orb_Tools.Data_String;
To_Accept : Orb_Tools.Data_String;
From_Orb : Byte_Defs.Byte_String (0 .. 255);
The_Net : constant Transport_Defs.Network_Name := "TCP/IP";
Order : Character;
begin
-- SEND REGISTRATION
My_Command := Message.Registration;
Orb_Tools.Copy (Source => "Client", Target => My_Name);
Orb_Tools.Copy (Source => Transport.Local_Host (The_Net),
Target => My_Host);
Transport.Open (My_Connection, My_Status, The_Net);
Orb_Tools.Copy (Source => Transport.Local_Socket (My_Connection),
Target => My_Socket);
Orb_Tools.Copy (Target => My_Content, Source => My_Socket);
Orb_Tools.Append (Target => My_Content, Source => ":");
Orb_Tools.Append (Target => My_Content, Source => My_Host);
Orb_Tools.Append (Target => My_Content, Source => ":");
Orb_Tools.Append (Target => My_Content, Source => My_Name);
Message.Fill_Content (Mess => My_Mess, Cont => My_Content);
Message.Fill_Command (Mess => My_Mess, Comm => My_Command);
Message.Fill_Origin (Mess => My_Mess, Orig => My_Id);
Message.Fill (Data => To_Transmit, Mess => My_Mess);
Text_Io.Put_Line ("Client : send registration to ORB : " &
Orb_Tools.Image (To_Transmit));
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status,
(193, 54, 146, 132), (10, 42));
end loop;
Text_Io.Put_Line ("Client : connected to Orb");
Transport.Transmit (My_Connection, My_Status,
Orb_Tools.Vstring_To_Byte_String (To_Transmit), Cpt);
Transport.Disconnect (My_Connection);
Text_Io.Put_Line ("Client : data transmited.");
-- WAITING FOR ID
Text_Io.Put_Line ("Client : wait for ID...");
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status);
end loop;
loop
Transport.Receive (My_Connection, My_Status, From_Orb, Cpt);
exit when Transport_Defs.Image (My_Status) = "OK";
end loop;
Text_Io.Put ("Client : received message from ORB : ");
Orb_Tools.Copy (Target => To_Accept, Source => From_Orb (0 .. Cpt - 1));
Message.Unfill (To_Accept, My_Mess);
Message.Unfill_Content (My_Mess, My_Content);
My_Id := Identification.Tclient_Id'Value (Orb_Tools.Image (My_Content));
Text_Io.Put_Line (Orb_Tools.Image (To_Accept));
Transport.Disconnect (My_Connection);
-- SEND A REQUEST Datum
loop
Text_Io.Put (" q : quit, others : continue");
Text_Io.Get (Order);
exit when Order = 'q';
My_Command := Message.Request;
Orb_Tools.Copy (Target => My_Content, Source => "Datum");
Message.Fill_Content (Mess => My_Mess, Cont => My_Content);
Message.Fill_Command (Mess => My_Mess, Comm => My_Command);
Message.Fill_Origin (Mess => My_Mess, Orig => My_Id);
Message.Fill (Data => To_Transmit, Mess => My_Mess);
Text_Io.Put_Line ("Client : send request to ORB :" &
Orb_Tools.Image (To_Transmit));
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status, (193, 54, 146, 132), (10, 42));
end loop;
Text_Io.Put_Line ("Client : Connected to Orb");
Transport.Transmit
(My_Connection, My_Status,
Orb_Tools.Vstring_To_Byte_String (To_Transmit), Cpt);
Transport.Disconnect (My_Connection);
Text_Io.Put_Line ("Client : data transmited.");
-- WAITING FOR FORWARD
Text_Io.Put_Line ("Client : wait for forward...");
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status);
end loop;
loop
Transport.Receive (My_Connection, My_Status, From_Orb, Cpt);
exit when Transport_Defs.Image (My_Status) = "OK";
end loop;
Text_Io.Put ("Client : received message from ORB : ");
Orb_Tools.Copy (Target => To_Accept, Source => From_Orb (0 .. Cpt - 1));
Message.Unfill (To_Accept, My_Mess);
Message.Unfill_Content (My_Mess, My_Content);
Text_Io.Put_Line (Orb_Tools.Image (To_Accept));
Transport.Disconnect (My_Connection);
end loop;
-- SEND AN UNREGISTRATION
My_Command := Message.Unregistration;
Orb_Tools.Copy (Target => My_Content, Source => "");
Message.Fill_Content (Mess => My_Mess, Cont => My_Content);
Message.Fill_Command (Mess => My_Mess, Comm => My_Command);
Message.Fill_Origin (Mess => My_Mess, Orig => My_Id);
Message.Fill (Data => To_Transmit, Mess => My_Mess);
Text_Io.Put_Line ("Client : send unregistration to ORB :" &
Orb_Tools.Image (To_Transmit));
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status,
(193, 54, 146, 132), (10, 42));
end loop;
Text_Io.Put_Line ("Client : Connected to Orb");
Transport.Transmit (My_Connection, My_Status,
Orb_Tools.Vstring_To_Byte_String (To_Transmit), Cpt);
Transport.Disconnect (My_Connection);
Text_Io.Put_Line ("Client : data transmited.");
Transport.Close (My_Connection);
end Objet_Client;
nblk1=8
nid=2
hdr6=e
[0x00] rec0=29 rec1=00 rec2=01 rec3=054
[0x01] rec0=18 rec1=00 rec2=03 rec3=008
[0x02] rec0=20 rec1=00 rec2=05 rec3=026
[0x03] rec0=1a rec1=00 rec2=04 rec3=002
[0x04] rec0=22 rec1=00 rec2=08 rec3=034
[0x05] rec0=1c rec1=00 rec2=07 rec3=04a
[0x06] rec0=0a rec1=00 rec2=06 rec3=000
[0x07] rec0=0a rec1=00 rec2=07 rec3=000
tail 0x2154df83887c6882a59cc 0x42a00088462060003
Free Block Chain:
0x2: 0000 00 00 00 06 80 03 20 20 20 03 20 05 72 74 2e 54 ┆ rt.T┆