Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
b92a1142
Commit
b92a1142
authored
Mar 17, 2018
by
Maxime Perrotin
Browse files
Instances: inherit timers from type
parent
03c45c0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/AdaGenerator.py
View file @
b92a1142
...
...
@@ -139,9 +139,9 @@ def external_ri_list(process):
result
.
append
(
ri_header
)
for
timer
in
process
.
timers
:
result
.
append
(
u
"procedure
s
et_{}(val: access asn1SccT_Uint32)"
result
.
append
(
u
"procedure
S
et_{}(val: access asn1SccT_Uint32)"
.
format
(
timer
))
result
.
append
(
u
"procedure
r
eset_{}"
result
.
append
(
u
"procedure
R
eset_{}"
.
format
(
timer
))
return
result
...
...
@@ -173,6 +173,9 @@ def _process(process, simu=False, instance=False, **kwargs):
if
process_instance
is
not
process
:
# Generate an instance of the process type, too.
# First copy the list of timers to the instance (otherwise the
# instance would miss some PIs and RIs to set the actual timers)
process_instance
.
timers
=
process
.
timers
generate
(
process_instance
,
simu
,
instance
=
True
)
global
TYPES
...
...
@@ -591,8 +594,9 @@ package {process_name} is'''.format(generic=generic_spec,
ads_template
.
append
(
u
'-- Provided interface "{}"'
.
format
(
signame
))
ads_template
.
append
(
pi_header
+
';'
)
if
not
generic
:
ads_template
.
append
(
u
'pragma Export(C, {name}, "{proc}_{name}");'
.
format
(
name
=
signame
,
proc
=
process_name
))
ads_template
.
append
(
u
'pragma Export(C, {name}, "{proc}_PI_{name}");'
.
format
(
name
=
signame
.
lower
(),
proc
=
process_name
.
lower
()))
if
simu
:
# Generate code for the mini-cv template
...
...
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