IBR-DTNSuite
0.8
|
#include <SDNV.h>
Public Member Functions | |
SDNV (const u_int64_t value) | |
SDNV () | |
~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 |
bool | operator< (const SDNV &value) const |
bool | operator<= (const SDNV &value) const |
bool | operator> (const SDNV &value) const |
bool | operator>= (const SDNV &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 | ) |
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 60 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 65 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 40 of file SDNV.cpp.
Referenced by dtn::data::BundleString::getLength(), dtn::data::DTNTime::getLength(), dtn::data::AgeBlock::getLength(), dtn::data::ScopeControlHopLimitBlock::getLength(), dtn::data::StreamBlock::getLength(), dtn::data::CompressedPayloadBlock::getLength(), dtn::routing::ProphetRoutingExtension::DeliveryPredictabilityMap::getLength(), dtn::data::CustodySignalBlock::getLength(), dtn::data::StatusReportBlock::getLength(), dtn::data::DefaultSerializer::getLength(), dtn::security::SecurityBlock::getLength(), dtn::data::SeparateSerializer::getLength(), dtn::net::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::data::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 55 of file SDNV.cpp.
Referenced by dtn::routing::ProphetRoutingExtension::Acknowledgement::deserialize(), dtn::security::SecurityBlock::deserialize(), dtn::data::CompressedPayloadBlock::getAlgorithm(), dtn::data::ScopeControlHopLimitBlock::getHopsToLive(), dtn::security::SecurityBlock::getLength(), dtn::data::AgeBlock::getMicroseconds(), dtn::data::CompressedPayloadBlock::getOriginSize(), dtn::data::AgeBlock::getSeconds(), dtn::data::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 86 of file SDNV.cpp.
References getValue(), and SDNV().
Definition at line 97 of file SDNV.cpp.
References getValue(), and SDNV().
bool dtn::data::SDNV::operator< | ( | const SDNV & | value | ) | const |
bool dtn::data::SDNV::operator<= | ( | const SDNV & | value | ) | const |
bool dtn::data::SDNV::operator== | ( | const SDNV & | value | ) | const |
bool dtn::data::SDNV::operator> | ( | const SDNV & | value | ) | const |
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>>().