NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::lp::GeoTag Class Reference

represents a GeoTag header field More...

#include <geo-tag.hpp>

Inheritance diagram for ndn::lp::GeoTag:
Collaboration diagram for ndn::lp::GeoTag:

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 BlockwireEncode () 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
GeoTagsetPosX (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

Detailed Description

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.

Constructor & Destructor Documentation

◆ GeoTag() [1/3]

ndn::lp::GeoTag::GeoTag ( )

Referenced by GeoTag(), and getTypeId().

◆ GeoTag() [2/3]

ndn::lp::GeoTag::GeoTag ( std::tuple< double, double, double >  pos)

Definition at line 47 of file geo-tag.hpp.

References GeoTag(), wireDecode(), and wireEncode().

◆ GeoTag() [3/3]

ndn::lp::GeoTag::GeoTag ( const Block block)

Definition at line 28 of file geo-tag.cpp.

References wireDecode().

Member Function Documentation

◆ getTypeId()

static constexpr int ndn::lp::GeoTag::getTypeId ( )

Definition at line 39 of file geo-tag.hpp.

References GeoTag().

◆ wireEncode() [1/2]

template<encoding::Tag TAG>
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().

◆ wireEncode() [2/2]

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().

Referenced by GeoTag().

◆ wireDecode()

void ndn::lp::GeoTag::wireDecode ( const Block wire)

◆ getPos()

std::tuple<double, double, double> ndn::lp::GeoTag::getPos ( ) const
position x of GeoTag

Definition at line 79 of file geo-tag.hpp.

◆ setPosX()

GeoTag* ndn::lp::GeoTag::setPosX ( std::tuple< double, double, double >  pos)

set position x

Definition at line 88 of file geo-tag.hpp.

The documentation for this class was generated from the following files: