Chapter 5. Drivers

Table of Contents
5.1. Sending Input to the Cascade CIF Driver
5.2. Cascade CIF Driver addressing for DeviceNet card
5.3. Cascade CIF Driver in Linux not communicating with card
5.4. Linux interrupt mode
5.5. Compiling the test file

5.1. Sending Input to the Cascade CIF Driver

Problem:

No obvious way to send input to the Cascade CIF Driver.

Cause:

When the Cascade CIF Driver runs, it should not return to the prompt, nor offer any form of interactive input. It is designed to run essentially as a daemon, taking requests from user-written client programs and interfacing continuously with the CIF card.

Solution:

The driver archive includes a program called lsend that allows you to send configuration commands interactively to the driver while it runs. Any command that can be placed into the configuration file can be typed interactively to lsend. To use lsend:

  1. Give the driver a name. Do this by putting the command:

        (attachName "cifdrv")

    in the driver configuration file.

  2. Run lsend, pointing it at the driver, with:

        [sh]$ lsend cifdrv

You should now get a prompt, at which you can type any configuration command, complete with parentheses.

In production, it would be best not to use lsend, but rather to either write your own client in C, use the Cascade DataHub and/or write a client using Gamma.

For more details, consult the Cascade CIF Driver manual.

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.