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
56f8884e
Commit
56f8884e
authored
Jun 20, 2018
by
Maxime Perrotin
Browse files
Merge
https://github.com/openaadl/ocarina
parents
d0e4914a
6b19efc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-naming.adb
View file @
56f8884e
...
@@ -47,6 +47,7 @@ with Ocarina.Backends.Ada_Tree.Nutils;
...
@@ -47,6 +47,7 @@ with Ocarina.Backends.Ada_Tree.Nutils;
with
Ocarina
.
Backends
.
Ada_Tree
.
Nodes
;
with
Ocarina
.
Backends
.
Ada_Tree
.
Nodes
;
with
Ocarina
.
Backends
.
Ada_Values
;
with
Ocarina
.
Backends
.
Ada_Values
;
with
Ocarina
.
AADL_Values
;
package
body
Ocarina
.
Backends
.
PO_HI_Ada
.
Naming
is
package
body
Ocarina
.
Backends
.
PO_HI_Ada
.
Naming
is
...
@@ -63,7 +64,6 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
...
@@ -63,7 +64,6 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
use
Ocarina
.
Backends
.
Ada_Values
;
use
Ocarina
.
Backends
.
Ada_Values
;
use
Ocarina
.
Instances
.
Queries
;
use
Ocarina
.
Instances
.
Queries
;
package
ADV
renames
Ocarina
.
Backends
.
Ada_Values
;
package
AAU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
package
AAU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
package
ADN
renames
Ocarina
.
Backends
.
Ada_Tree
.
Nodes
;
package
ADN
renames
Ocarina
.
Backends
.
Ada_Tree
.
Nodes
;
...
@@ -187,7 +187,7 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
...
@@ -187,7 +187,7 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
Make_List_Id
(
Make_Literal
(
New_String_Value
(
Location
))));
Make_List_Id
(
Make_Literal
(
New_String_Value
(
Location
))));
end
if
;
end
if
;
if
Port_Number
=
ADV
.
No_Value
then
if
Port_Number
=
Ocarina
.
AADL_Values
.
No_Value
then
P
:=
Make_Literal
(
New_Integer_Value
(
0
,
1
,
10
));
P
:=
Make_Literal
(
New_Integer_Value
(
0
,
1
,
10
));
else
else
P
:=
Make_Literal
(
To_Ada_Value
(
Port_Number
));
P
:=
Make_Literal
(
To_Ada_Value
(
Port_Number
));
...
@@ -391,15 +391,25 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
...
@@ -391,15 +391,25 @@ package body Ocarina.Backends.PO_HI_Ada.Naming is
and
then
AAU
.
Is_Process
(
Corresponding_Instance
(
S
))
and
then
AAU
.
Is_Process
(
Corresponding_Instance
(
S
))
and
then
Is_Added
(
Corresponding_Instance
(
S
),
Bus
,
E
)
and
then
Is_Added
(
Corresponding_Instance
(
S
),
Bus
,
E
)
then
then
-- For default transport API, the configuration
-- is captured at the level of the process
N
:=
Naming_Information
(
Corresponding_Instance
(
S
));
N
:=
Naming_Information
(
Corresponding_Instance
(
S
));
Append_Node_To_List
(
N
,
Naming_Table_List
);
Append_Node_To_List
(
N
,
Naming_Table_List
);
elsif
Transport_API
=
Transport_User
elsif
Transport_API
=
Transport_User
and
then
AAU
.
Is_Device
(
Corresponding_Instance
(
S
))
and
then
AAU
.
Is_Process
(
Corresponding_Instance
(
S
))
and
then
Is_Connected
(
Bus
,
S
)
and
then
Is_Added
(
Corresponding_Instance
(
S
),
Bus
,
E
)
and
then
Is_Added
(
Corresponding_Instance
(
S
),
Bus
,
E
)
then
then
N
:=
Naming_Information
(
Corresponding_Instance
(
S
));
-- For user-defined transport, the configuration
-- is captured in the device that supports the
-- communication
N
:=
Naming_Information
(
Corresponding_Instance
(
Get_Device_Of_Process
(
Bus
,
Corresponding_Instance
(
S
))));
Append_Node_To_List
(
N
,
Naming_Table_List
);
Append_Node_To_List
(
N
,
Naming_Table_List
);
end
if
;
end
if
;
...
...
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