On Saturday 02 May 2009 14:18:36 Adi Bier wrote:
> Hi Tobias,
> when I was testing a bit with the module template it was not really
> clear for me how the state function "*" should be used.
> There is one function in each module that is named reportState(void)
> and called up (as described in the comment before) if a star * has been
> sent. I thought that this function is a specific one for the specific
> module that has been activated, but independently which module is up I
> get always the same state report (except the last phrase).
Sorry, I think that the reportState C++ function is not used anymore. It
should be removed. The status_report function in the TCL script is called
directly from Logic.tcl.
I guess the logic behind the status_report function is not all that clear.
It's called from two places, at manual identification and at the time of
a "long" identification.
* When no module is active and * is pressed, first the normal identification
is played. After that the status_report function is called in each module.
* When a module is active and * is pressed, first the normal identification is
played. After that the status_report function is called in the active module.
* When no module is active and a "long" identification is played, first the
normal identification message is played. After that the status_report
function is called in each module.
* When a module is active and a "long" identification is played, only the
normal identification message is played. The status_report function is not
For example, the tcl_voice_mail module use the status_report function to
announce available voice mails.
> An additional "processEvent("say something") in the reportState() has no
> function. Do I have to put my code in dtmfDigitReceived(...) function, like
> if (digit == '*') processEvent("say something");
It is possible to override the default behaviour by catching DTMF digits in
the dtmfDigitReceived function. However, I recommend not to change the
behaviour of the *. It will just be (more) confusing if modules handle the *
> Is there no problem in the case of the state request by a star (*)?
> What is the right way if I want to have a module-specific report only
> for the module that is activated in this moment?
Preferably, use another command. For example, command 1 in the EchoLink module
will read back the callsigns of the connected stations.
73's de SM0SVX / Tobias
> mni tnx
> 73's de Adi, DL1HRC