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
Martin Manchev
osie
Commits
a745cfa2
Commit
a745cfa2
authored
Jul 31, 2023
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proxify and set properly.
parent
3bc08b4a
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
221 deletions
+103
-221
bt5/erp5_opcua/PropertySheetTemplateItem/portal_property_sheets/OPCUADocument/node_dict_property.xml
...rtal_property_sheets/OPCUADocument/node_dict_property.xml
+2
-4
bt5/erp5_opcua/SkinTemplateItem/portal_skins/erp5_opcua/ERP5Site_handleOPCUARequest.py
...em/portal_skins/erp5_opcua/ERP5Site_handleOPCUARequest.py
+7
-8
bt5/erp5_opcua/SkinTemplateItem/portal_skins/erp5_opcua/OPCUADocument_view.xml
...mplateItem/portal_skins/erp5_opcua/OPCUADocument_view.xml
+1
-0
bt5/erp5_opcua/SkinTemplateItem/portal_skins/erp5_opcua/OPCUADocument_view/my_node_dict.xml
...rtal_skins/erp5_opcua/OPCUADocument_view/my_node_dict.xml
+84
-0
bt5/erp5_opcua/SkinTemplateItem/portal_skins/erp5_opcua/OPCUADocument_view/my_title.xml
...m/portal_skins/erp5_opcua/OPCUADocument_view/my_title.xml
+9
-209
No files found.
bt5/erp5_opcua/PropertySheetTemplateItem/portal_property_sheets/OPCUADocument/node_dict_property.xml
View file @
a745cfa2
...
@@ -10,15 +10,13 @@
...
@@ -10,15 +10,13 @@
<key>
<string>
categories
</string>
</key>
<key>
<string>
categories
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
elementary_type/
object
</string>
<string>
elementary_type/
multiple selection
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
<value>
<value>
<string>
Contains a dictionary of OPC Ua nodes and their values.
</string>
</value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_opcua/SkinTemplateItem/portal_skins/erp5_opcua/ERP5Site_handleOPCUARequest.py
View file @
a745cfa2
...
@@ -4,10 +4,6 @@ Simple script for OPCUA POC
...
@@ -4,10 +4,6 @@ Simple script for OPCUA POC
import
json
import
json
from
erp5.component.module.Log
import
log
from
erp5.component.module.Log
import
log
def
getPropertyId
(
node_id
):
# XXX: based on node_id guess property type, too! -i -> integer , s- string, etc,,
return
node_id
#.replace(";", "")
# XXX: get rid of Proxy roles on this script when proper authentication is used!!!
# XXX: get rid of Proxy roles on this script when proper authentication is used!!!
# XXX: what should be the OPCUA container?
# XXX: what should be the OPCUA container?
...
@@ -23,8 +19,11 @@ else:
...
@@ -23,8 +19,11 @@ else:
# log only set requests for now
# log only set requests for now
node_id
=
data
[
'node'
]
node_id
=
data
[
'node'
]
node_value
=
data
[
'val'
]
node_value
=
data
[
'val'
]
log
(
"Set '%s' = '%s' to %s as %s"
%
(
node_id
,
node_value
,
default_opcua_document
,
getPropertyId
(
node_id
)))
log
(
"Set '%s' = '%s' to %s as %s"
%
(
node_id
,
node_value
,
default_opcua_document
,
node_id
))
log
(
data
)
#log(data)
# set to "ERP5 OPCUA Document"
node_dict
=
default_opcua_document
.
getNodeDict
()
node_dict
=
default_opcua_document
.
getNodeDict
()
log
(
node_dict
)
log
(
"Original = %s"
%
node_dict
)
# XXX: set to "ERP5 OPCUA Document" property
node_dict
[
node_id
]
=
node_value
default_opcua_document
.
setNodeDict
(
node_dict
)
log
(
"Changed = %s"
%
default_opcua_document
.
getNodeDict
())
bt5/erp5_opcua/SkinTemplateItem/portal_skins/erp5_opcua/OPCUADocument_view.xml
View file @
a745cfa2
...
@@ -77,6 +77,7 @@
...
@@ -77,6 +77,7 @@
<value>
<value>
<list>
<list>
<string>
my_title
</string>
<string>
my_title
</string>
<string>
my_node_dict
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
bt5/erp5_opcua/SkinTemplateItem/portal_skins/erp5_opcua/OPCUADocument_view/my_node_dict.xml
0 → 100644
View file @
a745cfa2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
editable
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_node_dict
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_text_area_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_opcua/SkinTemplateItem/portal_skins/erp5_opcua/OPCUADocument_view/my_title.xml
View file @
a745cfa2
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