------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- This Ada package was automatically generated by the software engineering tool 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 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 LAB-STICC 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 : 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 Tasks.Extended; use Tasks.Extended; Package Body Scheduling_Analysis is -- --------= Buffer_Size_Item =-------- procedure Initialize(obj : out Buffer_Size_Item) is begin obj.time := 0; obj.size := 0; end Initialize; procedure Put(obj : in Buffer_Size_Item) is begin put("time: "); standards_io.natural_io.put(obj.time); put ( "; " ); put("size: "); standards_io.natural_io.put(obj.size); put ( "; " ); end Put; procedure Put(obj : in Buffer_Size_Item_Ptr) is begin Put(Obj.All); end Put; procedure Build_Attributes_XML_String(obj : in Buffer_Size_Item; level : in natural := 0; result : in out Unbounded_String) is begin if (XML_String(obj.time, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & Unbounded_Lf; end if; if (XML_String(obj.size, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.size, level + 1) & "" & Unbounded_Lf; end if; end Build_Attributes_XML_String; function XML_String(obj : in Buffer_Size_Item; level : in natural := 0) return Unbounded_String is result : Unbounded_String; begin result := "" & Unbounded_Lf; Build_Attributes_XML_String(obj, level, result); result := result & "" & Unbounded_Lf; return (result); end XML_String; function XML_String(obj : in Buffer_Size_Item_Ptr; level : in natural := 0) 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 Buffer_Size_Item; level : in natural := 0) return Unbounded_String is result : Unbounded_String; begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function Copy ( obj : in Buffer_Size_Item ) return Buffer_Size_Item_Ptr is New_Buffer_Size_Item : Buffer_Size_Item_Ptr; begin New_Buffer_Size_Item := new Buffer_Size_Item'(obj); return (New_Buffer_Size_Item); end Copy; function Copy ( obj : in Buffer_Size_Item_Ptr ) return Buffer_Size_Item_Ptr is begin return copy(obj.all); end Copy; -- --------= Density_Item =-------- procedure Initialize(obj : out Density_Item) is begin obj.response_time := 0; obj.probability := 0.0; end Initialize; procedure Put(obj : in Density_Item) is begin put("response_time: "); standards_io.natural_io.put(obj.response_time); put ( "; " ); put("probability: "); standards_io.double_io.put(obj.probability); put ( "; " ); end Put; procedure Put(obj : in Density_Item_Ptr) is begin Put(Obj.All); end Put; procedure Build_Attributes_XML_String(obj : in Density_Item; level : in natural := 0; result : in out Unbounded_String) is begin if (XML_String(obj.response_time, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.response_time, level + 1) & "" & Unbounded_Lf; end if; if (XML_String(obj.probability, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.probability, level + 1) & "" & Unbounded_Lf; end if; end Build_Attributes_XML_String; function XML_String(obj : in Density_Item; level : in natural := 0) return Unbounded_String is result : Unbounded_String; begin result := "" & Unbounded_Lf; Build_Attributes_XML_String(obj, level, result); result := result & "" & Unbounded_Lf; return (result); end XML_String; function XML_String(obj : in Density_Item_Ptr; level : in natural := 0) 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 Density_Item; level : in natural := 0) return Unbounded_String is result : Unbounded_String; begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function Copy ( obj : in Density_Item ) return Density_Item_Ptr is New_Density_Item : Density_Item_Ptr; begin New_Density_Item := new Density_Item'(obj); return (New_Density_Item); end Copy; function Copy ( obj : in Density_Item_Ptr ) return Density_Item_Ptr is begin return copy(obj.all); end Copy; -- --------= Deadlock_Item =-------- procedure Initialize(obj : out Deadlock_Item) is begin obj.time := 0; obj.task_name := empty_string; obj.resource_name := empty_string; end Initialize; procedure Put(obj : in Deadlock_Item) is begin put("time: "); standards_io.natural_io.put(obj.time); put ( "; " ); put("task_name: "); put(obj.task_name); put ( "; " ); put("resource_name: "); put(obj.resource_name); put ( "; " ); end Put; procedure Put(obj : in Deadlock_Item_Ptr) is begin Put(Obj.All); end Put; procedure Build_Attributes_XML_String(obj : in Deadlock_Item; level : in natural := 0; result : in out Unbounded_String) is begin if (XML_String(obj.time, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & Unbounded_Lf; end if; if (XML_String(obj.task_name, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.task_name, level + 1) & "" & Unbounded_Lf; end if; if (XML_String(obj.resource_name, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.resource_name, level + 1) & "" & Unbounded_Lf; end if; end Build_Attributes_XML_String; function XML_String(obj : in Deadlock_Item; level : in natural := 0) return Unbounded_String is result : Unbounded_String; begin result := "" & Unbounded_Lf; Build_Attributes_XML_String(obj, level, result); result := result & "" & Unbounded_Lf; return (result); end XML_String; function XML_String(obj : in Deadlock_Item_Ptr; level : in natural := 0) 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 Deadlock_Item; level : in natural := 0) return Unbounded_String is result : Unbounded_String; begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function Copy ( obj : in Deadlock_Item ) return Deadlock_Item_Ptr is New_Deadlock_Item : Deadlock_Item_Ptr; begin New_Deadlock_Item := new Deadlock_Item'(obj); return (New_Deadlock_Item); end Copy; function Copy ( obj : in Deadlock_Item_Ptr ) return Deadlock_Item_Ptr is begin return copy(obj.all); end Copy; -- --------= Priority_Inversion_Item =-------- procedure Initialize(obj : out Priority_Inversion_Item) is begin obj.start_time := 0; obj.end_time := 0; obj.task_name := empty_string; obj.resource_name := empty_string; end Initialize; procedure Put(obj : in Priority_Inversion_Item) is begin put("start_time: "); standards_io.natural_io.put(obj.start_time); put ( "; " ); put("end_time: "); standards_io.natural_io.put(obj.end_time); put ( "; " ); put("task_name: "); put(obj.task_name); put ( "; " ); put("resource_name: "); put(obj.resource_name); put ( "; " ); end Put; procedure Put(obj : in Priority_Inversion_Item_Ptr) is begin Put(Obj.All); end Put; procedure Build_Attributes_XML_String(obj : in Priority_Inversion_Item; level : in natural := 0; result : in out Unbounded_String) is begin if (XML_String(obj.start_time, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.start_time, level + 1) & "" & Unbounded_Lf; end if; if (XML_String(obj.end_time, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.end_time, level + 1) & "" & Unbounded_Lf; end if; if (XML_String(obj.task_name, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.task_name, level + 1) & "" & Unbounded_Lf; end if; if (XML_String(obj.resource_name, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.resource_name, level + 1) & "" & Unbounded_Lf; end if; end Build_Attributes_XML_String; function XML_String(obj : in Priority_Inversion_Item; level : in natural := 0) return Unbounded_String is result : Unbounded_String; begin result := "" & Unbounded_Lf; Build_Attributes_XML_String(obj, level, result); result := result & "" & Unbounded_Lf; return (result); end XML_String; function XML_String(obj : in Priority_Inversion_Item_Ptr; level : in natural := 0) 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 Priority_Inversion_Item; level : in natural := 0) return Unbounded_String is result : Unbounded_String; begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function Copy ( obj : in Priority_Inversion_Item ) return Priority_Inversion_Item_Ptr is New_Priority_Inversion_Item : Priority_Inversion_Item_Ptr; begin New_Priority_Inversion_Item := new Priority_Inversion_Item'(obj); return (New_Priority_Inversion_Item); end Copy; function Copy ( obj : in Priority_Inversion_Item_Ptr ) return Priority_Inversion_Item_Ptr is begin return copy(obj.all); end Copy; End Scheduling_Analysis;