gov.nasa.gsfc.drl.rtstps.core.xstps.pds
Class WrongLengthList

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.xstps.pds.WrongLengthList

final class WrongLengthList
extends java.lang.Object

This class checks packets for wrong lengths and collects pertinent information about wrong-length-packets for Sorcerer. You set up this class by either setting minimum and maximum valid lengths or by giving this class a list of valid lengths.


Field Summary
static int MAP_SIZE
           
private  int maxLength
           
private  int minLength
           
private  int packets
           
private  java.util.HashSet<java.lang.Integer> packetSizeSet
           
private  boolean useMinMax
           
private  java.util.LinkedList<java.lang.Integer> wlList
           
 
Constructor Summary
WrongLengthList()
           
 
Method Summary
(package private)  void addPacketLength(int length)
          Add a valid packet length to the list of valid packet lengths.
(package private)  boolean check(Packet packet)
          Check the packet for an invalid length.
(package private)  int getPacketCount()
          Get the number of packets with wrong lengths.
(package private)  void printCS(java.io.DataOutput out)
          Write wrong-length information to the construction record.
(package private)  void setMinMaxLengths(int min, int max)
          Set a minimum and maximum packet length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAP_SIZE

public static final int MAP_SIZE
See Also:
Constant Field Values

packetSizeSet

private java.util.HashSet<java.lang.Integer> packetSizeSet

wlList

private java.util.LinkedList<java.lang.Integer> wlList

maxLength

private int maxLength

minLength

private int minLength

useMinMax

private boolean useMinMax

packets

private int packets
Constructor Detail

WrongLengthList

WrongLengthList()
Method Detail

setMinMaxLengths

void setMinMaxLengths(int min,
                      int max)
                throws RtStpsException
Set a minimum and maximum packet length.

Throws:
RtStpsException

getPacketCount

final int getPacketCount()
Get the number of packets with wrong lengths.


addPacketLength

void addPacketLength(int length)
Add a valid packet length to the list of valid packet lengths. Using this method will override any prior calls to setMinMaxLengths.


check

boolean check(Packet packet)
Check the packet for an invalid length.


printCS

void printCS(java.io.DataOutput out)
       throws java.io.IOException
Write wrong-length information to the construction record.

Throws:
java.io.IOException