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
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
ce80f49b
Commit
ce80f49b
authored
10 months ago
by
Matthias Stefan Bodenbenner
Browse files
Options
Downloads
Patches
Plain Diff
V10.1.1 fixed bug in stream scheduler and component
parent
aae46762
No related branches found
No related tags found
No related merge requests found
Pipeline
#445351
passed
10 months ago
Stage: build
Stage: push
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+4
-1
4 additions, 1 deletion
README.md
setup.py
+1
-1
1 addition, 1 deletion
setup.py
src/soil/component.py
+1
-1
1 addition, 1 deletion
src/soil/component.py
src/stream/scheduler.py
+20
-18
20 additions, 18 deletions
src/stream/scheduler.py
with
26 additions
and
21 deletions
README.md
+
4
−
1
View file @
ce80f49b
[

](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.1.
0
Current stable version: 10.1.
1
## Installation
## Installation
1.
Install the WZL-UDI package via pip
1.
Install the WZL-UDI package via pip
...
@@ -69,6 +69,9 @@ Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
...
@@ -69,6 +69,9 @@ Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
## Recent changes
## Recent changes
**10.1.1**
- 2024-08-16
-
added additional flog to Scheduler to configure semantic publishing correctly and supress unnecessary errors and warnings
**10.1.0**
- 2024-04-17
**10.1.0**
- 2024-04-17
-
added "advertisement", i.e. publishing of metadata via MQTT every x seconds
-
added "advertisement", i.e. publishing of metadata via MQTT every x seconds
-
light refactoring of source code for streaming via MQTT
-
light refactoring of source code for streaming via MQTT
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
ce80f49b
...
@@ -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.1.
0
'
,
version
=
'
10.1.
1
'
,
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/component.py
+
1
−
1
View file @
ce80f49b
...
@@ -334,7 +334,7 @@ class Component(Element):
...
@@ -334,7 +334,7 @@ class Component(Element):
__import__
(
module_name
)
__import__
(
module_name
)
implementation
=
getattr
(
sys
.
modules
[
module_name
],
class_name
)(
self
.
_implementation
.
_device
,
implementation
=
getattr
(
sys
.
modules
[
module_name
],
class_name
)(
self
.
_implementation
.
_device
,
*
args
,
**
kwargs
)
*
args
,
**
kwargs
)
except
AttributeError
:
except
(
AttributeError
,
ModuleNotFoundError
)
as
e
:
module_name
=
f
'
hwc.
{
module_name
}
'
module_name
=
f
'
hwc.
{
module_name
}
'
__import__
(
module_name
)
__import__
(
module_name
)
implementation
=
getattr
(
sys
.
modules
[
module_name
],
class_name
)(
self
.
_implementation
.
_device
,
implementation
=
getattr
(
sys
.
modules
[
module_name
],
class_name
)(
self
.
_implementation
.
_device
,
...
...
This diff is collapsed.
Click to expand it.
src/stream/scheduler.py
+
20
−
18
View file @
ce80f49b
...
@@ -22,7 +22,7 @@ class StreamScheduler(object):
...
@@ -22,7 +22,7 @@ class StreamScheduler(object):
"""
"""
def
__init__
(
self
,
loop
,
schedule
:
List
[
Job
],
publisher
:
MQTTPublisher
=
None
,
def
__init__
(
self
,
loop
,
schedule
:
List
[
Job
],
publisher
:
MQTTPublisher
=
None
,
start_immediately
:
bool
=
False
,
dataformat
:
str
=
'
json
'
,
model
:
'
Component
'
=
None
,
advertise
:
int
=
10
):
start_immediately
:
bool
=
False
,
dataformat
:
str
=
'
json
'
,
model
:
'
Component
'
=
None
,
advertise
:
int
=
10
,
semantic
:
bool
=
False
):
"""
Constructor.
"""
Constructor.
Args:
Args:
...
@@ -41,6 +41,7 @@ class StreamScheduler(object):
...
@@ -41,6 +41,7 @@ class StreamScheduler(object):
self
.
_dataformat
:
str
=
dataformat
self
.
_dataformat
:
str
=
dataformat
self
.
_model
:
Component
=
model
self
.
_model
:
Component
=
model
self
.
_advertise
=
advertise
self
.
_advertise
=
advertise
self
.
_semantic
=
semantic
for
job
in
schedule
:
for
job
in
schedule
:
if
isinstance
(
job
,
AdvertisementJob
):
if
isinstance
(
job
,
AdvertisementJob
):
...
@@ -113,6 +114,7 @@ class StreamScheduler(object):
...
@@ -113,6 +114,7 @@ class StreamScheduler(object):
self
.
_publisher
.
publish
(
job
.
topic
,
message
,
1
)
self
.
_publisher
.
publish
(
job
.
topic
,
message
,
1
)
# try to send semantic data package
# try to send semantic data package
if
self
.
_semantic
:
try
:
try
:
url
,
semantic_data
=
job
.
semantic_data
(
self
.
_model
)
url
,
semantic_data
=
job
.
semantic_data
(
self
.
_model
)
url
=
url
.
replace
(
'
https://
'
,
''
).
replace
(
'
http://
'
,
''
)
url
=
url
.
replace
(
'
https://
'
,
''
).
replace
(
'
http://
'
,
''
)
...
...
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