da_cache: D/A and Software Status Driver

Contents

0.0: Invocation

    da_cache [options]
        -c <node>[,<attached name>] send msgs to another task; default: memo
        -e <error filename>
        -H <low>-<high> hardware address range
        -h <msg header>
        -l add a level of debug messages
        -o <device>[,<row>,<col>,<width>,<pass attr>,<warn>,<fail>,<debug>]
        -S <low>-<high> software address range
        -s no message sounds
        -v disable verbose to stderr
        -x Ask resident da_cache to quit
        -y disable system error message concatenation to messages

1.0: Description

da_cache is a driver that provides read/write access to write-only devices on the ARP subbus, specifically D/A converters. It also supports software status.

The hardware and software addresses supported must be specified on the command line via the -H and -S options. The <low> and <high> values are specified in hex. Hardware addresses map directly to ARP subbus addresses on write operations, so they are assumed to be even addresses and to read and write 16-bit values. Software values are also 16-bit, but since the software addresses don't map to hardware, they needn't be on even addresses. The address ranges can be anywhere within the range 0-FFFD, but the software addresses must be above the hardware address range. The address range is inclusive; in order to specify a null range, omit the appropriate option.

2.0: Programming Interface

Library functions are provided for accessing the da_cache driver. You can find their descriptions in the Library Reference under Data Collection.

Integrating da_cache into a TMC environment requires the following:

  1. include header file in collection and command server sources.
  2. Add appropriate collection rules to tmcbase sources.
  3. Add appropriate command rules to cmdbase sources.

To include the header file in a .cmd or .tmc file, add the following lines:

    %{
      #include "da_cache.h"
    %}

An appropriate collection rule for any da_cache channel or type is:

    collect x = cache_read(x.address);

Within a .cmd file, given an address and a value, you can simply call

    cache_write(address, value);

Return to Manuals Guide.
Copyright 1999 by President and Fellows of Harvard College