40 Commits

Author SHA1 Message Date
Mose Müller
be624f8f07 renaming file containing abstract base classes 2023-08-02 12:06:22 +02:00
Mose Müller
3294617542 feat: adding other abstract base classes 2023-08-02 12:06:22 +02:00
Mose Müller
bcc846f70d feat: moving CallbackManager to new file, moving emit_notification to CallbackManager 2023-08-02 12:06:22 +02:00
Mose Müller
2632e7ba6e creating AbstractDataService class
This is needed to split the CallbackManager into another class.
2023-08-02 12:06:22 +02:00
Mose Müller
4265929b4e feat: creating CallbackManager class which does all the callback related stuff 2023-08-02 12:06:22 +02:00
Mose Müller
2e683df6ef feat: only updating the class attributes with the values from the JSON if the types are the same 2023-08-02 12:06:22 +02:00
Mose Müller
3e72e25f9f changing utils module exports 2023-08-02 12:06:22 +02:00
Mose Müller
a4402061e9 removing unused function 2023-08-02 12:06:21 +02:00
Mose Müller
5fbbdd994c docs: updating docstring, formatting 2023-08-02 12:06:21 +02:00
Mose Müller
5695d28ea3 fix: component import 2023-08-02 12:06:21 +02:00
Mose Müller
d721ef05f5 refactoring the way DataService instance attributes are updated 2023-08-02 12:06:21 +02:00
Mose Müller
b68cb4d309 feat: creating components module, adding docstrings 2023-08-02 12:06:21 +02:00
Mose Müller
21eb7d4c26 docs: updating TaskManager documentation 2023-08-02 12:06:21 +02:00
Mose Müller
a9b98b675d feat: adding support for saving the status of a DataService class
By passing a the "filename" keyword to the DataService init function,
one can save the state of the instance in this file. Quitting the service
(Ctrl+C) will dump the state of the instance in the file with given
filename. When starting the instance, it will load these values again.
2023-08-02 12:06:21 +02:00
Mose Müller
a288c35c50 revert: moving DataServiceSerializer functionality back to
DataService
2023-08-02 12:06:21 +02:00
Mose Müller
6c9a09eabc feat: updating utils
- moving apply_update_to_data_service to data_service and renaming to
update_DataService_by_path
    - splitting function into several logical parts
- adding and rewriting multiple helper functions
2023-08-02 12:06:21 +02:00
Mose Müller
18c71dd7f6 fix: fixing method serialization 2023-08-02 12:06:21 +02:00
Mose Müller
ef28475c4e feat: moving serialization stuff into DataServiceSerializer 2023-08-02 12:06:21 +02:00
Mose Müller
9ffd666085 chore: moving task-based things to TaskManager 2023-08-02 12:06:21 +02:00
Mose Müller
3352d34ec6 DataService: updating serialize
- removing unnecessary prefix
- updating list serialization
2023-08-02 12:06:20 +02:00
Mose Müller
d9a4dd2aeb fixing (ignoring) linting warnings 2023-08-02 12:06:20 +02:00
Mose Müller
e3211b6000 feat: separating TaskManager out of DataService 2023-08-02 12:06:20 +02:00
Mose Müller
bc50f99e18 feat: adding task status change callbacks
When a task (async function) is started / stopped, this will emit a
notification via socketio.
2023-08-02 12:06:20 +02:00
Mose Müller
3d07a5c9dd DataService: converting ints to floats if current value is a float 2023-08-02 12:06:20 +02:00
Mose Müller
07d9066be9 docs: adding some docstrings 2023-08-02 12:06:20 +02:00
Mose Müller
74576a5810 DataService: serialised json does not contain start/stop task functions 2023-08-02 12:06:20 +02:00
Mose Müller
b1d162a28b fix: update start_task function signature to match original async function 2023-08-02 12:06:20 +02:00
Mose Müller
e48e33c948 feat: adding support for enums
- handling fronend upates
- adding serialization for DataService classes
- adapting notification emission
2023-08-02 12:06:20 +02:00
Mose Müller
95dd12bf7f feat: adding backend NumberSlider 2023-08-02 12:06:20 +02:00
Mose Müller
193775c609 dataservice: adapting serialize method 2023-08-02 12:06:19 +02:00
Mose Müller
3858c7efc2 feat: adding notification callback functionality to DataService 2023-08-02 12:06:19 +02:00
Mose Müller
0bfb3a44ae DataService: removing threading, using asyncio loop
Start tasks through asyncio loop instead of a separate thread.
Autmatic tasks are not started in the init function. They can be started elsewhere.
2023-08-02 12:06:19 +02:00
Mose Müller
387c258e95 Reordering DataService methods 2023-08-02 12:06:19 +02:00
Mose Müller
a09ec145ca small update on DataService class 2023-08-02 12:06:19 +02:00
Mose Müller
319a62bb01 fix: property callback issues, implemented new tests 2023-08-02 12:06:19 +02:00
Mose Müller
ae8be562db chore: updating docs, renaming _root to __root__ 2023-08-02 12:06:19 +02:00
Mose Müller
206a831473 feat: added property callbacks, added warnings 2023-08-02 12:06:19 +02:00
Mose Müller
8e7568b57f docs: Adding documentation 2023-08-02 12:06:19 +02:00
Mose Müller
460be17ecb moving from _full_access_name to callbacks 2023-08-02 12:06:19 +02:00
Mose Müller
b67c0f9da3 Initial commit 2023-08-02 12:06:19 +02:00