#include <SequenceIDBlockProcessor.h>
Public Member Functions | |
SequenceIDBlockProcessor (u_int8_t block_type) | |
Constructor. The sa. | |
int | prepare (const Bundle *bundle, BlockInfoVec *xmit_blocks, const BlockInfo *source, const LinkRef &link, BlockInfo::list_owner_t list) |
Virtual from BlockProcessor. | |
int | generate (const Bundle *bundle, BlockInfoVec *xmit_blocks, BlockInfo *block, const LinkRef &link, bool last) |
Virtual from BlockProcessor. | |
int | consume (Bundle *bundle, BlockInfo *block, u_char *buf, size_t len) |
Virtual from BlockProcessor. |
Definition at line 29 of file SequenceIDBlockProcessor.h.
dtn::SequenceIDBlockProcessor::SequenceIDBlockProcessor | ( | u_int8_t | block_type | ) |
Constructor. The sa.
Definition at line 31 of file SequenceIDBlockProcessor.cc.
References ASSERT, dtn::BundleProtocol::OBSOLETES_ID_BLOCK, and dtn::BundleProtocol::SEQUENCE_ID_BLOCK.
int dtn::SequenceIDBlockProcessor::consume | ( | Bundle * | bundle, | |
BlockInfo * | block, | |||
u_char * | buf, | |||
size_t | len | |||
) | [virtual] |
Virtual from BlockProcessor.
Reimplemented from dtn::BlockProcessor.
Definition at line 142 of file SequenceIDBlockProcessor.cc.
References dtn::SequenceID::add(), ASSERT, dtn::BlockProcessor::block_type(), dtn::BlockInfo::complete(), count, dtn::SequenceID::COUNTER, dtn::BlockInfo::data(), dtn::BlockInfo::data_length(), decode(), dtn::BlockInfo::eid_list(), dtn::SequenceID::IDENTIFIER, log_err_p, dtn::Bundle::mutable_obsoletes_id(), dtn::Bundle::mutable_sequence_id(), and dtn::BundleProtocol::SEQUENCE_ID_BLOCK.
int dtn::SequenceIDBlockProcessor::generate | ( | const Bundle * | bundle, | |
BlockInfoVec * | xmit_blocks, | |||
BlockInfo * | block, | |||
const LinkRef & | link, | |||
bool | last | |||
) | [virtual] |
Virtual from BlockProcessor.
Implements dtn::BlockProcessor.
Definition at line 61 of file SequenceIDBlockProcessor.cc.
References dtn::BlockInfo::add_eid(), ASSERT, dtn::SequenceID::begin(), dtn::BundleProtocol::BLOCK_FLAG_LAST_BLOCK, dtn::BundleProtocol::BLOCK_FLAG_REPLICATE, dtn::BlockProcessor::block_type(), BP_SUCCESS, dtn::SequenceID::COUNTER, dtn::BlockInfo::data_offset(), encode(), encoding_len(), dtn::SequenceID::end(), dtn::BlockProcessor::generate_preamble(), dtn::SequenceID::IDENTIFIER, len, dtn::Bundle::obsoletes_id(), dtn::Bundle::sequence_id(), sequence_id, dtn::BundleProtocol::SEQUENCE_ID_BLOCK, and dtn::BlockInfo::writable_contents().
int dtn::SequenceIDBlockProcessor::prepare | ( | const Bundle * | bundle, | |
BlockInfoVec * | xmit_blocks, | |||
const BlockInfo * | source, | |||
const LinkRef & | link, | |||
BlockInfo::list_owner_t | list | |||
) | [virtual] |
Virtual from BlockProcessor.
Reimplemented from dtn::BlockProcessor.
Definition at line 40 of file SequenceIDBlockProcessor.cc.
References dtn::BlockProcessor::block_type(), BP_SUCCESS, dtn::SequenceID::empty(), dtn::Bundle::obsoletes_id(), dtn::Bundle::sequence_id(), sequence_id, and dtn::BundleProtocol::SEQUENCE_ID_BLOCK.