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
d8be14da
Commit
d8be14da
authored
Jul 03, 2015
by
Maxime Perrotin
Browse files
Format paramless TC in two columns in simulator
parent
042aa10a
Changes
2
Hide whitespace changes
Inline
Side-by-side
asn1_value_editor/asn1_value_editor.py
View file @
d8be14da
...
...
@@ -16,8 +16,8 @@ try:
from
PySide.QtCore
import
*
from
PySide.QtGui
import
*
from
PySide.QtUiTools
import
*
except
ImportError
:
print
'Pyside not found (package python-pyside missing)...'
except
ImportError
as
err
:
print
'Pyside not found (package python-pyside missing)...'
+
str
(
err
)
import
vn
...
...
@@ -525,7 +525,7 @@ class asn1Editor(QTreeView):
rec
(
inp
[
i
],
outp
[
i
],
sort
.
type
.
type
)
if
sort
.
type
.
Min
!=
sort
.
type
.
Max
:
# The ASN1SCC AST only knows if the list has a fixed length
dest
.
SetLength
(
len
(
inp
))
outp
.
SetLength
(
len
(
inp
))
elif
isinstance
(
inp
,
(
int
,
float
,
bool
)):
outp
.
Set
(
inp
)
elif
isinstance
(
inp
,
dict
):
...
...
@@ -541,13 +541,17 @@ class asn1Editor(QTreeView):
enum_val
=
getattr
(
ASN1Swig
.
DV
,
ch_ty
.
EnumID
)
outp
.
kind
.
Set
(
enum_val
)
rec
(
inp
[
child_name
],
getattr
(
outp
,
child_name
),
ch_ty
.
type
)
getattr
(
outp
,
child_name
.
replace
(
'-'
,
'_'
)),
ch_ty
.
type
)
else
:
# SEQUENCE
for
field
,
data
in
inp
.
viewitems
():
field_ty
=
sort
.
type
.
Children
[
field
.
replace
(
'_'
,
'-'
)]
rec
(
data
,
getattr
(
outp
,
field
),
field_ty
.
type
)
#print outp, field, outp.GSER()
rec
(
data
,
getattr
(
outp
,
field
.
replace
(
'-'
,
'_'
)),
field_ty
.
type
)
else
:
self
.
log
.
error
(
'Unsupported type in to_asn1scc_swig'
)
rec
(
var
,
dest
,
sort
)
...
...
asn1_value_editor/sdlHandler.py
View file @
d8be14da
...
...
@@ -620,8 +620,12 @@ class sdlHandler(QObject):
self
.
buttons
[
each
[
'name'
]]
=
QPushButton
(
each
[
'name'
])
for
each
in
self
.
proc
.
timers
:
self
.
buttons
[
each
]
=
QPushButton
(
each
+
' timeout'
)
col
,
row
=
0
,
0
for
name
,
button
in
self
.
buttons
.
viewitems
():
self
.
tc_area
.
addWidget
(
button
)
self
.
tc_area
.
addWidget
(
button
,
row
,
col
)
if
col
:
row
+=
1
col
=
(
col
+
1
)
%
2
tc
=
getattr
(
self
.
dll
,
'{}_{}'
.
format
(
self
.
proc
.
processName
,
name
))
button
.
pressed
.
connect
(
partial
(
self
.
send_tc
,
name
,
tc
))
...
...
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