microsoft / Qcodes

Modular data acquisition framework
http://microsoft.github.io/Qcodes/
MIT License
348 stars 319 forks source link

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

Open AdriaanRol opened 7 years ago

AdriaanRol commented 7 years ago

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.

AdriaanRol commented 7 years ago

(nvm)