Source code for RsSmbv.Implementations.Source.Bb.Dme.Pinput

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class PinputCls: """Pinput commands group definition. 5 total commands, 1 Subgroups, 2 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("pinput", core, parent) @property def trigger(self): """trigger commands group. 1 Sub-classes, 1 commands.""" if not hasattr(self, '_trigger'): from .Trigger import TriggerCls self._trigger = TriggerCls(self._core, self._cmd_group) return self._trigger
[docs] def get_delay(self) -> float: """SCPI: [SOURce<HW>]:[BB]:DME:PINPut:DELay \n Snippet: value: float = driver.source.bb.dme.pinput.get_delay() \n Sets the delay between the external trigger and the first DME output pulse (50% voltage point of first pulse) . Setting takes effect, if [:SOURce<hw>][:BB]:DME:PINPut:SOURce is set to EXTernal. For DME reply mode, this setting simulates the defined delay of the DME transponder and twice the run time of the signal (from interrogator to transponder and back) . The delay is a measure of the range distance, thus, the two values are interdependent according to: Delay = X/Y mode delay + range distance * 12.359 nm/us (X mode delay = 50 us, Y mode delay is 56 us) Changing one value automatically changes the other value. \n :return: delay: float Range: 4E-6 to 5E-3 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:PINPut:DELay?') return Conversions.str_to_float(response)
[docs] def set_delay(self, delay: float) -> None: """SCPI: [SOURce<HW>]:[BB]:DME:PINPut:DELay \n Snippet: driver.source.bb.dme.pinput.set_delay(delay = 1.0) \n Sets the delay between the external trigger and the first DME output pulse (50% voltage point of first pulse) . Setting takes effect, if [:SOURce<hw>][:BB]:DME:PINPut:SOURce is set to EXTernal. For DME reply mode, this setting simulates the defined delay of the DME transponder and twice the run time of the signal (from interrogator to transponder and back) . The delay is a measure of the range distance, thus, the two values are interdependent according to: Delay = X/Y mode delay + range distance * 12.359 nm/us (X mode delay = 50 us, Y mode delay is 56 us) Changing one value automatically changes the other value. \n :param delay: float Range: 4E-6 to 5E-3 """ param = Conversions.decimal_value_to_str(delay) self._core.io.write(f'SOURce<HwInstance>:BB:DME:PINPut:DELay {param}')
# noinspection PyTypeChecker
[docs] def get_source(self) -> enums.AvionicDmePulsInput: """SCPI: [SOURce<HW>]:[BB]:DME:PINPut:SOURce \n Snippet: value: enums.AvionicDmePulsInput = driver.source.bb.dme.pinput.get_source() \n Selects the trigger mode for DME modulation signals. \n :return: puls_inp_source: EXTernal| PSENsor EXTernal The signals are triggered by an external trigger event. The trigger signal is supplied via the Pulse Ext connector. PSENsor The signals are triggered by a connected power sensor, for example, the R&S NRP-Z81. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:PINPut:SOURce?') return Conversions.str_to_scalar_enum(response, enums.AvionicDmePulsInput)
[docs] def set_source(self, puls_inp_source: enums.AvionicDmePulsInput) -> None: """SCPI: [SOURce<HW>]:[BB]:DME:PINPut:SOURce \n Snippet: driver.source.bb.dme.pinput.set_source(puls_inp_source = enums.AvionicDmePulsInput.EXTernal) \n Selects the trigger mode for DME modulation signals. \n :param puls_inp_source: EXTernal| PSENsor EXTernal The signals are triggered by an external trigger event. The trigger signal is supplied via the Pulse Ext connector. PSENsor The signals are triggered by a connected power sensor, for example, the R&S NRP-Z81. """ param = Conversions.enum_scalar_to_str(puls_inp_source, enums.AvionicDmePulsInput) self._core.io.write(f'SOURce<HwInstance>:BB:DME:PINPut:SOURce {param}')
def clone(self) -> 'PinputCls': """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 = PinputCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group