pyvisa / pyvisa-sim

A PyVISA backend that simulates a large part of the "Virtual Instrument Software Architecture" (VISA_)
https://pyvisa-sim.readthedocs.io/en/latest/
MIT License
70 stars 39 forks source link

Add support for channel #27

Closed MatthieuDartiailh closed 9 years ago

MatthieuDartiailh commented 9 years ago

This adds a 'channels' keyword to the parser. When declaring channel, for each channel one can declare the active ids ('ids') (which can be altered in the resource), whether or not the channel can be selected from within a command ('can_select') (ie Ch 1:VOLT:IMM is supported). If a device property can be used to select a channel it should be declared under the name 'select_channel'. This also adds support for concatenating multiple commands separated by a special character (';' by default and can be specified by declaring a 'delimiter' field. I also re-factored some things I needed in channel away from devices, they are now in component.py

I added some very basic tests also.

This is ready for review from my point of view. I will try to prepare another PR for sending error messages to an error queue and declare a dialog to query the last error.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-0.07%) to 0.96% when pulling 9e0dd5cddaed0c20221529dbb2b838f9c2c952b5 on MatthieuDartiailh:channel into 30834ec75244a09e0d03d06df6b8f31fb1eb540b on hgrecco:master.

hgrecco commented 9 years ago

Can you rebase to the current master? I will merge it right away.

hgrecco commented 9 years ago

Thanks!

MatthieuDartiailh commented 9 years ago

Done. I also rebased the error queue PR.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+3.71%) to 84.75% when pulling d5942a3905cc1baf31852162206ce345a2dbb940 on MatthieuDartiailh:channel into a78d0046352110450c6d7bf358c6df400f097645 on hgrecco:master.

MatthieuDartiailh commented 9 years ago

I will fix the python 3 issue this afternoon.

hgrecco commented 9 years ago

Great! I have merge this.