|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ptolemy.fmi.FMUBuilder
public class FMUBuilder
Build a FMU shared object.
Red (cxh) |
Red (cxh) |
Nested Class Summary | |
---|---|
private static class |
FMUBuilder._StreamReaderThread
Private class that reads a stream in a thread and updates the the FMUBuilder. |
Field Summary | |
---|---|
private boolean |
_appendToStderrAndStdout
If true, append to stderr and stdout as the commands are executed. |
private static java.lang.String |
_eol
End of line character. |
java.lang.StringBuffer |
buffer
The StringBuffer to which the output is appended. |
Constructor Summary | |
---|---|
FMUBuilder()
Create a FMUBuilder. |
|
FMUBuilder(boolean appendToStderrAndStdout)
Create a FMUBuilder and optionally append to stderr and stdout as the commands are executed. |
Method Summary | |
---|---|
private void |
_appendToBuffer(java.lang.String text)
Append to the internal StringBuffer. |
boolean |
build(java.io.File sharedLibraryFile)
Build the specified shared library inside the FMU. |
void |
stderr(java.lang.String text)
Append the text message to the StringBuffer. |
void |
stdout(java.lang.String text)
Append the text message to the StringBuffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.StringBuffer buffer
private boolean _appendToStderrAndStdout
private static java.lang.String _eol
Constructor Detail |
---|
public FMUBuilder()
public FMUBuilder(boolean appendToStderrAndStdout)
appendToStderrAndStdout
- If true, then as the commands
are executed, the output is append to stderr and stdout.Method Detail |
---|
public boolean build(java.io.File sharedLibraryFile) throws java.io.IOException
A typicaly value is
/tmp/FMUFile12345/binaries/linux64/stepCounter.dylib
.
Typically the sharedLibrary is inside a temporary directory
that was created when the fmu file was unzipped. The
directory names the platform for which the binary is to be
built. This directory resides inside a directory named
binaries/
. Adjacent to the binaries/
directory is the sources/
directory.
sharedLibraryFile
- The shared library that should be built.
java.io.IOException
- If the FMU contains a makefile but
there was a problem building the shared library.public void stderr(java.lang.String text)
text
- The text to append.public void stdout(java.lang.String text)
text
- The text to append.private void _appendToBuffer(java.lang.String text)
text
- The text to append. If the text does not
end with an end of line character(s), then _eol is appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |