------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- This Ada package was automatically generated by the meta CASE tool Platypus -- see http://cassoulet.univ-brest.fr/mme -- -- Any modification of this file will be lost. -- Please see the "platypus" directory instead : it contains the Cheddar's -- model and its meta-model. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a free real time scheduling tool. -- This program provides services to automatically check temporal constraints -- of real time tasks. -- -- Copyright (C) 2002-2009 Frank Singhoff -- Cheddar is developed by the LISYC Team, University of Brest -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : F. Singhoff (singhoff@univ-brest.fr) -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ WITH Simulations; USE Simulations; WITH Simulations.Extended; USE Simulations.Extended; -- Generated from the following Cheddar program : -- -- --start_section : -- partition_duration : array (tasks_range) of integer; -- dynamic_priority : array (tasks_range) of integer; -- number_of_partition : integer :=2; -- current_partition : integer :=0; -- time_partition : integer :=0; -- i : integer; -- partition_duration(0):=2; -- partition_duration(1):=4; -- time_partition:=partition_duration(current_partition); -- dynamic_priority:=0; --end section; -- -- --priority_section : -- if time_partition=0 -- then current_partition:=(current_partition+1) mod number_of_partition; -- time_partition:=partition_duration(current_partition); -- end if; -- -- for i in tasks_range loop -- if tasks.task_partition(i)=current_partition -- then dynamic_priority(i):=tasks.priority(i); -- else dynamic_priority(i):=0; -- tasks.ready(i):=false; -- end if; -- end loop; -- time_partition:=time_partition-1; --end section; -- -- --election_section : -- return max_to_index(dynamic_priority); --end section; PACKAGE Scheduler.User_Defined.Generated IS TYPE Generated_User_Defined_Scheduler IS ABSTRACT NEW User_Defined_Scheduler WITH PRIVATE; TYPE Generated_User_Defined_Scheduler_Ptr IS ACCESS ALL Generated_User_Defined_Scheduler'Class; PROCEDURE Run_Start_Section ( My_Scheduler : IN OUT Generated_User_Defined_Scheduler; Processor_Name : IN Unbounded_String; Msg : IN OUT Unbounded_String); PROCEDURE Run_Priority_Section ( My_Scheduler : IN OUT Generated_User_Defined_Scheduler; Si : IN OUT Scheduling_Information; Current_Time : IN Natural; Processor_Name : IN Unbounded_String; My_Dependencies : IN Tasks_Dependencies_Ptr; Msg : IN OUT Unbounded_String); PROCEDURE Run_Election_Section ( My_Scheduler : IN OUT Generated_User_Defined_Scheduler; Si : IN OUT Scheduling_Information; Current_Time : IN Natural; Processor_Name : IN Unbounded_String; My_Dependencies : IN Tasks_Dependencies_Ptr; With_Offsets : IN Boolean; With_Precedencies : IN Boolean; With_Resources : IN Boolean; Elected : IN OUT Tasks_Range; No_Task : IN OUT Boolean); PRIVATE TYPE Generated_User_Defined_Scheduler IS ABSTRACT NEW User_Defined_Scheduler WITH RECORD -- Time when this package was generated -- Generated_On : Unbounded_String := To_Unbounded_String ("08/10/07"); -- partition_duration : array (tasks_range) of integer; Sc_Partition_Duration : Integer_Table; -- dynamic_priority : array (tasks_range) of integer; Sc_Dynamic_Priority : Integer_Table; -- number_of_partition : integer; Sc_Number_Of_Partition : Integer; -- current_partition : integer; Sc_Current_Partition : Integer; -- time_partition : integer; Sc_Time_Partition : Integer; -- i : integer; Sc_I : Integer; END RECORD; END Scheduler.User_Defined.Generated ;