edu.cmu.emulator.controlComm
Class CMessage

java.lang.Object
  extended by edu.cmu.emulator.controlComm.CMessage
Direct Known Subclasses:
DCCLocalMessage, RegValueMessage, SetPhaseShiftMessage, StoreSignalMessage, TupleMessage

public class CMessage
extends Object

ControlComm message. The dest field indicates to which module this should be sent. This can be used to send messages into the DSP, the AuxFPGA or to individual DSC units.


Field Summary
static byte D_AUX_FPGA
           
protected static int I_BODY
           
protected static int I_DEST
           
protected static int I_SOURCE
           
protected static int I_TYPE
           
(package private) static int MAX_LENGTH
           
protected  byte[] msg
           
static byte S_EMU_CONTROLLER
           
static byte T_DCC_LOCAL
           
static byte T_MISC_COMMAND
           
static byte T_READ_REG
           
static byte T_REG_VALUE
           
static byte T_SET_DELAY
           
static byte T_SET_PHASE_SHIFT
           
static byte T_SET_SCALE
           
static byte T_SET_TIMED_SCALE
           
static byte T_STORE_SIGNAL
           
static byte T_TEST
           
static byte T_WRITE_REG
           
 
Constructor Summary
protected CMessage()
           
  CMessage(byte type, byte dest, byte[] body)
           
protected CMessage(byte type, byte dest, byte source, int body_size)
           
  CMessage(DatagramPacket packet)
           
 
Method Summary
 byte getByte(int i)
           
(package private)  byte[] getBytes()
           
 int getDest()
           
 int getLength()
           
 int getSource()
           
 int getType()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

msg

protected byte[] msg

I_TYPE

protected static final int I_TYPE
See Also:
Constant Field Values

I_DEST

protected static final int I_DEST
See Also:
Constant Field Values

I_SOURCE

protected static final int I_SOURCE
See Also:
Constant Field Values

I_BODY

protected static final int I_BODY
See Also:
Constant Field Values

D_AUX_FPGA

public static final byte D_AUX_FPGA
See Also:
Constant Field Values

S_EMU_CONTROLLER

public static final byte S_EMU_CONTROLLER
See Also:
Constant Field Values

T_TEST

public static final byte T_TEST
See Also:
Constant Field Values

T_SET_SCALE

public static final byte T_SET_SCALE
See Also:
Constant Field Values

T_SET_DELAY

public static final byte T_SET_DELAY
See Also:
Constant Field Values

T_MISC_COMMAND

public static final byte T_MISC_COMMAND
See Also:
Constant Field Values

T_SET_TIMED_SCALE

public static final byte T_SET_TIMED_SCALE
See Also:
Constant Field Values

T_DCC_LOCAL

public static final byte T_DCC_LOCAL
See Also:
Constant Field Values

T_SET_PHASE_SHIFT

public static final byte T_SET_PHASE_SHIFT
See Also:
Constant Field Values

T_WRITE_REG

public static final byte T_WRITE_REG
See Also:
Constant Field Values

T_READ_REG

public static final byte T_READ_REG
See Also:
Constant Field Values

T_REG_VALUE

public static final byte T_REG_VALUE
See Also:
Constant Field Values

T_STORE_SIGNAL

public static final byte T_STORE_SIGNAL
See Also:
Constant Field Values

MAX_LENGTH

static final int MAX_LENGTH
See Also:
Constant Field Values
Constructor Detail

CMessage

protected CMessage()

CMessage

protected CMessage(byte type,
                   byte dest,
                   byte source,
                   int body_size)

CMessage

public CMessage(byte type,
                byte dest,
                byte[] body)

CMessage

public CMessage(DatagramPacket packet)
Method Detail

getType

public int getType()

getSource

public int getSource()

getDest

public int getDest()

getLength

public int getLength()

getByte

public byte getByte(int i)

getBytes

byte[] getBytes()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.