[docs]classFunctionCls:"""Function commands group definition. 2 total commands, 1 Subgroups, 1 group commands"""def__init__(self,core:Core,parent):self._core=coreself._cmd_group=CommandsGroup("function",core,parent)@propertydefauto(self):"""auto commands group. 0 Sub-classes, 1 commands."""ifnothasattr(self,'_auto'):from.AutoimportAutoClsself._auto=AutoCls(self._core,self._cmd_group)returnself._auto
[docs]defset(self,detector:enums.Detector,window=repcap.Window.Default,trace=repcap.Trace.Default)->None:"""SCPI: [SENSe][:WINDow<n>]:DETector<t>[:FUNCtion] \n Snippet: driver.applications.k14Xnr5G.sense.window.detector.function.set(detector = enums.Detector.APEak, window = repcap.Window.Default, trace = repcap.Trace.Default) \n Defines the trace detector to be used for trace analysis. For details see 'Sweep time and detector'. \n :param detector: NEGative Negative peak POSitive Positive peak SAMPle First value detected per trace point AVERage Average :param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Window') :param trace: optional repeated capability selector. Default value: Tr1 (settable in the interface 'Detector') """param=Conversions.enum_scalar_to_str(detector,enums.Detector)window_cmd_val=self._cmd_group.get_repcap_cmd_value(window,repcap.Window)trace_cmd_val=self._cmd_group.get_repcap_cmd_value(trace,repcap.Trace)self._core.io.write(f'SENSe:WINDow{window_cmd_val}:DETector{trace_cmd_val}:FUNCtion {param}')
# noinspection PyTypeChecker
[docs]defget(self,window=repcap.Window.Default,trace=repcap.Trace.Default)->enums.Detector:"""SCPI: [SENSe][:WINDow<n>]:DETector<t>[:FUNCtion] \n Snippet: value: enums.Detector = driver.applications.k14Xnr5G.sense.window.detector.function.get(window = repcap.Window.Default, trace = repcap.Trace.Default) \n Defines the trace detector to be used for trace analysis. For details see 'Sweep time and detector'. \n :param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Window') :param trace: optional repeated capability selector. Default value: Tr1 (settable in the interface 'Detector') :return: detector: NEGative Negative peak POSitive Positive peak SAMPle First value detected per trace point AVERage Average"""window_cmd_val=self._cmd_group.get_repcap_cmd_value(window,repcap.Window)trace_cmd_val=self._cmd_group.get_repcap_cmd_value(trace,repcap.Trace)response=self._core.io.query_str(f'SENSe:WINDow{window_cmd_val}:DETector{trace_cmd_val}:FUNCtion?')returnConversions.str_to_scalar_enum(response,enums.Detector)
defclone(self)->'FunctionCls':"""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=FunctionCls(self._core,self._cmd_group.parent)self._cmd_group.synchronize_repcaps(new_group)returnnew_group