rulbus.conf

This example shows what a Rulbus configuration file may look like. See also ConfigParser.
/*
 * rulbus.conf - Rulbus rack and cards configuration file.
 *
 * This file is part of the Rulbus Device Class Library (RDCL).
 *
 * Copyright (C) 2003-2004, Leiden University.
 * This library is free software, see below.
 *
 * $Revision: $
 * $Date: $
 * $Source: $
 * %Author: Martin J. Moene %
 *
 * Compiler        : Borland-C++ 5.5.1
 * Operating system: 32-bit Windows
 * Hardware system : PC
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * The library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with mngdriver; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/*
 * //
 * // small example rulbus.conf:
 * //
 *
 * rack "toprack"
 * {
 *    address = 7                               // this rack has address 7
 *    rb8509_adc12 "adc"                        // uses defaults
 *    rb8509_dac12 "dac-ch0"                    // uses defaults
 *    rb8509_dac12 "dac-ch1" { address = 0xD2 } // address specified
 * }
 *
 * rack "bottomrack"
 * {
 *    address = 8                               // this rack has address 8
 *    rb8515_clock "clock"   { }                // uses defaults
 *    rb8514_delay "delay0"  { }                // uses defaults
 *    rb8514_delay "delay1"  { address = 0xA4 } // address specified
 * }
 */

/*
 * keywords (case sensitive):
 *
 * - rack
 * - rb_generic
 * - rb8506_pia
 * - rb8506_sifu
 * - rb8506_via
 * - rb8509_adc12
 * - rb8510_dac12
 * - rb8513_timebase
 * - rb8514_delay
 * - rb8515_clock
 * - rb8905_adc12
 * - rb9005_amplifier
 * - rb9603_monochromator
 *
 * - address          (all cards)
 * - bipolar          (rb8509_adc12, rb8510_dac12)
 * - has_ext_trigger  (rb8509_adc12)
 * - intr_delay       (rb8514_delay)
 * - num_channels     (rb8509_adc12)
 * - volt_per_bit     (rb8509_adc12, rb8510_dac12)
 *
 * - false, no
 * - true, yes
 *
 * - [fpnumkMGT] characters used as suffix on a number (unit) have the
 *   following meaning
 *
 *   sfx | meaning
 *   ----+-------------
 *    f  | femto  1e-15
 *    p  | femto  1e-12
 *    n  | pico   1e-9
 *    u  | micro  1e-6
 *    m  | milli  1e-3
 *    k  | kilo   1e+3
 *    M  | mega   1e+6
 *    G  | giga   1e+9
 *    T  | tera   1e+12
 */

/*
 * Rulbus rack address
 *
 * The address of a Rulbus rack can be set via a 4-bit DIP-switch on its
 * rear-side.
 *
 *
 *    Secondary Address                    Secondary Address
 *            1  0                                 1  0
 *   weight +------+  bit                 weight +------+  bit
 *        1 | .  o | DS 0                      1 | o  . | DS 0
 *        2 | .  o | DS 1                      2 | o  . | DS 1
 *        4 | .  o | DS 2                      4 | o  . | DS 2
 *        8 | .  o | DS 3                      8 | o  . | DS 3
 *          +------+                             +------+
 *
 *  0: 0*8 + 0*4 + 0*2 + 0*1            15: 1*8 + 1*4 + 1*2 + 1*1
 *
 *
 * So there are 16 addresses to select from [0..0xF].
 *
 * Address 15 (0xF) is a special address: when a Rulbus rack has its
 * DIP-switch set to 15, it is always selected, no matter what the
 * computer tells the rack-selector.
 *
 * Please specify the DIP-switch setting for the address in a rack's
 * declaration.
 *
 * When you do not specify a rack address it will be 0xF.
 */

rack "top" =                    // this is a line comment, the '//' starts it
{
   address = 3                  // the required rack address [0..0xF]

   rb8506_pia "pport"           // the simplest card definition, using default properties

   rb8509_adc12 "adc12" =       // the most verbose card definition ( with '=' and ';' )
   {                            // the initializer
      address = 0xC0;           // the card address property

      has_ext_trigger = false   // or: no; no external trigger input on front
      num_channels    = 8;      // or: 4 on some modules
      bipolar         = true;   // or: yes
      volt_per_bit    = 5e-3;   // or: 5m, or 5 m
   };                           // end of initializer

   rb8510_dac12 "dac12-ch0"     // the simplest card definition with initializer
   {
   }

   rb8510_dac12 "dac12-ch1" =
   {
      address      = 0xD2
      bipolar      = true
      volt_per_bit = 5 m
   }

   rb8514_delay "delay0" =
   {
      /* address = 0xA0 */
   }

   rb8514_delay "delay1" =
   {
      address    = 0xA4
      intr_delay = 50 n         // 50 ns intrinsic delay
   }

   rb8515_clock "clock1";       // using defaults
}

/*
 * end of file
 */


Generated on Tue Oct 12 14:11:57 2004 for Rulbus Device Class Library for Microsoft Windows by doxygen 1.3.4