mpylab.device.nw_rs_zvl_virtual module¶
Virtual R&S ZVL driver used for UI and workflow testing without hardware.
- class mpylab.device.nw_rs_zvl_virtual.NETWORKANALYZER(SearchPaths=None)
Bases:
NETWORKANALYZERIn-memory simulation of the ZVL network analyzer.
- Parameters:
SearchPaths (sequence of path-like, optional) – Directories searched for referenced configuration files.
- GetDescription()
Return the virtual instrument identification without bus access.
- Returns:
Status code and identification string.
- Return type:
tuple of (int, str)
- Init(ini=None, channel=None, ignore_bus=None)
Initialize the virtual analyzer without opening a bus.
- Parameters:
ini (path-like or file-like, optional) – INI configuration source.
channel (int, optional) – One-based configuration channel number. Defaults to channel 1.
- Returns:
Zero on success, otherwise the initialization error status.
- Return type:
int
- query(cmd, tmpl=None)
Write a virtual SCPI query and return its response.
- Parameters:
cmd (str) – Query command to process.
tmpl (str, optional) – Regular expression used to parse named response fields.
- Returns:
Raw or parsed response.
- Return type:
str or dict
- read(tmpl=None)
Return or parse the last virtual SCPI response.
- Parameters:
tmpl (str, optional) – Regular expression used to parse named response fields.
- Returns:
Raw response without tmpl, otherwise the matched named fields.
- Return type:
str or dict
- write(cmd)
Handle a small SCPI-like command subset without a hardware bus.
- Parameters:
cmd (str) – Command to process.
- Returns:
Zero on success.
- Return type:
int
- mpylab.device.nw_rs_zvl_virtual.main()
Run a small local smoke test against the virtual ZVL driver.