from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CasReadCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("casRead", core, parent)
[docs]
def set(self, cas_latency_read: float, bus=repcap.Bus.Default) -> None:
"""
``BUS<*>:DDR:CASRead`` \n
Snippet: ``driver.bus.ddr.casRead.set(cas_latency_read = 1.0, bus = repcap.Bus.Default)`` \n
Sets the CAS read latency (CL) . It refers to the number of clock cycles that elapse between the time a read command is
issued to the memory and the time the requested data is available on the output pins.
:param cas_latency_read: 0 to 4.29497E+9
:param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus')
"""
param = Conversions.decimal_value_to_str(cas_latency_read)
bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus)
self._core.io.write_with_opc(f'BUS{bus_cmd_val}:DDR:CASRead {param}')
[docs]
def get(self, bus=repcap.Bus.Default) -> float:
"""
``BUS<*>:DDR:CASRead`` \n
Snippet: ``value: float = driver.bus.ddr.casRead.get(bus = repcap.Bus.Default)`` \n
Sets the CAS read latency (CL) . It refers to the number of clock cycles that elapse between the time a read command is
issued to the memory and the time the requested data is available on the output pins.
:param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus')
:return: cas_latency_read: 0 to 4.29497E+9
"""
bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus)
response = self._core.io.query_str_with_opc(f'BUS{bus_cmd_val}:DDR:CASRead?')
return Conversions.str_to_float(response)