------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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 free real time scheduling tool. -- This program provides services to automatically check temporal constraints -- of real time tasks. -- -- Copyright (C) 2002-2014 Frank Singhoff -- Cheddar is developed by the LAB-STICC Team, University of Brest -- -- 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 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); 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; 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 write_xml (into : in File_Type; obj : in time_unit_event_type); procedure write_xml (into : in File_Type; obj : in time_unit_event); procedure write_xml (into : in File_Type; obj : in time_unit_event_ptr); end time_unit_events;