blob: 58af8ffa933a748d797e0db8c02f0dee62794c97 [file] [log] [blame]
Ilya Moiseenko171afe12011-08-23 16:02:16 -07001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2011 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
19 */
20
21#ifndef CCNX_INTEREST_SENDER_HELPER_H
22#define CCNX_INTEREST_SENDER_HELPER_H
23
24#include <stdint.h>
25#include <string>
26#include "ns3/object-factory.h"
27#include "ns3/address.h"
28#include "ns3/attribute.h"
29#include "ns3/net-device.h"
30#include "ns3/node-container.h"
31#include "ns3/application-container.h"
32#include "ns3/name-components.h"
33#include "ns3/pointer.h"
34
35namespace ns3
36{
37/**
38 * \brief A helper to make it easier to instantiate an ns3::CcnxInterestSenderApplication
39 * on a set of nodes.
40 */
41
42class CcnxInterestSenderHelper
43{
44
45public:
46 /**
47 * Create an CcnxInterestSenderHelper to make it easier to work with CcnxInterestSenderApps
48 *
49 */
50 CcnxInterestSenderHelper (Ptr<CcnxNameComponents> interestName);
51
52 /**
53 * Helper function used to set the underlying application attributes.
54 *
55 * \param name the name of the application attribute to set
56 * \param value the value of the application attribute to set
57 */
58 void SetAttribute (std::string name, const AttributeValue &value);
59
60 /**
61 * Install an ns3::CcnxInterestSender on each node of the input container
62 * configured with all the attributes set with SetAttribute.
63 *
64 * \param c NodeContainer of the set of nodes on which an CcnxInterestSender
65 * will be installed.
66 * \returns Container of Ptr to the applications installed.
67 */
68 ApplicationContainer Install (NodeContainer c) const;
69
70 /**
71 * Install an ns3::CcnxInterestSender on the node configured with all the
72 * attributes set with SetAttribute.
73 *
74 * \param node The node on which an CcnxInterestSender will be installed.
75 * \returns Container of Ptr to the applications installed.
76 */
77 ApplicationContainer Install (Ptr<Node> node) const;
78
79 /**
80 * Install an ns3::CcnxInterestSender on the node configured with all the
81 * attributes set with SetAttribute.
82 *
83 * \param nodeName The node on which an CcnxInterestSender will be installed.
84 * \returns Container of Ptr to the applications installed.
85 */
86 ApplicationContainer Install (std::string nodeName) const;
87
88private:
89 /**
90 * \internal
91 * Install an ns3::CcnxInterestSender on the node configured with all the
92 * attributes set with SetAttribute.
93 *
94 * \param node The node on which an CcnxInterestSender will be installed.
95 * \returns Ptr to the application installed.
96 */
97 Ptr<Application> InstallPriv (Ptr<Node> node) const;
98 ObjectFactory m_factory;
99};
100}
101
102#endif
103