Alphabetic Class Index   |   Class Inheritance Tree Index   |   Tool Index

Class: LDPEncodeBuffer

Parent class: streambuf

Description:
This class is for encoding Swift Large Data Products as CCSDS packets. In real life this will be done on-board the spacrcraft, so this class is for generating test data. Note that the onboard software may have its own quirks.

To use this class you should hook the output drain returned by the pipe() method to some chain of processing pipes. Then you probably want to wrap the LDPEncodeBuffer in an ostream. Then you can write to the ostream as you would any file. The data will be encoded in LDPPackets and sent down the drain pipe.

When you are done writing data you need to explicitly call the close() method.

Data Fields
privatestatic const intWRITING_HEADER
privatestatic const intDONE_WRITING_HEADER
privatestatic const intPAST_HEADER
privatestatic const intCLOSED
privateStandardLDPHead*head
privateLDPPacket*packet
privateintstatus
privatevector<LDPPacket*>header_packets
privateintsize
privatedoubletime_increment
privateunsigned char*data
privateunsigned char*end
privatePacketPipe_pipe
privateintcount

Constructors / Destructor
public LDPEncodeBuffer(LDPPacket* p, StandardLDPHead* head, DataBlock* extra_head=NULL, double time_increment=0.01)
Throws: Interpreter: :Exception

Methods
public virtual PacketPipe& pipe()
public virtual void close()
End the file. This flushes out the last packet being written and writes out the redundant header packets.
public virtual int overflow(int c = EOF)
private virtual void nextPacket()
Update the packet.

Operators


Alphabetic Class Index   |   Class Inheritance Tree Index   |   Tool Index