help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: low level I/O (GPIB, USBTMC, VXI11)


From: Julien Salort
Subject: Re: low level I/O (GPIB, USBTMC, VXI11)
Date: Sun, 25 Nov 2012 12:03:02 +0100

Le 25 nov. 2012 à 05:46, Richard Stallman <address@hidden> a écrit :

>> It is my understanding you can link with whatever you want for your personal 
>> usage.
>> However, DISTRIBUTING a binary that links with NI VISA definitely violates 
>> the GPL.
>> That is why I don't distribute binaries, only source code.
> 
> The user, on his own initiative, is free to link GPL-covered code with
> nonfree code and use that privately.  However, to modify a GPL-covered
> program so that it is meant to link to some non-free code, and
> distribute that, is not a private action.  It is a way of combining
> the program with nonfree code.  That violates the GPL.

I didn't modify any existing GPL sources, specifically I didn't modify Octave 
sources. Octave already had the ability to run compiled functions linked to 
whatever library you wish. Those compiled functions behave a bit like plug-ins, 
by the way.

What I did, is create wrappers that allows calling some of the 488.2, VISA and 
DAQmx functions.

Those are very simple: the oct file just #include <visa.h> and calls one VISA 
function, eg. viOpen for example.
There is nothing that prevents someone from linking this wrapper to OpenVISA 
instead of NI VISA.
The same is true for 488.2. The oct files are wrapper that #include <ni488.h> 
and call, eg. ibdev. The free libgpib library defines the same function. So 
someone can link the wrappers against libgpib or NI 488.2.

It happens that I personally only tested with NI VISA, NI 488-2 and NI DAQmx 
because this allows me to get support from NI if there is a problem, and their 
libraries are compatible with all the acquisition cards they sell. Those 
libraries are free like in free beer but closed source and they require to 
agree to a restrictive license. I don't particularly like this but I don't 
really have a choice (my first requirement is to be able to acquire data). I 
filed a complaint requesting that they open their source already.

The files I distribute are:
- CPP source files of the wrappers;
- Octave script files that implement high-level functions that rely on these 
wrappers.

All the files that I distribute are distributed under the GPL license.

If someone wishes to test them with alternative free library and modify the 
configure.ac to ease the linking with those, I will be very happy. If someone 
has the knowledge to implement a free alternative to NI-DAQmx does so, I will 
be very happy. Installing these NI libraries under linux is a pain because they 
cannot be packaged easily, they have their own installers that don't work with 
all linux distributions, they don't support the way the latest Linux kernels 
handle USB, etc.
Whenever a full-featured alternative free library is available, I'll switch to 
it enthusiastically. My code is written in such a way that I think it should be 
easy to link against some other library: only the wrappers might have to be 
modified (presumably) and their number is limited.

Now. I'm free to do what I want for my personal usage. I feel it is nice to 
distribute these files, in case someone else is interested. But it wouldn't 
make much difference to me if I don't distribute them. So, if distributing 
source files (without even the implied warranty that it fits a particular 
purpose) violates the GPL, I will just stop distributing them.

Please tell me if you feel this is the case.

Julien

reply via email to

[Prev in Thread] Current Thread [Next in Thread]