|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.RtStpsNode
gov.nasa.gsfc.drl.rtstps.core.ccsds.AbstractService
gov.nasa.gsfc.drl.rtstps.core.ccsds.path.PathService
public class PathService
This class handles the first phase of the CCSDS Path Service. It performs packet assembly from v2 CADUs and sends the packets to a PacketReceiver. It does not sort packets, which it expects subsequent PacketReceivers to do. It does identify idle packets, but it does no other packet functions or verifications other than what it needs to do to assemble them.
This class receives frames as a FrameReceiver and decomposes each one's packet zone into a stream of packets. You must set the PacketReceiver for this class to operate successfully. The packet zone must include the first header pointer in the first two bytes immediately followed by packet data, which excludes any trailing bytes that are not packet parts.
Field Summary | |
---|---|
private LongStatusItem |
badFirstHeaderPointers
|
static java.lang.String |
CLASSNAME
This is a class name for this STPS node type, which is also the element name. |
private LongStatusItem |
createdPackets
|
private LongStatusItem |
discardedFragmentByteCount
|
private LongStatusItem |
discardedFragments
|
private boolean |
frameHasBadFhp
|
private static int |
FREE_STATE
|
private static int |
IDLE_VCDU
|
private LongStatusItem |
idleVcdus
|
private LongStatusItem |
irrationalPacketLengths
|
private int |
mpduEnd
|
private int |
mpduStart
|
private static int |
NO_PACKET_HEADER_IN_MPDU
|
private PacketReceiver |
output
|
private PacketCaddy |
packetCaddy
|
private PacketList |
packetList
|
private PacketZone |
packetZone
|
private org.w3c.dom.NodeList |
pklinks
|
private PacketOutputTool |
potool
|
private PathServiceSetup |
setup
|
private static int |
SPLIT_HEADER_STATE
|
private static int |
SPLIT_PACKET_STATE
|
private SplitHeader |
splitHeader
|
private int |
state
|
private LongStatusItem |
troublesomeFrames
|
Fields inherited from class gov.nasa.gsfc.drl.rtstps.core.ccsds.AbstractService |
---|
cadu, sequencer, serviceElement |
Fields inherited from class gov.nasa.gsfc.drl.rtstps.core.RtStpsNode |
---|
linkName, statusItemList, typeName |
Constructor Summary | |
---|---|
PathService()
Create a PathService object. |
Method Summary | |
---|---|
private void |
abortSplitHeader(int firstPieceLength)
I use this method when I must discard a packet header and the first frame piece during the "split packet header" scenario. |
private void |
abortSplitPacket(int firstPieceLength)
I use this method when I must discard the first packet fragment and create a short packet during the "split packet" scenario. |
void |
addReceiver(Receiver receiver)
Add a Receiver to this sender's list of receivers. |
private boolean |
decomposeDataZone(byte[] data,
FrameAnnotation frameAnnotation)
Decompose a packet zone into packets. |
private boolean |
discardUnexpectedPiece(int fhp)
I use this method when I encounter an unexpected piece, which I discard, during the "free state" scenario. |
private boolean |
doSplitHeaderScenario(int fhp,
FrameAnnotation frameAnnotation)
This method processes the first piece, which is the second half of a split header, when this class is in the "split packet header" state. |
private boolean |
doSplitPacketScenario(int fhp,
FrameAnnotation frameAnnotation)
This method processes the first frame piece, which is subsequent packet piece, when this class is in the "split packet" state. |
void |
finishSetup(Configuration configuration)
Finish the setup. |
void |
flush()
Flush the pipeline. |
void |
load(org.w3c.dom.Element element,
Configuration configuration)
Set up this stps node with a configuration. |
void |
putFrame(Frame frame)
Give a frame to this class for packet reassembly. |
private void |
resolveIrrationalPacket()
A packet length must be rational. |
Methods inherited from class gov.nasa.gsfc.drl.rtstps.core.ccsds.AbstractService |
---|
putFrames |
Methods inherited from class gov.nasa.gsfc.drl.rtstps.core.RtStpsNode |
---|
clear, clone, getElementName, getLinkName, getStatusItems, setLinkName, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gov.nasa.gsfc.drl.rtstps.core.FrameReceiver |
---|
getLinkName, putFrames |
Field Detail |
---|
public static final java.lang.String CLASSNAME
private static final int NO_PACKET_HEADER_IN_MPDU
private static final int IDLE_VCDU
private static final int FREE_STATE
private static final int SPLIT_HEADER_STATE
private static final int SPLIT_PACKET_STATE
private int state
private PacketCaddy packetCaddy
private PathServiceSetup setup
private PacketZone packetZone
private SplitHeader splitHeader
private PacketList packetList
private int mpduStart
private int mpduEnd
private boolean frameHasBadFhp
private org.w3c.dom.NodeList pklinks
private PacketReceiver output
private PacketOutputTool potool
private LongStatusItem idleVcdus
private LongStatusItem badFirstHeaderPointers
private LongStatusItem troublesomeFrames
private LongStatusItem irrationalPacketLengths
private LongStatusItem createdPackets
private LongStatusItem discardedFragments
private LongStatusItem discardedFragmentByteCount
Constructor Detail |
---|
public PathService()
Method Detail |
---|
public void load(org.w3c.dom.Element element, Configuration configuration) throws RtStpsException
load
in class AbstractService
RtStpsException
public void addReceiver(Receiver receiver) throws RtStpsException
addReceiver
in interface Sender
receiver
- If the receiver is not of the expected type,
then the method throws an StpsException.
RtStpsException
public void finishSetup(Configuration configuration) throws RtStpsException
finishSetup
in class AbstractService
RtStpsException
public final void flush() throws RtStpsException
flush
in interface FrameReceiver
flush
in interface Receiver
RtStpsException
public void putFrame(Frame frame) throws RtStpsException
putFrame
in interface FrameReceiver
RtStpsException
private boolean decomposeDataZone(byte[] data, FrameAnnotation frameAnnotation)
data
- An array of bytes that define the complete frame.frameAnnotation
- The annotation for this frame.
private boolean doSplitHeaderScenario(int fhp, FrameAnnotation frameAnnotation)
fhp
- The first header pointer.frameAnnotation
- Frame annotation from the current frame.
private boolean doSplitPacketScenario(int fhp, FrameAnnotation frameAnnotation)
fhp
- The first header pointer.frameAnnotation
- Frame annotation from the current frame.
private void abortSplitHeader(int firstPieceLength)
private void abortSplitPacket(int firstPieceLength)
private boolean discardUnexpectedPiece(int fhp)
private void resolveIrrationalPacket()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |