------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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 Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Framework_Config; use Framework_Config; use Framework_Config.Priority_Io; with id_generators; use id_generators; with Objects; use Objects; with Tasks; use Tasks; with standards_io; use standards_io; use standards_io.natural_io; with Ada.Finalization; with unbounded_strings; use unbounded_strings; use unbounded_strings.Unbounded_String_List_Package; with Unchecked_Deallocation; with Primitive_XML_Strings; use Primitive_XML_Strings; with Indexed_Tables; with ada.strings.unbounded.text_io; use ada.strings.unbounded.text_io; with Convert_Strings; with Convert_Unbounded_Strings; with text_io; use text_io; Package Resources is type Resources_Type is ( No_Protocol, Priority_Ceiling_Protocol, Priority_Inheritance_Protocol, Immediate_Priority_Ceiling_Protocol); procedure To_Resources_Type is new Convert_Strings(Resources_Type, No_Protocol); procedure To_Resources_Type is new Convert_Unbounded_Strings(Resources_Type, No_Protocol); function XML_String (obj : in Resources_Type; level : in natural := 0) return Unbounded_String; function XML_Ref_String (obj : in Resources_Type; level : in natural := 0) return Unbounded_String; package Resources_Type_io is new text_io.enumeration_io(Resources_Type); use Resources_Type_io; -- --------= Critical_Section =-------- type Critical_Section is record task_begin : Natural; task_end : Natural; end record; type Critical_Section_Ptr is access all Critical_Section; procedure Initialize(obj : out Critical_Section); procedure Put(obj : in Critical_Section); procedure Put(obj : in Critical_Section_Ptr); function Copy(obj : in Critical_Section_Ptr) return Critical_Section_Ptr; function Copy(obj : in Critical_Section) return Critical_Section_Ptr; procedure Build_Attributes_XML_String(obj : in Critical_Section; level : in natural := 0; result : in out Unbounded_String); function XML_String(obj : in Critical_Section; level : in natural := 0) return Unbounded_String; function XML_String(obj : in Critical_Section_Ptr; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Critical_Section; level : in natural := 0) return Unbounded_String; procedure Free is new Unchecked_Deallocation (Critical_Section, Critical_Section_Ptr); package Resource_Accesses is new Indexed_Tables(Critical_Section, Unbounded_String, Framework_Config.Max_Tasks_For_A_Resource, 0, Put, Initialize, Put, Convert, XML_String, XML_String, to_unbounded_string("task_name")); use Resource_Accesses; subtype Resource_Accesses_Range is Resource_Accesses.indexed_table_range; subtype Resource_Accesses_Range_Ptr is Resource_Accesses.indexed_table_range_Ptr; subtype Resource_Accesses_Table is Resource_Accesses.indexed_table; subtype Resource_Accesses_Table_Ptr is Resource_Accesses.indexed_table_Ptr; -- --------= Generic_Resource =-------- type Generic_Resource; type Generic_Resource_Ptr is access all Generic_Resource'Class; type Generic_Resource is new Named_Object with record state : Natural; size : Natural; address : Natural; protocol : Resources_Type; critical_sections : Resource_Accesses_Table; cpu_name : Unbounded_String; address_space_name : Unbounded_String; end record; procedure Initialize(obj : in out Generic_Resource); procedure Put(obj : in Generic_Resource); procedure Put(obj : in Generic_Resource_Ptr); procedure Put_Name(obj : in Generic_Resource_Ptr); procedure Build_Attributes_XML_String(obj : in Generic_Resource; level : in natural := 0; result : in out Unbounded_String); function XML_String(obj : in Generic_Resource; level : in natural := 0) return Unbounded_String; function XML_String(obj : in Generic_Resource_Ptr; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Generic_Resource; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Generic_Resource_Ptr; level : in natural := 0) return Unbounded_String; function Get_Name (obj : in Generic_Resource) return Unbounded_String; function Get_Name (obj : in Generic_Resource_Ptr) return Unbounded_String; function Copy(obj : in Generic_Resource_Ptr) return Generic_Resource_Ptr; function Copy(obj : in Generic_Resource) return Generic_Resource_Ptr; function type_of(obj : in Generic_Resource) return unbounded_string_list; function type_of(obj : in Generic_Resource_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Generic_Resource'Class, Generic_Resource_Ptr); -- --------= Np_Resource =-------- type Np_Resource; type Np_Resource_Ptr is access all Np_Resource'Class; type Np_Resource is new Generic_Resource with null record; procedure Initialize(obj : in out Np_Resource); procedure Put(obj : in Np_Resource); procedure Put(obj : in Np_Resource_Ptr); procedure Put_Name(obj : in Np_Resource_Ptr); procedure Build_Attributes_XML_String(obj : in Np_Resource; level : in natural := 0; result : in out Unbounded_String); function XML_String(obj : in Np_Resource; level : in natural := 0) return Unbounded_String; function XML_String(obj : in Np_Resource_Ptr; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Np_Resource; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Np_Resource_Ptr; level : in natural := 0) return Unbounded_String; function Get_Name (obj : in Np_Resource) return Unbounded_String; function Get_Name (obj : in Np_Resource_Ptr) return Unbounded_String; function Copy(obj : in Np_Resource_Ptr) return Generic_Resource_Ptr; function Copy(obj : in Np_Resource) return Generic_Resource_Ptr; function type_of(obj : in Np_Resource) return unbounded_string_list; function type_of(obj : in Np_Resource_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Np_Resource'Class, Np_Resource_Ptr); -- --------= Priority_Constrained_Resource =-------- type Priority_Constrained_Resource; type Priority_Constrained_Resource_Ptr is access all Priority_Constrained_Resource'Class; type Priority_Constrained_Resource is new Generic_Resource with record ceiling_priority : Priority_Range; end record; procedure Initialize(obj : in out Priority_Constrained_Resource); procedure Put(obj : in Priority_Constrained_Resource); procedure Put(obj : in Priority_Constrained_Resource_Ptr); procedure Put_Name(obj : in Priority_Constrained_Resource_Ptr); procedure Build_Attributes_XML_String(obj : in Priority_Constrained_Resource; level : in natural := 0; result : in out Unbounded_String); function XML_String(obj : in Priority_Constrained_Resource; level : in natural := 0) return Unbounded_String; function XML_String(obj : in Priority_Constrained_Resource_Ptr; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Priority_Constrained_Resource; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Priority_Constrained_Resource_Ptr; level : in natural := 0) return Unbounded_String; function Get_Name (obj : in Priority_Constrained_Resource) return Unbounded_String; function Get_Name (obj : in Priority_Constrained_Resource_Ptr) return Unbounded_String; function Copy(obj : in Priority_Constrained_Resource_Ptr) return Generic_Resource_Ptr; function Copy(obj : in Priority_Constrained_Resource) return Generic_Resource_Ptr; function type_of(obj : in Priority_Constrained_Resource) return unbounded_string_list; function type_of(obj : in Priority_Constrained_Resource_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Priority_Constrained_Resource'Class, Priority_Constrained_Resource_Ptr); -- --------= Pip_Resource =-------- type Pip_Resource; type Pip_Resource_Ptr is access all Pip_Resource'Class; type Pip_Resource is new Generic_Resource with null record; procedure Initialize(obj : in out Pip_Resource); procedure Put(obj : in Pip_Resource); procedure Put(obj : in Pip_Resource_Ptr); procedure Put_Name(obj : in Pip_Resource_Ptr); procedure Build_Attributes_XML_String(obj : in Pip_Resource; level : in natural := 0; result : in out Unbounded_String); function XML_String(obj : in Pip_Resource; level : in natural := 0) return Unbounded_String; function XML_String(obj : in Pip_Resource_Ptr; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Pip_Resource; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Pip_Resource_Ptr; level : in natural := 0) return Unbounded_String; function Get_Name (obj : in Pip_Resource) return Unbounded_String; function Get_Name (obj : in Pip_Resource_Ptr) return Unbounded_String; function Copy(obj : in Pip_Resource_Ptr) return Generic_Resource_Ptr; function Copy(obj : in Pip_Resource) return Generic_Resource_Ptr; function type_of(obj : in Pip_Resource) return unbounded_string_list; function type_of(obj : in Pip_Resource_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Pip_Resource'Class, Pip_Resource_Ptr); -- --------= Pcp_Resource =-------- type Pcp_Resource; type Pcp_Resource_Ptr is access all Pcp_Resource'Class; type Pcp_Resource is new Priority_Constrained_Resource with null record; procedure Initialize(obj : in out Pcp_Resource); procedure Put(obj : in Pcp_Resource); procedure Put(obj : in Pcp_Resource_Ptr); procedure Put_Name(obj : in Pcp_Resource_Ptr); procedure Build_Attributes_XML_String(obj : in Pcp_Resource; level : in natural := 0; result : in out Unbounded_String); function XML_String(obj : in Pcp_Resource; level : in natural := 0) return Unbounded_String; function XML_String(obj : in Pcp_Resource_Ptr; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Pcp_Resource; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in Pcp_Resource_Ptr; level : in natural := 0) return Unbounded_String; function Get_Name (obj : in Pcp_Resource) return Unbounded_String; function Get_Name (obj : in Pcp_Resource_Ptr) return Unbounded_String; function Copy(obj : in Pcp_Resource_Ptr) return Generic_Resource_Ptr; function Copy(obj : in Pcp_Resource) return Generic_Resource_Ptr; function type_of(obj : in Pcp_Resource) return unbounded_string_list; function type_of(obj : in Pcp_Resource_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Pcp_Resource'Class, Pcp_Resource_Ptr); -- --------= IPcp_Resource =-------- type IPcp_Resource; type IPcp_Resource_Ptr is access all IPcp_Resource'Class; type IPcp_Resource is new Priority_Constrained_Resource with null record; procedure Initialize(obj : in out IPcp_Resource); procedure Put(obj : in IPcp_Resource); procedure Put(obj : in IPcp_Resource_Ptr); procedure Put_Name(obj : in IPcp_Resource_Ptr); procedure Build_Attributes_XML_String(obj : in IPcp_Resource; level : in natural := 0; result : in out Unbounded_String); function XML_String(obj : in IPcp_Resource; level : in natural := 0) return Unbounded_String; function XML_String(obj : in IPcp_Resource_Ptr; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in IPcp_Resource; level : in natural := 0) return Unbounded_String; function XML_Ref_String(obj : in IPcp_Resource_Ptr; level : in natural := 0) return Unbounded_String; function Get_Name (obj : in IPcp_Resource) return Unbounded_String; function Get_Name (obj : in IPcp_Resource_Ptr) return Unbounded_String; function Copy(obj : in IPcp_Resource_Ptr) return Generic_Resource_Ptr; function Copy(obj : in IPcp_Resource) return Generic_Resource_Ptr; function type_of(obj : in IPcp_Resource) return unbounded_string_list; function type_of(obj : in IPcp_Resource_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (IPcp_Resource'Class, IPcp_Resource_Ptr); type Start_End_Table is Array ( Resource_Accesses_Range ) of Critical_Section; End Resources;