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
20fcedcb
Commit
20fcedcb
authored
Mar 10, 2016
by
olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
__ne__ is necessry for python2
parent
10ca3263
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
opcua/common/node.py
opcua/common/node.py
+3
-0
opcua/ua/uatypes.py
opcua/ua/uatypes.py
+18
-0
tests/tests.py
tests/tests.py
+4
-0
No files found.
opcua/common/node.py
View file @
20fcedcb
...
@@ -33,6 +33,9 @@ class Node(object):
...
@@ -33,6 +33,9 @@ class Node(object):
return
True
return
True
return
False
return
False
def
__ne__
(
self
,
other
):
return
not
self
.
__eq__
(
other
)
def
__str__
(
self
):
def
__str__
(
self
):
return
"Node({})"
.
format
(
self
.
nodeid
)
return
"Node({})"
.
format
(
self
.
nodeid
)
__repr__
=
__str__
__repr__
=
__str__
...
...
opcua/ua/uatypes.py
View file @
20fcedcb
...
@@ -334,6 +334,12 @@ class StatusCode(FrozenClass):
...
@@ -334,6 +334,12 @@ class StatusCode(FrozenClass):
return
'StatusCode({})'
.
format
(
self
.
name
)
return
'StatusCode({})'
.
format
(
self
.
name
)
__repr__
=
__str__
__repr__
=
__str__
def
__eq__
(
self
,
other
):
return
self
.
value
==
other
.
value
def
__ne__
(
self
,
other
):
return
not
self
.
__eq__
(
other
)
class
NodeIdType
(
Enum
):
class
NodeIdType
(
Enum
):
TwoByte
=
0
TwoByte
=
0
...
@@ -397,6 +403,9 @@ class NodeId(FrozenClass):
...
@@ -397,6 +403,9 @@ class NodeId(FrozenClass):
def
__eq__
(
self
,
node
):
def
__eq__
(
self
,
node
):
return
isinstance
(
node
,
NodeId
)
and
self
.
__key
()
==
node
.
__key
()
return
isinstance
(
node
,
NodeId
)
and
self
.
__key
()
==
node
.
__key
()
def
__ne__
(
self
,
other
):
return
not
self
.
__eq__
(
other
)
def
__hash__
(
self
):
def
__hash__
(
self
):
return
hash
(
self
.
__key
())
return
hash
(
self
.
__key
())
...
@@ -608,6 +617,9 @@ class QualifiedName(FrozenClass):
...
@@ -608,6 +617,9 @@ class QualifiedName(FrozenClass):
def
__eq__
(
self
,
bname
):
def
__eq__
(
self
,
bname
):
return
isinstance
(
bname
,
QualifiedName
)
and
self
.
Name
==
bname
.
Name
and
self
.
NamespaceIndex
==
bname
.
NamespaceIndex
return
isinstance
(
bname
,
QualifiedName
)
and
self
.
Name
==
bname
.
Name
and
self
.
NamespaceIndex
==
bname
.
NamespaceIndex
def
__ne__
(
self
,
other
):
return
not
self
.
__eq__
(
other
)
def
__str__
(
self
):
def
__str__
(
self
):
return
'QualifiedName({}:{})'
.
format
(
self
.
NamespaceIndex
,
self
.
Name
)
return
'QualifiedName({}:{})'
.
format
(
self
.
NamespaceIndex
,
self
.
Name
)
...
@@ -668,6 +680,9 @@ class LocalizedText(FrozenClass):
...
@@ -668,6 +680,9 @@ class LocalizedText(FrozenClass):
return
True
return
True
return
False
return
False
def
__ne__
(
self
,
other
):
return
not
self
.
__eq__
(
other
)
class
ExtensionObject
(
FrozenClass
):
class
ExtensionObject
(
FrozenClass
):
...
@@ -835,6 +850,9 @@ class Variant(FrozenClass):
...
@@ -835,6 +850,9 @@ class Variant(FrozenClass):
return
True
return
True
return
False
return
False
def
__ne__
(
self
,
other
):
return
not
self
.
__eq__
(
other
)
def
_guess_type
(
self
,
val
):
def
_guess_type
(
self
,
val
):
while
isinstance
(
val
,
(
list
,
tuple
)):
while
isinstance
(
val
,
(
list
,
tuple
)):
if
len
(
val
)
==
0
:
if
len
(
val
)
==
0
:
...
...
tests/tests.py
View file @
20fcedcb
...
@@ -23,5 +23,9 @@ if CRYPTOGRAPHY_AVAILABLE:
...
@@ -23,5 +23,9 @@ if CRYPTOGRAPHY_AVAILABLE:
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
logging
.
basicConfig
(
level
=
logging
.
WARNING
)
logging
.
basicConfig
(
level
=
logging
.
WARNING
)
#l = logging.getLogger("opcua.server.internal_subscription")
#l.setLevel(logging.DEBUG)
#l = logging.getLogger("opcua.server.internal_server")
#l.setLevel(logging.DEBUG)
unittest
.
main
(
verbosity
=
3
)
unittest
.
main
(
verbosity
=
3
)
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