mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
910: udpated help on multi module and multi command help (#1116)
* udpated help on multi module and multi command help * fixed issues with empty lines and other syntax with docuemntation * fixed some warningsin documentation * some changes to documentation about command line usage * minor
This commit is contained in:
@ -4,11 +4,54 @@ Command line interface
|
|||||||
Usage
|
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
|
Help
|
||||||
--------
|
--------
|
||||||
@ -28,12 +71,15 @@ Help
|
|||||||
# list of deprecated commands
|
# list of deprecated commands
|
||||||
list deprecated
|
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
|
Commands
|
||||||
|
@ -13,7 +13,6 @@ containing results from all modules. (:ref:`Result class<Result Class>`)
|
|||||||
|
|
||||||
Here are some :ref:`examples <Cplusplus Api Examples>` on how to use the API.
|
Here are some :ref:`examples <Cplusplus Api Examples>` on how to use the API.
|
||||||
|
|
||||||
.. _Cplusplus Api Examples:
|
|
||||||
.. doxygenclass:: sls::Detector
|
.. doxygenclass:: sls::Detector
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
:undoc-members:
|
@ -39,7 +39,7 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Command line
|
:caption: Command line
|
||||||
:maxdepth: 2
|
:maxdepth: 1
|
||||||
|
|
||||||
commandline
|
commandline
|
||||||
quick_start_guide
|
quick_start_guide
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
.. _master file attributes:
|
.. _master file attributes:
|
||||||
|
|
||||||
Master File Attributes
|
Master File Attributes
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
|
@ -39,13 +39,13 @@ Arguments
|
|||||||
|
|
||||||
|
|
||||||
.. _Automatic start servers:
|
.. _Automatic start servers:
|
||||||
|
|
||||||
Automatic start
|
Automatic start
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
One can start the on-board detector server automatically upon powering on the board.
|
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
|
.. code-block:: bash
|
||||||
|
|
||||||
ln -sf someDetectorServervx.x.x someDetectorServer
|
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 &
|
/root/xxxDetectorServer >> /dev/null &
|
||||||
|
|
||||||
|
|
||||||
#. Sync, reboot and verify
|
#. Sync, reboot and verify:
|
||||||
:
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sync
|
sync
|
||||||
|
@ -2584,8 +2584,6 @@ class Detector(CppDetectorApi):
|
|||||||
def compdisabletime(self):
|
def compdisabletime(self):
|
||||||
"""[Jungfrau] Time before end of exposure when comparator is disabled.
|
"""[Jungfrau] Time before end of exposure when comparator is disabled.
|
||||||
|
|
||||||
Note
|
|
||||||
-----
|
|
||||||
:getter: always returns in seconds. To get in DurationWrapper, use getComparatorDisableTime
|
:getter: always returns in seconds. To get in DurationWrapper, use getComparatorDisableTime
|
||||||
|
|
||||||
Example
|
Example
|
||||||
|
@ -3429,7 +3429,7 @@ udp_dstlist:
|
|||||||
output: [ ToString(args) ]
|
output: [ ToString(args) ]
|
||||||
|
|
||||||
txdelay:
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
argc: 0
|
argc: 0
|
||||||
|
@ -11915,7 +11915,7 @@ txdelay:
|
|||||||
help: "[n_delay]\n\t[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for\
|
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]\
|
\ 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\
|
\ 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)\
|
\ * n_delay)\n\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay)\
|
||||||
\ for every module."
|
\ for every module."
|
||||||
infer_action: true
|
infer_action: true
|
||||||
|
@ -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][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_left to (2 * mod_index * n_delay),
|
||||||
[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and
|
[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"
|
[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay) for every module. )V0G0N"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return os.str();
|
return os.str();
|
||||||
|
Reference in New Issue
Block a user