Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
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
0
Merge Requests
0
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
osie
Commits
8b91d7cc
Commit
8b91d7cc
authored
Oct 29, 2021
by
Balakrishna Balakrishna
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/opcua
parents
da969acf
a5ef183a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
216 additions
and
128 deletions
+216
-128
coupler/opc-ua-server/opc-ua-server.py
coupler/opc-ua-server/opc-ua-server.py
+0
-26
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+216
-102
No files found.
coupler/opc-ua-server/opc-ua-server.py
deleted
100644 → 0
View file @
da969acf
"""
Simple OPC UA server with one paremeter (temp).
"""
from
opcua
import
Server
from
random
import
randint
import
time
server
=
Server
()
url
=
"opc.tcp://0.0.0.0:4840"
server
.
set_endpoint
(
url
)
name
=
"OPCUA_SIMULATION_SERVER"
addspace
=
server
.
register_namespace
(
name
)
node
=
server
.
get_objects_node
()
Param
=
node
.
add_object
(
addspace
,
"Parameters"
)
Temp
=
Param
.
add_variable
(
addspace
,
"Temperature"
,
0
)
Temp
.
set_writable
()
server
.
start
()
print
(
"started at %s"
%
url
)
while
1
:
Temp
.
set_value
(
randint
(
10
,
50
))
time
.
sleep
(
10
)
coupler/opc-ua-server/server.c
View file @
8b91d7cc
This diff is collapsed.
Click to expand it.
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