implemented - was: RFC: comedi address strings

Hello,

about a week ago, I wrote:

> I need to parse user-supplied strings to comedi addresses (to connect
> comedi and MatPLC), but there doesn't appear to be a standard function
> for that, or even a convention about how the addresses should look.

> Would the following format make sense?
...
> 	device: type subdevice.channel options

etc.

I've just written the function to parse that format, if anyone wants it;
for the time being, it's in the MatPLC CVS, and it can be downloaded at
http://www.baum.com.au/~jiri/mat_comedi

I'm not sure whether this should be contributed to the comedi library,
or whether it should be a MatPLC-only thing. However, I suspect that
many others will need to do this kind of thing too, which would speak
for including it in comedi itself; and it'd be good if everyone used the
same format.

> Examples:

>   I2.3 - digital input, device 0, subdevice 2, channel 3.

>   1:X7.3/2_DIFF - converted analog input, device 1, subdevice 7,
>   channel 3, range 2, reference AREF_DIFF.

>   U.2 - analog output, device 0, subdevice 0, channel 2, default range
>   and reference.

Jiri
-- 
Jiri Baum <jiri_at_baum.com.au>           http://www.csse.monash.edu.au/~jirib
  MAT LinuxPLC project --- http://mat.sf.net --- Machine Automation Tools

Received on 2003-07-25Z15:43:47