from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Types import DataType
from ......Internal.ArgSingleList import ArgSingleList
from ......Internal.ArgSingle import ArgSingle
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DpoperatorCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dpoperator", core, parent)
[docs]
def set(self, search: str, dat_posi_optor: enums.DataIndexOperator) -> None:
"""
``SEARch:TRIGger:CAN:FDATa:DPOPerator`` \n
Snippet: ``driver.search.trigger.can.fdata.dpoperator.set(search = 'abc', dat_posi_optor = enums.DataIndexOperator.ANY)`` \n
Sets the operator for the data position if DLC ≥ 9. You can define an exact position, or a position range. The setting is
available in CAN FD option R&S RTP-K9.
:param search: ANY | OFF | EQUal | GETHan | INRange | RANGe \n
- ANY = OFF: The data position is not relevant for the search.
- EQUal | GETHan: Equal, Greater or equal than. These conditions require one data position to be set with SEARch:TRIGger:CAN:FDATa:DPOSition.
- INRange = RANGe: In range: Set the minimum and maximum value of the range with SEARch:TRIGger:CAN:FDATa:DPOSition and SEARch:TRIGger:CAN:FDATa:DPTO.
:param dat_posi_optor: String with the search name
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('dat_posi_optor', dat_posi_optor, DataType.Enum, enums.DataIndexOperator))
self._core.io.write(f'SEARch:TRIGger:CAN:FDATa:DPOPerator {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self, search: str) -> enums.DataIndexOperator:
"""
``SEARch:TRIGger:CAN:FDATa:DPOPerator`` \n
Snippet: ``value: enums.DataIndexOperator = driver.search.trigger.can.fdata.dpoperator.get(search = 'abc')`` \n
Sets the operator for the data position if DLC ≥ 9. You can define an exact position, or a position range. The setting is
available in CAN FD option R&S RTP-K9.
:param search: ANY | OFF | EQUal | GETHan | INRange | RANGe \n
- ANY = OFF: The data position is not relevant for the search.
- EQUal | GETHan: Equal, Greater or equal than. These conditions require one data position to be set with SEARch:TRIGger:CAN:FDATa:DPOSition.
- INRange = RANGe: In range: Set the minimum and maximum value of the range with SEARch:TRIGger:CAN:FDATa:DPOSition and SEARch:TRIGger:CAN:FDATa:DPTO.
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:CAN:FDATa:DPOPerator? {param}')
return Conversions.str_to_scalar_enum(response, enums.DataIndexOperator)