LEFT | RIGHT |
(no file at all) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2009,2010 University of Washington |
| 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: Sidharth Nabar <snabar@uw.edu>, He Wu <mdzz@u.washington.edu> |
| 19 */ |
| 20 |
| 21 #ifndef WIRELESS_MODULE_UTILITY_HELPER |
| 22 #define WIRELESS_MODULE_UTILITY_HELPER |
| 23 |
| 24 #include "ns3/node.h" |
| 25 #include "ns3/attribute.h" |
| 26 #include "ns3/object-factory.h" |
| 27 #include "ns3/node-container.h" |
| 28 #include "ns3/wireless-module-utility.h" |
| 29 #include "wireless-module-utility-container.h" |
| 30 #include <string> |
| 31 |
| 32 namespace ns3 { |
| 33 |
| 34 /** |
| 35 * \brief Create wireless utility objects \ref ns3::WirelessModuleUtility. |
| 36 */ |
| 37 class WirelessModuleUtilityHelper |
| 38 { |
| 39 public: |
| 40 WirelessModuleUtilityHelper (); |
| 41 ~WirelessModuleUtilityHelper (); |
| 42 |
| 43 /** |
| 44 * \param type The type of wireless module utility to use. |
| 45 * |
| 46 * Sets the type of wireless module utility to create for Install method. |
| 47 */ |
| 48 void SetWirelessModuleUtilityType (std::string type); |
| 49 |
| 50 /** |
| 51 * \returns The type name of WirelessModuleUtility to create. |
| 52 */ |
| 53 std::string GetWirelessModuleUtilityType (void) const; |
| 54 |
| 55 /** |
| 56 * \brief Sets one of the attributes of underlying WirelessModuleUtility. |
| 57 * |
| 58 * \param name Name of attribute to set. |
| 59 * \param v Value of the attribute. |
| 60 */ |
| 61 void Set (std::string name, const AttributeValue &v); |
| 62 |
| 63 /** |
| 64 * \brief Sets the header/trailer inclusion list to a existing list. |
| 65 * |
| 66 * \param list Inclusion list. |
| 67 */ |
| 68 void SetInclusionList (std::vector<std::string> list); |
| 69 |
| 70 /** |
| 71 * \brief Sets the header/trailer exclusion list to a existing list. |
| 72 * |
| 73 * \param list Exclusion list. |
| 74 */ |
| 75 void SetExclusionList (std::vector<std::string> list); |
| 76 |
| 77 /** |
| 78 * \brief Sets the RSS measurement callback. |
| 79 * |
| 80 * \param RssCallback RSS measurement callback. |
| 81 */ |
| 82 void SetRssMeasurementCallback (Callback<double> RssCallback); |
| 83 |
| 84 /** |
| 85 * \param node The node on which a utility object must be created. |
| 86 * \returns Container contains all the JammingMitigation object created by |
| 87 * this method. |
| 88 */ |
| 89 WirelessModuleUtilityContainer Install (Ptr<Node> node) const; |
| 90 |
| 91 /** |
| 92 * \param c The set of nodes on which a utility object must be created. |
| 93 * \returns Container contains all the JammingMitigation object created by |
| 94 * this method. |
| 95 */ |
| 96 WirelessModuleUtilityContainer Install (NodeContainer c) const; |
| 97 |
| 98 /** |
| 99 * \param nodeName The name of node on which a utility object must be created. |
| 100 * \returns Container contains all the JammingMitigation object created by |
| 101 * this method. |
| 102 */ |
| 103 WirelessModuleUtilityContainer Install (std::string nodeName) const; |
| 104 |
| 105 /** |
| 106 * Install on *ALL* nodes exists in simulation. |
| 107 * \returns Container contains all the JammingMitigation object created by |
| 108 * this method. |
| 109 */ |
| 110 WirelessModuleUtilityContainer InstallAll (void); |
| 111 |
| 112 |
| 113 private: |
| 114 /** |
| 115 * \brief Installs a JammingMitigation object onto the specified node. |
| 116 * |
| 117 * \param node Pointer to node to install the JammingMitigation object. |
| 118 * \returns Pointer to the newly installed JammingMitigation object. |
| 119 */ |
| 120 virtual Ptr<WirelessModuleUtility> DoInstall (Ptr<Node> node) const; |
| 121 |
| 122 private: |
| 123 ObjectFactory m_wirelessUtility; |
| 124 |
| 125 Callback<double> m_rssMeasurementCallback; // RSS measurement callback |
| 126 |
| 127 std::vector<std::string> m_headerInclusionList; // header/trailer inclusion li
st |
| 128 std::vector<std::string> m_headerExclusionList; // header/trailer exclusion li
st |
| 129 |
| 130 }; |
| 131 |
| 132 } // namespace ns3 |
| 133 |
| 134 #endif |
LEFT | RIGHT |