microsoft / microsoft/Qcodes

Connect message does not work for Instrument with no get_idn command defined

Open
#755 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
459
Forks
359
Avg merge
3d 6h
Merged PRs (30d)
73

Description

When using instruments that do not have an "IDN" method the Instrument.connect_message does not work.

I propose resolving this by adding the following method to the Instrument base class.

    def get_idn(self):
        return {'driver': str(self.__class__), 'name': self.name}

I think it is quite useful to have this method be part of the base class as we also want to see this message for e.g., Dummy instruments or things like meta instruments.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Instrument base class and the Instrument.connect_message implementation. Check how connect_message handles instruments without get_idn, then verify the fallback for Dummy instruments and meta instruments produces the proposed driver and name information.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.