NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ndn-consumer-cbr.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_CONSUMER_CBR_H
21 #define NDN_CONSUMER_CBR_H
22 
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
24 
25 #include "ndn-consumer.hpp"
26 
27 namespace ns3 {
28 namespace ndn {
29 
34 class ConsumerCbr : public Consumer {
35 public:
36  static TypeId
37  GetTypeId();
38 
43  ConsumerCbr();
44  virtual ~ConsumerCbr();
45 
46 protected:
51  virtual void
53 
58  void
59  SetRandomize(const std::string& value);
60 
65  std::string
66  GetRandomize() const;
67 
68 protected:
69  double m_frequency; // Frequency of interest packets (in hertz)
71  RandomVariable* m_random;
72  std::string m_randomType;
73 };
74 
75 } // namespace ndn
76 } // namespace ns3
77 
78 #endif
RandomVariable * m_random
static TypeId GetTypeId()
Ndn application for sending out Interest packets at a "constant" rate (Poisson process) ...
std::string GetRandomize() const
Get type of frequency randomization.
NDN application for sending out Interest packets.
void SetRandomize(const std::string &value)
Set type of frequency randomization.
virtual void ScheduleNextPacket()
Constructs the Interest packet and sends it using a callback to the underlying NDN protocol...
ConsumerCbr()
Default constructor Sets up randomizer function and packet sequence number.