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
1a272212
Commit
1a272212
authored
Mar 22, 2016
by
olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
respect TimeoutHint for PublishRequest
parent
b92c2817
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
opcua/server/uaprocessor.py
opcua/server/uaprocessor.py
+10
-4
No files found.
opcua/server/uaprocessor.py
View file @
1a272212
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
logging
import
logging
from
threading
import
Lock
from
threading
import
Lock
from
datetime
import
datetime
from
datetime
import
datetime
import
time
from
opcua
import
ua
from
opcua
import
ua
from
opcua.common
import
utils
from
opcua.common
import
utils
...
@@ -13,6 +14,7 @@ class PublishRequestData(object):
...
@@ -13,6 +14,7 @@ class PublishRequestData(object):
self
.
requesthdr
=
None
self
.
requesthdr
=
None
self
.
algohdr
=
None
self
.
algohdr
=
None
self
.
seqhdr
=
None
self
.
seqhdr
=
None
self
.
timestamp
=
time
.
time
()
class
UaProcessor
(
object
):
class
UaProcessor
(
object
):
...
@@ -52,10 +54,14 @@ class UaProcessor(object):
...
@@ -52,10 +54,14 @@ class UaProcessor(object):
def
forward_publish_response
(
self
,
result
):
def
forward_publish_response
(
self
,
result
):
self
.
logger
.
info
(
"forward publish response %s"
,
result
)
self
.
logger
.
info
(
"forward publish response %s"
,
result
)
with
self
.
_datalock
:
with
self
.
_datalock
:
if
len
(
self
.
_publishdata_queue
)
==
0
:
while
True
:
self
.
logger
.
warning
(
"Error server wants to send publish answer but no publish request is available"
)
if
len
(
self
.
_publishdata_queue
)
==
0
:
return
self
.
logger
.
warning
(
"Error server wants to send publish answer but no publish request is available"
)
requestdata
=
self
.
_publishdata_queue
.
pop
(
0
)
return
requestdata
=
self
.
_publishdata_queue
.
pop
(
0
)
if
time
.
time
()
-
requestdata
.
timestamp
<
requestdata
.
requesthdr
.
TimeoutHint
/
1000
:
break
response
=
ua
.
PublishResponse
()
response
=
ua
.
PublishResponse
()
response
.
Parameters
=
result
response
.
Parameters
=
result
...
...
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