qmi.core.context_singleton.get_instrument
- qmi.core.context_singleton.get_instrument(instrument_name: str, auto_connect: bool = False, host_port: str | None = None) Any
Return a proxy for the specified instrument.
The instrument may exist either in the local context, or in a peer context.
- Parameters:
instrument_name – Instrument name, formatted as
"<context_name>.<instrument_name>".auto_connect – If True, connect automatically to the instrument peer.
host_port – Optional host:port string pattern to guide the auto_connect.
- Returns:
A proxy for the specified instrument.
- Raises:
QMI_NoActiveContextException – If there is no active QMI context present.