[Hamlib-developer] menus, command parser.
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Dale E. E. <de...@w-...> - 2002-07-23 20:36:07
|
Hi all,
I've been doing a lot of work on my own copy of the "branch_ts2k" of
Hamlib.
My menus are now working and I have started on a very basic command
parser.
The menus are read from the rig, from one of the assigned "public"
PM's. The
parameters aren't converted but only requires a little code to finish
up. User's
can list menus and get/set the values. (PM's are on some of the
Kenwood's.)
The command parser only has a few commands but it works! Here is an
example of commands that may be used:
model = ts2k;
port = "/dev/ttyS1";
open(rig, model, port);
model[2] = dummy;
port[2] = "/dev/null";
open(rig[2], model[2], port[2]); // haven't tested dummy
help
exit;
Everything works as shown--except the dummy rig may cause
errors as shown. There is no ';' for help. All of this stuff is
*only* available for the branch_ts2k. The port command may
be either lhs or rhs. port[0] = port[2] actually works. I'm using
a c/c++ style syntax and hope to have several commands working
before I commit. Since I'm creating the syntax as I go, work is real
slow on the parser. bison and flex are the generators I'm using.
I'll be commiting the files to CVS soon. Let me know if you have any
questions (or complaints). They should be there by Wednesday evening
unless I break something again. :) There is more stuff but I've
mentioned the biggest two.
I can easily create scripts of output if anybody's interested. Just
ask and I'll run them.
73's
Dale
kd7eni
|