|
IBR-DTNSuite 0.6
|
#include <SDNV.h>
Public Member Functions | |
| SDNV (const u_int64_t value) | |
| SDNV () | |
| size_t | getLength () const |
| u_int64_t | getValue () const |
| size_t | decode (const char *data, const size_t len) |
| size_t | encode (char *data, const size_t len) const |
| size_t | operator= (const size_t &value) |
| bool | operator== (const SDNV &value) const |
| bool | operator!= (const SDNV &value) const |
| SDNV | operator+ (const SDNV &value) |
| SDNV & | operator+= (const SDNV &value) |
| SDNV | operator- (const SDNV &value) |
| SDNV & | operator-= (const SDNV &value) |
| bool | operator& (const size_t &value) const |
Static Public Member Functions | |
| static size_t | getLength (const u_int64_t &value) |
| static size_t | getLength (const unsigned char *data) |
Static Public Attributes | |
| static const size_t | MAX_LENGTH = 10 |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const dtn::data::SDNV &obj) |
| std::istream & | operator>> (std::istream &stream, dtn::data::SDNV &obj) |
| dtn::data::SDNV::SDNV | ( | const u_int64_t | value | ) |
| dtn::data::SDNV::SDNV | ( | ) |
Empty constructor for a SDNV object
Definition at line 34 of file SDNV.cpp.
Referenced by operator+(), and operator-().
| size_t dtn::data::SDNV::decode | ( | const char * | data, |
| const size_t | len | ||
| ) |
Decode a SDNV out of a existing char array.
| data | The char array. |
| len | The size of the array. (overflow protection) |
Definition at line 57 of file SDNV.cpp.
Referenced by dtn::data::operator>>().
| size_t dtn::data::SDNV::encode | ( | char * | data, |
| const size_t | len | ||
| ) | const |
Encode a SDNV and write it to a data array.
| data | The data array to write to. |
| len | The size of the array. (overflow protection) |
Definition at line 62 of file SDNV.cpp.
Referenced by dtn::data::operator<<().
| size_t dtn::data::SDNV::getLength | ( | ) | const |
Determine the encoded length of the value.
Definition at line 37 of file SDNV.cpp.
Referenced by StreamBlock::getLength(), dtn::security::SecurityBlock::getLength(), dtn::data::StatusReportBlock::getLength(), dtn::data::SeparateSerializer::getLength(), dtn::data::DefaultSerializer::getLength(), dtn::data::DTNTime::getLength(), dtn::data::CustodySignalBlock::getLength(), dtn::data::CompressedPayloadBlock::getLength(), dtn::data::BundleString::getLength(), dtn::data::AgeBlock::getLength(), dtn::data::DefaultSerializer::operator<<(), dtn::data::operator<<(), dtn::net::operator<<(), and dtn::data::AgeBlock::serialize().
| size_t dtn::data::SDNV::getLength | ( | const u_int64_t & | value | ) | [static] |
| size_t dtn::data::SDNV::getLength | ( | const unsigned char * | data | ) | [static] |
| u_int64_t dtn::data::SDNV::getValue | ( | ) | const |
Returns the decoded value.
Definition at line 52 of file SDNV.cpp.
Referenced by dtn::security::SecurityBlock::deserialize(), dtn::data::CompressedPayloadBlock::getAlgorithm(), dtn::security::SecurityBlock::getLength(), dtn::data::AgeBlock::getMicroseconds(), dtn::data::CompressedPayloadBlock::getOriginSize(), dtn::data::AgeBlock::getSeconds(), StreamBlock::getSequenceNumber(), operator+(), operator-(), dtn::security::MutualSerializer::operator<<(), dtn::data::operator>>(), dtn::net::operator>>(), and dtn::core::BundleCore::raiseEvent().
| bool dtn::data::SDNV::operator!= | ( | const SDNV & | value | ) | const |
| bool dtn::data::SDNV::operator& | ( | const size_t & | value | ) | const |
Definition at line 83 of file SDNV.cpp.
References getValue(), and SDNV().

Definition at line 94 of file SDNV.cpp.
References getValue(), and SDNV().

| bool dtn::data::SDNV::operator== | ( | const SDNV & | value | ) | const |
| std::ostream& operator<< | ( | std::ostream & | stream, |
| const dtn::data::SDNV & | obj | ||
| ) | [friend] |
| std::istream& operator>> | ( | std::istream & | stream, |
| dtn::data::SDNV & | obj | ||
| ) | [friend] |
const size_t dtn::data::SDNV::MAX_LENGTH = 10 [static] |
The maximum length for this SDNV implementation is 10 bytes, since the maximum value is 64 bits wide.
Definition at line 55 of file SDNV.h.
Referenced by dtn::data::operator>>().