DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦4da28710e⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Channel_Operator, seg_0573de, seg_0573e0

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with B_Constant;
with Bls_Constant;  
with Transport;
with Transport_Defs;
with Byte_Defs;
with Connection_Def;
with Utils;  
with Task_Io;
package body Channel_Operator 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 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 Receive (O : in out Object;
                       Msg : out Byte_Defs.Byte_String;
                       Result : out Boolean) is

    begin
        Result := False;
        Transport.Connect (O.Connect, O.Status, Time_Out_Delay);

        if Transport.Is_Connected (O.Connect) then
            --Transport.Receive (O.Connect, O.Status, Msg, O.Count);
            Transport.Receive (Connection => O.Connect,
                               Status => O.Status,
                               Data => Msg,
                               Count => O.Count,
                               Max_Wait => Duration'Last);
            Transport.Disconnect (O.Connect);
            Task_Io.Put_Line (Transport_Defs.Image (O.Status));
            Result := True;
        end if;

    end Receive;
    procedure Init (O : in out Object;
                    S : Transport_Defs.Socket_Id :=
                       Transport_Defs.Null_Socket_Id;
                    H : Transport_Defs.Host_Id := Transport_Defs.Null_Host_Id;
                    Result : out Boolean) is
    begin  
        Transport.Open (O.Connect, O.Status, Bls_Constant.Protocole, S);  
        O.Socket (1 .. Bls_Constant.Size_Of_Our_Socket_Id) :=
           Transport.Local_Socket (Connection => O.Connect);
        O.Host := Transport.Local_Host (O.Connect);
        Result := Transport.Is_Open (Connection => O.Connect);

    end Init;  
    procedure Close (O : in out Object) is
    begin  
        Transport.Close (O.Connect);
    end Close;
end Channel_Operator;

E3 Meta Data

    nblk1=3
    nid=0
    hdr6=6
        [0x00] rec0=23 rec1=00 rec2=01 rec3=030
        [0x01] rec0=16 rec1=00 rec2=03 rec3=094
        [0x02] rec0=0c rec1=00 rec2=02 rec3=000
    tail 0x217642ca087c74fa05579 0x42a00088462060003