22 #ifndef NLSR_LSA_LSA_HPP
23 #define NLSR_LSA_LSA_HPP
28 #include <ndn-cxx/util/scheduler.hpp>
48 class Error :
public ndn::tlv::Error
51 using ndn::tlv::Error::Error;
64 Lsa(
const ndn::Name& originRouter, uint64_t seqNo,
65 ndn::time::system_clock::time_point expirationTimePoint);
96 const ndn::time::system_clock::time_point&
115 virtual std::tuple<bool, std::list<ndn::Name>, std::list<ndn::Name>>
116 update(
const std::shared_ptr<Lsa>& lsa) = 0;
118 virtual const ndn::Block&
122 template<ndn::encoding::Tag TAG>
124 wireEncode(ndn::EncodingImpl<TAG>& block)
const;
131 print(std::ostream& os)
const = 0;
Represents a Link State Announcement (LSA).
virtual const ndn::Block & wireEncode() const =0
const ndn::Name & getOriginRouter() const
friend std::ostream & operator<<(std::ostream &os, const Lsa &lsa)
virtual Type getType() const =0
void setExpiringEventId(ndn::scheduler::EventId eid)
uint64_t getSeqNo() const
ndn::time::system_clock::time_point m_expirationTimePoint
virtual std::tuple< bool, std::list< ndn::Name >, std::list< ndn::Name > > update(const std::shared_ptr< Lsa > &lsa)=0
void setExpirationTimePoint(const ndn::time::system_clock::time_point <)
ndn::scheduler::ScopedEventId m_expiringEventId
void setSeqNo(uint64_t seqNo)
void wireDecode(const ndn::Block &wire)
const ndn::time::system_clock::time_point & getExpirationTimePoint() 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