Broadcasting mit Tcl?

  • Hallo liebe SVXlink Gemeinde,

    nachdem unser Relais, DB0HHW nun einiggermassen läuft habe ich angefangen an Softwaremässigen Erweiterungen zu Basteln.
    Leider hab ich noch nicht so richtig eine Idee bekommen wie SVXlink die TCLroutinen handhabt.

    Zum Testen habe ich mir eine 1:1 Kopie unsers Relais (Archlinux) unter VirtualBox erstellt damit der laufende Betrieb nicht gestört wird und ich auch "offline" testen kann.

    Die aktuelle Aufgabenstellung ist eine vorhandene WAV Datei durch DTMF Komando abrufbar auszugeben.
    Das tcl Modul/den Event handler habe ich Broadcast genannt.
    Svxlink macht das auch, aber noch nicht 100% wie ich will :?:
    Die Ausgabe der WAV-Datei bricht ab sobald svxlink die eigene Kennung ausgibt:

    Code
    Loading module "ModuleTclVoiceMail" into logic "SimplexLogic"	Module Tcl v1.0.0 starting...Loading module "ModuleBroadcast" into logic "SimplexLogic"	Module Tcl v1.0.0 starting...SimplexLogic: Event handler script successfully loaded.EchoLink directory status changed to ON--- EchoLink directory server message: ---EchoLink Server v2.5.9997....SimplexLogic: digit=9SimplexLogic: digit=#SimplexLogic: Activating module Broadcast...*** ERROR: Unable to handle event: Broadcast::activating_module in logic SimplexLogic (can't read "module_name": no such variable)Broadcast: Module activatedTx1: Turning the transmitter ONBroadcast: allMsgsWritten called...Tx1: Turning the transmitter OFF

    Was kann ich tun, damit die Ausgabe der WAV datei nicht durch andere Events wie z.b die Ausgabe der ID unterbrochen wird?
    Wieso meckert svxlink über 'can't read "module_name": no such variable' ?
    Die beiden TCL Scripts basierend auf den default:
    ../event.d/Broadcast.tcl

    Code
    namespace eval Broadcast {## Check if this module is loaded in the current logic core#if {![info exists CFG_ID]} {  return}## Extract the module name from the current namespace#set module_name [namespace tail [namespace current]]## An "overloaded" playMsg that eliminates the need to write the module name# as the first argument.##   msg - The message to play#proc playMsg {msg} {  variable module_name  ::playMsg $module_name $msg}## A convenience function for printing out information prefixed by the# module name.##   msg - The message to print#proc printInfo {msg} {  variable module_name  puts "$module_name: $msg"}## Executed when this module is being activated#proc activating_module {} {  Module::activating_module $module_name}## Executed when this module is being deactivated.#proc deactivating_module {} {  Module::deactivating_module $module_name}## Executed when the inactivity timeout for this module has expired.#proc timeout {} {  Module::timeout $module_name}## Executed when playing of the help message for this module has been requested.#proc play_help {} {  Module::play_help $module_name}## Executed when the state of this module should be reported on the radio# channel. The rules for when this function is called are:## When a module is active:# * At manual identification the status_report function for the active module is#   called.# * At periodic identification no status_report function is called.## When no module is active:# * At both manual and periodic (long variant) identification the status_report#   function is called for all modules.#proc status_report {} {  printInfo "status_report called..."}## Called when an illegal command has been entered##   cmd - The received command#proc unknown_command {cmd} {  playNumber $cmd  playMsg "unknown_command"}# end of namespace}


    ../module.d/ModuleBroadcast.tcl


    73' Gerald
    - dk7xe -

  • Hi Gerald,

    es fehlen die Variablendeklaration in den Proceduren (de-)activating_module, timeout, play_help,...:

    Code
    #
    # Executed when this module is being activated
    #
    proc activating_module {} {
      variable module_name   # <---diese hier
      Module::activating_module $module_name
    }
    Quote


    Was kann ich tun, damit die Ausgabe der WAV datei nicht durch andere Events wie z.b die Ausgabe der ID unterbrochen wird?

    Das könnte man eventuell lösen, indem man die Audio-Modulausgaben gegenüber den restlichen Audio-Ausgaben priorisiert.
    ...hm, mal nachdenken.

    73's de Adi, DL1HRC

  • Hallo Adi,

    da hätte ich auch selbst drauf kommen können. fehlende Variablendefinition :)
    Danke für den Hinweis.

    In meinem Fall wäre es ausreichend wenn die ID mit verminderter Lautstärke ausgegeben wird. Equivalent wenn der SQL offen ist.
    Auf alle fälle sollte aber eben ein unterbrechen der Aussendung verhindert werden.

    Vielleicht fällt dir dazu noch was ein.

    73' Gerald
    - dk7xe -