------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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 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 Ada.Text_IO; use Ada.Text_IO; 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_cb(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_cb(Gtk_Widget(my_widget)); gtk.main.main_quit; end cancel; end graphical_editor.aadl_options_callbacks;