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
04bac0da
Commit
04bac0da
authored
Apr 20, 2015
by
Olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one more python2 hack, renenable event testing
parent
6d76e222
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
opcua/uatypes.py
opcua/uatypes.py
+2
-4
tests.py
tests.py
+2
-2
No files found.
opcua/uatypes.py
View file @
04bac0da
...
...
@@ -137,9 +137,6 @@ def unpack_uatype_array(uatype, data):
result
.
append
(
unpack_uatype
(
uatype
,
data
))
return
result
def
pack_string
(
string
):
length
=
len
(
string
)
if
length
==
0
:
...
...
@@ -158,7 +155,8 @@ def unpack_bytes(data):
def
unpack_string
(
data
):
b
=
unpack_bytes
(
data
)
#return str(b, "utf-8")
if
sys
.
version_info
.
major
<
3
:
return
str
(
b
)
return
b
.
decode
(
"utf-8"
)
def
test_bit
(
data
,
offset
):
...
...
tests.py
View file @
04bac0da
...
...
@@ -48,7 +48,7 @@ class MySubHandler():
self
.
future
.
set_result
((
handle
,
node
,
val
,
attr
))
def
event
(
self
,
handle
,
event
):
self
.
future
.
set_result
((
handle
,
node
,
val
,
attr
))
self
.
future
.
set_result
((
handle
,
event
))
class
Unit
(
unittest
.
TestCase
):
...
...
@@ -273,7 +273,7 @@ class CommonTests(object):
sub
.
unsubscribe
(
handle
)
sub
.
delete
()
def
_
test_events
(
self
):
def
test_events
(
self
):
msclt
=
MySubHandler
()
#cond = msclt.setup()
sub
=
self
.
opc
.
create_subscription
(
100
,
msclt
)
...
...
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