Skip to content

acquisition_manager

acquisition_manager

Implementation of nexus acquisition manager for multiprocessing.

AcquisitionControlManager

AcquisitionControlManager(address: tuple[str, int] = ('localhost', 50000), authkey: bytes = b'secretkey', callable_acq_control: Callable[[], _AcquisitionControl] | None = None, **kwargs: Any)

Bases: BaseManager

Acquisition control manager.

Initialize the acquisition control manager.

Parameters:

  • address (tuple[str, int], default: ('localhost', 50000) ) –

    Address (host, port) of the manager process, by default ("localhost", 50000).

  • authkey (bytes, default: b'secretkey' ) –

    Authentication key of the manager process, by default b"secretkey".

  • callable_acq_control (Callable[[], _AcquisitionControl] | None, default: None ) –

    Callable which returns the acquisition control instance served by the manager, by default None. If None, the acquisition control is registered without callable (client side).

  • **kwargs (Any, default: {} ) –

    Additional keyword arguments passed to BaseManager.

Source code in src/console/service/acquisition_manager.py
def __init__(
    self,
    address: tuple[str, int] = ("localhost", 50000),
    authkey: bytes = b"secretkey",
    callable_acq_control: Callable[[], _AcquisitionControl] | None = None,
    **kwargs: Any
) -> None:
    """Initialize the acquisition control manager.

    Parameters
    ----------
    address : tuple[str, int], optional
        Address (host, port) of the manager process, by default ("localhost", 50000).
    authkey : bytes, optional
        Authentication key of the manager process, by default b"secretkey".
    callable_acq_control : Callable[[], _AcquisitionControl] | None, optional
        Callable which returns the acquisition control instance served by the manager, by default None.
        If None, the acquisition control is registered without callable (client side).
    **kwargs
        Additional keyword arguments passed to ``BaseManager``.
    """
    super().__init__(address=address, authkey=authkey, **kwargs)
    # Dynamically register acquisition control and the acquisition parameter proxy
    if callable_acq_control:
        self.register("AcquisitionControl", callable=callable_acq_control)
    else:
        self.register("AcquisitionControl")