Bases: _AbstractDeviceVISAWriteQueryControl, ABC
flowchart LR
tm_devices.driver_mixins.shared_implementations.common_tsp_error_check_mixin.CommonTSPErrorCheckMixin[CommonTSPErrorCheckMixin]
tm_devices.driver_mixins.device_control._abstract_device_visa_write_query_control._AbstractDeviceVISAWriteQueryControl[_AbstractDeviceVISAWriteQueryControl]
tm_devices.driver_mixins.device_control._abstract_device_control._AbstractDeviceControl[_AbstractDeviceControl]
tm_devices.driver_mixins.device_control._abstract_device_visa_write_query_control._AbstractDeviceVISAWriteQueryControl --> tm_devices.driver_mixins.shared_implementations.common_tsp_error_check_mixin.CommonTSPErrorCheckMixin
tm_devices.driver_mixins.device_control._abstract_device_control._AbstractDeviceControl --> tm_devices.driver_mixins.device_control._abstract_device_visa_write_query_control._AbstractDeviceVISAWriteQueryControl
click tm_devices.driver_mixins.shared_implementations.common_tsp_error_check_mixin.CommonTSPErrorCheckMixin href "" "tm_devices.driver_mixins.shared_implementations.common_tsp_error_check_mixin.CommonTSPErrorCheckMixin"
click tm_devices.driver_mixins.device_control._abstract_device_visa_write_query_control._AbstractDeviceVISAWriteQueryControl href "" "tm_devices.driver_mixins.device_control._abstract_device_visa_write_query_control._AbstractDeviceVISAWriteQueryControl"
click tm_devices.driver_mixins.device_control._abstract_device_control._AbstractDeviceControl href "" "tm_devices.driver_mixins.device_control._abstract_device_control._AbstractDeviceControl"
A mixin class that contains common methods for checking the TSP device for errors.
Important
Any class that inherits this mixin must also inherit the
TSPControl mixin in
order to have access to the methods required by this class.
| Parameters: |
-
config_entry
(DeviceConfigEntry)
–
A config entry object parsed by the DMConfigParser.
-
verbose
(bool)
–
A boolean indicating if verbose output should be printed. If True,
communication printouts will be logged with a level of INFO. If False,
communication printouts will be logged with a level of DEBUG.
|
device_type
abstractmethod
cached
property
Return a string representing the device type.
ip_address
abstractmethod
cached
property
The IP address of the device.
manufacturer
abstractmethod
cached
property
Return the manufacturer of the device.
model
abstractmethod
cached
property
Return the full model of the device.
name_and_alias
abstractmethod
cached
property
A string containing the device name and alias.
serial
abstractmethod
cached
property
Return the serial number of the device.
sw_version
abstractmethod
cached
property
Return the software version of the device.
expect_esr
expect_esr(
esr: int, error_messages: tuple[str, ...] = (), *, use_regex_match: bool = False
) -> bool
Checks for the expected esr value and queued error messages.
| Parameters: |
-
esr
(int)
–
Expected *ESR? value as a decimal-weighted integer.
-
error_messages
(tuple[str, ...], default:
()
)
–
Expected error buffer messages in a tuple.
-
use_regex_match
(bool, default:
False
)
–
A boolean indicating if the messages should be compared
using regular expressions. Does not affect the esr value comparison.
|
| Returns: |
-
bool
–
Boolean True when all checks pass. False means the checks failed (however,
failing a check will always result in an AssertionError being raised, so the
result will not really be usable).
|
| Raises: |
-
AssertionError
–
Indicating that the device’s error code and messages don’t match the
expected values.
|
write
abstractmethod
write(*args: Any, **kwargs: Any) -> None