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
8cd89de1
Commit
8cd89de1
authored
Mar 16, 2023
by
yogesh.m
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
44e739dd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
17 deletions
+25
-17
.idea/workspace.xml
.idea/workspace.xml
+21
-12
__pycache__/opcua_transmitter.cpython-39.pyc
__pycache__/opcua_transmitter.cpython-39.pyc
+0
-0
hash_sender.py
hash_sender.py
+3
-5
opcua-transmitter.py
opcua-transmitter.py
+1
-0
No files found.
.idea/workspace.xml
View file @
8cd89de1
...
@@ -4,7 +4,12 @@
...
@@ -4,7 +4,12 @@
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"e733891a-c063-4f94-92d6-4559e921107b"
name=
"Default Changelist"
comment=
""
/>
<list
default=
"true"
id=
"e733891a-c063-4f94-92d6-4559e921107b"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/hash_sender.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/hash_sender.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/main.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/main.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/opcua_transmitter.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/opcua_transmitter.py"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_NON_ACTIVE_CHANGELIST"
value=
"false"
/>
<option
name=
"HIGHLIGHT_NON_ACTIVE_CHANGELIST"
value=
"false"
/>
...
@@ -71,7 +76,7 @@
...
@@ -71,7 +76,7 @@
<option
name=
"INPUT_FILE"
value=
""
/>
<option
name=
"INPUT_FILE"
value=
""
/>
<method
v=
"2"
/>
<method
v=
"2"
/>
</configuration>
</configuration>
<configuration
name=
"
asyncua_serv
er"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<configuration
name=
"
hash_send
er"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"opcua-cloning"
/>
<module
name=
"opcua-cloning"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
...
@@ -83,7 +88,7 @@
...
@@ -83,7 +88,7 @@
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"SCRIPT_NAME"
value=
"
D:\opcua-cloning\asyncua_serv
er.py"
/>
<option
name=
"SCRIPT_NAME"
value=
"
$PROJECT_DIR$/hash_send
er.py"
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
...
@@ -92,7 +97,7 @@
...
@@ -92,7 +97,7 @@
<option
name=
"INPUT_FILE"
value=
""
/>
<option
name=
"INPUT_FILE"
value=
""
/>
<method
v=
"2"
/>
<method
v=
"2"
/>
</configuration>
</configuration>
<configuration
name=
"
hash_sender"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true
"
nameIsGenerated=
"true"
>
<configuration
name=
"
main"
type=
"PythonConfigurationType"
factoryName=
"Python
"
nameIsGenerated=
"true"
>
<module
name=
"opcua-cloning"
/>
<module
name=
"opcua-cloning"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
...
@@ -104,7 +109,7 @@
...
@@ -104,7 +109,7 @@
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/
hash_sender
.py"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/
main
.py"
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
...
@@ -113,7 +118,7 @@
...
@@ -113,7 +118,7 @@
<option
name=
"INPUT_FILE"
value=
""
/>
<option
name=
"INPUT_FILE"
value=
""
/>
<method
v=
"2"
/>
<method
v=
"2"
/>
</configuration>
</configuration>
<configuration
name=
"
main"
type=
"PythonConfigurationType"
factoryName=
"Python
"
nameIsGenerated=
"true"
>
<configuration
name=
"
opcua-transmitter (1)"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true
"
nameIsGenerated=
"true"
>
<module
name=
"opcua-cloning"
/>
<module
name=
"opcua-cloning"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
...
@@ -125,7 +130,7 @@
...
@@ -125,7 +130,7 @@
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/
main
.py"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/
opcua-transmitter
.py"
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
...
@@ -134,7 +139,7 @@
...
@@ -134,7 +139,7 @@
<option
name=
"INPUT_FILE"
value=
""
/>
<option
name=
"INPUT_FILE"
value=
""
/>
<method
v=
"2"
/>
<method
v=
"2"
/>
</configuration>
</configuration>
<configuration
name=
"opcua
-transmitter (1)
"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<configuration
name=
"opcua
_receiver
"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"opcua-cloning"
/>
<module
name=
"opcua-cloning"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
...
@@ -146,7 +151,7 @@
...
@@ -146,7 +151,7 @@
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/opcua
-transmitt
er.py"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/opcua
_receiv
er.py"
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
...
@@ -155,7 +160,7 @@
...
@@ -155,7 +160,7 @@
<option
name=
"INPUT_FILE"
value=
""
/>
<option
name=
"INPUT_FILE"
value=
""
/>
<method
v=
"2"
/>
<method
v=
"2"
/>
</configuration>
</configuration>
<configuration
name=
"opcua_
receiv
er"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<configuration
name=
"opcua_
transmitt
er"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"opcua-cloning"
/>
<module
name=
"opcua-cloning"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
...
@@ -167,7 +172,7 @@
...
@@ -167,7 +172,7 @@
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/opcua_
receiv
er.py"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/opcua_
transmitt
er.py"
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
...
@@ -178,11 +183,15 @@
...
@@ -178,11 +183,15 @@
</configuration>
</configuration>
<recent_temporary>
<recent_temporary>
<list>
<list>
<<<<<<
< Updated
upstream
=
======
<item
itemvalue=
"Python.opcua_transmitter"
/>
<item
itemvalue=
"Python.opcua-transmitter (1)"
/>
>>>>>>> Stashed changes
<item
itemvalue=
"Python.opcua_receiver"
/>
<item
itemvalue=
"Python.opcua_receiver"
/>
<item
itemvalue=
"Python.opcua-transmitter (1)"
/>
<item
itemvalue=
"Python.opcua-transmitter (1)"
/>
<item
itemvalue=
"Python.hash_sender"
/>
<item
itemvalue=
"Python.hash_sender"
/>
<item
itemvalue=
"Python.asyncua_server (1)"
/>
<item
itemvalue=
"Python.asyncua_server (1)"
/>
<item
itemvalue=
"Python.asyncua_server"
/>
</list>
</list>
</recent_temporary>
</recent_temporary>
</component>
</component>
...
...
__pycache__/opcua_transmitter.cpython-39.pyc
0 → 100644
View file @
8cd89de1
File added
hash_sender.py
View file @
8cd89de1
...
@@ -51,11 +51,9 @@ async def get_send_hash(ENDPOINT,NAMESPACE,server_hash_udp_ip,server_hash_udp_po
...
@@ -51,11 +51,9 @@ async def get_send_hash(ENDPOINT,NAMESPACE,server_hash_udp_ip,server_hash_udp_po
node_hierarchy
[
"namespace_idx"
]
=
nm_no
node_hierarchy
[
"namespace_idx"
]
=
nm_no
json_hierarchy
=
json
.
dumps
(
node_hierarchy
)
json_hierarchy
=
json
.
dumps
(
node_hierarchy
)
hierarchy
=
json
.
dumps
(
json_hierarchy
)
hierarchy
=
json
.
dumps
(
json_hierarchy
)
utf8_encoded_string
=
hierarchy
.
encode
(
'utf-8'
)
binary_data
=
hierarchy
.
encode
()
string_length
=
len
(
utf8_encoded_string
)
print
(
binary_data
)
length_bytes
=
struct
.
pack
(
"!I"
,
string_length
)
#UDPClientSocket.sendto(binary_data, serverAddressPort)
binary_data
=
length_bytes
+
utf8_encoded_string
UDPClientSocket
.
sendto
(
binary_data
,
serverAddressPort
)
def
send_hash
(
Endpoint
,
Namespace
,
server_hash_udp_ip
,
server_hash_udp_port
):
def
send_hash
(
Endpoint
,
Namespace
,
server_hash_udp_ip
,
server_hash_udp_port
):
asyncio
.
run
(
get_send_hash
(
Endpoint
,
Namespace
,
server_hash_udp_ip
,
server_hash_udp_port
))
asyncio
.
run
(
get_send_hash
(
Endpoint
,
Namespace
,
server_hash_udp_ip
,
server_hash_udp_port
))
\ No newline at end of file
opcua-transmitter.py
View file @
8cd89de1
...
@@ -33,6 +33,7 @@ class MyHandler(SubHandler):
...
@@ -33,6 +33,7 @@ class MyHandler(SubHandler):
while
True
:
while
True
:
[
node
,
value
,
data
]
=
self
.
_queue
.
get_nowait
()
[
node
,
value
,
data
]
=
self
.
_queue
.
get_nowait
()
datatype
=
type
(
value
)
datatype
=
type
(
value
)
print
(
value
)
packet
=
str
(
datatype
)
+
"&"
+
str
(
value
)
+
"&"
+
str
(
node
.
nodeid
.
NamespaceIndex
)
+
"&"
+
str
(
node
.
nodeid
.
Identifier
)
packet
=
str
(
datatype
)
+
"&"
+
str
(
value
)
+
"&"
+
str
(
node
.
nodeid
.
NamespaceIndex
)
+
"&"
+
str
(
node
.
nodeid
.
Identifier
)
UDPClientSocket
.
sendto
(
str
.
encode
(
packet
),
serverAddressPort
)
UDPClientSocket
.
sendto
(
str
.
encode
(
packet
),
serverAddressPort
)
...
...
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