Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.markers = Namespace.repeat(self.driver.marker.count, IviMarkers(self))(IviMarker)
class IviTriggerMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if 'IviSpecAnTrigger' in driver_capabilities:
bases += (TriggerExtension.trigger, )
if 'IviSpecAnExternalTrigger' in driver_capabilities:
bases += (ExternalTriggerExtension.trigger, )
if 'IviSpecAnVideoTrigger' in driver_capabilities:
bases += (VideoTriggerExtension.trigger, )
return super().__new__(mcs, name, bases, attrs)
class IviTrigger(QObject, metaclass=IviTriggerMetaclass):
external = Namespace(ExternalTriggerExtension.trigger.external)
self.trigger = Namespace(IviTrigger)
if 'IviSpecAnDisplay' in driver_capabilities:
self.display = Namespace(DisplayExtension.display)
if 'IviSpecAnExternalMixer' in driver_capabilities:
self.external_mixer = Namespace(ExternalMixerExtension.external_mixer)
if 'IviSpecAnPreselector' in driver_capabilities:
self.preselector = Namespace(PreselectorExtension.preselector)
class IviAcquisitionMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.scope.Interpolation in driver_capabilities:
bases += (InterpolationExtension.acquisition, )
if ivi.scope.AverageAcquisition in driver_capabilities:
bases += (AverageAcquisitionExtension.acquisition, )
if ivi.scope.MinMaxWaveform in driver_capabilities:
bases += (MinMaxWaveformExtension.acquisition, )
if ivi.scope.SampleMode in driver_capabilities:
bases += (SampleModeExtension.acquisition, )
return super().__new__(mcs, name, bases, attrs)
class IviAcquisition(_Scope.acquisition, metaclass=IviAcquisitionMetaclass):
pass
self.acquisition = Namespace(IviAcquisition)
# dynamic measurement class generator
class IviMeasurementMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.scope.AutoSetup in driver_capabilities:
bases += (AutoSetupExtension.measurement, )
return super().__new__(mcs, name, bases, attrs)
class IviMeasurement(_Scope.measurement, metaclass=IviMeasurementMetaclass):
pass
self.measurement = Namespace(IviMeasurement)
# dynamic trigger class generator
class IviTriggerMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.scope.GlitchTrigger in driver_capabilities:
bases += (GlitchTriggerExtension.trigger, )
if ivi.scope.WidthTrigger in driver_capabilities:
bases += (WidthTriggerExtension.trigger, )
if ivi.scope.AcLineTrigger in driver_capabilities:
bases += (AcLineTriggerExtension.trigger, )
if ivi.scope.ContinuousAcquisition in driver_capabilities:
bases += (ContinuousAcquisitionExtension.trigger, )
if ivi.scope.TriggerModifier in driver_capabilities:
bases += (TriggerModifierExtension.trigger, )
return super().__new__(mcs, name, bases, attrs)
class IviTrigger(_Scope.trigger, metaclass=IviTriggerMetaclass):
pass
self.trigger = Namespace(IviTrigger)
class IviChannelMeasurementMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.scope.WaveformMeasurement in driver_capabilities:
bases += (WaveformMeasurementExtension.channels.measurement, )
if ivi.scope.MinMaxWaveform in driver_capabilities:
bases += (MinMaxWaveformExtension.channels.measurement, )
return super().__new__(mcs, name, bases, attrs)
class IviChannelMeasurement(_Scope.channels.measurement,
metaclass=IviChannelMeasurementMetaclass):
pass
class IviChannelMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.scope.ProbeAutoSense in driver_capabilities:
class IviArbitrarySequence(QObject, metaclass=IviArbitrarySequenceMetaclass):
pass
class IviArbitraryMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.fgen.ArbDataMask in driver_capabilities:
bases += (ArbDataMaskExtension.arbitrary, )
if ivi.fgen.ArbWfmBinary in driver_capabilities:
bases += (ArbWfmBinaryExtension.arbitrary, )
return super().__new__(mcs, name, bases, attrs)
class IviArbitrary(QObject, metaclass=IviArbitraryMetaclass):
waveform = Namespace(IviArbitraryWaveform)
sequence = Namespace(IviArbitrarySequence)
self.arbitrary = Namespace(IviArbitrary)
class IviTriggerMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.fgen.StartTrigger in driver_capabilities:
bases += (StartTriggerExtension.trigger, )
if ivi.fgen.StopTrigger in driver_capabilities:
bases += (StopTriggerExtension.trigger, )
if ivi.fgen.HoldTrigger in driver_capabilities:
bases += (HoldTriggerExtension.trigger, )
if ivi.fgen.ResumeTrigger in driver_capabilities:
bases += (ResumeTriggerExtension.trigger, )
if ivi.fgen.AdvanceTrigger in driver_capabilities:
bases += (AdvanceTriggerExtension.trigger, )
if ivi.fgen.InternalTrigger in driver_capabilities:
bases += (InternalTriggerExtension.trigger, )
return super().__new__(mcs, name, bases, attrs)
return super().__new__(mcs, name, bases, attrs)
class IviChannelMeasurement(_Scope.channels.measurement,
metaclass=IviChannelMeasurementMetaclass):
pass
class IviChannelMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.scope.ProbeAutoSense in driver_capabilities:
bases += (ProbeAutoSenseExtension.channels, )
return super().__new__(mcs, name, bases, attrs)
class IviChannel(_Scope.channels, metaclass=IviChannelMetaclass):
measurement = Namespace(IviChannelMeasurement)
self.channels = Namespace.repeat(self.driver._channel_count)(IviChannel)
if ivi.scope.WaveformMeasurement in driver_capabilities:
self.reference_level = Namespace(WaveformMeasurementExtension.reference_level)
bases += (HoldTriggerExtension.trigger, )
if ivi.fgen.ResumeTrigger in driver_capabilities:
bases += (ResumeTriggerExtension.trigger, )
if ivi.fgen.AdvanceTrigger in driver_capabilities:
bases += (AdvanceTriggerExtension.trigger, )
if ivi.fgen.InternalTrigger in driver_capabilities:
bases += (InternalTriggerExtension.trigger, )
return super().__new__(mcs, name, bases, attrs)
class IviTrigger(QObject, metaclass=IviTriggerMetaclass):
pass
self.trigger = Namespace(IviTrigger)
if ivi.fgen.DataMarker in driver_capabilities:
self.data_markers = Namespace.repeat(self.driver._data_marker_count)(DataMarkerExtension.data_markers)
if ivi.fgen.SparseMarker in driver_capabilities:
self.sparse_markers = Namespace.repeat(self.driver._sparse_marker_count)(SparseMarkerExtension.sparse_markers)
if ivi.fgen.ModulateFM in driver_capabilities:
bases += (ModulateFMExtension.outputs, )
if ivi.fgen.TerminalConfiguration in driver_capabilities:
bases += (TerminalConfigurationExtension.outputs, )
return super().__new__(mcs, name, bases, attrs)
class IviOutput(QObject, metaclass=IviOutputMetaclass):
arbitrary = Namespace(IviOutputArbitrary)
trigger = Namespace(IviOutputTrigger)
self.outputs = Namespace.repeat(self.driver._output_count)(IviOutput)
if ivi.fgen.ModulateAM in driver_capabilities:
self.am = Namespace(ModulateAMExtension.am)
if ivi.fgen.ModulateFM in driver_capabilities:
self.fm = Namespace(ModulateFMExtension.fm)
if ivi.fgen.SampleClock in driver_capabilities:
self.sample_clock = Namespace(SampleClockExtension.sample_clock)
class IviArbitraryWaveformMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.fgen.ArbChannelWfm in driver_capabilities:
bases += (ArbChannelWfmExtension.arbitrary.waveform, )
if ivi.fgen.ArbWfmBinary in driver_capabilities:
bases += (ArbWfmBinaryExtension.arbitrary.waveform, )
return super().__new__(mcs, name, bases, attrs)
class IviArbitraryWaveform(QObject, metaclass=IviArbitraryWaveformMetaclass):
pass
class IviArbitrarySequenceMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
bases = bases + (_FGen.outputs, )
if ivi.fgen.StdFunc in driver_capabilities:
bases += (StdFuncExtension.outputs, )
if ivi.fgen.Burst in driver_capabilities:
bases += (BurstExtension.outputs, )
if ivi.fgen.ModulateAM in driver_capabilities:
bases += (ModulateAMExtension.outputs, )
if ivi.fgen.ModulateFM in driver_capabilities:
bases += (ModulateFMExtension.outputs, )
if ivi.fgen.TerminalConfiguration in driver_capabilities:
bases += (TerminalConfigurationExtension.outputs, )
return super().__new__(mcs, name, bases, attrs)
class IviOutput(QObject, metaclass=IviOutputMetaclass):
arbitrary = Namespace(IviOutputArbitrary)
trigger = Namespace(IviOutputTrigger)
self.outputs = Namespace.repeat(self.driver._output_count)(IviOutput)
if ivi.fgen.ModulateAM in driver_capabilities:
self.am = Namespace(ModulateAMExtension.am)
if ivi.fgen.ModulateFM in driver_capabilities:
self.fm = Namespace(ModulateFMExtension.fm)
if ivi.fgen.SampleClock in driver_capabilities:
self.sample_clock = Namespace(SampleClockExtension.sample_clock)
class IviArbitraryWaveformMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.fgen.ArbChannelWfm in driver_capabilities:
bases += (ArbChannelWfmExtension.arbitrary.waveform, )
if ivi.fgen.ArbWfmBinary in driver_capabilities:
bases += (ArbWfmBinaryExtension.arbitrary.waveform, )
if ivi.fgen.TerminalConfiguration in driver_capabilities:
bases += (TerminalConfigurationExtension.outputs, )
return super().__new__(mcs, name, bases, attrs)
class IviOutput(QObject, metaclass=IviOutputMetaclass):
arbitrary = Namespace(IviOutputArbitrary)
trigger = Namespace(IviOutputTrigger)
self.outputs = Namespace.repeat(self.driver._output_count)(IviOutput)
if ivi.fgen.ModulateAM in driver_capabilities:
self.am = Namespace(ModulateAMExtension.am)
if ivi.fgen.ModulateFM in driver_capabilities:
self.fm = Namespace(ModulateFMExtension.fm)
if ivi.fgen.SampleClock in driver_capabilities:
self.sample_clock = Namespace(SampleClockExtension.sample_clock)
class IviArbitraryWaveformMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.fgen.ArbChannelWfm in driver_capabilities:
bases += (ArbChannelWfmExtension.arbitrary.waveform, )
if ivi.fgen.ArbWfmBinary in driver_capabilities:
bases += (ArbWfmBinaryExtension.arbitrary.waveform, )
return super().__new__(mcs, name, bases, attrs)
class IviArbitraryWaveform(QObject, metaclass=IviArbitraryWaveformMetaclass):
pass
class IviArbitrarySequenceMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.fgen.ArbSeqDepth in driver_capabilities:
bases += (ArbSeqDepthExtension.arbitrary.sequence, )
class IviOutputArbitraryWaveform(QObject, metaclass=IviOutputArbitraryWaveformMetaclass):
pass
class IviOutputArbitraryMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.fgen.ArbWfm in driver_capabilities:
bases += (ArbWfmExtension.outputs.arbitrary, )
if ivi.fgen.ArbFrequency in driver_capabilities:
bases += (ArbFrequencyExtension.outputs.arbitrary, )
if ivi.fgen.ArbSeq in driver_capabilities:
bases += (ArbSeqExtension.outputs.arbitrary, )
return super().__new__(mcs, name, bases, attrs)
class IviOutputArbitrary(QObject, metaclass=IviOutputArbitraryMetaclass):
waveform = Namespace(IviOutputArbitraryWaveform)
class IviOutputTriggerMetaclass(QtInterfaceMetaclass):
def __new__(mcs, name, bases, attrs):
if ivi.fgen.StartTrigger in driver_capabilities:
bases += (StartTriggerExtension.outputs.trigger, )
if ivi.fgen.StopTrigger in driver_capabilities:
bases += (StopTriggerExtension.outputs.trigger, )
if ivi.fgen.HoldTrigger in driver_capabilities:
bases += (HoldTriggerExtension.outputs.trigger, )
if ivi.fgen.ResumeTrigger in driver_capabilities:
bases += (ResumeTriggerExtension.outputs.trigger, )
if ivi.fgen.AdvanceTrigger in driver_capabilities:
bases += (AdvanceTriggerExtension.outputs.trigger, )
return super().__new__(mcs, name, bases, attrs)
class IviOutputTrigger(QObject, metaclass=IviOutputTriggerMetaclass):