|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 3647 (0xe3f)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
with Text_Io;
with String_Utilities;
with Sequential_Io;
with Serial_Io;
with Window_Io;
package body Motor is
subtype Trame is String (1 .. 14);
subtype Numero_Ascii is String (1 .. 2);
subtype Commande_Ascii is String (1 .. 4);
subtype Dixieme_De_Seconde is Duration range 0.0 .. Duration'Last;
type Evenement is
record
Date_Relative : Natural;
Numero_Station : Numero;
Numero_Acteur : Numero;
Valeur : Commande := 0;
Transition : Commande := 0;
end record;
package Codes_Io is new Sequential_Io (Element_Type => Evenement);
Nom_Du_Fichier_Logique : Codes_Io.File_Type;
procedure Ouvrir_En_Lecture (Nom_Du_Fichier_Physique : String) is
begin
Codes_Io.Open (File => Nom_Du_Fichier_Logique,
Mode => Codes_Io.In_File,
Name => Nom_Du_Fichier_Physique);
Text_Io.Put ("Ouverture du fichier : ");
Text_Io.Put_Line (Nom_Du_Fichier_Physique);
end Ouvrir_En_Lecture;
procedure Ouvrir (Nom_Du_Fichier_Physique : String) is
begin
Codes_Io.Create (File => Nom_Du_Fichier_Logique,
Mode => Codes_Io.Out_File,
Name => Nom_Du_Fichier_Physique);
Text_Io.Put ("Creation du fichier : ");
Text_Io.Put_Line (Nom_Du_Fichier_Physique);
end Ouvrir;
procedure Fermer is
begin
Codes_Io.Close (File => Nom_Du_Fichier_Logique);
Text_Io.Put_Line ("Fermeture du fichier.");
end Fermer;
procedure Ecrire (Donnees : Evenement) is
begin
Text_Io.Put_Line ("Ecriture des donnees dans le fichier...");
Codes_Io.Write (Nom_Du_Fichier_Logique, Donnees);
end Ecrire;
procedure Inserer_Un_Evenement (Un_Temps_Relatif : Natural;
Une_Adresse_Station : Numero;
Numero_Acteur : Numero;
Valeur : Commande := 0;
Transition : Commande := 0) is
Un_Evenement : Evenement;
begin
Un_Evenement.Date_Relative := Un_Temps_Relatif;
Un_Evenement.Numero_Station := Une_Adresse_Station;
Un_Evenement.Numero_Acteur := Numero_Acteur;
Un_Evenement.Valeur := Valeur;
Un_Evenement.Transition := Transition;
Ecrire (Un_Evenement);
end Inserer_Un_Evenement;
procedure Inserer_Une_Action (Un_Temps_Relatif : Natural;
Une_Adresse_Station : Numero;
Une_Action : Action;
De : Commande := -1;
Vers : Commande := -1;
En : Commande := -1) is separate;
procedure Attendre (Source : Evenement) is
Temps_Relatif : Dixieme_De_Seconde;
begin
Temps_Relatif := Dixieme_De_Seconde (Source.Date_Relative) / 10;
delay Temps_Relatif;
end Attendre;
procedure Normaliser (Source : Standard_String.Object;
Destination : in out String) is separate;
function Fabriquer_La_Trame
(A_Partir : Evenement) return String is separate;
procedure Envoyer_Trame (Source : Evenement) is separate;
procedure Ouvrir_Menu (Menu_Window : in out
Window_Io.File_Type) is separate;
procedure Fermer_Menu (Menu_Window : in out
Window_Io.File_Type) is separate;
procedure Jouer (Nom_Du_Fichier_Physique : String) is separate;
end Motor;