Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
fe45ea00
Commit
fe45ea00
authored
Apr 20, 2018
by
yoogx
Browse files
Merge branch 'master' of
https://github.com/OpenAADL/ocarina
parents
64dc0a6e
936c9ef1
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-runtime.ads
View file @
fe45ea00
...
...
@@ -164,6 +164,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RE_Encapsulate
,
-- PolyORB_HI.Messages.Encapsulate
RE_Not_Empty
,
-- PolyORB_HI.Messages.Not_Empty
RE_Valid
,
-- PolyORB_HI.Messages.Valid
RE_Size
,
-- PolyORB_HI.Messages.Size
RE_Naming_Entry
,
-- PolyORB_HI.Transport.Naming_Entry
RE_To_HI_String
,
-- PolyORB_HI.Utils.To_HI_String
RE_Naming_Table_Type
,
-- PolyORB_HI.Utils.Naming_Table_Type
...
...
@@ -262,6 +263,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RE_Encapsulate
=>
RU_PolyORB_HI_Messages
,
RE_Not_Empty
=>
RU_PolyORB_HI_Messages
,
RE_Valid
=>
RU_PolyORB_HI_Messages
,
RE_Size
=>
RU_PolyORB_HI_Messages
,
RE_Naming_Entry
=>
RU_PolyORB_HI_Utils
,
RE_To_HI_String
=>
RU_PolyORB_HI_Utils
,
RE_Naming_Table_Type
=>
RU_PolyORB_HI_Utils
,
...
...
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-transport.adb
View file @
fe45ea00
...
...
@@ -35,6 +35,7 @@ with Ocarina.ME_AADL;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Entities
;
with
Ocarina
.
Backends
.
Ada_Values
;
with
Ocarina
.
Backends
.
Utils
;
with
Ocarina
.
Backends
.
Properties
;
...
...
@@ -54,6 +55,7 @@ package body Ocarina.Backends.PO_HI_Ada.Transport is
use
Ocarina
.
Backends
.
Ada_Tree
.
Nutils
;
use
Ocarina
.
Backends
.
PO_HI_Ada
.
Mapping
;
use
Ocarina
.
Backends
.
PO_HI_Ada
.
Runtime
;
use
Ocarina
.
Backends
.
Ada_Values
;
package
AAU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
package
ADN
renames
Ocarina
.
Backends
.
Ada_Tree
.
Nodes
;
...
...
@@ -510,6 +512,8 @@ package body Ocarina.Backends.PO_HI_Ada.Transport is
Alternatives
:
constant
List_Id
:=
New_List
(
ADN
.
K_List_Id
);
N
:
Node_Id
;
T
:
Node_Id
;
Msg_T
:
Node_Id
;
begin
pragma
Assert
(
AAU
.
Is_Process
(
E
));
...
...
@@ -539,22 +543,38 @@ package body Ocarina.Backends.PO_HI_Ada.Transport is
N
:=
Make_Used_Package
(
RU
(
RU_PolyORB_HI_Generated_Deployment
));
Append_Node_To_List
(
N
,
Declarations
);
N
:=
Make_Range_Constraint
(
Make_Literal
(
New_Integer_Value
(
1
,
1
,
10
)),
Make_Subprogram_Call
(
RE
(
RE_Size
),
Make_List_Id
(
Make_Defining_Identifier
(
PN
(
P_Message
)))));
Msg_T
:=
Make_Subprogram_Call
(
RE
(
RE_Stream_Element_Array
),
Make_List_Id
(
N
));
N
:=
Make_Object_Declaration
(
Defining_Identifier
=>
Make_Defining_Identifier
(
PN
(
P_Msg
)),
Constant_Present
=>
True
,
Object_Definition
=>
RE
(
RE_Stream_Element_Array
),
Expression
=>
Make_Subprogram_Call
(
RE
(
RE_Encapsulate
),
Make_List_Id
(
Make_Defining_Identifier
(
PN
(
P_Message
)),
Make_Defining_Identifier
(
PN
(
P_From
)),
Make_Defining_Identifier
(
PN
(
P_Entity
)))));
Constant_Present
=>
False
,
Object_Definition
=>
Msg_T
);
Append_Node_To_List
(
N
,
Declarations
);
-- Statements
-- Call Encapsulate
N
:=
Make_Subprogram_Call
(
RE
(
RE_Encapsulate
),
Make_List_Id
(
Make_Defining_Identifier
(
PN
(
P_Message
)),
Make_Defining_Identifier
(
PN
(
P_From
)),
Make_Defining_Identifier
(
PN
(
P_Entity
)),
Make_Defining_Identifier
(
PN
(
P_Msg
))));
Append_Node_To_List
(
N
,
Statements
);
-- The if/elsif statement: for each thread of the current
-- process, we generate a case statement alternative to
-- call its specific sending routine.
...
...
src/backends/po_hi_c/ocarina-backends-po_hi_c-activity.adb
View file @
fe45ea00
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
7
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
8
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- --
...
...
@@ -1141,8 +1141,6 @@ package body Ocarina.Backends.PO_HI_C.Activity is
null
;
end
case
;
Make_Activate_Entrypoint
;
Check_Thread_Consistency
(
E
);
if
Has_Ports
(
E
)
then
...
...
@@ -1224,6 +1222,8 @@ package body Ocarina.Backends.PO_HI_C.Activity is
Append_Node_To_List
(
N
,
Statements
);
end
if
;
Make_Activate_Entrypoint
;
-- If the thread is sporadic or aperiodic, we generate the
-- call to block waiting for events.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment