DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦d844faa71⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body First_Behavior, seg_0525a0

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Behavior;
with Method;
with Message;
with Message_Transport;
with Parameter;
with Signature;
with Text_Io;

use Text_Io;
package body First_Behavior is

    Id : Behavior.Object;

    procedure Register (Host : String; Socket : Message_Transport.Socket) is
    begin
        Text_Io.Put_Line ("Host => " & Host);
        Text_Io.Put_Line ("socket => " & Integer'Image (Integer ((Socket))));
        Id := Behavior.Register (Host, Socket);
    end Register;


    procedure Process_Message (M : String) is
    begin
        Put_Line ("process message: " & M);
    end Process_Message;


    procedure Transport_Start is new Message_Transport.Start_Server
                                        (Register_Service => Register,
                                         Receive_Callback => Process_Message);

    task Server is
        entry Start;
    end Server;

    task body Server is
    begin
        accept Start;
        Transport_Start (Local_Socket => 0, Buffer_Size => 1024);
    end Server;

    procedure Start is
        P1 : Parameter.Object;
        P2 : Parameter.Object;
        S : Signature.Object;
        M : Method.Object;

        Mes1 : Message.Object;  
        Mes2 : Message.Object;  
        Mes3 : Message.Object;  
        Mes4 : Message.Object;  
        Status : Message_Transport.Status_Code;
    begin
        Server.Start;
        P1 := Parameter.Create
                 (Name => "message", Class => "string", Value => "hello world");
        P2 := Parameter.Create (Name => "message",
                                Class => Parameter.Void,
                                Value => Parameter.Void);

        S := Signature.Create;  
        Signature.Add (To_Signature => S,
                       The_Parameter => P1,
                       At_Position => 1);
        Signature.Add (To_Signature => S,
                       The_Parameter => P2,
                       At_Position => 2);

        M := Method.Create (Name => "Send", Signature => S);

        Mes1 := Message.Create (Class => Message.Subscription,
                                Addressee => 0,
                                Sender => 123,
                                Method => M);

        Mes2 := Message.Create (Class => Message.Publication,
                                Addressee => 0,
                                Sender => 444,
                                Method => M);

        Mes4 := Message.Create (Class => Message.Publication,
                                Addressee => 0,
                                Sender => 68,
                                Method => M);

        Mes3 := Message.Create (Class => Message.Request,
                                Addressee => 0,
                                Sender => 140763,
                                Method => M);

        Put_Line (Message.Image (Message.Value (Message.Image (Mes1))));
        Message_Transport.Put (Message => Message.Image (Mes1),
                               Remote_Host => "Ancolie",
                               Remote_Socket => 2605,
                               Number_Of_Retry => 1,
                               Retry_Delay => 0.1,
                               Status => Status);
        Put_Line (Message_Transport.Status_Code'Image (Status));


        Put_Line (Message.Image (Message.Value (Message.Image (Mes2))));
        Message_Transport.Put (Message => Message.Image (Mes2),
                               Remote_Host => "Ancolie",
                               Remote_Socket => 2605,
                               Number_Of_Retry => 1,
                               Retry_Delay => 0.1,
                               Status => Status);
        Put_Line (Message_Transport.Status_Code'Image (Status));

        Put_Line (Message.Image (Message.Value (Message.Image (Mes4))));
        Message_Transport.Put (Message => Message.Image (Mes4),
                               Remote_Host => "Ancolie",
                               Remote_Socket => 2605,
                               Number_Of_Retry => 1,
                               Retry_Delay => 0.1,
                               Status => Status);
        Put_Line (Message_Transport.Status_Code'Image (Status));

        Mes1 := Message.Create (Class => Message.Notification,
                                Addressee => 0,
                                Sender => 428,
                                Method => M);

        Put_Line (Message.Image (Message.Value (Message.Image (Mes1))));
        Message_Transport.Put (Message => Message.Image (Mes1),
                               Remote_Host => "Ancolie",
                               Remote_Socket => 2605,
                               Number_Of_Retry => 1,
                               Retry_Delay => 0.1,
                               Status => Status);
        Put_Line (Message_Transport.Status_Code'Image (Status));

        Put_Line (Message.Image (Message.Value (Message.Image (Mes3))));
        Message_Transport.Put (Message => Message.Image (Mes3),
                               Remote_Host => "Ancolie",
                               Remote_Socket => 2605,
                               Number_Of_Retry => 1,
                               Retry_Delay => 0.1,
                               Status => Status);
        Put_Line (Message_Transport.Status_Code'Image (Status));


    end Start;




end First_Behavior;

E3 Meta Data

    nblk1=7
    nid=0
    hdr6=e
        [0x00] rec0=28 rec1=00 rec2=01 rec3=01e
        [0x01] rec0=03 rec1=00 rec2=07 rec3=000
        [0x02] rec0=1c rec1=00 rec2=02 rec3=04e
        [0x03] rec0=17 rec1=00 rec2=06 rec3=078
        [0x04] rec0=14 rec1=00 rec2=05 rec3=048
        [0x05] rec0=15 rec1=00 rec2=04 rec3=00e
        [0x06] rec0=10 rec1=00 rec2=03 rec3=000
    tail 0x2154baee687a073023834 0x42a00088462060003