Alphabetic Class Index   |   Class Inheritance Tree Index   |   Tool Index

Class: SwiftTypedPacketReader

Parent class: APIDentifier

Description:
This class reads packets from an istream. The type of each packet is determined by examining the packet's APID, and the packets of different types are routed to different output PacketPipes.

Typical usage would be to create a SwiftTypedPacketReader object, then call the head2(), head3(), uvot(), and ldp() methods to connect the "outlet pipes" to the desired processing plumbing, and then call the pump() method to make everything go.

Instead of calling pump(), you may pull packets from any of the outlet pipes. This causes packets to be read and distributed to the appropriate pipes until a packet comes out of the pipe from which you are pulling.

LDP packets will be of the appropriate type (plain or with checksum) but all LDP packets go to the same output drain.

Embedded Classes:
SwiftTypedPacketReader::Drain

Data Fields
privateReader*r
privateSwiftTypedPacketReader::Drain*head2_out
privateSwiftTypedPacketReader::Drain*uvot_out
privateSwiftTypedPacketReader::Drain*head3_out
privateSwiftTypedPacketReader::Drain*ldp_out
privateSwiftTypedPacketReader::Drain*acs_out
privateSwiftTypedPacketReader::Drain*tdrss_out
privateSwiftTypedPacketReader::Drain*generic_out
privateSwiftTypedPacketReader::Drain*trash_out
privateCCSDSHead*head
privateCCSDSPacket*generic_p
privateSwiftPacket*head2_p
privateSwiftHead3Packet*head3_p
privateLDPPacket*ldp_p
privateChecksumLDPPacket*checksum_p

Constructors / Destructor
public SwiftTypedPacketReader(const string& config, istream* in)
Constructor. The "first argument is the name of an APIDentifier configuration file, and the second argument is the istream from which to read packets.
public ~SwiftTypedPacketReader()
Destructor.

Methods
public virtual PacketPipe& head2()
public virtual PacketPipe& head3()
public virtual PacketPipe& uvot()
public virtual PacketPipe& ldp()
public virtual PacketPipe& acs()
public virtual PacketPipe& tdrss()
public virtual PacketPipe& generic()
public virtual PacketPipe& trash()
protected virtual CCSDSPacket* getPacket(int type)
Returns a pointer to the packet object corresponding to a given type.
protected virtual SwiftTypedPacketReader::Drain* getDrain(int type)
Returns a pointer to the drain corresponding to a given type.
public virtual void readPacket()
Read a single packet from the istream and send it down the appropriate drain.
Throws: Interpreter: :Exception
public virtual void pump()
Read all available packets from the istream.

Operators


Alphabetic Class Index   |   Class Inheritance Tree Index   |   Tool Index