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
57349d3c
Commit
57349d3c
authored
Apr 29, 2015
by
arnaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the getRoot function to retrieve the root form the currently instantiated model
parent
38a0e351
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
src/python/ocarina-python_cmd.adb
src/python/ocarina-python_cmd.adb
+23
-0
No files found.
src/python/ocarina-python_cmd.adb
View file @
57349d3c
...
...
@@ -134,6 +134,24 @@ package body Ocarina.Python_Cmd is
Ocarina
.
Utils
.
Instantiate
(
Nth_Arg
(
Data
,
1
,
""
));
end
On_Instantiate
;
----------------------
-- On_Get_AADL_Root --
----------------------
procedure
On_Get_AADL_Root
(
Data
:
in
out
Callback_Data
'
Class
;
Command
:
String
);
procedure
On_Get_AADL_Root
(
Data
:
in
out
Callback_Data
'
Class
;
Command
:
String
)
is
pragma
Unreferenced
(
Command
);
begin
Set_Return_Value
(
Data
,
Integer
'
Image
(
Integer
(
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
.
Root_System
(
Ocarina
.
Utils
.
Get_AADL_Root
))));
end
On_Get_AADL_Root
;
----------------
-- On_Analyze --
----------------
...
...
@@ -646,6 +664,11 @@ package body Ocarina.Python_Cmd is
(
Repo
,
"instantiate"
,
1
,
1
,
Handler
=>
On_Instantiate
'
Unrestricted_Access
);
-- getRoot() function
Register_Command
(
Repo
,
"getRoot"
,
0
,
0
,
Handler
=>
On_Get_AADL_Root
'
Unrestricted_Access
);
-- generate() function
Register_Command
(
Repo
,
"generate"
,
1
,
1
,
...
...
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