Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
39271cfb
Commit
39271cfb
authored
Apr 27, 2019
by
Maxime Perrotin
Browse files
Fix port names
parent
d05d1599
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/taste-aadl_parser.adb
View file @
39271cfb
...
...
@@ -332,8 +332,8 @@ package body TASTE.AADL_Parser is
RI
.
Remote_Interfaces
.
First_Element
;
Remote_Thread_Name
:
constant
Unbounded_String
:=
Dist
.
Function_Name
&
"_"
&
Dist
.
Interface_Name
;
Port_Name
:
constant
Unbounded_String
:=
Remote_Thread_Name
&
"_"
&
Dist
.
Interface_Name
;
Port_Name
:
constant
Unbounded_String
:=
RI
.
Name
;
--
Remote_Thread_Name & "_" & Dist.Interface_Name;
New_P
:
constant
Port
:=
(
Name
=>
Port_Name
,
Remote_Thread
=>
Remote_Thread_Name
,
...
...
src/taste-concurrency_view.adb
View file @
39271cfb
...
...
@@ -109,11 +109,13 @@ package body TASTE.Concurrency_View is
-- This function translates a thread definition into a template
function
To_Template
(
T
:
AADL_Thread
)
return
Translate_Set
is
Remote_Thread
:
Vector_Tag
;
RI_Port_Name
:
Vector_Tag
;
-- Name of the local RI (= port name)
Remote_PI
:
Vector_Tag
;
-- Name of the remote PI
Remote_PI_Sort
:
Vector_Tag
;
-- ASN.1 type of the parameter
Remote_PI_Module
:
Vector_Tag
;
-- ASN.1 module containing the type
begin
for
Out_Port
of
T
.
Output_Ports
loop
RI_Port_Name
:=
RI_Port_Name
&
Out_Port
.
Name
;
Remote_Thread
:=
Remote_Thread
&
To_String
(
Out_Port
.
Remote_Thread
);
Remote_PI
:=
Remote_PI
&
To_String
(
Out_Port
.
Remote_PI
);
-- Set the Asn.1 module and type of the optional RI parameter
...
...
@@ -137,6 +139,7 @@ package body TASTE.Concurrency_View is
&
Assoc
(
"Node_Name"
,
To_String
(
T
.
Node
.
Value_Or
(
Taste_Node
'(
Name
=>
US
(
""
),
others
=>
<>
)).
Name
))
&
Assoc
(
"Remote_Threads"
,
Remote_Thread
)
&
Assoc
(
"RI_Port_Names"
,
RI_Port_Name
)
&
Assoc
(
"Remote_PIs"
,
Remote_PI
)
&
Assoc
(
"Remote_PI_Sorts"
,
Remote_PI_Sort
)
&
Assoc
(
"Remote_PI_Modules"
,
Remote_PI_Module
);
...
...
templates/concurrency_view/aadl_2_threads/partition.tmplt
View file @
39271cfb
...
...
@@ -30,6 +30,6 @@ subcomponents
@@END_TABLE@@
connections
@@TABLE@@
port @_
LOWER
:Thread_Src_Name_@.OUTPORT_@_
LOWER
:Thread_Src_Port_@ -> @_
LOWER
:Thread_Dst_Name_@.INPORT_@_
LOWER
:Thread_Dst_Port_@;
port @_
CAPITALIZE
:Thread_Src_Name_@.OUTPORT_@_
CAPITALIZE
:Thread_Src_Port_@ -> @_
CAPITALIZE
:Thread_Dst_Name_@.INPORT_@_
CAPITALIZE
:Thread_Dst_Port_@;
@@END_TABLE@@
end @_Name_@.final;
templates/concurrency_view/aadl_2_threads/thread.tmplt
View file @
39271cfb
...
...
@@ -6,6 +6,7 @@
@@--
@
_Pro_Block_Name_
@
:
Name
of
the
protected
function
@@--
@
_Node_Name_
@
:
Name
of
the
deployment
node
@@--
@
_Remote_Threads_
@
:
Vector
tag
:
output
remote
thread
list
@@--
@
_RI_Port_Name_
@
:
|
_
Corresponding
local
RI
name
@@--
@
_Remote_PIs_
@
:
|
_
Associated
PI
Name
@@--
@
_Remote_PI_Sorts_
@
:
|
_
Optional
param
type
of
the
remote
thread
@@--
@
_Remote_PI_Modules_
@
:
|
_
Asn1
module
of
the
optional
param
type
...
...
@@ -29,9 +30,9 @@ features
@@IF@@ @_RCM_@ /= "CYCLIC_OPERATION"
@@INLINE( )()()@@
@@IF@@ @_Param_Names'
Length_
@
>
0
INPORT_
@
_Entry_Port_Name_
@
:
in
event
data
port
DataView
::@
_REPLACE_ALL
((-)/
_
):
Param_Types_
@
_Buffer
.
impl
INPORT_
@
_
CAPITALIZE
:
Entry_Port_Name_
@
:
in
event
data
port
DataView
::@
_REPLACE_ALL
((-)/
_
):
Param_Types_
@
_Buffer
.
impl
@@
ELSE
@@
INPORT_
@
_Entry_Port_Name_
@
:
in
event
port
INPORT_
@
_
CAPITALIZE
:
Entry_Port_Name_
@
:
in
event
port
@@
END_IF
@@
@@
END_INLINE
@@
{
Compute_Execution_Time
=>
@
_WCET_
@
ms
..
@
_WCET_
@
ms
;
...
...
@@ -41,9 +42,9 @@ features
@@
TABLE
@@
@@
INLINE
(
)()()@@
@@
IF
@@
@
_Remote_PI_Sorts_
@
/=
""
OUTPORT_
@
_
Remote_PI
s_
@
:
out
event
data
port
DataView
::@
_REPLACE_ALL
((-)/
_
):
Remote_PI_Sorts_
@
_Buffer
.
impl
;
OUTPORT_
@
_
CAPITALIZE
:
RI_Port_Name
s_
@
:
out
event
data
port
DataView
::@
_REPLACE_ALL
((-)/
_
):
Remote_PI_Sorts_
@
_Buffer
.
impl
;
@@
ELSE
@@
OUTPORT_
@
_
Remote_PI
s_
@
:
out
event
port
;
OUTPORT_
@
_
CAPITALIZE
:
RI_Port_Name
s_
@
:
out
event
port
;
@@
END_IF
@@
@@
END_INLINE
@@
@@
END_TABLE
@@
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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