|
|
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: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Channel_User, seg_054d5f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Bls_Constant;
with Transport;
with Transport_Defs;
with Transport_Name;
with Byte_Defs;
with Connection_Def;
with Utils;
with Text_Io, Task_Io;
package body Channel_User is
function Image (S : Transport_Defs.Socket_Id) return String is
begin
return Utils.Byte_String_To_String (Byte_Defs.Byte_String (S));
end Image;
function Image (H : Transport_Defs.Host_Id) return String is
begin
return Utils.Byte_String_To_String (Byte_Defs.Byte_String (H));
end Image;
function Image (O : Object) return String is
begin
return Image (O.Socket) & Image (O.Host);
end Image;
function Get_Socket_Id (O : Object) return Transport_Defs.Socket_Id is
begin
return O.Socket;
end Get_Socket_Id;
function Get_Host_Id (O : Object) return Transport_Defs.Host_Id is
begin
return O.Host;
end Get_Host_Id;
procedure Send (O : in out Object; Msg : in out Byte_Defs.Byte_String) is
Try : Positive := Positive'First;
begin
Text_Io.Put_Line ("dfklgfkldgb");
Connection_Try_Loop:
while not Transport.Is_Connected (Connection => O.Connect) loop
Transport.Connect (O.Connect, O.Status, O.Host,
O.Socket, Duration'Last);
delay (The_Delay_Between_Two_Connect);
exit Connection_Try_Loop when Try = Number_Of_Try_Max;
Try := Try + 1;
Text_Io.Put_Line ("try to connect");
end loop Connection_Try_Loop;
if not Transport.Is_Connected (O.Connect) then
Msg := Utils.String_To_Byte_String (Error_Msg);
end if;
Transport.Transmit (O.Connect, O.Status, Msg, O.Count);
Transport.Disconnect (O.Connect);
end Send;
--procedure Receive (O : in out Object; Msg : out String) is
--
-- Data : Byte_Defs.Byte_String (1 .. 255);
--begin
-- while not Transport.Is_Connected (O.Connect) loop
-- Transport.Connect (O.Connect, O.Status, Duration'Last);
-- end loop;
-- Transport.Receive (O.Connect, O.Status, Data, O.Count);
-- Msg := Utils.Byte_String_To_String (Data);
-- Transport.Disconnect (O.Connect);
--
--end Receive;
procedure Init (O : in out Object;
S : Transport_Defs.Socket_Id;
H : Transport_Defs.Host_Id;
Result : out Boolean) is
begin
Text_Io.Put_Line ("initialisation de l'object sokcet jkl");
Text_Io.Put_Line ("init toujours dasn channel user");
O.Socket := S;
Text_Io.Put_Line ("apres sokcet");
O.Host := Transport_Defs.Normalize (H);
Text_Io.Put_Line ("appre host");
Transport.Open (O.Connect, O.Status, Bls_Constant.Protocole);
Result := Transport.Is_Open (Connection => O.Connect);
Text_Io.Put_Line ("apres initialisation");
Task_Io.Put_Line ("apres init en task");
Result := True;
end Init;
procedure Close (O : in out Object) is
begin
Text_Io.Put_Line ("dfklgfkldgb");
Transport.Close (O.Connect);
end Close;
end Channel_User;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=25 rec1=00 rec2=01 rec3=060
[0x01] rec0=16 rec1=00 rec2=02 rec3=048
[0x02] rec0=17 rec1=00 rec2=03 rec3=00a
[0x03] rec0=0b rec1=00 rec2=04 rec3=001
tail 0x2175d82fe87b884c4b43a 0x42a00088462060003