Commit 737bae87 authored by yoogx's avatar yoogx
Browse files

* Split PolyORB_HI_Generated.Activity in

          PolyORB_HI_Generated.Activity and PolyORB_HI_Generated.Job

          For openaadl/ocarina#221
parent d8f7fcca
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. -- -- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -2816,160 +2816,6 @@ package body Ocarina.Backends.Ada_Tree.Nutils is ...@@ -2816,160 +2816,6 @@ package body Ocarina.Backends.Ada_Tree.Nutils is
end case; end case;
end Set_Homogeneous_Parent_Unit_Name; end Set_Homogeneous_Parent_Unit_Name;
----------------------
-- Set_Helpers_Body --
----------------------
procedure Set_Helpers_Body (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Implementation (Helpers_Package (X));
end Set_Helpers_Body;
----------------------
-- Set_Helpers_Spec --
----------------------
procedure Set_Helpers_Spec (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Specification (Helpers_Package (X));
end Set_Helpers_Spec;
-----------------------
-- Set_Servants_Body --
-----------------------
procedure Set_Servants_Body (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Implementation (Servants_Package (X));
end Set_Servants_Body;
-----------------------
-- Set_Servants_Spec --
-----------------------
procedure Set_Servants_Spec (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Specification (Servants_Package (X));
end Set_Servants_Spec;
--------------------
-- Set_Setup_Spec --
--------------------
procedure Set_Setup_Spec (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Specification (Setup_Package (X));
end Set_Setup_Spec;
--------------------
-- Set_Setup_Body --
--------------------
procedure Set_Setup_Body (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Implementation (Setup_Package (X));
end Set_Setup_Body;
-------------------------
-- Set_Namespaces_Spec --
-------------------------
procedure Set_Namespaces_Spec (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Specification (Namespaces_Package (X));
end Set_Namespaces_Spec;
-------------------------
-- Set_Namespaces_Body --
-------------------------
procedure Set_Namespaces_Body (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Implementation (Namespaces_Package (X));
end Set_Namespaces_Body;
-------------------------
-- Set_Parameters_Body --
-------------------------
procedure Set_Parameters_Body (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Implementation (Parameters_Package (X));
end Set_Parameters_Body;
-------------------------
-- Set_Parameters_Spec --
-------------------------
procedure Set_Parameters_Spec (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Specification (Parameters_Package (X));
end Set_Parameters_Spec;
---------------------------
-- Set_Obj_Adapters_Spec --
---------------------------
procedure Set_Obj_Adapters_Spec (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Specification (Obj_Adapters_Package (X));
end Set_Obj_Adapters_Spec;
------------------- -------------------
-- Set_Main_Body -- -- Set_Main_Body --
------------------- -------------------
...@@ -3054,6 +2900,34 @@ package body Ocarina.Backends.Ada_Tree.Nutils is ...@@ -3054,6 +2900,34 @@ package body Ocarina.Backends.Ada_Tree.Nutils is
Package_Specification (Activity_Package (X)); Package_Specification (Activity_Package (X));
end Set_Activity_Spec; end Set_Activity_Spec;
------------------
-- Set_Job_Body --
------------------
procedure Set_Job_Body (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Implementation (Job_Package (X));
end Set_Job_Body;
------------------
-- Set_Job_Spec --
------------------
procedure Set_Job_Spec (N : Node_Id := No_Node) is
X : Node_Id := N;
begin
if No (X) then
X := Table (Last).Current_Entity;
end if;
Table (Last).Current_Package :=
Package_Specification (Job_Package (X));
end Set_Job_Spec;
------------------------ ------------------------
-- Set_Transport_Body -- -- Set_Transport_Body --
------------------------ ------------------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. -- -- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -850,30 +850,10 @@ package Ocarina.Backends.Ada_Tree.Nutils is ...@@ -850,30 +850,10 @@ package Ocarina.Backends.Ada_Tree.Nutils is
-- * K_Designator : The parent unit name is a K_Designator and the -- * K_Designator : The parent unit name is a K_Designator and the
-- parent unit name of its defining identifier is also set up. -- parent unit name of its defining identifier is also set up.
-- Units setters for the PolyORB-QoS Module
procedure Set_Main_Body (N : Node_Id := No_Node);
procedure Set_Helpers_Body (N : Node_Id := No_Node);
procedure Set_Helpers_Spec (N : Node_Id := No_Node);
procedure Set_Servants_Body (N : Node_Id := No_Node);
procedure Set_Servants_Spec (N : Node_Id := No_Node);
procedure Set_Parameters_Body (N : Node_Id := No_Node);
procedure Set_Parameters_Spec (N : Node_Id := No_Node);
procedure Set_Setup_Body (N : Node_Id := No_Node);
procedure Set_Setup_Spec (N : Node_Id := No_Node);
procedure Set_Namespaces_Body (N : Node_Id := No_Node);
procedure Set_Namespaces_Spec (N : Node_Id := No_Node);
procedure Set_Obj_Adapters_Spec (N : Node_Id := No_Node);
-- Units Setters for the PolyORB-HI module -- Units Setters for the PolyORB-HI module
procedure Set_Main_Spec (N : Node_Id := No_Node); procedure Set_Main_Spec (N : Node_Id := No_Node);
procedure Set_Main_Body (N : Node_Id := No_Node);
procedure Set_Marshallers_Spec (N : Node_Id := No_Node); procedure Set_Marshallers_Spec (N : Node_Id := No_Node);
procedure Set_Marshallers_Body (N : Node_Id := No_Node); procedure Set_Marshallers_Body (N : Node_Id := No_Node);
...@@ -881,6 +861,9 @@ package Ocarina.Backends.Ada_Tree.Nutils is ...@@ -881,6 +861,9 @@ package Ocarina.Backends.Ada_Tree.Nutils is
procedure Set_Activity_Spec (N : Node_Id := No_Node); procedure Set_Activity_Spec (N : Node_Id := No_Node);
procedure Set_Activity_Body (N : Node_Id := No_Node); procedure Set_Activity_Body (N : Node_Id := No_Node);
procedure Set_Job_Spec (N : Node_Id := No_Node);
procedure Set_Job_Body (N : Node_Id := No_Node);
procedure Set_Transport_Spec (N : Node_Id := No_Node); procedure Set_Transport_Spec (N : Node_Id := No_Node);
procedure Set_Transport_Body (N : Node_Id := No_Node); procedure Set_Transport_Body (N : Node_Id := No_Node);
......
...@@ -343,24 +343,13 @@ module Ocarina::Backends::Ada_Tree::Nodes { ...@@ -343,24 +343,13 @@ module Ocarina::Backends::Ada_Tree::Nodes {
Node_Id Entity; Node_Id Entity;
}; };
/* This is the root node of the packages generated specifically for
an PolyORB-QoS Distributed application */
interface QoS_Unit : API_Unit {
Node_Id Helpers_Package;
Node_Id Servants_Package;
Node_Id Parameters_Package;
Node_Id Obj_Adapters_Package;
Node_Id Setup_Package;
Node_Id Namespaces_Package;
};
/* This is the root node of the packages generated specifically for /* This is the root node of the packages generated specifically for
an PolyORB-HI Distributed application */ an PolyORB-HI Distributed application */
interface HI_Unit : API_Unit { interface HI_Unit : API_Unit {
Node_Id Marshallers_Package; Node_Id Marshallers_Package;
Node_Id Activity_Package; Node_Id Activity_Package;
Node_Id Job_Package;
Node_Id Subprograms_Package; Node_Id Subprograms_Package;
Node_Id Transport_Package; Node_Id Transport_Package;
Node_Id Types_Package; Node_Id Types_Package;
......
This diff is collapsed.
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A . B A C K E N D S . P O _ H I _ A D A . J O B --
-- --
-- S p e c --
-- --
-- Copyright (C) 2019 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- Ocarina is maintained by the TASTE project --
-- (taste-users@lists.tuxfamily.org) --
-- --
------------------------------------------------------------------------------
-- This package contains routine to build the subtree relative to the
-- <Node>_Job package that contains the mapping of periodic
-- threads and shared data.
package Ocarina.Backends.PO_HI_Ada.Job is
package Package_Spec is
procedure Visit (E : Node_Id);
end Package_Spec;
package Package_Body is
procedure Visit (E : Node_Id);
end Package_Body;
end Ocarina.Backends.PO_HI_Ada.Job;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. -- -- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -343,6 +343,11 @@ package body Ocarina.Backends.PO_HI_Ada.Main is ...@@ -343,6 +343,11 @@ package body Ocarina.Backends.PO_HI_Ada.Main is
Used => False, Used => False,
Warnings_Off => True, Warnings_Off => True,
Elaborated => True); Elaborated => True);
Add_With_Package
(E => RU (Ru_Polyorb_Hi_Generated_Job, False),
Used => False,
Warnings_Off => True,
Elaborated => True);
if P = Thread_Hybrid then if P = Thread_Hybrid then
Has_Hybrid_Threads := True; Has_Hybrid_Threads := True;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. -- -- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -714,6 +714,16 @@ package body Ocarina.Backends.PO_HI_Ada.Mapping is ...@@ -714,6 +714,16 @@ package body Ocarina.Backends.PO_HI_Ada.Mapping is
Append_Node_To_List (P, L); Append_Node_To_List (P, L);
Bind_AADL_To_Activity (Identifier (E), P); Bind_AADL_To_Activity (Identifier (E), P);
-- The 'Job' package
N := Defining_Identifier (RU (RU_PolyORB_HI_Generated_Job, False));
P := Make_Package_Declaration (N);
ADN.Set_Parent (P, RG);
Set_Distributed_Application_Unit (P, U);
Set_Job_Package (U, P);
Append_Node_To_List (P, L);
Bind_AADL_To_Job (Identifier (E), P);
-- The 'Transport' package -- The 'Transport' package
N := Defining_Identifier (RU (RU_PolyORB_HI_Generated_Transport, False)); N := Defining_Identifier (RU (RU_PolyORB_HI_Generated_Transport, False));
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2018 ESA & ISAE. -- -- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -50,6 +50,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is ...@@ -50,6 +50,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RU_PolyORB_HI_Generated, RU_PolyORB_HI_Generated,
RU_PolyORB_HI_Generated_Activity, RU_PolyORB_HI_Generated_Activity,
RU_PolyORB_HI_Generated_Deployment, RU_PolyORB_HI_Generated_Deployment,
RU_PolyORB_HI_Generated_Job,
RU_PolyORB_HI_Generated_Marshallers, RU_PolyORB_HI_Generated_Marshallers,
RU_PolyORB_HI_Generated_Naming, RU_PolyORB_HI_Generated_Naming,
RU_PolyORB_HI_Generated_Subprograms, RU_PolyORB_HI_Generated_Subprograms,
...@@ -166,6 +167,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is ...@@ -166,6 +167,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RE_Valid, -- PolyORB_HI.Messages.Valid RE_Valid, -- PolyORB_HI.Messages.Valid
RE_Size, -- PolyORB_HI.Messages.Size RE_Size, -- PolyORB_HI.Messages.Size
RE_Naming_Entry, -- PolyORB_HI.Transport.Naming_Entry RE_Naming_Entry, -- PolyORB_HI.Transport.Naming_Entry
RE_Get_Task_Id, -- PolyORB_HI.Utils.Get_Task_Id
RE_To_HI_String, -- PolyORB_HI.Utils.To_HI_String RE_To_HI_String, -- PolyORB_HI.Utils.To_HI_String
RE_Naming_Table_Type, -- PolyORB_HI.Utils.Naming_Table_Type RE_Naming_Table_Type, -- PolyORB_HI.Utils.Naming_Table_Type
RE_Corresponding_Port, -- Po..HI.Port_Types.Corresponding_Port RE_Corresponding_Port, -- Po..HI.Port_Types.Corresponding_Port
...@@ -265,6 +267,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is ...@@ -265,6 +267,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RE_Valid => RU_PolyORB_HI_Messages, RE_Valid => RU_PolyORB_HI_Messages,
RE_Size => RU_PolyORB_HI_Messages, RE_Size => RU_PolyORB_HI_Messages,
RE_Naming_Entry => RU_PolyORB_HI_Utils, RE_Naming_Entry => RU_PolyORB_HI_Utils,
Re_Get_Task_Id => RU_PolyORB_HI_Utils,
RE_To_HI_String => RU_PolyORB_HI_Utils, RE_To_HI_String => RU_PolyORB_HI_Utils,
RE_Naming_Table_Type => RU_PolyORB_HI_Utils, RE_Naming_Table_Type => RU_PolyORB_HI_Utils,
RE_Corresponding_Port => RU_PolyORB_HI_Port_Types, RE_Corresponding_Port => RU_PolyORB_HI_Port_Types,
......
...@@ -43,6 +43,7 @@ with Ocarina.Backends.PO_HI_Ada.Naming; ...@@ -43,6 +43,7 @@ with Ocarina.Backends.PO_HI_Ada.Naming;
with Ocarina.Backends.PO_HI_Ada.Marshallers; with Ocarina.Backends.PO_HI_Ada.Marshallers;
with Ocarina.Backends.PO_HI_Ada.Deployment; with Ocarina.Backends.PO_HI_Ada.Deployment;
with Ocarina.Backends.PO_HI_Ada.Activity; with Ocarina.Backends.PO_HI_Ada.Activity;
with Ocarina.Backends.PO_HI_Ada.Job;
with Ocarina.Backends.PO_HI_Ada.Subprograms; with Ocarina.Backends.PO_HI_Ada.Subprograms;
with Ocarina.Backends.PO_HI_Ada.Transport; with Ocarina.Backends.PO_HI_Ada.Transport;
with Ocarina.Backends.PO_HI_Ada.Types; with Ocarina.Backends.PO_HI_Ada.Types;
...@@ -739,6 +740,7 @@ package body Ocarina.Backends.PO_HI_Ada is ...@@ -739,6 +740,7 @@ package body Ocarina.Backends.PO_HI_Ada is
Types.Package_Spec.Visit (E); Types.Package_Spec.Visit (E);
Subprograms.Package_Spec.Visit (E); Subprograms.Package_Spec.Visit (E);
Activity.Package_Spec.Visit (E); Activity.Package_Spec.Visit (E);
Job.Package_Spec.Visit (E);
Transport.Package_Spec.Visit (E); Transport.Package_Spec.Visit (E);
Marshallers.Package_Spec.Visit (E); Marshallers.Package_Spec.Visit (E);
...@@ -748,6 +750,7 @@ package body Ocarina.Backends.PO_HI_Ada is ...@@ -748,6 +750,7 @@ package body Ocarina.Backends.PO_HI_Ada is
Subprograms.Package_Body.Visit (E); Subprograms.Package_Body.Visit (E);
Transport.Package_Body.Visit (E); Transport.Package_Body.Visit (E);
Activity.Package_Body.Visit (E); Activity.Package_Body.Visit (E);
Job.Package_Body.Visit (E);
Marshallers.Package_Body.Visit (E); Marshallers.Package_Body.Visit (E);
-- The main subprogram -- The main subprogram
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment