Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
46ab8597
Commit
46ab8597
authored
Feb 27, 2021
by
oroulet
Committed by
oroulet
Mar 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove debug code
parent
9a1824d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
6 deletions
+1
-6
asyncua/client/ua_client.py
asyncua/client/ua_client.py
+1
-2
schemas/generate_model.py
schemas/generate_model.py
+0
-4
No files found.
asyncua/client/ua_client.py
View file @
46ab8597
...
@@ -168,8 +168,7 @@ class UASocketProtocol(asyncio.Protocol):
...
@@ -168,8 +168,7 @@ class UASocketProtocol(asyncio.Protocol):
try
:
try
:
self
.
_callbackmap
[
request_id
].
set_result
(
body
)
self
.
_callbackmap
[
request_id
].
set_result
(
body
)
except
KeyError
:
except
KeyError
:
#raise ua.UaError(f"No request found for request id: {request_id}, pending are {self._callbackmap.keys()}, body was {body}")
raise
ua
.
UaError
(
f"No request found for request id:
{
request_id
}
, pending are
{
self
.
_callbackmap
.
keys
()
}
, body was
{
body
}
"
)
pass
except
asyncio
.
InvalidStateError
:
except
asyncio
.
InvalidStateError
:
if
not
self
.
closed
:
if
not
self
.
closed
:
self
.
logger
.
warning
(
"Future for request id %s is already done"
,
request_id
)
self
.
logger
.
warning
(
"Future for request id %s is already done"
,
request_id
)
...
...
schemas/generate_model.py
View file @
46ab8597
...
@@ -126,7 +126,6 @@ class Model(object):
...
@@ -126,7 +126,6 @@ class Model(object):
def
_add_struct
(
struct
,
newstructs
,
waiting_structs
,
known_structs
):
def
_add_struct
(
struct
,
newstructs
,
waiting_structs
,
known_structs
):
print
(
"appending"
,
struct
)
newstructs
.
append
(
struct
)
newstructs
.
append
(
struct
)
known_structs
.
append
(
struct
.
name
)
known_structs
.
append
(
struct
.
name
)
# now seeing if some struct where waiting for this one
# now seeing if some struct where waiting for this one
...
@@ -134,7 +133,6 @@ def _add_struct(struct, newstructs, waiting_structs, known_structs):
...
@@ -134,7 +133,6 @@ def _add_struct(struct, newstructs, waiting_structs, known_structs):
if
waitings
:
if
waitings
:
for
s
in
waitings
:
for
s
in
waitings
:
s
.
waitingfor
.
remove
(
struct
.
name
)
s
.
waitingfor
.
remove
(
struct
.
name
)
print
(
"TRY POP"
,
s
,
s
.
waitingfor
)
if
not
s
.
waitingfor
:
if
not
s
.
waitingfor
:
_add_struct
(
s
,
newstructs
,
waiting_structs
,
known_structs
)
_add_struct
(
s
,
newstructs
,
waiting_structs
,
known_structs
)
...
@@ -148,7 +146,6 @@ def reorder_structs(model):
...
@@ -148,7 +146,6 @@ def reorder_structs(model):
waiting_structs
=
{}
waiting_structs
=
{}
newstructs
=
[]
newstructs
=
[]
for
s
in
model
.
structs
:
for
s
in
model
.
structs
:
print
(
"Trying to add "
,
s
)
s
.
waitingfor
=
[]
s
.
waitingfor
=
[]
ok
=
True
ok
=
True
for
f
in
s
.
fields
:
for
f
in
s
.
fields
:
...
@@ -158,7 +155,6 @@ def reorder_structs(model):
...
@@ -158,7 +155,6 @@ def reorder_structs(model):
else
:
else
:
waiting_structs
[
f
.
uatype
]
=
[
s
]
waiting_structs
[
f
.
uatype
]
=
[
s
]
s
.
waitingfor
.
append
(
f
.
uatype
)
s
.
waitingfor
.
append
(
f
.
uatype
)
print
(
s
,
" waiting for "
,
f
.
uatype
)
ok
=
False
ok
=
False
if
ok
:
if
ok
:
_add_struct
(
s
,
newstructs
,
waiting_structs
,
types
)
_add_struct
(
s
,
newstructs
,
waiting_structs
,
types
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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