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
85d15081
Commit
85d15081
authored
Mar 31, 2015
by
Olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: small fixes, uaexpert can subscribe
parent
cbf563eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
opcua/uaprocessor.py
opcua/uaprocessor.py
+5
-2
No files found.
opcua/uaprocessor.py
View file @
85d15081
...
...
@@ -23,6 +23,7 @@ class UAProcessor(object):
self
.
socket
=
socket
self
.
_lock
=
Lock
()
self
.
_publishdata_queue
=
[]
self
.
_seq_number
=
1
def
loop
(
self
):
#first we want a hello message
...
...
@@ -54,8 +55,10 @@ class UAProcessor(object):
def
send_response
(
self
,
requesthandle
,
algohdr
,
seqhdr
,
response
,
msgtype
=
ua
.
MessageType
.
SecureMessage
):
with
self
.
_lock
:
response
.
ResponseHeader
.
RequestHandle
=
requesthandle
seqhdr
.
SequenceNumber
+=
1
seqhdr
.
SequenceNumber
=
self
.
_seq_number
self
.
_seq_number
+=
1
hdr
=
ua
.
Header
(
msgtype
,
ua
.
ChunkType
.
Single
,
self
.
channel
.
SecurityToken
.
ChannelId
)
algohdr
.
TokenId
=
self
.
channel
.
SecurityToken
.
TokenId
self
.
write_socket
(
hdr
,
algohdr
,
seqhdr
,
response
)
def
write_socket
(
self
,
hdr
,
*
args
):
...
...
@@ -97,7 +100,7 @@ class UAProcessor(object):
response
=
ua
.
PublishResponse
()
response
.
Parameters
=
result
requestdata
=
self
.
_publishdata_queue
.
pop
(
-
1
)
requestdata
=
self
.
_publishdata_queue
.
pop
(
0
)
self
.
send_response
(
requestdata
.
requesthdr
.
RequestHandle
,
requestdata
.
algohdr
,
requestdata
.
seqhdr
,
response
)
def
process_body
(
self
,
header
,
body
):
...
...
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