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

⟦905ddfa97⟧ TextFile

    Length: 1558 (0x616)
    Types: TextFile
    Names: »B«

Derivation

└─⟦bfaa708f6⟧ Bits:30000531 8mm tape, Rational 1000, INSIGHT 1_3_0
    └─ ⟦c51948655⟧ »DATA« 
        └─⟦266b31e86⟧ 
            └─⟦this⟧ 

TextFile

with Next_Token_Scanner;
with Io;  
with Message;
with Client;
with Network;
package body Message_Test_Driver is

    procedure Start (In_File : String) is
        F : Io.File_Type;
        Pkt : Message.Packet;  
        Source_Id, Dest_Id : Client.Id;
    begin  
        Message.Initialize (Pkt, Client.Nil);
        Io.Open (F, Io.In_File, In_File);
        while not Io.End_Of_File (F) loop
            declare
                File_Line : constant String := Io.Get_Line (F);
                Line : String (File_Line'Range) := File_Line;
                Pos : Natural := Line'First;
                function Token is new Next_Token_Scanner (Pos, Line);
                T1 : constant String := Token;
                T2 : constant String := Token;
                T3 : constant String := Token;
            begin
                if T1 /= "" and then T1 /= "--" then
                    -- line format is "Dest Source Message"
                    Dest_Id := Client.Get_Id (T1);
                    Source_Id := Client.Get_Id (T2);
                    Message.Initialize (Pkt, Source_Id);
                    Message.Set_Destination (Pkt, Dest_Id);
                    Message.Set_Body (Pkt, T3);
                    Network.Send (Pkt);
                end if;
            end;
            delay 5.0;
        end loop;
    end Start;


    procedure Divert_Output is
    begin
        [statement]
    end Divert_Output;


    procedure Send_Packet (Pkt : Message.Packet) is
    begin
        Network.Send (Pkt);
    end Send_Packet;
end Message_Test_Driver;