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
598348c0
Commit
598348c0
authored
Aug 06, 2016
by
Jerome Hugues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Demonstrate usage of getSourcePorts and getDestinationPorts
parent
b597f33d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
resources/runtime/python/test/visitor.py
resources/runtime/python/test/visitor.py
+5
-2
No files found.
resources/runtime/python/test/visitor.py
View file @
598348c0
...
...
@@ -31,6 +31,8 @@ args = sys.argv[1:]
import
ocarina
import
lmp
from
ocarina_common_tools
import
*
import
libocarina_python
def
visitor
(
component
,
level
):
"""
...
...
@@ -49,14 +51,15 @@ def visitor (component, level):
if
features
is
not
None
:
print
' '
*
level
,
' -> features:'
,
features
for
feature
in
features
:
print
' '
*
level
,
' -> '
,
feature
,
","
,
lmp
.
getInstanceName
(
feature
)[
0
]
print
' '
*
level
,
' -> feature:'
,
feature
,
', '
,
lmp
.
getInstanceName
(
feature
)[
0
]
print
' '
*
level
,
' source feature: '
,
lmp
.
getInstanceName
(
ocarina
.
getSourcePorts
(
feature
)[
0
])[
0
]
print
' '
*
level
,
' destination feature: '
,
lmp
.
getInstanceName
(
ocarina
.
getDestinationPorts
(
feature
)[
0
])[
0
]
properties
=
ocarina
.
AIN
.
Properties
(
component
)[
0
];
if
properties
is
not
None
:
print
' '
*
level
,
' -> properties:'
for
property
in
properties
:
print
' '
*
level
,
' '
,
ocarina
.
getPropertyValue
(
component
,
property
)[
0
]
print
'[looking for priority] '
*
level
,
' '
,
ocarina
.
getPropertyValueByName
(
component
,
u'priority'
)[
0
]
subcomponents
=
ocarina
.
AIN
.
Subcomponents
(
component
)[
0
];
if
subcomponents
is
not
None
:
...
...
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