3 # control script for one channel
10 .
$AMBROSDIR/constants.sh
14 usage: $0 <channeldir>
16 AMBROS control script for channel <channeldir>
21 # (re)generate morse code table
22 cd $AMBROSDIR/morse
&& .
/chargen.sh
26 if test ! -d "$channeldir" -o ! -x "$channeldir" -o ! -r "$channeldir" -o ! -w "$channeldir"
27 then echo "$channeldir is not read/write/executable directory, aborting!"
32 echo working
in channel
$channeldir
33 speed
=`configread $CHANNELCONFIG WPM`
35 echo at speed
$speed Words
/min
37 # handler for aborting
39 echo "received abort signal, stopping all subprocesses"
40 # if no PID is set, use 1 (init) as a dummy argument
41 /bin
/kill -TERM ${pidassembler:-1} $pidchannelchief
42 echo ending main control loop
48 trap finish INT TERM STOP
50 echo entering main control loop with PID $$
at
53 while test $AMBROSABORT -eq 0
54 do : # main control loop
56 # poll&process sources with `extractor`
57 # start&control `assembler`
58 # start&control `channelchief`