OLD | NEW |
(Empty) | |
| 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2015 |
| 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: Federico Guerra <federico@guerra-tlc.com> |
| 19 */ |
| 20 |
| 21 #ifdef NS3_WOSS_SUPPORT |
| 22 |
| 23 #ifndef WOSS_ALOHA_EXAMPLE_H |
| 24 #define WOSS_ALOHA_EXAMPLE_H |
| 25 |
| 26 #include "ns3/network-module.h" |
| 27 #include "ns3/stats-module.h" |
| 28 #include "ns3/uan-module.h" |
| 29 #include "ns3/woss-helper.h" |
| 30 |
| 31 using namespace ns3; |
| 32 |
| 33 /** |
| 34 * \ingroup WOSS |
| 35 * |
| 36 * Container for the parameters describing a single experiment. |
| 37 * |
| 38 * An experiment samples a range of parameter values. The parameters |
| 39 * controls the number of nodes, the position allocator, etc... |
| 40 * |
| 41 * The default example creates a small node topology made of a receiving sink an
d m_numNodes=two transmitting nodes. |
| 42 * |
| 43 * The sink is placed at a latitude of 42.59 dec degrees, longitude of 10.125 de
c degrees and a depth of 70m. |
| 44 * The m_numNodes are allocated as the model selected by the m_posAllocSelector
variable. |
| 45 * The default model is the list allocator, which will place its node over a str
aight line |
| 46 * (same latitude, 90 degrees bearing) with a inter-distance of 500m. |
| 47 * All nodes rae configured with the Aloha MAC and the Q-PSK as PHY modulation. |
| 48 * The WOSS library will create: |
| 49 * -# an output result database in binary formact, \see Experiment::InitWossHel
per ResDbFilePath attribute |
| 50 * -# a temporary directory with the original bellhop output files \see Experim
ent::InitWossHelper WossWorkDirPath attribute |
| 51 */ |
| 52 class Experiment |
| 53 { |
| 54 public: |
| 55 uint32_t m_posAllocSelector; //!< Allows the selection between all WOSS-relate
d position allocators. |
| 56 uint32_t m_totalRate; //!< Total channel capacity. |
| 57 uint32_t m_maxRange; //!< Maximum range in meters. |
| 58 uint32_t m_numNodes; //!< Number of simulated nodes. |
| 59 uint32_t m_pktSize; //!< Packet size in bytes. |
| 60 Time m_simTime; //!< Simulation time per trial |
| 61 |
| 62 std::string m_databasePath; //!< The path to the WOSS databases. |
| 63 bool m_useMultithread; //!< Enable/disable WOSS multithread feature. |
| 64 bool m_useTimeEvolution; //!< Enable/disable the WOSS time evolution feature. |
| 65 uint32_t m_bytesTotal; //!< Total number of bytes received in a simulation run
. |
| 66 UanTxMode m_dataMode; //!< List of UanTxModes used for data channels. |
| 67 |
| 68 /** |
| 69 * Callback to receive a packet. |
| 70 * |
| 71 * \param socket The socket receiving packets. |
| 72 */ |
| 73 void ReceivePacket (Ptr<Socket> socket); |
| 74 |
| 75 /** |
| 76 * Run a parametrized experiment. |
| 77 * |
| 78 * The parameter sets either the number of nodes (if m_doNode is true) |
| 79 * or the \"a\" parameter, which controls the UanMacRcGw MaxReservations |
| 80 * attribute. |
| 81 * |
| 82 * \param param The parameter value. |
| 83 * \return The total number of bytes delivered. |
| 84 */ |
| 85 uint32_t Run (uint32_t param); |
| 86 |
| 87 /** |
| 88 * Init function for the WossHelper object |
| 89 */ |
| 90 void InitWossHelper (Ptr<WossHelper> wossHelper, Ptr<WossPropModel> wossProp,
woss::CoordZ &txCoordZ); |
| 91 |
| 92 /** Default constructor. */ |
| 93 Experiment (); |
| 94 |
| 95 }; |
| 96 |
| 97 #endif /* WOSS_ALOHA_EXAMPLE_H */ |
| 98 |
| 99 #endif /* NS3_WOSS_SUPPORT */ |
OLD | NEW |