From d2b0ca83387a1770684f0cccc3f82b65e6ddc82c Mon Sep 17 00:00:00 2001 From: John Abraham Date: Wed, 4 May 2011 15:11:58 -0700 Subject: [PATCH] csma-layout code-style changes --- src/csma-layout/examples/csma-star.cc | 22 +++++++++++----------- src/csma-layout/model/csma-star-helper.cc | 4 ++-- src/csma-layout/model/csma-star-helper.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/csma-layout/examples/csma-star.cc b/src/csma-layout/examples/csma-star.cc index d2788645a..1b0e6a280 100644 --- a/src/csma-layout/examples/csma-star.cc +++ b/src/csma-layout/examples/csma-star.cc @@ -112,21 +112,21 @@ main (int argc, char *argv[]) // Ipv4AddressHelper address; for(uint32_t i = 0; i < star.SpokeCount (); ++i) - { - std::ostringstream subnet; - subnet << "10.1." << i << ".0"; - NS_LOG_INFO ("Assign IP Addresses for CSMA subnet " << subnet.str ()); - address.SetBase (subnet.str ().c_str (), "255.255.255.0", "0.0.0.3"); + { + std::ostringstream subnet; + subnet << "10.1." << i << ".0"; + NS_LOG_INFO ("Assign IP Addresses for CSMA subnet " << subnet.str ()); + address.SetBase (subnet.str ().c_str (), "255.255.255.0", "0.0.0.3"); - for (uint32_t j = 0; j < nFill; ++j) - { - address.Assign (fillDevices.Get (i * nFill + j)); - } - } + for (uint32_t j = 0; j < nFill; ++j) + { + address.Assign (fillDevices.Get (i * nFill + j)); + } + } NS_LOG_INFO ("Create applications."); // - // Create a packet sink on the star "hub" to receive packets. + // Create a packet sink on the star "hub" to receive packets. // uint16_t port = 50000; Address hubLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port)); diff --git a/src/csma-layout/model/csma-star-helper.cc b/src/csma-layout/model/csma-star-helper.cc index 723dbb9e6..6de4f6184 100644 --- a/src/csma-layout/model/csma-star-helper.cc +++ b/src/csma-layout/model/csma-star-helper.cc @@ -27,7 +27,7 @@ NS_LOG_COMPONENT_DEFINE("CsmaStarHelper"); namespace ns3 { - + CsmaStarHelper::CsmaStarHelper (uint32_t numSpokes, CsmaHelper csmaHelper) { @@ -82,7 +82,7 @@ CsmaStarHelper::GetSpokeIpv4Address (uint32_t i) const return m_spokeInterfaces.GetAddress (i); } -uint32_t +uint32_t CsmaStarHelper::SpokeCount () const { return m_spokes.GetN (); diff --git a/src/csma-layout/model/csma-star-helper.h b/src/csma-layout/model/csma-star-helper.h index bd72d53d7..c5357413d 100644 --- a/src/csma-layout/model/csma-star-helper.h +++ b/src/csma-layout/model/csma-star-helper.h @@ -27,7 +27,7 @@ #include "ipv4-interface-container.h" namespace ns3 { - + /** * \brief A helper to make it easier to create a star topology * with Csma links