lsdb: emit signals when modified
RoutingTable and NamePrefixTable consume the signal
and behave accordingly.
refs: #4127
Change-Id: I6540f30f0222f804b01dc7d9640831c84e5264cc
diff --git a/src/lsa/lsa.cpp b/src/lsa/lsa.cpp
index 25841d2..c633549 100644
--- a/src/lsa/lsa.cpp
+++ b/src/lsa/lsa.cpp
@@ -35,6 +35,13 @@
{
}
+Lsa::Lsa(const Lsa& lsa)
+ : m_originRouter(lsa.getOriginRouter())
+ , m_seqNo(lsa.getSeqNo())
+ , m_expirationTimePoint(lsa.getExpirationTimePoint())
+{
+}
+
template<ndn::encoding::Tag TAG>
size_t
Lsa::wireEncode(ndn::EncodingImpl<TAG>& encoder) const
@@ -138,13 +145,13 @@
}
std::string
-Lsa::toString() const
+Lsa::getString() const
{
std::ostringstream os;
- auto duration = getExpirationTimePoint() - ndn::time::system_clock::now();
+ auto duration = m_expirationTimePoint - ndn::time::system_clock::now();
os << " " << getType() << " LSA:\n"
- << " Origin Router : " << getOriginRouter() << "\n"
- << " Sequence Number : " << getSeqNo() << "\n"
+ << " Origin Router : " << m_originRouter << "\n"
+ << " Sequence Number : " << m_seqNo << "\n"
<< " Expires in : " << ndn::time::duration_cast<ndn::time::milliseconds>(duration)
<< "\n";
return os.str();