/usr/share/svxlink/events.d/Frn.tcl is in svxlink-server 17.12.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | ###############################################################################
#
# Frn module event handlers
#
###############################################################################
#
# This is the namespace in which all functions and variables below will exist.
# The name must match the configuration variable "NAME" in the
# [ModuleFrn] section in the configuration file. The name may be changed
# but it must be changed in both places.
#
namespace eval Frn {
#
# 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.
#
proc playMsg {msg} {
variable module_name;
::playMsg $module_name $msg;
}
#
# A convenience function for printing out information prefixed by the
# module name
#
proc printInfo {msg} {
variable module_name;
puts "$module_name: $msg";
}
#
# Executed when this module is being activated
#
proc activating_module {} {
variable module_name;
Module::activating_module $module_name;
}
#
# Executed when this module is being deactivated.
#
proc deactivating_module {} {
variable module_name;
Module::deactivating_module $module_name;
}
#
# Executed when the inactivity timeout for this module has expired.
#
proc timeout {} {
variable module_name;
Module::timeout $module_name;
}
#
# Executed when playing of the help message for this module has been requested.
#
proc play_help {} {
variable module_name;
Module::play_help $module_name;
}
#
# Executed when the state of this module should be reported on the radio
# channel. Typically this is done when a manual identification has been
# triggered by the user by sending a "*".
# This function will only be called if this module is active.
#
proc status_report {} {
printInfo "status_report called...";
}
#
# Executed when an entered command failed or have bad syntax.
#
proc command_failed {cmd} {
spellWord $cmd;
playMsg "operation_failed";
}
#
# Executed when an unrecognized command has been received.
#
proc unknown_command {cmd} {
spellWord $cmd;
playMsg "unknown_command";
}
#
# Executed when command to count nodes on the channel is called
#
proc count_clients {count_clients} {
playNumber $count_clients;
playSilence 50;
playMsg "connected_clients";
playSilence 250;
}
#
# Executed when the rf disable feature is activated or deactivated
# status - The current status of the feature (0=deactivated, 1=activated)
# activate - The requested new status of the feature
# (0=deactivate, 1=activate)
#
proc rf_disable {status activate} {
variable module_name;
puts "$module_name: [expr {$activate ? "Activating" : "Deactivating"}]\
listen only mode.";
playMsg [expr {$activate ? "activating" : "deactivating"}];
playMsg "rf_disable";
}
# end of namespace
}
#
# This file has not been truncated
#
|