Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ plugin, look it up in the installed `pymodaq` package instead of guessing.
File and class names must match: `daq_move_<Name>.py` holds `DAQ_Move_<Name>`; `daq_<N>Dviewer_<Name>.py` holds
`DAQ_<N>DViewer_<Name>` (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).
Expand All @@ -67,8 +69,8 @@ File and class names must match: `daq_move_<Name>.py` holds `DAQ_Move_<Name>`; `
- 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 + [...]`.
Expand Down
Loading