NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
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  Ptr<RandomVariableStream> m_random;
72  std::string m_randomType;
73 };
74 
75 } // namespace ndn
76 } // namespace ns3
77 
78 #endif
Copyright (c) 2011-2015 Regents of the University of California.
Ptr< RandomVariableStream > m_random
static TypeId GetTypeId()
Ndn application for sending out Interest packets at a "constant" rate (Poisson process) ...
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...
Copyright (c) 2011-2015 Regents of the University of California.
ConsumerCbr()
Default constructor Sets up randomizer function and packet sequence number.
std::string GetRandomize() const
Get type of frequency randomization.