------------------------------------- ---------- ----------------------------------- -- -- -- OCARINA COMPONENTS -- -- -- -- OCARINA.GENERATORS.PO_QOS_ADA.MAPPING -- -- -- -- S p e c -- -- -- -- Copyright (C) 2006-2007, GET-Telecom Paris. -- -- -- -- Ocarina is free software; you can redistribute it and/or modify -- -- it under terms of the GNU General Public License as published by the -- -- Free Software Foundation; either version 2, or (at your option) any -- -- later version. Ocarina 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 distributed with Ocarina; see file COPYING. -- -- If not, write to the Free Software Foundation, 51 Franklin Street, Fifth -- -- Floor, Boston, MA 02111-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- Ocarina is maintained by the Ocarina team -- -- (ocarina-users@listes.enst.fr) -- -- -- ------------------------------------------------------------------------------ -- This package contains routines to map entities from the gaia tree -- inti entities of the Ada tree. with Ocarina.Generators.Properties; package Ocarina.Generators.PO_QoS_Ada.Mapping is use Ocarina.Generators.Properties; -- The routines below map Gaia entities into API dependant -- entities. function Map_Distributed_Application (E : node_id) return node_id; -- Create a PolyORB-QoS Ada distributed application node mapped -- from the AADL architecture instance node E. function Map_QoS_Node (E : node_id) return node_id; -- Create a PolyORB-QoS Ada node of a distributed application function Map_QoS_Unit (E : node_id; F : node_id := No_Node) return node_id; -- Create the node that contain all the Ada units generated for a -- particular node of the distributed application. function Map_TC_Variable_Identifier (E : node_id) return node_id; -- Maps a TypeCode variable identifier corresponding to the data -- component instance E. function Map_Record_Field_Identifier (S : node_id) return node_id; -- Maps a record field identifier from the data subcomponent E function Map_Initialize_Identifier (E : node_id) return node_id; -- Maps an identifier for the initialize routine of the data -- component E function Map_Initialized_Flag_Identifier (E : node_id) return node_id; -- Maps an identifier for the boolean flag corresponding to the -- Data component E. function Map_Package_Instantiation_Designator (E : node_id) return node_id; -- Returns a designator for the instantiated package corresponding -- to the node E. function Map_Dependency (Dep : node_id) return node_id; -- Deduces a dependency string from a package name function Map_Object_Type_Identifier (E : node_id) return node_id; -- Maps an identifier for the servant corresponding to thread -- E. function Map_Reference_Identifier (E : node_id) return node_id; -- Maps an identifier for the reference corresponding to the -- destination port E. function Map_Thread_Controller_Identifier (E : node_id) return node_id; -- Maps an identifier for the subprogram that performs the `job' -- of thread E. function Map_Ada_Time (T : time_type) return node_id; -- Create the call from the corresponding Ada real time routines -- to create an Ada time span that corresponds to the given time -- T. If an error occurs (for example if the given time is too -- small to be generated by Ada or the used unit is too fine -- grained (picoseconds), return No_Node. function Map_Ada_Priority (P : unsigned_long_long) return node_id; -- Maps the given AADL priority into an Ada priority function Map_Buffer_Instance_Identifier (P : node_id) return node_id; -- Maps an identifier for a buffer instance corresponding to an -- event [data] port P. function Map_Variable_Identifier (P : node_id) return node_id; -- Maps an identifier for a local variable corresponding to port P function Map_Package_Identifier (E : node_id) return node_id; -- Maps an identifier for the package instantiation corresponding -- to IN port or Bounded string data type E function Map_Mutex_Identifier (E : node_id) return node_id; -- Maps an identifier for the mutex generated for thead E function Map_Port_Argument_Identifier (E : node_id) return node_id; function Map_Port_Boolean_Identifier (E : node_id) return node_id; -- Mapping for entities to handle connections between threads and -- subprograms. function Map_Get_Subprogram_Identifier (E : node_id) return node_id; -- Maps an identifier for the Get_<...> subprogram generated for -- port or a proptected data E. function Map_Put_Subprogram_Identifier (E : node_id) return node_id; -- Maps an identifier for the Put_<...> subprogram generated for -- port E. function Map_Push_Back_Subprogram_Identifier (E : node_id) return node_id; -- Maps an identifier for Push_back_<...> subprogram generated for -- port E. procedure Compute_Servant_Index (T : node_id); -- Computes a new index for the servant corresponding to the -- thread T and set it as the name_table_info of a conventional -- name_id. The incrementation of the index is done for thread in -- the same process. function Get_Servant_Index (T : node_id) return nat; -- Deduce the conventional name_id from the thread T -- names, gets the name_table_info of the obtained name_id and -- returns it. procedure Bind_Ada_Identifier_To_Package (I : node_id; P : node_id); -- Links the Ada Identifier I to the Package declaration P. The -- binding is performed 'by name'. function Get_Bound_Package (I : node_id) return node_id; -- Return the package declaration bound to the Ada identifier -- I. Returns No_Node if no package has been bound to I, I is -- No_Node or the name of I is No_Name. -- The Bind_AADL_To_XXX subprograms creates bindings between a node -- from the Gaia tree and an XXX node procedure Bind_AADL_To_Setup (G : node_id; A : node_id); procedure Bind_AADL_To_Parameters (G : node_id; A : node_id); procedure Bind_AADL_To_Obj_Adapters (G : node_id; A : node_id); procedure Bind_AADL_To_Helpers (G : node_id; A : node_id); procedure Bind_AADL_To_Main (G : node_id; A : node_id); procedure Bind_AADL_To_Servants (G : node_id; A : node_id); procedure Bind_AADL_To_Namespaces (G : node_id; A : node_id); procedure Bind_AADL_To_TypeCode (G : node_id; A : node_id); procedure Bind_AADL_To_Execute_Servant (G : node_id; A : node_id); procedure Bind_AADL_To_From_Any (G : node_id; A : node_id); procedure Bind_AADL_To_Initialize (G : node_id; A : node_id); procedure Bind_AADL_To_Reference (G : node_id; A : node_id); procedure Bind_AADL_To_Subprogram (G : node_id; A : node_id); procedure Bind_AADL_To_Feature_Subprogram (G : node_id; A : node_id); procedure Bind_AADL_To_Set (G : node_id; A : node_id); procedure Bind_AADL_To_Build (G : node_id; A : node_id); procedure Bind_AADL_To_To_Any (G : node_id; A : node_id); procedure Bind_AADL_To_Thread_Controller (G : node_id; A : node_id); procedure Bind_AADL_To_Type_Definition (G : node_id; A : node_id); procedure Bind_AADL_To_Put (G : node_id; A : node_id); procedure Bind_AADL_To_Push_Back (G : node_id; A : node_id); procedure Bind_AADL_To_Get (G : node_id; A : node_id); procedure Bind_AADL_To_Package (G : node_id; A : node_id); end Ocarina.Generators.PO_QoS_Ada.Mapping;