LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * This program is free software; you can redistribute it and/or modify | 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 | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
11 * | 11 * |
12 * You should have received a copy of the GNU General Public License | 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 | 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 | 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 * | 15 * |
16 * Author: Josh Pelkey <jpelkey@gatech.edu> | 16 * Author: Josh Pelkey <jpelkey@gatech.edu> |
17 */ | 17 */ |
18 | 18 |
19 #ifndef __POINT_TO_POINT_GRID_HELPER_H__ | 19 #ifndef POINT_TO_POINT_GRID_HELPER_H |
20 #define __POINT_TO_POINT_GRID_HELPER_H__ | 20 #define POINT_TO_POINT_GRID_HELPER_H |
21 | 21 |
22 #include <vector> | 22 #include <vector> |
23 | 23 |
24 #include "internet-stack-helper.h" | 24 #include "internet-stack-helper.h" |
25 #include "point-to-point-helper.h" | 25 #include "point-to-point-helper.h" |
26 #include "ipv4-address-helper.h" | 26 #include "ipv4-address-helper.h" |
27 #include "ipv4-interface-container.h" | 27 #include "ipv4-interface-container.h" |
28 #include "net-device-container.h" | 28 #include "net-device-container.h" |
29 | 29 |
30 namespace ns3 { | 30 namespace ns3 { |
31 ·· | 31 ·· |
32 class PointToPointGridHelper· | 32 class PointToPointGridHelper· |
33 { | 33 { |
34 public:· | 34 public:· |
35 PointToPointGridHelper (uint32_t nRows, uint32_t nCols, PointToPointHelper p
ointToPoint); | 35 PointToPointGridHelper (uint32_t nRows, uint32_t nCols, PointToPointHelper p
ointToPoint); |
36 PointToPointGridHelper (uint32_t nRows, uint32_t nCols, PointToPointHelper p
ointToPoint, uint16_t mpiSize); | 36 ~PointToPointGridHelper (); |
37 | 37 |
38 Ptr<Node> GetNode (uint32_t row, uint32_t col); | 38 Ptr<Node> GetNode (uint32_t row, uint32_t col); |
39 Ipv4Address GetAddress (uint32_t row, uint32_t col); | 39 Ipv4Address GetIpv4Address (uint32_t row, uint32_t col); |
40 | 40 |
41 void InstallStack (InternetStackHelper stack); | 41 void InstallStack (InternetStackHelper stack); |
42 void AssignAddresses (Ipv4AddressHelper rowIp, Ipv4AddressHelper colIp); | 42 void AssignIpv4Addresses (Ipv4AddressHelper rowIp, Ipv4AddressHelper colIp); |
43 void BoundingBox (double ulx, double uly, double lrx, double lry); | 43 void BoundingBox (double ulx, double uly, double lrx, double lry); |
44 | 44 |
45 private: | 45 private: |
46 uint32_t m_xSize; | 46 uint32_t m_xSize; |
47 uint32_t m_ySize; | 47 uint32_t m_ySize; |
48 std::vector<NetDeviceContainer> m_rowDevices; | 48 std::vector<NetDeviceContainer> m_rowDevices; |
49 std::vector<NetDeviceContainer> m_colDevices; | 49 std::vector<NetDeviceContainer> m_colDevices; |
50 std::vector<Ipv4InterfaceContainer> m_rowInterfaces; | 50 std::vector<Ipv4InterfaceContainer> m_rowInterfaces; |
51 std::vector<Ipv4InterfaceContainer> m_colInterfaces; | 51 std::vector<Ipv4InterfaceContainer> m_colInterfaces; |
52 std::vector<NodeContainer> m_nodes; | 52 std::vector<NodeContainer> m_nodes; |
53 | 53 |
54 }; | 54 }; |
55 | 55 |
56 } // namespace ns3 | 56 } // namespace ns3 |
57 ······ | 57 ······ |
58 #endif /* GRID_HELPER_H */ | 58 #endif /* POINT_TO_POINT_GRID_HELPER_H */ |
LEFT | RIGHT |