Installation guide
4: SRA Design Tips and Restrictions
DC 900-1325I 69
4.4.2 Non-Blocking (Asynchronous) I/O
All DLI and TSI applications on the Freeway server must use non-blocking (asynchro-
nous) I/O. The DLI and TSI libraries do not support blocking (synchronous) I/O on the
server. If you need a blocking I/O capability, you must develop a layer to provide the
blocking characteristics. This layer would lie between your blocking application and the
library.
4.4.3 Access to ICP Links
An application sends a DLI “Attach” command to an ICP link (serial port) in order to
begin interfacing to that link. The Attach command is sent automatically with the
dlOpen call in DLI Normal operation. In DLI Raw operation, the application must send
the Attach command using dlWrite. In either case, once the Attach command completes
successfully, the application “owns” that link until the application sends a “Detach”
command or exits. If another client program or SRA attempts to attach to that same
link, it would receive an error back from the Attach command.
Keep this in mind when designing the protocol interface in your SRA code. You must
always check for errors returning from the Attach command to be sure that your SRA
was successful in attaching to specific links. Also remember that if your SRA does not
attach to all of the links on the ICP, the remaining links are still available for use by other
client programs and SRAs. If you want to keep other applications from accessing the
remaining links on the ICP, then program your SRA to attach to all the links at startup,
but not enable the links until you are ready to use them.
4.4.4 Stopping the SRA
If you run your SRA from the BSD shell, you can stop the SRA simply by typing Ctrl-c
until the SRA exits. However, if your SRA starts automatically at boot time, you can use
the UNIX “kill” command to stop it. First you need to find out what Process ID (PID)
number was assigned to your SRA when it was started. You can find the PID from the
Freeway menus by typing menu items 2-5-3 as shown in the following example: