from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("state", core, parent)
[docs]
def set(self, state: enums.OffState) -> None:
"""
``[SENSe]:LIST:POWer:STATe`` \n
Snippet: ``driver.sense.listPy.power.state.set(state = enums.OffState.OFF)`` \n
Turns the List Evaluation off.
:param state: OFF | 0
"""
param = Conversions.enum_scalar_to_str(state, enums.OffState)
self._core.io.write(f'SENSe:LIST:POWer:STATe {param}')
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.OffState:
"""
``[SENSe]:LIST:POWer:STATe`` \n
Snippet: ``value: enums.OffState = driver.sense.listPy.power.state.get()`` \n
Turns the List Evaluation off.
:return: state: OFF | 0
"""
response = self._core.io.query_str(f'SENSe:LIST:POWer:STATe?')
return Conversions.str_to_scalar_enum(response, enums.OffState)