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

⟦a0b97d91a⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Objet_Calendrier, seg_0560cc

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 Liste_Parametre;
with Task_Io;
with Bls_Constant;
with Parametre;  
with Request_To_Orb;
with Queue_Parametre;
with Bounded_String;
with Calendar;
package body Objet_Calendrier is

    My_Class : constant String (1 .. 10) := "calendrier";

    type Methods is (Date, Time);

    Method_Date : constant String (1 .. 4) := Methods'Image (Date);
    Method_Time : constant String (1 .. 4) := Methods'Image (Time);

    function Init return Boolean is  
        Resultat : Boolean;
        Parametres_Entree, Parametres_Sortie : Queue_Parametre.Queue;
    begin
        Request_To_Orb.Init (Bls_Constant.Orb_Socket,
                             Bls_Constant.Orb_Host, Resultat);
        if Resultat = True then
            Request_To_Orb.Registration (My_Class);
            Queue_Parametre.Initialize (Parametres_Entree);
            Queue_Parametre.Initialize (Parametres_Sortie);
            Queue_Parametre.Add (Parametres_Sortie,
                                 Parametre.Value ("the date"));
            Request_To_Orb.Publication
               (Method_Date, Parametres_Entree, Parametres_Sortie);
            Queue_Parametre.Initialize (Parametres_Entree);
            Queue_Parametre.Initialize (Parametres_Sortie);
            Queue_Parametre.Add (Parametres_Sortie,
                                 Parametre.Value ("the time"));

            Request_To_Orb.Publication
               (Method_Time, Parametres_Entree, Parametres_Sortie);
        end if;
        return Resultat;
    end Init;

    procedure Subscription (Id : in Parametre_Defs.Identificator;
                            Class_Name, Method_Name : String;
                            Liste : in Liste_Parametre.List) is
    begin
        null;
    end Subscription;

    procedure Server (Method : String;
                      In_Parametres : Liste_Parametre.List;
                      Out_Parametres : in out Liste_Parametre.List) is
        Date_Of_The_Day : Calendar.Time;
        The_Year : Calendar.Year_Number;
        The_Month : Calendar.Month_Number;
        The_Day : Calendar.Day_Number;
        The_Duration : Calendar.Day_Duration;
        Hour_Of_The_Day : Duration;
        The_Answer : Parametre.Variable_String;
    begin
        case Methods'Value (Method) is
            when Date =>  
                Task_Io.Put_Line ("j'ai recu une demande de date");
                Date_Of_The_Day := Calendar.Clock;
                Calendar.Split (Date_Of_The_Day, The_Year,
                                The_Month, The_Day, The_Duration);
                Bounded_String.Copy (The_Answer,
                                     Integer'Image (The_Day) & "/" &
                                        Integer'Image (The_Month) &
                                        "/" & Integer'Image (The_Year));  
                Task_Io.Put_Line ("la reponse est : " &
                                  Integer'Image (The_Day) & "/" &
                                  Integer'Image (The_Month) & "/" &
                                  Integer'Image (The_Year));
                Out_Parametres := Liste_Parametre.Make
                                     (The_Answer, Out_Parametres);
            when Time =>
                --           Date_Of_The_Day := Calendar.Clock;
                --           Calendar.Split (Date_Of_The_Day, The_Year,
                --                           The_Month, The_Day, The_Duration);
                --           Bounded_String.Copy
                --               (The_Answer, Calendar.Day_Duration'Image (The_Duration));
                --           List_Tempo := Liste_Parametre.Make (The_Answer, List_Tempo);
                --          Out_Parametres := List_Tempo;
                null;
        end case;
    end Server;

    procedure Close is
    begin
        Request_To_Orb.Unpublication (Method_Date);
        Request_To_Orb.Unpublication (Method_Time);
        Request_To_Orb.Unregistration;
        Request_To_Orb.Close;
    end Close;

end Objet_Calendrier;

E3 Meta Data

    nblk1=7
    nid=6
    hdr6=a
        [0x00] rec0=1e rec1=00 rec2=01 rec3=02c
        [0x01] rec0=18 rec1=00 rec2=07 rec3=016
        [0x02] rec0=13 rec1=00 rec2=03 rec3=074
        [0x03] rec0=14 rec1=00 rec2=05 rec3=05e
        [0x04] rec0=06 rec1=00 rec2=04 rec3=000
        [0x05] rec0=0f rec1=00 rec2=05 rec3=044
        [0x06] rec0=0f rec1=00 rec2=04 rec3=000
    tail 0x21761b3b487c353a3bb6f 0x42a00088462060003
Free Block Chain:
  0x6: 0000  00 02 00 44 80 22 20 20 20 20 20 20 20 49 6e 74  ┆   D "       Int┆
  0x2: 0000  00 00 00 05 00 02 20 20 02 20 20 20 20 20 20 20  ┆                ┆