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

⟦b1c7fa8fc⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Identifier_Old, seg_0525e6

Derivation

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

E3 Source Code



with Bounded_String_Generic;

package body Identifier_Old is

    package Bs is new Bounded_String_Generic (Size => 80);


    type Descriptor is
        record
            Host : Bs.Variable_String;
            Socket : Message_Transport.Socket := 0;
        end record;

    Ids : array (Identifier.Object range 1 .. 1024) of Descriptor;



    function Register (Host : String; Socket : Message_Transport.Socket)
                      return Identifier.Object is
        Id : Identifier.Object := 1;
    begin

        while Id in Ids'Range loop
            exit when Bs.Length (Ids (Id).Host) = 0;
            Id := Id + 1;
        end loop;

        Ids (Id).Host := Bs.Value (Host);
        Ids (Id).Socket := Socket;

        return Id;
    end Register;



    procedure Unregister (Id : Identifier.Object) is
    begin
        Bs.Free (V => Ids (Id).Host);
        Ids (Id).Socket := 0;
    end Unregister;



    function Get_Host (Id : Standard.Identifier.Object) return String is
    begin
        return Bs.Image (Ids (Id).Host);
    end Get_Host;



    function Get_Socket (Id : Standard.Identifier.Object)
                        return Message_Transport.Socket is
    begin
        return Ids (Id).Socket;
    end Get_Socket;



    function Hash (Id : Standard.Identifier.Object) return Natural is
    begin
        return Natural (Id);
    end Hash;



    function Broker return Identifier.Object is
    begin
        return 1;
    end Broker;



    function Value (Id : Natural) return Object is
    begin
        return Object (Id);
    end Value;

begin

    --[this should be read from some configuration file or so]

    Ids (Broker).Host := Bs.Value ("belladone");
    Ids (Broker).Socket := 2605;
end Identifier_Old;

E3 Meta Data

    nblk1=4
    nid=2
    hdr6=4
        [0x00] rec0=2d rec1=00 rec2=01 rec3=012
        [0x01] rec0=29 rec1=00 rec2=04 rec3=000
        [0x02] rec0=30 rec1=00 rec2=02 rec3=012
        [0x03] rec0=01 rec1=00 rec2=03 rec3=000
    tail 0x2154baffe87a07343a38f 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 03 03 fc 80 19 2e 4f 62 6a 65 63 74 29 20 72  ┆      .Object) r┆
  0x3: 0000  00 00 00 0c 80 06 69 66 69 65 72 3b 06 00 00 00  ┆      ifier;    ┆