Class KvnGenerator

    • Method Detail

      • getFormat

        public FileFormat getFormat()
        Get the generated file format.
        Returns:
        generated file format
      • startMessage

        public void startMessage​(String root,
                                 String messageTypeKey,
                                 double version)
                          throws IOException
        Start CCSDS message.
        Parameters:
        root - root element for XML files
        messageTypeKey - key for message type
        version - format version
        Throws:
        IOException - if an I/O error occurs.
      • endMessage

        public void endMessage​(String root)
        End CCSDS message.
        Parameters:
        root - root element for XML files
      • writeComments

        public void writeComments​(List<String> comments)
                           throws IOException
        Write comment lines.
        Parameters:
        comments - comments to write
        Throws:
        IOException - if an I/O error occurs.
      • writeEntry

        public void writeEntry​(String key,
                               String value,
                               Unit unit,
                               boolean mandatory)
                        throws IOException
        Write a single key/value entry.
        Parameters:
        key - the keyword to write
        value - the value to write
        unit - output unit (may be null)
        mandatory - if true, null values triggers exception, otherwise they are silently ignored
        Throws:
        IOException - if an I/O error occurs.