Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ew2rsam.h

Go to the documentation of this file.
00001 
00002 /*
00003  *   THIS FILE IS UNDER RCS - DO NOT MODIFY UNLESS YOU HAVE
00004  *   CHECKED IT OUT USING THE COMMAND CHECKOUT.
00005  *
00006  *    $Id: ew2rsam_8h-source.html 2161 2006-05-19 16:55:03Z paulf $
00007  *
00008  *    Revision history:
00009  *     $Log$
00009  *     Revision 1.1  2006/05/19 16:55:01  paulf
00009  *     first inclusion
00009  *
00010  *     Revision 1.1  2000/02/14 20:05:54  lucky
00011  *     Initial revision
00012  *
00013  *
00014  */
00015 
00016 /*
00017  * ew2rsam.h
00018  *
00019  *   Header file for the ew2rsam module
00020  *   Defines local data structure used for book-keeping
00021  *
00022  *   Lucky Vidmar Thu May  6 10:07:21 MDT 1999
00023  *
00024  */
00025 
00026 
00027 #define DC_ARRAY_ENTRIES        24
00028 #define DC_TIME_DIFF            2.56
00029 #define DC_STARTUP_ENTRIES      5
00030 #define DC_OFFSET_INVALID       -1.00
00031 #define TIME_INVALID        -1.00
00032 #define MAX_TIME_PERIODS        5
00033 
00034 typedef struct time_period_struct
00035 {
00036         double  time_period;    /* time period in seconds */
00037         double  rsam_value;             /* currently kept rsam total */
00038         int             rsam_nsamp;             /* samples in the current total */
00039         double  rsam_starttime; /* when did we start counting ? */
00040 
00041 } Tstruct;
00042 
00043 /* there will be one for each requested channel */
00044 /* with the maximum read from the configuration file */
00045 
00046 typedef struct rsam_values_struct
00047 {
00048 
00049         /* START DC offset section */
00050 
00051         double  DC_offset;                      /* DC offset value */
00052 
00053         double  DC_cur_val;                     /* Current DC total */
00054         int             DC_cur_nsamp;           /* Number of samples in current total */
00055         double  DC_starttime;           /* When did we start counting ? */
00056 
00057         double  DC_array[DC_ARRAY_ENTRIES];     /* Averages for previous time slices */
00058         int             DC_cur_pos;                     /* index of the current position in the array */
00059         int             DC_start_pos;           /* index of the starting position in the array */
00060 
00061         int             DC_startup;                     /* TRUE if we are still starting out */
00062         /* END DC offset section */
00063 
00064         /* START time period section */
00065         Tstruct         TP[MAX_TIME_PERIODS];
00066 
00067 } RSAM_val;
00068 
00069 
00070 typedef struct rsam_struct
00071 {
00072 
00073         char    sta[7];
00074         char    chan[9];
00075         char    net[9];
00076         RSAM_val *values;
00077 
00078 } RSAM;
00079 

Generated on Tue May 6 09:16:01 2003 for Earthworm Libs by doxygen1.3-rc3