|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.output.hdf5.StaticHeader
public class StaticHeader
Implements the StaticHeader for the RawApplication area, this class can be used to either create the StaticHeader or read a pre-existing StaticHeader.
Field Summary | |
---|---|
private int |
apidListOffset
|
private ApStorageArea |
apStorageArea
|
private int |
apStorageOffset
|
private static int |
bufSize
|
private static byte[] |
data
|
private int |
dataSet
|
private long |
endBoundary
|
private static int |
HeaderSize
|
private int |
nextPktPos
|
private int |
numAppIds
|
private int |
offset
|
private int[] |
packetCount
|
private java.util.List<Packet> |
packetList
|
private int |
packetSizeSum
|
private PacketTrackerList |
packetTracker
|
private int |
pktTrackerOffset
|
private RDRAppIdList |
rdrList
|
private RDRName |
rdrName
|
private SpacecraftId |
satellite
|
private long |
startBoundary
|
Constructor Summary | |
---|---|
StaticHeader(byte[] data)
Used to parse out of a static header read in as part of reading a pre-existing HDF file. |
|
StaticHeader(SpacecraftId satellite,
RDRName rdrName,
java.util.List<Packet> packetList)
Create a static header from an input packet list, used to write to the HDF |
Method Summary | |
---|---|
RandomAccessPacketReader |
createRandomAccessPacketReader()
Create a RandomAccessPacketReader which allows the packet in a particular RawApplicationPackets area to be read out by random access using the information in the StaticHeader. |
SequentialPacketReader |
createSequentialPacketReader()
Create a SequentialPacketReader which allows the packets in a particular RawApplicationPackets area to be read out sequentially using the information in the StaticHeader. |
int |
getAppIdListOffset()
Return the AppIdList offset in the StaticHeader area |
int |
getApStorageOffset()
Return the ApStorageOffset value |
byte[] |
getData()
Return a pointer to the original input data used for reading out the contents of the StaticHeader read out of the RawApplicationPackets area. |
int |
getPacketStoreSize()
Return the packet store size |
int |
getPktTrackerOffset()
Return the packet tracker offset in the StaticHeader area |
int |
getSize()
Return the size of the StaticHeader, the RDR list size, the packet tacker size and the packet store size itself |
int |
getTotalHeaderSize()
Return the total size of the StaticHeader which is the fixed sized of the StaticHeader area plus the RDR list size and the packet tracker size. |
void |
write(int dataSet)
Write from the various sources of input the StaticHeader and the packet storage area to the RawApplicationPackets based on the HDF DataSet handle. |
private void |
writeApidListOffset()
Write the application ID list offset to the StaticHeader data buffer |
private void |
writeApStorageOffset()
Write the ap storage offset to the StaticHeader data buffer |
private void |
writeEndBoundary()
Write the end boundary to the StaticHeader data buffer |
private void |
writeNextPktPos()
Write the next packet position to the StaticHeader data buffer |
private void |
writeNumAppIds()
Write the number of application IDs to the StaticHeader data buffer |
private void |
writePktTrackerOffset()
Write the packet tracker offset to the StaticHeader data buffer |
private void |
writeSatellite()
Write the satellite name to the StaticHeader data buffer, converting it to ASCII first |
private void |
writeSensor()
Write the sensor name to the StaticHeader data buffer, converting it to ASCII first |
private void |
writeStartBoundary()
Write the start boundary to the StaticHeader data buffer |
private void |
writeToHDF()
Write the entire filled out data buffer to the HDF file at the specified DataSet handle using the data buffer array |
private void |
writeTypeID()
Write the type id name to the StaticHeader data buffer, converting it to ASCII first |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int HeaderSize
private int numAppIds
private int apidListOffset
private int pktTrackerOffset
private int apStorageOffset
private int nextPktPos
private long startBoundary
private long endBoundary
private RDRAppIdList rdrList
private PacketTrackerList packetTracker
private ApStorageArea apStorageArea
private int dataSet
private int packetSizeSum
private SpacecraftId satellite
private RDRName rdrName
private java.util.List<Packet> packetList
private static byte[] data
private int offset
private int[] packetCount
private static int bufSize
Constructor Detail |
---|
public StaticHeader(SpacecraftId satellite, RDRName rdrName, java.util.List<Packet> packetList)
satellite
- the name of the satelliterdrName
- the RDR namepacketList
- the list of packets that the static header needs to track that go into a particular RawApplicationPackets areapublic StaticHeader(byte[] data)
data
- containing the static headerMethod Detail |
---|
public SequentialPacketReader createSequentialPacketReader()
public RandomAccessPacketReader createRandomAccessPacketReader()
public byte[] getData()
public int getApStorageOffset()
public int getTotalHeaderSize()
public int getPacketStoreSize()
public int getSize()
public int getAppIdListOffset()
public int getPktTrackerOffset()
public void write(int dataSet) throws RtStpsException
dataSet
- the HDF handle to the RawApplicationPackets
RtStpsException
- wrapped HDF or other exceptionsprivate void writeSatellite()
private void writeSensor()
private void writeTypeID()
private void writeNumAppIds()
private void writeApidListOffset()
private void writePktTrackerOffset()
private void writeApStorageOffset()
private void writeNextPktPos()
private void writeStartBoundary()
private void writeEndBoundary()
private void writeToHDF() throws RtStpsException
wraps
- any HDF exceptions in an RtStpsException
RtStpsException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |