gov.nasa.gsfc.drl.rtstps.core.output.hdf5
Class ATMSRawApplicationPackets2

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.output.hdf5.RawApplicationPackets
      extended by gov.nasa.gsfc.drl.rtstps.core.output.hdf5.ATMSRawApplicationPackets2

public class ATMSRawApplicationPackets2
extends RawApplicationPackets

Build the RawApplicationPackets (or read a pre-existing one) for the HDF for ATMS. Due to problems with the ATMS packets in the test data sets, this just collect X seconds worth at a time...


Field Summary
private static long GranuleSizeInSeconds
           
private  long localCurrentTime
           
private  long localFirstTime
           
private  Stats stats
           
private  long timeSpanInSeconds
           
 
Fields inherited from class gov.nasa.gsfc.drl.rtstps.core.output.hdf5.RawApplicationPackets
packetPool
 
Constructor Summary
ATMSRawApplicationPackets2(int allRDRId, int setNum)
          Constructor which attempts to read the RawApplicationPacket entry that pre-exists.
ATMSRawApplicationPackets2(int readId, int setNum, boolean usedByGranuleOnly)
           
ATMSRawApplicationPackets2(SpacecraftId satellite, int setNum, int scansPerGranule, PacketPool packetPool)
          Constructor for creating an nth instance of a ATMS raw application data packet area builder.
ATMSRawApplicationPackets2(Stats stats, SpacecraftId satellite, int setNum, int scansPerGranule, PacketPool packetPool)
           
 
Method Summary
private  void calcTimeSpanInSeconds(Packet p)
           
 void close()
          Close out the RawApplicationPacket which writes the results to the HDF file and cleans up.
 boolean notFull(Packet p)
          Determine if the RawApplicationPacket is full or not.
 void put(Packet p)
          Put a packet into the RawApplicationPacket after checking if it is full or not.
 boolean write(int hdfFile)
          Write the ATMSRawApplication structure to the given HDF file specified by the HDF input handle
 
Methods inherited from class gov.nasa.gsfc.drl.rtstps.core.output.hdf5.RawApplicationPackets
getAppIdCounts, getData, getDataSet, getDataSpace, getFirstTime, getLastTime, getPacketList, getPacketTypeCounts, getPacketTypes, getStaticHeader, getTimeSpan, getTotalPacketCounts, setFirstTime, setLastTime, updateAppIdCounters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GranuleSizeInSeconds

private static final long GranuleSizeInSeconds
See Also:
Constant Field Values

timeSpanInSeconds

private long timeSpanInSeconds

localFirstTime

private long localFirstTime

localCurrentTime

private long localCurrentTime

stats

private Stats stats
Constructor Detail

ATMSRawApplicationPackets2

public ATMSRawApplicationPackets2(SpacecraftId satellite,
                                  int setNum,
                                  int scansPerGranule,
                                  PacketPool packetPool)
Constructor for creating an nth instance of a ATMS raw application data packet area builder.

Parameters:
satellite - the name of the spacecraft as a SpacecraftId
setNum - the set number
scansPerGranule - the number of sensor scans per granule

ATMSRawApplicationPackets2

public ATMSRawApplicationPackets2(Stats stats,
                                  SpacecraftId satellite,
                                  int setNum,
                                  int scansPerGranule,
                                  PacketPool packetPool)

ATMSRawApplicationPackets2

public ATMSRawApplicationPackets2(int allRDRId,
                                  int setNum)
                           throws RtStpsException
Constructor which attempts to read the RawApplicationPacket entry that pre-exists. The contents of the dataspace are read into a memory buffer... assuming it will fit.

Parameters:
allRDRId - the rdrAll Groups id
setNum - the set number of raw entry
Throws:
RtStpsException - Wraps any HDF exception

ATMSRawApplicationPackets2

public ATMSRawApplicationPackets2(int readId,
                                  int setNum,
                                  boolean usedByGranuleOnly)
                           throws RtStpsException
Throws:
RtStpsException
Method Detail

notFull

public boolean notFull(Packet p)
                throws RtStpsException
Description copied from class: RawApplicationPackets
Determine if the RawApplicationPacket is full or not. Override this method to provide the implementation.

Specified by:
notFull in class RawApplicationPackets
Parameters:
p - the packet to be added to the RawApplicationPacket
Returns:
true or false
Throws:
RtStpsException

calcTimeSpanInSeconds

private void calcTimeSpanInSeconds(Packet p)

put

public void put(Packet p)
         throws RtStpsException
Description copied from class: RawApplicationPackets
Put a packet into the RawApplicationPacket after checking if it is full or not. Override this method to provide the implementation.

Specified by:
put in class RawApplicationPackets
Parameters:
p - packet to be written
Throws:
RtStpsException

write

public boolean write(int hdfFile)
              throws RtStpsException
Write the ATMSRawApplication structure to the given HDF file specified by the HDF input handle

Overrides:
write in class RawApplicationPackets
Parameters:
hdfFile - input handle to a previous opened HDF file
Returns:
true if the write succeeds
Throws:
RtStpsException - Wraps HDF exceptions

close

public void close()
           throws RtStpsException
Close out the RawApplicationPacket which writes the results to the HDF file and cleans up.

Overrides:
close in class RawApplicationPackets
Throws:
RtStpsException