@Override
public void setSource(int connectionIndex, NamedSource source,
int sourceIndex) throws UnknownConnectionException,
TypeMismatchException {
if(!source.getSourceTypes().containsKey(sourceIndex))
throw new UnknownConnectionException("attempt to set invalid source for FreqShift");
if(connectionIndex==StandardParameters.FREQUENCY.i){
freq=new SourceStore(source, sourceIndex);
cos.setSource(connectionIndex, source, sourceIndex);
sourceMap.put(StandardParameters.FREQUENCY.i, freq);
}else if(connectionIndex==StandardParameters.IN.i){
in=new SourceStore(source, sourceIndex);
ph.setSource(connectionIndex, source, sourceIndex);
sourceMap.put(StandardParameters.IN.i, in);
}else
throw new UnknownConnectionException("attempt to set unkown FreqShift parameter");
}