Class StreamingAemWriter
- java.lang.Object
-
- org.orekit.files.ccsds.ndm.adm.aem.StreamingAemWriter
-
- All Implemented Interfaces:
AutoCloseable
public class StreamingAemWriter extends Object implements AutoCloseable
A writer for AEM files.Each instance corresponds to a single AEM file.
This class can be used as a step handler for a
Propagator
.Propagator propagator = ...; // pre-configured propagator AEMWriter aemWriter = ...; // pre-configured writer try (Generator out = ...; // set-up output stream StreamingAemWriter sw = new StreamingAemWriter(out, aemWriter)) { // set-up streaming writer // write segment 1 propagator.getMultiplexer().add(step, sw.newSegment()); propagator.propagate(startDate1, stopDate1); ... // write segment n propagator.getMultiplexer().clear(); propagator.getMultiplexer().add(step, sw.newSegment()); propagator.propagate(startDateN, stopDateN); }
- Since:
- 10.2
- Author:
- Bryan Cazabonne, Luc Maisonobe
- See Also:
- CCSDS 504.0-B-1 Attitude Data Messages,
AemWriter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
StreamingAemWriter.SegmentWriter
A writer for a segment of an AEM.
-
Constructor Summary
Constructors Constructor Description StreamingAemWriter(Generator generator, AemWriter writer, AdmHeader header, AemMetadata template)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
StreamingAemWriter.SegmentWriter
newSegment()
Create a writer for a new AEM attitude ephemeris segment.
-
-
-
Constructor Detail
-
StreamingAemWriter
public StreamingAemWriter(Generator generator, AemWriter writer, AdmHeader header, AemMetadata template)
Simple constructor.- Parameters:
generator
- generator for AEM outputwriter
- writer for the AEM message formatheader
- file header (may be null)template
- template for metadata- Since:
- 11.0
-
-
Method Detail
-
newSegment
public StreamingAemWriter.SegmentWriter newSegment()
Create a writer for a new AEM attitude ephemeris segment.The returned writer can only write a single attitude ephemeris segment in an AEM. This method must be called to create a writer for each attitude ephemeris segment.
- Returns:
- a new AEM segment writer, ready for use.
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
-