Abstract Base class common to both DAQ_Move and DAQ_Viewer control modules |
|
|
Base Class for ControlModules UIs |
6.1.1. ControlModule base classes¶
Both DAQ_Move and DAQ_Viewer control modules share some specificities and inherit from a base class: the ControlModule
- class pymodaq.control_modules.utils.ControlModule[source]¶
Abstract Base class common to both DAQ_Move and DAQ_Viewer control modules
- init_signal¶
This signal is emitted when the chosen hardware is correctly initialized
- Type
Signal[bool]
- command_hardware¶
This signal is used to communicate with the instrument plugin within a separate thread
- Type
Signal[ThreadCommand]
- command_tcpip¶
This signal is used to communicate through the TCP/IP Network
- Type
Signal[ThreadCommand]
- quit_signal¶
This signal is emitted when the user requested to stop the module
- Type
Signal[]
- Attributes
initialized_state
bool: Check if the module is initialized
module_type
str: Get the module type, either DAQ_Move or DAQ_viewer
title
str: get the title of the module
Methods
grab
()Programmatic entry to grab data from detectors or current value from actuator
init_hardware
([do_init])Programmatic entry to initialize/deinitialize the control module
init_hardware_ui
([do_init])Programmatic entry to simulate a click on the user interface init button
manage_ui_actions
(action_name, attribute, value)Method to manage actions for the UI (if any).
quit_fun
()Programmatic entry to quit the controle module
show_log
()Open the log file in the default text editor
Programmatic entry to stop data grabbing from detectors or current value polling from actuator
update_status
(txt[, log])Display a message in the ui status bar and eventually log the message
append_data
command_hardware
init_signal
insert_data
quit_signal
status_sig
- init_hardware(do_init=True)[source]¶
Programmatic entry to initialize/deinitialize the control module
- Parameters
do_init (bool) – if True initialize the selected hardware else deinitialize it
See also
- init_hardware_ui(do_init=True)[source]¶
Programmatic entry to simulate a click on the user interface init button
- Parameters
do_init (bool) – if True initialize the selected hardware else deinitialize it
Notes
This method should be preferred to
init_hardware()
- manage_ui_actions(action_name: str, attribute: str, value)[source]¶
Method to manage actions for the UI (if any).
Will try to apply the given value to the given attribute of the corresponding action
- Parameters
Examples
>>>manage_ui_actions(‘quit’, ‘setEnabled’, False) # will disable the quit action (button) on the UI
- stop_grab()[source]¶
Programmatic entry to stop data grabbing from detectors or current value polling from actuator
The same is also true for the UI of these modules sharing a common UI base class: the ControlModuleUI
- class pymodaq.control_modules.utils.ControlModuleUI(parent)[source]¶
Base Class for ControlModules UIs
- command_sig¶
This signal is emitted whenever some actions done by the user has to be applied on the main module. Possible commands are: See specific implementation
- Type
Signal[Threadcommand]
See also
daq_move_ui.DAQ_Move_UI
,daq_viewer_ui.DAQ_Viewer_UI
Methods
do_init
([do_init])Programmatically press the Init button API entry :param do_init: will fire the Init button depending on the argument value and the button check state :type do_init: bool
Shoudl be implemented to send to the main app the fact that someone pressed init
command_sig
display_status