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

⟦48df002cf⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Parametres, seg_04cca8, seg_04cd8c

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



package body Parametres is
    function Set (Parm_Tempo : in Natural;
                  Parm_Apb : in Apb;
                  Parm_Veille : in Veille;
                  Parm_Entree_Tor : in Entree_Tor;
                  Parm_Evenements : in Evenement) return Object is
    begin
        return Object'(P_Tempo => Parm_Tempo,
                       P_Apb => Parm_Apb,
                       P_Veille => Parm_Veille,
                       P_Entree_Tor => Parm_Entree_Tor,
                       P_Evenements => Parm_Evenements);
    end Set;


    procedure Get (Les_Parametres : in Object;
                   Parm_Tempo : out Natural;
                   Parm_Apb : out Apb;
                   Parm_Veille : out Veille;
                   Parm_Entree_Tor : out Entree_Tor;
                   Parm_Evenements : out Evenement) is
    begin
        Parm_Tempo := Les_Parametres.P_Tempo;
        Parm_Apb := Les_Parametres.P_Apb;
        Parm_Veille := Les_Parametres.P_Veille;
        Parm_Entree_Tor := Les_Parametres.P_Entree_Tor;
        Parm_Evenements := Les_Parametres.P_Evenements;

    end Get;

    function Image (Les_Parametres : in Object) return String is
    begin
        return (Natural'Image (Les_Parametres.P_Tempo) & " " &
                Apb'Image (Les_Parametres.P_Apb) & " " &
                Veille'Image (Les_Parametres.P_Veille) & " " &
                Entree_Tor'Image (Les_Parametres.P_Entree_Tor) & " " &
                Evenement'Image (Les_Parametres.P_Evenements));
    end Image;
    function Image (Les_Parametres : in Object) return Mt.Bs_Access is
        Str : Mt.Bs_Access := new Mt.Byte_String (1 .. 5);  
    begin
        Str (1) := Les_Parametres.P_Tempo;
        if Les_Parametres.P_Apb = Inactif then
            Str (2) := 16#17#;
        else
            Str (2) := 16#16#;
        end if;
        if Les_Parametres.P_Veille = En_Service then
            Str (3) := 16#19#;
        else
            Str (3) := 16#18#;
        end if;  
        case Les_Parametres.P_Entree_Tor is
            when Bp =>
                Str (4) := 16#1A#;
            when Boucle =>
                Str (4) := 16#1B#;
            when Contact =>
                Str (4) := 16#1C#;
            when Rien =>
                null;
        end case;

        if Les_Parametres.P_Evenements = Anomalies then
            Str (5) := 16#21#;
        else
            Str (5) := 16#20#;
        end if;
        return (Str);

    end Image;
    function Value (The_Byte_String : in Mt.Byte_String) return Object is
        Parms : Object := (P_Tempo => The_Byte_String (1),
                           P_Apb => Actif,
                           P_Veille => En_Veille,
                           P_Entree_Tor => Bp,
                           P_Evenements => Tous);
    begin
        if The_Byte_String (2) = 16#17# then
            Parms.P_Apb := Inactif;
        end if;
        if The_Byte_String (3) = 16#19# then
            Parms.P_Veille := En_Service;
        end if;  
        case The_Byte_String (4) is
            when 16#1A# =>
                Parms.P_Entree_Tor := Bp;
            when 16#1B# =>
                Parms.P_Entree_Tor := Boucle;
            when 16#1C# =>
                Parms.P_Entree_Tor := Contact;
            when others =>
                Parms.P_Entree_Tor := Bp; -- ne sert a rien;
        end case;
        if The_Byte_String (5) = 16#21# then
            Parms.P_Evenements := Anomalies;
        end if;
        return (Parms);

    exception
        when Constraint_Error =>
            return Zero;
    end Value;

    function Zero return Object is
    begin
        return Object'(P_Tempo => 0,
                       P_Apb => Rien,
                       P_Veille => Rien,
                       P_Entree_Tor => Rien,
                       P_Evenements => Rien);
    end Zero;
end Parametres;

E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=1a rec1=00 rec2=01 rec3=054
        [0x01] rec0=1a rec1=00 rec2=02 rec3=008
        [0x02] rec0=1f rec1=00 rec2=03 rec3=004
        [0x03] rec0=1f rec1=00 rec2=04 rec3=012
        [0x04] rec0=01 rec1=00 rec2=05 rec3=000
    tail 0x217540cee874f6e6ea30e 0x42a00088462060003