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
332eec20
Commit
332eec20
authored
Jul 09, 2015
by
Maxime Perrotin
Browse files
Show extra characters in streaming MSC
parent
78970185
Changes
2
Hide whitespace changes
Inline
Side-by-side
asn1_value_editor/mscHandler.py
View file @
332eec20
...
...
@@ -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
=
4
0
self
.
increase_factor
=
6
0
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)
...
...
asn1_value_editor/sdlHandler.py
View file @
332eec20
...
...
@@ -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 '''
...
...
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