Re: [Hamlib-developer] frontend API function reduction
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Frank S. <vk...@ix...> - 2000-09-16 05:23:01
|
Stephane Fillod wrote:
>
> ..provided we have the specs. May be we can sumon some help
> by sending an announce on lin...@vg...
> and lin...@de... mailing lists.
>
Yep, let me fix ft747 and ft847 asap, and we can announce for help
and show some partly working stuff ;-)
> > cmd_set_freq(RIG *rig,freq_t freq, rig_mode_t mode, vfo_t vfo )
> > long int cmd_get_freq_mode_status(RIG *rig, unsigned char *mode, vfo_t
> > vfo);
> >
> Looks definitely better this way!
> Just a question: what if the application just wants to change
> the mode only? It might be troublesome in certain case to have
> to remember the current frequency or having to query it.
true, I guess we have some options...
API provides
cmd_set_freq_(RIG *rig,freq_t freq, rig_mode_t mode, vfo_t vfo )
and possibly
cmd_set_mode(RIG *rig, rig_mode_t mode)
cmd_set_vfo(RIG *rig, vfo_t vfo)
and allow backend to
if an app calls the generic function
cmd_set_freq_mode_vfo(RIG *rig,freq_t freq, rig_mode_t mode, vfo_t vfo )
then if rig later sends
cmd_set_mode(RIG *rig, rig_mode_t mode), we could..
2. preserve last command params sent in the backend libs.
this way a cmd_set_mode(rig_mode_t mode) can
call a cmd_set_freq( ..freq,mode) if that rigs
opcode command require all aparameters. Otherwise the backend just
sends the
cmd_set_mode() change.A small overhead, but covers both cases.
(less yuck !)
ps: my 2 yaesu can handle a mode change independant of other stuff
3. Pass NULL parameters into the cmd_set for those things you
dont want to change since previos command ??
comments ?????
> serial.c
> --------
> serial_open() open and setup a serial port, fully RIG* aware,
> cloned from open_port2()
great !
> write_block2() handles optional write_delay
> read_block() does passive blocking(select), and have timeout handling
> open_port2() has been busted (outdated refs to rig_caps), use serial_open()?
>
yep, we can kill this.
> Question: What do you think of write_block2() ? Would you agree
> to replace write_block() by write_block2() ?
>
yep, that way it covers all rig types, I had to start somewhere :-)
> Next stage: the linking ;-)
ahh lovely stuff !
>
> I'm sorry Frank, with the new API and frontend/backend, you'll have
> to modify your ft847 code.
will update this weekend, its Olympics in vk3 land (actually vk2)
but I live and watch from texas USA.
BTW, do all the Yeasu rigs have the same
> "CAT" protocol as Icoms do with "CI-V" ? In this case, may be it will
> be easier for you to factorize some code.
so far the 2 yaesus have same 5 block cmd, but no commonality
between opcodes and freq packing into BCD etc..
/ Frank..
>
> --
> Stephane Fillod F4CFE
> _______________________________________________
> Hamlib-developer mailing list
> Ham...@li...
> http://lists.sourceforge.net/mailman/listinfo/hamlib-developer
--
Frank Singleton VK3FCS
Email: victor kilo three foxtrot charlie sierra at ix dot netcom dot com
|