plestylib.device.base_tcp_scpi_device
=====================================

.. py:module:: plestylib.device.base_tcp_scpi_device


Classes
-------

.. autoapisummary::

   plestylib.device.base_tcp_scpi_device.BaseTCPScpiDevice


Module Contents
---------------

.. py:class:: BaseTCPScpiDevice(host: str, port: int, timeout: int = 5, write_termination='\r\n', read_termination='\r\n', baud_rate: int = None, op_schema=None, param_schema=None)

   Bases: :py:obj:`plestylib.device.base_device_sync.BaseDeviceSyncModel`


   A base class for TCP SCPI devices that provides common functionality for connecting to and communicating with instruments using the TCP 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.

   :param solver: Callable used to send a message dictionary and
                  return a response dictionary.


   .. py:attribute:: host


   .. py:attribute:: port


   .. py:attribute:: timeout
      :value: 5



   .. py:attribute:: write_termination
      :value: Multiline-String

      .. raw:: html

         <details><summary>Show Value</summary>

      .. code-block:: python

         """
         """

      .. raw:: html

         </details>




   .. py:attribute:: read_termination
      :value: Multiline-String

      .. raw:: html

         <details><summary>Show Value</summary>

      .. code-block:: python

         """
         """

      .. raw:: html

         </details>




   .. py:attribute:: baud_rate
      :value: None



   .. py:method:: init(main=None)

      Initialize the device. This should be called before any other operations.



   .. py:method:: connect()

      Placeholder method for connecting to the device.



   .. py:method:: disconnect()

      Placeholder method for disconnecting from the device.



   .. py:method:: _write_(key: str, value: Any)

      Placeholder method for writing a command to the device.



   .. py:method:: _query_(key)

      Placeholder method for querying the device.



   .. py:method:: query_range(key) -> list


   .. py:method:: identity()

      Query the device for its identity string.



   .. py:method:: check_errors()

      Query the device for any error messages.



   .. py:method:: check_operatability()

      Check if the device is currently operatable (connected and responsive).



   .. py:method:: reset()

      Execute device reset



   .. py:method:: event_status()

      Query the event status register



