nlsr::CoordinateLsa Class Reference

#include <lsa.hpp>

Inheritance diagram for nlsr::CoordinateLsa:
[legend]
Collaboration diagram for nlsr::CoordinateLsa:
[legend]

Public Types

enum  Type {
  Type::ADJACENCY, Type::COORDINATE, Type::NAME, Type::BASE,
  Type::MOCK
}
 

Public Member Functions

 CoordinateLsa ()=default
 
 CoordinateLsa (const ndn::Name &origR, uint32_t lsn, const ndn::time::system_clock::TimePoint &lt, double r, std::vector< double > theta)
 
Lsa::Type getType () const override
 
bool deserialize (const std::string &content) noexceptoverride
 Initializes this coordinate LSA with the data in content. More...
 
double getCorRadius () const
 
void setCorRadius (double cr)
 
const std::vector< double > getCorTheta () const
 
void setCorTheta (std::vector< double > ct)
 
bool isEqualContent (const CoordinateLsa &clsa) const
 
void writeLog () const override
 
std::string serialize () const override
 Returns the data that this coordinate LSA represents. More...
 
void setLsSeqNo (uint32_t lsn)
 
uint32_t getLsSeqNo () const
 
const ndn::Name & getOrigRouter () const
 
void setOrigRouter (const ndn::Name &org)
 
const ndn::time::system_clock::TimePoint & getExpirationTimePoint () const
 
void setExpirationTimePoint (const ndn::time::system_clock::TimePoint &lt)
 
void setExpiringEventId (ndn::scheduler::EventId eid)
 
ndn::scheduler::EventId getExpiringEventId () const
 
const ndn::Name getKey () const
 Gets the key for this LSA. More...
 

Protected Member Functions

std::string getData () const
 
std::string toString () const
 
bool deserializeCommon (boost::tokenizer< boost::char_separator< char >>::iterator &iterator)
 

Protected Attributes

ndn::Name m_origRouter
 
uint32_t m_lsSeqNo = 0
 
ndn::time::system_clock::TimePoint m_expirationTimePoint
 
ndn::scheduler::EventId m_expiringEventId
 

Friends

std::ostream & operator<< (std::ostream &os, const CoordinateLsa &lsa)
 

Detailed Description

Definition at line 307 of file lsa.hpp.

Member Enumeration Documentation

enum nlsr::Lsa::Type
stronginherited
Enumerator
ADJACENCY 
COORDINATE 
NAME 
BASE 
MOCK 

Definition at line 38 of file lsa.hpp.

Constructor & Destructor Documentation

nlsr::CoordinateLsa::CoordinateLsa ( )
default
nlsr::CoordinateLsa::CoordinateLsa ( const ndn::Name &  origR,
uint32_t  lsn,
const ndn::time::system_clock::TimePoint &  lt,
double  r,
std::vector< double >  theta 
)

Definition at line 129 of file lsa.cpp.

Member Function Documentation

bool nlsr::CoordinateLsa::deserialize ( const std::string &  content)
overridevirtualnoexcept

Initializes this coordinate LSA with the data in content.

Parameters
contentThe string content that is used to build the LSA.

This function initializes this LSA object to represent the data specified by the parameter. The format that it is expecting is the same as for getData();

Implements nlsr::Lsa.

Definition at line 170 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool nlsr::Lsa::deserializeCommon ( boost::tokenizer< boost::char_separator< char >>::iterator &  iterator)
protectedinherited

Definition at line 56 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

double nlsr::CoordinateLsa::getCorRadius ( ) const
inline

Definition at line 334 of file lsa.hpp.

Here is the caller graph for this function:

const std::vector<double> nlsr::CoordinateLsa::getCorTheta ( ) const
inline

Definition at line 346 of file lsa.hpp.

Here is the caller graph for this function:

std::string nlsr::Lsa::getData ( ) const
protectedinherited

Get data common to all LSA types.

This method should be called by all LSA classes in their serialize() method.

Definition at line 41 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const ndn::time::system_clock::TimePoint& nlsr::Lsa::getExpirationTimePoint ( ) const
inlineinherited

Definition at line 80 of file lsa.hpp.

Here is the caller graph for this function:

ndn::scheduler::EventId nlsr::Lsa::getExpiringEventId ( ) const
inlineinherited

Definition at line 98 of file lsa.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const ndn::Name nlsr::Lsa::getKey ( ) const
inherited

Gets the key for this LSA.

Format is: <router name>/<LSA type>\

Definition at line 50 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t nlsr::Lsa::getLsSeqNo ( ) const
inlineinherited

Definition at line 62 of file lsa.hpp.

Here is the caller graph for this function:

const ndn::Name& nlsr::Lsa::getOrigRouter ( ) const
inlineinherited

Definition at line 68 of file lsa.hpp.

Here is the caller graph for this function:

Lsa::Type nlsr::CoordinateLsa::getType ( ) const
inlineoverridevirtual

Reimplemented from nlsr::Lsa.

Definition at line 317 of file lsa.hpp.

Here is the call graph for this function:

bool nlsr::CoordinateLsa::isEqualContent ( const CoordinateLsa clsa) const

Definition at line 141 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string nlsr::CoordinateLsa::serialize ( ) const
overridevirtual

Returns the data that this coordinate LSA represents.

The format is: <original router>|coordinate|<seq. no.>|<exp. time>|<radians>|<theta>|

Implements nlsr::Lsa.

Definition at line 159 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::CoordinateLsa::setCorRadius ( double  cr)
inline

Definition at line 340 of file lsa.hpp.

Here is the caller graph for this function:

void nlsr::CoordinateLsa::setCorTheta ( std::vector< double >  ct)
inline

Definition at line 352 of file lsa.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::Lsa::setExpirationTimePoint ( const ndn::time::system_clock::TimePoint &  lt)
inlineinherited

Definition at line 86 of file lsa.hpp.

Here is the caller graph for this function:

void nlsr::Lsa::setExpiringEventId ( ndn::scheduler::EventId  eid)
inlineinherited

Definition at line 92 of file lsa.hpp.

Here is the caller graph for this function:

void nlsr::Lsa::setLsSeqNo ( uint32_t  lsn)
inlineinherited

Definition at line 56 of file lsa.hpp.

Here is the caller graph for this function:

void nlsr::Lsa::setOrigRouter ( const ndn::Name &  org)
inlineinherited

Definition at line 74 of file lsa.hpp.

std::string nlsr::Lsa::toString ( ) const
protectedinherited

Print data common to all LSA types.

Definition at line 350 of file lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::CoordinateLsa::writeLog ( ) const
overridevirtual

Implements nlsr::Lsa.

Definition at line 194 of file lsa.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CoordinateLsa lsa 
)
friend

Definition at line 294 of file lsa.cpp.

Field Documentation

ndn::time::system_clock::TimePoint nlsr::Lsa::m_expirationTimePoint
protectedinherited

Definition at line 146 of file lsa.hpp.

ndn::scheduler::EventId nlsr::Lsa::m_expiringEventId
protectedinherited

Definition at line 147 of file lsa.hpp.

uint32_t nlsr::Lsa::m_lsSeqNo = 0
protectedinherited

Definition at line 145 of file lsa.hpp.

ndn::Name nlsr::Lsa::m_origRouter
protectedinherited

Definition at line 144 of file lsa.hpp.