edu.cmu.emulator.controlComm
Class CommSender

java.lang.Object
  extended by edu.cmu.emulator.controlComm.CommSender
All Implemented Interfaces:
Runnable

public class CommSender
extends Object
implements Runnable


Field Summary
private static int AUX_FPGA_RECV_PORT
           
private  InetAddress auxFPGAIP
           
private static boolean bypassSched
           
private static boolean debug
           
private static String DEF_AUX_FPGA_IP
           
protected  Logger logger
           
private  LinkedBlockingQueue msgQueue
           
private  boolean running
           
private  byte[] sendBuf
           
private  DatagramPacket sendPacket
           
private  DatagramSocket sendSocket
           
 
Constructor Summary
CommSender()
           
CommSender(String auxFPGAIPDef)
           
CommSender(String auxFPGAIPDef, SchedClient schedClient)
          Creates a new CommSender instance.
 
Method Summary
 void addMessage(CMessage msg)
           
static void delayTestB(String auxFPGAIP, String[] args)
           
static void doMiscCmd(String auxFPGAIP, int cmdType, int dataA, int dataB, int dataC)
           
static void doReadReg(String auxFPGAIP, int regNum)
           
static void doSetPhaseShift(String auxFPGAIP, int scmIndex, int phaseShift)
           
static int doStoreSignal(String auxFPGAIP, int sampleWidth, int startAddr, RandomAccessFile in)
           
static void main(String[] args)
           
 void miscCmd(int cmdType, int dataA, int dataB)
           
 void miscCmd(int cmdType, int dataA, int dataB, int dataC)
           
 void run()
           
static void scaleTestA(String[] args)
           
static void scaleTestB(String auxFPGAIP, String[] args)
           
protected  void send(CMessage msg)
           
 void setColActiveDelay(boolean active, int delay)
           
 void setColVictimAggressor(int victimPort, int aggressorPort)
           
 void stop()
          Describe stop method here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

running

private boolean running

msgQueue

private LinkedBlockingQueue msgQueue

sendSocket

private DatagramSocket sendSocket

sendPacket

private DatagramPacket sendPacket

sendBuf

private byte[] sendBuf

auxFPGAIP

private InetAddress auxFPGAIP

DEF_AUX_FPGA_IP

private static final String DEF_AUX_FPGA_IP
See Also:
Constant Field Values

AUX_FPGA_RECV_PORT

private static final int AUX_FPGA_RECV_PORT
See Also:
Constant Field Values

debug

private static final boolean debug
See Also:
Constant Field Values

bypassSched

private static final boolean bypassSched

logger

protected Logger logger
Constructor Detail

CommSender

public CommSender(String auxFPGAIPDef,
                  SchedClient schedClient)
           throws IOException
Creates a new CommSender instance. Warning -- Previous code instantiated but never used a SchedClient object. I have removed that logic. EWA

Parameters:
auxFPGAIPDef - a String value
schedClient - a SchedClient value
Throws:
IOException - if an error occurs

CommSender

public CommSender(String auxFPGAIPDef)
           throws IOException
Throws:
IOException

CommSender

public CommSender()
           throws IOException
Throws:
IOException
Method Detail

stop

public void stop()
Describe stop method here. Why do we actively cause an exception here, just to catch it?


addMessage

public void addMessage(CMessage msg)

run

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

send

protected void send(CMessage msg)
             throws IOException
Throws:
IOException

scaleTestA

public static void scaleTestA(String[] args)
                       throws Exception
Throws:
Exception

scaleTestB

public static void scaleTestB(String auxFPGAIP,
                              String[] args)
                       throws Exception
Throws:
Exception

delayTestB

public static void delayTestB(String auxFPGAIP,
                              String[] args)
                       throws Exception
Throws:
Exception

doMiscCmd

public static void doMiscCmd(String auxFPGAIP,
                             int cmdType,
                             int dataA,
                             int dataB,
                             int dataC)
                      throws Exception
Throws:
Exception

miscCmd

public void miscCmd(int cmdType,
                    int dataA,
                    int dataB)
             throws Exception
Throws:
Exception

miscCmd

public void miscCmd(int cmdType,
                    int dataA,
                    int dataB,
                    int dataC)
             throws Exception
Throws:
Exception

doSetPhaseShift

public static void doSetPhaseShift(String auxFPGAIP,
                                   int scmIndex,
                                   int phaseShift)
                            throws Exception
Throws:
Exception

doReadReg

public static void doReadReg(String auxFPGAIP,
                             int regNum)
                      throws Exception
Throws:
Exception

doStoreSignal

public static int doStoreSignal(String auxFPGAIP,
                                int sampleWidth,
                                int startAddr,
                                RandomAccessFile in)
                         throws Exception
Throws:
Exception

setColVictimAggressor

public void setColVictimAggressor(int victimPort,
                                  int aggressorPort)
                           throws Exception
Throws:
Exception

setColActiveDelay

public void setColActiveDelay(boolean active,
                              int delay)
                       throws Exception
Throws:
Exception

main

public static void main(String[] args)


Copyright © 2013. All Rights Reserved.