from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MmsCls:
"""
| Commands in total: 33
| Subgroups: 5
| Direct child commands: 18
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("mms", core, parent)
@property
def rsf(self):
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
if not hasattr(self, '_rsf'):
from .Rsf import RsfCls
self._rsf = RsfCls(self._core, self._cmd_group)
return self._rsf
@property
def fconfig(self):
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
if not hasattr(self, '_fconfig'):
from .Fconfig import FconfigCls
self._fconfig = FconfigCls(self._core, self._cmd_group)
return self._fconfig
@property
def setting(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
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: 6
| Subgroups: 1
| Direct child commands: 5
"""
if not hasattr(self, '_sts'):
from .Sts import StsCls
self._sts = StsCls(self._core, self._cmd_group)
return self._sts
# noinspection PyTypeChecker
# noinspection PyTypeChecker
[docs]
def get_nrif(self) -> enums.HrpUwbMmsrFragNumRif:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:NRIF`` \n
Snippet: ``value: enums.HrpUwbMmsrFragNumRif = driver.source.bb.lrWpan.mms.get_nrif()`` \n
Sets the number of RIF fragments in the MMS ranging phase.
:return: rif_number: FN0 | FN1 | FN2 | FN4 | FN8
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:NRIF?')
return Conversions.str_to_scalar_enum(response, enums.HrpUwbMmsrFragNumRif)
[docs]
def set_nrif(self, rif_number: enums.HrpUwbMmsrFragNumRif) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:NRIF`` \n
Snippet: ``driver.source.bb.lrWpan.mms.set_nrif(rif_number = enums.HrpUwbMmsrFragNumRif.FN0)`` \n
Sets the number of RIF fragments in the MMS ranging phase.
:param rif_number: FN0 | FN1 | FN2 | FN4 | FN8
"""
param = Conversions.enum_scalar_to_str(rif_number, enums.HrpUwbMmsrFragNumRif)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:MMS:NRIF {param}')
# noinspection PyTypeChecker
[docs]
def get_nrsf(self) -> enums.HrpUwbMmsrFragNumRsf:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:NRSF`` \n
Snippet: ``value: enums.HrpUwbMmsrFragNumRsf = driver.source.bb.lrWpan.mms.get_nrsf()`` \n
Sets the number of RSF fragments in the MMS ranging phase.
:return: rsf_number: FN0 | FN1 | FN2 | FN4 | FN8 | FN16
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:NRSF?')
return Conversions.str_to_scalar_enum(response, enums.HrpUwbMmsrFragNumRsf)
[docs]
def set_nrsf(self, rsf_number: enums.HrpUwbMmsrFragNumRsf) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:NRSF`` \n
Snippet: ``driver.source.bb.lrWpan.mms.set_nrsf(rsf_number = enums.HrpUwbMmsrFragNumRsf.FN0)`` \n
Sets the number of RSF fragments in the MMS ranging phase.
:param rsf_number: FN0 | FN1 | FN2 | FN4 | FN8 | FN16
"""
param = Conversions.enum_scalar_to_str(rsf_number, enums.HrpUwbMmsrFragNumRsf)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:MMS:NRSF {param}')
[docs]
def get_ri_offset(self) -> int:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:RIOFfset`` \n
Snippet: ``value: int = driver.source.bb.lrWpan.mms.get_ri_offset()`` \n
Requires [:SOURce<hw>]:BB:LRWPan:MMS:MPFormat BOTH. Queries the number of RSTU from the start of the last RSF fragment in
the MMS ranging pahse after which the initiator starts to transmit the first RIF fragment into the MMS ranging phase.
:return: rif_offset: integer Range: 2400 to 2400
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:RIOFfset?')
return Conversions.str_to_int(response)
# noinspection PyTypeChecker
[docs]
def get_role(self) -> enums.HrpUwbRangingRole:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:ROLE`` \n
Snippet: ``value: enums.HrpUwbRangingRole = driver.source.bb.lrWpan.mms.get_role()`` \n
Sets the role for the MMS ranging round.
:return: role: RESP | INIT RESP The responder is the complementary role to the initiator in the ranging process. For example, the responder receives requests and generates and sends responses. INIT The initiator controls the ranging process between the devices. For example, the initiator initiates the ranging process and executes distance calculation.
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:ROLE?')
return Conversions.str_to_scalar_enum(response, enums.HrpUwbRangingRole)
[docs]
def set_role(self, role: enums.HrpUwbRangingRole) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:ROLE`` \n
Snippet: ``driver.source.bb.lrWpan.mms.set_role(role = enums.HrpUwbRangingRole.INIT)`` \n
Sets the role for the MMS ranging round.
:param role: RESP | INIT RESP The responder is the complementary role to the initiator in the ranging process. For example, the responder receives requests and generates and sends responses. INIT The initiator controls the ranging process between the devices. For example, the initiator initiates the ranging process and executes distance calculation.
"""
param = Conversions.enum_scalar_to_str(role, enums.HrpUwbRangingRole)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:MMS:ROLE {param}')
[docs]
def get_rp_duration(self) -> int:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:RPDuration`` \n
Snippet: ``value: int = driver.source.bb.lrWpan.mms.get_rp_duration()`` \n
Sets the number of slots within the MMS ranging phase. The available range of the ranging phase duration depends on the
MMS packet format set with method ``RsSmw.source.bb.lrWpan.mms.mp_format()`` .
:return: rp_duration: integer Range: 0 to 4095
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:RPDuration?')
return Conversions.str_to_int(response)
[docs]
def set_rp_duration(self, rp_duration: int) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:RPDuration`` \n
Snippet: ``driver.source.bb.lrWpan.mms.set_rp_duration(rp_duration = 1)`` \n
Sets the number of slots within the MMS ranging phase. The available range of the ranging phase duration depends on the
MMS packet format set with method ``RsSmw.source.bb.lrWpan.mms.mp_format()`` .
:param rp_duration: integer Range: 0 to 4095
"""
param = Conversions.decimal_value_to_str(rp_duration)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:MMS:RPDuration {param}')
# noinspection PyTypeChecker
[docs]
def get_rs_duration(self) -> enums.HrpUwbMmsrSlotDur:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:RSDuration`` \n
Snippet: ``value: enums.HrpUwbMmsrSlotDur = driver.source.bb.lrWpan.mms.get_rs_duration()`` \n
Selects the duration of each ranging slot in RSTU (ranging scheduling time unit) . A ranging slot refers to a specific
time interval allocated for the transmission and reception of ranging messages between devices.
:return: rs_duration: SD3 | SD6 | SD9 | SD12 | SD15 | SD18 | SD21 | SD24
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:RSDuration?')
return Conversions.str_to_scalar_enum(response, enums.HrpUwbMmsrSlotDur)
[docs]
def set_rs_duration(self, rs_duration: enums.HrpUwbMmsrSlotDur) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:RSDuration`` \n
Snippet: ``driver.source.bb.lrWpan.mms.set_rs_duration(rs_duration = enums.HrpUwbMmsrSlotDur.SD12)`` \n
Selects the duration of each ranging slot in RSTU (ranging scheduling time unit) . A ranging slot refers to a specific
time interval allocated for the transmission and reception of ranging messages between devices.
:param rs_duration: SD3 | SD6 | SD9 | SD12 | SD15 | SD18 | SD21 | SD24
"""
param = Conversions.enum_scalar_to_str(rs_duration, enums.HrpUwbMmsrSlotDur)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:MMS:RSDuration {param}')
[docs]
def get_rs_offset(self) -> int:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:RSOFfset`` \n
Snippet: ``value: int = driver.source.bb.lrWpan.mms.get_rs_offset()`` \n
Sets the number of slots after which the initiator starts to transmit the first RSF fragment into the MMS ranging phase.
:return: rsf_offset: integer Range: 0 to 15
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:RSOFfset?')
return Conversions.str_to_int(response)
[docs]
def set_rs_offset(self, rsf_offset: int) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:RSOFfset`` \n
Snippet: ``driver.source.bb.lrWpan.mms.set_rs_offset(rsf_offset = 1)`` \n
Sets the number of slots after which the initiator starts to transmit the first RSF fragment into the MMS ranging phase.
:param rsf_offset: integer Range: 0 to 15
"""
param = Conversions.decimal_value_to_str(rsf_offset)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:MMS:RSOFfset {param}')
[docs]
def get_rstu(self) -> int:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:RSTU`` \n
Snippet: ``value: int = driver.source.bb.lrWpan.mms.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:MMS:RSTU?')
return Conversions.str_to_int(response)
[docs]
def get_srf(self) -> bool:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:SRF`` \n
Snippet: ``value: bool = driver.source.bb.lrWpan.mms.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:MMS:SRF?')
return Conversions.str_to_bool(response)
[docs]
def set_srf(self, set_rf: bool) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:SRF`` \n
Snippet: ``driver.source.bb.lrWpan.mms.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:MMS:SRF {param}')
# noinspection PyTypeChecker
[docs]
def get_ssci(self) -> enums.HrpUwbCodeIndexSsci:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:SSCI`` \n
Snippet: ``value: enums.HrpUwbCodeIndexSsci = driver.source.bb.lrWpan.mms.get_ssci()`` \n
Requires [:SOURce<hw>]:BB:LRWPan:MMS:TFSYnc 1. Queries or sets the code index used for the SYNC and SFD in the MMS packet,
depending on the MMS packet format.
:return: ssci: CI_25 | CI_26 | CI_27 | CI_28 | CI_29 | CI_30 | CI_31 | CI_32
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:SSCI?')
return Conversions.str_to_scalar_enum(response, enums.HrpUwbCodeIndexSsci)
[docs]
def set_ssci(self, ssci: enums.HrpUwbCodeIndexSsci) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:SSCI`` \n
Snippet: ``driver.source.bb.lrWpan.mms.set_ssci(ssci = enums.HrpUwbCodeIndexSsci.CI_25)`` \n
Requires [:SOURce<hw>]:BB:LRWPan:MMS:TFSYnc 1. Queries or sets the code index used for the SYNC and SFD in the MMS packet,
depending on the MMS packet format.
:param ssci: CI_25 | CI_26 | CI_27 | CI_28 | CI_29 | CI_30 | CI_31 | CI_32
"""
param = Conversions.enum_scalar_to_str(ssci, enums.HrpUwbCodeIndexSsci)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:MMS:SSCI {param}')
[docs]
def get_tf_sync(self) -> bool:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:TFSYnc`` \n
Snippet: ``value: bool = driver.source.bb.lrWpan.mms.get_tf_sync()`` \n
Enables a fragment consisting of SYNC and SFD preceding the MMS ranging phase for initial timing and frequency
synchronization.
:return: time_freq_sync: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:TFSYnc?')
return Conversions.str_to_bool(response)
[docs]
def set_tf_sync(self, time_freq_sync: bool) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:MMS:TFSYnc`` \n
Snippet: ``driver.source.bb.lrWpan.mms.set_tf_sync(time_freq_sync = False)`` \n
Enables a fragment consisting of SYNC and SFD preceding the MMS ranging phase for initial timing and frequency
synchronization.
:param time_freq_sync: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(time_freq_sync)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:MMS:TFSYnc {param}')
# noinspection PyTypeChecker
[docs]
def get_asl(self) -> enums.HrpUwbActSegmentLength:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:ASL`` \n
Snippet: ``value: enums.HrpUwbActSegmentLength = driver.source.bb.lrWpan.mms.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:MMS: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]:MMS:ASL`` \n
Snippet: ``driver.source.bb.lrWpan.mms.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:MMS:ASL {param}')
# noinspection PyTypeChecker
[docs]
def get_asn(self) -> enums.HrpUwbActSegmentNum:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:ASN`` \n
Snippet: ``value: enums.HrpUwbActSegmentNum = driver.source.bb.lrWpan.mms.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:MMS: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]:MMS:ASN`` \n
Snippet: ``driver.source.bb.lrWpan.mms.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:MMS:ASN {param}')
[docs]
def get_bandwidth(self) -> float:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:BWIDth`` \n
Snippet: ``value: float = driver.source.bb.lrWpan.mms.get_bandwidth()`` \n
Queries the channel bandwidth. The bandwidth depends on the channel number.
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:MMS:BWIDth?')
return Conversions.str_to_float(response)
[docs]
def get_cnumber(self) -> int:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:CNUMber`` \n
Snippet: ``value: int = driver.source.bb.lrWpan.mms.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:MMS:CNUMber?')
return Conversions.str_to_int(response)
[docs]
def set_cnumber(self, channel_number: int) -> None:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:CNUMber`` \n
Snippet: ``driver.source.bb.lrWpan.mms.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:MMS:CNUMber {param}')
[docs]
def get_f_2_ms(self) -> bool:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:F2MS`` \n
Snippet: ``value: bool = driver.source.bb.lrWpan.mms.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:MMS:F2MS?')
return Conversions.str_to_bool(response)
[docs]
def set_f_2_ms(self, fixed_2_ms_frame: bool) -> None:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:F2MS`` \n
Snippet: ``driver.source.bb.lrWpan.mms.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:MMS:F2MS {param}')
[docs]
def get_iinterval(self) -> float:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:IINTerval`` \n
Snippet: ``value: float = driver.source.bb.lrWpan.mms.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:MMS:IINTerval?')
return Conversions.str_to_float(response)
[docs]
def set_iinterval(self, iinterval: float) -> None:
"""
``[SOURce<HW>]:BB:[LRWPan]:MMS:IINTerval`` \n
Snippet: ``driver.source.bb.lrWpan.mms.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:MMS:IINTerval {param}')
def clone(self) -> 'MmsCls':
"""
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 = MmsCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group