edu.cmu.emulator.controlComm
Class SetTimedScaleMessage
java.lang.Object
edu.cmu.emulator.controlComm.CMessage
edu.cmu.emulator.controlComm.TupleMessage
edu.cmu.emulator.controlComm.SetTimedScaleMessage
public class SetTimedScaleMessage
- extends TupleMessage
Sends scaling updates to the auxfpga with timing information that
allows the precise time that the updates occur to be controlled.
Each message consists of several scale sets. Each set occurs at
a specified offset relative to a reference time contained in
this message.
This message also contains the current system time so that the
auxfpga can synchronize its clock to the system clock.
Fields inherited from class edu.cmu.emulator.controlComm.CMessage |
D_AUX_FPGA, I_BODY, I_DEST, I_SOURCE, I_TYPE, MAX_LENGTH, msg, S_EMU_CONTROLLER, T_DCC_LOCAL, T_MISC_COMMAND, T_READ_REG, T_REG_VALUE, T_SET_DELAY, T_SET_PHASE_SHIFT, T_SET_SCALE, T_SET_TIMED_SCALE, T_STORE_SIGNAL, T_TEST, T_WRITE_REG |
filledTuples
protected int filledTuples
I_SYSTEM_TIME
protected static final int I_SYSTEM_TIME
- See Also:
- Constant Field Values
I_START_TIME
protected static final int I_START_TIME
- See Also:
- Constant Field Values
I_TUPLE_0
protected static final int I_TUPLE_0
- See Also:
- Constant Field Values
O_INDEX
protected static final int O_INDEX
- See Also:
- Constant Field Values
O_MULT_FACTOR
protected static final int O_MULT_FACTOR
- See Also:
- Constant Field Values
O_SHIFT_FACTOR
protected static final int O_SHIFT_FACTOR
- See Also:
- Constant Field Values
O_TIME_DELTA
protected static final int O_TIME_DELTA
- See Also:
- Constant Field Values
SetTimedScaleMessage
public SetTimedScaleMessage(int numTuples,
int sysTime,
int startTime)
- Parameters:
sysTime
- - the current system time (e.g. EmuSynch.curTimeMillis() cast to an intstartTime
- - the reference time for all scaling sets contained in this message.
usually, this is the time of the first scaling update.
getNumTuples
public int getNumTuples()
addScaleSet
public void addScaleSet(int index,
int multFactor,
int shiftFactor,
int timeDelta)
- Parameters:
timeDelta
- - the offset from startTime at which this scale set should occur
getIndex
private int getIndex(int tupleNum)
getMultFactor
private int getMultFactor(int tupleNum)
getShiftFactor
private int getShiftFactor(int tupleNum)
getTimeDelta
private int getTimeDelta(int tupleNum)
getBytes
byte[] getBytes()
- Overrides:
getBytes
in class CMessage
toString
public String toString()
- Overrides:
toString
in class CMessage
Copyright © 2013. All Rights Reserved.