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
13c9702e
Commit
13c9702e
authored
Jan 08, 2020
by
oroulet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small stuff from brubbel
parent
347dac10
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
11 deletions
+10
-11
asyncua/common/manage_nodes.py
asyncua/common/manage_nodes.py
+1
-1
asyncua/server/address_space.py
asyncua/server/address_space.py
+4
-4
asyncua/server/internal_server.py
asyncua/server/internal_server.py
+1
-1
asyncua/server/internal_session.py
asyncua/server/internal_session.py
+1
-2
asyncua/server/internal_subscription.py
asyncua/server/internal_subscription.py
+3
-3
No files found.
asyncua/common/manage_nodes.py
View file @
13c9702e
...
...
@@ -266,7 +266,7 @@ async def _create_variable(server, parentnodeid, nodeid, qname, var, datatype=No
attrs
.
ArrayDimensions
=
var
.
Dimensions
attrs
.
WriteMask
=
0
attrs
.
UserWriteMask
=
0
attrs
.
Historizing
=
0
attrs
.
Historizing
=
False
attrs
.
AccessLevel
=
ua
.
AccessLevel
.
CurrentRead
.
mask
attrs
.
UserAccessLevel
=
ua
.
AccessLevel
.
CurrentRead
.
mask
addnode
.
NodeAttributes
=
attrs
...
...
asyncua/server/address_space.py
View file @
13c9702e
...
...
@@ -136,12 +136,12 @@ class ViewService(object):
res
+=
self
.
_get_sub_ref
(
ref
.
NodeId
)
return
res
def
_suitable_direction
(
self
,
d
esc
,
isforward
):
if
d
esc
==
ua
.
BrowseDirection
.
Both
:
def
_suitable_direction
(
self
,
d
irection
,
isforward
):
if
d
irection
==
ua
.
BrowseDirection
.
Both
:
return
True
if
d
esc
==
ua
.
BrowseDirection
.
Forward
and
isforward
:
if
d
irection
==
ua
.
BrowseDirection
.
Forward
and
isforward
:
return
True
if
d
esc
==
ua
.
BrowseDirection
.
Inverse
and
not
isforward
:
if
d
irection
==
ua
.
BrowseDirection
.
Inverse
and
not
isforward
:
return
True
return
False
...
...
asyncua/server/internal_server.py
View file @
13c9702e
...
...
@@ -164,7 +164,7 @@ class InternalServer:
self
.
logger
.
info
(
'starting internal server'
)
for
edp
in
self
.
endpoints
:
self
.
_known_servers
[
edp
.
Server
.
ApplicationUri
]
=
ServerDesc
(
edp
.
Server
)
await
Node
(
self
.
isession
,
ua
.
NodeId
(
ua
.
ObjectIds
.
Server_ServerStatus_State
)).
write_value
(
0
,
ua
.
VariantType
.
Int32
)
await
Node
(
self
.
isession
,
ua
.
NodeId
(
ua
.
ObjectIds
.
Server_ServerStatus_State
)).
write_value
(
ua
.
ServerState
.
Running
,
ua
.
VariantType
.
Int32
)
await
Node
(
self
.
isession
,
ua
.
NodeId
(
ua
.
ObjectIds
.
Server_ServerStatus_StartTime
)).
write_value
(
datetime
.
utcnow
())
if
not
self
.
disabled_clock
:
self
.
_set_current_time
()
...
...
asyncua/server/internal_session.py
View file @
13c9702e
...
...
@@ -25,8 +25,7 @@ class InternalSession:
_counter
=
10
_auth_counter
=
1000
def
__init__
(
self
,
internal_server
,
aspace
:
AddressSpace
,
submgr
:
SubscriptionService
,
name
,
user
=
User
.
Anonymous
,
external
=
False
):
def
__init__
(
self
,
internal_server
,
aspace
:
AddressSpace
,
submgr
:
SubscriptionService
,
name
,
user
=
User
.
Anonymous
,
external
=
False
):
self
.
logger
=
logging
.
getLogger
(
__name__
)
self
.
iserver
=
internal_server
# define if session is external, we need to copy some objects if it is internal
...
...
asyncua/server/internal_subscription.py
View file @
13c9702e
...
...
@@ -171,10 +171,10 @@ class InternalSubscription:
def
republish
(
self
,
nb
):
#self.logger.info("re-publish request for ack %s in subscription %s", nb, self)
notification_message
=
self
.
_not_acknowledged_results
.
pop
(
nb
,
None
)
if
notification_message
:
result
=
self
.
_not_acknowledged_results
.
pop
(
nb
,
None
)
if
result
:
self
.
logger
.
info
(
"re-publishing ack %s in subscription %s"
,
nb
,
self
)
return
notification_m
essage
return
result
.
NotificationM
essage
self
.
logger
.
info
(
"Error request to re-published non existing ack %s in subscription %s"
,
nb
,
self
)
return
ua
.
NotificationMessage
()
...
...
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