qmi.instruments.timebase.dim3000
QMI Instrument driver for the TimeBase DIM3000 AOM driver.
Classes
Base class that gives all dataclasses the factory function. |
|
|
Dataclass containing device information. |
|
Options for available frequency deviation during frequency modulation. |
|
Dataclass containing initial data. |
|
Dataclass containing parameter data. |
|
Options for frequency sweep mode. |
|
QMI Instrument driver for the TimeBase DIM3000 AOM driver. |
- class qmi.instruments.timebase.dim3000.DIM3000SweepMode(value)
Options for frequency sweep mode.
- conjugate()
Returns self, the complex conjugate of any int.
- bit_length()
Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
- bit_count()
Number of ones in the binary representation of the absolute value of self.
Also known as the population count.
>>> bin(13) '0b1101' >>> (13).bit_count() 3
- to_bytes(length=1, byteorder='big', *, signed=False)
Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
- classmethod from_bytes(bytes, byteorder='big', *, signed=False)
Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Indicates whether two’s complement is used to represent the integer.
- as_integer_ratio()
Return integer ratio.
Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.
>>> (10).as_integer_ratio() (10, 1) >>> (-10).as_integer_ratio() (-10, 1) >>> (0).as_integer_ratio() (0, 1)
- real
the real part of a complex number
- imag
the imaginary part of a complex number
- numerator
the numerator of a rational number in lowest terms
- denominator
the denominator of a rational number in lowest terms
- class qmi.instruments.timebase.dim3000.DIM3000FMDeviation(value)
Options for available frequency deviation during frequency modulation.
- conjugate()
Returns self, the complex conjugate of any int.
- bit_length()
Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
- bit_count()
Number of ones in the binary representation of the absolute value of self.
Also known as the population count.
>>> bin(13) '0b1101' >>> (13).bit_count() 3
- to_bytes(length=1, byteorder='big', *, signed=False)
Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
- classmethod from_bytes(bytes, byteorder='big', *, signed=False)
Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Indicates whether two’s complement is used to represent the integer.
- as_integer_ratio()
Return integer ratio.
Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.
>>> (10).as_integer_ratio() (10, 1) >>> (-10).as_integer_ratio() (-10, 1) >>> (0).as_integer_ratio() (0, 1)
- real
the real part of a complex number
- imag
the imaginary part of a complex number
- numerator
the numerator of a rational number in lowest terms
- denominator
the denominator of a rational number in lowest terms
- class qmi.instruments.timebase.dim3000.DIM3000Base
Base class that gives all dataclasses the factory function.
- PATTERN: ClassVar[str]
RegEx that will be used for pattern matching on the string received from the device.
- classmethod from_string(string: str) T
Factory function for making a dataclass from a string received from device.
- class qmi.instruments.timebase.dim3000.DIM3000DevInfo(dev: str, hv: str, fv: str, fb: str, sn: str)
Dataclass containing device information.
- PATTERN: ClassVar[str] = '^Rdev:(?P<dev>\\w*)\\|Rhv:(?P<hv>\\w*)\\|Rfv:(?P<fv>\\w*)\\|Rfb:(?P<fb>\\w*)\\|Rsn:(?P<sn>\\w*)'
RegEx that will be used for pattern matching on the string received from the device.
- classmethod from_string(string: str) T
Factory function for making a dataclass from a string received from device.
- class qmi.instruments.timebase.dim3000.DIM3000InitData(amoffsmin: int, amoffsmax: int, amoffsnom: int, btstat: bool | None, adcoffs: int | None, init: bool)
Dataclass containing initial data.
- PATTERN: ClassVar[str] = '^Ramoffsmin:(?P<amoffsmin>-?\\d*)\\|Ramoffsmax:(?P<amoffsmax>-?\\d*)\\|Ramoffsnom:(?P<amoffsnom>-?\\d*)\\|(Rbtstat:(?P<btstat>\\d)\\|)?(Radcoffs:(?P<adcoffs>-?\\d*)\\|)?Rinit:(?P<init>\\d)'
RegEx that will be used for pattern matching on the string received from the device.
- classmethod from_string(string: str) T
Factory function for making a dataclass from a string received from device.
- class qmi.instruments.timebase.dim3000.DIM3000Parameters(freq: int, ampl: float, out: bool, swpm: DIM3000SweepMode, swps: int, swpp: int, swpf: int, swpt: int, fmon: bool, fmdev: DIM3000FMDeviation, plson: bool, plsfr: int, plsdt: int, ffreq: int, fampl: float, amoffs: int, pcbtemp: float, refstat: bool, reflev: int, vcclev: float)
Dataclass containing parameter data.
- PATTERN: ClassVar[str] = '^Rfreq:(?P<freq>\\d*)\\|Rampl:(?P<ampl>\\d*)\\|Rout:(?P<out>\\d*)\\|Rpmon:\\d*\\|Rpmfr:\\d*\\|Rpmd:\\d*\\|Rpmphc:\\d*\\|Rswpm:(?P<swpm>\\d*)\\|Rswps:(?P<swps>\\d*)\\|Rswpp:(?P<swpp>\\d*)\\|Rswpf:(?P<swpf>\\d*)\\|Rswpt:(?P<swpt>\\d*)\\|Rfmon:(?P<fmon>\\d*)\\|Rfmdev:(?P<fmdev>\\d*)\\|Rplson:(?P<plson>\\d*)\\|Rplsfr:(?P<plsfr>\\d*)\\|Rplsdt:(?P<plsdt>\\d*)\\|Rffreq:(?P<ffreq>\\d*)\\|Rfampl:(?P<fampl>\\d*)\\|Ramoffs:(?P<amoffs>-?\\d*)\\|Rpcbtemp:(?P<pcbtemp>\\d*)\\|Rrefstat:(?P<refstat>\\d*)\\|Rreflev:(?P<reflev>-?\\d*)\\|Rvcclev:(?P<vcclev>\\d*)'
RegEx that will be used for pattern matching on the string received from the device.
- classmethod from_string(string: str) T
Factory function for making a dataclass from a string received from device.
- class qmi.instruments.timebase.dim3000.TimeBase_DIM3000(context: QMI_Context, name: str, transport: str)
QMI Instrument driver for the TimeBase DIM3000 AOM driver.
- open() None
Connect to the instrument hardware.
When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.
Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call
super().open()as a last statement.
- close() None
Close the connection to the instrument hardware and release associated resources.
When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.
Subclasses can extend this method if they have specific resources to close. If they do, they should call
super().close()as a last statement.
- get_idn() QMI_InstrumentIdentification
Get the device info in the QMI_InstrumentIdentification format.
- get_device_info() DIM3000DevInfo
Get the device info from the device.
- get_init_data() DIM3000InitData
Get initial data from the device.
- get_parameters() DIM3000Parameters
Get parameters from the device.
- set_output_frequency(freq_hz: int) None
Set the output frequency in Hz.
- set_output_amplitude(ampl_dbm: float) None
Set the output amplitude in dBm.
- set_sweep_mode(swpm: DIM3000SweepMode) None
Set the sweep mode. See DIM3000SweepMode.
- set_sweep_start_frequency(swps_hz: int) None
Set the sweep start frequency in Hz.
- set_sweep_stop_frequency(swpp_hz: int) None
Set the sweep stop frequency in Hz.
- set_sweep_step_frequency(swpf_hz: int) None
Set the sweep step frequency in Hz.
- set_sweep_step_time(swpt_ns: int) None
Set the sweep step time in nanoseconds.
- set_fm_input(fmon: bool) None
Set FM input.
- enable_fm_input() None
Enable FM input.
- disable_fm_input() None
Disable FM input.
- set_fm_deviation(fmdev: DIM3000FMDeviation) None
Set FM deviation. See DIM3000FMDeviation.
- set_pulse_mode(plson: bool) None
Set pulse mode.
- enable_pulse_mode() None
Enable pulse mode.
- disable_pulse_mode() None
Disable pulse mode.
- set_pulse_frequency(plsfr_hz: int) None
Set the pulse frequency in Hz.
- set_pulse_duty_cycle(plsdt: int) None
Set the pulse duty cycle [1-99].
- set_fsk_frequency(ffreq_hz: int) None
Set the FSK frequency in Hz.
- set_fsk_amplitude(fampl_dbm: float) None
Set the FSK amplitude in dBm.
- force_unlock() None
Forcefully unlock the remote object.
This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.
Use this with care.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- classmethod get_category() str | None
Return the optional name of the category this object belongs to.
A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.
- get_name() str
Return the name of this object.
- Returns:
name attribute.
- get_signals() list[SignalDescription]
Return a list of signals that can be published by this object.
- Returns:
List consisting of qmi_signals attributes.
- is_locked() bool
Query if the remote object is locked.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- is_open() bool
Return True if the instrument is open (ready for interaction).
- lock(timeout: float = 0.0, lock_token: str | None = None) bool
Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.
If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- release_rpc_object() None
Give a warning if the instrument is removed while still open.
- set_am_offset(amoffs: int) None
Set the AM offset.
- unlock(lock_token: str | None = None) bool
Unlock the remote object.
Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.