- From: Alessandro Toso <aletoso_at_vt.edu>
- Date: Thu, 20 Sep 2007 10:09:02 -0400
Hi,
all the examples in the comedilib/demo directory are using generic
functions declared in common.c and in particular for parsing the user
input there a function called "parse_option" that does the job. So if
you run one of the examples you can specify the device (if you have
more than one board), the subdevice, etc. This function fills the
parsed_option struct defined in examples.h:
struct parsed_options
{
char *filename;
double value;
int subdevice;
int channel;
int aref;
int range;
int physical;
int verbose;
int n_chan;
int n_scan;
double freq;
};
the options are parsed using :(c = getopt(argc, argv,
"a:c:s:r:f:n:N:F:pvdgom")) so for example you can run:
./board_info -f /dev/comedi1 -F 5000
Bye
Alessandro
On Sep 20, 2007, at 9:50 AM, Johannes wrote:
> Hi Heinrich,
>
> thanks for your reply.
>
> the card is working fine, comedi and comedilib are installed, I
> just dont
> know how to use it.
> I took a look at outp.c, but I dont understand the
> struct parsed_options options; and
> data = options.value;
> used, I need to have hard coded values to understand it. I dont
> have a clue
> which argument parameter I have to use. Where are such things
> explained?
>
> Thanks a lot
>
>
> ---------------------------------------------
> Free POP3 Email from www.Gawab.com
> Sign up NOW and get your account _at_gawab.com!!
>
> _______________________________________________
> comedi mailing list
> comedi_at_comedi.org
> https://mail.comedi.org/cgi-bin/mailman/listinfo/comedi
Alessandro Toso
Postdoctoral Associate
Vibration and Acoustics Laboratories
Department of Mechanical Engineering
Virginia Tech
151 Durham Hall
Blacksburg, VA, 24061-0238
voice : 540-231-5166
email : alessandro.toso_at_vt.edu
Received on 2007-09-20Z13:09:02