This application can be used to provide slowly updating pulse-by-pulse signal waveform
PVs--effectively, as a gateway to reduce the load on real-time IOCs. At a low rate
(2 Hz), these waveform records caget the full 2800 BSA waveform from the IOC that
supports the actual hardware. This is a means to provide pulse-by-pulse waveforms
that can be displayed in MCC or on edm displays without placing such a heavy load
on the IOC. 

The waveform PVs will have the same name as the BSA PV, but with 'DSP' tacked onto the end.
For example, a BR (beam-rate) EDEF BPM signal would be:

BPMS:IN20:221:XHSTBRDSP (source PV is BPMS:IN20:221:XHSTBR)

This program does time-stamp checking in order to provide a synchronous data set.

For more details, see bpmSoftApp/src/bpmDisp.stt

...

To use this support:

1. Create a database substitutions file, similar to the following, with 1 instance
 of dispSignal.template for each signal

==============================================================================
#
# Abs:  BSA PV intermediary for displays
#
# Name: SIOC-SYS0-BP02.substitutions
#
# Associated Display:
#
# Rem:
#
# Macros:
#
#       DEV     Device name, for example BPMS:IN20:221
#       ATTR    Device attribute, for example X or TMIT
#       EDEF    BSA EDEF, for example BR or TH
#       HOPR
#       LOPR
#       EGU
#
#==============================================================================

file dispSignal.template
{
pattern { DEV           , ATTR  , EDEF  , HOPR , LOPR , EGU  }

# X PVs
        { BPMS:IN20:731 , X     , BR    , 3    , -3   , mm   }
        { BPMS:LI21:233 , X     , BR    , 3    , -3   , mm   }
        { BPMS:LI24:801 , X     , BR    , 3    , -3   , mm   }
        { BPMS:LTU1:250 , X     , BR    , 3    , -3   , mm   }
        { BPMS:LTU1:450 , X     , BR    , 3    , -3   , mm   }

# Y PVs
        { BPMS:LTU1:350 , Y     , BR    , 3    , -3   , mm   }
        { BPMS:DMP1:693 , Y     , BR    , 3    , -3   , mm   }

# TMIT PVs
#       {               , TMIT  , BR    , 1E11 , 0    , Nel  }
}

file dispSeqSupport.template
{
pattern { IOC                   }
        { SIOC:SYS0:BP02        }
}



2. Execute the sequence program bpmDisp from st.cmd after iocInit. 

Example for LCLS, with 7 BPM signals hosted by soft ioc SIOC:SYS0:BP02:

seq bpmDisp,"N=7,SIG0=BPMS:IN20:731:X,SIG1=BPMS:LI21:233:X,SIG2=BPMS:LI24:801:X,SIG3=BPMS:LTU1:250:X,SIG4=BPMS:LTU1:450:X,SIG5=BPMS:LTU1:350:Y,SIG6=BPMS:DMP1:693:Y,SIG7=SIOC:SYS0:BP02:,SIG8=SIOC:SYS0:BP02:,SIG9=SIOC:SYS0:BP02:,SIG10=SIOC:SYS0:BP02:,SIG11=SIOC:SYS0:BP02:,IOC=SIOC:SYS0:BP02:"
              
Macro definitions:

               N         Number of signals 
               SIG0, SIG1, ..., SIG11      
                         Signal name, ex. BPMS:IN20:221:X
                         Unused signals should be set to $(IOC): (this is kind of goofy means to prevent disconnected CA links)
               IOC       Name of ioc executing the program


3. IMPORTANT - The max number of signals was arbitrarily set to 12. To increase this, you will need to
   change some hard-coded array sizes in bpmDisp.stt. See that file for more details.
