|
IBR-DTNSuite
0.12
|
#include <StreamBlock.h>


Classes | |
| class | Factory |
Public Types | |
| enum | STREAM_FLAGS { STREAM_BEGIN = 1, STREAM_END = 1 << 0x01 } |
Public Types inherited from dtn::data::Block | |
| enum | ProcFlags { REPLICATE_IN_EVERY_FRAGMENT = 1, TRANSMIT_STATUSREPORT_IF_NOT_PROCESSED = 1 << 0x01, DELETE_BUNDLE_IF_NOT_PROCESSED = 1 << 0x02, LAST_BLOCK = 1 << 0x03, DISCARD_IF_NOT_PROCESSED = 1 << 0x04, FORWARDED_WITHOUT_PROCESSED = 1 << 0x05, BLOCK_CONTAINS_EIDS = 1 << 0x06 } |
| typedef std::list< dtn::data::EID > | eid_list |
Public Member Functions | |
| StreamBlock () | |
| virtual | ~StreamBlock () |
| virtual Length | getLength () const |
| virtual std::ostream & | serialize (std::ostream &stream, Length &length) const |
| virtual std::istream & | deserialize (std::istream &stream, const Length &length) |
| void | setSequenceNumber (Number seq) |
| const Number & | getSequenceNumber () const |
| void | set (STREAM_FLAGS flag, const bool &value) |
| bool | get (STREAM_FLAGS flag) const |
Public Member Functions inherited from dtn::data::Block | |
| virtual | ~Block () |
| Block & | operator= (const Block &block) |
| bool | operator== (const block_t &id) const |
| virtual void | addEID (const dtn::data::EID &eid) |
| virtual void | clearEIDs () |
| virtual const eid_list & | getEIDList () const |
| const block_t & | getType () const |
| void | set (ProcFlags flag, const bool &value) |
| bool | get (ProcFlags flag) const |
| const Bitset< ProcFlags > & | getProcessingFlags () const |
| virtual Length | getLength_strict () const |
| virtual std::ostream & | serialize_strict (std::ostream &stream, Length &length) const |
Static Public Attributes | |
| static const dtn::data::block_t | BLOCK_TYPE = 242 |
Additional Inherited Members | |
Protected Member Functions inherited from dtn::data::Block | |
| Block (block_t blocktype) | |
Protected Attributes inherited from dtn::data::Block | |
| block_t | _blocktype |
| eid_list | _eids |
Definition at line 33 of file StreamBlock.h.
| Enumerator | |
|---|---|
| STREAM_BEGIN | |
| STREAM_END | |
Definition at line 46 of file StreamBlock.h.
| dtn::data::StreamBlock::StreamBlock | ( | ) |
Definition at line 35 of file StreamBlock.cpp.
Referenced by dtn::data::StreamBlock::Factory::create().
|
virtual |
Definition at line 40 of file StreamBlock.cpp.
|
virtual |
Deserialize the derived block payload.
| stream | A input stream to deserialize from. |
Implements dtn::data::Block.
Definition at line 57 of file StreamBlock.cpp.
| bool dtn::data::StreamBlock::get | ( | STREAM_FLAGS | flag) | const |
Definition at line 69 of file StreamBlock.cpp.
References dtn::data::Bitset< E >::getBit().

|
virtual |
Return the length of the payload, if this were an abstract block. It is the length put in the third field, after block type and processing flags.
Implements dtn::data::Block.
Definition at line 45 of file StreamBlock.cpp.
References dtn::data::SDNV< E >::getLength().

| const Number & dtn::data::StreamBlock::getSequenceNumber | ( | ) | const |
Definition at line 79 of file StreamBlock.cpp.
Referenced by StreamBundle::clear(), and BundleStreamBuf::received().
|
virtual |
Serialize the derived block payload.
| stream | A output stream to serialize into. |
Implements dtn::data::Block.
Definition at line 50 of file StreamBlock.cpp.
| void dtn::data::StreamBlock::set | ( | STREAM_FLAGS | flag, |
| const bool & | value | ||
| ) |
Definition at line 64 of file StreamBlock.cpp.
References dtn::data::Bitset< E >::setBit().

| void dtn::data::StreamBlock::setSequenceNumber | ( | Number | seq) |
Definition at line 74 of file StreamBlock.cpp.
Referenced by StreamBundle::clear(), and StreamBundle::StreamBundle().
|
static |
Definition at line 44 of file StreamBlock.h.