diff --git a/AGENTS.md b/AGENTS.md index 9e24a56..c0806c0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,9 +52,11 @@ plugin, look it up in the installed `pymodaq` package instead of guessing. File and class names must match: `daq_move_.py` holds `DAQ_Move_`; `daq_Dviewer_.py` holds `DAQ_DViewer_` (N = 0, 1, 2 or N). Each file ends with `if __name__ == '__main__': main(__file__)`. -**Actuator** (`DAQ_Move_base`). Override at least, in the order of the template (the order in which to develop them), -`ini_attributes`, `ini_stage`, `close`, `get_actuator_value`, `move_abs`, `move_rel`, `move_home`, `stop_motion`, -`commit_settings`. +**Actuator** (`DAQ_Move_base`). Required (`check_plugin` reports an error otherwise): `ini_stage`, `get_actuator_value`, +`move_abs`, `move_rel` and `close`. Override too, when the instrument can do it: `ini_attributes`, `move_home`, +`stop_motion` (`check_plugin` warns if it is missing), `commit_settings`. The template lists them in the order in which +to develop them. The list is defined once in `pymodaq_utils.plugin_tools.contract`, with when each method is called and +what it returns (table in the developer guide, "The methods of a plugin"). - `ini_stage(controller=None)` returns `(info: str, initialized: bool)`. If `self.is_master`, create the controller; otherwise store the `controller` passed in (several axes share one controller). @@ -67,8 +69,8 @@ File and class names must match: `daq_move_.py` holds `DAQ_Move_`; ` - Positions are `DataActuator` objects with **units** (`units=self.axis_unit`); use `check_bound`, `set_position_with_scaling` and `get_position_with_scaling` as in the template. -**Detector** (`DAQ_Viewer_base`). Override at least, in the order of the template, `ini_attributes`, `ini_detector`, -`close`, `grab_data`, `stop`, `commit_settings`. +**Detector** (`DAQ_Viewer_base`). Required: `ini_detector`, `grab_data`, `stop` and `close`. Override too, when needed: +`ini_attributes`, `commit_settings`. Same contract module as for the actuators. - `ini_detector(controller=None)` returns `(info, initialized)`, same master/slave logic. - `params = comon_parameters + [...]`.