forked from M-Labs/artiq
1
0
Fork 0

doc: some precisions about controllers

This commit is contained in:
Sebastien Bourdeauducq 2014-10-28 11:43:06 +08:00
parent d5a3f3ef51
commit 8d305e3117
3 changed files with 6 additions and 4 deletions

View File

@ -84,7 +84,7 @@ def array(element, count):
class AutoContext: class AutoContext:
"""Base class to automate device and parameter management. """Base class to automate device and parameter discovery.
Drivers and experiments should in most cases overload this class to Drivers and experiments should in most cases overload this class to
obtain the parameters and devices (including the core device) that they obtain the parameters and devices (including the core device) that they

View File

@ -1,8 +1,7 @@
Core drivers reference Core drivers reference
====================== ======================
These drivers are for peripherals closely integrated into the core device, which do not These drivers are for peripherals closely integrated into the core device, which do not use the controller mechanism.
follow the controller paradigm.
:mod:`artiq.coredevice.rtio` module :mod:`artiq.coredevice.rtio` module
----------------------------------- -----------------------------------

View File

@ -1,7 +1,7 @@
Writing a driver Writing a driver
================ ================
These instructions cover writing a simple driver for a "slow" device, that uses the controller paradigm. These instructions cover writing a simple driver for a "slow" device, that uses the controller mechanism.
The controller The controller
-------------- --------------
@ -52,6 +52,8 @@ and verify that you can connect to the TCP port: ::
The client The client
---------- ----------
Controller clients are small command-line utilities that expose certain functionalities of the drivers. They are optional, and not used very often - typically for debugging and testing.
Create a ``hello-client`` file with the following contents: :: Create a ``hello-client`` file with the following contents: ::
#!/usr/bin/env python3 #!/usr/bin/env python3
@ -74,6 +76,7 @@ Run it as before, while the controller is running. You should see the message ap
$ ./hello-controller $ ./hello-controller
message: Hello World! message: Hello World!
When using the driver in an experiment, for simple cases the ``Client`` instance can be returned by the :class:`artiq.language.core.AutoContext` mechanism and used normally as a device.
Command-line arguments Command-line arguments
---------------------- ----------------------