------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- This source file was automatically generated by Platypus
-- see http://dossen.univ-brest.fr/apl
--
-- Any modification of this file will be lost.
-- Please see the "platypus" directory instead : it contains the Cheddar's
-- model and its meta-model.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- 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
-- To post to this mailing list, you must be subscribed
-- (see http//beru.univ-brest.fr/~singhoff/cheddar for details)
--
------------------------------------------------------------------------------
------------------------------------------------------------------------------
with Text_io;
use Text_io;
with unbounded_strings;
use unbounded_strings;
with primitive_xml_strings;
use primitive_xml_strings;
Package Body Scheduler_Interface is
function XML_String(obj : in Preemptives_Type) return Unbounded_String is
begin
return to_unbounded_string(Preemptives_Type'image (obj) );
end XML_String;
function XML_Ref_String (obj : in Preemptives_Type) return Unbounded_String is
begin
raise xml_ref_string_error;
return to_unbounded_string("");
end XML_Ref_String;
function XML_String(obj : in Schedulers_Type) return Unbounded_String is
begin
return to_unbounded_string(Schedulers_Type'image (obj) );
end XML_String;
function XML_Ref_String (obj : in Schedulers_Type) return Unbounded_String is
begin
raise xml_ref_string_error;
return to_unbounded_string("");
end XML_Ref_String;
-- --------= Scheduling_Parameters =--------
procedure Initialize(obj : out Scheduling_Parameters) is
begin
obj.scheduler_type := No_Scheduling_Protocol;
obj.quantum := 0;
obj.preemptive_type := Preemptive;
obj.automaton_name := empty_string;
obj.capacity := 0;
obj.period := 0;
obj.threshold := 0;
obj.priority := 0;
obj.user_defined_scheduler_source := empty_string;
obj.user_defined_scheduler_source_file_name := empty_string;
obj.user_defined_scheduler_protocol_name := empty_string;
obj.start_time := 0;
end Initialize;
procedure Put(obj : in Scheduling_Parameters) is
begin
put("scheduler_type: "); put(obj.scheduler_type); put ( "; " );
put("quantum: "); standards_io.natural_io.put(obj.quantum); put ( "; " );
put("preemptive_type: "); put(obj.preemptive_type); put ( "; " );
put("automaton_name: "); put(obj.automaton_name); put ( "; " );
put("capacity: "); standards_io.natural_io.put(obj.capacity); put ( "; " );
put("period: "); standards_io.natural_io.put(obj.period); put ( "; " );
put("threshold: "); standards_io.natural_io.put(obj.threshold); put ( "; " );
put("priority: "); put(obj.priority); put ( "; " );
put("user_defined_scheduler_source: "); put(obj.user_defined_scheduler_source); put ( "; " );
put("user_defined_scheduler_source_file_name: "); put(obj.user_defined_scheduler_source_file_name); put ( "; " );
put("user_defined_scheduler_protocol_name: "); put(obj.user_defined_scheduler_protocol_name); put ( "; " );
put("start_time: "); standards_io.natural_io.put(obj.start_time); put ( "; " );
end Put;
procedure Put(obj : in Scheduling_Parameters_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Build_Attributes_XML_String(obj : in Scheduling_Parameters; result : in out Unbounded_String) is
begin
if (XML_String(obj.scheduler_type) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.scheduler_type) & to_unbounded_string("");
end if;
if (XML_String(obj.quantum) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.quantum) & to_unbounded_string("");
end if;
if (XML_String(obj.preemptive_type) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.preemptive_type) & to_unbounded_string("");
end if;
if (XML_String(obj.automaton_name) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.automaton_name) & to_unbounded_string("");
end if;
if (XML_String(obj.capacity) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.capacity) & to_unbounded_string("");
end if;
if (XML_String(obj.period) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.period) & to_unbounded_string("");
end if;
if (XML_String(obj.threshold) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.threshold) & to_unbounded_string("");
end if;
if (XML_String(obj.priority) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.priority) & to_unbounded_string("");
end if;
if (XML_String(obj.user_defined_scheduler_source) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.user_defined_scheduler_source) & to_unbounded_string("");
end if;
if (XML_String(obj.user_defined_scheduler_source_file_name) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.user_defined_scheduler_source_file_name) & to_unbounded_string("");
end if;
if (XML_String(obj.user_defined_scheduler_protocol_name) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.user_defined_scheduler_protocol_name) & to_unbounded_string("");
end if;
if (XML_String(obj.start_time) /= Empty_String) then
result := result & to_unbounded_string("") & XML_String(obj.start_time) & to_unbounded_string("");
end if;
end Build_Attributes_XML_String;
function XML_String(obj : in Scheduling_Parameters) return Unbounded_String is
result : Unbounded_String;
begin
result := to_unbounded_string("");
Build_Attributes_XML_String(obj, result);
result := result & to_unbounded_string("");
return (result);
end XML_String;
function XML_String(obj : in Scheduling_Parameters_Ptr) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Scheduling_Parameters) return Unbounded_String is
result : Unbounded_String;
begin
raise xml_ref_string_error;
return to_unbounded_string("");
end XML_Ref_String;
function Copy ( obj : in Scheduling_Parameters ) return Scheduling_Parameters_Ptr is
New_Scheduling_Parameters : Scheduling_Parameters_Ptr;
begin
New_Scheduling_Parameters := new Scheduling_Parameters'(obj);
return (New_Scheduling_Parameters);
end Copy;
function Copy ( obj : in Scheduling_Parameters_Ptr ) return Scheduling_Parameters_Ptr is
begin
return copy(obj.all);
end Copy;
End Scheduler_Interface;