DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦be7af0450⟧ TextFile

    Length: 3918 (0xf4e)
    Types: TextFile
    Names: »B«

Derivation

└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Unchecked_Conversion;
package body Frame is

    function Create_Request
                (The_Command : Command;
                 Addressing_Mode : Sensor_Addr_Mode;
                 Bit_Selection : Sensor_Bit_Selection) return Request is
    begin
        if Addressing_Mode = Slice then
            raise Constraint_Error;
        end if;
        return Request'(The_Command, Addressing_Mode, Bit_Selection);
    end Create_Request;

    function Create_Request
                (The_Command : Command;
                 Slice_Selection : Sensor_Slice_Selection) return Request is
    begin
        return Request'(The_Command, Slice, Slice_Selection);
    end Create_Request;

    function Create_Mode (Mean_Value : Mean;
                          Number_Of_Samples : Sample_Count;
                          Data_Format : Format;
                          Measure_Type : Measure) return Mode is
    begin
        return Mode'(Mean_Value, Number_Of_Samples, Data_Format, Measure_Type);
    end Create_Mode;

    function Create_N_Delta_T (Number_Of_Transmissions : Transmission_Count;
                               Period_Of_Transmissions : Transmission_Period)
                              return N_Delta_T is
    begin
        return N_Delta_T'(Number_Of_Transmissions, Period_Of_Transmissions);
    end Create_N_Delta_T;


    function Create_Task_Selection return Task_Selection is
    begin
        return Task_Selection'(others => False);
    end Create_Task_Selection;

    procedure Action_On_Task (T : in out Task_Selection;
                              Which_One : Task_Identification) is
    begin
        case Which_One is
            when 0 =>
                T.Task0_Active := True;
            when 1 =>
                T.Task1_Active := True;
            when 2 =>
                T.Task2_Active := True;
            when 3 =>
                T.Task3_Active := True;
            when 4 =>
                T.Task4_Active := True;
            when 5 =>
                T.Task5_Active := True;
            when 6 =>
                T.Task6_Active := True;
            when 7 =>
                T.Task7_Active := True;
        end case;
    end Action_On_Task;

    procedure No_Action_On_Task (T : in out Task_Selection;
                                 Which_One : Task_Identification) is
    begin
        case Which_One is
            when 0 =>
                T.Task0_Active := False;
            when 1 =>
                T.Task1_Active := False;
            when 2 =>
                T.Task2_Active := False;
            when 3 =>
                T.Task3_Active := False;
            when 4 =>
                T.Task4_Active := False;
            when 5 =>
                T.Task5_Active := False;
            when 6 =>
                T.Task6_Active := False;
            when 7 =>
                T.Task7_Active := False;
        end case;
    end No_Action_On_Task;


    function Create_Address
                (Station : Station_Identification;
                 Station_Task : Task_Identification) return Address is
    begin
        return Address'(Station, Station_Task);
    end Create_Address;

    function Get_Station (A : Address) return Station_Identification is
    begin
        return A.Station;
    end Get_Station;

    function Get_Task (A : Address) return Task_Identification is
    begin
        return A.Task_Number;
    end Get_Task;

    function Is_Acknowledge (M : Message) return Boolean is
        Acknowledge : constant Message := 255;
    begin
        return M = Acknowledge;
    end Is_Acknowledge;

    function As_Address (M : Message) return Address is
        function Cvt is new Unchecked_Conversion
                               (Source => Message, Target => Address);
    begin
        return Cvt (M);
    end As_Address;

    function As_Natural (M : Message) return Natural is  
    begin
        return Natural (M);
    end As_Natural;

end Frame;