Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-cloning
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
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yogesh.m
opcua-cloning
Commits
6ef27edc
Commit
6ef27edc
authored
Mar 02, 2023
by
yogesh.m
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
df6a7ede
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
8 deletions
+12
-8
.idea/misc.xml
.idea/misc.xml
+1
-1
.idea/opcua-cloning.iml
.idea/opcua-cloning.iml
+1
-1
.idea/workspace.xml
.idea/workspace.xml
+3
-0
opcua_receiver.py
opcua_receiver.py
+6
-5
opcua_subscriber/__pycache__/opcua_subscribe.cpython-39.pyc
opcua_subscriber/__pycache__/opcua_subscribe.cpython-39.pyc
+0
-0
opcua_subscriber/opcua_subscribe.py
opcua_subscriber/opcua_subscribe.py
+1
-1
No files found.
.idea/misc.xml
View file @
6ef27edc
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.9"
project-jdk-type=
"Python SDK"
/>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.9
(pythonProject)
"
project-jdk-type=
"Python SDK"
/>
</project>
\ No newline at end of file
.idea/opcua-cloning.iml
View file @
6ef27edc
...
...
@@ -2,7 +2,7 @@
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"
inheritedJdk
"
/>
<orderEntry
type=
"
jdk"
jdkName=
"Python 3.9 (pythonProject)"
jdkType=
"Python SDK
"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
\ No newline at end of file
.idea/workspace.xml
View file @
6ef27edc
...
...
@@ -17,6 +17,9 @@
<component
name=
"Git.Settings"
>
<option
name=
"RECENT_GIT_ROOT_PATH"
value=
"$PROJECT_DIR$"
/>
</component>
<component
name=
"MarkdownSettingsMigration"
>
<option
name=
"stateVersion"
value=
"1"
/>
</component>
<component
name=
"ProjectId"
id=
"2MBBW17AOFLvAzWG4Yg12wAh3jz"
/>
<component
name=
"ProjectViewState"
>
<option
name=
"hideEmptyMiddlePackages"
value=
"true"
/>
...
...
opcua_receiver.py
View file @
6ef27edc
...
...
@@ -21,18 +21,19 @@ UDPServerSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)
# Bind to address and ip
#
UDPServerSocket.bind((localIP, localPort))
UDPServerSocket
.
bind
((
localIP
,
localPort
))
print
(
"UDP server up and listening"
)
opua
=
opcua_pack
()
sock
=
opua
.
connect
(
"opc.tcp://2.2.2.
7
:53530/OPCUA/SimulationServer"
)
sock
=
opua
.
connect
(
"opc.tcp://2.2.2.
5
:53530/OPCUA/SimulationServer"
)
opua
.
write_opcua_value
(
sock
,
3
,
1002
,
11
)
while
(
True
):
bytesAddressPair
=
UDPServerSocket
.
recvfrom
(
bufferSize
)
message
=
bytesAddressPair
[
0
]
datatype
,
value
,
nodeid
=
message
.
decode
()
.
split
(
"&"
)
datatype
,
value
,
ns
,
nodeid
=
message
.
decode
()
.
split
(
"&"
)
print
(
nodeid
)
if
(
datatype
==
"<class 'float'>"
):
opua
.
write_opcua_value
(
sock
,
3
,
1002
,
11
)
opua
.
write_opcua_value
(
sock
,
int
(
ns
),
int
(
nodeid
)
,
11
)
if
(
datatype
==
"<class 'int'>"
):
opua
.
write_opcua_value
(
sock
,
3
,
1002
,
6
)
\ No newline at end of file
opua
.
write_opcua_value
(
sock
,
int
(
ns
),
int
(
nodeid
),
6
)
\ No newline at end of file
opcua_subscriber/__pycache__/opcua_subscribe.cpython-39.pyc
View file @
6ef27edc
No preview for this file type
opcua_subscriber/opcua_subscribe.py
View file @
6ef27edc
...
...
@@ -418,7 +418,7 @@ class opcua_pack():
return
session
def
connect
(
self
,
address
):
server_address
=
(
'2.2.2.
7
'
,
53530
)
server_address
=
(
'2.2.2.
5
'
,
53530
)
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
sock
.
connect
(
server_address
)
message
=
self
.
helf
(
address
)
...
...
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