-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smartplugin: Implemented put_command_to_run_queue() and get_command_f…
…rom_run_queue()
- Loading branch information
Showing
3 changed files
with
92 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
.. index:: Referenz; Asyncio in Plugins | ||
.. index:: Asyncio in Plugins | ||
.. index:: Plugins; Asyncio in Plugins | ||
|
||
.. role:: redsup | ||
.. role:: bluesup | ||
.. role:: greensup | ||
.. role:: blacksup | ||
|
||
|
||
|
||
asyncio Unterstützung in Plugins :redsup:`Neu` | ||
============================================== | ||
|
||
Python Packages zur Ansteuerung von Peripherie werden zunehmend unter Verwendung von asyncio erstellt. Um diese | ||
Packages in Plugins nutzen zu können, muss das jeweilige Plugin asyncio unterstützen. Die Implementierung hiervon | ||
ist nicht tirvial und die ersten Plugins die asyncio implementiert haben, tun das sehr unterschiedlich und unter | ||
Nutzung der Low-Level Funktionen von asyncio (was ein erhebliches Error-Handling im Plugin voraussetzt). | ||
|
||
Um die Nutzung von asyncio zu vereinfachen und in den Plugins zu standardisieren, unterstützt SmartHomeNG ab | ||
v1.11 die Nutzung von asyncio in Plugins durch eine Erweiterung der SmartPlugin Klasse um einige Methoden. | ||
|
||
| | ||
Methoden zur Unterstützung von asyncio | ||
-------------------------------------- | ||
|
||
.. autoclass:: lib.model.smartplugin.SmartPlugin | ||
:members: asyncio_state, start_asyncio, stop_asyncio, run_asyncio_coro, list_asyncio_tasks | ||
:undoc-members: | ||
:show-inheritance: | ||
:member-order: bysource | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters