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
7a814487
Commit
7a814487
authored
Dec 20, 2015
by
Zhang, Hua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename FakeRequest to CachedRequest
parent
dde2be62
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
opcua/binary_client.py
opcua/binary_client.py
+3
-4
No files found.
opcua/binary_client.py
View file @
7a814487
...
...
@@ -11,8 +11,7 @@ import opcua.uaprotocol as ua
import
opcua.utils
as
utils
class
FakeRequest
(
object
):
# HACK to remove duplicate call Request.to_binary
class
CachedRequest
(
object
):
def
__init__
(
self
,
binary
):
self
.
binary
=
binary
...
...
@@ -56,7 +55,7 @@ class UASocketClient(object):
with
self
.
_lock
:
request
.
RequestHeader
=
self
.
_create_request_header
(
timeout
)
try
:
fakereq
=
Fake
Request
(
request
.
to_binary
())
cachedreq
=
Cached
Request
(
request
.
to_binary
())
except
:
# reset reqeust handle if any error
# see self._create_request_header
...
...
@@ -69,7 +68,7 @@ class UASocketClient(object):
if
callback
:
future
.
add_done_callback
(
callback
)
self
.
_callbackmap
[
seqhdr
.
RequestId
]
=
future
self
.
_write_socket
(
hdr
,
symhdr
,
seqhdr
,
fake
req
)
self
.
_write_socket
(
hdr
,
symhdr
,
seqhdr
,
cached
req
)
if
not
callback
:
data
=
future
.
result
(
self
.
timeout
)
self
.
check_answer
(
data
,
" in response to "
+
request
.
__class__
.
__name__
)
...
...
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