[WT-support] New Lua APIs

Laurent HAAS - F6FVY f6fvy at free.fr
Fri Oct 9 21:35:02 CEST 2009


Hi Mario

Mario Lorenz a écrit :

> a) Could there be a :Send() for the winkey keyer? I would like to do configurations
> not supported by the standard configure dialog...

There is currently no API dedicated to the WinKey. We have to evaluate 
first if it can be done with the current WT core code, and if "direct" 
data transmission can peacefully live with the current WinKey thread 
management. Also, as the script will no be able to get echo from the 
WinKey, its use will be very limited, I'm afraid.

> b) Is there a list of events that can trigger Scripts ?
> I am aware of being able to call scripts from CW messages, as commands and via keys.
> I would also like to hook to events - new operators logging on, wintest starting up/shutting
> down, network traffic comming in, state of the radio (mode, band, frequency) changes, or
> generic timer events. (one could, for example, implement nag screens if provably
> the operator neglected to even try to work a new multiplier for a certain time, as evidenced
> by no radio QSYing to this frequency)

We have no plans to add many more events than the existing ones. I 
understand you have many ideas, but I'm afraid most of them will not fit 
in the current architecture.

The Lua implementation has been lately introduced, and can only override 
(or mimic) functionalities that already exist. What you're describing 
(especially the last part of the paragraph) could certainly be done if 
the software architecture were tailored for that. Unfortunately it would 
require major modifications (or even better, a complete rewriting from 
scratch) of the core, to allow hooks for (almost) everything.

Nevertheless, if it exists, the login.wts and logout.wts scripts are 
called at each op. change. These scripts must be located in the root 
directory of each operator (...\Application Data\Win-Test\ops\f6fvy\ for 
example).

> c) I am only just starting with Lua and its features. I read that I could in theory
> load any C shared library with the package.* functions and call them, which might be
> great (I have yet to learn how to build shared libraries on Windows), but is
> this feature enabled, ie. if I learned how to do such a shared library on windows, could
> I use it from within WinTest ?

*Cough*... well... Honestly, I don't know exactly how this could be 
achieved. What kind of usage do you have in mind for these libraries ?

73

Larry - F6FVY


More information about the Support mailing list