NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-producer.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_PRODUCER_H
21 #define NDN_PRODUCER_H
22 
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
24 
25 #include "ndn-app.hpp"
26 #include "ns3/ndnSIM/model/ndn-common.hpp"
27 
28 #include "ns3/nstime.h"
29 #include "ns3/ptr.h"
30 
31 namespace ns3 {
32 namespace ndn {
33 
43 class Producer : public App {
44 public:
45  static TypeId
46  GetTypeId(void);
47 
48  Producer();
49 
50  // inherited from NdnApp
51  virtual void
52  OnInterest(shared_ptr<const Interest> interest);
53 
54 protected:
55  // inherited from Application base class.
56  virtual void
57  StartApplication(); // Called at time specified by Start
58 
59  virtual void
60  StopApplication(); // Called at time specified by Stop
61 
62 private:
63  Name m_prefix;
64  Name m_postfix;
65  uint32_t m_virtualPayloadSize;
66  Time m_freshness;
67 
68  uint32_t m_signature;
69  Name m_keyLocator;
70 };
71 
72 } // namespace ndn
73 } // namespace ns3
74 
75 #endif // NDN_PRODUCER_H
Copyright (c) 2011-2015 Regents of the University of California.
static TypeId GetTypeId(void)
virtual void StopApplication()
Called at time specified by Stop.
virtual void StartApplication()
Called at time specified by Start.
Copyright (c) 2011-2015 Regents of the University of California.
virtual void OnInterest(shared_ptr< const Interest > interest)
Method that will be called every time new Interest arrives.
Base class that all NDN applications should be derived from.
Definition: ndn-app.hpp:48
A simple Interest-sink applia simple Interest-sink application.