[ndnSIM] face: Enable metric parameter on a face
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index a5923d2..cc07b8c 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -123,6 +123,12 @@
void
setDescription(const std::string& description);
+ void
+ setMetric(uint64_t metric);
+
+ uint64_t
+ getMetric() const;
+
/** \brief Get whether face is connected to a local app
*/
bool
@@ -205,6 +211,7 @@
ndn::nfd::FacePersistency m_persistency;
const bool m_isMultiAccess;
bool m_isFailed;
+ uint64_t m_metric;
// allow setting FaceId
friend class FaceTable;
@@ -292,6 +299,18 @@
* @{
*/
+inline void
+Face::setMetric(uint64_t metric)
+{
+ m_metric = metric;
+}
+
+inline uint64_t
+Face::getMetric() const
+{
+ return m_metric;
+}
+
#define NFD_LOG_FACE(level, msg) \
NFD_LOG_##level("[id=" << this->getId() << \
",local=" << this->getLocalUri() << \