Commit cda3d354 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Rename MSC instances when simulating

parent 085b2a16
......@@ -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)
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment