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
62beb57f
Commit
62beb57f
authored
Apr 11, 2014
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Package Ocarina Python API
parent
28f3a440
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
2 deletions
+65
-2
configure.ac
configure.ac
+2
-1
resources/runtime/Makefile.am
resources/runtime/Makefile.am
+1
-1
resources/runtime/python/Makefile.am
resources/runtime/python/Makefile.am
+11
-0
resources/runtime/python/ocarina.py
resources/runtime/python/ocarina.py
+51
-0
No files found.
configure.ac
View file @
62beb57f
...
...
@@ -406,8 +406,9 @@ AC_OUTPUT([
resources/Makefile
resources/behavioural_properties/Makefile
resources/runtime/Makefile
resources/runtime/cheddar/Makefile
resources/runtime/aadl_xml/Makefile
resources/runtime/cheddar/Makefile
resources/runtime/python/Makefile
projects/ocarina.gpr
src/main/Makefile
src/config/ocarina-configuration.adb
...
...
resources/runtime/Makefile.am
View file @
62beb57f
SUBDIRS
=
cheddar aadl_xml
SUBDIRS
=
cheddar aadl_xml
python
@DEBUG_FALSE@
DEBUG_FLAG
=
--disable-debug
@DEBUG_TRUE@
DEBUG_FLAG
=
--enable-debug
...
...
resources/runtime/python/Makefile.am
0 → 100644
View file @
62beb57f
AUTOMAKE_OPTIONS
=
no-dependencies
PYTHON_FILES
=
$(srcdir)
/ocarina.py
EXTRA_DIST
=
$(PYTHON_FILES)
ocarina_python
=
${
shell
$(CYGPATH_U)
'
$(includedir)
/ocarina/runtime/python'
}
install-data-local
:
$(INSTALL)
-d
$(DESTDIR)$(ocarina_python)
for
f
in
$(PYTHON_FILES)
;
do
$(INSTALL)
-m
444
$$
f
$(DESTDIR)$(ocarina_python)
;
done
resources/runtime/python/ocarina.py
0 → 100755
View file @
62beb57f
#! /usr/bin/python
'''Python binding to the Ocarina AADL processor'''
################################################################################
import
libocarina_python
;
# Ocarina bindings
################################################################################
def
version
():
'''Print Ocarina version'''
libocarina_python
.
version
();
################################################################################
def
status
():
'''Print Ocarina status'''
libocarina_python
.
status
();
################################################################################
def
load
(
filename
):
'''Load a file'''
libocarina_python
.
load
(
filename
);
################################################################################
def
analyze
():
'''Analyze models'''
libocarina_python
.
analyze
();
################################################################################
def
instantiate
(
root_system
):
'''Instantiate models'''
libocarina_python
.
instantiate
(
root_system
);
################################################################################
def
generate
(
generator
):
'''Generate code'''
libocarina_python
.
generate
(
generator
);
################################################################################
def
main
():
'''Test function'''
load
(
"rma.aadl"
);
# load a file
load
(
"deployment.aadl"
);
# load a file
analyze
();
# analyze models
instantiate
(
"rma.erc32"
);
# instantiate
generate
(
"polyorb_hi_ada"
);
# generate code
if
__name__
==
"__main__"
:
main
()
sys
.
exit
(
0
);
# exit
################################################################################
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