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
4b0f6e3e
Commit
4b0f6e3e
authored
Sep 04, 2015
by
Maxime Perrotin
Browse files
Find DLL properly
parent
c57a21db
Changes
2
Hide whitespace changes
Inline
Side-by-side
asn1_value_editor/gui.py
View file @
4b0f6e3e
...
...
@@ -214,7 +214,7 @@ def gui():
# Load and run the startup transition of the shared library (Ada only?)
msgQ
=
False
try
:
dll
=
CDLL
(
'lib{}.so'
.
format
(
datamodel
.
FVname
))
dll
=
CDLL
(
'
./
lib{}.so'
.
format
(
datamodel
.
FVname
))
dll_init
=
getattr
(
dll
,
'lib{}init'
.
format
(
datamodel
.
FVname
))
dll_init
()
except
OSError
as
err
:
...
...
asn1_value_editor/sdlHandler.py
View file @
4b0f6e3e
...
...
@@ -403,10 +403,12 @@ class sdlHandler(QObject):
if
not
prop_file
:
return
try
:
self
.
prop_dll
=
ctypes
.
CDLL
(
'lib{}_stop_conditions.so'
# Property file must be in the current directory
self
.
prop_dll
=
ctypes
.
CDLL
(
'./lib{}_stop_conditions.so'
.
format
(
self
.
proc
.
processName
))
except
OSError
as
err
:
self
.
log_area
.
addItem
(
'lib{}_stop_conditions.so not found'
self
.
log_area
.
addItem
(
'lib{}_stop_conditions.so not found '
'in current directory'
.
format
(
self
.
proc
.
processName
))
return
properties
=
[]
...
...
@@ -686,16 +688,21 @@ class sdlHandler(QObject):
arg
=
compute_random_value
(
asn1_ty
,
self
.
proc
.
dataview
)
self
.
click_tc
(
name
,
arg
)
# Select randomly an active TC and call it
random_tc
=
random
.
choice
(
list
(
self
.
active_tc
))
for
inp
in
self
.
proc
.
input_signals
:
if
inp
[
'name'
].
lower
()
==
random_tc
.
lower
():
sort
=
inp
.
get
(
'type'
,
None
)
if
sort
:
typename
=
sort
.
ReferencedTypeName
.
replace
(
'-'
,
'_'
)
ty
=
self
.
proc
.
dataview
[
sort
.
ReferencedTypeName
]
arg
=
compute_random_value
(
ty
,
self
.
proc
.
dataview
)
break
self
.
click_tc
(
random_tc
,
arg
)
#random_tc = random.choice(list(self.active_tc))
try
:
random_tc
,
asn1_ty
=
random
.
choice
(
list
(
self
.
sim_param
[
'random'
]))
except
IndexError
:
pass
else
:
for
inp
in
self
.
proc
.
input_signals
:
if
inp
[
'name'
].
lower
()
==
random_tc
.
lower
():
sort
=
inp
.
get
(
'type'
,
None
)
if
sort
:
typename
=
sort
.
ReferencedTypeName
.
replace
(
'-'
,
'_'
)
ty
=
self
.
proc
.
dataview
[
sort
.
ReferencedTypeName
]
arg
=
compute_random_value
(
ty
,
self
.
proc
.
dataview
)
break
self
.
click_tc
(
random_tc
,
arg
)
QTimer
().
singleShot
(
1000
,
self
.
random_step
)
...
...
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