man8/ANNtask

Table of Contents

Name

ANNtask - Roland R2000 Audio Annunciator service

Synopsis

ANNtask <argument list>

Description

I/O service for a Roland R2000 Audio Annunciator.

The program registers with dbman as ANNtask.

Arguments

Argument processing is done using Unix long argument syntax.

The values of all the parameters listed here (whether or not they were supplied on the command line) are printed on stderr when the program starts.

--dbman_host <hn>

The host where dbman is running. If this argument is not specified the default is "localhost".
--mngr <path>

The path to the configuration file.
--local <iopath>

This tells the program to run and connect to the local device path provided.
--remote <host>,<port>

Tells the program to connect to the given remote host on the remote port. The port option can either be a number, or a service in /etc/services.
--help

Prints a help message.

Config Name Usage

read1 - required

The input parameter. This parameter is subscribed to and when the parameter is equal to the value of the preset field the message play countdown begins.
read2 - optional

Message play flag. If this parameter is equal to the value of the preset field the message is allowed to play when initiated.

If not present the message will always be played.

ctl1 - optional

The datapoint to be controlled. The value of this parameter is copied from the read1 parameter.

If this parameter is not present it is ignored.

int0 - optional

Stop time delay.

If the Label and Refname fields are NULL value is taken from the preset field, otherwise the Label and RefName are subscribed to and value comes from the AccelNET database.

If this parameter is not present there is no time delay.

int1 - optional

Start time delay.

If the Label and Refname fields are NULL value is taken from the preset field, otherwise the Label and RefName are subscribed to and value comes from the AccelNET database.

If this parameter is not present there is no time delay.

int2 - optional

Start message number. Messages correspond to the message number in the R2000. 0 is not a valid message number.

If this parameter is missing no message is played.

int3 - optional

Stop message number. Messages correspond to the message number in the R2000. 0 is not a valid message number.

If this parameter is missing no message is played.

Configuration File Example

In the example given below the g1 and g2 entries play the same message (msg 1) with a 15 second delay. Another datapoint is used to inhibit playing the message under certain conditions. The input datapoint (read1) is sent to the output datapoint (ctl1) after the time delay has expired.

The g7 entry plays a message with no time delay when the input datapoint (read1) is in the correct state. There is no time delay and no output datapoint.

#
#    ANNtask entries
#
# read1 - input parameter
#     if (current == preset)
#        then do_start_message
#        else do_stop_message
# ctl1 - output parameter
#     value of input parameter is copied to here
#     at the suitable time
# read2 - message play enable flag
#     if (current == preset)
#        then it_is_ok_to_play_message    
# int0 - off delay time
# int1 - on delay time
# int2 - start message number
# int3 - stop message number
#
# messages:
#    0 - not a valid msg
#    1 - charging start msg
#    4 - charging stop msg
#
ANNtask|g1|read1 |0|CH TX-1|.PwrSC |1.0
ANNtask|g1|ctl1 |0|CH TX-1|PwrSC |
ANNtask|g1|read2 |0|CH TX-1|AnnSR |1.0
ANNtask|g1|int0 |0|NULL |NULL |0.0
ANNtask|g1|int1 |0|NULL |NULL |15.0
ANNtask|g1|int2 |0|NULL |NULL |1
#
ANNtask|g2|read1 |0|CH TX-2|.PwrSC |1.0
ANNtask|g2|ctl1 |0|CH TX-2|PwrSC |
ANNtask|g2|read2 |0|CH TX-2|AnnSR |1.0
ANNtask|g2|int0 |0|NULL |NULL |0.0
ANNtask|g2|int1 |0|NULL |NULL |15.0
ANNtask|g2|int2 |0|NULL |NULL |1
#
#
# play this one when AccOpSC goes false
# (chains off, gvm < .05)
#
ANNtask|g7|read1 |0|ACC RM-1|AccOpSC |0.0
ANNtask|g7|int2 |0|NULL |NULL |4

Examples


#
# here is an example of operation on a local serial port
#
stty -echo < /dev/ttyS0
stty raw < /dev/ttyS0
stty 9600 < /dev/ttyS0
ANNtask --dbman-host csdev1 --local local /dev/ttyS0 --mngr MNGRconf
#
# here is an example of operation using a terminal server
#
# note that the terminal server port characteristics
# should be set in a manner equivalent to that
# required for local operation
#
ANNtask --dbman_host csdev1 --remote csdev11,ETSraw1 --mngr MNGRconf

Notes

The port used by ANNtask should be set for no echo, no canonical processing (raw mode) and the baud rate should be the same as the internal settings of the r2000. See the EXAMPLES section above.

Manual page revision

$Id: ANNtask.8,v 1.4 2007/07/17 15:37:36 kitchen Exp $


Table of Contents