22 #ifndef NLSR_LSA_COORDINATE_LSA_HPP
23 #define NLSR_LSA_COORDINATE_LSA_HPP
28 #include <boost/operators.hpp>
55 const ndn::time::system_clock::time_point& timepoint,
56 double radius, std::vector<double> angles);
76 return m_hyperbolicRadius;
83 m_hyperbolicRadius = cr;
86 const std::vector<double>&
89 return m_hyperbolicAngles;
96 m_hyperbolicAngles = std::move(ct);
99 template<ndn::encoding::Tag TAG>
101 wireEncode(ndn::EncodingImpl<TAG>& block)
const;
109 std::tuple<bool, std::list<ndn::Name>, std::list<ndn::Name>>
110 update(
const std::shared_ptr<Lsa>& lsa)
override;
114 print(std::ostream& os)
const override;
125 std::equal(lhs.m_hyperbolicAngles.begin(), lhs.m_hyperbolicAngles.end(),
126 rhs.m_hyperbolicAngles.begin(), rhs.m_hyperbolicAngles.end(),
131 double m_hyperbolicRadius = 0.0;
132 std::vector<double> m_hyperbolicAngles;
Represents an LSA of hyperbolic coordinates of the origin router.
const ndn::Block & wireEncode() const override
void wireDecode(const ndn::Block &wire)
const std::vector< double > & getTheta() const
Lsa::Type getType() const override
void setTheta(std::vector< double > ct)
void setRadius(double cr)
friend bool operator==(const CoordinateLsa &lhs, const CoordinateLsa &rhs)
std::tuple< bool, std::list< ndn::Name >, std::list< ndn::Name > > update(const std::shared_ptr< Lsa > &lsa) override
static constexpr Lsa::Type type()
Represents a Link State Announcement (LSA).
bool diffInEpsilon(double lhs, double rhs)
Determine whether the difference between two numbers are within epsilon.
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(Adjacent)