Class ParameterFormatter

java.lang.Object
org.yamcs.utils.ParameterFormatter
All Implemented Interfaces:
Closeable, AutoCloseable

public class ParameterFormatter extends Object implements Closeable
Formats in tab separated format parameters. The list of the possible parameters has to be known in advance.
  • Field Details

    • writer

      protected Writer writer
    • printTime

      protected boolean printTime
    • printRaw

      protected boolean printRaw
    • printMonitoring

      protected boolean printMonitoring
    • printUnique

      protected boolean printUnique
    • keepValues

      protected boolean keepValues
    • 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

  • Method Details

    • updateWriter

      public void updateWriter(OutputStream outputStream, Charset charset)
    • 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

      public void setWriteHeader(ParameterFormatter.Header header)
    • setAllParametersPresent

      public void setAllParametersPresent(boolean allParametersPresent)
    • setKeepValues

      public void setKeepValues(boolean keepValues)
    • setTimeWindow

      public void setTimeWindow(int timewindow)
    • resetTimeWindow

      public void resetTimeWindow()
    • writeParameters

      public void writeParameters(List<ParameterValueWithId> params) throws IOException
      adds new parameters - if they are written to the output buffer or not depends on the settings
      Parameters:
      params -
      Throws:
      IOException
    • writeParameters

      protected void writeParameters() throws IOException
      Throws:
      IOException
    • flush

      public void flush()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • getLinesSaved

      public int getLinesSaved()
    • getLinesReceived

      public int getLinesReceived()