/* C code for program chirpScan, generated by snc from ../chirpScan.st */ #include #include #include #include #include "seq_snc.h" # line 11 "../chirpScan.st" # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 1 3 4 # 26 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/features.h" 1 3 4 # 368 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/features.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/sys/cdefs.h" 1 3 4 # 410 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/sys/cdefs.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/wordsize.h" 1 3 4 # 411 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/sys/cdefs.h" 2 3 4 # 369 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/features.h" 2 3 4 # 392 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/features.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/gnu/stubs.h" 1 3 4 # 10 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/gnu/stubs.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/gnu/stubs-64.h" 1 3 4 # 11 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/gnu/stubs.h" 2 3 4 # 393 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/features.h" 2 3 4 # 27 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/math-vector.h" 1 3 4 # 25 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/math-vector.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/libm-simd-decl-stubs.h" 1 3 4 # 26 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/math-vector.h" 2 3 4 # 32 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/huge_val.h" 1 3 4 # 36 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/huge_valf.h" 1 3 4 # 38 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/huge_vall.h" 1 3 4 # 39 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/inf.h" 1 3 4 # 42 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/nan.h" 1 3 4 # 45 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathdef.h" 1 3 4 # 28 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathdef.h" 3 4 # 28 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathdef.h" 3 4 typedef float float_t; typedef double double_t; # 49 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 83 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathcalls.h" 1 3 4 # 52 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathcalls.h" 3 4 extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)) ; extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern double exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double pow10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern int __issignaling (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); # 84 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 104 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathcalls.h" 1 3 4 # 52 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathcalls.h" 3 4 extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)) ; extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern float exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float pow10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern int __issignalingf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); # 105 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 151 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 # 1 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathcalls.h" 1 3 4 # 52 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/mathcalls.h" 3 4 extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)) ; extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern long double exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double pow10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); __extension__ extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern int __issignalingl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); # 152 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 2 3 4 # 168 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 extern int signgam; # 209 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 enum { FP_NAN = 0, FP_INFINITE = 1, FP_ZERO = 2, FP_SUBNORMAL = 3, FP_NORMAL = 4 }; # 347 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 372 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 struct exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct exception *__exc); # 534 "/afs/slac.stanford.edu/package/linuxRT/vol6/buildroot-2016.11.1/host/linux-x86_64/x86_64/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include/math.h" 3 4 # 14 "../chirpScan.st" 2 # 21 "../chirpScan.st" void chirp_calc_dds(float offset, float *offset_exact, int *dds_step_combined, int *dds_step_h) { double tstep = 14/1320.0e6; int ph_step_l_wi = 12; int ph_step_l = 868; *dds_step_h = 222425 - round( offset * pow(2,20) * tstep ); *dds_step_combined = (*dds_step_h * pow(2,ph_step_l_wi)) + ph_step_l; *offset_exact = 20.0e6 - ((*dds_step_h + (ph_step_l)/4092.0) * pow(0.5,20)/tstep); } # 59 "../chirpScan.st" TS_STAMP df_ts; TS_STAMP rms_ts; # line 139 "../chirpScan.st" static const EF_ID ef_rms = 1; # line 249 "../chirpScan.st" static const EF_ID ef_scan_request = 2; # line 252 "../chirpScan.st" static const EF_ID ef_abort_request = 3; # line 337 "../chirpScan.st" static const EF_ID ef_rcvd_request = 4; # line 338 "../chirpScan.st" static const EF_ID ef_build_scan = 5; # line 339 "../chirpScan.st" static const EF_ID ef_setup_scan = 6; # line 340 "../chirpScan.st" static const EF_ID ef_start_scan = 7; # line 341 "../chirpScan.st" static const EF_ID ef_start_scan_step = 8; # line 342 "../chirpScan.st" static const EF_ID ef_post_scan = 9; /* Variable declarations */ struct seqg_vars { # line 64 "../chirpScan.st" int df_sevr; # line 65 "../chirpScan.st" int rms_sevr; # line 67 "../chirpScan.st" int noffset; # line 68 "../chirpScan.st" float offset[50]; # line 69 "../chirpScan.st" float offset_exact[50]; # line 71 "../chirpScan.st" float offset_exact_final; # line 72 "../chirpScan.st" int offset_index; # line 73 "../chirpScan.st" int index; # line 76 "../chirpScan.st" char cavstr[4][5]; # line 79 "../chirpScan.st" int rfmodectrl[4]; # line 86 "../chirpScan.st" int rfctrl[4]; # line 93 "../chirpScan.st" int cavsel[4]; # line 100 "../chirpScan.st" int rfctrlenable[4]; # line 107 "../chirpScan.st" int rfstate[4]; # line 114 "../chirpScan.st" float df[4]; # line 122 "../chirpScan.st" float amax[4]; # line 133 "../chirpScan.st" float rms[4]; # line 143 "../chirpScan.st" float bw[4]; # line 153 "../chirpScan.st" float fitrms[4]; # line 161 "../chirpScan.st" float df_best[4]; # line 167 "../chirpScan.st" float rms_best[4]; # line 173 "../chirpScan.st" float fitrms_best[4]; # line 179 "../chirpScan.st" float bw_best[4]; # line 185 "../chirpScan.st" float amax_best[4]; # line 192 "../chirpScan.st" float df_bestwf_offs[4][50]; # line 193 "../chirpScan.st" float df_bestwf[4][50]; # line 200 "../chirpScan.st" float rms_bestwf[4][50]; # line 207 "../chirpScan.st" float bw_bestwf[4][50]; # line 214 "../chirpScan.st" float fitrms_bestwf[4][50]; # line 221 "../chirpScan.st" float amax_bestwf[4][50]; # line 227 "../chirpScan.st" int cav_f_start_init[4]; # line 228 "../chirpScan.st" int cav_f_stop_init[4]; # line 231 "../chirpScan.st" int cav_f_start[4]; # line 238 "../chirpScan.st" int cav_f_stop[4]; # line 245 "../chirpScan.st" int rack_scan_start; # line 255 "../chirpScan.st" int rack_scan_stat; # line 260 "../chirpScan.st" int rack_f_step; # line 264 "../chirpScan.st" int rack_f_start; # line 268 "../chirpScan.st" int rack_f_stop; # line 272 "../chirpScan.st" int rms_thresh; # line 277 "../chirpScan.st" int phase_reset_rfs[4]; # line 285 "../chirpScan.st" int phase_step_rfs[4]; # line 292 "../chirpScan.st" int phase_step_h_prc; # line 296 "../chirpScan.st" int phase_reset_prc; # line 300 "../chirpScan.st" int nacq; # line 305 "../chirpScan.st" int found[4][50]; # line 306 "../chirpScan.st" int found_index[4]; # line 307 "../chirpScan.st" int nfound[4]; # line 314 "../chirpScan.st" int df_tx_enable[4]; # line 320 "../chirpScan.st" int df_tx_enable_init[4]; # line 322 "../chirpScan.st" int i; # line 322 "../chirpScan.st" int j; # line 322 "../chirpScan.st" int k; # line 324 "../chirpScan.st" string debug_msg; # line 327 "../chirpScan.st" int debug; # line 331 "../chirpScan.st" float overlap; # line 333 "../chirpScan.st" int dds_step_combined; # line 334 "../chirpScan.st" int dds_step_h; # line 344 "../chirpScan.st" int ncavsel; # line 345 "../chirpScan.st" int range; # line 346 "../chirpScan.st" int freq_check; # line 349 "../chirpScan.st" int skip[4]; # line 350 "../chirpScan.st" int error[4]; # line 351 "../chirpScan.st" int status[4]; # line 352 "../chirpScan.st" int ntries; # line 352 "../chirpScan.st" int ntries_newdata; }; /* Function declarations */ #define seqg_var (*(struct seqg_vars *const *)seqg_env) /* Program init func */ static void seqg_init(PROG_ID seqg_env) { { # line 331 "../chirpScan.st" static float seqg_initvar_overlap = 0.8; memcpy(&seqg_var->overlap, &seqg_initvar_overlap, sizeof(seqg_initvar_overlap)); } } /****** Code for state "init" in state set "main" ******/ /* Entry function for state "init" in state set "main" */ static void seqg_entry_main_0_init(SS_ID seqg_env) { # line 357 "../chirpScan.st" if (seqg_var->debug) { # line 358 "../chirpScan.st" printf("Entered chirp_scan init\n"); } } /* Event function for state "init" in state set "main" */ static seqBool seqg_event_main_0_init(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { # line 361 "../chirpScan.st" if (seq_pvConnectCount(seqg_env) == seq_pvAssignCount(seqg_env)) { *seqg_pnst = 1; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "init" in state set "main" */ static void seqg_action_main_0_init(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 362 "../chirpScan.st" if (seqg_var->debug >= 2) { # line 363 "../chirpScan.st" printf("pvConnect=pvAssign\n"); } # line 365 "../chirpScan.st" strcpy(seqg_var->cavstr[0], seq_macValueGet(seqg_env, "CAVA")); # line 366 "../chirpScan.st" strcpy(seqg_var->cavstr[1], seq_macValueGet(seqg_env, "CAVB")); # line 367 "../chirpScan.st" strcpy(seqg_var->cavstr[2], seq_macValueGet(seqg_env, "CAVC")); # line 368 "../chirpScan.st" strcpy(seqg_var->cavstr[3], seq_macValueGet(seqg_env, "CAVD")); # line 369 "../chirpScan.st" seq_efTestAndClear(seqg_env, ef_scan_request); # line 370 "../chirpScan.st" seq_efTestAndClear(seqg_env, ef_abort_request); # line 371 "../chirpScan.st" seq_efTestAndClear(seqg_env, ef_rcvd_request); # line 372 "../chirpScan.st" seq_efTestAndClear(seqg_env, ef_setup_scan); # line 373 "../chirpScan.st" seq_efTestAndClear(seqg_env, ef_start_scan); # line 374 "../chirpScan.st" seq_efTestAndClear(seqg_env, ef_rms); # line 375 "../chirpScan.st" seq_efTestAndClear(seqg_env, ef_post_scan); } return; } } /****** Code for state "ready_for_request" in state set "main" ******/ /* Entry function for state "ready_for_request" in state set "main" */ static void seqg_entry_main_0_ready_for_request(SS_ID seqg_env) { # line 381 "../chirpScan.st" seqg_var->rack_scan_stat = 0; # line 382 "../chirpScan.st" seq_pvPutTmo(seqg_env, 90/*rack_scan_stat*/, DEFAULT, DEFAULT_TIMEOUT); # line 383 "../chirpScan.st" if (seqg_var->debug) { # line 384 "../chirpScan.st" printf("Ready for request\n"); } # line 386 "../chirpScan.st" seqg_var->ncavsel = 0; } /* Event function for state "ready_for_request" in state set "main" */ static seqBool seqg_event_main_0_ready_for_request(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { # line 388 "../chirpScan.st" if (seq_efTestAndClear(seqg_env, ef_scan_request)) { *seqg_pnst = 1; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "ready_for_request" in state set "main" */ static void seqg_action_main_0_ready_for_request(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 389 "../chirpScan.st" if (seqg_var->rack_scan_start == 1) { # line 390 "../chirpScan.st" seq_efSet(seqg_env, ef_rcvd_request); } } return; } } /****** Code for state "rcvd_request" in state set "start_request_recevied" ******/ /* Event function for state "rcvd_request" in state set "start_request_recevied" */ static seqBool seqg_event_start_request_recevied_1_rcvd_request(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { # line 398 "../chirpScan.st" if (seq_efTestAndClear(seqg_env, ef_rcvd_request)) { *seqg_pnst = 0; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "rcvd_request" in state set "start_request_recevied" */ static void seqg_action_start_request_recevied_1_rcvd_request(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 399 "../chirpScan.st" if (seqg_var->debug >= 2) { # line 400 "../chirpScan.st" printf("\nReceived request\n"); } # line 402 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 403 "../chirpScan.st" seq_pvGetTmo(seqg_env, 9/*cavsel*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 404 "../chirpScan.st" seqg_var->ncavsel += seqg_var->cavsel[seqg_var->i]; } # line 406 "../chirpScan.st" if (seqg_var->debug) { # line 409 "../chirpScan.st" printf("Cavity selection %s %i %s %i %s %i %s %i, total %i\n", seqg_var->cavstr[0], seqg_var->cavsel[0], seqg_var->cavstr[1], seqg_var->cavsel[1], seqg_var->cavstr[2], seqg_var->cavsel[2], seqg_var->cavstr[3], seqg_var->cavsel[3], seqg_var->ncavsel); } # line 411 "../chirpScan.st" if (seqg_var->ncavsel > 0) { # line 412 "../chirpScan.st" for (seqg_var->j = 0; seqg_var->j < 50; seqg_var->j++) { # line 413 "../chirpScan.st" seqg_var->offset[seqg_var->j] = -1; # line 414 "../chirpScan.st" seqg_var->offset_exact[seqg_var->j] = -1; # line 415 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 416 "../chirpScan.st" seqg_var->nfound[seqg_var->i] = 0; # line 417 "../chirpScan.st" seqg_var->found[seqg_var->i][seqg_var->j] = 0; # line 418 "../chirpScan.st" seqg_var->df_bestwf[seqg_var->i][seqg_var->j] = -1; # line 419 "../chirpScan.st" seqg_var->rms_bestwf[seqg_var->i][seqg_var->j] = -1; # line 420 "../chirpScan.st" seqg_var->fitrms_bestwf[seqg_var->i][seqg_var->j] = -1; # line 421 "../chirpScan.st" seqg_var->bw_bestwf[seqg_var->i][seqg_var->j] = -1; # line 422 "../chirpScan.st" seqg_var->amax_bestwf[seqg_var->i][seqg_var->j] = -1; } } # line 425 "../chirpScan.st" seq_efSet(seqg_env, ef_build_scan); } else { # line 428 "../chirpScan.st" seqg_var->rack_scan_stat = 1; # line 429 "../chirpScan.st" seq_pvPutTmo(seqg_env, 90/*rack_scan_stat*/, DEFAULT, DEFAULT_TIMEOUT); } # line 431 "../chirpScan.st" seq_efTestAndClear(seqg_env, ef_scan_request); } return; } } /****** Code for state "build_scan" in state set "prepare_scan" ******/ /* Event function for state "build_scan" in state set "prepare_scan" */ static seqBool seqg_event_prepare_scan_2_build_scan(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { # line 438 "../chirpScan.st" if (seq_efTestAndClear(seqg_env, ef_build_scan)) { *seqg_pnst = 0; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "build_scan" in state set "prepare_scan" */ static void seqg_action_prepare_scan_2_build_scan(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 439 "../chirpScan.st" seq_pvGetTmo(seqg_env, 92/*rack_f_start*/, DEFAULT, DEFAULT_TIMEOUT); # line 440 "../chirpScan.st" seq_pvGetTmo(seqg_env, 93/*rack_f_stop*/, DEFAULT, DEFAULT_TIMEOUT); # line 441 "../chirpScan.st" seq_pvGetTmo(seqg_env, 91/*rack_f_step*/, DEFAULT, DEFAULT_TIMEOUT); # line 442 "../chirpScan.st" seqg_var->range = seqg_var->rack_f_stop - seqg_var->rack_f_start; # line 443 "../chirpScan.st" if (seqg_var->debug) { # line 445 "../chirpScan.st" printf("Scan parameters freq start %i stop %i range %i step %i\n", seqg_var->rack_f_start, seqg_var->rack_f_stop, seqg_var->range, seqg_var->rack_f_step); } # line 451 "../chirpScan.st" seqg_var->freq_check = 0; # line 452 "../chirpScan.st" if ((seqg_var->range > 0) && (seqg_var->rack_f_step > 0)) { # line 453 "../chirpScan.st" seqg_var->freq_check = 1; # line 454 "../chirpScan.st" if (seqg_var->rack_f_step >= seqg_var->range) { # line 455 "../chirpScan.st" seqg_var->noffset = 1; # line 456 "../chirpScan.st" seqg_var->offset[0] = seqg_var->rack_f_start + (seqg_var->range / 2); } else { # line 459 "../chirpScan.st" seqg_var->noffset = round((seqg_var->rack_f_stop - seqg_var->rack_f_start) / (seqg_var->rack_f_step * seqg_var->overlap)); # line 460 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < seqg_var->noffset; seqg_var->i++) { # line 461 "../chirpScan.st" seqg_var->offset[seqg_var->i] = seqg_var->rack_f_start + ((2 * seqg_var->i + 1) * (seqg_var->rack_f_step * seqg_var->overlap / 2)); } } } # line 466 "../chirpScan.st" seqg_var->freq_check = seqg_var->freq_check && (seqg_var->noffset > 0) && (seqg_var->noffset < 50); # line 468 "../chirpScan.st" if (seqg_var->freq_check) { # line 469 "../chirpScan.st" if (seqg_var->debug) { # line 470 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < seqg_var->noffset; seqg_var->i++) { # line 471 "../chirpScan.st" printf("Scan offset %i %.1f kHz\n", seqg_var->i, seqg_var->offset[seqg_var->i] / 1e3); } } # line 474 "../chirpScan.st" seq_efSet(seqg_env, ef_setup_scan); } else { # line 477 "../chirpScan.st" seqg_var->rack_scan_stat = 2; # line 478 "../chirpScan.st" seq_pvPutTmo(seqg_env, 90/*rack_scan_stat*/, DEFAULT, DEFAULT_TIMEOUT); # line 479 "../chirpScan.st" if (seqg_var->debug) { # line 480 "../chirpScan.st" printf("Bad scan parameters, abort\n"); } } } return; } } /****** Code for state "setup_cavities" in state set "setup_scan" ******/ /* Event function for state "setup_cavities" in state set "setup_scan" */ static seqBool seqg_event_setup_scan_3_setup_cavities(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { # line 489 "../chirpScan.st" if (seq_efTestAndClear(seqg_env, ef_setup_scan)) { *seqg_pnst = 1; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "setup_cavities" in state set "setup_scan" */ static void seqg_action_setup_scan_3_setup_cavities(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 493 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 494 "../chirpScan.st" if (seqg_var->cavsel[seqg_var->i] == 0) { # line 495 "../chirpScan.st" seqg_var->rfctrl[seqg_var->i] = 0; # line 496 "../chirpScan.st" seq_pvPutTmo(seqg_env, 5/*rfctrl*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 497 "../chirpScan.st" seqg_var->rfctrlenable[seqg_var->i] = -1; # line 498 "../chirpScan.st" seq_pvPutTmo(seqg_env, 13/*rfctrlenable*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); } else { # line 501 "../chirpScan.st" seq_pvGetTmo(seqg_env, 81/*cav_f_start*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 502 "../chirpScan.st" seq_pvGetTmo(seqg_env, 85/*cav_f_stop*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 503 "../chirpScan.st" seqg_var->cav_f_start_init[seqg_var->i] = seqg_var->cav_f_start[seqg_var->i]; # line 504 "../chirpScan.st" seqg_var->cav_f_stop_init[seqg_var->i] = seqg_var->cav_f_stop[seqg_var->i]; # line 506 "../chirpScan.st" seqg_var->cav_f_start[seqg_var->i] = -seqg_var->rack_f_step / 2; # line 507 "../chirpScan.st" seq_pvPutTmo(seqg_env, 81/*cav_f_start*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 508 "../chirpScan.st" seqg_var->cav_f_stop[seqg_var->i] = seqg_var->rack_f_step / 2; # line 509 "../chirpScan.st" seq_pvPutTmo(seqg_env, 85/*cav_f_stop*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 510 "../chirpScan.st" seqg_var->rfmodectrl[seqg_var->i] = 5; # line 511 "../chirpScan.st" seq_pvPutTmo(seqg_env, 1/*rfmodectrl*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 512 "../chirpScan.st" seqg_var->rfctrl[seqg_var->i] = 1; # line 513 "../chirpScan.st" seq_pvPutTmo(seqg_env, 5/*rfctrl*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); } } } return; } } /****** Code for state "disable_df_tx" in state set "setup_scan" ******/ /* Entry function for state "disable_df_tx" in state set "setup_scan" */ static void seqg_entry_setup_scan_3_disable_df_tx(SS_ID seqg_env) { # line 521 "../chirpScan.st" if (seqg_var->debug) { # line 522 "../chirpScan.st" printf("Entered disable_df_tx\n"); } } /* Event function for state "disable_df_tx" in state set "setup_scan" */ static seqBool seqg_event_setup_scan_3_disable_df_tx(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { if (TRUE) { *seqg_pnst = 0; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "disable_df_tx" in state set "setup_scan" */ static void seqg_action_setup_scan_3_disable_df_tx(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 526 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 527 "../chirpScan.st" seq_pvGetTmo(seqg_env, 110/*df_tx_enable*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 528 "../chirpScan.st" seqg_var->df_tx_enable_init[seqg_var->i] = seqg_var->df_tx_enable[seqg_var->i]; # line 529 "../chirpScan.st" seqg_var->df_tx_enable[seqg_var->i] = 0; # line 530 "../chirpScan.st" seq_pvPutTmo(seqg_env, 110/*df_tx_enable*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 531 "../chirpScan.st" if (seqg_var->debug >= 2) { # line 533 "../chirpScan.st" printf("Cavity %s init df tx enable %i\n", seqg_var->cavstr[seqg_var->i], seqg_var->df_tx_enable_init[seqg_var->i]); } } # line 536 "../chirpScan.st" seq_efSet(seqg_env, ef_start_scan); } return; } } /****** Code for state "start_scan" in state set "perform_scan" ******/ /* Entry function for state "start_scan" in state set "perform_scan" */ static void seqg_entry_perform_scan_4_start_scan(SS_ID seqg_env) { } /* Event function for state "start_scan" in state set "perform_scan" */ static seqBool seqg_event_perform_scan_4_start_scan(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { # line 545 "../chirpScan.st" if (seq_efTestAndClear(seqg_env, ef_start_scan)) { *seqg_pnst = 0; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "start_scan" in state set "perform_scan" */ static void seqg_action_perform_scan_4_start_scan(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 547 "../chirpScan.st" seqg_var->rack_scan_stat = 3; # line 548 "../chirpScan.st" seq_pvPutTmo(seqg_env, 90/*rack_scan_stat*/, DEFAULT, DEFAULT_TIMEOUT); # line 549 "../chirpScan.st" if (seqg_var->debug) { # line 550 "../chirpScan.st" printf("Starting new scan\n"); } # line 552 "../chirpScan.st" seqg_var->offset_index = 0; # line 553 "../chirpScan.st" seq_efSet(seqg_env, ef_start_scan_step); } return; } } /****** Code for state "start_scan_step" in state set "perform_scan_step" ******/ /* Event function for state "start_scan_step" in state set "perform_scan_step" */ static seqBool seqg_event_perform_scan_step_5_start_scan_step(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { # line 560 "../chirpScan.st" if (seq_efTestAndClear(seqg_env, ef_start_scan_step)) { *seqg_pnst = 1; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "start_scan_step" in state set "perform_scan_step" */ static void seqg_action_perform_scan_step_5_start_scan_step(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 561 "../chirpScan.st" if (seqg_var->debug) { # line 562 "../chirpScan.st" printf("\nPerform scan step %i\n", seqg_var->offset_index); } } return; } } /****** Code for state "scan_step_setup_dds" in state set "perform_scan_step" ******/ /* Entry function for state "scan_step_setup_dds" in state set "perform_scan_step" */ static void seqg_entry_perform_scan_step_5_scan_step_setup_dds(SS_ID seqg_env) { # line 569 "../chirpScan.st" if (seqg_var->debug) { # line 571 "../chirpScan.st" printf("Start step at offset %i %.1f kHz\n", seqg_var->offset_index, seqg_var->offset[seqg_var->offset_index] / 1e3); } } /* Event function for state "scan_step_setup_dds" in state set "perform_scan_step" */ static seqBool seqg_event_perform_scan_step_5_scan_step_setup_dds(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { if (TRUE) { *seqg_pnst = 2; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "scan_step_setup_dds" in state set "perform_scan_step" */ static void seqg_action_perform_scan_step_5_scan_step_setup_dds(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 576 "../chirpScan.st" chirp_calc_dds(seqg_var->offset[seqg_var->offset_index], &(seqg_var->offset_exact[seqg_var->offset_index]), &seqg_var->dds_step_combined, &seqg_var->dds_step_h); # line 577 "../chirpScan.st" seqg_var->phase_step_h_prc = seqg_var->dds_step_h; # line 578 "../chirpScan.st" seq_pvPutTmo(seqg_env, 103/*phase_step_h_prc*/, DEFAULT, DEFAULT_TIMEOUT); # line 580 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 581 "../chirpScan.st" if (seqg_var->cavsel[seqg_var->i] == 1) { # line 582 "../chirpScan.st" seqg_var->phase_step_rfs[seqg_var->i] = seqg_var->dds_step_combined; # line 583 "../chirpScan.st" seq_pvPutTmo(seqg_env, 99/*phase_step_rfs*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); } } # line 587 "../chirpScan.st" epicsThreadSleep(1.0); } return; } } /****** Code for state "scan_step_read_detune" in state set "perform_scan_step" ******/ /* Event function for state "scan_step_read_detune" in state set "perform_scan_step" */ static seqBool seqg_event_perform_scan_step_5_scan_step_read_detune(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { if (TRUE) { *seqg_pnst = 0; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "scan_step_read_detune" in state set "perform_scan_step" */ static void seqg_action_perform_scan_step_5_scan_step_read_detune(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 594 "../chirpScan.st" for (seqg_var->k = 0; seqg_var->k < seqg_var->nacq; seqg_var->k++) { # line 595 "../chirpScan.st" seqg_var->ntries_newdata = 0; # line 596 "../chirpScan.st" while ((0 == seq_efTestAndClear(seqg_env, ef_rms)) && (seqg_var->ntries_newdata < 5)) { # line 597 "../chirpScan.st" epicsThreadSleep(0.2); # line 598 "../chirpScan.st" seqg_var->ntries_newdata++; } # line 600 "../chirpScan.st" if (seqg_var->ntries_newdata >= 5) { # line 601 "../chirpScan.st" if (seqg_var->debug) { # line 602 "../chirpScan.st" printf("No new data for acquisition %i, skipping \n", seqg_var->k); continue; } } # line 606 "../chirpScan.st" if (seqg_var->debug) { # line 608 "../chirpScan.st" printf("Data acquisition %i out of %i at this offset, waited %.1f s for new data\n", seqg_var->k, seqg_var->nacq, seqg_var->ntries_newdata * 0.2); } # line 610 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 611 "../chirpScan.st" if (seqg_var->cavsel[seqg_var->i] == 1) { # line 612 "../chirpScan.st" if (seqg_var->k == 0) { # line 613 "../chirpScan.st" seqg_var->skip[seqg_var->i] = 0; } # line 615 "../chirpScan.st" seqg_var->ntries = 1; # line 616 "../chirpScan.st" seq_pvGetTmo(seqg_env, 25/*amax*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 620 "../chirpScan.st" seqg_var->df_sevr = seq_pvSeverity(seqg_env, 21/*df*/ + (CH_ID)(seqg_var->i)); # line 621 "../chirpScan.st" seqg_var->rms_sevr = seq_pvSeverity(seqg_env, 29/*rms*/ + (CH_ID)(seqg_var->i)); # line 622 "../chirpScan.st" if ((seqg_var->df_sevr > 2) || (seqg_var->rms_sevr > 2)) { # line 623 "../chirpScan.st" if (seqg_var->debug >= 2) { # line 624 "../chirpScan.st" printf("Cavity %s no valid data, skip\n", seqg_var->cavstr[seqg_var->i]); } continue; } # line 630 "../chirpScan.st" df_ts = seq_pvTimeStamp(seqg_env, 21/*df*/ + (CH_ID)(seqg_var->i)); # line 631 "../chirpScan.st" rms_ts = seq_pvTimeStamp(seqg_env, 29/*rms*/ + (CH_ID)(seqg_var->i)); # line 632 "../chirpScan.st" while (((df_ts.secPastEpoch != rms_ts.secPastEpoch) || (df_ts.nsec != rms_ts.nsec)) && (seqg_var->ntries < 5)) { # line 635 "../chirpScan.st" seq_pvGetTmo(seqg_env, 25/*amax*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 636 "../chirpScan.st" df_ts = seq_pvTimeStamp(seqg_env, 21/*df*/ + (CH_ID)(seqg_var->i)); # line 637 "../chirpScan.st" rms_ts = seq_pvTimeStamp(seqg_env, 29/*rms*/ + (CH_ID)(seqg_var->i)); # line 638 "../chirpScan.st" seqg_var->ntries++; } # line 640 "../chirpScan.st" if (seqg_var->debug >= 2) { # line 641 "../chirpScan.st" if (seqg_var->ntries > 1) { # line 643 "../chirpScan.st" printf("Cavity %s %i tries to get synchronous data\n", seqg_var->cavstr[seqg_var->i], seqg_var->ntries); } } # line 646 "../chirpScan.st" if (seqg_var->ntries >= 5) { # line 647 "../chirpScan.st" if (seqg_var->debug) { # line 649 "../chirpScan.st" printf("Cavity %s failed to get synchronous data, skip\n", seqg_var->cavstr[seqg_var->i]); } # line 651 "../chirpScan.st" seqg_var->skip[seqg_var->i] = 1; # line 652 "../chirpScan.st" seqg_var->error[seqg_var->i]++; continue; } # line 656 "../chirpScan.st" if (seqg_var->skip[seqg_var->i] == 0) { # line 658 "../chirpScan.st" if (seqg_var->debug) { # line 661 "../chirpScan.st" printf("DF %.1f Hz DF+offset %.1f Hz RMS %.2f Hz BW %.1f Hz fit RMS %.1f MV/s\n", seqg_var->df[seqg_var->i], seqg_var->df[seqg_var->i] + seqg_var->offset_exact[seqg_var->offset_index], seqg_var->rms[seqg_var->i], seqg_var->bw[seqg_var->i], seqg_var->fitrms[seqg_var->i]); } # line 663 "../chirpScan.st" if ((seqg_var->rms[seqg_var->i] < seqg_var->rms_thresh) && (seqg_var->rms[seqg_var->i] > 0)) { # line 664 "../chirpScan.st" if (seqg_var->found[seqg_var->i][seqg_var->offset_index] == 0) { # line 665 "../chirpScan.st" seqg_var->df_bestwf_offs[seqg_var->i][seqg_var->offset_index] = seqg_var->df[seqg_var->i]; # line 666 "../chirpScan.st" seqg_var->df_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->df[seqg_var->i] + seqg_var->offset_exact[seqg_var->offset_index]; # line 667 "../chirpScan.st" seqg_var->rms_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->rms[seqg_var->i]; # line 668 "../chirpScan.st" seqg_var->bw_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->bw[seqg_var->i]; # line 669 "../chirpScan.st" seqg_var->fitrms_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->fitrms[seqg_var->i]; # line 670 "../chirpScan.st" seqg_var->amax_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->amax[seqg_var->i]; # line 671 "../chirpScan.st" seqg_var->found[seqg_var->i][seqg_var->offset_index] = 1; # line 672 "../chirpScan.st" seqg_var->nfound[seqg_var->i]++; # line 673 "../chirpScan.st" seqg_var->found_index[seqg_var->i] = seqg_var->offset_index; } else # line 675 "../chirpScan.st" if (seqg_var->rms[seqg_var->i] < seqg_var->rms_bestwf[seqg_var->i][seqg_var->offset_index]) { # line 676 "../chirpScan.st" seqg_var->df_bestwf_offs[seqg_var->i][seqg_var->offset_index] = seqg_var->df[seqg_var->i]; # line 677 "../chirpScan.st" seqg_var->df_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->df[seqg_var->i] + seqg_var->offset_exact[seqg_var->offset_index]; # line 678 "../chirpScan.st" seqg_var->rms_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->rms[seqg_var->i]; # line 679 "../chirpScan.st" seqg_var->bw_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->bw[seqg_var->i]; # line 680 "../chirpScan.st" seqg_var->fitrms_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->fitrms[seqg_var->i]; # line 681 "../chirpScan.st" seqg_var->amax_bestwf[seqg_var->i][seqg_var->offset_index] = seqg_var->amax[seqg_var->i]; } } } } } } # line 689 "../chirpScan.st" if (seqg_var->debug) { # line 690 "../chirpScan.st" printf("Offset %i summary:\n", seqg_var->offset_index); # line 691 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 692 "../chirpScan.st" if (seqg_var->cavsel[seqg_var->i] == 1) { # line 693 "../chirpScan.st" if (seqg_var->found[seqg_var->i][seqg_var->offset_index]) { # line 696 "../chirpScan.st" printf("Cavity %s bestwf abs DF %.3f kHz rel DF %.3f kHz RMS %.2f Hz BW %.1f Hz\n", seqg_var->cavstr[seqg_var->i], seqg_var->df_bestwf[seqg_var->i][seqg_var->offset_index] / 1e3, seqg_var->df_bestwf_offs[seqg_var->i][seqg_var->offset_index] / 1e3, seqg_var->rms_bestwf[seqg_var->i][seqg_var->offset_index], seqg_var->bw_bestwf[seqg_var->i][seqg_var->offset_index]); } else { # line 699 "../chirpScan.st" printf("Cavity %s failed to measure valid detune at this offset\n", seqg_var->cavstr[seqg_var->i]); } } } } # line 704 "../chirpScan.st" seqg_var->offset_index++; # line 706 "../chirpScan.st" if (seqg_var->offset_index < seqg_var->noffset) { # line 707 "../chirpScan.st" seq_efSet(seqg_env, ef_start_scan_step); } else { # line 710 "../chirpScan.st" seq_pvPutTmo(seqg_env, 0/*offset_exact*/, DEFAULT, DEFAULT_TIMEOUT); # line 711 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 712 "../chirpScan.st" seqg_var->index = seqg_var->found_index[seqg_var->i]; # line 713 "../chirpScan.st" seq_pvPutTmo(seqg_env, 61/*df_bestwf*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 714 "../chirpScan.st" seq_pvPutTmo(seqg_env, 65/*rms_bestwf*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 715 "../chirpScan.st" seq_pvPutTmo(seqg_env, 73/*fitrms_bestwf*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 716 "../chirpScan.st" seq_pvPutTmo(seqg_env, 69/*bw_bestwf*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 717 "../chirpScan.st" seq_pvPutTmo(seqg_env, 77/*amax_bestwf*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 718 "../chirpScan.st" seq_pvPutTmo(seqg_env, 106/*nfound*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 719 "../chirpScan.st" if (seqg_var->nfound[seqg_var->i] == 1) { # line 720 "../chirpScan.st" seqg_var->df_best[seqg_var->i] = seqg_var->df_bestwf[seqg_var->i][seqg_var->index]; # line 721 "../chirpScan.st" seq_pvPutTmo(seqg_env, 41/*df_best*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 722 "../chirpScan.st" seqg_var->rms_best[seqg_var->i] = seqg_var->rms_bestwf[seqg_var->i][seqg_var->index]; # line 723 "../chirpScan.st" seq_pvPutTmo(seqg_env, 45/*rms_best*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 724 "../chirpScan.st" seqg_var->fitrms_best[seqg_var->i] = seqg_var->fitrms_bestwf[seqg_var->i][seqg_var->index]; # line 725 "../chirpScan.st" seq_pvPutTmo(seqg_env, 49/*fitrms_best*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 726 "../chirpScan.st" seqg_var->bw_best[seqg_var->i] = seqg_var->bw_bestwf[seqg_var->i][seqg_var->index]; # line 727 "../chirpScan.st" seq_pvPutTmo(seqg_env, 53/*bw_best*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 728 "../chirpScan.st" seqg_var->amax_best[seqg_var->i] = seqg_var->amax_bestwf[seqg_var->i][seqg_var->index]; # line 729 "../chirpScan.st" seq_pvPutTmo(seqg_env, 57/*amax_best*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); } } # line 732 "../chirpScan.st" seq_efSet(seqg_env, ef_post_scan); } } return; } } /****** Code for state "post_scan_steps" in state set "post_scan" ******/ /* Event function for state "post_scan_steps" in state set "post_scan" */ static seqBool seqg_event_post_scan_6_post_scan_steps(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst) { # line 740 "../chirpScan.st" if (seq_efTestAndClear(seqg_env, ef_post_scan)) { *seqg_pnst = 0; *seqg_ptrn = 0; return TRUE; } return FALSE; } /* Action function for state "post_scan_steps" in state set "post_scan" */ static void seqg_action_post_scan_6_post_scan_steps(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 742 "../chirpScan.st" if (seqg_var->debug) { # line 743 "../chirpScan.st" printf("Scan done. Restoring states\n"); } # line 746 "../chirpScan.st" chirp_calc_dds(0.0, &(seqg_var->offset_exact_final), &seqg_var->dds_step_combined, &seqg_var->dds_step_h); # line 747 "../chirpScan.st" seqg_var->phase_step_h_prc = seqg_var->dds_step_h; # line 748 "../chirpScan.st" seq_pvPutTmo(seqg_env, 103/*phase_step_h_prc*/, DEFAULT, DEFAULT_TIMEOUT); # line 749 "../chirpScan.st" seqg_var->phase_reset_prc = 1; # line 750 "../chirpScan.st" seq_pvPutTmo(seqg_env, 104/*phase_reset_prc*/, DEFAULT, DEFAULT_TIMEOUT); # line 752 "../chirpScan.st" for (seqg_var->i = 0; seqg_var->i < 4; seqg_var->i++) { # line 753 "../chirpScan.st" if (seqg_var->cavsel[seqg_var->i] == 1) { # line 754 "../chirpScan.st" seqg_var->phase_step_rfs[seqg_var->i] = seqg_var->dds_step_combined; # line 755 "../chirpScan.st" seq_pvPutTmo(seqg_env, 99/*phase_step_rfs*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 756 "../chirpScan.st" seqg_var->phase_reset_rfs[seqg_var->i] = 1; # line 757 "../chirpScan.st" seq_pvPutTmo(seqg_env, 95/*phase_reset_rfs*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 759 "../chirpScan.st" seqg_var->rfctrl[seqg_var->i] = 0; # line 760 "../chirpScan.st" seq_pvPutTmo(seqg_env, 5/*rfctrl*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 762 "../chirpScan.st" seqg_var->cav_f_start[seqg_var->i] = seqg_var->cav_f_start_init[seqg_var->i]; # line 763 "../chirpScan.st" seq_pvPutTmo(seqg_env, 81/*cav_f_start*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 764 "../chirpScan.st" seqg_var->cav_f_stop[seqg_var->i] = seqg_var->cav_f_stop_init[seqg_var->i]; # line 765 "../chirpScan.st" seq_pvPutTmo(seqg_env, 85/*cav_f_stop*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 768 "../chirpScan.st" seqg_var->df_tx_enable[seqg_var->i] = seqg_var->df_tx_enable_init[seqg_var->i]; # line 769 "../chirpScan.st" seq_pvPutTmo(seqg_env, 110/*df_tx_enable*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); # line 770 "../chirpScan.st" if (seqg_var->debug) { # line 772 "../chirpScan.st" printf("Cavity %s restore df tx enable to %i, f start %.3f kHz stop %.3f kHz \n", seqg_var->cavstr[seqg_var->i], seqg_var->df_tx_enable[seqg_var->i], seqg_var->cav_f_start[seqg_var->i] / 1e3, seqg_var->cav_f_stop[seqg_var->i] / 1e3); } else { # line 775 "../chirpScan.st" seqg_var->rfctrlenable[seqg_var->i] = 0; # line 776 "../chirpScan.st" seq_pvPutTmo(seqg_env, 13/*rfctrlenable*/ + (CH_ID)(seqg_var->i), DEFAULT, DEFAULT_TIMEOUT); } # line 778 "../chirpScan.st" seqg_var->rack_scan_stat = 4; # line 779 "../chirpScan.st" seq_pvPutTmo(seqg_env, 90/*rack_scan_stat*/, DEFAULT, DEFAULT_TIMEOUT); } } } return; } } #undef seqg_var /************************ Tables ************************/ /* Channel table */ static seqChan seqg_chans[] = { /* chName, offset, varName, varType, count, eventNum, efId, monitored, queueSize, queueIndex */ {"{CM}00:RACK{RACK}:CHIRP:OFFSETWF", offsetof(struct seqg_vars, offset_exact), "offset_exact", P_FLOAT, 50, 10, 0, 0, 0, 0}, {"{CM}{CAVA}0:RFMODECTRL", offsetof(struct seqg_vars, rfmodectrl[0]), "rfmodectrl[0]", P_INT, 1, 11, 0, 0, 0, 0}, {"{CM}{CAVB}0:RFMODECTRL", offsetof(struct seqg_vars, rfmodectrl[1]), "rfmodectrl[1]", P_INT, 1, 12, 0, 0, 0, 0}, {"{CM}{CAVC}0:RFMODECTRL", offsetof(struct seqg_vars, rfmodectrl[2]), "rfmodectrl[2]", P_INT, 1, 13, 0, 0, 0, 0}, {"{CM}{CAVD}0:RFMODECTRL", offsetof(struct seqg_vars, rfmodectrl[3]), "rfmodectrl[3]", P_INT, 1, 14, 0, 0, 0, 0}, {"{CM}{CAVA}0:RFCTRL", offsetof(struct seqg_vars, rfctrl[0]), "rfctrl[0]", P_INT, 1, 15, 0, 0, 0, 0}, {"{CM}{CAVB}0:RFCTRL", offsetof(struct seqg_vars, rfctrl[1]), "rfctrl[1]", P_INT, 1, 16, 0, 0, 0, 0}, {"{CM}{CAVC}0:RFCTRL", offsetof(struct seqg_vars, rfctrl[2]), "rfctrl[2]", P_INT, 1, 17, 0, 0, 0, 0}, {"{CM}{CAVD}0:RFCTRL", offsetof(struct seqg_vars, rfctrl[3]), "rfctrl[3]", P_INT, 1, 18, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_SEL", offsetof(struct seqg_vars, cavsel[0]), "cavsel[0]", P_INT, 1, 19, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_SEL", offsetof(struct seqg_vars, cavsel[1]), "cavsel[1]", P_INT, 1, 20, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_SEL", offsetof(struct seqg_vars, cavsel[2]), "cavsel[2]", P_INT, 1, 21, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_SEL", offsetof(struct seqg_vars, cavsel[3]), "cavsel[3]", P_INT, 1, 22, 0, 0, 0, 0}, {"{CM}{CAVA}0:RFCTRL.DISA", offsetof(struct seqg_vars, rfctrlenable[0]), "rfctrlenable[0]", P_INT, 1, 23, 0, 0, 0, 0}, {"{CM}{CAVB}0:RFCTRL.DISA", offsetof(struct seqg_vars, rfctrlenable[1]), "rfctrlenable[1]", P_INT, 1, 24, 0, 0, 0, 0}, {"{CM}{CAVC}0:RFCTRL.DISA", offsetof(struct seqg_vars, rfctrlenable[2]), "rfctrlenable[2]", P_INT, 1, 25, 0, 0, 0, 0}, {"{CM}{CAVD}0:RFCTRL.DISA", offsetof(struct seqg_vars, rfctrlenable[3]), "rfctrlenable[3]", P_INT, 1, 26, 0, 0, 0, 0}, {"{CM}{CAVA}0:RFSTATE", offsetof(struct seqg_vars, rfstate[0]), "rfstate[0]", P_INT, 1, 27, 0, 0, 0, 0}, {"{CM}{CAVB}0:RFSTATE", offsetof(struct seqg_vars, rfstate[1]), "rfstate[1]", P_INT, 1, 28, 0, 0, 0, 0}, {"{CM}{CAVC}0:RFSTATE", offsetof(struct seqg_vars, rfstate[2]), "rfstate[2]", P_INT, 1, 29, 0, 0, 0, 0}, {"{CM}{CAVD}0:RFSTATE", offsetof(struct seqg_vars, rfstate[3]), "rfstate[3]", P_INT, 1, 30, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:DF", offsetof(struct seqg_vars, df[0]), "df[0]", P_FLOAT, 1, 31, 0, 1, 0, 0}, {"{CM}{CAVB}0:CHIRP:DF", offsetof(struct seqg_vars, df[1]), "df[1]", P_FLOAT, 1, 32, 0, 1, 0, 0}, {"{CM}{CAVC}0:CHIRP:DF", offsetof(struct seqg_vars, df[2]), "df[2]", P_FLOAT, 1, 33, 0, 1, 0, 0}, {"{CM}{CAVD}0:CHIRP:DF", offsetof(struct seqg_vars, df[3]), "df[3]", P_FLOAT, 1, 34, 0, 1, 0, 0}, {"{CM}{CAVA}0:CHIRP:DF_CALC.J", offsetof(struct seqg_vars, amax[0]), "amax[0]", P_FLOAT, 1, 35, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:DF_CALC.J", offsetof(struct seqg_vars, amax[1]), "amax[1]", P_FLOAT, 1, 36, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:DF_CALC.J", offsetof(struct seqg_vars, amax[2]), "amax[2]", P_FLOAT, 1, 37, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:DF_CALC.J", offsetof(struct seqg_vars, amax[3]), "amax[3]", P_FLOAT, 1, 38, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RMS", offsetof(struct seqg_vars, rms[0]), "rms[0]", P_FLOAT, 1, 39, 1, 1, 0, 0}, {"{CM}{CAVB}0:CHIRP:RMS", offsetof(struct seqg_vars, rms[1]), "rms[1]", P_FLOAT, 1, 40, 1, 1, 0, 0}, {"{CM}{CAVC}0:CHIRP:RMS", offsetof(struct seqg_vars, rms[2]), "rms[2]", P_FLOAT, 1, 41, 1, 1, 0, 0}, {"{CM}{CAVD}0:CHIRP:RMS", offsetof(struct seqg_vars, rms[3]), "rms[3]", P_FLOAT, 1, 42, 1, 1, 0, 0}, {"{CM}{CAVA}0:CHIRP:BW", offsetof(struct seqg_vars, bw[0]), "bw[0]", P_FLOAT, 1, 43, 0, 1, 0, 0}, {"{CM}{CAVB}0:CHIRP:BW", offsetof(struct seqg_vars, bw[1]), "bw[1]", P_FLOAT, 1, 44, 0, 1, 0, 0}, {"{CM}{CAVC}0:CHIRP:BW", offsetof(struct seqg_vars, bw[2]), "bw[2]", P_FLOAT, 1, 45, 0, 1, 0, 0}, {"{CM}{CAVD}0:CHIRP:BW", offsetof(struct seqg_vars, bw[3]), "bw[3]", P_FLOAT, 1, 46, 0, 1, 0, 0}, {"{CM}{CAVA}0:CHIRP:FITRMS", offsetof(struct seqg_vars, fitrms[0]), "fitrms[0]", P_FLOAT, 1, 47, 0, 1, 0, 0}, {"{CM}{CAVB}0:CHIRP:FITRMS", offsetof(struct seqg_vars, fitrms[1]), "fitrms[1]", P_FLOAT, 1, 48, 0, 1, 0, 0}, {"{CM}{CAVC}0:CHIRP:FITRMS", offsetof(struct seqg_vars, fitrms[2]), "fitrms[2]", P_FLOAT, 1, 49, 0, 1, 0, 0}, {"{CM}{CAVD}0:CHIRP:FITRMS", offsetof(struct seqg_vars, fitrms[3]), "fitrms[3]", P_FLOAT, 1, 50, 0, 1, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_DF", offsetof(struct seqg_vars, df_best[0]), "df_best[0]", P_FLOAT, 1, 51, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_DF", offsetof(struct seqg_vars, df_best[1]), "df_best[1]", P_FLOAT, 1, 52, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_DF", offsetof(struct seqg_vars, df_best[2]), "df_best[2]", P_FLOAT, 1, 53, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_DF", offsetof(struct seqg_vars, df_best[3]), "df_best[3]", P_FLOAT, 1, 54, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_RMS", offsetof(struct seqg_vars, rms_best[0]), "rms_best[0]", P_FLOAT, 1, 55, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_RMS", offsetof(struct seqg_vars, rms_best[1]), "rms_best[1]", P_FLOAT, 1, 56, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_RMS", offsetof(struct seqg_vars, rms_best[2]), "rms_best[2]", P_FLOAT, 1, 57, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_RMS", offsetof(struct seqg_vars, rms_best[3]), "rms_best[3]", P_FLOAT, 1, 58, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_FITRMS", offsetof(struct seqg_vars, fitrms_best[0]), "fitrms_best[0]", P_FLOAT, 1, 59, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_FITRMS", offsetof(struct seqg_vars, fitrms_best[1]), "fitrms_best[1]", P_FLOAT, 1, 60, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_FITRMS", offsetof(struct seqg_vars, fitrms_best[2]), "fitrms_best[2]", P_FLOAT, 1, 61, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_FITRMS", offsetof(struct seqg_vars, fitrms_best[3]), "fitrms_best[3]", P_FLOAT, 1, 62, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_BW", offsetof(struct seqg_vars, bw_best[0]), "bw_best[0]", P_FLOAT, 1, 63, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_BW", offsetof(struct seqg_vars, bw_best[1]), "bw_best[1]", P_FLOAT, 1, 64, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_BW", offsetof(struct seqg_vars, bw_best[2]), "bw_best[2]", P_FLOAT, 1, 65, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_BW", offsetof(struct seqg_vars, bw_best[3]), "bw_best[3]", P_FLOAT, 1, 66, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_AMAX", offsetof(struct seqg_vars, amax_best[0]), "amax_best[0]", P_FLOAT, 1, 67, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_AMAX", offsetof(struct seqg_vars, amax_best[1]), "amax_best[1]", P_FLOAT, 1, 68, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_AMAX", offsetof(struct seqg_vars, amax_best[2]), "amax_best[2]", P_FLOAT, 1, 69, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_AMAX", offsetof(struct seqg_vars, amax_best[3]), "amax_best[3]", P_FLOAT, 1, 70, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_DFWF", offsetof(struct seqg_vars, df_bestwf[0]), "df_bestwf[0]", P_FLOAT, 50, 71, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_DFWF", offsetof(struct seqg_vars, df_bestwf[1]), "df_bestwf[1]", P_FLOAT, 50, 72, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_DFWF", offsetof(struct seqg_vars, df_bestwf[2]), "df_bestwf[2]", P_FLOAT, 50, 73, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_DFWF", offsetof(struct seqg_vars, df_bestwf[3]), "df_bestwf[3]", P_FLOAT, 50, 74, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_RMSWF", offsetof(struct seqg_vars, rms_bestwf[0]), "rms_bestwf[0]", P_FLOAT, 50, 75, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_RMSWF", offsetof(struct seqg_vars, rms_bestwf[1]), "rms_bestwf[1]", P_FLOAT, 50, 76, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_RMSWF", offsetof(struct seqg_vars, rms_bestwf[2]), "rms_bestwf[2]", P_FLOAT, 50, 77, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_RMSWF", offsetof(struct seqg_vars, rms_bestwf[3]), "rms_bestwf[3]", P_FLOAT, 50, 78, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_BWWF", offsetof(struct seqg_vars, bw_bestwf[0]), "bw_bestwf[0]", P_FLOAT, 50, 79, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_BWWF", offsetof(struct seqg_vars, bw_bestwf[1]), "bw_bestwf[1]", P_FLOAT, 50, 80, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_BWWF", offsetof(struct seqg_vars, bw_bestwf[2]), "bw_bestwf[2]", P_FLOAT, 50, 81, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_BWWF", offsetof(struct seqg_vars, bw_bestwf[3]), "bw_bestwf[3]", P_FLOAT, 50, 82, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_FITRMSWF", offsetof(struct seqg_vars, fitrms_bestwf[0]), "fitrms_bestwf[0]", P_FLOAT, 50, 83, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_FITRMSWF", offsetof(struct seqg_vars, fitrms_bestwf[1]), "fitrms_bestwf[1]", P_FLOAT, 50, 84, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_FITRMSWF", offsetof(struct seqg_vars, fitrms_bestwf[2]), "fitrms_bestwf[2]", P_FLOAT, 50, 85, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_FITRMSWF", offsetof(struct seqg_vars, fitrms_bestwf[3]), "fitrms_bestwf[3]", P_FLOAT, 50, 86, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_AMAXWF", offsetof(struct seqg_vars, amax_bestwf[0]), "amax_bestwf[0]", P_FLOAT, 50, 87, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_AMAXWF", offsetof(struct seqg_vars, amax_bestwf[1]), "amax_bestwf[1]", P_FLOAT, 50, 88, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_AMAXWF", offsetof(struct seqg_vars, amax_bestwf[2]), "amax_bestwf[2]", P_FLOAT, 50, 89, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_AMAXWF", offsetof(struct seqg_vars, amax_bestwf[3]), "amax_bestwf[3]", P_FLOAT, 50, 90, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:FREQ_START", offsetof(struct seqg_vars, cav_f_start[0]), "cav_f_start[0]", P_INT, 1, 91, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:FREQ_START", offsetof(struct seqg_vars, cav_f_start[1]), "cav_f_start[1]", P_INT, 1, 92, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:FREQ_START", offsetof(struct seqg_vars, cav_f_start[2]), "cav_f_start[2]", P_INT, 1, 93, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:FREQ_START", offsetof(struct seqg_vars, cav_f_start[3]), "cav_f_start[3]", P_INT, 1, 94, 0, 0, 0, 0}, {"{CM}{CAVA}0:CHIRP:FREQ_STOP", offsetof(struct seqg_vars, cav_f_stop[0]), "cav_f_stop[0]", P_INT, 1, 95, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:FREQ_STOP", offsetof(struct seqg_vars, cav_f_stop[1]), "cav_f_stop[1]", P_INT, 1, 96, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:FREQ_STOP", offsetof(struct seqg_vars, cav_f_stop[2]), "cav_f_stop[2]", P_INT, 1, 97, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:FREQ_STOP", offsetof(struct seqg_vars, cav_f_stop[3]), "cav_f_stop[3]", P_INT, 1, 98, 0, 0, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:START", offsetof(struct seqg_vars, rack_scan_start), "rack_scan_start", P_INT, 1, 99, 2, 1, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:STAT", offsetof(struct seqg_vars, rack_scan_stat), "rack_scan_stat", P_INT, 1, 100, 0, 1, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:FREQ_STEP_SIZE", offsetof(struct seqg_vars, rack_f_step), "rack_f_step", P_INT, 1, 101, 0, 0, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:FREQ_START", offsetof(struct seqg_vars, rack_f_start), "rack_f_start", P_INT, 1, 102, 0, 0, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:FREQ_STOP", offsetof(struct seqg_vars, rack_f_stop), "rack_f_stop", P_INT, 1, 103, 0, 0, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:RMS_THRESH", offsetof(struct seqg_vars, rms_thresh), "rms_thresh", P_INT, 1, 104, 0, 1, 0, 0}, {"{CM}{CAVA}0:DAC_DDSA_PHASE_RESET", offsetof(struct seqg_vars, phase_reset_rfs[0]), "phase_reset_rfs[0]", P_INT, 1, 105, 0, 0, 0, 0}, {"{CM}{CAVB}0:DAC_DDSA_PHASE_RESET", offsetof(struct seqg_vars, phase_reset_rfs[1]), "phase_reset_rfs[1]", P_INT, 1, 106, 0, 0, 0, 0}, {"{CM}{CAVC}0:DAC_DDSA_PHASE_RESET", offsetof(struct seqg_vars, phase_reset_rfs[2]), "phase_reset_rfs[2]", P_INT, 1, 107, 0, 0, 0, 0}, {"{CM}{CAVD}0:DAC_DDSA_PHASE_RESET", offsetof(struct seqg_vars, phase_reset_rfs[3]), "phase_reset_rfs[3]", P_INT, 1, 108, 0, 0, 0, 0}, {"{CM}{CAVA}0:DAC_DDSA_PHASE_STEP", offsetof(struct seqg_vars, phase_step_rfs[0]), "phase_step_rfs[0]", P_INT, 1, 109, 0, 0, 0, 0}, {"{CM}{CAVB}0:DAC_DDSA_PHASE_STEP", offsetof(struct seqg_vars, phase_step_rfs[1]), "phase_step_rfs[1]", P_INT, 1, 110, 0, 0, 0, 0}, {"{CM}{CAVC}0:DAC_DDSA_PHASE_STEP", offsetof(struct seqg_vars, phase_step_rfs[2]), "phase_step_rfs[2]", P_INT, 1, 111, 0, 0, 0, 0}, {"{CM}{CAVD}0:DAC_DDSA_PHASE_STEP", offsetof(struct seqg_vars, phase_step_rfs[3]), "phase_step_rfs[3]", P_INT, 1, 112, 0, 0, 0, 0}, {"{CM}00:PRC{RACK}:DAC_DDSA_PHASE_STEPH", offsetof(struct seqg_vars, phase_step_h_prc), "phase_step_h_prc", P_INT, 1, 113, 0, 0, 0, 0}, {"{CM}00:PRC{RACK}:DAC_DDSA_PHASE_RESET", offsetof(struct seqg_vars, phase_reset_prc), "phase_reset_prc", P_INT, 1, 114, 0, 0, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:NACQ", offsetof(struct seqg_vars, nacq), "nacq", P_INT, 1, 115, 0, 1, 0, 0}, {"{CM}{CAVA}0:CHIRP:RACKSCAN_NFOUND", offsetof(struct seqg_vars, nfound[0]), "nfound[0]", P_INT, 1, 116, 0, 0, 0, 0}, {"{CM}{CAVB}0:CHIRP:RACKSCAN_NFOUND", offsetof(struct seqg_vars, nfound[1]), "nfound[1]", P_INT, 1, 117, 0, 0, 0, 0}, {"{CM}{CAVC}0:CHIRP:RACKSCAN_NFOUND", offsetof(struct seqg_vars, nfound[2]), "nfound[2]", P_INT, 1, 118, 0, 0, 0, 0}, {"{CM}{CAVD}0:CHIRP:RACKSCAN_NFOUND", offsetof(struct seqg_vars, nfound[3]), "nfound[3]", P_INT, 1, 119, 0, 0, 0, 0}, {"{CM}{CAVA}0:DF_ENABLE", offsetof(struct seqg_vars, df_tx_enable[0]), "df_tx_enable[0]", P_INT, 1, 120, 0, 0, 0, 0}, {"{CM}{CAVB}0:DF_ENABLE", offsetof(struct seqg_vars, df_tx_enable[1]), "df_tx_enable[1]", P_INT, 1, 121, 0, 0, 0, 0}, {"{CM}{CAVC}0:DF_ENABLE", offsetof(struct seqg_vars, df_tx_enable[2]), "df_tx_enable[2]", P_INT, 1, 122, 0, 0, 0, 0}, {"{CM}{CAVD}0:DF_ENABLE", offsetof(struct seqg_vars, df_tx_enable[3]), "df_tx_enable[3]", P_INT, 1, 123, 0, 0, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:MSG", offsetof(struct seqg_vars, debug_msg), "debug_msg", P_STRING, 1, 124, 0, 0, 0, 0}, {"{CM}00:RACK{RACK}:CHIRP:DBG", offsetof(struct seqg_vars, debug), "debug", P_INT, 1, 125, 0, 1, 0, 0}, }; /* Event masks for state set "main" */ static const seqMask seqg_mask_main_0_init[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static const seqMask seqg_mask_main_0_ready_for_request[] = { 0x00000004, 0x00000000, 0x00000000, 0x00000000, }; /* State table for state set "main" */ static seqState seqg_states_main[] = { { /* state name */ "init", /* action function */ seqg_action_main_0_init, /* event function */ seqg_event_main_0_init, /* entry function */ seqg_entry_main_0_init, /* exit function */ 0, /* event mask array */ seqg_mask_main_0_init, /* state options */ (0) }, { /* state name */ "ready_for_request", /* action function */ seqg_action_main_0_ready_for_request, /* event function */ seqg_event_main_0_ready_for_request, /* entry function */ seqg_entry_main_0_ready_for_request, /* exit function */ 0, /* event mask array */ seqg_mask_main_0_ready_for_request, /* state options */ (0) }, }; /* Event masks for state set "start_request_recevied" */ static const seqMask seqg_mask_start_request_recevied_1_rcvd_request[] = { 0x00000010, 0x00000000, 0x00000000, 0x00000000, }; /* State table for state set "start_request_recevied" */ static seqState seqg_states_start_request_recevied[] = { { /* state name */ "rcvd_request", /* action function */ seqg_action_start_request_recevied_1_rcvd_request, /* event function */ seqg_event_start_request_recevied_1_rcvd_request, /* entry function */ 0, /* exit function */ 0, /* event mask array */ seqg_mask_start_request_recevied_1_rcvd_request, /* state options */ (0) }, }; /* Event masks for state set "prepare_scan" */ static const seqMask seqg_mask_prepare_scan_2_build_scan[] = { 0x00000020, 0x00000000, 0x00000000, 0x00000000, }; /* State table for state set "prepare_scan" */ static seqState seqg_states_prepare_scan[] = { { /* state name */ "build_scan", /* action function */ seqg_action_prepare_scan_2_build_scan, /* event function */ seqg_event_prepare_scan_2_build_scan, /* entry function */ 0, /* exit function */ 0, /* event mask array */ seqg_mask_prepare_scan_2_build_scan, /* state options */ (0) }, }; /* Event masks for state set "setup_scan" */ static const seqMask seqg_mask_setup_scan_3_setup_cavities[] = { 0x00000040, 0x00000000, 0x00000000, 0x00000000, }; static const seqMask seqg_mask_setup_scan_3_disable_df_tx[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; /* State table for state set "setup_scan" */ static seqState seqg_states_setup_scan[] = { { /* state name */ "setup_cavities", /* action function */ seqg_action_setup_scan_3_setup_cavities, /* event function */ seqg_event_setup_scan_3_setup_cavities, /* entry function */ 0, /* exit function */ 0, /* event mask array */ seqg_mask_setup_scan_3_setup_cavities, /* state options */ (0) }, { /* state name */ "disable_df_tx", /* action function */ seqg_action_setup_scan_3_disable_df_tx, /* event function */ seqg_event_setup_scan_3_disable_df_tx, /* entry function */ seqg_entry_setup_scan_3_disable_df_tx, /* exit function */ 0, /* event mask array */ seqg_mask_setup_scan_3_disable_df_tx, /* state options */ (0) }, }; /* Event masks for state set "perform_scan" */ static const seqMask seqg_mask_perform_scan_4_start_scan[] = { 0x00000080, 0x00000000, 0x00000000, 0x00000000, }; /* State table for state set "perform_scan" */ static seqState seqg_states_perform_scan[] = { { /* state name */ "start_scan", /* action function */ seqg_action_perform_scan_4_start_scan, /* event function */ seqg_event_perform_scan_4_start_scan, /* entry function */ seqg_entry_perform_scan_4_start_scan, /* exit function */ 0, /* event mask array */ seqg_mask_perform_scan_4_start_scan, /* state options */ (0) }, }; /* Event masks for state set "perform_scan_step" */ static const seqMask seqg_mask_perform_scan_step_5_start_scan_step[] = { 0x00000100, 0x00000000, 0x00000000, 0x00000000, }; static const seqMask seqg_mask_perform_scan_step_5_scan_step_setup_dds[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static const seqMask seqg_mask_perform_scan_step_5_scan_step_read_detune[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; /* State table for state set "perform_scan_step" */ static seqState seqg_states_perform_scan_step[] = { { /* state name */ "start_scan_step", /* action function */ seqg_action_perform_scan_step_5_start_scan_step, /* event function */ seqg_event_perform_scan_step_5_start_scan_step, /* entry function */ 0, /* exit function */ 0, /* event mask array */ seqg_mask_perform_scan_step_5_start_scan_step, /* state options */ (0) }, { /* state name */ "scan_step_setup_dds", /* action function */ seqg_action_perform_scan_step_5_scan_step_setup_dds, /* event function */ seqg_event_perform_scan_step_5_scan_step_setup_dds, /* entry function */ seqg_entry_perform_scan_step_5_scan_step_setup_dds, /* exit function */ 0, /* event mask array */ seqg_mask_perform_scan_step_5_scan_step_setup_dds, /* state options */ (0) }, { /* state name */ "scan_step_read_detune", /* action function */ seqg_action_perform_scan_step_5_scan_step_read_detune, /* event function */ seqg_event_perform_scan_step_5_scan_step_read_detune, /* entry function */ 0, /* exit function */ 0, /* event mask array */ seqg_mask_perform_scan_step_5_scan_step_read_detune, /* state options */ (0) }, }; /* Event masks for state set "post_scan" */ static const seqMask seqg_mask_post_scan_6_post_scan_steps[] = { 0x00000200, 0x00000000, 0x00000000, 0x00000000, }; /* State table for state set "post_scan" */ static seqState seqg_states_post_scan[] = { { /* state name */ "post_scan_steps", /* action function */ seqg_action_post_scan_6_post_scan_steps, /* event function */ seqg_event_post_scan_6_post_scan_steps, /* entry function */ 0, /* exit function */ 0, /* event mask array */ seqg_mask_post_scan_6_post_scan_steps, /* state options */ (0) }, }; /* State set table */ static seqSS seqg_statesets[] = { { /* state set name */ "main", /* states */ seqg_states_main, /* number of states */ 2 }, { /* state set name */ "start_request_recevied", /* states */ seqg_states_start_request_recevied, /* number of states */ 1 }, { /* state set name */ "prepare_scan", /* states */ seqg_states_prepare_scan, /* number of states */ 1 }, { /* state set name */ "setup_scan", /* states */ seqg_states_setup_scan, /* number of states */ 2 }, { /* state set name */ "perform_scan", /* states */ seqg_states_perform_scan, /* number of states */ 1 }, { /* state set name */ "perform_scan_step", /* states */ seqg_states_perform_scan_step, /* number of states */ 3 }, { /* state set name */ "post_scan", /* states */ seqg_states_post_scan, /* number of states */ 1 }, }; /* Program table (global) */ seqProgram chirpScan = { /* magic number */ 2002004, /* program name */ "chirpScan", /* channels */ seqg_chans, /* num. channels */ 116, /* state sets */ seqg_statesets, /* num. state sets */ 7, /* user var size */ sizeof(struct seqg_vars), /* param */ "", /* num. event flags */ 9, /* encoded options */ (0 | OPT_CONN | OPT_DEBUG | OPT_NEWEF | OPT_REENT), /* init func */ seqg_init, /* entry func */ 0, /* exit func */ 0, /* num. queues */ 0 }; /* Register sequencer commands and program */ #include "epicsExport.h" static void chirpScanRegistrar (void) { seqRegisterSequencerCommands(); seqRegisterSequencerProgram (&chirpScan); } epicsExportRegistrar(chirpScanRegistrar);