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

⟦d1eb42496⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Feu_Tricolore, seg_058c5f

Derivation

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

E3 Source Code



with Text_Io;
package body Feu_Tricolore is

    task Affichage is
        entry Affiche (N : in Natural; C : in Couleur_Du_Feu);
    end Affichage;

    task body Affichage is
    begin
        loop
            select
                accept Affiche (N : in Natural; C : in Couleur_Du_Feu) do
                    Text_Io.Put ("feu ");
                    Text_Io.Put (Natural'Image (N));
                    case C is
                        when Rouge =>
                            Text_Io.Put_Line (" rouge");
                        when Orange =>
                            Text_Io.Put_Line (" orange");
                        when Vert =>
                            Text_Io.Put_Line (" vert");
                        when Orange_Clignotant =>
                            Text_Io.Put_Line (" orange clignotant");
                    end case;
                end Affiche;
            or
                terminate;
            end select;
        end loop;
    end Affichage;

    procedure Stop (O : in Object) is  
    begin
        O.Arreter;
    end Stop;

    procedure Modifie_Mode (O : in Object; M : in Mode) is
    begin
        O.Changer_Mode (M);
    end Modifie_Mode;

    procedure Attribut_Numero (O : in Object; N : in Natural) is
    begin
        O.Changer_Numero (N);
    end Attribut_Numero;
    procedure Modifie_Delai
                 (O : in Object; C : in Couleur_Du_Feu; D : in Duration) is
    begin
        O.Changer_Delai (C, D);
    end Modifie_Delai;

    procedure Changer_Etat
                 (N : in Natural; E : in out Couleur_Du_Feu; M : in Mode) is
    begin
        if M = Jour then
            case E is
                when Rouge =>
                    E := Vert;
                when Orange | Orange_Clignotant =>
                    E := Rouge;
                when Vert =>
                    E := Orange;
            end case;
        else
            E := Orange_Clignotant;
        end if;
        Affichage.Affiche (N, E);
    end Changer_Etat;

    task body Object is
        Caract : Feu;
    begin
        while Caract.En_Marche = True loop
            select
                accept Arreter do
                    Caract.En_Marche := False;
                end Arreter;
            or
                accept Changer_Numero (N : in Natural) do
                    Caract.Numero := N;
                end Changer_Numero;
            or
                accept Changer_Mode (M : in Mode) do
                    Caract.De := M;
                end Changer_Mode;
            or
                accept Changer_Delai (C : in Couleur_Du_Feu; D : in Duration) do
                    Caract.Les_Delais (C) := D;
                end Changer_Delai;
            else
                if Caract.En_Marche = True then
                    delay Caract.Les_Delais (Caract.Etat);
                    Changer_Etat (Caract.Numero, Caract.Etat, Caract.De);
                end if;
            end select;
        end loop;
    end Object;
end Feu_Tricolore;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1e rec1=00 rec2=01 rec3=016
        [0x01] rec0=1e rec1=00 rec2=02 rec3=036
        [0x02] rec0=1e rec1=00 rec2=03 rec3=044
        [0x03] rec0=0a rec1=00 rec2=04 rec3=000
    tail 0x21766a4ae88d65ee3d4a9 0x42a00088462060003