<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>Hello,<br>
</span>
<div><br>
</div>
<div>I am trying to use "DidAddEntry" and "WillRemoveEntry". I defined my functions and config statements as follows:<br>
</div>
<div><br>
</div>
<div>void CacheEntryAdded(std::string context, Ptr<const ndn::cs::Entry> entry, Time lifetime) {<br>
</div>
<div>std::cout << lifetime.ToDouble(Time::S) << "\tAdd\t" << entry->GetName() << std::endl;<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div>void CacheEntryRemoved(std::string context, Ptr<const ndn::cs::Entry> entry, Time lifetime) {<br>
</div>
<div>std::cout << lifetime.ToDouble(Time::S) << "\tRemove\t" << entry->GetName() << std::endl;<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div>...<br>
</div>
<div><br>
</div>
<div>ndnHelper.SetOldContentStore("ns3::ndn::cs::Stats", "MaxSize", "10");<br>
</div>
<div>ndnHelper.InstallAll();<br>
</div>
<div><br>
</div>
<div>Config::Connect("/NodeList/*/$ns3::ndn::cs::Stats::Lru/WillRemoveEntry", MakeCallback(CacheEntryRemoved));<br>
</div>
<div>Config::Connect("/NodeList/*/$ns3::ndn::cs::Lru::LifetimeStats/DidAddEntry", MakeCallback(CacheEntryAdded));<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>But I am getting this error:<br>
</div>
<div><br>
</div>
<div>msg="Incompatible types. (feed to "c++filt -t" if needed)<br>
</div>
<div>got=CallbackImpl<void,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,ns3::Ptr<ns3::ndn::cs::Entry const>,ns3::Time><br>
</div>
<div>expected=CallbackImpl<void,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,ns3::Ptr<ns3::ndn::cs::Entry const>>", file=./ns3/callback.h, line=1449<br>
</div>
<div>msg="when connecting to /NodeList/0/$ns3::ndn::cs::Lru::LifetimeStats/DidAddEntry", file=./ns3/traced-callback.h, line=280<br>
</div>
<div>terminate called without an active exception<br>
</div>
<div><br>
</div>
<div>However, when I use only "WillRemoveEntry", I can get the output successfully.<br>
</div>
<div><br>
</div>
<div>Regards,<br>
</div>
<span>Boubakr</span><br>
</div>
</body>
</html>