-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
33 deletions.
There are no files selected for viewing
65 changes: 32 additions & 33 deletions
65
src/jukebox/components/rfid/hardware/template_new_reader/README.rst
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 |
---|---|---|
@@ -1,42 +1,41 @@ | ||
Template Reader | ||
---------------- | ||
# Template Reader | ||
|
||
Or in full: *Template for creating and integrating a new RFID Reader* | ||
*Template for creating and integrating a new RFID Reader* | ||
|
||
.. note:: For developers only | ||
> [!NOTE] | ||
> For developers only | ||
|
||
This template provides the skeleton API for a new Reader. | ||
If you follow the conventions outlined below, your new reader will be picked up automatically | ||
There is no extra need to register the reader module with the Phoniebox. | ||
Just re-run :ref:`the reader config tool <developer/coreapps:run_register_rfid_reader.py>`. | ||
This template provides the skeleton API for a new Reader. If you follow | ||
the conventions outlined below, your new reader will be picked up | ||
automatically There is no extra need to register the reader module with | ||
the Phoniebox. Just re-run `the reader config tool <developer/coreapps:run_register_rfid_reader.py>`. | ||
|
||
Follow the instructions in `template_new_reader.py` | ||
Follow the instructions in [template_new_reader.py] | ||
|
||
Also have a look at the other reader subpackages to see how stuff works with an example | ||
Also have a look at the other reader subpackages to see how stuff works | ||
with an example | ||
|
||
|
||
File structure | ||
^^^^^^^^^^^^^^^^^^^^ | ||
## File structure | ||
|
||
Your new reader is a python subpackage with these three mandatory files | ||
|
||
.. code-block:: bash | ||
components/rfid/hardware/awesome_reader/ | ||
+- awesome_reader.py <-- The actual reader module | ||
+- description.py <-- A description module w/o dependencies. Do not change the filename! | ||
+- README.rst <-- The Readme | ||
The module documentation must go into a separate file, named README.MD. | ||
|
||
Conventions | ||
^^^^^^^^^^^^^^^^^^ | ||
|
||
* Single reader per directory / subpackage | ||
* reader module directory name and reader module file name must be identical | ||
* Obviously awesome_reader will be replaced with something more descriptive. The naming scheme for the subpackage is | ||
|
||
* <type_of_reader>_<io_bus>_<other_specials_like_special_lib> | ||
* e.g. generic_usb/generic_usb.py | ||
* e.g. pn532_spi/pn532_spi.py | ||
* ... | ||
``` bash | ||
components/rfid/hardware/awesome_reader/ | ||
+- awesome_reader.py <-- The actual reader module | ||
+- description.py <-- A description module w/o dependencies. Do not change the filename! | ||
+- README.rst <-- The Readme | ||
``` | ||
|
||
The module documentation must go into a separate file, called README.ME. | ||
|
||
## Conventions | ||
|
||
- Single reader per directory / subpackage | ||
- reader module directory name and reader module file name must be | ||
identical | ||
- Obviously awesome_reader will be replaced with something more | ||
descriptive. The naming scheme for the subpackage is | ||
- \<type_of_reader\>\_\<io_bus\>\_\<other_specials_like_special_lib\> | ||
- e.g. generic_usb/generic_usb.py | ||
- e.g. pn532_spi/pn532_spi.py | ||
- ... |