Comments (8)
Agreed. Maybe the way is to add a channels
entry in the property dict and require that getters and setters are written with named placeholders such as {channel:d}
and {value:.3f}
I will release version 0.1 later this week and start with this afterwards.
from pyvisa-sim.
It might be better to keep track of the channels at the instrument level rather that at the property level, as often instruments have many (a dozen) property which apply to channel. Could you do some hierarchical declaration in the YAML like this:
device PNA:
properties :
# instrument wide properties
channel :
properties:
# channel specific declaration.
Otherwise I fine with the use of '{channel}' or '{ch_id}' (may make sense to use the same we may use in lantz, whatever it ends to be).
from pyvisa-sim.
I think the latter implementation is only manageable if issue #16 is resolved first, otherwise for channels that share a lot of the same properties, it could get a bit tedious to define them.
from pyvisa-sim.
I might start working on this during this week. @hgrecco can you give any pointer where to look at first ?
from pyvisa-sim.
Most of the work will be in devices.py where you'll have to modify getters and setters inside of the Device class. Some work may be necessary in parser.py to accomodate the new yaml tags.
from pyvisa-sim.
Indeed most changes will be in devices.py
@MatthieuDartiailh If you proceed to implement your hierarchy, it would be a good idea to have a way to specify the valid values fo r the channel.
from pyvisa-sim.
It is my intention indeed. But the ideal would be to specify in the resource which channel are active. But I will let that for another PR.
from pyvisa-sim.
close as of #27
from pyvisa-sim.
Related Issues (20)
- 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
- Multiple getters and setters for a property? HOT 1
- Debug logging spits out each character individually HOT 3
- `main` branch no longer allows dialog-without-response HOT 1
- Bug in `iter_bytes` HOT 3
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.