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
cc12f5fb
Commit
cc12f5fb
authored
Jun 01, 2018
by
oroulet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set status and build node in server in an attempt to make some clients more happy
parent
ddfff2c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
opcua/server/server.py
opcua/server/server.py
+15
-1
No files found.
opcua/server/server.py
View file @
cc12f5fb
...
...
@@ -3,7 +3,7 @@ High level interface to pure python OPC-UA server
"""
import
logging
from
datetime
import
timedelta
from
datetime
import
timedelta
,
datetime
try
:
from
urllib.parse
import
urlparse
except
ImportError
:
...
...
@@ -80,6 +80,7 @@ class Server(object):
self
.
_application_uri
=
"urn:freeopcua:python:server"
self
.
product_uri
=
"urn:freeopcua.github.io:python:server"
self
.
name
=
"FreeOpcUa Python Server"
self
.
manufacturer_name
=
"FreeOpcUa"
self
.
application_type
=
ua
.
ApplicationType
.
ClientAndServer
self
.
default_timeout
=
3600000
if
iserver
is
not
None
:
...
...
@@ -98,6 +99,19 @@ class Server(object):
self
.
set_application_uri
(
self
.
_application_uri
)
sa_node
=
self
.
get_node
(
ua
.
NodeId
(
ua
.
ObjectIds
.
Server_ServerArray
))
sa_node
.
set_value
([
self
.
_application_uri
])
status_node
=
self
.
get_node
(
ua
.
NodeId
(
ua
.
ObjectIds
.
Server_ServerStatus
))
build_node
=
self
.
get_node
(
ua
.
NodeId
(
ua
.
ObjectIds
.
Server_ServerStatus_BuildInfo
))
status
=
ua
.
ServerStatusDataType
()
status
.
BuildInfo
.
ProductUri
=
self
.
product_uri
status
.
BuildInfo
.
ManufacturerName
=
self
.
manufacturer_name
status
.
BuildInfo
.
ProductName
=
self
.
name
status
.
BuildInfo
.
SoftwareVersion
=
"1.0pre"
status
.
BuildInfo
.
BuildNumber
=
"0"
status
.
BuildInfo
.
BuildDate
=
datetime
.
now
()
status
.
SecondsTillShutdown
=
0
status_node
.
set_value
(
status
)
build_node
.
set_value
(
status
.
BuildInfo
)
def
__enter__
(
self
):
self
.
start
()
...
...
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