Installation guide

44 DC 900-1325I
Freeway Server-Resident Application (SRA) Programmer Guide
process, we will use an example SRA (simply named sra.c) along with its DLI and TSI
configuration files.
3.1.1 Source Files
In our example SRA, the source files we use are as follows:
sra.c
This is the C source file for the SRA.
sradcfg
This is the DLI configuration text file used by the SRA.
sratcfg
This is the TSI configuration text file used by the SRA.
The DLI configuration file contains sessions that are attached to serial ports on the ICP
boards. Each session contains information about specific port numbers and ICP num-
bers. The sessions may also contain information on how to configure the protocol-spe-
cific parameters for each port.
The TSI configuration file contains sessions that are attached to specific Freeway serv-
ers. In the simplest SRA example, the TSI file would contain just one session pointing to
the Freeway server that the SRA is running on (localhost). However, it is also possible to
have more sessions pointing to other Freeway servers on the network.
The connection between each of these three files is located in the source code. First, the
SRA source code points to the name of the DLI configuration binary file in the dlInit
call. Later in the program, the SRA points to individual session names in the dlOpen
calls. Figure 3–1 shows an example of the connection between the SRA source code and
the DLI configuration file.
Second, the DLI configuration text file points to the name of the TSI configuration
binary file in themain” portion of the file. Then each of the DLI sessions points to a
TSI session which represents a particular Freeway server. Figure 3–2 shows an example
of the connection between the DLI configuration file and the TSI configuration file.