edu.cmu.emulator.signal
Class PathBasedFadingController

java.lang.Object
  extended by edu.cmu.emulator.signal.PathBasedFadingController
All Implemented Interfaces:
Runnable

public class PathBasedFadingController
extends Object
implements Runnable

Assumptions/requirements: - Not all channels are necessarily path-based - Any channel that is path-based will remain path-based for the duration of the emulation. - Path-based channels may switch channel models as long as they are always path-based and as long as the current DSP configuration has enough paths to support the model.


Field Summary
protected static int channelI
          From the SignalEnvironment.
protected static int channelQ
           
protected  RWLock channelsLock
           
protected  CommSender commSender
           
protected  double[][] curDelay
           
protected  double[][][] curLoss
           
private static boolean debug
           
protected  EmuHWConfiguration emuHWConfig
           
protected  double[][] lastDelay
           
protected  long lastDelayTimeMillis
           
protected  long lastFadeTimeMillis
           
protected  double[][][] lastLoss
           
protected  Logger log
           
private static double MAX_SCALE_DB
           
private static double MIN_SCALE_DB
           
protected  int minFadeInterval
           
protected  Channel[] pbChannels
          List of path-based channels in the emulator.
protected  PathBasedDSPConfiguration pbDSPConfig
           
protected  boolean running
           
protected  ScaleFactorWorker scaleFactorWorker
           
protected  double[] txAmpGain
           
protected  int update
           
 
Constructor Summary
PathBasedFadingController(PathBasedDSPConfiguration pbDSPConfig, EmuHWConfiguration emuHWConfig, Channel[][] channels, RWLock channelsLock, CommSender commSender)
           
 
Method Summary
protected  void doDelay()
           
protected  void doFading()
           
 double getCurLoss(int channelN, int pathN, int IQ)
           
 double getExistingLoss(Channel channel)
           
 ScaleFactorWorker getScaleFactorWorker()
           
 void run()
           
 void start()
           
 void stop()
           
 boolean userActive()
          check user status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pbChannels

protected Channel[] pbChannels
List of path-based channels in the emulator. As per our assumptions, these will be path-based for the duration of the emulation though the precise channel model used may change.


channelI

protected static int channelI
From the SignalEnvironment. channelsLock allows us to ensure that the channels don't change underneath us in the midst of working with the channels.


channelQ

protected static int channelQ

channelsLock

protected RWLock channelsLock

running

protected boolean running

minFadeInterval

protected int minFadeInterval

update

protected int update

lastLoss

protected double[][][] lastLoss

curLoss

protected double[][][] curLoss

lastDelay

protected double[][] lastDelay

curDelay

protected double[][] curDelay

txAmpGain

protected double[] txAmpGain

lastFadeTimeMillis

protected long lastFadeTimeMillis

lastDelayTimeMillis

protected long lastDelayTimeMillis

commSender

protected CommSender commSender

pbDSPConfig

protected PathBasedDSPConfiguration pbDSPConfig

emuHWConfig

protected EmuHWConfiguration emuHWConfig

scaleFactorWorker

protected ScaleFactorWorker scaleFactorWorker

MAX_SCALE_DB

private static final double MAX_SCALE_DB
See Also:
Constant Field Values

MIN_SCALE_DB

private static final double MIN_SCALE_DB
See Also:
Constant Field Values

debug

private static final boolean debug
See Also:
Constant Field Values

log

protected Logger log
Constructor Detail

PathBasedFadingController

public PathBasedFadingController(PathBasedDSPConfiguration pbDSPConfig,
                                 EmuHWConfiguration emuHWConfig,
                                 Channel[][] channels,
                                 RWLock channelsLock,
                                 CommSender commSender)
Method Detail

start

public void start()

stop

public void stop()

userActive

public boolean userActive()
check user status.

Returns:
True if user is active.

run

public void run()
Specified by:
run in interface Runnable

doDelay

protected void doDelay()
                throws Exception
Throws:
Exception

doFading

protected void doFading()
                 throws Exception
Throws:
Exception

getExistingLoss

public double getExistingLoss(Channel channel)

getScaleFactorWorker

public ScaleFactorWorker getScaleFactorWorker()

getCurLoss

public double getCurLoss(int channelN,
                         int pathN,
                         int IQ)


Copyright © 2013. All Rights Reserved.