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
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
nexedi
osie
Commits
101003e8
Commit
101003e8
authored
Jul 28, 2023
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorize.
parent
757dc723
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
opcua-to-http-gw/opcua-to-http-gw.py
opcua-to-http-gw/opcua-to-http-gw.py
+2
-2
No files found.
opcua-to-http-gw/opcua-to-http-gw.py
View file @
101003e8
...
@@ -30,7 +30,7 @@ port = args.port
...
@@ -30,7 +30,7 @@ port = args.port
xml
=
args
.
xml
xml
=
args
.
xml
erp5_ip
=
args
.
erp5_ip
erp5_ip
=
args
.
erp5_ip
erp5_port
=
args
.
erp5_port
erp5_port
=
args
.
erp5_port
ERP5_REQUEST_API
=
"ERP5Site_handleOPCUARequest"
@
dataclass
(
frozen
=
True
)
@
dataclass
(
frozen
=
True
)
class
ERP5Handler
(
asyncua
.
common
.
subscription
.
SubHandler
):
class
ERP5Handler
(
asyncua
.
common
.
subscription
.
SubHandler
):
...
@@ -40,7 +40,7 @@ class ERP5Handler(asyncua.common.subscription.SubHandler):
...
@@ -40,7 +40,7 @@ class ERP5Handler(asyncua.common.subscription.SubHandler):
@
property
@
property
def
uri
(
self
):
def
uri
(
self
):
return
f"http://
{
self
.
ip
}
:
{
self
.
port
}
/erp5/
opcua_test"
return
f"http://
{
self
.
ip
}
:
{
self
.
port
}
/erp5/
%s"
%
ERP5_REQUEST_API
def
call
(
self
,
**
data
):
def
call
(
self
,
**
data
):
params
=
urllib
.
parse
.
quote_plus
(
json
.
dumps
({
k
:
str
(
v
)
for
k
,
v
in
data
.
items
()}))
params
=
urllib
.
parse
.
quote_plus
(
json
.
dumps
({
k
:
str
(
v
)
for
k
,
v
in
data
.
items
()}))
...
...
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