[pm-h] LibUSB interface question

Paul Archer tigger at io.com
Thu Feb 23 20:07:25 PST 2006


9:52pm, G. Wade Johnson wrote:

> I have most of the major functionality roughed out, but the iterface is in
> need of help. I've got some ideas, and Paul and I have dicussed it some. But,
> I thought it would be useful to get opinions from the group. I'm going to try
> to attach four different scripts that make use of four potential interfaces.
> I'd like to get some feedback on the different approaches.
>
Along the same lines, we've been talking about the interface to the script 
for the VI device itself.
Traditionally, you'd just pass options, like this:
delcomVI --red on --bflash --gflash 5,2 --gsync 3 --sync --buzzer on --buzzer-repeat 3

But there are so many options that way (there are multiple options for each 
color LED, plus the buzzer, plus different bits of information to read), 
that it gets really confusing.

Wayne suggested a language route:
$ delcomVI
> red on
> blue flash
> green flash on:5 off:2 syncoffset:3
> buzzer on repeat:3

or
$ delcomVI 'red on' blue flash' 'green flash on:5 off:2 syncoffset:3' 'buzzer on repeat:3'

I thought maybe a compromise would be good:

delcomVI --red,on --blue,flash --green,flash,on=5,off=2,syncoffset=3 --buzzer,on,repeat=3

Any suggestions?

Paul


More information about the Houston mailing list