"""Provides methods to fetch and read the Cda measurement results."""
import functools
import nirfmxcdma2k.attributes as attributes
import nirfmxcdma2k.errors as errors
import nirfmxcdma2k.internal._helper as _helper
def _raise_if_disposed(f):
"""From https://stackoverflow.com/questions/5929107/decorators-with-parameters."""
@functools.wraps(f)
def aux(*xs, **kws):
meas_obj = xs[0] # parameter 0 is 'self' which is the measurement object
if meas_obj._signal_obj.is_disposed:
raise Exception("Cannot access a disposed Cdma2k signal configuration")
return f(*xs, **kws)
return aux
[docs]
class CdaResults(object):
"""Provides methods to fetch and read the Cda measurement results."""
def __init__(self, signal_obj):
"""Provides methods to fetch and read the Cda measurement results."""
self._signal_obj = signal_obj
self._session_function_lock = signal_obj._session_function_lock
self._interpreter = signal_obj._interpreter
[docs]
@_raise_if_disposed
def get_rms_symbol_evm(self, selector_string):
r"""Gets the RMS symbol EVM of the configured measurement channel. This value is expressed as a percentage.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the RMS symbol EVM of the configured measurement channel. This value is expressed as a percentage.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_RMS_SYMBOL_EVM.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_peak_symbol_evm(self, selector_string):
r"""Gets the peak symbol EVM of the configured measurement channel. This value is expressed as a percentage.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the peak symbol EVM of the configured measurement channel. This value is expressed as a percentage.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_PEAK_SYMBOL_EVM.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_rms_symbol_magnitude_error(self, selector_string):
r"""Gets the RMS symbol magnitude error of the configured measurement channel. This value is expressed as a percentage.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the RMS symbol magnitude error of the configured measurement channel. This value is expressed as a percentage.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_RMS_SYMBOL_MAGNITUDE_ERROR.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_rms_symbol_phase_error(self, selector_string):
r"""Gets the RMS symbol phase error of the configured measurement channel. This value is expressed in degrees.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the RMS symbol phase error of the configured measurement channel. This value is expressed in degrees.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_RMS_SYMBOL_PHASE_ERROR.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_mean_symbol_power(self, selector_string):
r"""Gets the mean symbol power of the configured measurement channel. This value is expressed in dB, when you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dB**, and in dBm, when you set the CDA
Pwr Unit attribute to **dBm**.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the mean symbol power of the configured measurement channel. This value is expressed in dB, when you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dB**, and in dBm, when you set the CDA
Pwr Unit attribute to **dBm**.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_MEAN_SYMBOL_POWER.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_total_power(self, selector_string):
r"""Gets the mean power of the received signal. This value is expressed in dBm.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the mean power of the received signal. This value is expressed in dBm.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_TOTAL_POWER.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_total_active_power(self, selector_string):
r"""Gets the sum of the powers of all active code channels. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the sum of the powers of all active code channels. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_TOTAL_ACTIVE_POWER.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_mean_active_power(self, selector_string):
r"""Gets the average power of all active code channels. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the average power of all active code channels. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_MEAN_ACTIVE_POWER.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_peak_active_power(self, selector_string):
r"""Gets the maximum power among all active code channels. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the maximum power among all active code channels. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_PEAK_ACTIVE_POWER.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_mean_inactive_power(self, selector_string):
r"""Gets the average code power, measured among the set of inactive channels, in the code domain of the base spreading
factor. If you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this
measurement returns the absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the average code power, measured among the set of inactive channels, in the code domain of the base spreading
factor. If you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this
measurement returns the absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_MEAN_INACTIVE_POWER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_peak_inactive_power(self, selector_string):
r"""Gets the maximum measured code power, measured among the set of inactive channels, in the code domain of the base
spreading factor. If you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**,
this measurement returns the absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the maximum measured code power, measured among the set of inactive channels, in the code domain of the base
spreading factor. If you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**,
this measurement returns the absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_PEAK_INACTIVE_POWER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_i_mean_active_power(self, selector_string):
r"""Gets the average power of all active code channels measured on the I-branch. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the average power of all active code channels measured on the I-branch. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_I_MEAN_ACTIVE_POWER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_i_peak_inactive_power(self, selector_string):
r"""Gets the maximum measured code power among the set of inactive channels on the I-branch and in the code domain of
the base spreading factor. If you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to
**dBm**, this measurement returns the absolute measured power; otherwise, this measurement returns a value relative to
the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the maximum measured code power among the set of inactive channels on the I-branch and in the code domain of
the base spreading factor. If you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to
**dBm**, this measurement returns the absolute measured power; otherwise, this measurement returns a value relative to
the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_I_PEAK_INACTIVE_POWER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_q_mean_active_power(self, selector_string):
r"""Gets the average power of all active code channels measured on the Q-branch. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the average power of all active code channels measured on the Q-branch. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_Q_MEAN_ACTIVE_POWER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_q_peak_inactive_power(self, selector_string):
r"""Gets the maximum measured code power among the set of inactive channels on the Q-branch and in the code domain of
the base spreading factor. If you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to
**dBm**, this measurement returns the absolute measured power; otherwise, this measurement returns a value relative to
the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the maximum measured code power among the set of inactive channels on the Q-branch and in the code domain of
the base spreading factor. If you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to
**dBm**, this measurement returns the absolute measured power; otherwise, this measurement returns a value relative to
the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_Q_PEAK_INACTIVE_POWER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_mean_pilot_power(self, selector_string):
r"""Gets the mean power of the R-PICH.
Returns the mean power value in dB, when you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dB**.
Returns the mean power value in dBm, when you set the CDA Pwr Unit attribute to **dBm**.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the mean power of the R-PICH.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_MEAN_PILOT_POWER.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_iq_origin_offset(self, selector_string):
r"""Gets the I/Q origin offset of the composite signal averaged over all measured slots. This value is expressed in dB.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the I/Q origin offset of the composite signal averaged over all measured slots. This value is expressed in dB.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_IQ_ORIGIN_OFFSET.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_iq_gain_imbalance(self, selector_string):
r"""Gets the I/Q gain imbalance of the composite signal averaged over all measured slots. This value is expressed in dB.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the I/Q gain imbalance of the composite signal averaged over all measured slots. This value is expressed in dB.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_IQ_GAIN_IMBALANCE.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_iq_quadrature_error(self, selector_string):
r"""Gets the I/Q quadrature error of the composite signal averaged over all measured slots. This value is expressed in
degrees.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the I/Q quadrature error of the composite signal averaged over all measured slots. This value is expressed in
degrees.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string,
attributes.AttributeID.CDA_RESULTS_IQ_QUADRATURE_ERROR.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_frequency_error(self, selector_string):
r"""Gets the frequency error. This value is expressed in Hz.
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the frequency error. This value is expressed in Hz.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_FREQUENCY_ERROR.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_chip_rate_error(self, selector_string):
r"""Gets the chip rate error. This value is expressed in parts per million (ppm).
You do not need to use a selector string to read this result for the default signal and result instance. Refer
to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for
information about the string syntax for named signals and named results.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Returns the chip rate error. This value is expressed in parts per million (ppm).
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
attr_val, error_code = self._interpreter.get_attribute_f64(
updated_selector_string, attributes.AttributeID.CDA_RESULTS_CHIP_RATE_ERROR.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def fetch_symbol_evm_trace(self, selector_string, timeout):
r"""Returns the symbol EVM trace of the configured measurement channel.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (symbol_evm, error_code):
symbol_evm (float):
This parameter returns the array of symbol EVM values of the configured measurement channel. This value is expressed as
a percentage.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
symbol_evm, error_code = self._interpreter.cda_fetch_symbol_evm_trace(
updated_selector_string, timeout
)
finally:
self._session_function_lock.exit_read_lock()
return symbol_evm, error_code
[docs]
@_raise_if_disposed
def fetch_symbol_magnitude_error_trace(self, selector_string, timeout):
r"""Returns the symbol magnitude error trace of the configured measurement channel.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (symbol_magnitude_error, error_code):
symbol_magnitude_error (float):
This parameter returns the trace of the symbol magnitude errors of the corrected composite signal. This value is
expressed as a percentage.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
symbol_magnitude_error, error_code = (
self._interpreter.cda_fetch_symbol_magnitude_error_trace(
updated_selector_string, timeout
)
)
finally:
self._session_function_lock.exit_read_lock()
return symbol_magnitude_error, error_code
[docs]
@_raise_if_disposed
def fetch_symbol_phase_error_trace(self, selector_string, timeout):
r"""Returns the symbol phase error trace of the configured measurement channel.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (symbol_phase_error, error_code):
symbol_phase_error (float):
This parameter returns the array of symbol phase error values of the configured measurement channel. This value is
expressed in degrees.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
symbol_phase_error, error_code = self._interpreter.cda_fetch_symbol_phase_error_trace(
updated_selector_string, timeout
)
finally:
self._session_function_lock.exit_read_lock()
return symbol_phase_error, error_code
[docs]
@_raise_if_disposed
def fetch_code_domain_i_and_q_power_trace(self, selector_string, timeout):
r"""Returns the I and Q code power trace measured in the code domain of the base spreading factor.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (i_code_domain_powers, q_code_domain_powers, error_code):
i_code_domain_powers (float):
This parameter returns the array of I code power measured in the code domain of the base spreading factor. This value
is expressed in dB or dBm.
q_code_domain_powers (float):
This parameter returns the array of Q code power measured in the code domain of the base spreading factor. This value
is expressed in dB or dBm.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
i_code_domain_powers, q_code_domain_powers, error_code = (
self._interpreter.cda_fetch_code_domain_i_and_q_power_trace(
updated_selector_string, timeout
)
)
finally:
self._session_function_lock.exit_read_lock()
return i_code_domain_powers, q_code_domain_powers, error_code
[docs]
@_raise_if_disposed
def fetch_symbol_power_trace(self, selector_string, timeout):
r"""Returns the symbol power trace of the configured measurement channel.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (symbol_powers, error_code):
symbol_powers (float):
This parameter returns the array of symbol power of the configured measurement channel. This value is expressed in
dBm.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
symbol_powers, error_code = self._interpreter.cda_fetch_symbol_power_trace(
updated_selector_string, timeout
)
finally:
self._session_function_lock.exit_read_lock()
return symbol_powers, error_code
[docs]
@_raise_if_disposed
def fetch_symbol_constellation_trace(self, selector_string, timeout, symbol_constellation):
r"""Returns the symbol constellation trace of the configured measurement channel.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
symbol_constellation (numpy.complex64):
This parameter returns the array of symbol constellation points of the configured measurement channel.
Returns:
int:
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.cda_fetch_symbol_constellation_trace(
updated_selector_string, timeout, symbol_constellation
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def fetch_iq_impairments(self, selector_string, timeout):
r"""Returns the measured I/Q impairments.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (iq_origin_offset, iq_gain_imbalance, iq_quadrature_error, error_code):
iq_origin_offset (float):
This parameter returns the I/Q origin offset of the composite signal. This value is expressed in dB.
iq_gain_imbalance (float):
This parameter returns the I/Q gain imbalance of the composite signal. This value is expressed in dB.
iq_quadrature_error (float):
This parameter returns the I/Q quadrature error of the composite signal. This value is expressed in degrees.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
iq_origin_offset, iq_gain_imbalance, iq_quadrature_error, error_code = (
self._interpreter.cda_fetch_iq_impairments(updated_selector_string, timeout)
)
finally:
self._session_function_lock.exit_read_lock()
return iq_origin_offset, iq_gain_imbalance, iq_quadrature_error, error_code
[docs]
@_raise_if_disposed
def fetch_symbol_evm(self, selector_string, timeout):
r"""Returns the modulation accuracy related measures for the configured measurement channel.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (rms_symbol_evm, peak_symbol_evm, rms_symbol_magnitude_error, rms_symbol_phase_error, mean_symbol_power, frequency_error, chip_rate_error, error_code):
rms_symbol_evm (float):
This parameter returns the RMS symbol EVM of the configured measurement channel. This value is expressed as a
percentage.
peak_symbol_evm (float):
This parameter returns the peak symbol EVM of the configured measurement channel. This value is expressed as a
percentage.
rms_symbol_magnitude_error (float):
This parameter returns the RMS symbol magnitude error of the configured measurement channel. This value is expressed as
a percentage.
rms_symbol_phase_error (float):
This parameter returns the mean symbol power of the configured measurement channel. This value is expressed in dB, when
you set the :py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to dB, and in dBm, when you set
the CDA Pwr Unit attribute to dBm.
mean_symbol_power (float):
This parameter returns the RMS symbol phase error of the configured measurement channel. This value is expressed in
degrees.
frequency_error (float):
This parameter returns the chip rate error. This value is expressed in parts per million (ppm).
chip_rate_error (float):
This parameter returns the frequency error. This value is expressed in Hz.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
(
rms_symbol_evm,
peak_symbol_evm,
rms_symbol_magnitude_error,
rms_symbol_phase_error,
mean_symbol_power,
frequency_error,
chip_rate_error,
error_code,
) = self._interpreter.cda_fetch_symbol_evm(updated_selector_string, timeout)
finally:
self._session_function_lock.exit_read_lock()
return (
rms_symbol_evm,
peak_symbol_evm,
rms_symbol_magnitude_error,
rms_symbol_phase_error,
mean_symbol_power,
frequency_error,
chip_rate_error,
error_code,
)
[docs]
@_raise_if_disposed
def fetch_code_domain_power(self, selector_string, timeout):
r"""Returns the scalar code domain power results.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (total_power, total_active_power, mean_active_power, peak_active_power, mean_inactive_power, peak_inactive_power, error_code):
total_power (float):
This parameter returns the mean power of the received signal. This value is expressed in dBm.
total_active_power (float):
This parameter returns the sum of the powers of all active code channels. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
mean_active_power (float):
This parameter returns the average power of all active code channels. If you set the CDA Pwr Unit attribute to **dBm**,
this measurement returns the absolute measured power; otherwise, this measurement returns a value relative to the CDA
Result Total Power attribute.
peak_active_power (float):
This parameter returns the average code power measured among the set of inactive channels in the code domain of the
base spreading factor. If you set the CDA Pwr Unit attribute to **dBm**, this measurement returns the absolute measured
power; otherwise, this measurement returns a value relative to the CDA Result Total Power attribute.
mean_inactive_power (float):
This parameter returns the maximum power among all active code channels. If you set the CDA Pwr Unit attribute to
**dBm**, this measurement returns the absolute measured power; otherwise, this measurement returns a value relative to
the CDA Result Total Power attribute.
peak_inactive_power (float):
This parameter returns the maximum measured code power among the set of inactive channels in the code domain of the
base spreading factor. If you set the CDA Pwr Unit attribute to **dBm**, this measurement returns the absolute measured
power; otherwise, this measurement returns a value relative to the CDA Result Total Power attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
(
total_power,
total_active_power,
mean_active_power,
peak_active_power,
mean_inactive_power,
peak_inactive_power,
error_code,
) = self._interpreter.cda_fetch_code_domain_power(updated_selector_string, timeout)
finally:
self._session_function_lock.exit_read_lock()
return (
total_power,
total_active_power,
mean_active_power,
peak_active_power,
mean_inactive_power,
peak_inactive_power,
error_code,
)
[docs]
@_raise_if_disposed
def fetch_code_domain_i_and_q_power(self, selector_string, timeout):
r"""Returns the I and Q mean active powers, and I and Q peak inactive powers.
Args:
selector_string (string):
This parameter specifies a `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result
name. Examples:
""
"signal::sig1"
"result::r1"
"signal::sig1/result::r1"
You can use the :py:meth:`build_result_string` method to build the selector string.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set
this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the
method waits until the measurement is complete. The default value is 10.
Returns:
Tuple (i_mean_active_power, q_mean_active_power, i_peak_inactive_power, q_peak_inactive_power, error_code):
i_mean_active_power (float):
This parameter returns the average power of all active code channels measured on the I-branch. If you set the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_POWER_UNIT` attribute to **dBm**, this measurement returns the
absolute measured power; otherwise, this measurement returns a value relative to the
:py:attr:`~nirfmxcdma2k.attributes.AttributeID.CDA_RESULTS_TOTAL_POWER` attribute.
q_mean_active_power (float):
This parameter returns the average power of all active code channels measured on the Q-branch. If you set the CDA Pwr
Unit attribute to **dBm**, this measurement returns the absolute measured power; otherwise, this measurement returns a
value relative to the CDA Result Total Power attribute.
i_peak_inactive_power (float):
This parameter returns the maximum measured code power among the set of inactive channels on the I-Branch. If you set
the CDA Pwr Unit attribute to **dBm**, this measurement returns the absolute measured power; otherwise, this
measurement returns a value relative to the CDA Result Total Power attribute.
q_peak_inactive_power (float):
This parameter returns the maximum measured code power among the set of inactive channels on the Q-branch and in the
code domain of the base spreading factor. If you set the CDA Pwr Unit attribute to **dBm**, this measurement returns
the absolute measured power; otherwise, this measurement returns a value relative to the CDA Result Total Power
attribute.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
(
i_mean_active_power,
q_mean_active_power,
i_peak_inactive_power,
q_peak_inactive_power,
error_code,
) = self._interpreter.cda_fetch_code_domain_i_and_q_power(
updated_selector_string, timeout
)
finally:
self._session_function_lock.exit_read_lock()
return (
i_mean_active_power,
q_mean_active_power,
i_peak_inactive_power,
q_peak_inactive_power,
error_code,
)