equal
deleted
inserted
replaced
10 NS_LOG_COMPONENT_DEFINE ("MobilityHelper"); |
10 NS_LOG_COMPONENT_DEFINE ("MobilityHelper"); |
11 |
11 |
12 MobilityHelper::MobilityHelper () |
12 MobilityHelper::MobilityHelper () |
13 : m_notifierEnabled (false) |
13 : m_notifierEnabled (false) |
14 { |
14 { |
15 m_position = CreateObjectWith<RandomRectanglePositionAllocator> ("X", ConstantVariable (0.0), |
15 m_position = CreateObject<RandomRectanglePositionAllocator> ("X", ConstantVariable (0.0), |
16 "Y", ConstantVariable (0.0)); |
16 "Y", ConstantVariable (0.0)); |
17 m_mobility.SetTypeId ("StaticMobilityModel"); |
17 m_mobility.SetTypeId ("StaticMobilityModel"); |
18 } |
18 } |
19 void |
19 void |
20 MobilityHelper::EnableNotifier (void) |
20 MobilityHelper::EnableNotifier (void) |
123 else |
123 else |
124 { |
124 { |
125 // we need to setup a hierarchical mobility model |
125 // we need to setup a hierarchical mobility model |
126 Ptr<MobilityModel> parent = m_mobilityStack.back (); |
126 Ptr<MobilityModel> parent = m_mobilityStack.back (); |
127 Ptr<MobilityModel> hierarchical = |
127 Ptr<MobilityModel> hierarchical = |
128 CreateObjectWith<HierarchicalMobilityModel> ("Child", model, |
128 CreateObject<HierarchicalMobilityModel> ("Child", model, |
129 "Parent", parent); |
129 "Parent", parent); |
130 object->AggregateObject (hierarchical); |
130 object->AggregateObject (hierarchical); |
131 NS_LOG_DEBUG ("node="<<object<<", mob="<<hierarchical); |
131 NS_LOG_DEBUG ("node="<<object<<", mob="<<hierarchical); |
132 } |
132 } |
133 } |
133 } |