plestylib.solver.scpi#
Classes#
Build SCPI command strings for parameter writes and queries. |
Module Contents#
- class plestylib.solver.scpi.SCPISolver#
Bases:
plestylib.solver.CmdSolverBuild SCPI command strings for parameter writes and queries.
This solver converts
ConfigParameter.commandvalues into SCPI-compliant command strings and handles common Python value types for write operations.- get_write_cmd(cfg_param, value)#
Build a SCPI write command for the given parameter value.
- Parameters:
cfg_param – Parameter metadata containing a SCPI command base.
value – Value to serialize into command payload.
- Returns:
A formatted SCPI write command string, or
Nonewhen no command is defined oncfg_param.
Notes
Supported value types are
str,int,float,bool,list, andtuple. Booleans are converted to1/0and sequences are comma-joined.
- get_query_cmd(cfg_param)#
Build a SCPI query command (
?suffix) for a parameter.- Parameters:
cfg_param – Parameter metadata containing a SCPI command base.
- Returns:
Query command string like
<CMD>?, orNoneif undefined.
- get_param_min_cmd(cfg_param: plestylib.solver.ConfigParameter) str | None#
Build a SCPI command to query the parameter minimum value.
- Parameters:
cfg_param (plestylib.solver.ConfigParameter) – Parameter metadata containing a SCPI command base.
- Returns:
Query command string like
<CMD>:MIN?, orNoneif undefined.- Return type:
str | None
- get_param_max_cmd(cfg_param: plestylib.solver.ConfigParameter) str | None#
Build a SCPI command to query the parameter maximum value.
- Parameters:
cfg_param (plestylib.solver.ConfigParameter) – Parameter metadata containing a SCPI command base.
- Returns:
Query command string like
<CMD>:MAX?, orNoneif undefined.- Return type:
str | None