Re: Simple question about comedi_fileno..

Hi Daniel,

Daniel Koch wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> I've got a simple question trying to understand the cmd.c code. I'm not very 
> experienced in C programs yet, but I want to learn how cmd.c works. One line
> i don`t understand is
> 
> ret=read(comedi_fileno(dev),buf,BUFSZ);
> 
> I checked the comedilib reference but I couldn`t find comedi_fileno , buf and 
> BUFSZ. Can someone explain that to me ?
> 
> Sorry about asking this simple question..
> 

comedi_fileno(dev) is the transformation of dev getting by 
comedi_open(), to standard file id because read is a standard function
buf is a char * pointer
BUFSZ is the size of your buffer buf
for example you define
char buf[3000];
you must tell to read that you don't want get more than 3000 bytes.

and ret is the number of bytes you have got in buf after read.

HTH.

Patrick


> Daniel
> - -- 
> - ----------------------------------------------------------------------
> "Schlage die Trommel und fürchte dich nicht" (Heinrich Heine)
> 
> Daniel Koch (danielkoch_at_gmx.net)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE91DQo6i7okj1aOg0RAkHhAKDdTWIMKUh+b5sHiinu63DXXZxJQwCfaSLY
> zv4mh9W2A/HY3GalIIK8QnA=
> =mzPB
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> comedi mailing list
> comedi_at_comedi.org
> https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
> 
> 


-- 
Informatique S.E.R.I.A.N.E.             http://www.seriane.fr/
79-81 avenue Daničle CASANOVA
B.P. 136                                tel : 01 49 59 05 55
94208 IVRY sur Seine Cedex              fax : 01 49 60 84 57

Received on 2002-11-15Z09:50:47