public class KvnGenerator extends AbstractGenerator
| Constructor and Description |
|---|
KvnGenerator(Appendable output,
int paddingWidth,
String outputName,
int unitsColumn)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
endMessage(String root)
End CCSDS message.
|
void |
enterSection(String name)
Enter into a new section.
|
String |
exitSection()
Exit last section.
|
FileFormat |
getFormat()
Get the generated file format.
|
void |
startMessage(String root,
String messageTypeKey,
double version)
Start CCSDS message.
|
void |
writeComments(List<String> comments)
Write comment lines.
|
void |
writeEntry(String key,
String value,
Unit unit,
boolean mandatory)
Write a single key/value entry.
|
close, complain, dateToString, dateToString, doubleToString, getOutputName, newLine, siToCcsdsName, unitsListToString, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeEntry, writeRawData, writeRawData, writeUnitspublic KvnGenerator(Appendable output, int paddingWidth, String outputName, int unitsColumn)
output - destination of generated outputpaddingWidth - padding width for aligning the '=' sign
(not counting the extra blank added before the '=' sign)outputName - output name for error messagesunitsColumn - columns number for aligning units (if negative or zero, units are not output)TdmWriter.KVN_PADDING_WIDTH,
AemWriter.KVN_PADDING_WIDTH,
ApmWriter.KVN_PADDING_WIDTH,
OpmWriter.KVN_PADDING_WIDTH,
OmmWriter.KVN_PADDING_WIDTH,
OemWriter.KVN_PADDING_WIDTH,
OcmWriter.KVN_PADDING_WIDTHpublic FileFormat getFormat()
public void startMessage(String root, String messageTypeKey, double version) throws IOException
root - root element for XML filesmessageTypeKey - key for message typeversion - format versionIOException - if an I/O error occurs.public void endMessage(String root)
root - root element for XML filespublic void writeComments(List<String> comments) throws IOException
comments - comments to writeIOException - if an I/O error occurs.public void writeEntry(String key, String value, Unit unit, boolean mandatory) throws IOException
key - the keyword to writevalue - the value to writeunit - output unit (may be null)mandatory - if true, null values triggers exception, otherwise they are silently ignoredIOException - if an I/O error occurs.public void enterSection(String name) throws IOException
enterSection in interface GeneratorenterSection in class AbstractGeneratorname - section nameIOException - if an I/O error occurs.public String exitSection() throws IOException
exitSection in interface GeneratorexitSection in class AbstractGeneratorIOException - if an I/O error occurs.Copyright © 2002-2022 CS GROUP. All rights reserved.