------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real time scheduling analysis tool. -- This program provides services to automatically check performances -- of real time architectures. -- -- Copyright (C) 2002-2010, by Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- the LISyC Team, University of Western Britanny. -- -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- 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: 523 $ -- $Date: 2012-09-26 15:09:39 +0200 (Wed, 26 Sep 2012) $ -- $Author: fotsing $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ 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;