boards_connected.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
  2. .. module:: boards_connected
  3. .. _boards_connected:
  4. Module boards_connected
  5. =======================
  6. Discover and manage connected boards
  7. .. py:class:: BoardsConnected(object)
  8. Container for connected/available boards
  9. This will work as a generator and yield the available board_ids
  10. NOTE: this is subject to change. In the future this may yield board_names or tuples or something else
  11. .. py:method:: __init__(self)
  12. .. py:method:: _device_id(self, dev_file)
  13. Get the device id
  14. :param dev_file: the dev_file to use
  15. :return: string for the dev id
  16. .. py:method:: discover(self)
  17. Discover connected boards
  18. This is either a dummy implementation that defaults to /dev/fpga0 for every board
  19. it will create 'virtual' boards
  20. OR:
  21. If config.use_dev_fpga_for_detection == True use number of /dev/fpga devices and use them
  22. .. py:method:: has_boards(self)
  23. Check if at least one board is connected
  24. .. py:method:: board_ids(self)
  25. Get Board Ids as list
  26. .. py:method:: board_names(self)
  27. Get Board Names as list
  28. .. py:method:: get_board_name_from_id(self, board_id)
  29. Get the name of a board with the given board_id
  30. :param board_id: the board to get the name for
  31. :return: the name of the board with id board_id
  32. .. py:method:: get_board_id_from_name(self, board_name)
  33. Get the id of a board with the name board_name
  34. :param board_name: the name of the board to get the id for
  35. :return: the id of the board with name board_name
  36. .. py:method:: get_device_file(self, board_id)
  37. Get the device file (/dev/...) to use when communicating with the board
  38. :param board_id: the id of the board
  39. :return: the device file as string
  40. .. py:method:: multi_board(self)
  41. If multiple boards are connected this is true else false
  42. .. py:method:: __iter__(self)
  43. .. py:method:: next(self)
  44. .. py:method:: __getitem__(self, item)