Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
asn1-value-editor
Commits
cda3d354
Commit
cda3d354
authored
Dec 31, 2014
by
Maxime Perrotin
Browse files
Rename MSC instances when simulating
parent
085b2a16
Changes
2
Hide whitespace changes
Inline
Side-by-side
asn1_value_editor/gui.py
View file @
cda3d354
...
...
@@ -262,8 +262,17 @@ def gui():
msgs
.
append
({
'name'
:
msg
,
'type'
:
datamodel
.
tc
[
msg
][
'nodeTypename'
]})
for
msg
in
datamodel
.
tm
:
msgs
.
append
({
'name'
:
msg
,
'type'
:
datamodel
.
tm
[
msg
][
'nodeTypename'
]})
msc
=
mscHandler
(
myWidget
,
mscList
,
datamodel
.
FVname
,
msgs
,
udpController
=
udp
)
# set the names of the MSC instances, depending on the context
if
dll
:
instance1
=
datamodel
.
FVname
instance2
=
'Operator'
else
:
instance1
=
'TASTE_System'
instance2
=
datamodel
.
FVname
msc
=
mscHandler
(
myWidget
,
mscList
,
instance2
,
msgs
,
udpController
=
udp
,
instance_name
=
instance1
)
msc
.
log
=
log
msc
.
ivpath
=
options
.
ivpath
runMSC
.
pressed
.
connect
(
msc
.
run
)
...
...
asn1_value_editor/mscHandler.py
View file @
cda3d354
...
...
@@ -26,7 +26,8 @@ class mscHandler(object):
Class managing MSC operations
(streaming, loading, recording, compiling to Python, executing)
'''
def
__init__
(
self
,
parent
,
msc_list
,
fv_name
,
msgs
,
udpController
=
None
):
def
__init__
(
self
,
parent
,
msc_list
,
fv_name
,
msgs
,
udpController
=
None
,
instance_name
=
'TASTE_System'
):
'''
Startup: check if there are some MSC files in
the directory and update the list
...
...
@@ -72,7 +73,7 @@ inst {fv};'''.format(fv=fv_name)]
self
.
gui_instance
=
self
.
msc_scene
.
addInstance
(
self
.
env_x
,
0
,
label
=
fv_name
)
self
.
taste_instance
=
self
.
msc_scene
.
addInstance
(
self
.
taste_x
,
0
,
label
=
'TASTE_System'
)
label
=
instance_name
)
self
.
next_y
=
130.0
self
.
msc_view
.
show
()
self
.
dock
.
setWidget
(
self
.
msc_view
)
...
...
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