Left: | ||
Right: |
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 * Copyright (c) 2013 Mohammed J.F. Alenazi | 3 * Copyright (c) 2013 Mohammed J.F. Alenazi |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 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 | 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 | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Mohammed J.F. Alenazi <malenazi@ittc.ku.edu> | 18 * Author: Mohammed J.F. Alenazi <malenazi@ittc.ku.edu> |
19 * | 19 * |
20 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director | 20 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director |
21 * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets | 21 * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets |
22 * Information and Telecommunication Technology Center (ITTC) | 22 * Information and Telecommunication Technology Center (ITTC) |
23 * and Department of Electrical Engineering and Computer Science | 23 * and Department of Electrical Engineering and Computer Science |
24 * The University of Kansas Lawrence, KS USA. | 24 * The University of Kansas Lawrence, KS USA. |
25 * | 25 * |
26 * Work supported by King Saud University and the ITTC at The University of Kans as. | 26 * Work supported by King Saud University and |
27 * the ITTC at The University of Kansas. | |
27 */ | 28 */ |
28 | 29 |
29 #include "epidemic-helper.h" | 30 #include "epidemic-helper.h" |
30 #include "ns3/epidemic-routing-protocol.h" | 31 #include "ns3/epidemic-routing-protocol.h" |
31 #include "ns3/node-list.h" | 32 |
32 #include "ns3/names.h" | 33 /** |
Peter Barnes
2014/03/10 22:36:53
(See comment on patch 3)
mjf.alenazi
2014/05/28 21:57:42
Done.
| |
33 #include "ns3/ipv4-list-routing.h" | 34 * \file |
35 * \ingroup epidemic | |
36 * ns3::EpidemicHelper implementation. | |
37 */ | |
34 | 38 |
35 namespace ns3 { | 39 namespace ns3 { |
36 | 40 |
41 NS_LOG_COMPONENT_DEFINE ("EpidemicHelper"); | |
42 | |
37 EpidemicHelper::~EpidemicHelper () | 43 EpidemicHelper::~EpidemicHelper () |
38 { | 44 { |
45 NS_LOG_FUNCTION (this); | |
39 } | 46 } |
40 | 47 |
41 EpidemicHelper::EpidemicHelper () : Ipv4RoutingHelper () | 48 EpidemicHelper::EpidemicHelper () : Ipv4RoutingHelper () |
42 { | 49 { |
43 m_agentFactory.SetTypeId ("ns3::epidemic::RoutingProtocol"); | 50 NS_LOG_FUNCTION (this); |
51 m_agentFactory.SetTypeId ("ns3::Epidemic::RoutingProtocol"); | |
44 } | 52 } |
45 | 53 |
46 EpidemicHelper* EpidemicHelper::Copy (void) const | 54 EpidemicHelper* EpidemicHelper::Copy (void) const |
47 { | 55 { |
56 NS_LOG_FUNCTION (this); | |
48 return new EpidemicHelper (*this); | 57 return new EpidemicHelper (*this); |
49 } | 58 } |
50 | 59 |
51 Ptr<Ipv4RoutingProtocol> EpidemicHelper::Create (Ptr<Node> node) const | 60 Ptr<Ipv4RoutingProtocol> EpidemicHelper::Create (Ptr<Node> node) const |
52 { | 61 { |
53 Ptr<Epidemic::RoutingProtocol> agent = m_agentFactory.Create<Epidemic::Routing Protocol> (); | 62 NS_LOG_FUNCTION (this << node); |
63 Ptr<Epidemic::RoutingProtocol> | |
64 agent = m_agentFactory.Create<Epidemic::RoutingProtocol> (); | |
54 node->AggregateObject (agent); | 65 node->AggregateObject (agent); |
55 return agent; | 66 return agent; |
56 } | 67 } |
57 | 68 |
58 void EpidemicHelper::Set (std::string name, const AttributeValue &value) | 69 void EpidemicHelper::Set (std::string name, const AttributeValue &value) |
59 { | 70 { |
71 NS_LOG_FUNCTION (this << name); | |
60 m_agentFactory.Set (name, value); | 72 m_agentFactory.Set (name, value); |
61 } | 73 } |
62 | 74 |
63 } //end namespace ns3 | 75 } //end namespace ns3 |
LEFT | RIGHT |