#include <AgeBlock.h>
Inherits dtn::data::Block.

Classes | |
| class | Factory |
Public Member Functions | |
| AgeBlock () | |
| virtual | ~AgeBlock () |
| virtual size_t | getLength () const |
| virtual std::ostream & | serialize (std::ostream &stream) const |
| virtual std::istream & | deserialize (std::istream &stream) |
| virtual std::ostream & | serialize_strict (std::ostream &stream) const |
| virtual size_t | getLength_strict () const |
| size_t | getAge () const |
| void | setAge (size_t value) |
| void | addAge (size_t value) |
Static Public Attributes | |
| static const char | BLOCK_TYPE = 10 |
Definition at line 20 of file AgeBlock.h.
| dtn::data::AgeBlock::AgeBlock | ( | ) |
Definition at line 19 of file AgeBlock.cpp.
References ibrcommon::TimeMeasurement::start().
Referenced by dtn::data::AgeBlock::Factory::create().

| dtn::data::AgeBlock::~AgeBlock | ( | ) | [virtual] |
Definition at line 28 of file AgeBlock.cpp.
| void dtn::data::AgeBlock::addAge | ( | size_t | value | ) |
add a value to the age
Definition at line 39 of file AgeBlock.cpp.
| std::istream & dtn::data::AgeBlock::deserialize | ( | std::istream & | stream | ) | [virtual] |
Deserialize the derived block payload.
| stream | A input stream to deserialize from. |
Implements dtn::data::Block.
Definition at line 60 of file AgeBlock.cpp.
References ibrcommon::TimeMeasurement::start().

| size_t dtn::data::AgeBlock::getAge | ( | ) | const |
Definition at line 32 of file AgeBlock.cpp.
References ibrcommon::TimeMeasurement::getSeconds(), dtn::data::SDNV::getValue(), and ibrcommon::TimeMeasurement::stop().
Referenced by dtn::utils::Clock::getExpireTime(), dtn::utils::Clock::isExpired(), and serialize().

| size_t dtn::data::AgeBlock::getLength | ( | ) | const [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 49 of file AgeBlock.cpp.
References dtn::data::SDNV::getLength().

| size_t dtn::data::AgeBlock::getLength_strict | ( | ) | const [virtual] |
Return the length of the payload in strict format
Reimplemented from dtn::data::Block.
Definition at line 67 of file AgeBlock.cpp.
| std::ostream & dtn::data::AgeBlock::serialize | ( | std::ostream & | stream | ) | const [virtual] |
Serialize the derived block payload.
| stream | A output stream to serialize into. |
Implements dtn::data::Block.
Definition at line 54 of file AgeBlock.cpp.
References getAge().

| std::ostream & dtn::data::AgeBlock::serialize_strict | ( | std::ostream & | stream | ) | const [virtual] |
Serialize the block in a strict way. Dynamic fields are set to the last deserialized value.
| stream | the stream to be written into |
Reimplemented from dtn::data::Block.
Definition at line 72 of file AgeBlock.cpp.
| void dtn::data::AgeBlock::setAge | ( | size_t | value | ) |
set the age
Definition at line 44 of file AgeBlock.cpp.
const char dtn::data::AgeBlock::BLOCK_TYPE = 10 [static] |
Definition at line 31 of file AgeBlock.h.
1.7.1