------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Ada.Text_IO; use Ada.Text_IO; with Glib; use Glib; with Glib.Object; use Glib.Object; with Gtk; use Gtk; with Gtk.Main; use Gtk.Main; with Gtk.Widget; use Gtk.Widget; with aadl_config; use aadl_config; package body graphical_editor.aadl_options_callbacks is procedure ok (object : access gtkada_builder_record'class) is my_widget : gobject; begin my_widget := Get_Object (object, "window1"); -- Activate AADL Debug switch -- if Get_Active (gtk_check_button (Get_Object (object, "checkbutton11"))) then aadl_debug := True; else aadl_debug := False; end if; -- Include system/sub-system name in Cheddar's features name -- if Get_Active (gtk_check_button (Get_Object (object, "checkbutton1"))) then aadl_import_with_system_name := True; else aadl_import_with_system_name := False; end if; -- Transform event and event data port to task precedencies -- if Get_Active (gtk_check_button (Get_Object (object, "checkbutton4"))) then aadl_import_event_to_precedencies := True; else aadl_import_event_to_precedencies := False; end if; if Get_Active (gtk_check_button (Get_Object (object, "checkbutton5"))) then aadl_import_event_data_to_precedencies := True; else aadl_import_event_data_to_precedencies := False; end if; -- Transform event port and event data port to buffers and messages -- (it automatically includes buffer/message task dependencies) -- if Get_Active (gtk_check_button (Get_Object (object, "checkbutton2"))) then aadl_import_event_to_buffers_messages := True; else aadl_import_event_to_buffers_messages := False; end if; if Get_Active (gtk_check_button (Get_Object (object, "checkbutton3"))) then aadl_import_event_data_to_buffers_messages := True; else aadl_import_event_data_to_buffers_messages := False; end if; -- Transform task precedencies to event port -- if Get_Active (gtk_check_button (Get_Object (object, "checkbutton9"))) then aadl_export_precedencies_to_event := True; else aadl_export_precedencies_to_event := False; end if; -- Transform task precedencies to event data port -- if Get_Active (gtk_check_button (Get_Object (object, "checkbutton10"))) then aadl_export_precedencies_to_event_data := True; else aadl_export_precedencies_to_event_data := False; end if; -- Transform task precedencies to a Cheddar property -- if Get_Active (gtk_check_button (Get_Object (object, "checkbutton8"))) then aadl_export_precedencies_to_properties := True; else aadl_export_precedencies_to_properties := False; end if; -- Process second and third AADL import passes -- if Get_Active (gtk_check_button (Get_Object (object, "checkbutton6"))) then aadl_process_second_import_pass := True; else aadl_process_second_import_pass := False; end if; if Get_Active (gtk_check_button (Get_Object (object, "checkbutton7"))) then aadl_process_third_import_pass := True; else aadl_process_third_import_pass := False; end if; Destroy (gtk_widget (my_widget)); Gtk.Main.Main_Quit; end ok; procedure cancel (object : access gtkada_builder_record'class) is my_widget : gobject; begin my_widget := Get_Object (object, "window1"); Destroy (gtk_widget (my_widget)); Gtk.Main.Main_Quit; end cancel; end graphical_editor.aadl_options_callbacks;