src/helper/csma-star-helper.h
changeset 5776 aae948449722
child 5859 41cff0992d09
equal deleted inserted replaced
5775:86ff2e00d4ea 5776:aae948449722
       
     1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
       
     2 /*
       
     3  * This program is free software; you can redistribute it and/or modify
       
     4  * it under the terms of the GNU General Public License version 2 as
       
     5  * published by the Free Software Foundation;
       
     6  *
       
     7  * This program is distributed in the hope that it will be useful,
       
     8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
     9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    10  * GNU General Public License for more details.
       
    11  *
       
    12  * You should have received a copy of the GNU General Public License
       
    13  * along with this program; if not, write to the Free Software
       
    14  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    15  */
       
    16 
       
    17 // Define an object to create a dumbbell topology.
       
    18 
       
    19 #ifndef CSMA_STAR_HELPER_H
       
    20 #define CSMA_STAR_HELPER_H
       
    21 
       
    22 #include <string>
       
    23 
       
    24 #include "csma-helper.h"
       
    25 #include "ipv4-address-helper.h"
       
    26 #include "internet-stack-helper.h"
       
    27 #include "ipv4-interface-container.h"
       
    28 
       
    29 namespace ns3 {
       
    30   
       
    31 class CsmaStarHelper
       
    32 {
       
    33 public:
       
    34   CsmaStarHelper (uint32_t numSpokes, 
       
    35                   CsmaHelper csmaHelper);
       
    36   ~CsmaStarHelper ();
       
    37 public:
       
    38   Ptr<Node> GetHub () const;
       
    39   Ptr<Node> GetSpoke (uint32_t) const;
       
    40   NetDeviceContainer GetHubDevices () const;
       
    41   NetDeviceContainer GetSpokeDevices () const;
       
    42   Ipv4Address GetHubIpv4Address (uint32_t) const;
       
    43   Ipv4Address GetSpokeIpv4Address (uint32_t) const;
       
    44   uint32_t SpokeCount () const;
       
    45   void InstallStack (InternetStackHelper stack);
       
    46   void AssignIpv4Addresses (Ipv4AddressHelper address);
       
    47 
       
    48 private:
       
    49   NodeContainer m_hub;
       
    50   NetDeviceContainer m_hubDevices;
       
    51   NodeContainer m_spokes;
       
    52   NetDeviceContainer m_spokeDevices;
       
    53   Ipv4InterfaceContainer m_hubInterfaces;
       
    54   Ipv4InterfaceContainer m_spokeInterfaces;
       
    55 };
       
    56 }
       
    57 #endif
       
    58 
       
    59