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
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected ParameterFormatter.Header
protected boolean
protected int
protected int
protected boolean
protected boolean
protected boolean
protected boolean
protected int
protected int
protected Writer
-
Constructor Summary
ConstructorDescriptionParameterFormatter
(Writer writer, Collection<Yamcs.NamedObjectId> paramList) ParameterFormatter
(Writer writer, Collection<Yamcs.NamedObjectId> paramList, char columnSeparator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
int
int
void
void
setAllParametersPresent
(boolean allParametersPresent) void
setKeepValues
(boolean keepValues) void
setPrintMonitoring
(boolean printMonitoring) void
setPrintRaw
(boolean printRaw) void
setPrintTime
(boolean printTime) void
setPrintUnique
(boolean printUnique) void
setTimeWindow
(int timewindow) void
void
updateWriter
(OutputStream outputStream, Charset charset) protected void
void
writeParameters
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getLinesSaved
public int getLinesSaved() -
getLinesReceived
public int getLinesReceived()
-