001 package edu.nrao.sss.electronics; 002 003 /** 004 * A processor of {@link Signal signals}. 005 * <p> 006 * <b>Version Info:</b> 007 * <table style="margin-left:2em"> 008 * <tr><td>$Revision: 1006 $</td></tr> 009 * <tr><td>$Date: 2007-11-16 11:19:54 -0700 (Fri, 16 Nov 2007) $</td></tr> 010 * <tr><td>$Author: dharland $ (last person to modify)</td></tr> 011 * </table></p> 012 * 013 * @author David M. Harland 014 * @since 2007-10-24 015 */ 016 public interface SignalProcessor 017 { 018 /** 019 * Runs this device. 020 * <p> 021 * It is typical for signal processors to be linked together. 022 * For those devices it is also typical, but not required by this 023 * interface specification, for them to tell the processor(s) linked 024 * to their output(s) to also execute.</p> 025 */ 026 public void execute(); 027 028 /** 029 * Executes this device and all downstream devices up to, but not 030 * including, the {@code firstUnexecutedDevice}. 031 * See {@link #execute()} for more information about the linking 032 * of processors. 033 * 034 * @param firstUnexecutedDevice 035 * the first device downstream that is <i>not</i> to be executed. 036 * If all downstream devices should be executed you may use a 037 * <i>null</i> value here or call {@link #execute()}. 038 */ 039 public void executeUpTo(SignalProcessor firstUnexecutedDevice); 040 041 /** 042 * Retreats upstream from this processor to the source of the 043 * stream and executes that device(s), telling it to stop execution at 044 * {@code firstUnexecutedDevice}. 045 * 046 * @param firstUnexecutedDevice 047 * the first device in a chain of processors that is <i>not</i> 048 * to be executed. 049 * If all devices should be executed you may use a 050 * <i>null</i> value here. 051 * The first unexecuted device should be <i>downstream</i> of this 052 * device. 053 */ 054 public void executeFromStartOfChainUpTo(SignalProcessor firstUnexecutedDevice); 055 }