utils.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
  2. .. module:: utils
  3. .. _utils:
  4. Module utils
  5. ============
  6. Helper methods
  7. .. py:method:: get_dec_from_bits(bits, msb=-1, lsb=-1)
  8. Get decimal values from a string represented binary string
  9. :param bits: the string to convert
  10. :param msb: the most significant bit to use
  11. :param lsb: the least significant bit to use
  12. :return: the decimal value
  13. .. py:method:: get_status(board_id)
  14. Get the satatus of the board (this is used for the status leds)
  15. :param board_id: the id of the board
  16. :return: dictionary with the bits for each led (lower case led names are the keys of this dict)
  17. .. py:method:: is_conneced(board_id)
  18. Is the board connected?
  19. :param board_id: the id for the board to check
  20. :return: True if the board is connected else False
  21. .. py:method:: is_active(board_id)
  22. Check if a board is active
  23. :param board_id: the board to check for
  24. :return: True if it is active else False
  25. .. py:method:: wait_for_revolutions(board_id)
  26. Sleep as long as the revolutions in the accelerator last to not stop the acquisition before it ended.
  27. :param board_id: the board to wait for?
  28. .. py:method:: create_new_board_config(identifier)
  29. This creates a new instance of BoardConfiguration and also a new instance of StatusStorage
  30. :param identifier: the identifier for this board (not the id)
  31. .. py:method:: get_board_config(id)
  32. Get the configuration instance for the board with the given id
  33. :param id: the id of the desired board
  34. :return: the instance of configuration
  35. .. py:method:: get_board_status(id)
  36. Get the status storage instance for the board with the given id
  37. :param id: the id of the desired board
  38. :return: the instance of the status storage