Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Python Unified Device Interface
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WZL-IQS-Public
Sensor Interfacing Language (SOIL)
Python Unified Device Interface
Commits
48d4ae57
Commit
48d4ae57
authored
Mar 22, 2024
by
Matthias Stefan Bodenbenner
Browse files
Options
Downloads
Patches
Plain Diff
bug fix in streaming
parent
595930b8
No related branches found
No related tags found
No related merge requests found
Pipeline
#377232
passed
Mar 22, 2024
Stage: build
Stage: push
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+5
-2
5 additions, 2 deletions
README.md
setup.py
+1
-1
1 addition, 1 deletion
setup.py
src/soil/stream.py
+9
-4
9 additions, 4 deletions
src/soil/stream.py
with
15 additions
and
7 deletions
README.md
+
5
−
2
View file @
48d4ae57
[

](https://git-ce.rwth-aachen.de/wzl-mq-ms/forschung-lehre/lava/unified-device-interface/python/commits/master)
[

](https://git-ce.rwth-aachen.de/wzl-mq-ms/forschung-lehre/lava/unified-device-interface/python/commits/master)
# Python Unified Device Interface
# Python Unified Device Interface
Current stable version: 10.0.
4
Current stable version: 10.0.
5
## Installation
## Installation
1.
Install the WZL-UDI package via pip
1.
Install the WZL-UDI package via pip
...
@@ -69,7 +69,10 @@ Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
...
@@ -69,7 +69,10 @@ Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
## Recent changes
## Recent changes
**10.0.4**
- 2024-03-21
**10.0.5**
- 2024-03-22
-
bug fix in streaming
-
**10.0.4**
- 2024-03-22
-
increased logging verbosity of streaming class
-
increased logging verbosity of streaming class
-
fixed streaming of semantic measurements
-
fixed streaming of semantic measurements
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
48d4ae57
...
@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
...
@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
long_description
=
fh
.
read
()
long_description
=
fh
.
read
()
setup
(
name
=
'
wzl-udi
'
,
setup
(
name
=
'
wzl-udi
'
,
version
=
'
10.0.
4
'
,
version
=
'
10.0.
5
'
,
url
=
'
https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python
'
,
url
=
'
https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python
'
,
project_urls
=
{
project_urls
=
{
"
Bug Tracker
"
:
"
https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python/-/issues
"
,
"
Bug Tracker
"
:
"
https://git-ce.rwth-aachen.de/wzl-mq-public/soil/python/-/issues
"
,
...
...
This diff is collapsed.
Click to expand it.
src/soil/stream.py
+
9
−
4
View file @
48d4ae57
...
@@ -184,18 +184,20 @@ class UpdateJob(FixedJob):
...
@@ -184,18 +184,20 @@ class UpdateJob(FixedJob):
def
__init__
(
self
,
topic
:
str
,
callback
:
Callable
):
def
__init__
(
self
,
topic
:
str
,
callback
:
Callable
):
FixedJob
.
__init__
(
self
,
topic
,
0.01
,
callback
)
FixedJob
.
__init__
(
self
,
topic
,
0.01
,
callback
)
self
.
_last_value
=
None
self
.
_last_value
=
None
self
.
_last_covariance
=
None
def
_is_triggered
(
self
)
->
bool
:
def
_is_triggered
(
self
)
->
bool
:
value
=
self
.
_callback
()
value
,
covariance
=
self
.
_callback
()
updated
=
self
.
_last_value
!=
value
updated
=
self
.
_last_value
!=
value
self
.
_last_value
=
value
self
.
_last_value
=
value
self
.
_last_covariance
=
covariance
if
isinstance
(
updated
,
list
):
if
isinstance
(
updated
,
list
):
updated
=
any
(
updated
)
updated
=
any
(
updated
)
return
updated
return
updated
@property
@property
def
value
(
self
)
->
Any
:
def
value
(
self
)
->
Tuple
[
Any
,
Any
]
:
return
self
.
_last_value
return
self
.
_last_value
,
self
.
_last_covariance
class
EventJob
(
FixedJob
):
class
EventJob
(
FixedJob
):
...
@@ -211,8 +213,11 @@ class EventJob(FixedJob):
...
@@ -211,8 +213,11 @@ class EventJob(FixedJob):
def
_is_triggered
(
self
)
->
bool
:
def
_is_triggered
(
self
)
->
bool
:
value
=
self
.
_callback
()
value
=
self
.
_callback
()
if
isinstance
(
value
,
tuple
):
assert
len
(
value
)
==
2
value
,
covariance
=
value
updated
=
self
.
_event
.
is_triggered
(
value
)
updated
=
self
.
_event
.
is_triggered
(
value
)
self
.
_last_value
=
value
if
isinstance
(
updated
,
list
):
if
isinstance
(
updated
,
list
):
updated
=
any
(
updated
)
updated
=
any
(
updated
)
return
updated
return
updated
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment