|
|
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, package body Com_Orb_Recep, seg_056ad8
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Transport, Transport_Defs, Text_Manager, Utils,
Byte_Defs, Host_Id_Io, Com_Defs, Com_Storage_Recep;
package body Com_Orb_Recep is
procedure Init_Recep (Init_Connection : in out Transport.Connection_Id;
Init_Host_Orb : in Transport_Defs.Host_Id;
Init_Socket_Orb : in Transport_Defs.Socket_Id) is
Status : Transport_Defs.Status_Code;
Network_Name : constant Transport_Defs.Network_Name := "TCP/IP";
Count : Natural;
begin
loop
Transport.Open (Init_Connection, Status,
Network_Name, Init_Socket_Orb);
exit when Transport.Is_Open (Init_Connection) = True;
end loop;
Text_Manager.Text.Put_Line ("Communication : reception is opened");
end Init_Recep;
task body Orb_Recep is
Connection : Transport.Connection_Id;
Network_Name : constant Transport_Defs.Network_Name := "TCP/IP"; Host_Orb : constant Transport_Defs.Host_Id :=
Transport.Local_Host (Network_Name);
Socket_Orb : Transport_Defs.Socket_Id (1 .. 2) := (10, 49);
Status : Transport_Defs.Status_Code;
Count : Natural;
Data_Receive_Orb : Byte_Defs.Byte_String (1 .. 258);
Data_Message : Com_Defs.V_String;
New_Connect : Byte_Defs.Byte := 0;
Data_Dest_Appli : Byte_Defs.Byte := 0;
Data_Mes_Type : Byte_Defs.Byte := 0;
Data_Mes_Length : Byte_Defs.Byte := 0;
String_Verif : Byte_Defs.Byte_String (1 .. 2);
Longueur : Integer := 0;
begin
Init_Recep (Connection, Host_Orb, Socket_Orb);
loop
loop
Transport.Connect (Connection, Status, Duration'Last);
-- Text_Manager.Text.Put_Line ("status of connection recep " &
-- Transport_Defs.Image (Status));
null;
exit when Transport.Is_Connected (Connection) = True;
end loop;
-- Text_Manager.Text.Put_Line ("I am trying to receive the message");
Transport.Receive (Connection, Status, Data_Receive_Orb,
Count, Duration'Last);
Data_Mes_Type := Data_Receive_Orb (1);
Data_Dest_Appli := Data_Receive_Orb (2);
Data_Mes_Length := Data_Receive_Orb (3);
Longueur := Integer (Data_Mes_Length);
if Byte_Defs."=" (Data_Mes_Type, New_Connect) = True then
Text_Manager.Text.Put_Line ("new connection request");
else
-- Text_Manager.Text.Put_Line ("normal message");
-- Text_Manager.Text.Put_Line
-- (Utils.Byte_String_To_String
-- (Data_Receive_Orb (4 .. Integer (Data_Mes_Length) + 3)));
Data_Message :=
Com_Defs.Value
(Utils.Byte_String_To_String
(Data_Receive_Orb
(4 .. Integer (Data_Mes_Length) + 3)));
Com_Storage_Recep.Manager_Storage.Write
(Com_Defs.Com_Number (Data_Dest_Appli), Data_Message);
end if;
Transport.Disconnect (Connection);
end loop;
Transport.Close (Connection);
end Orb_Recep;
end Com_Orb_Recep;
nblk1=5
nid=3
hdr6=8
[0x00] rec0=17 rec1=00 rec2=01 rec3=002
[0x01] rec0=15 rec1=00 rec2=04 rec3=01e
[0x02] rec0=12 rec1=00 rec2=05 rec3=028
[0x03] rec0=0b rec1=00 rec2=02 rec3=000
[0x04] rec0=0b rec1=00 rec2=04 rec3=000
tail 0x21763139c87c53e00c325 0x42a00088462060003
Free Block Chain:
0x3: 0000 00 00 01 c1 80 12 65 5f 53 74 72 69 6e 67 5f 54 ┆ e_String_T┆