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

⟦dbd5e6145⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Cl_35, seg_041e4f

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Time;
with Cl_35_Protocole;
with Text_Io;
with Conversion;


package body Cl_35 is


    procedure Create (The_Object : in out Cl_35.Object;
                      With_Adress : Cl_35.Adress) is
    begin
        Text_Io.Put ("Creation du lecteur d'adresse" & " " &
                     Natural'Image (Natural (With_Adress)) & " ... ");
        The_Object.Adress := With_Adress;
        Text_Io.Put_Line ("Ok");
    end Create;


    function Get_Adress (Of_Object : Cl_35.Object) return Cl_35.Adress is
    begin
        return Of_Object.Adress;
    end Get_Adress;


    procedure Set_Time (Of_Object : Cl_35.Object; To_Time : Time.Object) is
        Message : System.Byte_String (0 .. 4) :=
           (0 => Of_Object.Adress,
            1 => 16#23#,
            2 => Conversion.In_System_Byte
                    (Of_Object => Time.Get_Hour (To_Time)),
            3 => Conversion.In_System_Byte
                    (Of_Object => Time.Get_Minute (To_Time)),
            4 => Conversion.In_System_Byte
                    (Of_Object => Time.Get_Day (To_Time)));
        Error : Boolean := False;
    begin
        Text_Io.Put ("Mise a l'heure du lecteur d'adresse" &
                     Natural'Image (Natural (Get_Adress (Of_Object))) &
                     " a " & Time.Image (To_Time) & " ... ");
        Cl_35_Protocole.Send (The_Message => Message, Error_Status => Error);
        if Error = False then
            Text_Io.Put_Line ("Ok");
        else
            Text_Io.Put_Line ("Erreur dans l'envoi du message");
        end if;

    end Set_Time;


    function Get_Time (Of_Object : Cl_35.Object) return Time.Object is
        Message : System.Byte_String (0 .. 1) :=
           (0 => Of_Object.Adress, 1 => 16#24#);
        Answer : System.Byte_String (0 .. 2);
        Error : Boolean := False;
        Result : Time.Object;
    begin
        Cl_35_Protocole.Send (The_Request => Message,
                              With_Answer => Answer,
                              Error_Status => Error);
        if Error = False then
            Time.Create (The_Object => Result,
                         With_Hour => Natural (Answer (0)),
                         And_Minute => Natural (Answer (1)),
                         And_Day => Time.Day'Image
                                       (Time.Day'Val (Natural (Answer (2)))));

        else
            Time.Create (The_Object => Result,
                         With_Hour => 0,
                         And_Minute => 0,
                         And_Day => "Undefined");
        end if;
        return Result;
    end Get_Time;


    procedure Emergency_Open (Of_Object : Cl_35.Object) is
        Message : System.Byte_String (0 .. 1) :=
           (0 => Of_Object.Adress, 1 => 16#2C#);
        Error : Boolean := False;
    begin
        Text_Io.Put ("Ouverture d'urgence du lecteur d'adresse" &
                     Natural'Image (Natural (Get_Adress (Of_Object))) & "...");
        Cl_35_Protocole.Send (The_Message => Message, Error_Status => Error);
        if Error = False then
            Text_Io.Put_Line ("Ok");
        else
            Text_Io.Put_Line ("Erreur dans l'envoi du message");
        end if;
    end Emergency_Open;


end Cl_35;

E3 Meta Data

    nblk1=5
    nid=2
    hdr6=8
        [0x00] rec0=22 rec1=00 rec2=01 rec3=05c
        [0x01] rec0=1a rec1=00 rec2=05 rec3=008
        [0x02] rec0=19 rec1=00 rec2=03 rec3=020
        [0x03] rec0=0b rec1=00 rec2=04 rec3=000
        [0x04] rec0=01 rec1=00 rec2=02 rec3=000
    tail 0x2153cdfdc862867e09f9d 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 07 80 01 3b 01 00 00 00 00 00 00 00 00  ┆      ;         ┆