diff --git a/docs/src/commandline.rst b/docs/src/commandline.rst index 4b54da9b9..25afce8ad 100644 --- a/docs/src/commandline.rst +++ b/docs/src/commandline.rst @@ -4,11 +4,54 @@ Command line interface Usage ------------- -Commands can be used either with sls_detector_get or sls_detector_put +The syntax is *'[detector index]-[module index]:[command]'*, where the indices are by default '0', when not specified. + +Module index +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Modules are indexed based on their order in the hostname command. They are used to configure a specific module within a detector and are followed by a ':' in syntax. + + .. code-block:: + + # Applies to all modules of detector 0 + sls_detector_put exptime 5s + + # Applies to only the 4th module + sls_detector_put 3:exptime 5s + + +Detector index +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +This index is useful when configuring multiple detectors from a single host. Each detector uses a unique shared memory identified by a detector index, derived again from the hostname command. It is followed by a '-'. + + .. code-block:: + + # For detector with index 2 in shared memory + sls_detector_put 2-hostname bchip133+bchip123+bchip456 + + # Without '-', the detector index defaults to 0 + sls_detector_put hostname bchip133+bchip123+bchip456 + + # Accessing all modules with detector index 2 + sls_detector_put 2-exptime + + # Starting acquisition only for detector with index 2 + sls_detector_put 2-start + + # Applies only to the 2nd detector, 4th module + sls_detector_put 1-3:exptime 5s + + +Command Execution +^^^^^^^^^^^^^^^^^^^^^^^ +Commands can be executed using: + +* **sls_detector_put**: setting values +* **sls_detector_get**: getting values +* **sls_detector**: automatically infers based on the number of arguments. +* **sls_detector_help**: gets help on the specific command +* **sls_detector_acquire**: initiates acquisition with the detector. This command blocks until the entire acquisition process is completed. -.. code-block:: - sls_detector_get exptime Help -------- @@ -28,12 +71,15 @@ Help # list of deprecated commands list deprecated - # autocompletion - # bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the - # main package folder to enable auto completion of commands and arguments - # for the command line on that shell. - source bash_autocomplete.sh +Autocompletion +--------------- + +bash_autocomplete.sh or zsh_autocomplete.sh must be sourced from the main package folder to enable auto completion of commands and arguments for the command line on that shell. + +.. code-block:: + + source bash_autocomplete.sh Commands diff --git a/docs/src/detector.rst b/docs/src/detector.rst index 9c8ec8be2..af09d792a 100644 --- a/docs/src/detector.rst +++ b/docs/src/detector.rst @@ -13,7 +13,6 @@ containing results from all modules. (:ref:`Result class`) Here are some :ref:`examples ` on how to use the API. -.. _Cplusplus Api Examples: .. doxygenclass:: sls::Detector :members: :undoc-members: \ No newline at end of file diff --git a/docs/src/index.rst b/docs/src/index.rst index 2a333c03e..af291cd6e 100644 --- a/docs/src/index.rst +++ b/docs/src/index.rst @@ -39,7 +39,7 @@ Welcome to slsDetectorPackage's documentation! .. toctree:: :caption: Command line - :maxdepth: 2 + :maxdepth: 1 commandline quick_start_guide diff --git a/docs/src/masterfileattributes.rst b/docs/src/masterfileattributes.rst index fb3aba0e5..90793f3c0 100644 --- a/docs/src/masterfileattributes.rst +++ b/docs/src/masterfileattributes.rst @@ -1,5 +1,6 @@ .. _master file attributes: + Master File Attributes ======================= diff --git a/docs/src/servers.rst b/docs/src/servers.rst index 4a0faebb9..06c4d8d82 100644 --- a/docs/src/servers.rst +++ b/docs/src/servers.rst @@ -39,13 +39,13 @@ Arguments .. _Automatic start servers: + Automatic start ------------------ One can start the on-board detector server automatically upon powering on the board. -#. Create a soft link to the binary on board - : +#. Create a soft link to the binary on board: .. code-block:: bash ln -sf someDetectorServervx.x.x someDetectorServer @@ -87,8 +87,7 @@ One can start the on-board detector server automatically upon powering on the bo /root/xxxDetectorServer >> /dev/null & -#. Sync, reboot and verify - : +#. Sync, reboot and verify: .. code-block:: bash sync diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 9cb6f84e7..5a070b011 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -2584,8 +2584,6 @@ class Detector(CppDetectorApi): def compdisabletime(self): """[Jungfrau] Time before end of exposure when comparator is disabled. - Note - ----- :getter: always returns in seconds. To get in DurationWrapper, use getComparatorDisableTime Example diff --git a/slsDetectorSoftware/generator/commands.yaml b/slsDetectorSoftware/generator/commands.yaml index c6f973a79..100c82eaa 100644 --- a/slsDetectorSoftware/generator/commands.yaml +++ b/slsDetectorSoftware/generator/commands.yaml @@ -3429,7 +3429,7 @@ udp_dstlist: output: [ ToString(args) ] txdelay: - help: "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules in the detector using the step size provided.Sets up \n\t[Eiger] txdelay_left to (2 * mod_index * n_delay), \n\t[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and \n\t[Eiger] txdelay_frame to (2 *num_modules * n_delay)\n\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay) for every module." + help: "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules in the detector using the step size provided.Sets up \n\t[Eiger] txdelay_left to (2 * mod_index * n_delay), \n\t[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and \n\t[Eiger] txdelay_frame to (2 * num_modules * n_delay)\n\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay) for every module." actions: GET: argc: 0 diff --git a/slsDetectorSoftware/generator/extended_commands.yaml b/slsDetectorSoftware/generator/extended_commands.yaml index ee0f85507..e4cbc3340 100644 --- a/slsDetectorSoftware/generator/extended_commands.yaml +++ b/slsDetectorSoftware/generator/extended_commands.yaml @@ -11915,7 +11915,7 @@ txdelay: help: "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for\ \ all modules in the detector using the step size provided.Sets up \n\t[Eiger]\ \ txdelay_left to (2 * mod_index * n_delay), \n\t[Eiger] txdelay_right to ((2\ - \ * mod_index + 1) * n_delay) and \n\t[Eiger] txdelay_frame to (2 *num_modules\ + \ * mod_index + 1) * n_delay) and \n\t[Eiger] txdelay_frame to (2 * num_modules\ \ * n_delay)\n\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay)\ \ for every module." infer_action: true diff --git a/slsDetectorSoftware/src/Caller.cpp b/slsDetectorSoftware/src/Caller.cpp index 0e201d969..e3d2b86e0 100644 --- a/slsDetectorSoftware/src/Caller.cpp +++ b/slsDetectorSoftware/src/Caller.cpp @@ -15365,7 +15365,7 @@ std::string Caller::txdelay(int action) { [Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules in the detector using the step size provided.Sets up [Eiger] txdelay_left to (2 * mod_index * n_delay), [Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and - [Eiger] txdelay_frame to (2 *num_modules * n_delay) + [Eiger] txdelay_frame to (2 * num_modules * n_delay) [Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay) for every module. )V0G0N" << std::endl; return os.str();