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

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

public class KepWrapper
extends Object
implements IKrepWrapper

JNI wrapper for the Kiel Esterel Processor.

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

Constructor Summary
KepWrapper()
          Connect to KEP simulation and reset the KEP.
 
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

KepWrapper

public KepWrapper()
Connect to KEP simulation and reset the KEP.

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 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

comment

public void comment(String comment)

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

getName

public String getName()

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