Changeset 1112


Ignore:
Timestamp:
Sep 17, 2012 9:46:02 AM (10 years ago)
Author:
cschlep
Message:

added more rdef test cases to test-battery.mac

File:
1 edited

Legend:

Unmodified
Added
Removed
  • specdomain/trunk/src/specdomain/macros/test-battery.mac

    r1070 r1112  
    77* sample file to test sphinx documentation of SPEC macro files
    88
    9 This file contains SPEC macro fragments to test various 
     9This file contains SPEC macro fragments to test various
    1010parts of the SPHINX documentation builder.
    1111"""
     
    2525common/shutter
    2626==============
    27  
     27
    2828NAME
    2929   shutter.mac
    30  
     30
    3131SUMMARY
    3232   Commands to control a fast photon shutter.
    33  
     33
    3434DESCRIPTION
    3535   The macro causes the fast photon shutter to be opened immediately prior to
     
    3737   delay time assures that the shutter is fully open before issuing the
    3838   count command.
    39  
     39
    4040   The photon shutter is controlled via an EPICS binary output channel, and
    4141   the shutter status is optionally monitored via a binary input channel (in
    4242   which case the delay time is not used, but the monitor signal is used to
    4343   check for completion of the opening process).
    44  
     44
    4545AUTHOR
    4646   Christian M. Schlepuetz (CS, cschlep)
    47  
     47
    4848CREATION DATE
    4949   2004/11/06
    50  
     50
    5151COPYRIGHT
    5252   Copyright 2006-2011 by the above authors (see AUTHOR/AUTHORS)
    53  
     53
    5454   This program is free software: you can redistribute it and/or modify
    5555   it under the terms of the GNU General Public License as published by
    5656   the Free Software Foundation, either version 3 of the License, or
    5757   (at your option) any later version.
    58  
     58
    5959   This program is distributed in the hope that it will be useful,
    6060   but WITHOUT ANY WARRANTY; without even the implied warranty of
    6161   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    6262   GNU General Public License for more details.
    63  
     63
    6464   You should have received a copy of the GNU General Public License
    6565   along with this program.  If not, see http://www.gnu.org/licenses/.
    66  
     66
    6767VERSION::
    68  
     68
    6969   $. Date: 2010-11-04 19:06:06 -0400 (Thu, 04 Nov 2010) $
    7070   $. Author: cschlep $
    7171   $. URL: file:///data/svn/software/spec/trunk/common/shutter.mac $
    7272   $. Revision: 17 $
    73  
     73
    7474DEPENDENCIES
    7575   Chained macro definitions affected by this macro:
    76    
     76
    7777   - user_precount
    7878   - user_getcounts
    7979   - cleanup_always
    80  
     80
    8181HISTORY
    8282   2004/11/06 (CS):
    83    
    84            - modified the first original version to comply with naming and format 
     83
     84           - modified the first original version to comply with naming and format
    8585             conventions
    8686           - implemented help-file support and wrote help texts.
    8787             2010/03/30 (CS):
    8888           - added the following global variables to make macro more easily portable::
    89          
     89
    9090                    SHUTTER_CONTROL_PV      # EPICS PV name for the shutter control (bo)
    9191                    SHUTTER_CONTROL_OPEN    # EPICS control value for open shutter
     
    9696                    SHUTTER_IS_ON           # flag for automatic shutter control
    9797                    SHUTTER_SLEEP_TIME      # SPEC sleep time after opening shutter
    98  
     98
    9999   2010/07/23 (CS):
    100100           - added SVN keywords (replacing CVS keywords)
    101  
     101
    102102   2011/12/19 (CS):
    103103           - reformatted code documentation to work with ROBODoc
    104104           - added shutter_setup with following internal macros:
    105          
     105
    106106             * _shutter_print_setup
    107107             * _shutter_set_option
    108108             * _clear_screen
    109          
     109
    110110           - replaced SHUTTER_STATUS* with SHUTTER_MONITOR*
    111111           - replaced global variables _OPEN with _OPEN_VAL and
     
    122122
    123123    # EPICS PV of the binary output which controls the shutter
    124    
     124
    125125    global SHUTTER_CONTROL_PV
    126126           SHUTTER_CONTROL_PV = "X04SA-ES3-SC:FPS"
     
    134134    # EPICS PV of the binary input which monitors the state of the shutter
    135135    # if SHUTTER_MONITOR_PV = "", no monitoring is performed
    136    
     136
    137137    global SHUTTER_MONITOR_PV
    138138           SHUTTER_MONITOR_PV = ""
     
    163163        """
    164164        sh_help, shutter_help: Displays the shutter help text.
    165        
     165
    166166        usage::
    167        
     167
    168168           > sh_help
    169        
     169
    170170        .. note::
    171171           The help text is generated by simply displaying the text file
     
    214214'
    215215
    216   # cleanup macro for ^C usage
    217   rdef _cleanup3 \'resetUSAXS\'
    218   rdef _cleanup3 \'\'
    219      cdef("Fheader", fheader,  "UCOL", 0x20)
    220      rdef Flabel \'""\'
     216# cleanup macros for ^C usage
     217rdef _cleanup3 \'resetUSAXS\'
     218rdef _cleanup3 \'\'
     219cdef("Fheader", fheader,  "UCOL", 0x20)
     220rdef Flabel \'""\'
     221
     222
     223# rdef of a macro function with no arguments
     224#: open the shutter before an exposure
     225rdef shutter_user_precount_func() \'{shutter_open}; \'
     226
     227#: Add :spec:rdef:`shutter_user_precount_func()` to :spec:cdef:`user_precount`
     228cdef("user_precount", "{shutter_user_precount_func()}; ", "shutter_key")
     229
     230# rdef of a macro function with two arguments
     231rdef maximum_value(a, b) '{
     232  """
     233  Return the larger of two values.
     234
     235  """
     236
     237  return a > b ? a : b
     238}'
     239
     240#: Remove :spec:rdef:`shutter_user_precount_func()` from :spec:cdef:`user_precount`
     241cdef("user_precount", "", "shutter_key", "delete")
    221242
    222243#==============================================================================
     
    234255global MULTI_IMGS # useful 8-ID's IMM fileformat; currently not used
    235256
    236 #: twice the ratio of a circle's circumference to its diameter   
     257#: twice the ratio of a circle's circumference to its diameter
    237258constant TWO_PI 6.283
    238259local _newspaper        #: don't expect to see new ones
     
    263284#==============================================================================
    264285
    265 
    266286"""End of $Id$"""
Note: See TracChangeset for help on using the changeset viewer.