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

⟦bfdfaeb77⟧ TextFile

    Length: 2187 (0x88b)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Serial_Io;
with Text_Io;
with Les_Types;
with Pkg_Agent_Generic;
with Pkg_Synchro;
package body Moteur is

    Nbr_Trame : Natural := 0;

    Nbr_Max_Trame : constant Natural := 1000;

    Tableau : Tableau_Trame (1 .. Nbr_Max_Trame);

    task T is
        entry Envoi (La_Trame : Les_Types.Ptr_String);
    end T;

    task body T is
        [declaration]
    begin
        loop
            accept Envoi (La_Trame : Les_Types.Ptr_String) do
                Serial_Io.Put (La_Trame.all, "/dev/tty0");
                Text_Io.Put_Line (La_Trame.all);

            end Envoi;

        end loop;

    end T;

    procedure Envoie_Trame (La_Trame : in out Les_Types.Ptr_String) is
    begin
        T.Envoi (La_Trame);

    end Envoie_Trame;

    package Agent_T is new Pkg_Agent_Generic (Object => Les_Types.Ptr_String,
                                              Operation => Envoie_Trame);


    function Construit_Trame
                (Le_Temps : Duration; La_Chaine : Les_Types.Ptr_String)
                return Trame is
        La_Trame : Trame;
    begin
        La_Trame.Temps := Le_Temps;
        La_Trame.Chaine := La_Chaine;
        return La_Trame;
    end Construit_Trame;

    procedure Ajoute_Trame_Dans_Tableau (Le_Temps : Duration;
                                         La_Chaine : Les_Types.Ptr_String) is
    begin
        Nbr_Trame := Nbr_Trame + 1;
        Tableau (Nbr_Trame) := Construit_Trame (Le_Temps, La_Chaine);
    end Ajoute_Trame_Dans_Tableau;

    procedure Go is

        Pool_Agents_Envoient_Trame : Agent_T.Pool (1 .. Nbr_Trame);

        The_Tab_Periode : Agent_T.Tableau_Periode (1 .. Nbr_Trame);
        The_Tab_Nbr_Cycle :
           Agent_T.Tableau_Nbr (1 .. Nbr_Trame) := (others => 1);
        The_Tab_Object : Agent_T.Tableau_Object (1 .. Nbr_Trame);


    begin
        for I in 1 .. Nbr_Trame loop
            The_Tab_Periode (I) := Tableau (I).Temps;
            The_Tab_Object (I) := Tableau (I).Chaine;
        end loop;

        Agent_T.Cycle (Pool_Agents_Envoient_Trame, The_Tab_Periode,
                       The_Tab_Nbr_Cycle, The_Tab_Object);
        Pkg_Synchro.Synchro.Lancer_Taches (Nbr_Trame);

    end Go;


end Moteur;