de.cau.cs.kieler.krep.evalbench.comm
Class KlpWrapper

java.lang.Object
  extended by de.cau.cs.kieler.krep.evalbench.comm.KlpWrapper
All Implemented Interfaces:
IKrepWrapper

public class KlpWrapper
extends Object
implements IKrepWrapper

Wrapper to software simulation of the Kiel Lustre Processor.

Rating yellow
(2010-02-05) review by cmot, msp

Constructor Summary
KlpWrapper()
          Generate new connection to KLP and reset the KLP.
 
Method Summary
 void comment(String comment)
          
 String getName()
          
 byte getOutput()
          
 boolean hasOutput()
          
 void saveEsi(String esiFile)
          Tell the processor to log the communication into a log-File in esi Format.
 void send(byte b)
          
 void step()
          perform one tick.
 void terminate()
          Close the connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KlpWrapper

public KlpWrapper()
Generate new connection to KLP and reset the KLP.

Method Detail

terminate

public void terminate()
Close the connection.

Specified by:
terminate in interface IKrepWrapper

hasOutput

public boolean hasOutput()

Specified by:
hasOutput in interface IKrepWrapper
Returns:
true if new outputs are available

getOutput

public byte getOutput()

Specified by:
getOutput in interface IKrepWrapper
Returns:
the next output

step

public void step()
perform one tick.

Specified by:
step in interface IKrepWrapper

send

public void send(byte b)

Specified by:
send in interface IKrepWrapper
Parameters:
b - byte to send to the processor

saveEsi

public final void saveEsi(String esiFile)
Tell the processor to log the communication into a log-File in esi Format.

Specified by:
saveEsi in interface IKrepWrapper
Parameters:
esiFile - name of the log File

getName

public String getName()

Specified by:
getName in interface IKrepWrapper
Returns:
retrieve the name of the connected processor

comment

public void comment(String comment)

Specified by:
comment in interface IKrepWrapper
Parameters:
comment - comment to send to the processor (used for logging)