|
|
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 - metrics - download
Length: 14336 (0x3800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Choix_Trt, seg_04f7d1
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Trame_Ihm_68;
with Objet_Generic;
with Bdd;
with Text_Io;
with Lecteur_68;
with Lecteur_Zone_68;
with Acces_68;
with Plage_68;
with Carte_Groupe_68;
with Carte_68;
with General_Defs;
with Config_Cl35;
with Conversion;
package body Choix_Trt is
type T_Action_En_Cours is (Debut, Phase_De_Config, Fonctionnement_Normal);
Action_En_Cours : T_Action_En_Cours := Debut;
function Trame_Ihm_To_Objet_Generic
(Trame : Trame_Ihm_68.Object) return Objet_Generic.Object;
procedure Creation_Bdd (Trame : Trame_Ihm_68.Object);
procedure Modification_Bdd (Trame : Trame_Ihm_68.Object);
procedure Suppression_Bdd (Trame : Trame_Ihm_68.Object);
procedure Programmation_Config;
procedure Rapport_Cl35;
procedure Aiguillage (S : String) is
use Trame_Ihm_68;
Trame : Trame_Ihm_68.Object;
Aiguillage_Error : exception;
begin
Trame := Trame_Ihm_68.Value (S);
case Action_En_Cours is
when Debut =>
if Get_Action (Trame) = Config then
Action_En_Cours := Phase_De_Config;
else
raise Aiguillage_Error;
end if;
when Phase_De_Config =>
case Get_Action (Trame) is
when Creation =>
Text_Io.Put_Line ("ajout BDD : " & S);
Creation_Bdd (Trame);
when Suppression =>
Text_Io.Put_Line ("suppr BDD : " & S);
Suppression_Bdd (Trame);
when Modification =>
Text_Io.Put_Line ("modif Bdd : " & S);
Modification_Bdd (Trame);
when Fin_Config =>
Programmation_Config;
Action_En_Cours := Fonctionnement_Normal;
when others =>
raise Aiguillage_Error;
end case;
when Fonctionnement_Normal =>
case Get_Action (Trame) is
when Config =>
Action_En_Cours := Phase_De_Config;
when Rapport =>
Rapport_Cl35;
when others =>
raise Aiguillage_Error;
end case;
end case;
end Aiguillage;
function Trame_Ihm_To_Objet_Generic
(Trame : Trame_Ihm_68.Object) return Objet_Generic.Object is
O : Objet_Generic.Object;
begin
Objet_Generic.Create
(O => O,
Type_Objet =>
Objet_Generic.T_Type_Objet (Trame_Ihm_68.Get_Type_Objet (Trame)),
S => Trame_Ihm_68.Get_Chaine (Trame));
return O;
end Trame_Ihm_To_Objet_Generic;
procedure Creation_Bdd (Trame : Trame_Ihm_68.Object) is
begin
Bdd.Add_Item (Trame_Ihm_To_Objet_Generic (Trame));
end Creation_Bdd;
procedure Modification_Bdd (Trame : Trame_Ihm_68.Object) is
use Trame_Ihm_68;
Trame_Mod_Error : exception;
P : Natural;
Og1, Og2 : Objet_Generic.Object;
S : constant String := Get_Chaine (Trame);
Lecteur1, Lecteur2 : Lecteur_68.Object;
Carte1, Carte2 : Carte_68.Object;
Plage1, Plage2 : Plage_68.Object;
Acces1, Acces2 : Acces_68.Object;
L_Z1, L_Z2 : Lecteur_Zone_68.Object;
C_G1, C_G2 : Carte_Groupe_68.Object;
begin
case Get_Type_Objet (Trame) is
when Lecteur =>
Lecteur_68.Value (S, Lecteur1, P);
Lecteur_68.Value (S (P + 1 .. S'Last), Lecteur2, P);
Objet_Generic.Create (Og1, Lecteur1);
Objet_Generic.Create (Og2, Lecteur2);
Bdd.Mod_Item (Item => Og1, Par => Og2);
when Plage =>
Plage_68.Value (S, Plage1, P);
Plage_68.Value (S (P + 1 .. S'Last), Plage2, P);
Objet_Generic.Create (Og1, Plage1);
Objet_Generic.Create (Og2, Plage2);
Bdd.Mod_Item (Item => Og1, Par => Og2);
when Acces =>
Acces_68.Value (S, Acces1, P);
Acces_68.Value (S (P + 1 .. S'Last), Acces2, P);
Objet_Generic.Create (Og1, Acces1);
Objet_Generic.Create (Og2, Acces2);
Bdd.Mod_Item (Item => Og1, Par => Og2);
when Carte =>
Carte_68.Value (S, Carte1, P);
Carte_68.Value (S (P + 1 .. S'Last), Carte2, P);
Objet_Generic.Create (Og1, Carte1);
Objet_Generic.Create (Og2, Carte2);
Bdd.Mod_Item (Item => Og1, Par => Og2);
when Lecteur_Zone =>
Lecteur_Zone_68.Value (S, L_Z1, P);
Lecteur_Zone_68.Value (S (P + 1 .. S'Last), L_Z2, P);
Objet_Generic.Create (Og1, L_Z1);
Objet_Generic.Create (Og2, L_Z2);
Bdd.Mod_Item (Item => Og1, Par => Og2);
when Carte_Groupe =>
Carte_Groupe_68.Value (S, C_G1, P);
Carte_Groupe_68.Value (S (P + 1 .. S'Last), C_G2, P);
Objet_Generic.Create (Og1, C_G1);
Objet_Generic.Create (Og2, C_G2);
Bdd.Mod_Item (Item => Og1, Par => Og2);
when Horaire =>
null;
when others =>
raise Trame_Mod_Error;
end case;
end Modification_Bdd;
procedure Suppression_Bdd (Trame : Trame_Ihm_68.Object) is
begin
Bdd.Rem_Item (Trame_Ihm_To_Objet_Generic (Trame));
end Suppression_Bdd;
procedure Programmation_Lecteur (Lecteur : Objet_Generic.Object) is
Lect : Lecteur_68.Object;
begin
Lect := Objet_Generic.Get_Lecteur (Lecteur);
Text_Io.Put_Line ("programmation lecteur :");
Text_Io.Put_Line (Conversion.Image_Hex
(Config_Cl35.Cl35_Parametre (Lect)));
Text_Io.Put_Line (Conversion.Image_Hex (Config_Cl35.Cl35_Site (Lect)));
end Programmation_Lecteur;
procedure Programmation_Plage (Lecteur : Objet_Generic.Object;
Plage : Objet_Generic.Object) is
Lec : Lecteur_68.Object;
Pla : Plage_68.Object;
begin
Lec := Objet_Generic.Get_Lecteur (Lecteur);
Pla := Objet_Generic.Get_Plage (Plage);
Text_Io.Put_Line ("Programmation plage : ");
Text_Io.Put_Line (Conversion.Image_Hex
(Config_Cl35.Cl35_Plage (Lec, Pla)));
end Programmation_Plage;
procedure Programmation_Carte (Lecteur : Objet_Generic.Object;
Carte : Objet_Generic.Object;
Plage : Objet_Generic.Object) is
Lec : Lecteur_68.Object;
Car : Carte_68.Object;
Pla : Plage_68.Object;
begin
Lec := Objet_Generic.Get_Lecteur (Lecteur);
Car := Objet_Generic.Get_Carte (Carte);
Pla := Objet_Generic.Get_Plage (Plage);
Text_Io.Put_Line ("Programmation carte : ");
Text_Io.Put_Line (Conversion.Image_Hex
(Config_Cl35.Cl35_Valide_Carte (Car, Pla, Lec)));
end Programmation_Carte;
procedure Programmation_Config is
use Objet_Generic;
use Bdd;
Lec, L_Z, Pla, Acc, C_G, Car : Objet_Generic.Object;
begin
First_Item (Lecteur);
while not End_Iter (Lecteur) loop
Lec := Current_Item (Lecteur);
Programmation_Lecteur (Lec);
Next_Item (Lecteur);
end loop;
First_Item (Acces);
while not End_Iter (Acces) loop
Acc := Current_Item (Acces);
First_Item (Lecteur_Zone, Acces_68.Get_Zone (Get_Acces (Acc)));
while not End_Iter (Lecteur_Zone) loop
L_Z := Current_Item (Lecteur_Zone);
First_Item (Plage, Lecteur_Zone_68.Get_Zone
(Get_Lecteur_Zone (L_Z)));
while not End_Iter (Plage) loop
Pla := Current_Item (Plage);
First_Item (Lecteur, Lecteur_Zone_68.Get_Lecteur
(Get_Lecteur_Zone (L_Z)));
if not End_Iter (Lecteur) then
Lec := Current_Item (Lecteur);
Programmation_Plage (Lecteur => Lec, Plage => Pla);
First_Item (Carte_Groupe,
Acces_68.Get_Groupe (Get_Acces (Acc)));
while not End_Iter (Carte_Groupe) loop
C_G := Current_Item (Carte_Groupe);
First_Item (Carte, Carte_Groupe_68.Get_Carte
(Get_Carte_Groupe (C_G)));
if not End_Iter (Carte) then
Car := Current_Item (Carte);
Programmation_Carte
(Lecteur => Lec, Carte => Car, Plage => Pla);
end if;
Next_Item (Carte_Groupe);
end loop;
end if;
Next_Item (Plage);
end loop;
Next_Item (Lecteur_Zone);
end loop;
Next_Item (Acces);
end loop;
end Programmation_Config;
procedure Rapport_Lecteur_Cl35 (Lecteur : Objet_Generic.Object) is
Lec : Lecteur_68.Object;
begin
Lec := Objet_Generic.Get_Lecteur (Lecteur);
Text_Io.Put_Line (Conversion.Image_Hex
(Config_Cl35.Cl35_Demande_Evenement (Lec)));
end Rapport_Lecteur_Cl35;
procedure Rapport_Cl35 is
use Bdd;
use Objet_Generic;
Lec : Objet_Generic.Object;
begin
Text_Io.Put_Line ("demande rapport : ");
First_Item (Lecteur);
while not End_Iter (Lecteur) loop
Lec := Current_Item (Lecteur);
Rapport_Lecteur_Cl35 (Lec);
Next_Item (Lecteur);
end loop;
end Rapport_Cl35;
end Choix_Trt;
nblk1=d
nid=0
hdr6=1a
[0x00] rec0=23 rec1=00 rec2=01 rec3=050
[0x01] rec0=03 rec1=00 rec2=03 rec3=012
[0x02] rec0=15 rec1=00 rec2=08 rec3=01c
[0x03] rec0=1c rec1=00 rec2=05 rec3=066
[0x04] rec0=18 rec1=00 rec2=06 rec3=01a
[0x05] rec0=13 rec1=00 rec2=0c rec3=046
[0x06] rec0=19 rec1=00 rec2=09 rec3=038
[0x07] rec0=15 rec1=00 rec2=0d rec3=040
[0x08] rec0=1e rec1=00 rec2=0a rec3=026
[0x09] rec0=0d rec1=00 rec2=02 rec3=032
[0x0a] rec0=19 rec1=00 rec2=04 rec3=02e
[0x0b] rec0=26 rec1=00 rec2=07 rec3=02a
[0x0c] rec0=03 rec1=00 rec2=0b rec3=000
tail 0x2154a957e877859e51050 0x42a00088462060003