Changeset 4203
- Timestamp:
- 05/05/11 12:56:45 (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ewdoc/WEB_DOC/cmd/ewspectra_cmd.html
r4194 r4203 28 28 29 29 # Produce spectra from a specific SCNL 30 # If writing to a ring, second SCNL is needed to be used in messages written 30 31 PlainSpectraSCNL 5405 HNN NP GE 31 32 #PlainSpectraSCNL 5405 HNE NP GN -
trunk/ewdoc/WEB_DOC/modules.html
r4198 r4203 343 343 </tr> 344 344 <tr> 345 <td align="center">compute_spectra </td>346 <td>Posts a message for <a href="ovr/ewspectra_ovr.html">ewspectra</a> to begin processing</td>347 <td style="text-align: center;"> <a href="ovr/compute_spectra_ovr.html">overview/setup</a></td>348 </tr>349 <tr>350 345 <td align="center">eqproc </td> 351 346 <td>Initiates final event processing (head of mega-module).</td> … … 404 399 </td> 405 400 <td align="center"><a href="cmd/eqverify_assemble_cmd.html">commands</a> </td> 406 </tr>407 <tr>408 <td align="center">ewspectra </td>409 <td>Takes data from one or more waveservers, computes and processes their spectra </td>410 <td style="text-align: center;"><a href="ovr/ewspectra_ovr.html">overview</a>411 </td>412 <td align="center"><a href="cmd/ewspectra_cmd.html">commands</a> </td>413 </tr>414 <tr>415 <td align="center">ewthresh </td>416 <td>Monitors a ring for TRACEBUF2X messages and generates an alarm message when a417 SCNL-specific threshold is exceeded.</td>418 <td style="text-align: center;"><a href="ovr/ewthresh_ovr.html">overview</a>419 </td>420 <td align="center"><a href="cmd/ewthresh_cmd.html">commands</a> </td>421 401 </tr> 422 402 <tr> … … 595 575 href="cmd/ewintegrate_cmd.html">commands</a><br> 596 576 </td> 577 </tr> 578 <tr> 579 <td align="center">ewspectra </td> 580 <td>Takes data from one or more waveservers, computes and processes their spectra </td> 581 <td style="text-align: center;"><a href="ovr/ewspectra_ovr.html">overview</a> 582 </td> 583 <td align="center"><a href="cmd/ewspectra_cmd.html">commands</a> </td> 584 </tr> 585 <tr> 586 <td align="center">compute_spectra </td> 587 <td>Posts a message for <a href="ovr/ewspectra_ovr.html">ewspectra</a> to begin processing. 588 (Deprecated 5/5/2011; use <a href="ovr/activate_module_ovr.html">activate_module</a> instead.)</td> 589 <td style="text-align: center;"> <a href="ovr/compute_spectra_ovr.html">overview</a></td> 590 <td align="center">none </td> 591 </tr> 592 <tr> 593 <td align="center">ewthresh </td> 594 <td>Monitors a ring for TRACEBUF2X messages and generates an alarm message when a 595 SCNL-specific threshold is exceeded.</td> 596 <td style="text-align: center;"><a href="ovr/ewthresh_ovr.html">overview</a> 597 </td> 598 <td align="center"><a href="cmd/ewthresh_cmd.html">commands</a> </td> 597 599 </tr> 598 600 </tbody> … … 1076 1078 prints information to screen or to a file</td> 1077 1079 <td style="text-align: center;"> <a href="ovr/sniffspectra_ovr.html">overview/setup</a></td> 1080 <td align="center">none </td> 1078 1081 </tr> 1079 1082 <tr> … … 1108 1111 <td align="center"> <a href="cmd/wsv_test_cmd.html">commands</a> 1109 1112 </td> 1113 </tr> 1114 <tr> 1115 <td align="center">activate_module </td> 1116 <td>Puts an ACTIVATE_MODULE message in the specified ring, the body of which 1117 starts with the module ID of the specified target module, followed by the 1118 remaining command-line arguments.</td> 1119 <td style="text-align: center;"> <a href="ovr/activate_module_ovr.html">overview</a></td> 1120 <td align="center">none </td> 1110 1121 </tr> 1111 1122 </tbody> -
trunk/ewdoc/WEB_DOC/ovr/compute_spectra_ovr.html
r4194 r4203 6 6 <BODY bgcolor="#ffffff"> 7 7 <CENTER><H1>Earthworm Module: <BR>Compute_spectra Overview</H1> 8 <I>(last revised 26 April, 2011)</I></CENTER> 8 <I>(last revised 5 May, 2011)</I></CENTER> 9 <P><B>Deprecated as on 5/5/2011; use <a href="activate_module_ovr.html">activate_module</a> instead,</B> 10 using the same arguments as here but adding the module ID of your ewspectra module before the ring name. 11 </P> 9 12 <P> 10 13 The compute_spectra module write a message to the specified ring to signal -
trunk/params/earthworm_global.d
r4194 r4203 267 267 Message TYPE_TD_AMP 34 # time-domain reduced-rate amplitude summary 268 268 # produced by CISN RAD software & ada2ring 269 Message TYPE_COMPUTE_SPECTRA 50 # produced by compute_spectra & read by ewspectra269 # Message TYPE_COMPUTE_SPECTRA 50 # produced by compute_spectra & read by ewspectra 270 270 # to initiate reading waveserver(s) to 271 271 # compute spectra … … 273 273 Message TYPE_SPECTRA_PEAKS 52 # peaks of spectra results produced by ewspectra 274 274 Message TYPE_THRESHALARM 53 # alarm message produced by ewthresh 275 Message TYPE_ACTIVATE_MODULE 54 # general-purpose message to trigger a specified module 275 276 276 277 -
trunk/release_notes.working
r4202 r4203 53 53 compute_spectra 54 54 This module posts a message that, when read by ewspectra, begins processing data 55 starting at the specified date/time. 55 starting at the specified date/time. (Deprecated w/ the creation of 56 activate_module) 56 57 Scott Hunter 04/26/2011 57 58 … … 66 67 when a SCNL-specific threshold is exceeded. 67 68 Scott Hunter 04/26/2011 69 70 activate_module 71 This module puts an ACTIVATE_MODULE message in the specified ring, the body of 72 which starts with the module ID of the specified target module, followed by the 73 remaining command-line arguments. 74 Scott Hunter 05/05/2011 68 75 69 76 MODIFICATIONS/BUG FIXES TO EXISTING MODULES: -
trunk/src/seismic_processing/ewspectra/ewspectra.c
r4194 r4203 58 58 static SHM_INFO OutRegion; /* shared memory region to use for output */ 59 59 60 MSG_LOGO GetLogo ; /* requesting module,type,instid */60 MSG_LOGO GetLogo[1]; /* requesting module,type,instid */ 61 61 pid_t MyPid; /* Our own pid, sent with heartbeat for restart purposes */ 62 62 … … 853 853 int res; 854 854 int ret; 855 char msg[100];855 char date[100], *msgName; 856 856 double start, stop; 857 int modid, len, okMsg; 857 858 858 859 /* Tell the main thread we're ok … … 866 867 /* Get a message from transport ring 867 868 ************************************/ 868 res = tport_getmsg( &InRegion, &GetLogo, 1,869 res = tport_getmsg( &InRegion, GetLogo, 1, 869 870 &reclogo, &recsize, MSrawmsg, MaxMsgSize-1 ); 870 871 … … 899 900 } 900 901 } 902 903 res = sscanf( MSrawmsg, "%d %s %d", &modid, date, &len ); 904 if ( modid != MyModId ) 905 continue; 906 msgName = "ACTIVATE_MODULE"; 907 okMsg = (res == 3); 908 if ( !okMsg ) { 909 sprintf( errText, "malformed %s msg i%d m%d t%d in %s",msgName, 910 (int) reclogo.instid, 911 (int) reclogo.mod, (int)reclogo.type, inRing ); 912 ewspectra_status( TypeError, ERR_BADMSG, errText ); 913 continue; 914 } 901 915 902 916 /* Process retrieved msg (res==GET_OK,GET_MISS,GET_NOTRACK) 903 917 ***********************************************************/ 904 strncpy( msg, MSrawmsg, recsize ); 905 msg[recsize] = 0; 906 start = atof( msg ); 907 if ( start < 0 ) { 908 start += time(NULL); 909 } else if ( EWSConvertTime (msg, &start) == EW_FAILURE ) { 910 sprintf( errText, "COMPUTE_SPECTRA message w/ bad time" ); 911 ewspectra_status( TypeError, ERR_BADMSG, errText ); 912 } 913 stop = start + atoi( msg+14 ); 914 915 process_timespan( wsh, start, stop ); 918 start = atof( date ); 919 if ( start < 0 ) { 920 start += time(NULL); 921 } else if ( EWSConvertTime (date, &start) == EW_FAILURE ) { 922 sprintf( errText, "%s message w/ bad time (%s)", msgName, date ); 923 ewspectra_status( TypeError, ERR_BADMSG, errText ); 924 } 925 stop = start + len; 926 927 process_timespan( wsh, start, stop ); 916 928 917 929 } /* end of while */ … … 1029 1041 } 1030 1042 if ( find_triggers ) { 1031 int geti = GetInst( "INST_WILDCARD", &(GetLogo .instid) );1032 int getm = GetModId( "MOD_WILDCARD", &(GetLogo .mod) );1033 int gett = GetType( "TYPE_ COMPUTE_SPECTRA", &(GetLogo.type) );1043 int geti = GetInst( "INST_WILDCARD", &(GetLogo[0].instid) ); 1044 int getm = GetModId( "MOD_WILDCARD", &(GetLogo[0].mod) ); 1045 int gett = GetType( "TYPE_ACTIVATE_MODULE", &(GetLogo[0].type) ); 1034 1046 int getMsg = 0; 1035 1047 if ( ( MSrawmsg = (char *) malloc(MaxMsgSize) ) == NULL ) … … 1044 1056 if ( getm ) 1045 1057 logit( "e", "%s: MOD_WILDCARD unknown; exiting!\n", Argv0 ); 1046 if ( get i)1047 logit( "e", "%s: TYPE_ COMPUTE_SPECTRAunknown; exiting!\n", Argv0 );1058 if ( gett ) 1059 logit( "e", "%s: TYPE_ACTIVATE_MODULE unknown; exiting!\n", Argv0 ); 1048 1060 ws2ts_purge( wsh, NULL, NULL ); 1049 1061 exit(1); … … 1071 1083 do 1072 1084 { 1073 res = tport_getmsg( &InRegion, &GetLogo, 1,1085 res = tport_getmsg( &InRegion, GetLogo, 1, 1074 1086 &reclogo, &recsize, MSrawmsg, MaxMsgSize-1 ); 1075 1087 } while (res !=GET_NONE); -
trunk/src/seismic_processing/ewspectra/ewspectra.d
r4194 r4203 17 17 18 18 # Produce spectra from a specific SCNL 19 # If writing to a ring, second SCNL is needed to be used in messages written 19 20 PlainSpectraSCNL 5405 HNN NP GE 20 21 #PlainSpectraSCNL 5405 HNE NP GN -
trunk/src/seismic_processing/ewspectra/makefile.nt
r4195 r4203 9 9 10 10 APP = ewspectra 11 APPc = compute_spectra11 APPc = activate_module 12 12 APPs = sniffspectra 13 13 14 14 OBJS = ewspectra.obj \ 15 15 iir.obj 16 OBJSc = compute_spectra.obj16 OBJSc = activate_module.obj 17 17 OBJSs = sniffspectra.obj 18 18 -
trunk/src/seismic_processing/ewspectra/makefile.sol
r4195 r4203 23 23 iir.o 24 24 25 OBJSc = compute_spectra.O25 OBJSc = activate_module.o 26 26 27 27 OBJSs = sniffspectra.o … … 31 31 $(CC) $(CFLAGS) -o $B/ewspectra $(OBJS) $(EW_LIBS) $(LIBS) 32 32 33 compute_spectra: $(OBJS) $(EW_LIBS)34 $(CC) $(CFLAGS) -o $B/ compute_spectra$(OBJS) $(EW_LIBS) $(LIBS)33 activate_module: $(OBJS) $(EW_LIBS) 34 $(CC) $(CFLAGS) -o $B/activate_module $(OBJS) $(EW_LIBS) $(LIBS) 35 35 36 36 sniffspectra: $(OBJS) $(EW_LIBS) … … 38 38 39 39 lint: 40 lint ewspectra.c iir.c compute_spectra.c sniffspectra.c \40 lint ewspectra.c iir.c activate_module.c sniffspectra.c \ 41 41 $(GLOBALFLAGS) 42 42 … … 46 46 47 47 clean_bin: 48 rm -f $B/ewspectra $B/ compute_spectra$B/sniffspectra48 rm -f $B/ewspectra $B/activate_module $B/sniffspectra 49 49 50 50 -
trunk/src/seismic_processing/ewspectra/makefile.ux
r4195 r4203 10 10 OBJS = $(SRCS:%.c=%.o) 11 11 12 SRCS c = compute_spectra.c13 OBJS c = $(SRCSc:%.c=%.o)12 SRCSa = activate_module.c 13 OBJSa = $(SRCSa:%.c=%.o) 14 14 15 15 SRCSs = sniffspectra.c … … 25 25 $(CC) $(CFLAGS) -c $< -o $@ 26 26 27 all: ewspectra compute_spectrasniffspectra27 all: ewspectra activate_module sniffspectra 28 28 29 29 ewspectra: $(OBJS) … … 31 31 cp ewspectra $(BINDIR) 32 32 33 compute_spectra: $(OBJSc)34 $(CC) $(GLOBALFLAGS) -o compute_spectra $(OBJSc) $(EW_LIBS) $(LDFLAGS)35 cp compute_spectra$(BINDIR)33 activate_module: $(OBJSa) 34 $(CC) $(GLOBALFLAGS) -o activate_module $(OBJSa) $(EW_LIBS) $(LDFLAGS) 35 cp activate_module $(BINDIR) 36 36 37 37 sniffspectra: $(OBJSs) … … 41 41 clean: 42 42 rm *.o 43 rm ewspectra compute_spectrasniffspectra43 rm ewspectra activate_module sniffspectra
Note: See TracChangeset
for help on using the changeset viewer.