[pm-h] LibUSB interface question

Mike Flannigan mikeflan at earthlink.net
Fri Feb 24 04:59:22 PST 2006


Paul Archer wrote:

> 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

Well, I'm not sure how often somebody will be typing
these commands, or how many different combinations
there are, but I have 3 thoughts:

1)
If this were a production environment and there was a
very limited number of normal options used, I'd want to
pick the options from a list - option 1-25; delcom 17,
or whatever.

2)
If I had to type this out a bunch, I'd want something like
this:
r=red
b=blue
+=on
-=off
*=flash
z=buzzer
r=repeat
s=sync
c=gsync?

delcom r+ b* g*5,2 c3 s z+ zr3

3)
If I had to make this user friendly for a bunch of minimally
trained people, then your interface or 1) above would
be preferable.


Mike




More information about the Houston mailing list