22#ifndef NLSR_LSA_LSA_HPP
23#define NLSR_LSA_LSA_HPP
29#include <ndn-cxx/util/scheduler.hpp>
50 class Error :
public ndn::tlv::Error
53 using ndn::tlv::Error::Error;
66 Lsa(
const ndn::Name& originRouter, uint64_t seqNo,
67 ndn::time::system_clock::time_point expirationTimePoint);
98 const ndn::time::system_clock::time_point&
117 virtual std::tuple<bool, std::list<PrefixInfo>, std::list<PrefixInfo>>
118 update(
const std::shared_ptr<Lsa>& lsa) = 0;
120 virtual const ndn::Block&
124 template<ndn::encoding::Tag TAG>
126 wireEncode(ndn::EncodingImpl<TAG>& block)
const;
133 print(std::ostream& os)
const = 0;
Represents a Link State Announcement (LSA).
virtual Type getType() const =0
void setExpiringEventId(ndn::scheduler::EventId eid)
uint64_t getSeqNo() const
virtual std::tuple< bool, std::list< PrefixInfo >, std::list< PrefixInfo > > update(const std::shared_ptr< Lsa > &lsa)=0
ndn::time::system_clock::time_point m_expirationTimePoint
void setExpirationTimePoint(const ndn::time::system_clock::time_point <)
ndn::scheduler::ScopedEventId m_expiringEventId
void setSeqNo(uint64_t seqNo)
friend std::ostream & operator<<(std::ostream &os, const Lsa &lsa)
const ndn::time::system_clock::time_point & getExpirationTimePoint() const
void wireDecode(const ndn::Block &wire)
virtual const ndn::Block & wireEncode() const =0
const ndn::Name & getOriginRouter() const
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(Adjacent)
std::istream & operator>>(std::istream &is, Lsa::Type &type)
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
#define PUBLIC_WITH_TESTS_ELSE_PROTECTED