IBR-DTNSuite  0.10
BundleStreamBuf Class Reference

#include <BundleStreamBuf.h>

Inheritance diagram for BundleStreamBuf:
Inheritance graph
Collaboration diagram for BundleStreamBuf:
Collaboration graph

Public Member Functions

 BundleStreamBuf (dtn::api::Client &client, StreamBundle &chunk, size_t min_buffer, size_t max_buffer, bool wait_seq_zero=false)
 
virtual ~BundleStreamBuf ()
 
void received (const dtn::data::Bundle &b)
 
void flush ()
 
void setRequestAck (bool val)
 
void setReceiveTimeout (dtn::data::Timeout timeout)
 

Protected Member Functions

virtual int sync ()
 
virtual std::char_traits< char >
::int_type 
overflow (std::char_traits< char >::int_type=std::char_traits< char >::eof())
 
virtual std::char_traits< char >
::int_type 
underflow ()
 
std::char_traits< char >::int_type __underflow ()
 
void __flush ()
 
size_t __get_next_buffer_size () const
 

Detailed Description

Definition at line 33 of file BundleStreamBuf.h.

Constructor & Destructor Documentation

BundleStreamBuf::BundleStreamBuf ( dtn::api::Client client,
StreamBundle chunk,
size_t  min_buffer,
size_t  max_buffer,
bool  wait_seq_zero = false 
)

Definition at line 26 of file BundleStreamBuf.cpp.

References __get_next_buffer_size().

Here is the call graph for this function:

BundleStreamBuf::~BundleStreamBuf ( )
virtual

Definition at line 36 of file BundleStreamBuf.cpp.

Member Function Documentation

void BundleStreamBuf::__flush ( )
protected

Definition at line 61 of file BundleStreamBuf.cpp.

References dtn::data::PrimaryBlock::reportto, dtn::data::PrimaryBlock::REQUEST_REPORT_OF_BUNDLE_DELIVERY, and dtn::data::PrimaryBlock::set().

Referenced by flush(), and overflow().

Here is the call graph for this function:

size_t BundleStreamBuf::__get_next_buffer_size ( ) const
protected

Definition at line 76 of file BundleStreamBuf.cpp.

References StreamBundle::size().

Referenced by BundleStreamBuf(), and overflow().

Here is the call graph for this function:

std::char_traits< char >::int_type BundleStreamBuf::__underflow ( )
protected
void BundleStreamBuf::flush ( )

Flush the buffer and send out the buffered bundle

Definition at line 43 of file BundleStreamBuf.cpp.

References __flush(), and StreamBundle::size().

Referenced by BundleStream::received(), and sync().

Here is the call graph for this function:

std::char_traits< char >::int_type BundleStreamBuf::overflow ( std::char_traits< char >::int_type  c = std::char_traits<char>::eof())
protectedvirtual

Definition at line 105 of file BundleStreamBuf.cpp.

References __flush(), __get_next_buffer_size(), StreamBundle::append(), and StreamBundle::size().

Referenced by sync().

Here is the call graph for this function:

void BundleStreamBuf::received ( const dtn::data::Bundle b)

process incoming bundles

Definition at line 139 of file BundleStreamBuf.cpp.

References dtn::data::Bundle::find(), dtn::data::StreamBlock::getSequenceNumber(), and ibrcommon::Conditional::signal().

Referenced by BundleStream::received().

Here is the call graph for this function:

void BundleStreamBuf::setReceiveTimeout ( dtn::data::Timeout  timeout)

Set the timeout for receiving bundles

Definition at line 56 of file BundleStreamBuf.cpp.

Referenced by BundleStream::setReceiveTimeout().

void BundleStreamBuf::setRequestAck ( bool  val)

Request Acks for the chunks

Definition at line 99 of file BundleStreamBuf.cpp.

Referenced by BundleStream::setAutoFlush().

int BundleStreamBuf::sync ( )
protectedvirtual

Definition at line 88 of file BundleStreamBuf.cpp.

References flush(), and overflow().

Here is the call graph for this function:

std::char_traits< char >::int_type BundleStreamBuf::underflow ( )
protectedvirtual

Definition at line 159 of file BundleStreamBuf.cpp.

References __underflow().

Here is the call graph for this function:


The documentation for this class was generated from the following files: