from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RampCls:
"""
| Commands in total: 21
| Subgroups: 5
| Direct child commands: 10
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ramp", core, parent)
@property
def blank(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_blank'):
from .Blank import BlankCls
self._blank = BlankCls(self._core, self._cmd_group)
return self._blank
@property
def fall(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_fall'):
from .Fall import FallCls
self._fall = FallCls(self._core, self._cmd_group)
return self._fall
@property
def preSweep(self):
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
if not hasattr(self, '_preSweep'):
from .PreSweep import PreSweepCls
self._preSweep = PreSweepCls(self._core, self._cmd_group)
return self._preSweep
@property
def stair(self):
"""
| Commands in total: 4
| Subgroups: 2
| Direct child commands: 0
"""
if not hasattr(self, '_stair'):
from .Stair import StairCls
self._stair = StairCls(self._core, self._cmd_group)
return self._stair
@property
def sweep(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_sweep'):
from .Sweep import SweepCls
self._sweep = SweepCls(self._core, self._cmd_group)
return self._sweep
[docs]
def get_attenuation(self) -> float:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:ATTenuation`` \n
Snippet: ``value: float = driver.source.bb.pramp.ramp.get_attenuation()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:ATTenuation?')
return Conversions.str_to_float(response)
[docs]
def set_attenuation(self, const_atten: float) -> None:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:ATTenuation`` \n
Snippet: ``driver.source.bb.pramp.ramp.set_attenuation(const_atten = 1.0)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(const_atten)
self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:ATTenuation {param}')
[docs]
def get_constmode(self) -> bool:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:CONStmode`` \n
Snippet: ``value: bool = driver.source.bb.pramp.ramp.get_constmode()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:CONStmode?')
return Conversions.str_to_bool(response)
[docs]
def set_constmode(self, constmode: bool) -> None:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:CONStmode`` \n
Snippet: ``driver.source.bb.pramp.ramp.set_constmode(constmode = False)`` \n
No help available
"""
param = Conversions.bool_to_str(constmode)
self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:CONStmode {param}')
[docs]
def get_level(self) -> float:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:LEVel`` \n
Snippet: ``value: float = driver.source.bb.pramp.ramp.get_level()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:LEVel?')
return Conversions.str_to_float(response)
[docs]
def get_range(self) -> float:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:RANGe`` \n
Snippet: ``value: float = driver.source.bb.pramp.ramp.get_range()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:RANGe?')
return Conversions.str_to_float(response)
[docs]
def set_range(self, range_py: float) -> None:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:RANGe`` \n
Snippet: ``driver.source.bb.pramp.ramp.set_range(range_py = 1.0)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(range_py)
self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:RANGe {param}')
[docs]
def get_resolution(self) -> float:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:RESolution`` \n
Snippet: ``value: float = driver.source.bb.pramp.ramp.get_resolution()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:RESolution?')
return Conversions.str_to_float(response)
[docs]
def get_sample_rate(self) -> float:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:SAMPlerate`` \n
Snippet: ``value: float = driver.source.bb.pramp.ramp.get_sample_rate()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:SAMPlerate?')
return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs]
def get_shape(self) -> enums.PowerRampShape:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:SHAPe`` \n
Snippet: ``value: enums.PowerRampShape = driver.source.bb.pramp.ramp.get_shape()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:SHAPe?')
return Conversions.str_to_scalar_enum(response, enums.PowerRampShape)
[docs]
def set_shape(self, shape: enums.PowerRampShape) -> None:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:SHAPe`` \n
Snippet: ``driver.source.bb.pramp.ramp.set_shape(shape = enums.PowerRampShape.LINear)`` \n
No help available
"""
param = Conversions.enum_scalar_to_str(shape, enums.PowerRampShape)
self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:SHAPe {param}')
# noinspection PyTypeChecker
[docs]
def get_slope(self) -> enums.PowerRampSlope:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:SLOPe`` \n
Snippet: ``value: enums.PowerRampSlope = driver.source.bb.pramp.ramp.get_slope()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:SLOPe?')
return Conversions.str_to_scalar_enum(response, enums.PowerRampSlope)
[docs]
def set_slope(self, slope: enums.PowerRampSlope) -> None:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:SLOPe`` \n
Snippet: ``driver.source.bb.pramp.ramp.set_slope(slope = enums.PowerRampSlope.ASCending)`` \n
No help available
"""
param = Conversions.enum_scalar_to_str(slope, enums.PowerRampSlope)
self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:SLOPe {param}')
[docs]
def get_start_level(self) -> float:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:STARtlevel`` \n
Snippet: ``value: float = driver.source.bb.pramp.ramp.get_start_level()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:STARtlevel?')
return Conversions.str_to_float(response)
[docs]
def get_stop_level(self) -> float:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:STOPlevel`` \n
Snippet: ``value: float = driver.source.bb.pramp.ramp.get_stop_level()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:STOPlevel?')
return Conversions.str_to_float(response)
def clone(self) -> 'RampCls':
"""
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 = RampCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group