------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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-2023, Frank Singhoff, Alain Plantec, Jerome Legrand, -- Hai Nam Tran, Stephane Rubini -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285, 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 README.md -- -- 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: 3657 $ -- $Date: 2020-12-13 13:25:49 +0100 (dim., 13 déc. 2020) $ -- $Author: nam $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Gtk.Text_Iter; use Gtk.Text_Iter; with Gtk.Text_Buffer; use Gtk.Text_Buffer; with Glib; use Glib; with Glib.Object; use Glib.Object; with Gtk; use Gtk; with Gtk.Widget; use Gtk.Widget; with Gtk.Combo_Box; use Gtk.Combo_Box; with Gtk.Combo_Box_Text; use Gtk.Combo_Box_Text; with translate; use translate; with framework_config; use framework_config; with processors; use processors; with processor_set; use processor_set; with call_framework; use call_framework; with call_framework_interface; use call_framework_interface; use call_framework_interface.framework_request_package; use call_framework_interface.framework_response_package; with graphical_editor.message_text; use graphical_editor.message_text; with graphical_editor.user_message; use graphical_editor.user_message; package body graphical_editor.priorities_audsley_callbacks is line_number : Integer := 0; procedure close_widget (object : access gtkada_builder_record'class) is my_widget : gobject; begin my_widget := Get_Object (object, "window1"); Destroy(gtk_widget (my_widget)); end close_widget; procedure set_priorities_audsley_opa (object : access gtkada_builder_record'class) is my_widget : gobject; value : Unbounded_String; my_iterator : processors_iterator; a_processor : generic_processor_ptr; response_list : framework_response_table; request_list : framework_request_table; a_request : framework_request; begin my_widget := Get_Object (object, "combobox1"); value := To_Unbounded_String (Get_Active_Text (gtk_combo_box_text (my_widget))); loop current_element (sys.processors, a_processor, my_iterator); if a_processor.name = value then close_widget (object); initialize (a_request); a_request.target := value; a_request.statement := scheduling_set_priorities_according_to_audsley_opa; add (request_list, a_request); sequential_framework_request (sys, request_list, response_list); write_title_and_text (response_list); -- Do not forget to save project -- since tasks are modified !! -- is_new := False; is_saved := False; end if; exit when is_last_element (sys.processors, my_iterator); next_element (sys.processors, my_iterator); end loop; end set_priorities_audsley_opa; end graphical_editor.priorities_audsley_callbacks;