NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ndn-fw-hop-count-tag.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#ifndef NDN_FW_HOP_COUNT_TAG_H
21
#define NDN_FW_HOP_COUNT_TAG_H
22
23
#include "ns3/tag.h"
24
25
namespace
ns3 {
26
namespace
ndn {
27
32
class
FwHopCountTag
:
public
Tag {
33
public
:
34
static
TypeId
35
GetTypeId
(
void
);
36
40
FwHopCountTag
()
41
: m_hopCount(0){};
42
46
~FwHopCountTag
()
47
{
48
}
49
53
void
54
Increment
()
55
{
56
m_hopCount++;
57
}
58
62
uint32_t
63
Get
()
const
64
{
65
return
m_hopCount;
66
}
67
69
// from ObjectBase
71
virtual
TypeId
72
GetInstanceTypeId
()
const
;
73
75
// from Tag
77
78
virtual
uint32_t
79
GetSerializedSize
()
const
;
80
81
virtual
void
82
Serialize
(TagBuffer i)
const
;
83
84
virtual
void
85
Deserialize
(TagBuffer i);
86
87
virtual
void
88
Print
(std::ostream& os)
const
;
89
90
private
:
91
uint32_t m_hopCount;
92
};
93
94
}
// namespace ndn
95
}
// namespace ns3
96
97
#endif // NDN_FW_HOP_COUNT_TAG_H
ns3::ndn::FwHopCountTag::FwHopCountTag
FwHopCountTag()
Default constructor.
Definition:
ndn-fw-hop-count-tag.hpp:40
ns3::ndn::FwHopCountTag
Packet tag that is used to track hop count for Interest-Data pairs.
Definition:
ndn-fw-hop-count-tag.hpp:32
ns3::ndn::FwHopCountTag::Serialize
virtual void Serialize(TagBuffer i) const
Definition:
ndn-fw-hop-count-tag.cpp:46
ns3::ndn::FwHopCountTag::Deserialize
virtual void Deserialize(TagBuffer i)
Definition:
ndn-fw-hop-count-tag.cpp:52
ns3::ndn::FwHopCountTag::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Definition:
ndn-fw-hop-count-tag.cpp:34
ns3::ndn::FwHopCountTag::Get
uint32_t Get() const
Get value of hop count.
Definition:
ndn-fw-hop-count-tag.hpp:63
ns3::ndn::FwHopCountTag::~FwHopCountTag
~FwHopCountTag()
Destructor.
Definition:
ndn-fw-hop-count-tag.hpp:46
ns3::ndn::FwHopCountTag::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Definition:
ndn-fw-hop-count-tag.cpp:40
ns3::ndn::FwHopCountTag::Increment
void Increment()
Increment hop count.
Definition:
ndn-fw-hop-count-tag.hpp:54
ns3::ndn::FwHopCountTag::Print
virtual void Print(std::ostream &os) const
Definition:
ndn-fw-hop-count-tag.cpp:58
ns3::ndn::FwHopCountTag::GetTypeId
static TypeId GetTypeId(void)
Definition:
ndn-fw-hop-count-tag.cpp:26
ndnSIM
utils
ndn-fw-hop-count-tag.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7