DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦827c4d880⟧ TextFile

    Length: 2116 (0x844)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Behavior_Defs;
with Identifier;
with Method;
with Message;
with Message_Transport;
with Parameter;
with Server;
with Signature;
with Text_Io;

use Text_Io;
package body Log_Server is

    procedure Publish (Self : Identifier.Object);

    procedure Process_Message (Message : Standard.Message.Object);


    package S is new Server (Publish, Process_Message);




    procedure Publish (Self : Identifier.Object) is
        Status : Message_Transport.Status_Code;
        use Message_Transport;
    begin
        Behavior_Defs.Send_Message
           (Message => Standard.Message.Create
                          (Class => Standard.Message.Publication,
                           Addressee => Identifier.Hash (Identifier.Broker),
                           Sender => Identifier.Hash (S.Get_Identity),
                           Method => "log_line",
                           Parameter1_Name => "display",
                           Parameter1_Class => "string",
                           Parameter1_Value => "grenouille:0",
                           Parameter2_Name => "message",
                           Parameter2_Class => "string",
                           Parameter2_Value => Parameter.Void),
            Status => Status);

        if Status = Ok then
            Put_Line ("+++ Publication successful");
        else
            Put_Line ("*** Publication failed");
        end if;

    end Publish;


    procedure Process_Message (Message : Standard.Message.Object) is
        Met : Method.Object := Standard.Message.Get_Method (Message);
        Sig : Signature.Object := Method.Get_Signature (Met);
        Iter : Signature.Iterator;
        Par : Parameter.Object;
    begin
        if Method.Get_Name (Met) = "LOG_LINE" then
            Signature.Init (Iter, Sig);
            Signature.Next (Iter);
            Signature.Next (Iter);
            Par := Signature.Value (Iter);
            Put_Line (Parameter.Get_Value (Par));
        end if;

    end Process_Message;


    procedure Start is
    begin
        Put_Line ("+++ starting log");
        S.Start;
    end Start;
end Log_Server;