Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
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
Nikola Balog
opcua-asyncio
Commits
8fa9ffa8
Commit
8fa9ffa8
authored
Apr 03, 2015
by
Olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add methods in standard namespace
parent
ac15d133
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1155 additions
and
0 deletions
+1155
-0
opcua/standard_address_space_part10.py
opcua/standard_address_space_part10.py
+105
-0
opcua/standard_address_space_part5.py
opcua/standard_address_space_part5.py
+631
-0
opcua/standard_address_space_part9.py
opcua/standard_address_space_part9.py
+400
-0
schemas/generate_address_space.py
schemas/generate_address_space.py
+19
-0
No files found.
opcua/standard_address_space_part10.py
View file @
8fa9ffa8
...
...
@@ -1736,6 +1736,111 @@ def create_standard_address_space_Part10(server):
refs
.
append
(
ref
)
server
.
add_references
(
refs
)
node
=
ua
.
AddNodesItem
()
node
.
RequestedNewNodeId
=
ua
.
NodeId
.
from_string
(
"i=2426"
)
node
.
BrowseName
=
ua
.
QualifiedName
.
from_string
(
"Start"
)
node
.
NodeClass
=
ua
.
NodeClass
.
Method
node
.
ParentNodeId
=
ua
.
NodeId
.
from_string
(
"i=2391"
)
node
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=47"
)
attrs
=
ua
.
MethodAttributes
()
attrs
.
Description
=
ua
.
LocalizedText
(
"Causes the Program to transition from the Ready state to the Running state."
)
attrs
.
DisplayName
=
ua
.
LocalizedText
(
"Start"
)
node
.
NodeAttributes
=
attrs
server
.
add_nodes
([
node
])
refs
=
[]
ref
=
ua
.
AddReferencesItem
()
ref
.
IsForward
=
true
ref
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=37"
)
ref
.
SourceNodeId
=
ua
.
NodeId
.
from_string
(
"i=2426"
)
ref
.
TargetNodeClass
=
ua
.
NodeClass
.
DataType
ref
.
TargetNodeId
=
ua
.
NodeId
.
from_string
(
"i=78"
)
refs
.
append
(
ref
)
server
.
add_references
(
refs
)
node
=
ua
.
AddNodesItem
()
node
.
RequestedNewNodeId
=
ua
.
NodeId
.
from_string
(
"i=2427"
)
node
.
BrowseName
=
ua
.
QualifiedName
.
from_string
(
"Suspend"
)
node
.
NodeClass
=
ua
.
NodeClass
.
Method
node
.
ParentNodeId
=
ua
.
NodeId
.
from_string
(
"i=2391"
)
node
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=47"
)
attrs
=
ua
.
MethodAttributes
()
attrs
.
Description
=
ua
.
LocalizedText
(
"Causes the Program to transition from the Running state to the Suspended state."
)
attrs
.
DisplayName
=
ua
.
LocalizedText
(
"Suspend"
)
node
.
NodeAttributes
=
attrs
server
.
add_nodes
([
node
])
refs
=
[]
ref
=
ua
.
AddReferencesItem
()
ref
.
IsForward
=
true
ref
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=37"
)
ref
.
SourceNodeId
=
ua
.
NodeId
.
from_string
(
"i=2427"
)
ref
.
TargetNodeClass
=
ua
.
NodeClass
.
DataType
ref
.
TargetNodeId
=
ua
.
NodeId
.
from_string
(
"i=78"
)
refs
.
append
(
ref
)
server
.
add_references
(
refs
)
node
=
ua
.
AddNodesItem
()
node
.
RequestedNewNodeId
=
ua
.
NodeId
.
from_string
(
"i=2428"
)
node
.
BrowseName
=
ua
.
QualifiedName
.
from_string
(
"Resume"
)
node
.
NodeClass
=
ua
.
NodeClass
.
Method
node
.
ParentNodeId
=
ua
.
NodeId
.
from_string
(
"i=2391"
)
node
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=47"
)
attrs
=
ua
.
MethodAttributes
()
attrs
.
Description
=
ua
.
LocalizedText
(
"Causes the Program to transition from the Suspended state to the Running state."
)
attrs
.
DisplayName
=
ua
.
LocalizedText
(
"Resume"
)
node
.
NodeAttributes
=
attrs
server
.
add_nodes
([
node
])
refs
=
[]
ref
=
ua
.
AddReferencesItem
()
ref
.
IsForward
=
true
ref
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=37"
)
ref
.
SourceNodeId
=
ua
.
NodeId
.
from_string
(
"i=2428"
)
ref
.
TargetNodeClass
=
ua
.
NodeClass
.
DataType
ref
.
TargetNodeId
=
ua
.
NodeId
.
from_string
(
"i=78"
)
refs
.
append
(
ref
)
server
.
add_references
(
refs
)
node
=
ua
.
AddNodesItem
()
node
.
RequestedNewNodeId
=
ua
.
NodeId
.
from_string
(
"i=2429"
)
node
.
BrowseName
=
ua
.
QualifiedName
.
from_string
(
"Halt"
)
node
.
NodeClass
=
ua
.
NodeClass
.
Method
node
.
ParentNodeId
=
ua
.
NodeId
.
from_string
(
"i=2391"
)
node
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=47"
)
attrs
=
ua
.
MethodAttributes
()
attrs
.
Description
=
ua
.
LocalizedText
(
"Causes the Program to transition from the Ready, Running or Suspended state to the Halted state."
)
attrs
.
DisplayName
=
ua
.
LocalizedText
(
"Halt"
)
node
.
NodeAttributes
=
attrs
server
.
add_nodes
([
node
])
refs
=
[]
ref
=
ua
.
AddReferencesItem
()
ref
.
IsForward
=
true
ref
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=37"
)
ref
.
SourceNodeId
=
ua
.
NodeId
.
from_string
(
"i=2429"
)
ref
.
TargetNodeClass
=
ua
.
NodeClass
.
DataType
ref
.
TargetNodeId
=
ua
.
NodeId
.
from_string
(
"i=78"
)
refs
.
append
(
ref
)
server
.
add_references
(
refs
)
node
=
ua
.
AddNodesItem
()
node
.
RequestedNewNodeId
=
ua
.
NodeId
.
from_string
(
"i=2430"
)
node
.
BrowseName
=
ua
.
QualifiedName
.
from_string
(
"Reset"
)
node
.
NodeClass
=
ua
.
NodeClass
.
Method
node
.
ParentNodeId
=
ua
.
NodeId
.
from_string
(
"i=2391"
)
node
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=47"
)
attrs
=
ua
.
MethodAttributes
()
attrs
.
Description
=
ua
.
LocalizedText
(
"Causes the Program to transition from the Halted state to the Ready state."
)
attrs
.
DisplayName
=
ua
.
LocalizedText
(
"Reset"
)
node
.
NodeAttributes
=
attrs
server
.
add_nodes
([
node
])
refs
=
[]
ref
=
ua
.
AddReferencesItem
()
ref
.
IsForward
=
true
ref
.
ReferenceTypeId
=
ua
.
NodeId
.
from_string
(
"i=37"
)
ref
.
SourceNodeId
=
ua
.
NodeId
.
from_string
(
"i=2430"
)
ref
.
TargetNodeClass
=
ua
.
NodeClass
.
DataType
ref
.
TargetNodeId
=
ua
.
NodeId
.
from_string
(
"i=78"
)
refs
.
append
(
ref
)
server
.
add_references
(
refs
)
node
=
ua
.
AddNodesItem
()
node
.
RequestedNewNodeId
=
ua
.
NodeId
.
from_string
(
"i=2378"
)
node
.
BrowseName
=
ua
.
QualifiedName
.
from_string
(
"ProgramTransitionEventType"
)
...
...
opcua/standard_address_space_part5.py
View file @
8fa9ffa8
This diff is collapsed.
Click to expand it.
opcua/standard_address_space_part9.py
View file @
8fa9ffa8
This diff is collapsed.
Click to expand it.
schemas/generate_address_space.py
View file @
8fa9ffa8
...
...
@@ -81,6 +81,9 @@ class CodeGenerator(object):
elif
child
.
tag
[
51
:]
==
'UADataType'
:
node
=
self
.
parse_node
(
child
)
self
.
make_datatype_code
(
node
)
elif
child
.
tag
[
51
:]
==
'UAMethod'
:
node
=
self
.
parse_node
(
child
)
self
.
make_method_code
(
node
)
elif
child
.
tag
[
51
:]
==
'Aliases'
:
for
el
in
child
:
self
.
aliases
[
el
.
attrib
[
"Alias"
]]
=
el
.
text
...
...
@@ -277,6 +280,22 @@ def create_standard_address_space_%s(server):
self
.
make_refs_code
(
obj
,
indent
)
def
make_method_code
(
self
,
obj
):
indent
=
" "
self
.
writecode
(
indent
)
self
.
make_node_code
(
obj
,
indent
)
self
.
writecode
(
indent
,
'attrs = ua.MethodAttributes()'
)
if
obj
.
desc
:
self
.
writecode
(
indent
,
'attrs.Description = ua.LocalizedText("{}")'
.
format
(
obj
.
desc
))
self
.
writecode
(
indent
,
'attrs.DisplayName = ua.LocalizedText("{}")'
.
format
(
obj
.
displayname
))
if
obj
.
accesslevel
:
self
.
writecode
(
indent
,
'attrs.AccessLevel = {}'
.
format
(
obj
.
accesslevel
))
if
obj
.
useraccesslevel
:
self
.
writecode
(
indent
,
'attrs.UserAccessLevel = {}'
.
format
(
obj
.
useraccesslevel
))
if
obj
.
minsample
:
self
.
writecode
(
indent
,
'attrs.MinimumSamplingInterval = {}'
.
format
(
obj
.
minsample
))
if
obj
.
dimensions
:
self
.
writecode
(
indent
,
'attrs.ArrayDimensions = {}'
.
format
(
self
.
to_vector
(
obj
.
dimensions
)))
self
.
writecode
(
indent
,
'node.NodeAttributes = attrs'
)
self
.
writecode
(
indent
,
'server.add_nodes([node])'
)
self
.
make_refs_code
(
obj
,
indent
)
def
make_reference_code
(
self
,
obj
):
indent
=
" "
...
...
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