Skip to content

Commit

Permalink
markdown file
Browse files Browse the repository at this point in the history
  • Loading branch information
s-martin authored Nov 14, 2023
1 parent 13bf5e5 commit b12c941
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions src/jukebox/components/rfid/hardware/template_new_reader/README.rst
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
- ...

0 comments on commit b12c941

Please sign in to comment.