Arkady Devices¶
“Device” is a loose term in Arkady. It represents a fundamental unit of interface and should generally map to a logical unit of control. This could be interaction with an actual physical device or peripheral such as a sensor, a motor, an Arduino, a DMX controller, etc. Or it could be something more virtual such as a set of system calls, internet/intranet queries, a managed subprocess and more.
Two basic device patterns are implemented: SerialDevice and AsyncDevice. Use of SerialDevice is recommended when the underlying work must be strictly serial (meaning non-parallel). AsyncDevice is suitable when multiple executions of the handler can safely run simultaneously.
-
class
arkady.devices.
AsyncDevice
(*args, **kwargs)¶ -
requests_runner
()¶ Responsible for taking jobs out of the jobs queue and executing them.
Not implemented in this base class, must be overridden.
Returns:
-
-
class
arkady.devices.
Device
(*args, loop=None, **kwargs)¶ The Base Device from which all other devices derive, whether they have synchronous or asynchronous underlying work.
-
requests_runner
()¶ Responsible for taking jobs out of the jobs queue and executing them.
Not implemented in this base class, must be overridden.
Returns:
-
-
class
arkady.devices.
DummyAsyncDevice
(*args, **kwargs)¶
-
class
arkady.devices.
DummySerialDevice
(*args, **kwargs)¶