Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LXI VXI-11 SCPITransport class #118

Closed
azonenberg opened this issue May 24, 2020 · 1 comment · Fixed by #120
Closed

Add LXI VXI-11 SCPITransport class #118

azonenberg opened this issue May 24, 2020 · 1 comment · Fixed by #120
Labels
driver Hardware drivers

Comments

@azonenberg
Copy link
Collaborator

tomverbeure was working on this, making a ticket so people know it's in progress

@azonenberg azonenberg added the driver Hardware drivers label May 24, 2020
@tomverbeure
Copy link
Contributor

tomverbeure commented May 24, 2020

My goal is to use liblxi (https://github.com/lxi-tools/liblxi) for this. Getting basic back-and-forth transactions to work is easy, but there are 2 issues:

  • some of the current scope drivers are doing bulk operations, where multiple SendCommands are issued one after the other, which are then followed by an equal number of ReadReply calls: https://github.com/azonenberg/scopehal/blob/5b91e7c79d3aca8cbdf70767eec03ca2b12875cd/scopehal/LeCroyOscilloscope.cpp#L1020-L1024
    VXI-11 is based on RPC and synchronous. It doesn't work with multiple queued up replies.
    If SCPITransport is decoupled from SCPIDevice, then all SCPIDevices should have synchronous transactions by default and bulk transactions as a performance optimization.
    I don't know how many such cases there currently are in the code.
  • lxi_receive requires a len parameter which contains the maximum number of bytes that can be received. If the number of bytes returned by the device is larger than len, liblxi simply drops those bytes.
    My planned solution for SCPILxiTransport is to have a staging buffer that is larger than the largest possible chunk of data that can be returned. In the case of a Siglent SDS2304X, a single waveform can be 140M sample points, so the staging buffer could potentially be that large. (In practice, once the waveform size is larger than 700k, lxi fails to return the waveform.)

Thoughts?

@azonenberg azonenberg linked a pull request May 25, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver Hardware drivers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants