|
|
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 Identifier, seg_0529c0
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Bounded_String_Generic;
with Text_Io;
package body Identifier is
package Bs is new Bounded_String_Generic (Size => 80);
Name : String (1 .. 80);
Count : Integer;
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
Text_Io.Put ("hostname of the broker => ");
Text_Io.Get_Line (Item => Name, Last => Count);
Ids (Broker).Host := Bs.Value (Name (Name'First .. Name'First + Count));
Ids (Broker).Socket := 2605;
end Identifier;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=2b rec1=00 rec2=01 rec3=00c
[0x01] rec0=00 rec1=00 rec2=02 rec3=008
[0x02] rec0=2e rec1=00 rec2=03 rec3=016
[0x03] rec0=01 rec1=00 rec2=04 rec3=000
tail 0x2154bb3a687a07ff8e479 0x42a00088462060003