Source code for RsSmw.Implementations.Source.Power.Alc

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class AlcCls: """Alc commands group definition. 8 total commands, 1 Subgroups, 7 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("alc", core, parent) @property def sonce(self): """sonce commands group. 0 Sub-classes, 1 commands.""" if not hasattr(self, '_sonce'): from .Sonce import SonceCls self._sonce = SonceCls(self._core, self._cmd_group) return self._sonce # noinspection PyTypeChecker
[docs] def get_damplifier(self) -> enums.PowAlcDriverAmp: """SCPI: [SOURce<HW>]:POWer:ALC:DAMPlifier \n Snippet: value: enums.PowAlcDriverAmp = driver.source.power.alc.get_damplifier() \n Selects the driver amplifier switching state. \n :return: amplifier: OFF| ON| AUTO| FIX| ONMG AUTO Switches the attenuator automatically. ON|OFF Switches on or off the driver amplifier. FIXed Fixes the last setting. ONMG Supplies maximum level at the output. """ response = self._core.io.query_str('SOURce<HwInstance>:POWer:ALC:DAMPlifier?') return Conversions.str_to_scalar_enum(response, enums.PowAlcDriverAmp)
[docs] def set_damplifier(self, amplifier: enums.PowAlcDriverAmp) -> None: """SCPI: [SOURce<HW>]:POWer:ALC:DAMPlifier \n Snippet: driver.source.power.alc.set_damplifier(amplifier = enums.PowAlcDriverAmp.AUTO) \n Selects the driver amplifier switching state. \n :param amplifier: OFF| ON| AUTO| FIX| ONMG AUTO Switches the attenuator automatically. ON|OFF Switches on or off the driver amplifier. FIXed Fixes the last setting. ONMG Supplies maximum level at the output. """ param = Conversions.enum_scalar_to_str(amplifier, enums.PowAlcDriverAmp) self._core.io.write(f'SOURce<HwInstance>:POWer:ALC:DAMPlifier {param}')
# noinspection PyTypeChecker
[docs] def get_dsensitivity(self) -> enums.PowAlcDetSensitivity: """SCPI: [SOURce<HW>]:POWer:ALC:DSENsitivity \n Snippet: value: enums.PowAlcDetSensitivity = driver.source.power.alc.get_dsensitivity() \n Sets the sensitivity of the ALC detector. \n :return: sensitivity: AUTO| FIXed | LOW| MEDium| HIGH AUTO Selects the optimum sensitivity automatically. LOW|MEDium|HIGH Sets either low, medium or high sensitivity. FIXed Fixes the internal level detector. """ response = self._core.io.query_str('SOURce<HwInstance>:POWer:ALC:DSENsitivity?') return Conversions.str_to_scalar_enum(response, enums.PowAlcDetSensitivity)
[docs] def set_dsensitivity(self, sensitivity: enums.PowAlcDetSensitivity) -> None: """SCPI: [SOURce<HW>]:POWer:ALC:DSENsitivity \n Snippet: driver.source.power.alc.set_dsensitivity(sensitivity = enums.PowAlcDetSensitivity.AUTO) \n Sets the sensitivity of the ALC detector. \n :param sensitivity: AUTO| FIXed | LOW| MEDium| HIGH AUTO Selects the optimum sensitivity automatically. LOW|MEDium|HIGH Sets either low, medium or high sensitivity. FIXed Fixes the internal level detector. """ param = Conversions.enum_scalar_to_str(sensitivity, enums.PowAlcDetSensitivity) self._core.io.write(f'SOURce<HwInstance>:POWer:ALC:DSENsitivity {param}')
# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.AlcOnOffAuto: """SCPI: [SOURce<HW>]:POWer:ALC:MODE \n Snippet: value: enums.AlcOnOffAuto = driver.source.power.alc.get_mode() \n Queries the currently set ALC mode. See [:SOURce<hw>]:POWer:ALC[:STATe]. \n :return: pow_alc_mode: 0| AUTO| 1| PRESet| OFFTable| ON| OFF| ONSample| ONTable """ response = self._core.io.query_str('SOURce<HwInstance>:POWer:ALC:MODE?') return Conversions.str_to_scalar_enum(response, enums.AlcOnOffAuto)
# noinspection PyTypeChecker
[docs] def get_omode(self) -> enums.AlcOffMode: """SCPI: [SOURce<HW>]:POWer:ALC:OMODe \n Snippet: value: enums.AlcOffMode = driver.source.power.alc.get_omode() \n No command help available \n :return: off_mode: No help available """ response = self._core.io.query_str('SOURce<HwInstance>:POWer:ALC:OMODe?') return Conversions.str_to_scalar_enum(response, enums.AlcOffMode)
[docs] def set_omode(self, off_mode: enums.AlcOffMode) -> None: """SCPI: [SOURce<HW>]:POWer:ALC:OMODe \n Snippet: driver.source.power.alc.set_omode(off_mode = enums.AlcOffMode.SHOLd) \n No command help available \n :param off_mode: No help available """ param = Conversions.enum_scalar_to_str(off_mode, enums.AlcOffMode) self._core.io.write(f'SOURce<HwInstance>:POWer:ALC:OMODe {param}')
# noinspection PyTypeChecker
[docs] def get_slevel(self) -> enums.PowAlcSampleLev: """SCPI: [SOURce<HW>]:POWer:ALC:SLEVel \n Snippet: value: enums.PowAlcSampleLev = driver.source.power.alc.get_slevel() \n Sets the sample level of automatic level control (ALC) . How To: See 'How to enable the ALC'. \n :return: samp_level: FULL| MINimum| ATTenuated """ response = self._core.io.query_str('SOURce<HwInstance>:POWer:ALC:SLEVel?') return Conversions.str_to_scalar_enum(response, enums.PowAlcSampleLev)
[docs] def set_slevel(self, samp_level: enums.PowAlcSampleLev) -> None: """SCPI: [SOURce<HW>]:POWer:ALC:SLEVel \n Snippet: driver.source.power.alc.set_slevel(samp_level = enums.PowAlcSampleLev.ATTenuated) \n Sets the sample level of automatic level control (ALC) . How To: See 'How to enable the ALC'. \n :param samp_level: FULL| MINimum| ATTenuated """ param = Conversions.enum_scalar_to_str(samp_level, enums.PowAlcSampleLev) self._core.io.write(f'SOURce<HwInstance>:POWer:ALC:SLEVel {param}')
# noinspection PyTypeChecker
[docs] def get_state(self) -> enums.AlcOnOffAuto: """SCPI: [SOURce<HW>]:POWer:ALC:[STATe] \n Snippet: value: enums.AlcOnOffAuto = driver.source.power.alc.get_state() \n Activates automatic level control in the selected mode. How to: See 'How to enable the ALC'. \n :return: state: AUTO| OFFTable| ON| ONSample| ONTable| OFF AUTO Adjusts the output level to the operating conditions automatically. OFFTable Controls the level with the attenuation values of the internal ALC table. ON Activates internal level control permanently. OFF Deactivates internal level control, 'Sample & Hold' mode is active. ONSample Starts the internal level control with the first change. ONTable Starts with the attenuation setting from the table and continues with automatic level control. For more details on the individual settings, an overview of the functionality and details on what is to be considered, see 'ALC states and their effects'. """ response = self._core.io.query_str('SOURce<HwInstance>:POWer:ALC:STATe?') return Conversions.str_to_scalar_enum(response, enums.AlcOnOffAuto)
[docs] def set_state(self, state: enums.AlcOnOffAuto) -> None: """SCPI: [SOURce<HW>]:POWer:ALC:[STATe] \n Snippet: driver.source.power.alc.set_state(state = enums.AlcOnOffAuto._0) \n Activates automatic level control in the selected mode. How to: See 'How to enable the ALC'. \n :param state: AUTO| OFFTable| ON| ONSample| ONTable| OFF AUTO Adjusts the output level to the operating conditions automatically. OFFTable Controls the level with the attenuation values of the internal ALC table. ON Activates internal level control permanently. OFF Deactivates internal level control, 'Sample & Hold' mode is active. ONSample Starts the internal level control with the first change. ONTable Starts with the attenuation setting from the table and continues with automatic level control. For more details on the individual settings, an overview of the functionality and details on what is to be considered, see 'ALC states and their effects'. """ param = Conversions.enum_scalar_to_str(state, enums.AlcOnOffAuto) self._core.io.write(f'SOURce<HwInstance>:POWer:ALC:STATe {param}')
def clone(self) -> 'AlcCls': """Clones the group by creating new object from it and its whole existing subgroups Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group""" new_group = AlcCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group