sequencing-manager.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NLSR_SEQUENCING_MANAGER_HPP
23 #define NLSR_SEQUENCING_MANAGER_HPP
24 
25 #include <list>
26 #include <string>
27 #include <boost/cstdint.hpp>
28 
29 #include <ndn-cxx/face.hpp>
30 
31 #include "conf-parameter.hpp"
32 
33 namespace nlsr {
34 
36 {
37 public:
39  : m_nameLsaSeq(0)
40  , m_adjLsaSeq(0)
41  , m_corLsaSeq(0)
42  , m_seqFileNameWithPath()
43  {
44  }
45 
46  uint64_t
47  getNameLsaSeq() const
48  {
49  return m_nameLsaSeq;
50  }
51 
52  void
53  setNameLsaSeq(uint64_t nlsn)
54  {
55  m_nameLsaSeq = nlsn;
56  }
57 
58  uint64_t
59  getAdjLsaSeq() const
60  {
61  return m_adjLsaSeq;
62  }
63 
64  void
65  setAdjLsaSeq(uint64_t alsn)
66  {
67  m_adjLsaSeq = alsn;
68  }
69 
70  uint64_t
71  getCorLsaSeq() const
72  {
73  return m_corLsaSeq;
74  }
75 
76  void
77  setCorLsaSeq(uint64_t clsn)
78  {
79  m_corLsaSeq = clsn;
80  }
81 
82  void
84  {
85  m_nameLsaSeq++;
86  }
87 
88  void
90  {
91  m_adjLsaSeq++;
92  }
93 
94  void
96  {
97  m_corLsaSeq++;
98  }
99 
100  void
101  writeSeqNoToFile() const;
102 
103  void
104  initiateSeqNoFromFile(int hypState);
105 
112  void
113  setSeqFileDirectory(std::string filePath);
114 
115  void
116  writeLog() const;
117 
118 private:
119  uint64_t m_nameLsaSeq;
120  uint64_t m_adjLsaSeq;
121  uint64_t m_corLsaSeq;
122  std::string m_seqFileNameWithPath;
123 };
124 
125 } // namespace nlsr
126 #endif // NLSR_SEQUENCING_MANAGER_HPP
void setAdjLsaSeq(uint64_t alsn)
uint64_t getCorLsaSeq() const
uint64_t getAdjLsaSeq() const
uint64_t getNameLsaSeq() const
void initiateSeqNoFromFile(int hypState)
void setNameLsaSeq(uint64_t nlsn)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
void setCorLsaSeq(uint64_t clsn)
void setSeqFileDirectory(std::string filePath)
Set the sequence file directory.