de.cau.cs.kieler.esterel.cec
Class CEC

java.lang.Object
  extended by de.cau.cs.kieler.esterel.cec.CEC

public final class CEC
extends Object

Wrapper class to execute CEC executables.

Rating red

Nested Class Summary
static class CEC.MODULE
          all modules that are part of the CEC.
 
Method Summary
static InputStream exec(CEC.MODULE module, InputStream input)
          Execute single CEC module.
static URI run(URI strlFile)
          Compile Esterel file to C.
static URI run(URI strlFile, File outFile)
          Compile Esterel file to C.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

exec

public static InputStream exec(CEC.MODULE module,
                               InputStream input)
                        throws KielerException
Execute single CEC module.

Parameters:
module - name of the module
input - input stream for the compilation
Returns:
result of the compilation
Throws:
KielerException - thrown for any execution error

run

public static URI run(URI strlFile,
                      File outFile)
               throws IOException,
                      KielerException
Compile Esterel file to C. This is directly derived from the CEC script with the default values.

Parameters:
strlFile - name of the input File.
outFile - output file for the C code
Returns:
URI of the generated C file
Throws:
IOException - if file cannot be read/written
KielerException - thrown if compiler can not be executed or for compilation errors

run

public static URI run(URI strlFile)
               throws IOException,
                      KielerException
Compile Esterel file to C. This is directly derived from the CEC script with the default values.

Parameters:
strlFile - name of the input File.
Returns:
URI of the generated C file
Throws:
IOException - if file cannot be read/written
KielerException - thrown if compiler can not be executed or for compilation errors