Alphabetic Class Index   |   Class Inheritance Tree Index   |   Tool Index

Class: CCSDSSegmenter

Parent class: PacketPipe

Description:
This is the opposite of a CCSDSMerger. It takes a stream of Swift packets and produces a stream of segmented packets which will be no larger than the size specified in the constructor. The segmentation follows the Swift UVOT scheme.

In real life the segmentation is done onboard the spacecraft, so this class is mostly useful for generating simulated test data. Even there it is of limited usefullness, since the onboard segmentation algorithm may have different quirks that this one.

Note you can only push packets into this pipe. If you try to pull one out you will just get a NULL pointer indicating end-of-stream.

Data Fields
privateintmax_size
privatemap<int,int>apid_map
privatemap<int,int>sequence
privateSwiftPacket*split_packet

Constructors / Destructor
public CCSDSSegmenter(int max_size)
Constructor. Max size is the maximum size in bytes of a segmented packet including all headers.
public ~CCSDSSegmenter()

Methods
public virtual int hints()
public virtual void hints(int)
public virtual int newAPID(int old_apid)
Return the segmented APID corresponding to an original APID.
public virtual void setNewAPID(int old_apid, int new_apid)
Set the segmented APID corresponding to an original APID.
public virtual int newSequence(int new_apid)
Get the current sequence counter for a given APID. The counter starts at zero when a new object is created.
public virtual void pushIn(CCSDSPacket* generic_p)
Take a packet, split it up and send the results downstream. Note you can only push packets into this pipe. You can't pull them out.
public virtual CCSDSPacket* pullOut()

Operators


Alphabetic Class Index   |   Class Inheritance Tree Index   |   Tool Index