Comments (5)
By the way, the same policy will be applied to pyvisa-sim and the ni backend
from pyvisa-sim.
What bothers me is that if we do that we won't have a nice traceback to follow to determine the origin of the error. When debugging a pyvisa-sim .yaml it is invaluable ! I would be in favour of introducing a helper function in charge of adding some information to the error and then do a standard reraising.
As we only catch nicely behaved exception whose args[0] exists and is a string we should be able to do that easily. The best way would be to use raise ... from ... but this is sadly python 3 only.
from pyvisa-sim.
I think there are two types of errors. I was only referring for the ones supported by NI-VISA (like a timeout). I am fine with raising the others.
from pyvisa-sim.
Yeah I think there should be some work done at the parser layer to catch bugs to make debugging the yaml files easier. Also I have an intern working with me for the summer whose task is to improve our unittesting framework so I may be able to get some of these tasks completed.
On a separate note, we wish to have a framework where we can tie mocked equipment together (e.g. changing a mock power supply would show up on a mock multimeter) is this effort existing anywhere or should we create a pyvisa-system-sim side project for the task?
from pyvisa-sim.
I think that the way to facilitate debugging pyvisa-sim is failing fast, logging and decoupling the VISA status codes from the real errors.
Regarding your separate note, that is something in which we definitely interested. Before pyvisa-sim started I did something like this for Lantz (See here) Making something like this in a more robust and configurable way will be awesome. Open another issue to brainstorm ideas.
from pyvisa-sim.
Related Issues (20)
- Add support for more complex dialogs HOT 1
- Add support for USB RAW HOT 2
- Add support for query in list_resources. HOT 4
- Invalid signature for load in get_device_dict HOT 1
- How to simulate instrument that returns data when inst.read() HOT 4
- Communication fails for simulated GPIB/USB/TCPIP devices HOT 5
- PyVISA has moved
- Timeout when response termination character is None
- Write function should return a status code
- Instruments archive
- Random values as response HOT 1
- How to work with multi-element properties? HOT 1
- pyvisa doesn't found pyvisa-sim with pyvisa 1.11.0 HOT 5
- Invalid link on readthedocs HOT 2
- PyVISA 1.12.0 and GPIB Secondary Addresses HOT 1
- How to simulate binary write and query
- Conda installs version 0.3 -- Get no package pyvisa_sim found. HOT 5
- Feature suggestion: Connecting instruments HOT 1
- multiple instances of ResourceMaganer HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvisa-sim.