|
|
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: 11264 (0x2c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Behavior_Old, seg_0525bb
└─⟦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 Identifier;
with Message_New;
with Message_Transport;
with Method;
with Parameter;
with Signature;
with Text_Io;
package body Behavior_Old is
This : Identifier.Object; -- set once the behavior has been identified
Registered : Boolean := False;
-- procedure Register_Service (Host : String;
-- Socket : Message_Transport.Socket) is separate;
procedure Register_Service (Stream : out Message_Transport.Stream_Id);
function Identified (M : String) return Boolean is separate;
procedure Process_Message (M : String) is
begin
Process_Message (Message_New.Value (M));
end Process_Message;
procedure Transport_Start is new Message_Transport.Start_Server
(Register_Service => Register_Service,
Service_Identified => Identified,
Ready_To_Receive => Ready_To_Receive,
Receive_Callback => Process_Message);
task Server is
entry Start;
pragma Os_Task (0); --[to get non blocking socket reads]
end Server;
task body Server is
begin
Text_Io.Put_Line ("Behavior body Server accept Start");
accept Start;
Text_Io.Put_Line ("Behavior body Server Transport_Start");
Transport_Start (Local_Socket => 0, Buffer_Size => 1024);
--
-- when Local_Socket is 0 the transport layer will invent one
end Server;
procedure Send_Message (Message : Standard.Message_New.Object;
Status : out Message_Transport.Status_Code) is
Addressee : Identifier.Object :=
Identifier.Value (Standard.Message_New.Get_Addressee (Message));
use Standard.Message_New;
begin
Text_Io.Put_Line ("Behavior send_message old");
if not Registered then
raise Not_Yet_Registered_Error;
end if;
-- if Standard.Message_New.Get_Class (Message) =
-- Standard.Message_New.Forward then
-- Message_Transport.Put
-- (Message => Standard.Message_New.Image (Message),
-- Remote_Host => Identifier.Get_Host (Identifier.Broker),
-- Remote_Socket => Identifier.Get_Socket (Identifier.Broker),
-- Number_Of_Retry => 10,
-- Retry_Delay => 0.1,
-- Status => Status);
-- else
-- Message_Transport.Put
-- (Message => Standard.Message_New.Image (Message),
-- Remote_Host => Identifier.Get_Host (Addressee),
-- Remote_Socket => Identifier.Get_Socket (Addressee),
-- Number_Of_Retry => 10,
-- Retry_Delay => 0.1,
-- Status => Status);
--
-- end if;
end Send_Message;
function Send_Message (Message : Standard.Message_New.Object)
return Standard.Message_New.Object is
begin
Text_Io.Put_Line ("Behavior send_message new");
return Message_New.Send (Message => Message);
end Send_Message;
function Get_Identity return Identifier.Object is
begin
Text_Io.Put_Line ("Behavior get_identity");
if not Registered then
raise Not_Yet_Registered_Error;
end if;
return This;
end Get_Identity;
begin
Text_Io.Put_Line ("Behavior begin");
Server.Start;
end Behavior_Old;
nblk1=a
nid=9
hdr6=a
[0x00] rec0=25 rec1=00 rec2=01 rec3=03e
[0x01] rec0=01 rec1=00 rec2=02 rec3=052
[0x02] rec0=25 rec1=00 rec2=05 rec3=034
[0x03] rec0=16 rec1=00 rec2=04 rec3=01e
[0x04] rec0=21 rec1=00 rec2=0a rec3=000
[0x05] rec0=12 rec1=00 rec2=0a rec3=000
[0x06] rec0=14 rec1=00 rec2=07 rec3=000
[0x07] rec0=14 rec1=00 rec2=07 rec3=000
[0x08] rec0=14 rec1=00 rec2=07 rec3=000
[0x09] rec0=14 rec1=00 rec2=07 rec3=001
tail 0x2154baf5287a073214778 0x42a00088462060003
Free Block Chain:
0x9: 0000 00 07 03 fc 80 0c 74 68 6f 64 2e 4f 62 6a 65 63 ┆ thod.Objec┆
0x7: 0000 00 03 01 fa 80 0c 53 6f 63 6b 65 74 20 28 49 64 ┆ Socket (Id┆
0x3: 0000 00 06 03 5c 80 4f 20 20 20 20 20 20 2d 2d 20 20 ┆ \ O -- ┆
0x6: 0000 00 08 03 fc 80 39 6f 6e 32 20 28 48 6f 73 74 20 ┆ 9on2 (Host ┆
0x8: 0000 00 00 03 fc 80 38 20 20 20 20 20 20 20 41 64 64 ┆ 8 Add┆