------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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 Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Framework_Config; use Framework_Config; use Framework_Config.Priority_Io; with id_generators; use id_generators; with Resources; use Resources; with Tasks; use Tasks; with Messages; use Messages; with Buffers; use Buffers; with Caches; use Caches; with Batteries; use Batteries; with standards_io; use standards_io; use standards_io.natural_io; with Text_io; use Text_io; with Unbounded_Strings; use Unbounded_Strings; use unbounded_strings.Unbounded_String_List_Package; with Convert_Strings; with Convert_Unbounded_Strings; with Ada.Finalization; with Unchecked_Deallocation; with Primitive_XML_Strings; use Primitive_XML_Strings; with Indexed_Tables; with natural_util; use natural_util; with Lists; with ada.strings.unbounded.text_io; use ada.strings.unbounded.text_io; Package Time_Unit_Events is type Time_Unit_Event_Type is ( Start_Of_Task_Capacity, End_Of_Task_Capacity, Write_To_Buffer, Read_From_Buffer, Buffer_Overflow, Buffer_Underflow, Context_Switch_Overhead, Running_Task, Task_activation, Allocate_Resource, Release_Resource, Wait_For_Resource, Send_Message, Receive_Message, Wait_For_Memory, Address_Space_Activation, Preemption, Discard_Missed_Deadline, Mode_change, TDMA_slot, Energy); procedure To_Time_Unit_Event_Type is new Convert_Strings(Time_Unit_Event_Type, Start_Of_Task_Capacity); procedure To_Time_Unit_Event_Type is new Convert_Unbounded_Strings(Time_Unit_Event_Type, Start_Of_Task_Capacity); function XML_String (obj : in Time_Unit_Event_Type) return Unbounded_String; function XML_Ref_String (obj : in Time_Unit_Event_Type) return Unbounded_String; package Time_Unit_Event_Type_io is new text_io.enumeration_io(Time_Unit_Event_Type); use Time_Unit_Event_Type_io; type Time_Unit_Event (type_of_event : Time_Unit_Event_Type ) is record case type_of_event is when start_of_task_capacity => start_task : Generic_Task_Ptr; when end_of_task_capacity => end_task : Generic_Task_Ptr; when write_to_buffer => write_buffer : Buffer_Ptr; write_task : Generic_Task_Ptr; write_size : Natural; write_buffer_current_data_size : Natural; when read_from_buffer => read_buffer : Buffer_Ptr; read_task : Generic_Task_Ptr; read_size : Natural; read_buffer_current_data_size : Natural; when buffer_overflow => overflow_buffer : Buffer_Ptr; overflow_task : Generic_Task_Ptr; overflow_write_size : Natural; overflow_buffer_current_data_size : Natural; when buffer_underflow => underflow_buffer : Buffer_Ptr; underflow_task : Generic_Task_Ptr; underflow_read_size : Natural; underflow_buffer_current_data_size : Natural; when context_switch_overhead => switched_task : Generic_Task_Ptr; when running_task => running_core : Unbounded_String; running_task : Generic_Task_Ptr; current_priority : Priority_Range; CRPD : Natural; cache_state : Unbounded_String; when task_activation => activation_task : Generic_Task_Ptr; when allocate_resource => allocate_task : Generic_Task_Ptr; allocate_resource : Generic_Resource_Ptr; when release_resource => release_task : Generic_Task_Ptr; release_resource : Generic_Resource_Ptr; when wait_for_resource => wait_for_resource_task : Generic_Task_Ptr; wait_for_resource : Generic_Resource_Ptr; when send_message => send_task : Generic_Task_Ptr; send_message : Generic_Message_Ptr; when receive_message => receive_task : Generic_Task_Ptr; receive_message : Generic_Message_Ptr; when wait_for_memory => wait_for_memory_task : Generic_Task_Ptr; wait_for_cache : Generic_Cache_Ptr; when address_space_activation => activation_address_space : Unbounded_String; duration : Natural; when preemption => preempted_task : Generic_Task_Ptr; preempting_task : Generic_Task_Ptr; evicted_ucbs : Natural; when discard_missed_deadline => missed_deadline_task : Generic_Task_Ptr; when energy => energy_battery : Battery_Ptr; energy_level : Natural; when tdma_slot => slot_duration : Natural; slot_message : Generic_Message_Ptr; when mode_change => from_mode : mode_range; to_mode : mode_range; end case; end record; type Time_Unit_Event_Ptr is access all Time_Unit_Event; procedure Initialize(obj : out Time_Unit_Event_Ptr); procedure Put(obj : in Time_Unit_Event_Ptr); function Copy(obj : in Time_Unit_Event_Ptr) return Time_Unit_Event_Ptr; function Copy(obj : in Time_Unit_Event) return Time_Unit_Event_Ptr; function XML_String(obj : in Time_Unit_Event) return Unbounded_String; function XML_String(obj : in Time_Unit_Event_Ptr) return Unbounded_String; procedure Free is new Unchecked_Deallocation (Time_Unit_Event, Time_Unit_Event_Ptr); function XML_Ref_String(obj : in Time_Unit_Event) return Unbounded_String; function XML_Ref_String(obj : in Time_Unit_Event_Ptr) return Unbounded_String; package Time_Unit_Package is new Indexed_Tables(Time_Unit_Event_Ptr, Natural, framework_config.max_scheduling_period, 0, Put, Initialize, Put, Format, XML_String, XML_Ref_String, to_unbounded_string("time_unit")); use Time_Unit_Package; subtype Time_Unit_Range is Time_Unit_Package.indexed_table_range; subtype Time_Unit_Range_Ptr is Time_Unit_Package.indexed_table_range_Ptr; subtype Time_Unit_Table is Time_Unit_Package.indexed_table; subtype Time_Unit_Table_Ptr is Time_Unit_Package.indexed_table_Ptr; package Time_Unit_Lists_Package is new Lists(Time_Unit_Event_Ptr, Put, Free, XML_String); use Time_Unit_Lists_Package; type Time_Unit_Event_Type_Boolean_Table is Array ( Time_Unit_Event_Type'Range ) of Boolean; procedure get_xml (result : in out Unbounded_String; obj : in time_unit_event); procedure get_xml (result : in out Unbounded_String; obj : in time_unit_event_ptr); procedure get_xml (result : in out Unbounded_String; obj : in time_unit_event_type); End Time_Unit_Events;