Source code for rsrtx.Implementations.FormatPy
from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class FormatPyCls:
"""
| Commands in total: 3
| Subgroups: 1
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("formatPy", core, parent)
@property
def data(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_data'):
from .Data import DataCls
self._data = DataCls(self._core, self._cmd_group)
return self._data
# noinspection PyTypeChecker
[docs]
def get_border(self) -> enums.FormatBitOrder:
"""
``FORMat:BORDer`` \n
Snippet: ``value: enums.FormatBitOrder = driver.formatPy.get_border()`` \n
Sets the endianess. The command is only relevant for raw data export in high definition mode (16 bit word length) .
"""
response = self._core.io.query_str_with_opc('FORMat:BORDer?')
return Conversions.str_to_scalar_enum(response, enums.FormatBitOrder)
[docs]
def set_border(self, bte_odr_bin_raw_fmt: enums.FormatBitOrder) -> None:
"""
``FORMat:BORDer`` \n
Snippet: ``driver.formatPy.set_border(bte_odr_bin_raw_fmt = enums.FormatBitOrder.LSBFirst)`` \n
Sets the endianess. The command is only relevant for raw data export in high definition mode (16 bit word length) .
:param bte_odr_bin_raw_fmt: LSB first: little endian, least significant byte first MSB first: big endian, most significant byte first
"""
param = Conversions.enum_scalar_to_str(bte_odr_bin_raw_fmt, enums.FormatBitOrder)
self._core.io.write_with_opc(f'FORMat:BORDer {param}')
# noinspection PyTypeChecker
[docs]
def get_bpattern(self) -> enums.BusDataFormat:
"""
``FORMat:BPATtern`` \n
Snippet: ``value: enums.BusDataFormat = driver.formatPy.get_bpattern()`` \n
Sets the number format for remote bit pattern queries on serial protocols.
"""
response = self._core.io.query_str_with_opc('FORMat:BPATtern?')
return Conversions.str_to_scalar_enum(response, enums.BusDataFormat)
[docs]
def set_bpattern(self, bt_patt_fmt: enums.BusDataFormat) -> None:
"""
``FORMat:BPATtern`` \n
Snippet: ``driver.formatPy.set_bpattern(bt_patt_fmt = enums.BusDataFormat.ASCII)`` \n
Sets the number format for remote bit pattern queries on serial protocols.
:param bt_patt_fmt: ASCII = ASCii
"""
param = Conversions.enum_scalar_to_str(bt_patt_fmt, enums.BusDataFormat)
self._core.io.write_with_opc(f'FORMat:BPATtern {param}')
def clone(self) -> 'FormatPyCls':
"""
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 = FormatPyCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group