plestylib.device.base_visa_scpi_device#
Classes#
A base class for VISA SCPI devices that provides common functionality for connecting to and communicating with instruments using the VISA protocol and SCPI commands. |
Module Contents#
- class plestylib.device.base_visa_scpi_device.BaseVisaScpiDevice(address: str, timeout: int = 5000, write_termination='\n', read_termination='\n', baud_rate: int = None, op_schema=None, param_schema=None)#
Bases:
plestylib.device.base_device_sync.BaseDeviceSyncModelA base class for VISA SCPI devices that provides common functionality for connecting to and communicating with instruments using the VISA protocol and SCPI commands.
This class is designed to be extended by specific device classes that implement the details of the SCPI commands for each instrument. It provides methods for connecting to the instrument, sending SCPI commands, and handling responses, as well as error handling and resource management.
- Parameters:
solver – Callable used to send a message dictionary and return a response dictionary.
address (str)
timeout (int)
baud_rate (int)
- timeout = 5000#
- write_termination = Multiline-String#
Show Value
""" """
- read_termination = Multiline-String#
Show Value
""" """
- baud_rate = None#
- init(main=None)#
Initialize the device. This should be called before any other operations.
- connect()#
Placeholder method for connecting to the device.
- disconnect()#
Placeholder method for disconnecting from the device.
- _write_(key: str, value: Any)#
Placeholder method for writing a command to the device.
- Parameters:
key (str)
value (Any)
- _query_(key)#
Placeholder method for querying the device.
- query_range(key) list#
- Return type:
list
- identity()#
Query the device for its identity string.
- check_errors()#
Query the device for any error messages.
- check_operatability()#
Check if the device is currently operatable (connected and responsive).