blob: 86a6cf5ff2d2b5688880bd87d9a548bc6d221c12 [file] [log] [blame]
akmhoque298385a2014-02-13 14:13:09 -06001#ifndef ADJACENT_HPP
2#define ADJACENT_HPP
3
akmhoqueb1710aa2014-02-19 17:13:36 -06004namespace nlsr {
5
akmhoque298385a2014-02-13 14:13:09 -06006using namespace std;
7
8class Adjacent{
9
10 public:
11 Adjacent()
12 :adjacentName()
13 ,connectingFace(0)
14 ,linkCost(10.0)
15 ,status(0)
16 ,interestTimedOutNo(0)
17 {
18 }
19
20 Adjacent(const string& an)
21 :connectingFace(0)
22 ,linkCost(0.0)
23 ,status(0)
24 ,interestTimedOutNo(0)
25 {
26 adjacentName=an;
27 }
28
29 Adjacent(const string& an, int cf, double lc, int s, int iton);
30
31 string getAdjacentName(){
32 return adjacentName;
33 }
34
35 void setAdjacentName(const string& an){
36 adjacentName=an;
37 }
38
39 int getConnectingFace(){
40 return connectingFace;
41 }
42
43 void setConnectingFace(int cf){
44 connectingFace=cf;
45 }
46
47 double getLinkCost(){
48 return linkCost;
49 }
50
51 void setLinkCost(double lc){
52 linkCost=lc;
53 }
54
55 int getStatus(){
56 return status;
57 }
58
59 void setStatus(int s){
60 status=s;
61 }
62
63 int getInterestTimedOutNo(){
64 return interestTimedOutNo;
65 }
66
67 void setInterestTimedOutNo(int iton){
68 interestTimedOutNo=iton;
69 }
70
71 bool isAdjacentEqual(Adjacent& adj);
72 private:
73 string adjacentName;
74 int connectingFace;
75 double linkCost;
76 int status;
77 int interestTimedOutNo;
78};
79
80std::ostream&
81operator << (std::ostream &os, Adjacent &adj);
82
akmhoqueb1710aa2014-02-19 17:13:36 -060083} // namespace nlsr
84
akmhoque298385a2014-02-13 14:13:09 -060085#endif