DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦50cb97b09⟧ TextFile

    Length: 1736 (0x6c8)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Bounded_String_Generic;

package body Identifier 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;