Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Ocarina
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
Ocarina
Commits
371457e6
Commit
371457e6
authored
May 19, 2017
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Generate accessors for ports depending on presence/absence
of input/output ports For issue #91
parent
818f742d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
53 deletions
+71
-53
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-activity.adb
...ackends/po_hi_ada/ocarina-backends-po_hi_ada-activity.adb
+71
-53
No files found.
src/backends/po_hi_ada/ocarina-backends-po_hi_ada-activity.adb
View file @
371457e6
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-201
7
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- --
...
...
@@ -926,6 +926,10 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
procedure
Runtime_Routine_Specs
(
E
:
Node_Id
)
is
N
:
Node_Id
;
begin
if
Has_Out_Ports
(
E
)
then
-- The following functions are made visible iff the
-- thread has *out* ports
-- Send_Output
N
:=
Send_Output_Spec
(
E
);
...
...
@@ -936,6 +940,11 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
N
:=
Put_Value_Spec
(
E
);
Bind_AADL_To_Put_Value
(
Identifier
(
E
),
N
);
Append_Node_To_List
(
N
,
ADN
.
Visible_Part
(
Current_Package
));
end
if
;
if
Has_In_Ports
(
E
)
then
-- The following functions are made visible iff the
-- thread has *in* ports
-- Receive_Input
...
...
@@ -977,6 +986,7 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
N
:=
Wait_For_Incoming_Events_Spec
(
E
);
Append_Node_To_List
(
N
,
ADN
.
Visible_Part
(
Current_Package
));
end
if
;
end
Runtime_Routine_Specs
;
-----------
...
...
@@ -4100,12 +4110,18 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
-- per thread component.
if
Not_Handled
then
if
Has_Out_Ports
(
E
)
then
Implement_Subprogram
(
Send_Output_Spec
(
E
),
RR_Send_Output
,
True
);
Implement_Subprogram
(
Put_Value_Spec
(
E
),
RR_Put_Value
);
Implement_Subprogram
(
Receive_Input_Spec
(
E
),
RR_Receive_Input
);
end
if
;
if
Has_In_Ports
(
E
)
then
Implement_Subprogram
(
Receive_Input_Spec
(
E
),
RR_Receive_Input
);
Implement_Subprogram
(
Get_Value_Spec
(
E
),
RR_Get_Value
);
Implement_Subprogram
(
Get_Sender_Spec
(
E
),
RR_Get_Sender
);
Implement_Subprogram
(
Get_Count_Spec
(
E
),
RR_Get_Count
);
...
...
@@ -4113,12 +4129,14 @@ package body Ocarina.Backends.PO_HI_Ada.Activity is
(
Get_Time_Stamp_Spec
(
E
),
RR_Get_Time_Stamp
);
Implement_Subprogram
(
Next_Value_Spec
(
E
),
RR_Next_Value
);
Implement_Subprogram
(
Store_Received_Message_Spec
(
E
),
RR_Store_Received_Message
);
Implement_Subprogram
(
Wait_For_Incoming_Events_Spec
(
E
),
RR_Wait_For_Incoming_Events
);
Implement_Subprogram
(
Store_Received_Message_Spec
(
E
),
RR_Store_Received_Message
);
end
if
;
else
-- Complete the case alternatives corresponding to the
-- current instance.
...
...
Write
Preview
Markdown
is supported
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