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

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

Deprecated.

@Deprecated
public class CountingRawApplicationPackets
extends RawApplicationPackets

Create a raw application packet dataset in an HDF file for an RDR based on a count of incoming packets such as: '/All_Data/VIIRS-SCIENCE-RDR/RawApplicationPackets0' This is a very basic and overly simplistic implementation that is largly designed to be subclasses for each specific sensor. The dataset is created based on a timed holding of packets hung up in the object. (constructor, notFull, put) The time is based on the clock time when the object was created and a given user argument of seconds in the future. It assumed the object will be used immediately to put packets in it and then create the HDF dataset. Once the time span has occurred, the accumulated packets may then be written to the HDF file, created in the RDR dataset structure. (writeRDR) A static header is calculated from the packets given to the object, then the packets themselves are written to the dataset. The object should be explicitly closed by calling close or the HDF API will get a heap exception eventually.


Field Summary
private  int maxPacketCount
          Deprecated.  
private  int packetCounter
          Deprecated.  
 
Fields inherited from class gov.nasa.gsfc.drl.rtstps.core.output.hdf5.RawApplicationPackets
packetPool
 
Constructor Summary
CountingRawApplicationPackets(int allRDRId, int setNum)
          Deprecated. Constructor which attempts to read the RawApplicationPacket entry that pre-exists.
CountingRawApplicationPackets(SpacecraftId satellite, RDRName rdrName, int setNum, int packetCount)
          Deprecated. Constructor for creating an nth instance of a raw application data packet area
 
Method Summary
 boolean notFull(Packet p)
          Deprecated. Determine if the object will take more packets.
 void put(Packet p)
          Deprecated. Give the object a packet to hang up, eventually to be written to the HDF.
 
Methods inherited from class gov.nasa.gsfc.drl.rtstps.core.output.hdf5.RawApplicationPackets
close, getAppIdCounts, getData, getDataSet, getDataSpace, getFirstTime, getLastTime, getPacketList, getPacketTypeCounts, getPacketTypes, getStaticHeader, getTimeSpan, getTotalPacketCounts, setFirstTime, setLastTime, updateAppIdCounters, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxPacketCount

private int maxPacketCount
Deprecated. 

packetCounter

private int packetCounter
Deprecated. 
Constructor Detail

CountingRawApplicationPackets

public CountingRawApplicationPackets(SpacecraftId satellite,
                                     RDRName rdrName,
                                     int setNum,
                                     int packetCount)
Deprecated. 
Constructor for creating an nth instance of a raw application data packet area

Parameters:
satellite - the name of the spacecraft
rdrName - the rdrName of the RDR dataset (i.e. VIIRS-SCIENCE-RDR)
setNum - the set number
packetCount - counts first or standalone packets, middle are last packets are accepted regardless of specified count

CountingRawApplicationPackets

public CountingRawApplicationPackets(int allRDRId,
                                     int setNum)
                              throws RtStpsException
Deprecated. 
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
Method Detail

notFull

public boolean notFull(Packet p)
Deprecated. 
Determine if the object will take more packets. Only packets that are first or stand alone packets are considered in against the packet count. Middle or last packets are always allowed. This is an attempt to prevent the splitting up of segmented packets.

Specified by:
notFull in class RawApplicationPackets
Parameters:
p - packet to be written
Returns:
true or false

put

public void put(Packet p)
         throws RtStpsException
Deprecated. 
Give the object a packet to hang up, eventually to be written to the HDF. No checking is done here to see if the limit has been reached, use notFull above first. If the packet is a first or stand alone packet, the count is incremented. Otherwise if it is a middle or last packet, the count is unchanged. This is an attempt to not split up segmented or group packets.

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