|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Potentiometre, seg_05b80f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Carte_Es; with Ds1267; with Utils; with X9312; package body Potentiometre is function Creer (S1 : in Carte_Es.Numero_Sortie; S2 : in Carte_Es.Numero_Sortie; S3 : in Carte_Es.Numero_Sortie; Avec : in Composant) return Objet is L_Objet : Objet (Base => Avec); begin L_Objet.Valeur := Utils.Pourcent'First; case Avec is when Chip_X9312 => L_Objet.Chip_X9312 := X9312.Creer (Front => S1, Variation => S2, Selection => S3); when Chip_Ds1267 => L_Objet.Chip_Ds1267 := Ds1267.Creer (Horloge => S1, Donnee => S2, Reset => S3); end case; return L_Objet; end Creer; procedure Fixer (Un_Objet : in out Objet; A_La_Valeur : in Utils.Pourcent) is O : Objet renames Un_Objet; begin case O.Base is when Chip_X9312 => X9312.Fixer (Un_Objet => O.Chip_X9312, Depuis => O.Valeur, Vers => A_La_Valeur); when Chip_Ds1267 => Ds1267.Fixer (Un_Objet => O.Chip_Ds1267, Depuis => O.Valeur, Vers => A_La_Valeur); end case; end Fixer; procedure Augmenter (Un_Objet : in out Objet; De : in Utils.Pourcent := 1) is O : Objet renames Un_Objet; A_La_Valeur : Utils.Pourcent; use Utils; begin begin A_La_Valeur := O.Valeur + De; exception when others => A_La_Valeur := Utils.Pourcent'Last; end; case O.Base is when Chip_X9312 => X9312.Fixer (Un_Objet => O.Chip_X9312, Depuis => O.Valeur, Vers => A_La_Valeur); when Chip_Ds1267 => Ds1267.Fixer (Un_Objet => O.Chip_Ds1267, Depuis => O.Valeur, Vers => A_La_Valeur); end case; end Augmenter; procedure Diminuer (Un_Objet : in out Objet; De : in Utils.Pourcent := 1) is O : Objet renames Un_Objet; A_La_Valeur : Utils.Pourcent; use Utils; begin begin A_La_Valeur := O.Valeur - De; exception when others => A_La_Valeur := Utils.Pourcent'First; end; case O.Base is when Chip_X9312 => X9312.Fixer (Un_Objet => O.Chip_X9312, Depuis => O.Valeur, Vers => A_La_Valeur); when Chip_Ds1267 => Ds1267.Fixer (Un_Objet => O.Chip_Ds1267, Depuis => O.Valeur, Vers => A_La_Valeur); end case; end Diminuer; function Lire (Un_Objet : in Objet) return Utils.Pourcent is begin return Un_Objet.Valeur; end Lire; end Potentiometre;
nblk1=5 nid=2 hdr6=8 [0x00] rec0=1f rec1=00 rec2=01 rec3=012 [0x01] rec0=1c rec1=00 rec2=05 rec3=028 [0x02] rec0=1b rec1=00 rec2=03 rec3=062 [0x03] rec0=0b rec1=00 rec2=04 rec3=000 [0x04] rec0=08 rec1=00 rec2=05 rec3=000 tail 0x2176afc58894b4dab0943 0x42a00088462060003 Free Block Chain: 0x2: 0000 00 00 00 cb 80 01 3b 01 00 11 20 20 20 20 20 20 ┆ ; ┆