Source code for RsSmw.Implementations.Source.Bb.LrWpan.Sens

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SensCls:
	"""
	| Commands in total: 69
	| Subgroups: 6
	| Direct child commands: 14
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("sens", core, parent)

	@property
	def fconfig(self):
		"""
		| Commands in total: 18
		| Subgroups: 4
		| Direct child commands: 12
		"""
		if not hasattr(self, '_fconfig'):
			from .Fconfig import FconfigCls
			self._fconfig = FconfigCls(self._core, self._cmd_group)
		return self._fconfig

	@property
	def phr(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_phr'):
			from .Phr import PhrCls
			self._phr = PhrCls(self._core, self._cmd_group)
		return self._phr

	@property
	def macHeader(self):
		"""
		| Commands in total: 31
		| Subgroups: 0
		| Direct child commands: 31
		"""
		if not hasattr(self, '_macHeader'):
			from .MacHeader import MacHeaderCls
			self._macHeader = MacHeaderCls(self._core, self._cmd_group)
		return self._macHeader

	@property
	def setting(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_setting'):
			from .Setting import SettingCls
			self._setting = SettingCls(self._core, self._cmd_group)
		return self._setting

	@property
	def sfd(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_sfd'):
			from .Sfd import SfdCls
			self._sfd = SfdCls(self._core, self._cmd_group)
		return self._sfd

	@property
	def sts(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_sts'):
			from .Sts import StsCls
			self._sts = StsCls(self._core, self._cmd_group)
		return self._sts

	# noinspection PyTypeChecker
[docs] def get_cct(self) -> enums.HrpUwbConvConsLenDrm: """ ``[SOURce<HW>]:BB:LRWPan:SENS:CCT`` \n Snippet: ``value: enums.HrpUwbConvConsLenDrm = driver.source.bb.lrWpan.sens.get_cct()`` \n Requires [:SOURce<hw>]:BB:LRWPan | HUWB:STD EHPRF | SENS. Sets the channel code type. The channel code type depends on the selected PHR data rate mode. :return: cccl: CL3 | CL7 | LDPC """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:CCT?') return Conversions.str_to_scalar_enum(response, enums.HrpUwbConvConsLenDrm)
[docs] def set_cct(self, cccl: enums.HrpUwbConvConsLenDrm) -> None: """ ``[SOURce<HW>]:BB:LRWPan:SENS:CCT`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_cct(cccl = enums.HrpUwbConvConsLenDrm.CL3)`` \n Requires [:SOURce<hw>]:BB:LRWPan | HUWB:STD EHPRF | SENS. Sets the channel code type. The channel code type depends on the selected PHR data rate mode. :param cccl: CL3 | CL7 | LDPC """ param = Conversions.enum_scalar_to_str(cccl, enums.HrpUwbConvConsLenDrm) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:CCT {param}')
[docs] def get_rstu(self) -> int: """ ``[SOURce<HW>]:BB:LRWPan:SENS:RSTU`` \n Snippet: ``value: int = driver.source.bb.lrWpan.sens.get_rstu()`` \n Queries the size of the ranging scheduling time unit (RSTU) . :return: rstu: integer Range: 416 to 416 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:RSTU?') return Conversions.str_to_int(response)
# noinspection PyTypeChecker
[docs] def get_sgap(self) -> enums.HrpUwbSilentGap: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SGAP`` \n Snippet: ``value: enums.HrpUwbSilentGap = driver.source.bb.lrWpan.sens.get_sgap()`` \n Queries or sets the value of the gap before and after the SENS part in the sensing package. Setting the value requires [:SOURce<hw>]:BB:LRWPan:SENS:SPC SPCU. :return: silent_gap: SG0 | SG1 | SG40 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:SGAP?') return Conversions.str_to_scalar_enum(response, enums.HrpUwbSilentGap)
[docs] def set_sgap(self, silent_gap: enums.HrpUwbSilentGap) -> None: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SGAP`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_sgap(silent_gap = enums.HrpUwbSilentGap.SG0)`` \n Queries or sets the value of the gap before and after the SENS part in the sensing package. Setting the value requires [:SOURce<hw>]:BB:LRWPan:SENS:SPC SPCU. :param silent_gap: SG0 | SG1 | SG40 """ param = Conversions.enum_scalar_to_str(silent_gap, enums.HrpUwbSilentGap) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:SGAP {param}')
# noinspection PyTypeChecker
[docs] def get_spc(self) -> enums.HrpUwbSenspAcketConfig: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SPC`` \n Snippet: ``value: enums.HrpUwbSenspAcketConfig = driver.source.bb.lrWpan.sens.get_spc()`` \n Sets the sensing packet configuration. :return: packet_config: SPC0 | SPC1 | SPC2 | SPCU SPC0 | SPC1 | SPC2 Provide the sensing packet format according to P802.15.4ab/D02. SPCU Provides no SYNC and no SFD field. The format provides the SENS active packet in between two silent gaps. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:SPC?') return Conversions.str_to_scalar_enum(response, enums.HrpUwbSenspAcketConfig)
[docs] def set_spc(self, packet_config: enums.HrpUwbSenspAcketConfig) -> None: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SPC`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_spc(packet_config = enums.HrpUwbSenspAcketConfig.SPC0)`` \n Sets the sensing packet configuration. :param packet_config: SPC0 | SPC1 | SPC2 | SPCU SPC0 | SPC1 | SPC2 Provide the sensing packet format according to P802.15.4ab/D02. SPCU Provides no SYNC and no SFD field. The format provides the SENS active packet in between two silent gaps. """ param = Conversions.enum_scalar_to_str(packet_config, enums.HrpUwbSenspAcketConfig) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:SPC {param}')
[docs] def get_sp_duration(self) -> int: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SPDuration`` \n Snippet: ``value: int = driver.source.bb.lrWpan.sens.get_sp_duration()`` \n Sets the sensing phase duration. You can configure how many sensing slots define a sensing phase. :return: sens_phase_dur: integer Range: 1 to 4095 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:SPDuration?') return Conversions.str_to_int(response)
[docs] def set_sp_duration(self, sens_phase_dur: int) -> None: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SPDuration`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_sp_duration(sens_phase_dur = 1)`` \n Sets the sensing phase duration. You can configure how many sensing slots define a sensing phase. :param sens_phase_dur: integer Range: 1 to 4095 """ param = Conversions.decimal_value_to_str(sens_phase_dur) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:SPDuration {param}')
[docs] def get_srf(self) -> bool: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SRF`` \n Snippet: ``value: bool = driver.source.bb.lrWpan.sens.get_srf()`` \n Sets the RF output frequency automatically to the value of the channel center frequency according to the selected channel number. You can still adjust the RF frequency afterwards. :return: set_rf: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:SRF?') return Conversions.str_to_bool(response)
[docs] def set_srf(self, set_rf: bool) -> None: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SRF`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_srf(set_rf = False)`` \n Sets the RF output frequency automatically to the value of the channel center frequency according to the selected channel number. You can still adjust the RF frequency afterwards. :param set_rf: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(set_rf) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:SRF {param}')
# noinspection PyTypeChecker
[docs] def get_ss_duration(self) -> enums.HrpUwbMmsrSlotDur: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SSDuration`` \n Snippet: ``value: enums.HrpUwbMmsrSlotDur = driver.source.bb.lrWpan.sens.get_ss_duration()`` \n Sets the duration of a sensing slot in RSTU (ranging scheduling time unit) . :return: sens_slot_dur: SD3 | SD6 | SD9 | SD12 | SD15 | SD18 | SD21 | SD24 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:SSDuration?') return Conversions.str_to_scalar_enum(response, enums.HrpUwbMmsrSlotDur)
[docs] def set_ss_duration(self, sens_slot_dur: enums.HrpUwbMmsrSlotDur) -> None: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SSDuration`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_ss_duration(sens_slot_dur = enums.HrpUwbMmsrSlotDur.SD12)`` \n Sets the duration of a sensing slot in RSTU (ranging scheduling time unit) . :param sens_slot_dur: SD3 | SD6 | SD9 | SD12 | SD15 | SD18 | SD21 | SD24 """ param = Conversions.enum_scalar_to_str(sens_slot_dur, enums.HrpUwbMmsrSlotDur) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:SSDuration {param}')
[docs] def get_ss_offset(self) -> int: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SSOFfset`` \n Snippet: ``value: int = driver.source.bb.lrWpan.sens.get_ss_offset()`` \n Sets an offset of a defined amount of slots before the sensing phase starts. :return: sens_start_offset: integer Range: 0 to 15 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:SSOFfset?') return Conversions.str_to_int(response)
[docs] def set_ss_offset(self, sens_start_offset: int) -> None: """ ``[SOURce<HW>]:BB:LRWPan:SENS:SSOFfset`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_ss_offset(sens_start_offset = 1)`` \n Sets an offset of a defined amount of slots before the sensing phase starts. :param sens_start_offset: integer Range: 0 to 15 """ param = Conversions.decimal_value_to_str(sens_start_offset) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:SSOFfset {param}')
# noinspection PyTypeChecker
[docs] def get_asl(self) -> enums.HrpUwbActSegmentLength: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:ASL`` \n Snippet: ``value: enums.HrpUwbActSegmentLength = driver.source.bb.lrWpan.sens.get_asl()`` \n Sets the active segment length. :return: act_seg_length: ASL_16 | ASL_32 | ASL_64 | ASL_128 | ASL_256 | ASL_512 | ASL_1024 | ASL_2048 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:ASL?') return Conversions.str_to_scalar_enum(response, enums.HrpUwbActSegmentLength)
[docs] def set_asl(self, act_seg_length: enums.HrpUwbActSegmentLength) -> None: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:ASL`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_asl(act_seg_length = enums.HrpUwbActSegmentLength.ASL_1024)`` \n Sets the active segment length. :param act_seg_length: ASL_16 | ASL_32 | ASL_64 | ASL_128 | ASL_256 | ASL_512 | ASL_1024 | ASL_2048 """ param = Conversions.enum_scalar_to_str(act_seg_length, enums.HrpUwbActSegmentLength) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:ASL {param}')
# noinspection PyTypeChecker
[docs] def get_asn(self) -> enums.HrpUwbActSegmentNum: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:ASN`` \n Snippet: ``value: enums.HrpUwbActSegmentNum = driver.source.bb.lrWpan.sens.get_asn()`` \n Requires [:SOURce<hw>]:BB:LRWPan | HUWB:STD BPRF | HPRF | EHPRF | SENS. Sets the number of active segments. :return: acg_seg_number: ASN_1 | ASN_2 | ASN_3 | ASN_4 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:ASN?') return Conversions.str_to_scalar_enum(response, enums.HrpUwbActSegmentNum)
[docs] def set_asn(self, acg_seg_number: enums.HrpUwbActSegmentNum) -> None: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:ASN`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_asn(acg_seg_number = enums.HrpUwbActSegmentNum.ASN_1)`` \n Requires [:SOURce<hw>]:BB:LRWPan | HUWB:STD BPRF | HPRF | EHPRF | SENS. Sets the number of active segments. :param acg_seg_number: ASN_1 | ASN_2 | ASN_3 | ASN_4 """ param = Conversions.enum_scalar_to_str(acg_seg_number, enums.HrpUwbActSegmentNum) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:ASN {param}')
[docs] def get_bandwidth(self) -> float: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:BWIDth`` \n Snippet: ``value: float = driver.source.bb.lrWpan.sens.get_bandwidth()`` \n Queries the channel bandwidth. The bandwidth depends on the channel number. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:BWIDth?') return Conversions.str_to_float(response)
[docs] def get_cnumber(self) -> int: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:CNUMber`` \n Snippet: ``value: int = driver.source.bb.lrWpan.sens.get_cnumber()`` \n Sets the channel number that is a 4-bit value in decimal representation. The channel number determines the bandwidth and the code index. :return: channel_number: integer Range: 0 to 15 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:CNUMber?') return Conversions.str_to_int(response)
[docs] def set_cnumber(self, channel_number: int) -> None: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:CNUMber`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_cnumber(channel_number = 1)`` \n Sets the channel number that is a 4-bit value in decimal representation. The channel number determines the bandwidth and the code index. :param channel_number: integer Range: 0 to 15 """ param = Conversions.decimal_value_to_str(channel_number) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:CNUMber {param}')
[docs] def get_f_2_ms(self) -> bool: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:F2MS`` \n Snippet: ``value: bool = driver.source.bb.lrWpan.sens.get_f_2_ms()`` \n Sets the frame length of a generated waveform shorter than 2 ms to a fixed value of 2 ms. If activated, the idle interval is set to 0.0 us by default. Generated waveforms longer than 2 ms remain unaffected. :return: fixed_2_ms_frame: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:F2MS?') return Conversions.str_to_bool(response)
[docs] def set_f_2_ms(self, fixed_2_ms_frame: bool) -> None: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:F2MS`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_f_2_ms(fixed_2_ms_frame = False)`` \n Sets the frame length of a generated waveform shorter than 2 ms to a fixed value of 2 ms. If activated, the idle interval is set to 0.0 us by default. Generated waveforms longer than 2 ms remain unaffected. :param fixed_2_ms_frame: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(fixed_2_ms_frame) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:F2MS {param}')
[docs] def get_iinterval(self) -> float: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:IINTerval`` \n Snippet: ``value: float = driver.source.bb.lrWpan.sens.get_iinterval()`` \n Sets the time of the interval separating two frames. :return: iinterval: float Range: 0 to 1000000, Unit: us """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:SENS:IINTerval?') return Conversions.str_to_float(response)
[docs] def set_iinterval(self, iinterval: float) -> None: """ ``[SOURce<HW>]:BB:[LRWPan]:SENS:IINTerval`` \n Snippet: ``driver.source.bb.lrWpan.sens.set_iinterval(iinterval = 1.0)`` \n Sets the time of the interval separating two frames. :param iinterval: float Range: 0 to 1000000, Unit: us """ param = Conversions.decimal_value_to_str(iinterval) self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:SENS:IINTerval {param}')
def clone(self) -> 'SensCls': """ 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 = SensCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group