Commit 332eec20 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Show extra characters in streaming MSC

parent 78970185
......@@ -81,12 +81,13 @@ class AddToMsc(QUndoCommand):
self.item = handler.msc_scene.addCondition(handler.taste_instance,
y=handler.next_y,
label=message)
self.increase_factor = 40
self.increase_factor = 60
elif direction == 'procedure_call':
# Local procedure call: an arrow from and to the same instance
self.item = handler.msc_scene.addProcedure(handler.taste_instance,
y=handler.next_y,
label=message)
self.increase_factor = 60
#self.item.hide()
# This is how to add a comment on the graph:
# comment = handler.msc_scene.addComment(msg)
......
......@@ -23,6 +23,7 @@ import os
import ctypes
import itertools
from functools import partial
from itertools import chain
from PySide.QtGui import (QDockWidget, QPushButton, QGridLayout, QListWidget,
QUndoStack, QUndoCommand, QToolButton)
......@@ -606,7 +607,6 @@ class sdlHandler(QObject):
Parameters: name is the name of the external procedure, and
args is the list of arguments: (void*, size) for each in/out fpar
'''
self.log_area.addItem('Call to external procedure {}'.format(name))
assert len(args) % 2 is 0, "Invalid number of arguments"
interface = {'in' : [], 'out': []}
# Cut the params into tuples of (void *, size)
......@@ -649,13 +649,18 @@ class sdlHandler(QObject):
for idx in xrange(len(as_bytes.contents)):
as_bytes.contents[idx] = \
ASN1.DV.byte_SWIG_PTR_getitem(swig_ptr, idx)
self.add_to_msc('procedure_call', '{}'.format(name))
# At the end, delete allocated buffers
# Display the call on the MSC
inp, outp = [], []
for _, asn1_instance in interface['in']:
del(asn1_instance)
inp.append(asn1_instance.GSER())
del asn1_instance
for _, _, asn1_instance in interface['out']:
outp.append(asn1_instance.GSER())
del(asn1_instance)
call_str = u'{}({})'.format(name,
', '.join(chain(inp, outp)))
self.add_to_msc('procedure_call', call_str)
self.log_area.addItem('Call to {}'.format(call_str))
def set_timer(self, name, duration):
''' Callback function when the SDL model sets a timer '''
......
Markdown is supported
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