plestylib.solver.scpi
=====================

.. py:module:: plestylib.solver.scpi


Classes
-------

.. autoapisummary::

   plestylib.solver.scpi.SCPISolver


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

.. py:class:: SCPISolver

   Bases: :py:obj:`plestylib.solver.CmdSolver`


   Build SCPI command strings for parameter writes and queries.

   This solver converts ``ConfigParameter.command`` values into SCPI-compliant
   command strings and handles common Python value types for write operations.


   .. py:method:: get_write_cmd(cfg_param, value)

      Build a SCPI write command for the given parameter value.

      :param cfg_param: Parameter metadata containing a SCPI command base.
      :param value: Value to serialize into command payload.

      :returns: A formatted SCPI write command string, or ``None`` when no command
                is defined on ``cfg_param``.

      .. rubric:: Notes

      Supported value types are ``str``, ``int``, ``float``, ``bool``,
      ``list``, and ``tuple``. Booleans are converted to ``1``/``0`` and
      sequences are comma-joined.



   .. py:method:: get_query_cmd(cfg_param)

      Build a SCPI query command (``?`` suffix) for a parameter.

      :param cfg_param: Parameter metadata containing a SCPI command base.

      :returns: Query command string like ``<CMD>?``, or ``None`` if undefined.



   .. py:method:: get_param_min_cmd(cfg_param: plestylib.solver.ConfigParameter) -> str | None

      Build a SCPI command to query the parameter minimum value.

      :param cfg_param: Parameter metadata containing a SCPI command base.

      :returns: Query command string like ``<CMD>:MIN?``, or ``None`` if undefined.



   .. py:method:: get_param_max_cmd(cfg_param: plestylib.solver.ConfigParameter) -> str | None

      Build a SCPI command to query the parameter maximum value.

      :param cfg_param: Parameter metadata containing a SCPI command base.

      :returns: Query command string like ``<CMD>:MAX?``, or ``None`` if undefined.



