|
|
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: 3072 (0xc00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package body Server, seg_05267f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Behavior_Defs;
with Behavior;
with Behavior_Exception;
with Message_Transport;
package body Server is
This : Identifier.Object; -- set once the behavior has been identified
Registered : Boolean := False;
function Get_Identity return Identifier.Object is
begin
if not Registered then
raise Behavior_Exception.Not_Yet_Registered_Error;
end if;
return This;
end Get_Identity;
procedure Process_Message (M : String) is
begin
Process_Message (Message.Value (M));
end Process_Message;
generic
with procedure Identify (M : String;
Behavior : out Identifier.Object;
Registered : out Boolean);
function Identified_Generic (M : String) return Boolean;
function Identified_Generic (M : String) return Boolean is
begin
Identify (M => M, Behavior => This, Registered => Registered);
return Registered;
end Identified_Generic;
function Identified is new Identified_Generic (Behavior_Defs.Identify);
procedure Ready_To_Receive is
begin
Publish (Self => Get_Identity);
end Ready_To_Receive;
procedure Transport_Start is
new Behavior.Start_Server (Register_Service =>
Behavior_Defs.Register_Service,
Service_Identified => Identified,
Ready_To_Receive => Ready_To_Receive,
Receive_Callback => Process_Message);
procedure Start is
begin
Transport_Start (Local_Socket => 0,
Buffer_Size => 1024,
Wait_For_Identification => True);
end Start;
end Server;
nblk1=2
nid=0
hdr6=4
[0x00] rec0=25 rec1=00 rec2=01 rec3=070
[0x01] rec0=1e rec1=00 rec2=02 rec3=001
tail 0x2154bb0f887a07457c722 0x42a00088462060003