NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
pit-face-record.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_DAEMON_TABLE_PIT_FACE_RECORD_HPP
27 #define NFD_DAEMON_TABLE_PIT_FACE_RECORD_HPP
28 
29 #include "face/face.hpp"
30 #include "strategy-info-host.hpp"
31 
32 namespace nfd {
33 namespace pit {
34 
41 {
42 public:
43  explicit
44  FaceRecord(shared_ptr<Face> face);
45 
46  shared_ptr<Face>
47  getFace() const;
48 
49  uint32_t
50  getLastNonce() const;
51 
53  getLastRenewed() const;
54 
59  getExpiry() const;
60 
63  void
64  update(const Interest& interest);
65 
66 private:
67  shared_ptr<Face> m_face;
68  uint32_t m_lastNonce;
69  time::steady_clock::TimePoint m_lastRenewed;
71 };
72 
73 inline shared_ptr<Face>
75 {
76  return m_face;
77 }
78 
79 inline uint32_t
81 {
82  return m_lastNonce;
83 }
84 
87 {
88  return m_lastRenewed;
89 }
90 
93 {
94  return m_expiry;
95 }
96 
97 } // namespace pit
98 } // namespace nfd
99 
100 #endif // NFD_DAEMON_TABLE_PIT_FACE_RECORD_HPP
time_point TimePoint
Definition: time.hpp:108
time::steady_clock::TimePoint getLastRenewed() const
uint32_t getLastNonce() const
FaceRecord(shared_ptr< Face > face)
base class for an entity onto which StrategyInfo objects may be placed
represents an Interest packet
Definition: interest.hpp:45
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:38
contains information about an Interest on an incoming or outgoing face
shared_ptr< Face > getFace() const
time::steady_clock::TimePoint getExpiry() const
gives the time point this record expires
void update(const Interest &interest)
updates lastNonce, lastRenewed, expiry fields