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
46117c00
Commit
46117c00
authored
Jun 19, 2020
by
Joey Faulkner
Committed by
oroulet
Jun 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ability to find endpoints for unauthenticated user
parent
8cf4eda0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
asyncua/server/uaprocessor.py
asyncua/server/uaprocessor.py
+2
-1
examples/server-minimal.py
examples/server-minimal.py
+3
-4
No files found.
asyncua/server/uaprocessor.py
View file @
46117c00
...
...
@@ -146,7 +146,8 @@ class UaProcessor:
async
def
_process_message
(
self
,
typeid
,
requesthdr
,
seqhdr
,
body
):
if
typeid
in
[
ua
.
NodeId
(
ua
.
ObjectIds
.
CreateSessionRequest_Encoding_DefaultBinary
),
ua
.
NodeId
(
ua
.
ObjectIds
.
ActivateSessionRequest_Encoding_DefaultBinary
)]:
ua
.
NodeId
(
ua
.
ObjectIds
.
ActivateSessionRequest_Encoding_DefaultBinary
),
ua
.
NodeId
(
ua
.
ObjectIds
.
GetEndpointsRequest_Encoding_DefaultBinary
)]:
# The connection is first created without a user being attached, and then during activation the
user
=
None
elif
self
.
session
is
None
:
...
...
examples/server-minimal.py
View file @
46117c00
...
...
@@ -35,12 +35,11 @@ async def main():
await
server
.
nodes
.
objects
.
add_method
(
ua
.
NodeId
(
'ServerMethod'
,
2
),
ua
.
QualifiedName
(
'ServerMethod'
,
2
),
func
,
[
ua
.
VariantType
.
Int64
],
[
ua
.
VariantType
.
Int64
])
_logger
.
info
(
'Starting server!'
)
async
with
server
:
count
=
0
while
True
:
await
asyncio
.
sleep
(
1
)
count
+=
0.1
_logger
.
info
(
'Set value of %s to %.1f'
,
myvar
,
count
)
await
myvar
.
write_value
(
count
)
new_val
=
await
myvar
.
get_value
()
+
0.1
_logger
.
info
(
'Set value of %s to %.1f'
,
myvar
,
new_val
)
await
myvar
.
write_value
(
new_val
)
if
__name__
==
'__main__'
:
...
...
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