Package org.yamcs.utils
Class ParameterFormatter
java.lang.Object
org.yamcs.utils.ParameterFormatter
- All Implemented Interfaces:
Closeable,AutoCloseable
Formats in tab separated format parameters. The list of the possible parameters has to be known in advance.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected ParameterFormatter.Headerprotected booleanprotected intprotected intprotected booleanprotected booleanprotected booleanprotected booleanprotected intprotected intprotected Writer -
Constructor Summary
ConstructorsConstructorDescriptionParameterFormatter(Writer writer, Collection<Yamcs.NamedObjectId> paramList) ParameterFormatter(Writer writer, Collection<Yamcs.NamedObjectId> paramList, char columnSeparator) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()intintvoidvoidsetAllParametersPresent(boolean allParametersPresent) voidsetKeepValues(boolean keepValues) voidsetPrintMonitoring(boolean printMonitoring) voidsetPrintRaw(boolean printRaw) voidsetPrintTime(boolean printTime) voidsetPrintUnique(boolean printUnique) voidsetTimeWindow(int timewindow) voidvoidupdateWriter(OutputStream outputStream, Charset charset) protected voidvoidwriteParameters(List<ParameterValueWithId> params) adds new parameters - if they are written to the output buffer or not depends on the settings
-
Field Details
-
writer
-
printTime
protected boolean printTime -
printRaw
protected boolean printRaw -
printMonitoring
protected boolean printMonitoring -
printUnique
protected boolean printUnique -
keepValues
protected boolean keepValues -
header
-
allParametersPresent
protected boolean allParametersPresent -
timewindow
protected int timewindow -
unsavedLineCount
protected int unsavedLineCount -
linesSaved
protected int linesSaved -
linesReceived
protected int linesReceived -
first
protected boolean first
-
-
Constructor Details
-
ParameterFormatter
-
ParameterFormatter
public ParameterFormatter(Writer writer, Collection<Yamcs.NamedObjectId> paramList, char columnSeparator)
-
-
Method Details
-
updateWriter
-
setPrintRaw
public void setPrintRaw(boolean printRaw) -
setPrintMonitoring
public void setPrintMonitoring(boolean printMonitoring) -
setPrintTime
public void setPrintTime(boolean printTime) -
setPrintUnique
public void setPrintUnique(boolean printUnique) -
setWriteHeader
-
setAllParametersPresent
public void setAllParametersPresent(boolean allParametersPresent) -
setKeepValues
public void setKeepValues(boolean keepValues) -
setTimeWindow
public void setTimeWindow(int timewindow) -
resetTimeWindow
public void resetTimeWindow() -
writeParameters
adds new parameters - if they are written to the output buffer or not depends on the settings- Parameters:
params-- Throws:
IOException
-
writeParameters
- Throws:
IOException
-
flush
public void flush() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getLinesSaved
public int getLinesSaved() -
getLinesReceived
public int getLinesReceived()
-