"""Autogenerated module for the PrecompensationAdvisorModule QCoDeS driver."""
import typing as t
from zhinst.toolkit.driver.modules.precompensation_advisor_module import (
    PrecompensationAdvisorModule as TKPrecompensationAdvisorModule,
)

from zhinst.qcodes.driver.modules.base_module import ZIBaseModule


if t.TYPE_CHECKING:
    from zhinst.qcodes.session import Session


class ZIPrecompensationAdvisorModule(ZIBaseModule):
    """Precompensation Advisor Module.

    This module provides the functionality available in the LabOne User
    Interface’s Precompensation Tab. In essence the precompensation allows a
    pre-distortion or pre-emphasis to be applied to a signal before it leaves
    the instrument, to compensate for undesired distortions caused by the
    device under test (DUT). The Precompensation Advisor module simulates the
    precompensation filters in the device, allowing the user to experiment with
    different filter settings and filter combinations to obtain an optimal
    output signal, before using the setup in the actual device.

    For a complete documentation see the LabOne user manual
    https://docs.zhinst.com/labone_programming_manual/precompensation_advisor_module.html

    Note:
        Unlike most other LabOne modules, this module does not expose any
        functions. Each time one or more filter parameters are changed, the
        module re-runs the simulation and the results can be read via the
        wave/output, wave/output/forwardwave and wave/output/backwardwave
        parameters.


    Args:
        tk_object: Underlying zhinst-toolkit object.
        session: Session to the Data Server.
        name: Name of the module in QCoDeS.
    """

    def __init__(
        self,
        tk_object: TKPrecompensationAdvisorModule,
        session: "Session",
        name: str = "precompensation_advisor_module",
    ):
        super().__init__(tk_object, session, name)
