Giter VIP home page Giter VIP logo

Comments (8)

hgrecco avatar hgrecco commented on August 19, 2024

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.

MatthieuDartiailh avatar MatthieuDartiailh commented on August 19, 2024

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.

famish99 avatar famish99 commented on August 19, 2024

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.

MatthieuDartiailh avatar MatthieuDartiailh commented on August 19, 2024

I might start working on this during this week. @hgrecco can you give any pointer where to look at first ?

from pyvisa-sim.

famish99 avatar famish99 commented on August 19, 2024

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.

hgrecco avatar hgrecco commented on August 19, 2024

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.

MatthieuDartiailh avatar MatthieuDartiailh commented on August 19, 2024

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.

hgrecco avatar hgrecco commented on August 19, 2024

close as of #27

from pyvisa-sim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.