Model (
   Model_Name  => EDF_Within_Priorities_Example,
   Model_Date  => 2004-12-01);

-- Processing Resources

Processing_Resource (
        Type => Regular_Processor,
        Name => Processor_1);

Scheduler (
        Type  => Primary_Scheduler,
        Name  => Processor_1,
        Host  => Processor_1,
        Policy =>         
           (Type => Fixed_Priority));

Scheduling_Server (
        Type                    => Regular,
        Name                    => EDF_Scheduler,
        Server_Sched_Parameters => (
                Type         => fixed_Priority_Policy,
                The_Priority => 2,
                Preassigned  => No),
        Scheduler               => Processor_1);

Scheduler (
        Type   => Secondary_Scheduler,
        Name   => EDF_Scheduler,
        Server => EDF_Scheduler,
        Policy =>         
           (Type => EDF));

-- Scheduling Servers

Scheduling_Server (
        Type                    => Regular,
        Name                    => Task_EDF21,
        Server_Sched_Parameters => (
                Type        => EDF_policy,
                Deadline    => 10,
                Preassigned => No),
        Scheduler               => EDF_Scheduler);

Scheduling_Server (
        Type                    => Regular,
        Name                    => Task_EDF22,
        Server_Sched_Parameters => (
                Type        => EDF_policy,
                Deadline    => 45,
                Preassigned => No),
        Scheduler               => EDF_Scheduler);


-- Operations


Operation (
        Type    => Simple,
        Name    => Task_21,
        Worst_Case_Execution_Time => 2);

Operation (
        Type    => Simple,
        Name    => Task_22,
        Worst_Case_Execution_Time => 5);


-- Transactions

Transaction (
        Type    => Regular,
        Name    => Tr_21,
        External_Events => (
                (Type   => Periodic,
                 Name   => E1,
                 Period => 10,
		 Max_Jitter => 8)),
        Internal_Events => (
                (Type   => regular,
                 name   => O1,
                 Timing_Requirements => (
                         Type             => Hard_Global_Deadline,
                         Deadline         => 12,
                         referenced_event => E1))),
        Event_Handlers => (
                (Type                => Activity,
                 Input_Event         => E1,
                 Output_Event        => O1,
                 Activity_Operation  => Task_21,
                 Activity_Server     => Task_EDF21)));

Transaction (
        Type    => Regular,
        Name    => Tr_22,
        External_Events => (
                (Type   => Periodic,
                 Name   => E2,
                 Period => 20,
		 Max_Jitter => 0)),
        Internal_Events => (
                (Type   => regular,
                 name   => O2,
                 Timing_Requirements => (
                         Type             => Hard_Global_Deadline,
                         Deadline         => 100,
                         referenced_event => E2))),
        Event_Handlers => (
                (Type                   => Activity,
                 Input_Event            => E2,
                 Output_Event           => O2,
                 Activity_Operation     => Task_22,
                 Activity_Server        => Task_EDF22)));

