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

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

public class PacketTrackerList
extends java.lang.Object

Build the packet tracker list in the StaticHeader


Field Summary
private  java.util.LinkedList<PacketTrackerItem> packetTrackerItems
           
private static int PacketTrackerItemSize
           
private static int SCANGROUP
           
private static int STARTGROUP
           
private  int totalSize
           
 
Constructor Summary
PacketTrackerList(int offset, byte[] data, int end)
          This constructs the list from memory which has likely just been read from the HDF and is in the StaticHeader.
PacketTrackerList(java.util.List<Packet> packetList)
          Construct the in memory "packed" version of the PacketTrackerList from a List packets.
 
Method Summary
 java.util.List<PacketTrackerItem> getPacketTrackerItemList()
           
 int getSize()
          Return the dataset size in bytes
 int write(byte[] data, int offset)
          Write the constructed PacketTrackerList to the supplied data buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

packetTrackerItems

private java.util.LinkedList<PacketTrackerItem> packetTrackerItems

STARTGROUP

private static final int STARTGROUP
See Also:
Constant Field Values

SCANGROUP

private static final int SCANGROUP
See Also:
Constant Field Values

PacketTrackerItemSize

private static final int PacketTrackerItemSize
See Also:
Constant Field Values

totalSize

private int totalSize
Constructor Detail

PacketTrackerList

public PacketTrackerList(java.util.List<Packet> packetList)
Construct the in memory "packed" version of the PacketTrackerList from a List packets. Once constructed it may then be written to the StaticHeader. (NOTE: this class predates almost all the other classes in this package and was part of now defunct early implementation of the RDR builder. The algorithm below needs to be revisited and better documented in the context of the new package classes. Although it seems to work)

Parameters:
packetList - a list of packet to be made into an in memory PacketTrackerList

PacketTrackerList

public PacketTrackerList(int offset,
                         byte[] data,
                         int end)
This constructs the list from memory which has likely just been read from the HDF and is in the StaticHeader. This is the "read" side of the class.

Parameters:
offset -
data -
end -
Method Detail

write

public int write(byte[] data,
                 int offset)
Write the constructed PacketTrackerList to the supplied data buffer

Parameters:
data - the byte array for the data
offset - the offset into the array
Returns:
the new offset

getSize

public int getSize()
Return the dataset size in bytes

Returns:
the size in bytes

getPacketTrackerItemList

public java.util.List<PacketTrackerItem> getPacketTrackerItemList()