|
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: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Broker, seg_01671b
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Text_Io; with Machine_Name; with Program; with String_Utilities; with Unbounded_String; package body Broker is package Su renames String_Utilities; package Us is new Unbounded_String (Default_Maximum_Length => 20); type Service is record Class : Us.Variable_String; Operation : Us.Variable_String; Profile : Us.Variable_String; Command : Us.Variable_String; Host : Us.Variable_String; end record; Services : array (Natural range 0 .. 9999) of Service; procedure Register_Service (Class : String; Operation : String; Profile : String; Command : String; Host : String) is I : Integer := Su.Hash_String (S => Class & Operation); --[ambiguous] begin if Us.Image (Services (I).Class) /= "" then Text_Io.Put_Line ("*** Unable to register service " & Class & "." & Operation); Text_Io.Put_Line ("*** Service ID " & Integer'Image (I) & " already allocated"); else Services (I) := Service'(Class => Us.Value (Class), Operation => Us.Value (Operation), Profile => Us.Value (Profile), Command => Us.Value (Command), Host => Us.Value (Host)); end if; end Register_Service; procedure Complete_Service (Class : String; Operation : String; Parameters : String) is I : Integer := Su.Hash_String (S => Class & Operation); Local_Service : Boolean := Us.Image (Services (I).Host) = Machine_Name; Has_Parameter : Boolean := Us.Image (Services (I).Profile) /= ""; begin if Local_Service then Program.Run_Job (S => Us.Image (Services (I).Command) & "(""" & Parameters & """)", Debug => False, Context => "$", After => 0.0, Options => "", Response => "<PROFILE>"); else Text_Io.Put_Line (Item => "remote executing " & Us.Image (Services (I).Command) & " on " & Us.Image (Services (I).Host)); end if; end Complete_Service; procedure Show_Registration is begin for I in Services'Range loop if Us.Image (Services (I).Host) /= "" then Text_Io.Put_Line ("---- registered services ----"); Text_Io.Put_Line ("class = " & Us.Image (Services (I).Class)); Text_Io.Put_Line ("operation = " & Us.Image (Services (I).Operation)); Text_Io.Put_Line ("profile = " & Us.Image (Services (I).Profile)); Text_Io.Put_Line ("command = " & Us.Image (Services (I).Command)); Text_Io.Put_Line ("host = " & Us.Image (Services (I).Host)); end if; end loop; end Show_Registration; end Broker;
nblk1=6 nid=2 hdr6=a [0x00] rec0=1f rec1=00 rec2=01 rec3=010 [0x01] rec0=14 rec1=00 rec2=05 rec3=012 [0x02] rec0=07 rec1=00 rec2=06 rec3=00c [0x03] rec0=14 rec1=00 rec2=03 rec3=07c [0x04] rec0=08 rec1=00 rec2=04 rec3=000 [0x05] rec0=41 rec1=99 rec2=36 rec3=7f7 tail 0x215120fd48335683dc524 0x42a00088462060003 Free Block Chain: 0x2: 0000 00 00 00 06 80 03 20 20 20 03 20 20 20 20 20 20 ┆ ┆