------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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 -- ------------------------------------------------------------------------------ -- Last update : -- $Rev: 1249 $ -- $Date: 2014-08-28 07:02:15 +0200 (Fri, 28 Aug 2014) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Address_Spaces; use Address_Spaces; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with unbounded_strings; use unbounded_strings; with Framework_Config; use Framework_Config; with Scheduler_Interface; use Scheduler_Interface; with Task_Set; use Task_Set; with Resource_Set; use Resource_Set; with sets; package Address_Space_Set is ---------------------------------------------------------- -- Definition of a set ---------------------------------------------------------- package Generic_Address_Space_Set is new Sets ( Max_Element => Framework_Config.Max_Address_Spaces, Element => Address_Space_Ptr, Free => Free, Copy => Copy, Put => Put, xml_string => XML_String, xml_ref_string => XML_ref_String); use Generic_Address_Space_Set; type Address_Spaces_Set is new Generic_Address_Space_Set.set with private; subtype Address_Spaces_Range is Generic_Address_Space_Set.element_range; subtype Address_Spaces_Iterator is Generic_Address_Space_Set.iterator; ---------------------------------------------------------- -- Exceptions defined in the set package ---------------------------------------------------------- -- Raised when a given address space is not in a address space set -- Address_Space_Not_Found : exception; -- Raised when parameters provided to Add_Address_Space are wrong -- Invalid_Parameter : exception; ---------------------------------------------------------- -- I/O operations ---------------------------------------------------------- function Export_Aadl_Declarations (My_Address_Spaces : in Address_Spaces_Set; Number_Of_Ht : in Natural) return Unbounded_String; function Export_Aadl_Implementations (My_Address_Spaces : in Address_Spaces_Set; My_Tasks : in Tasks_Set; My_Resources : in Resources_Set) return Unbounded_String; function Export_Aadl_Properties (My_Address_Spaces : in Address_Spaces_Set; Number_Of_Ht : in Natural) return Unbounded_String; ---------------------------------------------------------- -- Procedure to proceed modification on a set ---------------------------------------------------------- procedure Check_Address_Space (My_Address_Spaces : in Address_Spaces_Set; Name : in Unbounded_String; Cpu_Name : in Unbounded_String; Text_Memory_Size : in Integer; Stack_Memory_Size : in Integer; Data_Memory_Size : in Integer; Heap_Memory_Size : in Integer; Is_Preemptive : in Preemptives_Type := preemptive; Quantum : in Integer := 0; File_Name : in Unbounded_String := empty_string; A_Scheduler : in Schedulers_Type := No_Scheduling_Protocol; automaton_name : in Unbounded_String := empty_string); procedure Add_Address_Space (My_Address_Spaces : in out Address_Spaces_Set; Name : in Unbounded_String; Cpu_Name : in Unbounded_String; Text_Memory_Size : in Integer; Stack_Memory_Size : in Integer; Data_Memory_Size : in Integer; Heap_Memory_Size : in Integer; Is_Preemptive : in Preemptives_Type := preemptive; Quantum : in Integer := 0; File_Name : in Unbounded_String := empty_string; A_Scheduler : in Schedulers_Type := No_Scheduling_Protocol; automaton_name : in Unbounded_String := empty_string); procedure Add_Address_Space (My_Address_Spaces : in out Address_Spaces_Set; A_Address_Space : in out Address_Space_Ptr; Name : in Unbounded_String; Cpu_Name : in Unbounded_String; Text_Memory_Size : in Integer; Stack_Memory_Size : in Integer; Data_Memory_Size : in Integer; Heap_Memory_Size : in Integer; Is_Preemptive : in Preemptives_Type := preemptive; Quantum : in Integer := 0; File_Name : in Unbounded_String := empty_string; A_Scheduler : in Schedulers_Type := No_Scheduling_Protocol; automaton_name : in Unbounded_String := empty_string); -- Search for task groups referencing an address space -- procedure Check_entity_referencing_processor (My_Address_Spaces : in Address_Spaces_Set; A_processor : in Unbounded_String); -- Delete all address spaces located on 'A_Processor' -- procedure Delete_Processor (My_Address_Spaces : in out Address_Spaces_Set; A_Processor : in Unbounded_String); ------------------------------------------------------ -- Read information from a set ------------------------------------------------------ function Search_Address_Space (My_Address_Spaces : in Address_Spaces_Set; Name : in Unbounded_String) return Address_Space_Ptr; function Search_Address_Space_by_id (My_Address_Spaces : in Address_Spaces_Set; id : in Unbounded_String) return Address_Space_Ptr; function Address_Space_Is_Present (My_Address_Spaces : in Address_Spaces_Set; Name : in Unbounded_String) return Boolean; private type Address_Spaces_Set is new Generic_Address_Space_Set.set with null record; end Address_Space_Set;