------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- This source file was automatically generated by Platypus -- see http://dossen.univ-brest.fr/apl -- -- 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 GNU GPL real-time scheduling analysis tool. -- This program provides services to automatically check schedulability and -- other performance criteria of real-time architecture models. -- -- Copyright (C) 2002-2016 Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285 laboratory, Université de Bretagne Occidentale -- -- Cheddar has been published in the "Agence de Protection des Programmes/France" in 2008. -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- The full list of contributors and sponsors can be found in AUTHORS.txt and SPONSORS.txt -- -- 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 : cheddar@listes.univ-brest.fr -- To post to this mailing list, you must be subscribed -- (see http//beru.univ-brest.fr/~singhoff/cheddar for details) -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Text_io; use Text_io; with unbounded_strings; use unbounded_strings; with primitive_xml_strings; use primitive_xml_strings; with Execution_Units; use Execution_Units.Execution_Units_Table_Package; use Execution_Units.Execution_Unit_Model_Type_io; with Offsets; use Offsets; use offsets.Offsets_Table_Package; with Parameters; use Parameters; use parameters.User_Defined_Parameters_Table_Package; with MILS_Security; use MILS_Security.MILS_Confidentiality_Level_Type_io; use MILS_Security.MILS_Integrity_Level_Type_io; use MILS_Security.MILS_Component_Type_io; use MILS_Security.MILS_Task_Type_io; Package Body Tasks is function XML_String(obj : in Tasks_Type) return Unbounded_String is begin return to_unbounded_string(Tasks_Type'image (obj) ); end XML_String; function XML_Ref_String (obj : in Tasks_Type) return Unbounded_String is begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function XML_String(obj : in Policies) return Unbounded_String is begin return to_unbounded_string(Policies'image (obj) ); end XML_String; function XML_Ref_String (obj : in Policies) return Unbounded_String is begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; -- --------= Generic_Task =-------- procedure Initialize(obj : in out Generic_Task) is begin initialize(Named_Object(obj)); obj.task_type := Periodic_Type; obj.cpu_name := empty_string; obj.address_space_name := empty_string; obj.core_name := empty_string; obj.capacity_model := LiuLayland_Execution_Unit; obj.capacity := 0; obj.energy_consumption := 0; obj.deadline := 0; obj.start_time := 0; obj.priority := 0; obj.blocking_time := 0; obj.policy := Sched_Fifo; obj.text_memory_size := 0; obj.text_memory_start_address := 0; obj.stack_memory_size := 0; obj.criticality := 0; obj.context_switch_overhead := 0; obj.cfg_name := empty_string; obj.cfg_relocatable := false; obj.cache_access_profile_name := empty_string; obj.mils_confidentiality_level := UnClassified; obj.mils_integrity_level := Low; obj.mils_component := SLS; obj.mils_task := Application; obj.mils_compliant := false; obj.access_memory_number := 0; obj.maximum_number_of_memory_request_per_job := 0; obj.seed := 0; obj.predictable := false; obj.object_type := Task_Object_Type; end Initialize; function Copy ( obj : in Generic_Task ) return Generic_Task_Ptr is New_Generic_Task : Generic_Task_Ptr; begin New_Generic_Task := new Generic_Task'(obj); return (New_Generic_Task); end Copy; function Copy ( obj : in Generic_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Generic_Task) is begin put(Named_Object(obj)); put("task_type: "); put(obj.task_type); put ( "; " ); put("cpu_name: "); put(obj.cpu_name); put ( "; " ); put("address_space_name: "); put(obj.address_space_name); put ( "; " ); put("core_name: "); put(obj.core_name); put ( "; " ); put("capacity_model: "); put(obj.capacity_model); put ( "; " ); put("capacity: "); standards_io.natural_io.put(obj.capacity); put ( "; " ); put("capacities: "); put(obj.capacities); put ( "; " ); put("qualities: "); put(obj.qualities); put ( "; " ); put("energy_consumption: "); standards_io.natural_io.put(obj.energy_consumption); put ( "; " ); put("deadline: "); standards_io.natural_io.put(obj.deadline); put ( "; " ); put("start_time: "); standards_io.natural_io.put(obj.start_time); put ( "; " ); put("priority: "); put(obj.priority); put ( "; " ); put("blocking_time: "); standards_io.natural_io.put(obj.blocking_time); put ( "; " ); put("policy: "); put(obj.policy); put ( "; " ); put("offsets: "); put(obj.offsets); put ( "; " ); put("text_memory_size: "); standards_io.natural_io.put(obj.text_memory_size); put ( "; " ); put("text_memory_start_address: "); standards_io.natural_io.put(obj.text_memory_start_address); put ( "; " ); put("stack_memory_size: "); standards_io.natural_io.put(obj.stack_memory_size); put ( "; " ); put("parameters: "); put(obj.parameters); put ( "; " ); put("criticality: "); standards_io.natural_io.put(obj.criticality); put ( "; " ); put("context_switch_overhead: "); standards_io.natural_io.put(obj.context_switch_overhead); put ( "; " ); put("cfg_name: "); put(obj.cfg_name); put ( "; " ); put("cfg_relocatable: "); standards_io.boolean_io.put(obj.cfg_relocatable); put ( "; " ); put("cache_access_profile_name: "); put(obj.cache_access_profile_name); put ( "; " ); put("mils_confidentiality_level: "); put(obj.mils_confidentiality_level); put ( "; " ); put("mils_integrity_level: "); put(obj.mils_integrity_level); put ( "; " ); put("mils_component: "); put(obj.mils_component); put ( "; " ); put("mils_task: "); put(obj.mils_task); put ( "; " ); put("mils_compliant: "); standards_io.boolean_io.put(obj.mils_compliant); put ( "; " ); put("access_memory_number: "); standards_io.natural_io.put(obj.access_memory_number); put ( "; " ); put("maximum_number_of_memory_request_per_job: "); standards_io.natural_io.put(obj.maximum_number_of_memory_request_per_job); put ( "; " ); put("seed: "); standards_io.natural_io.put(obj.seed); put ( "; " ); put("predictable: "); standards_io.boolean_io.put(obj.predictable); put ( "; " ); end Put; procedure Put(obj : in Generic_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Generic_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Generic_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Generic_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Generic_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Generic_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Generic_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Named_Object(obj), result); if (XML_String(obj.task_type) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.task_type) & to_unbounded_string(""); end if; if (XML_String(obj.cpu_name) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.cpu_name) & to_unbounded_string(""); end if; if (XML_String(obj.address_space_name) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.address_space_name) & to_unbounded_string(""); end if; if (XML_String(obj.core_name) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.core_name) & to_unbounded_string(""); end if; if (XML_String(obj.capacity_model) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.capacity_model) & to_unbounded_string(""); end if; if (XML_String(obj.capacity) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.capacity) & to_unbounded_string(""); end if; if (XML_String(obj.capacities) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.capacities) & to_unbounded_string(""); end if; if (XML_String(obj.qualities) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.qualities) & to_unbounded_string(""); end if; if (XML_String(obj.energy_consumption) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.energy_consumption) & to_unbounded_string(""); end if; if (XML_String(obj.deadline) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.deadline) & to_unbounded_string(""); end if; if (XML_String(obj.start_time) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.start_time) & to_unbounded_string(""); end if; if (XML_String(obj.priority) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.priority) & to_unbounded_string(""); end if; if (XML_String(obj.blocking_time) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.blocking_time) & to_unbounded_string(""); end if; if (XML_String(obj.policy) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.policy) & to_unbounded_string(""); end if; if (XML_String(obj.offsets) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.offsets) & to_unbounded_string(""); end if; if (XML_String(obj.text_memory_size) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.text_memory_size) & to_unbounded_string(""); end if; if (XML_String(obj.text_memory_start_address) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.text_memory_start_address) & to_unbounded_string(""); end if; if (XML_String(obj.stack_memory_size) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.stack_memory_size) & to_unbounded_string(""); end if; if (XML_String(obj.parameters) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.parameters) & to_unbounded_string(""); end if; if (XML_String(obj.criticality) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.criticality) & to_unbounded_string(""); end if; if (XML_String(obj.context_switch_overhead) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.context_switch_overhead) & to_unbounded_string(""); end if; if (XML_String(obj.cfg_name) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.cfg_name) & to_unbounded_string(""); end if; if (XML_String(obj.cfg_relocatable) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.cfg_relocatable) & to_unbounded_string(""); end if; if (XML_String(obj.cache_access_profile_name) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.cache_access_profile_name) & to_unbounded_string(""); end if; if (XML_String(obj.mils_confidentiality_level) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.mils_confidentiality_level) & to_unbounded_string(""); end if; if (XML_String(obj.mils_integrity_level) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.mils_integrity_level) & to_unbounded_string(""); end if; if (XML_String(obj.mils_component) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.mils_component) & to_unbounded_string(""); end if; if (XML_String(obj.mils_task) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.mils_task) & to_unbounded_string(""); end if; if (XML_String(obj.mils_compliant) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.mils_compliant) & to_unbounded_string(""); end if; if (XML_String(obj.access_memory_number) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.access_memory_number) & to_unbounded_string(""); end if; if (XML_String(obj.maximum_number_of_memory_request_per_job) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.maximum_number_of_memory_request_per_job) & to_unbounded_string(""); end if; if (XML_String(obj.seed) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.seed) & to_unbounded_string(""); end if; if (XML_String(obj.predictable) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.predictable) & to_unbounded_string(""); end if; end Build_Attributes_XML_String; function XML_String(obj : in Generic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Generic_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Generic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Generic_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Periodic_Task =-------- procedure Initialize(obj : in out Periodic_Task) is begin initialize(Generic_Task(obj)); obj.period := 0; obj.jitter := 0; obj.every := 0; obj.completion_time := 0; obj.task_type := Periodic_Type; end Initialize; function Copy ( obj : in Periodic_Task ) return Generic_Task_Ptr is New_Periodic_Task : Periodic_Task_Ptr; begin New_Periodic_Task := new Periodic_Task'(obj); return Generic_Task_Ptr(New_Periodic_Task); end Copy; function Copy ( obj : in Periodic_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Periodic_Task) is begin put(Generic_Task(obj)); put("period: "); standards_io.natural_io.put(obj.period); put ( "; " ); put("jitter: "); standards_io.natural_io.put(obj.jitter); put ( "; " ); put("every: "); standards_io.natural_io.put(obj.every); put ( "; " ); put("completion_time: "); standards_io.natural_io.put(obj.completion_time); put ( "; " ); end Put; procedure Put(obj : in Periodic_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Periodic_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Periodic_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Periodic_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Periodic_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Periodic_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Periodic_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Generic_Task(obj), result); if (XML_String(obj.period) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.period) & to_unbounded_string(""); end if; if (XML_String(obj.jitter) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.jitter) & to_unbounded_string(""); end if; if (XML_String(obj.every) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.every) & to_unbounded_string(""); end if; if (XML_String(obj.completion_time) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.completion_time) & to_unbounded_string(""); end if; end Build_Attributes_XML_String; function XML_String(obj : in Periodic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Periodic_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Periodic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Periodic_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Aperiodic_Task =-------- procedure Initialize(obj : in out Aperiodic_Task) is begin initialize(Generic_Task(obj)); obj.task_type := Aperiodic_Type; end Initialize; function Copy ( obj : in Aperiodic_Task ) return Generic_Task_Ptr is New_Aperiodic_Task : Aperiodic_Task_Ptr; begin New_Aperiodic_Task := new Aperiodic_Task'(obj); return Generic_Task_Ptr(New_Aperiodic_Task); end Copy; function Copy ( obj : in Aperiodic_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Aperiodic_Task) is begin put(Generic_Task(obj)); end Put; procedure Put(obj : in Aperiodic_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Aperiodic_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Aperiodic_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Aperiodic_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Aperiodic_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.APERIODIC_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Aperiodic_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Aperiodic_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Generic_Task(obj), result); end Build_Attributes_XML_String; function XML_String(obj : in Aperiodic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Aperiodic_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Aperiodic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Aperiodic_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Poisson_Task =-------- procedure Initialize(obj : in out Poisson_Task) is begin initialize(Periodic_Task(obj)); obj.task_type := Poisson_Type; end Initialize; function Copy ( obj : in Poisson_Task ) return Generic_Task_Ptr is New_Poisson_Task : Poisson_Task_Ptr; begin New_Poisson_Task := new Poisson_Task'(obj); return Generic_Task_Ptr(New_Poisson_Task); end Copy; function Copy ( obj : in Poisson_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Poisson_Task) is begin put(Periodic_Task(obj)); end Put; procedure Put(obj : in Poisson_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Poisson_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Poisson_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Poisson_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Poisson_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.POISSON_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Poisson_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Poisson_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Periodic_Task(obj), result); end Build_Attributes_XML_String; function XML_String(obj : in Poisson_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Poisson_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Poisson_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Poisson_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Timed_Task =-------- procedure Initialize(obj : in out Timed_Task) is begin initialize(Periodic_Task(obj)); obj.task_type := Timed_Type; end Initialize; function Copy ( obj : in Timed_Task ) return Generic_Task_Ptr is New_Timed_Task : Timed_Task_Ptr; begin New_Timed_Task := new Timed_Task'(obj); return Generic_Task_Ptr(New_Timed_Task); end Copy; function Copy ( obj : in Timed_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Timed_Task) is begin put(Periodic_Task(obj)); end Put; procedure Put(obj : in Timed_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Timed_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Timed_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Timed_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Timed_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.TIMED_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Timed_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Timed_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Periodic_Task(obj), result); end Build_Attributes_XML_String; function XML_String(obj : in Timed_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Timed_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Timed_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Timed_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Sporadic_Task =-------- procedure Initialize(obj : in out Sporadic_Task) is begin initialize(Poisson_Task(obj)); obj.task_type := Sporadic_Type; end Initialize; function Copy ( obj : in Sporadic_Task ) return Generic_Task_Ptr is New_Sporadic_Task : Sporadic_Task_Ptr; begin New_Sporadic_Task := new Sporadic_Task'(obj); return Generic_Task_Ptr(New_Sporadic_Task); end Copy; function Copy ( obj : in Sporadic_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Sporadic_Task) is begin put(Poisson_Task(obj)); end Put; procedure Put(obj : in Sporadic_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Sporadic_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Sporadic_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Sporadic_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Sporadic_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.POISSON_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.SPORADIC_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Sporadic_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Sporadic_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Poisson_Task(obj), result); end Build_Attributes_XML_String; function XML_String(obj : in Sporadic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Sporadic_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Sporadic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Sporadic_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Parametric_Task =-------- procedure Initialize(obj : in out Parametric_Task) is begin initialize(Poisson_Task(obj)); obj.activation_rule := empty_string; obj.task_type := Parametric_Type; end Initialize; function Copy ( obj : in Parametric_Task ) return Generic_Task_Ptr is New_Parametric_Task : Parametric_Task_Ptr; begin New_Parametric_Task := new Parametric_Task'(obj); return Generic_Task_Ptr(New_Parametric_Task); end Copy; function Copy ( obj : in Parametric_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Parametric_Task) is begin put(Poisson_Task(obj)); put("activation_rule: "); put(obj.activation_rule); put ( "; " ); end Put; procedure Put(obj : in Parametric_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Parametric_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Parametric_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Parametric_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Parametric_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.POISSON_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PARAMETRIC_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Parametric_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Parametric_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Poisson_Task(obj), result); if (XML_String(obj.activation_rule) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.activation_rule) & to_unbounded_string(""); end if; end Build_Attributes_XML_String; function XML_String(obj : in Parametric_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Parametric_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Parametric_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Parametric_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Scheduling_Task =-------- procedure Initialize(obj : in out Scheduling_Task) is begin initialize(Poisson_Task(obj)); obj.task_type := Scheduling_Task_type; end Initialize; function Copy ( obj : in Scheduling_Task ) return Generic_Task_Ptr is New_Scheduling_Task : Scheduling_Task_Ptr; begin New_Scheduling_Task := new Scheduling_Task'(obj); return Generic_Task_Ptr(New_Scheduling_Task); end Copy; function Copy ( obj : in Scheduling_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Scheduling_Task) is begin put(Poisson_Task(obj)); end Put; procedure Put(obj : in Scheduling_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Scheduling_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Scheduling_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Scheduling_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Scheduling_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.POISSON_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.SCHEDULING_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Scheduling_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Scheduling_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Poisson_Task(obj), result); end Build_Attributes_XML_String; function XML_String(obj : in Scheduling_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Scheduling_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Scheduling_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Scheduling_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Frame_Task =-------- procedure Initialize(obj : in out Frame_Task) is begin initialize(Periodic_Task(obj)); obj.interarrival := 0; obj.task_type := Frame_Task_type; end Initialize; function Copy ( obj : in Frame_Task ) return Generic_Task_Ptr is New_Frame_Task : Frame_Task_Ptr; begin New_Frame_Task := new Frame_Task'(obj); return Generic_Task_Ptr(New_Frame_Task); end Copy; function Copy ( obj : in Frame_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Frame_Task) is begin put(Periodic_Task(obj)); put("interarrival: "); standards_io.natural_io.put(obj.interarrival); put ( "; " ); end Put; procedure Put(obj : in Frame_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Frame_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Frame_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Frame_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Frame_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.FRAME_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Frame_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Frame_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Periodic_Task(obj), result); if (XML_String(obj.interarrival) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.interarrival) & to_unbounded_string(""); end if; end Build_Attributes_XML_String; function XML_String(obj : in Frame_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Frame_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Frame_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Frame_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Sporadic_Inner_Periodic_Task =-------- procedure Initialize(obj : in out Sporadic_Inner_Periodic_Task) is begin initialize(Parametric_Task(obj)); obj.outer_period := 0; obj.outer_duration := 0; end Initialize; function Copy ( obj : in Sporadic_Inner_Periodic_Task ) return Generic_Task_Ptr is New_Sporadic_Inner_Periodic_Task : Sporadic_Inner_Periodic_Task_Ptr; begin New_Sporadic_Inner_Periodic_Task := new Sporadic_Inner_Periodic_Task'(obj); return Generic_Task_Ptr(New_Sporadic_Inner_Periodic_Task); end Copy; function Copy ( obj : in Sporadic_Inner_Periodic_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Sporadic_Inner_Periodic_Task) is begin put(Parametric_Task(obj)); put("outer_period: "); standards_io.natural_io.put(obj.outer_period); put ( "; " ); put("outer_duration: "); standards_io.natural_io.put(obj.outer_duration); put ( "; " ); end Put; procedure Put(obj : in Sporadic_Inner_Periodic_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Sporadic_Inner_Periodic_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Sporadic_Inner_Periodic_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Sporadic_Inner_Periodic_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Sporadic_Inner_Periodic_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.POISSON_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PARAMETRIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.SPORADIC_INNER_PERIODIC_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Sporadic_Inner_Periodic_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Sporadic_Inner_Periodic_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Parametric_Task(obj), result); if (XML_String(obj.outer_period) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.outer_period) & to_unbounded_string(""); end if; if (XML_String(obj.outer_duration) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.outer_duration) & to_unbounded_string(""); end if; end Build_Attributes_XML_String; function XML_String(obj : in Sporadic_Inner_Periodic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Sporadic_Inner_Periodic_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Sporadic_Inner_Periodic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Sporadic_Inner_Periodic_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= Periodic_Inner_Periodic_Task =-------- procedure Initialize(obj : in out Periodic_Inner_Periodic_Task) is begin initialize(Sporadic_Inner_Periodic_Task(obj)); end Initialize; function Copy ( obj : in Periodic_Inner_Periodic_Task ) return Generic_Task_Ptr is New_Periodic_Inner_Periodic_Task : Periodic_Inner_Periodic_Task_Ptr; begin New_Periodic_Inner_Periodic_Task := new Periodic_Inner_Periodic_Task'(obj); return Generic_Task_Ptr(New_Periodic_Inner_Periodic_Task); end Copy; function Copy ( obj : in Periodic_Inner_Periodic_Task_Ptr ) return Generic_Task_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Periodic_Inner_Periodic_Task) is begin put(Sporadic_Inner_Periodic_Task(obj)); end Put; procedure Put(obj : in Periodic_Inner_Periodic_Task_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Periodic_Inner_Periodic_Task_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Periodic_Inner_Periodic_Task) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Periodic_Inner_Periodic_Task_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Periodic_Inner_Periodic_Task ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.GENERIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.POISSON_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PARAMETRIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.SPORADIC_INNER_PERIODIC_TASK"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASKS.PERIODIC_INNER_PERIODIC_TASK"); Add (list, s); return list; end type_of; function type_of ( obj : in Periodic_Inner_Periodic_Task_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Periodic_Inner_Periodic_Task; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Sporadic_Inner_Periodic_Task(obj), result); end Build_Attributes_XML_String; function XML_String(obj : in Periodic_Inner_Periodic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in Periodic_Inner_Periodic_Task_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in Periodic_Inner_Periodic_Task) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in Periodic_Inner_Periodic_Task_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; End Tasks;