------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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 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 Convert_Strings; with Convert_Unbounded_Strings; with text_io; use text_io; 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; Package Resources is type Critical_Section; type Critical_Section_Ptr is access all Critical_Section; type Generic_Resource; type Generic_Resource_Ptr is access all Generic_Resource'Class; type Np_Resource; type Np_Resource_Ptr is access all Np_Resource'Class; type Pip_Resource; type Pip_Resource_Ptr is access all Pip_Resource'Class; type Pcp_Resource; type Pcp_Resource_Ptr is access all Pcp_Resource'Class; type PPcp_Resource; type PPcp_Resource_Ptr is access all PPcp_Resource'Class; type IPcp_Resource; type IPcp_Resource_Ptr is access all IPcp_Resource'Class; type Resources_Type is ( No_Protocol, Priority_Ceiling_Protocol, Pool_Based_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) return Unbounded_String; function XML_Ref_String (obj : in Resources_Type) return Unbounded_String; package Resources_Type_io is new text_io.enumeration_io(Resources_Type); use Resources_Type_io; type Resources_Synchronization_Type is ( Mutex, Wait, Post); procedure To_Resources_Synchronization_Type is new Convert_Strings(Resources_Synchronization_Type, Mutex); procedure To_Resources_Synchronization_Type is new Convert_Unbounded_Strings(Resources_Synchronization_Type, Mutex); function XML_String (obj : in Resources_Synchronization_Type) return Unbounded_String; function XML_Ref_String (obj : in Resources_Synchronization_Type) return Unbounded_String; package Resources_Synchronization_Type_io is new text_io.enumeration_io(Resources_Synchronization_Type); use Resources_Synchronization_Type_io; type Priority_Assignment_Type is ( Automatic_Assignment, Manual_Assignment); procedure To_Priority_Assignment_Type is new Convert_Strings(Priority_Assignment_Type, Automatic_Assignment); procedure To_Priority_Assignment_Type is new Convert_Unbounded_Strings(Priority_Assignment_Type, Automatic_Assignment); function XML_String (obj : in Priority_Assignment_Type) return Unbounded_String; function XML_Ref_String (obj : in Priority_Assignment_Type) return Unbounded_String; package Priority_Assignment_Type_io is new text_io.enumeration_io(Priority_Assignment_Type); use Priority_Assignment_Type_io; -- --------= Critical_Section =-------- type Critical_Section is record task_synchronization : Resources_Synchronization_Type; task_begin : Natural; task_end : Natural; end record; 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; result : in out Unbounded_String); function XML_String(obj : in Critical_Section) return Unbounded_String; function XML_String(obj : in Critical_Section_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Critical_Section) 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 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; priority : Priority_Range; priority_assignment : Priority_Assignment_Type; 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; result : in out Unbounded_String); function XML_String(obj : in Generic_Resource) return Unbounded_String; function XML_String(obj : in Generic_Resource_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Generic_Resource) return Unbounded_String; function XML_Ref_String(obj : in Generic_Resource_Ptr) 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 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; result : in out Unbounded_String); function XML_String(obj : in Np_Resource) return Unbounded_String; function XML_String(obj : in Np_Resource_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Np_Resource) return Unbounded_String; function XML_Ref_String(obj : in Np_Resource_Ptr) 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); -- --------= Pip_Resource =-------- 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; result : in out Unbounded_String); function XML_String(obj : in Pip_Resource) return Unbounded_String; function XML_String(obj : in Pip_Resource_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Pip_Resource) return Unbounded_String; function XML_Ref_String(obj : in Pip_Resource_Ptr) 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 is new Generic_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; result : in out Unbounded_String); function XML_String(obj : in Pcp_Resource) return Unbounded_String; function XML_String(obj : in Pcp_Resource_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Pcp_Resource) return Unbounded_String; function XML_Ref_String(obj : in Pcp_Resource_Ptr) 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); -- --------= PPcp_Resource =-------- type PPcp_Resource is new Generic_Resource with null record; procedure Initialize(obj : in out PPcp_Resource); procedure Put(obj : in PPcp_Resource); procedure Put(obj : in PPcp_Resource_Ptr); procedure Put_Name(obj : in PPcp_Resource_Ptr); procedure Build_Attributes_XML_String(obj : in PPcp_Resource; result : in out Unbounded_String); function XML_String(obj : in PPcp_Resource) return Unbounded_String; function XML_String(obj : in PPcp_Resource_Ptr) return Unbounded_String; function XML_Ref_String(obj : in PPcp_Resource) return Unbounded_String; function XML_Ref_String(obj : in PPcp_Resource_Ptr) return Unbounded_String; function Get_Name (obj : in PPcp_Resource) return Unbounded_String; function Get_Name (obj : in PPcp_Resource_Ptr) return Unbounded_String; function Copy(obj : in PPcp_Resource_Ptr) return Generic_Resource_Ptr; function Copy(obj : in PPcp_Resource) return Generic_Resource_Ptr; function type_of(obj : in PPcp_Resource) return unbounded_string_list; function type_of(obj : in PPcp_Resource_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (PPcp_Resource'Class, PPcp_Resource_Ptr); -- --------= IPcp_Resource =-------- type IPcp_Resource is new Generic_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; result : in out Unbounded_String); function XML_String(obj : in IPcp_Resource) return Unbounded_String; function XML_String(obj : in IPcp_Resource_Ptr) return Unbounded_String; function XML_Ref_String(obj : in IPcp_Resource) return Unbounded_String; function XML_Ref_String(obj : in IPcp_Resource_Ptr) 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;