Appendix A. Message Switch switch.cfg File

Table of Contents
A.1. General Description
A.2. Direct Reply "Ping" Switch Specification
A.3. Two-way Switch Between Two Data Streams Specification
A.4. One-to-many Specification
A.5. Many-to-One Specification
A.6. Client Applications Connecting to the Message Switch
A.7. Using Multicast-Capable Freeway
A.8. Using the Null ICP_IP Device

The top-level Message Switch configuration file is named switch.cfg. The entire example file is duplicated in this Appendix but is broken into sections to illustrate specific types of configuration scenarios. In all the examples, the link names (icp0port0, etc.) correspond to the session names specified in the example swdcfg file (shown in Figure B-2) supplied with the Message Switch product.

Section A.1 through Section A.5 illustrate specifications that the Message Switch performs autonomously, without any client session connection involved.

Section A.6 through Section A.8 illustrate the simultaneous use of client sessions, which are of three types:

A.1. General Description

    #--------------------------------------------------------------------------#
    #                                                                          #
    #  This is the main configuration file for the Freeway Message Switch.     #
    #  It contains commands which cause the Message Switch task to             #
    #  copy all data received on one link to another link or links.            #
    #                                                                          #
    #  Blank lines, and lines which have a "#" as the first character, are     #
    #  treated as comments, and have no effect on the run-time operation       #
    #  of the Message Switch task.                                             #
    #                                                                          #
    #  The first non-comment line in this file must be of the form:            #
    #                                                                          #
    #     DLICfgFile = <filename>                                              #
    #                                                                          #
    #  Where the <filename> specifies the name of a file which will be         #
    #  used as the DLI configuration file for the Message Switch task.         #
    #  If no path name is provided in the <filename> field, and the            #
    #  switch task is executing as an SRA on a Freeway, then the switch        #
    #  task will search the System Boot Directory specified in the             #
    #  Freeway System Boot Parameters for the configuration file.  A           #
    #  fully qualified path name to the configuration file may be used         #
    #  if desired.                                                             #
    #                                                                          #
    #  All lines following the specification of the DLI configuration file     #
    #  must be either blank lines, comments, or switch commands of the         #
    #  following form:                                                         #
    #                                                                          #
    #     read_link > write_link                                               #
    #                                                                          #
    #  or                                                                      #
    #                                                                          #
    #     read_link >> write_link                                              #
    #                                                                          #
    #  Switch commands will cause the Message Switch task to open the two      #
    #  specified links, then continually execute read commands on the link     #
    #  specified to the left of the ">" or ">>" string, and write the          #
    #  resulting data to the link specified to the right of the ">" or ">>"    #
    #  string.  The links specified must correspond to entries in the DLI      #
    #  configuration file for the Message Switch task.                         #
    #                                                                          #
    #  It is permissible to specify the same read link on multiple command     #
    #  lines; the result will be that data read from that link will be         #
    #  written to all of the specified write links.                            #
    #  It is also permissible to specify the same write link on multiple       #
    #  command lines; the result will be that data read from multiple          #
    #  read links will be written to the specified write link.                 #
    #                                                                          #
    #  If it is desired that all data in both directions be switched           #
    #  between two links, two switch commands will be necessary, as            #
    #  shown in this example:                                                  #
    #                                                                          #
    #     icp0port0 > icp1port0                                                #
    #     icp1port0 > icp0port0                                                #
    #                                                                          #
    #  If a switch command uses a single ">" character between link            #
    #  specifiers, then the Message Switch will perform flow control; it       #
    #  will stop reading from the source session if the destination session    #
    #  becomes unable to receive further data.                                 #
    #                                                                          #
    #  If a switch command uses the double-">" string (">>") between link      #
    #  specifiers, then the Message Switch will not perform flow control;      #
    #  it will continue to read from the source and attempt to write to the    #
    #  destination regardless of the destination's ability to accept data.     #
    #                                                                          #
    #  Note that any flow-controlled destination which blocks will cause the   #
    #  Message Switch to stop reading from a source session, so if there are   #
    #  several connection definitions for a single source (specifying          #
    #  that data from that source should go to multiple destinations) and      #
    #  some of those connections specify flow-control, then all destinations   #
    #  will stop receiving data when any flow-controlled destination blocks.   #
    #                                                                          #
    #  If the destination session is a UDP ICP_IP device, then the flow        #
    #  control setting has no practical effect, since UDP packet streams       #
    #  never block.                                                            #
    #                                                                          #
    #--------------------------------------------------------------------------#
    #                                                                          #
    #  If the Message Switch task is to run as an SRA in a Freeway, a          #
    #  command of the following form must be placed in the boot                #
    #  configuration file (bootcfg.xxx):                                       #
    #                                                                          #
    #    sra_module = <name of object file containing switch task>             #
    #    sra_entry  = <name of switch task entry point to be spawned>          #
    #                                                                          #
    #  For example:                                                            #
    #                                                                          #
    #    sra_module = sw486.o                                                  #
    #    sra_module = sraSwitch.o                                              #
    #                                                                          #
    #  The "tsi_config_file = muxcfg" line in the boot configuration file      #
    #  must also be changed to "tsi_config_file = sramuxcfg", (or to point     #
    #  to another muxcfg file which defines a shared-memory connection).       #
    #                                                                          #
    #--------------------------------------------------------------------------#
    DLICfgFile = swdcfg
    # In the examples below, the link names (icp0port0, etc.) correspond to the
    # names specified in the example swdcfg file supplied with the Message Switch.