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

[WIP] Add basic VXI11 support #109

Merged
merged 1 commit into from
Apr 10, 2020
Merged

Conversation

zaporozhets
Copy link
Contributor

Yo Guys! Could you please take a look at my basic implementation of VXI11 example for parser.

Cheers,
Taras

@jancumps
Copy link

Can this be conditionally included/excluded in the compilation? Asking because I'm using the library in a memory challenged microcontroller.

@zaporozhets
Copy link
Contributor Author

Yes, libscpi can be compiled without vxi11 support.

unsigned int SCPI_outputBuffer_wr_idx = 0;
unsigned int SCPI_outputBuffer_rd_idx = 0;

char available_bytes = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: unused

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 93.113% when pulling e4f2e75 on zaporozhets:vxi11 into a765b9e on j123b567:master.

@j123b567
Copy link
Owner

Thank you for this example of VXI11 usage.

I'm sorry for so late response. I thought that I can review it and test it but I was unable to do it until now.

Please, do you have the source file for rpcgen which was used to generate vxi11_xdr.c?
Do you have some hints for me, how can I try this? I don't have any experience with VXI11. e.g. how to generate VXI11 counterpart so I can talk with this example.

@pigrew
Copy link

pigrew commented Apr 10, 2020

(I'm lurking around, watching this project, though I don't have any intentions of using this patch at this moment. On the other hand, I figure I can answer your questions.)

Please, do you have the source file for rpcgen which was used to generate vxi11_xdr.c?

rpcgen.c comes with from old SUN UNIX utilities. There are a bunch of different forks, such as:

https://github.com/bminor/glibc/tree/master/sunrpc
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=tree;f=tools/rpcgen;hb=HEAD

However, there should be an IDL file (.x extension) used with rpcgen. I don't see that here. For example, I wrote a server in Python, using a modified IDL file:

https://github.com/pigrew/pyvxi11aio/blob/master/vxi11aio/xdr/vxi11.x

Based on the VXI11 spec, the IDL file is:

https://github.com/pigrew/pyvxi11aio/blob/master/vxi11aio/xdr/vxi11_orig.x

Do you have some hints for me, how can I try this? I don't have any experience with VXI11. e.g. how to generate VXI11 counterpart so I can talk with this example.

VXI11 is a TCP-IP (perhaps with some UDP) based protocol, based on SUN/ONC RPC. It's very similar to USBTMC, and more or less duplicates the functionality of GPIB, but over IP. There is a variant to handle abstracting GPIB interfaces, too. VXI11 is falling out of favor these days, being replaced with HiSLIP which was designed to replace it.

You can use the NI VISA libraries (Or Keysight, or whatnot). I usually use the NI MAX GUI. Connect to a VISA address like "TCPIP::127.0.0.1::INSTR", and it should properly detect the VXI-11 server.

To run the server, your computer will need to be running a portmapper daemon. Most UNIX computers will have one running, but it seemed difficult to find one for Windows. I ended up writing a minimal one in Python for my above referenced project.

@j123b567
Copy link
Owner

Thank you for your answers. My bad english, I was interested in IDL files not rpcgen itself, but you have answered it anyway, great.

I will merge this even if I can't test it now, because it can be interesting codebase for others.

@j123b567 j123b567 merged commit a077a73 into j123b567:master Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants