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
dummy-client-face.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_UTIL_DUMMY_CLIENT_FACE_HPP
23
#define NDN_UTIL_DUMMY_CLIENT_FACE_HPP
24
25
#include "../face.hpp"
26
#include "
signal.hpp
"
27
28
namespace
ndn
{
29
namespace
util {
30
33
class
DummyClientFace
:
public
ndn::Face
34
{
35
public
:
38
struct
Options
39
{
42
bool
enablePacketLogging
;
43
47
bool
enableRegistrationReply
;
48
};
49
53
template
<
typename
Packet>
54
void
55
receive
(
const
Packet& packet);
56
57
private
:
// constructors
58
class
Transport
;
59
60
// constructors are private; use makeDummyClientFace to create DummyClientFace
61
62
DummyClientFace
(
const
Options
& options, shared_ptr<Transport> transport);
63
64
DummyClientFace
(
const
Options
& options, shared_ptr<Transport> transport,
65
boost::asio::io_service& ioService);
66
67
void
68
construct(
const
Options
& options);
69
70
friend
shared_ptr<DummyClientFace>
71
makeDummyClientFace
(
const
DummyClientFace::Options
& options);
72
73
friend
shared_ptr<DummyClientFace>
74
makeDummyClientFace
(boost::asio::io_service& ioService,
const
DummyClientFace::Options
& options);
75
76
private
:
77
void
78
enablePacketLogging
();
79
80
void
81
enableRegistrationReply
();
82
83
public
:
89
static
const
Options
DEFAULT_OPTIONS
;
90
97
std::vector<Interest>
sentInterests
;
98
105
std::vector<Data>
sentDatas
;
106
111
Signal<DummyClientFace, Interest>
onSendInterest
;
112
117
Signal<DummyClientFace, Data>
onSendData
;
118
119
private
:
120
shared_ptr<Transport> m_transport;
121
};
122
123
shared_ptr<DummyClientFace>
124
makeDummyClientFace
(
const
DummyClientFace::Options
& options =
DummyClientFace::DEFAULT_OPTIONS
);
125
126
shared_ptr<DummyClientFace>
127
makeDummyClientFace
(boost::asio::io_service& ioService,
128
const
DummyClientFace::Options
& options =
DummyClientFace::DEFAULT_OPTIONS
);
129
130
}
// namespace util
131
}
// namespace ndn
132
133
#endif // NDN_UTIL_DUMMY_CLIENT_FACE_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::util::DummyClientFace::onSendInterest
Signal< DummyClientFace, Interest > onSendInterest
emits whenever an Interest is sent
Definition:
dummy-client-face.hpp:111
ndn::util::DummyClientFace::sentInterests
std::vector< Interest > sentInterests
Interests sent out of this DummyClientFace.
Definition:
dummy-client-face.hpp:97
ndn::util::DummyClientFace::Options::enablePacketLogging
bool enablePacketLogging
if true, packets sent out of DummyClientFace will be appended to a container
Definition:
dummy-client-face.hpp:42
ndn::util::DummyClientFace::makeDummyClientFace
friend shared_ptr< DummyClientFace > makeDummyClientFace(const DummyClientFace::Options &options)
Definition:
dummy-client-face.cpp:197
ndn::util::DummyClientFace::Options
options for DummyClientFace
Definition:
dummy-client-face.hpp:38
ndn::util::DummyClientFace::Transport
Definition:
dummy-client-face.cpp:32
ndn::Face
Abstraction to communicate with local or remote NDN forwarder.
Definition:
face.hpp:100
ndn::util::DummyClientFace::sentDatas
std::vector< Data > sentDatas
Data sent out of this DummyClientFace.
Definition:
dummy-client-face.hpp:105
ndn::util::DummyClientFace::onSendData
Signal< DummyClientFace, Data > onSendData
emits whenever a Data packet is sent
Definition:
dummy-client-face.hpp:117
signal.hpp
ndn::util::DummyClientFace
a client-side face for unit testing
Definition:
dummy-client-face.hpp:33
ndn::util::DummyClientFace::DEFAULT_OPTIONS
static const Options DEFAULT_OPTIONS
default options
Definition:
dummy-client-face.hpp:89
ndn::util::DummyClientFace::receive
void receive(const Packet &packet)
cause the Face to receive a packet
Definition:
dummy-client-face.cpp:169
ndn::util::DummyClientFace::Options::enableRegistrationReply
bool enableRegistrationReply
if true, prefix registration command will be automatically replied with a successful response ...
Definition:
dummy-client-face.hpp:47
ndnSIM
ndn-cxx
src
util
dummy-client-face.hpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11