|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.krep.evalbench.comm.CommunicationProtocol
de.cau.cs.kieler.krep.evalbench.comm.KepProtocol
public class KepProtocol
Implementation of the communication protocol interface that uses the KEP protocol. For details on the processors see Xin's or Malte's theses.
Field Summary |
---|
Fields inherited from interface de.cau.cs.kieler.krep.evalbench.comm.ICommunicationProtocol |
---|
P_KEP, P_KREP |
Constructor Summary | |
---|---|
KepProtocol(IConnection connectionProtocol)
Constructs a new instance of the KEP protocol. |
Method Summary | |
---|---|
void |
continuousRun()
When executed the target is set to continuous mode. |
int[] |
getExecutionTrace()
Requests an execution trace for the last tick command. |
String |
getTargetInfo()
Requests target information from the target and translates the received return string. |
boolean |
loadProgram(IAssembler program,
IProgressMonitor monitor)
Loads a program onto the connected target. |
void |
reset()
Resets the current program on the target. |
void |
stopContinuous()
Stops continuous mode and returns to single tick mode. |
int |
tick(int maxSignals,
LinkedList<Signal> inputs,
LinkedList<Signal> outputs)
Performs a program tick by sending the global input signal status, executing the tick command and reading the global output signal status. |
boolean |
verifyCommunication()
Verifies communication by sending a command and receiving a return string. |
Methods inherited from class de.cau.cs.kieler.krep.evalbench.comm.CommunicationProtocol |
---|
addCommunicationListener, getCommunicationListeners, getConnection, notifyComment, notifyReceive, notifySend, removeCommunicationListener, setCommunicationListeners, setConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KepProtocol(IConnection connectionProtocol)
connectionProtocol
- underlying connection protocol to be used; this protocol instance is expected to
be already initializedMethod Detail |
---|
public void continuousRun() throws CommunicationException
CommunicationException
- when an exception occurs while sending the commandpublic int[] getExecutionTrace() throws CommunicationException
CommunicationException
- when the received trace is invalidpublic String getTargetInfo() throws CommunicationException
CommunicationException
- when the return string is invalidpublic boolean loadProgram(IAssembler program, IProgressMonitor monitor) throws CommunicationException
program
- array of hex encoded instructionsmonitor
- progress-monitor, null if nothing shall be displayed
CommunicationException
- when the program string has an invalid lengthpublic void reset() throws CommunicationException
CommunicationException
- when an invalid reply was receivedpublic void stopContinuous() throws CommunicationException
CommunicationException
- when an invalid reply was receivedpublic int tick(int maxSignals, LinkedList<Signal> inputs, LinkedList<Signal> outputs) throws CommunicationException
maxSignals
- number of signals in the current program.inputs
- input signalsoutputs
- An empty list of output signals, the actual outputs are added by the tick function.
CommunicationException
- when an invalid reply was receivedpublic boolean verifyCommunication() throws CommunicationException
CommunicationException
- when no return string could be read
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |