------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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-2020, Frank Singhoff, Alain Plantec, Jerome Legrand, -- Hai Nam Tran, Stephane Rubini -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR CNRS 6285, Universite 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$ -- $Date$ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with framework_config; use framework_config; with translate; use translate; with resource_set; use resource_set; use resource_set.generic_resource_set; with task_set; use task_set; use task_set.generic_task_set; with scheduling_analysis; use scheduling_analysis; use scheduling_analysis.densities_table_package; use scheduling_analysis.density_package; with scheduling_analysis.extended.task_analysis; use scheduling_analysis.extended.task_analysis; with buffer_set; use buffer_set; use buffer_set.generic_buffer_set; with double_util; use double_util; with unbounded_strings; use unbounded_strings; with message_set; use message_set; use message_set.generic_message_set; with framework; use framework; with call_scheduling_framework; use call_scheduling_framework; with multiprocessor_services_interface; use multiprocessor_services_interface; use multiprocessor_services_interface.scheduling_result_per_processor_package; with xml_tag; use xml_tag; with debug; use debug; package body call_random_framework is procedure compute_response_time_density (sys : in system; result : in out Unbounded_String; a_processor : in generic_processor_ptr; output : in output_format := string_output) is proba : densities_table; begin put_debug ("Call Compute_Response_Time_Density"); result := To_Unbounded_String (""); if output = xml_output then set_tag; else set_empty; end if; for i in 0 .. sched.nb_entries - 1 loop if sched.entries (i).item = a_processor then initialize (proba); compute_response_time_distribution (sys.tasks, sched.entries (i).data.result, sched.entries (i).item.name, proba); for i in 0 .. proba.nb_entries - 1 loop result := result & lb_minus & lb_task (current_language) & unbounded_sp & start_task & To_String (proba.entries (i).item.name) & end_task & lb_colon & unbounded_lf; for k in 0 .. proba.entries (i).data.nb_entries - 1 loop result := result & To_Unbounded_String (" ") & To_Unbounded_String ("P(") & lb_response_time (current_language) & lb_equal & start_response_time & To_Unbounded_String (proba.entries (i).data.entries (k).response_time'img) & end_response_time & To_Unbounded_String (")=") & start_probability & format (proba.entries (i).data.entries (k).probability) & end_probability & unbounded_lf; end loop; end loop; end if; end loop; result := result & end_response_time_density; exception when task_set.task_must_be_periodic => result := result & lb_compute_scheduling_error_5 (current_language) & unbounded_lf & end_response_time_density; when task_set.task_model_error => result := result & lb_compute_scheduling_error_6 (current_language) & unbounded_lf & end_response_time_density; end compute_response_time_density; end call_random_framework;