represents a GeoTag header field More...
#include <geo-tag.hpp>
Public Member Functions | |
GeoTag ()=default | |
GeoTag (std::tuple< double, double, double > pos) | |
GeoTag (const Block &block) | |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
prepend GeoTag to encoder More... | |
const Block & | wireEncode () const |
encode GeoTag into wire format More... | |
void | wireDecode (const Block &wire) |
get GeoTag from wire format More... | |
std::tuple< double, double, double > | getPos () const |
GeoTag * | setPosX (std::tuple< double, double, double > pos) |
set position x More... | |
Public Member Functions inherited from ndn::Tag | |
virtual | ~Tag () |
Static Public Member Functions | |
static constexpr int | getTypeId () noexcept |
Static Public Member Functions inherited from ndn::Tag | |
static constexpr int | getTypeId () noexcept |
represents a GeoTag header field
a packet tag for GeoTag field
This tag can be attached to Interest, Data, Nack.
Definition at line 35 of file geo-tag.hpp.
|
default |
|
inlineexplicit |
Definition at line 47 of file geo-tag.hpp.
|
explicit |
Definition at line 28 of file geo-tag.cpp.
References wireDecode().
|
inlinestaticconstexprnoexcept |
Definition at line 39 of file geo-tag.hpp.
size_t ndn::lp::GeoTag::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
prepend GeoTag to encoder
Definition at line 35 of file geo-tag.cpp.
References ndn::lp::tlv::GeoTag, ndn::lp::tlv::GeoTagPos, and ndn::encoding::prependDoubleBlock().
const Block & ndn::lp::GeoTag::wireEncode | ( | ) | const |
encode GeoTag into wire format
Definition at line 53 of file geo-tag.cpp.
References ndn::Block::hasWire().
void ndn::lp::GeoTag::wireDecode | ( | const Block & | wire | ) |
get GeoTag from wire format
Definition at line 71 of file geo-tag.cpp.
References ndn::Block::elements(), ndn::lp::tlv::GeoTag, ndn::lp::tlv::GeoTagPos, NDN_THROW, ndn::Block::parse(), ndn::encoding::readDouble(), and ndn::Block::type().
Referenced by GeoTag().
|
inline |
Definition at line 79 of file geo-tag.hpp.
|
inline |
set position x
Definition at line 88 of file geo-tag.hpp.