-- Processing Resources

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> CPU_1,
        Max_Priority            => 100,
        Min_Priority            => 1,
        Max_Interrupt_Priority  => 110,
        Min_Interrupt_Priority  => 101);

-- Scheduling Servers

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> task_1,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_Policy,
		The_Priority		=> 30,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Isr_2,
	Server_Sched_Parameters		=> (
		Type		=> Interrupt_FP_Policy,
		The_Priority		=> 101),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> task_3,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_Policy,
		The_Priority		=> 10,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

-- Operations

Operation (
	Type 				=> Simple,
	Name 				=> a1,
	Worst_Case_Execution_Time 	=> 10);

Operation (
	Type 				=> Simple,
	Name 				=> i2,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> a3,
	Worst_Case_Execution_Time 	=> 120);

-- Transactions

Transaction (
	Type	=> Regular,
	Name	=> T_1,
	External_Events => (
		(Type 	=> Periodic,
		 Name 	=> E1,
		 Period => 25)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O1,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 25,
			 referenced_event => E1))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E1,
		 Output_Event 		=> O1,
		 Activity_Operation 	=> a1,
		 Activity_Server	=> task_1)));

Transaction (
	Type	=> Regular,
	Name	=> T_2,
	External_Events => (
		(Type 		=> Bursty,
		 Name 		=> E2,
                 Bound_Interval 	=> 200,
                 Max_Arrivals	=> 25)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O2,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 200,
			 referenced_event => E2))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E2,
		 Output_Event 		=> O2,
		 Activity_Operation 	=> i2,
		 Activity_Server	=> isr_2)));

Transaction (
	Type	=> Regular,
	Name	=> T_3,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E3,
		 Period 	=> 350)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> O3,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 350,
			 referenced_event => E3))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E3,
		 Output_Event 		=> O3,
		 Activity_Operation 	=> a3,
		 Activity_Server	=> Task_3)));
