board_config.rst 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
  2. .. module:: board_config
  3. .. _board_config:
  4. Module board_config
  5. ===================
  6. Configuration for each board
  7. .. py:class:: BoardConfiguration(QtGui.QWidget)
  8. The Main configuration class for boards.
  9. .. py:method:: __init__(self, identifier, config_file=None)
  10. .. py:method:: _set_defaults(self)
  11. Set default values
  12. .. py:method:: set_default_observers(self)
  13. Set observers that are always used
  14. .. py:method:: notify_all_observers(self)
  15. Notify all observers not only the ones that are affected by a change
  16. .. py:method:: load_config(self, filename)
  17. Load a config from a file
  18. :param filename: the configuration file
  19. .. py:method:: save_config(self, filename)
  20. Save the current configuration to a file
  21. :param filename: the file to write to
  22. .. py:method:: get(self, key)
  23. Get the configuration value for key
  24. :param key: the key to get the value for
  25. :return: the value of the configuration for key
  26. .. py:method:: dump(self)
  27. Dump all configuration values
  28. :return: all configuration values as list
  29. .. py:method:: update(self, key, value)
  30. Update the value for key in the configuration
  31. :param key: the key to update
  32. :param value: the value to set the configuration for key to
  33. .. py:method:: updateSilent(self, key, value)
  34. Update the configuration without notifying observers
  35. :param key: the key to updae
  36. :param value: the value to set the configuration of key to
  37. .. py:method:: observe(self, who, callback, key)
  38. Register an observer. (A callback that is called when the according configuration value changes)
  39. :param who: who is observing
  40. :param callback: the callback to call on change of the configuration value
  41. :param key: the key to observe
  42. .. py:method:: observe_all(self, callback)
  43. Register a observer that is called when any key changes
  44. :param callback: the callback to register
  45. .. py:method:: unobserve(self, who, key=None)
  46. Remove an observer
  47. :param who: the observing entity
  48. :param key: the key to remove it from
  49. .. py:method:: unobserve_all_observer(self, callback)
  50. Unobserve an observer that observes all keys.
  51. :param callback: the callback to unobserve
  52. .. py:method:: _notify_observers_receiver(self, key, value)
  53. The pyqt signal slot for notifications of observers
  54. :param key: the key that changed
  55. :param value: the new value
  56. .. py:method:: _notify_observers(self, key, value)
  57. Notify observers. This emits a pyqt signal to make it thread save
  58. :param key: the key that changed
  59. :param value: the new value
  60. .. py:method:: make_uint(self, value, maximum, name=None)
  61. Convert a value to an uint
  62. :param value: the value
  63. :param maximum: the maximum of the returned value
  64. :param name: the name of this value
  65. :return: the converted value
  66. .. py:method:: set_fpga_delay(self, value)
  67. Set the fpga_delays on the board
  68. :param value: the value to set the delays to
  69. .. py:method:: set_chip_delay(self, adcs, values)
  70. Set the chip_delays on the board
  71. :param adcs: the adcs to set the delays for
  72. :param values: the value to set the delays to
  73. .. py:method:: set_th_delay(self, value)
  74. Set the track and hold delay on the board
  75. :param value: the value to set the delay to
  76. .. py:method:: set_adc_delay(self, adc, value)
  77. Set the adc delay for the given adc on the board
  78. :param adc: the adc to change the delay for
  79. :param value: the value to set the delay to
  80. .. py:method:: set_delay(self, n, ignore_seperate_delay=False)
  81. Set delays
  82. :param n: ?
  83. :param ignore_seperate_delay: ignore the setting of a seperate delay for adc 1
  84. .. py:method:: update_header(self, state)
  85. Set the flag to write Header to files when acquiring.
  86. :param state: True to enabling header and False to disable
  87. .. py:method:: read_from_board(self)
  88. Read values from board and update them in the configuration (Mainly used for skip init functionality)