View | Details | Raw Unified | Return to bug 1106
Collapse All | Expand All

(-)a/examples/matrix-topology/matrix-topology.cc (-3 / +3 lines)
 Lines 196-205    Link Here 
196
    {
196
    {
197
      positionAlloc_n->Add (Vector (coord_array[m][0], coord_array[m][1], 0));
197
      positionAlloc_n->Add (Vector (coord_array[m][0], coord_array[m][1], 0));
198
      Ptr<Node> n0 = nodes.Get (m);
198
      Ptr<Node> n0 = nodes.Get (m);
199
      Ptr<CanvasLocation> nLoc =  n0->GetObject<CanvasLocation> ();
199
      Ptr<ConstantPositionMobilityModel> nLoc =  n0->GetObject<ConstantPositionMobilityModel> ();
200
      if (nLoc == 0)
200
      if (nLoc == 0)
201
        {
201
        {
202
          nLoc = CreateObject<CanvasLocation> ();
202
          nLoc = CreateObject<ConstantPositionMobilityModel> ();
203
          n0->AggregateObject (nLoc);
203
          n0->AggregateObject (nLoc);
204
        }
204
        }
205
      // y-coordinates are negated for correct display in NetAnim
205
      // y-coordinates are negated for correct display in NetAnim
 Lines 207-213    Link Here 
207
      // by negating the y coordinates, we declare the reference (0,0) coordinate
207
      // by negating the y coordinates, we declare the reference (0,0) coordinate
208
      // to the bottom left corner
208
      // to the bottom left corner
209
      Vector nVec (coord_array[m][0], -coord_array[m][1], 0);
209
      Vector nVec (coord_array[m][0], -coord_array[m][1], 0);
210
      nLoc->SetLocation (nVec);
210
      nLoc->SetPosition (nVec);
211
211
212
    }
212
    }
213
  mobility_n.SetPositionAllocator (positionAlloc_n);
213
  mobility_n.SetPositionAllocator (positionAlloc_n);
(-)a/src/netanim/bindings/modulegen__gcc_ILP32.py (-164 lines)
 Lines 150-159    Link Here 
150
    module.add_class('AttributeInfo', import_from_module='ns.core', outer_class=root_module['ns3::TypeId'])
150
    module.add_class('AttributeInfo', import_from_module='ns.core', outer_class=root_module['ns3::TypeId'])
151
    ## attribute-list.h (module 'core'): ns3::UnsafeAttributeList [class]
151
    ## attribute-list.h (module 'core'): ns3::UnsafeAttributeList [class]
152
    module.add_class('UnsafeAttributeList', import_from_module='ns.core')
152
    module.add_class('UnsafeAttributeList', import_from_module='ns.core')
153
    ## vector.h (module 'core'): ns3::Vector2D [class]
154
    module.add_class('Vector2D', import_from_module='ns.core')
155
    ## vector.h (module 'core'): ns3::Vector3D [class]
156
    module.add_class('Vector3D', import_from_module='ns.core')
157
    ## empty.h (module 'core'): ns3::empty [class]
153
    ## empty.h (module 'core'): ns3::empty [class]
158
    module.add_class('empty', import_from_module='ns.core')
154
    module.add_class('empty', import_from_module='ns.core')
159
    ## int64x64-double.h (module 'core'): ns3::int64x64_t [class]
155
    ## int64x64-double.h (module 'core'): ns3::int64x64_t [class]
 Lines 228-235    Link Here 
228
    module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >'])
224
    module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >'])
229
    ## callback.h (module 'core'): ns3::CallbackValue [class]
225
    ## callback.h (module 'core'): ns3::CallbackValue [class]
230
    module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
226
    module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
231
    ## canvas-location.h (module 'netanim'): ns3::CanvasLocation [class]
232
    module.add_class('CanvasLocation', parent=root_module['ns3::Object'])
233
    ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class]
227
    ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class]
234
    module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
228
    module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
235
    ## event-impl.h (module 'core'): ns3::EventImpl [class]
229
    ## event-impl.h (module 'core'): ns3::EventImpl [class]
 Lines 296-309    Link Here 
296
    module.add_class('TypeIdChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
290
    module.add_class('TypeIdChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
297
    ## type-id.h (module 'core'): ns3::TypeIdValue [class]
291
    ## type-id.h (module 'core'): ns3::TypeIdValue [class]
298
    module.add_class('TypeIdValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
292
    module.add_class('TypeIdValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
299
    ## vector.h (module 'core'): ns3::Vector2DChecker [class]
300
    module.add_class('Vector2DChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
301
    ## vector.h (module 'core'): ns3::Vector2DValue [class]
302
    module.add_class('Vector2DValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
303
    ## vector.h (module 'core'): ns3::Vector3DChecker [class]
304
    module.add_class('Vector3DChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
305
    ## vector.h (module 'core'): ns3::Vector3DValue [class]
306
    module.add_class('Vector3DValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
307
    ## address.h (module 'network'): ns3::AddressChecker [class]
293
    ## address.h (module 'network'): ns3::AddressChecker [class]
308
    module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker'])
294
    module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker'])
309
    ## address.h (module 'network'): ns3::AddressValue [class]
295
    ## address.h (module 'network'): ns3::AddressValue [class]
 Lines 311-331    Link Here 
311
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *', 'ns3::LogTimePrinter')
297
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *', 'ns3::LogTimePrinter')
312
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogTimePrinter*')
298
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogTimePrinter*')
313
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogTimePrinter&')
299
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogTimePrinter&')
314
    typehandlers.add_type_alias('ns3::Vector3DValue', 'ns3::VectorValue')
315
    typehandlers.add_type_alias('ns3::Vector3DValue*', 'ns3::VectorValue*')
316
    typehandlers.add_type_alias('ns3::Vector3DValue&', 'ns3::VectorValue&')
317
    module.add_typedef(root_module['ns3::Vector3DValue'], 'VectorValue')
318
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *', 'ns3::LogNodePrinter')
300
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *', 'ns3::LogNodePrinter')
319
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogNodePrinter*')
301
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogNodePrinter*')
320
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogNodePrinter&')
302
    typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogNodePrinter&')
321
    typehandlers.add_type_alias('ns3::Vector3D', 'ns3::Vector')
322
    typehandlers.add_type_alias('ns3::Vector3D*', 'ns3::Vector*')
323
    typehandlers.add_type_alias('ns3::Vector3D&', 'ns3::Vector&')
324
    module.add_typedef(root_module['ns3::Vector3D'], 'Vector')
325
    typehandlers.add_type_alias('ns3::Vector3DChecker', 'ns3::VectorChecker')
326
    typehandlers.add_type_alias('ns3::Vector3DChecker*', 'ns3::VectorChecker*')
327
    typehandlers.add_type_alias('ns3::Vector3DChecker&', 'ns3::VectorChecker&')
328
    module.add_typedef(root_module['ns3::Vector3DChecker'], 'VectorChecker')
329
    
303
    
330
    ## Register a nested module for the namespace FatalImpl
304
    ## Register a nested module for the namespace FatalImpl
331
    
305
    
 Lines 393-400    Link Here 
393
    register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
367
    register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
394
    register_Ns3TypeIdAttributeInfo_methods(root_module, root_module['ns3::TypeId::AttributeInfo'])
368
    register_Ns3TypeIdAttributeInfo_methods(root_module, root_module['ns3::TypeId::AttributeInfo'])
395
    register_Ns3UnsafeAttributeList_methods(root_module, root_module['ns3::UnsafeAttributeList'])
369
    register_Ns3UnsafeAttributeList_methods(root_module, root_module['ns3::UnsafeAttributeList'])
396
    register_Ns3Vector2D_methods(root_module, root_module['ns3::Vector2D'])
397
    register_Ns3Vector3D_methods(root_module, root_module['ns3::Vector3D'])
398
    register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
370
    register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
399
    register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
371
    register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
400
    register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
372
    register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
 Lines 427-433    Link Here 
427
    register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker'])
399
    register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker'])
428
    register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase'])
400
    register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase'])
429
    register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue'])
401
    register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue'])
430
    register_Ns3CanvasLocation_methods(root_module, root_module['ns3::CanvasLocation'])
431
    register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue'])
402
    register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue'])
432
    register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl'])
403
    register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl'])
433
    register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
404
    register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
 Lines 457-466    Link Here 
457
    register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue'])
428
    register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue'])
458
    register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker'])
429
    register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker'])
459
    register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue'])
430
    register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue'])
460
    register_Ns3Vector2DChecker_methods(root_module, root_module['ns3::Vector2DChecker'])
461
    register_Ns3Vector2DValue_methods(root_module, root_module['ns3::Vector2DValue'])
462
    register_Ns3Vector3DChecker_methods(root_module, root_module['ns3::Vector3DChecker'])
463
    register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue'])
464
    register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker'])
431
    register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker'])
465
    register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
432
    register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
466
    return
433
    return
 Lines 3147-3182    Link Here 
3147
                   [param('std::string', 'name'), param('ns3::AttributeValue const &', 'param')])
3114
                   [param('std::string', 'name'), param('ns3::AttributeValue const &', 'param')])
3148
    return
3115
    return
3149
3116
3150
def register_Ns3Vector2D_methods(root_module, cls):
3151
    cls.add_output_stream_operator()
3152
    ## vector.h (module 'core'): ns3::Vector2D::Vector2D(ns3::Vector2D const & arg0) [copy constructor]
3153
    cls.add_constructor([param('ns3::Vector2D const &', 'arg0')])
3154
    ## vector.h (module 'core'): ns3::Vector2D::Vector2D(double _x, double _y) [constructor]
3155
    cls.add_constructor([param('double', '_x'), param('double', '_y')])
3156
    ## vector.h (module 'core'): ns3::Vector2D::Vector2D() [constructor]
3157
    cls.add_constructor([])
3158
    ## vector.h (module 'core'): ns3::Vector2D::x [variable]
3159
    cls.add_instance_attribute('x', 'double', is_const=False)
3160
    ## vector.h (module 'core'): ns3::Vector2D::y [variable]
3161
    cls.add_instance_attribute('y', 'double', is_const=False)
3162
    return
3163
3164
def register_Ns3Vector3D_methods(root_module, cls):
3165
    cls.add_output_stream_operator()
3166
    ## vector.h (module 'core'): ns3::Vector3D::Vector3D(ns3::Vector3D const & arg0) [copy constructor]
3167
    cls.add_constructor([param('ns3::Vector3D const &', 'arg0')])
3168
    ## vector.h (module 'core'): ns3::Vector3D::Vector3D(double _x, double _y, double _z) [constructor]
3169
    cls.add_constructor([param('double', '_x'), param('double', '_y'), param('double', '_z')])
3170
    ## vector.h (module 'core'): ns3::Vector3D::Vector3D() [constructor]
3171
    cls.add_constructor([])
3172
    ## vector.h (module 'core'): ns3::Vector3D::x [variable]
3173
    cls.add_instance_attribute('x', 'double', is_const=False)
3174
    ## vector.h (module 'core'): ns3::Vector3D::y [variable]
3175
    cls.add_instance_attribute('y', 'double', is_const=False)
3176
    ## vector.h (module 'core'): ns3::Vector3D::z [variable]
3177
    cls.add_instance_attribute('z', 'double', is_const=False)
3178
    return
3179
3180
def register_Ns3Empty_methods(root_module, cls):
3117
def register_Ns3Empty_methods(root_module, cls):
3181
    ## empty.h (module 'core'): ns3::empty::empty() [constructor]
3118
    ## empty.h (module 'core'): ns3::empty::empty() [constructor]
3182
    cls.add_constructor([])
3119
    cls.add_constructor([])
 Lines 4613-4639    Link Here 
4613
                   [param('ns3::CallbackBase', 'base')])
4550
                   [param('ns3::CallbackBase', 'base')])
4614
    return
4551
    return
4615
4552
4616
def register_Ns3CanvasLocation_methods(root_module, cls):
4617
    ## canvas-location.h (module 'netanim'): ns3::CanvasLocation::CanvasLocation(ns3::CanvasLocation const & arg0) [copy constructor]
4618
    cls.add_constructor([param('ns3::CanvasLocation const &', 'arg0')])
4619
    ## canvas-location.h (module 'netanim'): ns3::CanvasLocation::CanvasLocation() [constructor]
4620
    cls.add_constructor([])
4621
    ## canvas-location.h (module 'netanim'): ns3::Vector ns3::CanvasLocation::GetLocation() const [member function]
4622
    cls.add_method('GetLocation', 
4623
                   'ns3::Vector', 
4624
                   [], 
4625
                   is_const=True)
4626
    ## canvas-location.h (module 'netanim'): static ns3::TypeId ns3::CanvasLocation::GetTypeId() [member function]
4627
    cls.add_method('GetTypeId', 
4628
                   'ns3::TypeId', 
4629
                   [], 
4630
                   is_static=True)
4631
    ## canvas-location.h (module 'netanim'): void ns3::CanvasLocation::SetLocation(ns3::Vector const & location) [member function]
4632
    cls.add_method('SetLocation', 
4633
                   'void', 
4634
                   [param('ns3::Vector const &', 'location')])
4635
    return
4636
4637
def register_Ns3EmptyAttributeValue_methods(root_module, cls):
4553
def register_Ns3EmptyAttributeValue_methods(root_module, cls):
4638
    ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor]
4554
    ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor]
4639
    cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')])
4555
    cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')])
 Lines 6275-6360    Link Here 
6275
                   [param('ns3::TypeId const &', 'value')])
6191
                   [param('ns3::TypeId const &', 'value')])
6276
    return
6192
    return
6277
6193
6278
def register_Ns3Vector2DChecker_methods(root_module, cls):
6279
    ## vector.h (module 'core'): ns3::Vector2DChecker::Vector2DChecker() [constructor]
6280
    cls.add_constructor([])
6281
    ## vector.h (module 'core'): ns3::Vector2DChecker::Vector2DChecker(ns3::Vector2DChecker const & arg0) [copy constructor]
6282
    cls.add_constructor([param('ns3::Vector2DChecker const &', 'arg0')])
6283
    return
6284
6285
def register_Ns3Vector2DValue_methods(root_module, cls):
6286
    ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue() [constructor]
6287
    cls.add_constructor([])
6288
    ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue(ns3::Vector2DValue const & arg0) [copy constructor]
6289
    cls.add_constructor([param('ns3::Vector2DValue const &', 'arg0')])
6290
    ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue(ns3::Vector2D const & value) [constructor]
6291
    cls.add_constructor([param('ns3::Vector2D const &', 'value')])
6292
    ## vector.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::Vector2DValue::Copy() const [member function]
6293
    cls.add_method('Copy', 
6294
                   'ns3::Ptr< ns3::AttributeValue >', 
6295
                   [], 
6296
                   is_const=True, is_virtual=True)
6297
    ## vector.h (module 'core'): bool ns3::Vector2DValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
6298
    cls.add_method('DeserializeFromString', 
6299
                   'bool', 
6300
                   [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
6301
                   is_virtual=True)
6302
    ## vector.h (module 'core'): ns3::Vector2D ns3::Vector2DValue::Get() const [member function]
6303
    cls.add_method('Get', 
6304
                   'ns3::Vector2D', 
6305
                   [], 
6306
                   is_const=True)
6307
    ## vector.h (module 'core'): std::string ns3::Vector2DValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
6308
    cls.add_method('SerializeToString', 
6309
                   'std::string', 
6310
                   [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
6311
                   is_const=True, is_virtual=True)
6312
    ## vector.h (module 'core'): void ns3::Vector2DValue::Set(ns3::Vector2D const & value) [member function]
6313
    cls.add_method('Set', 
6314
                   'void', 
6315
                   [param('ns3::Vector2D const &', 'value')])
6316
    return
6317
6318
def register_Ns3Vector3DChecker_methods(root_module, cls):
6319
    ## vector.h (module 'core'): ns3::Vector3DChecker::Vector3DChecker() [constructor]
6320
    cls.add_constructor([])
6321
    ## vector.h (module 'core'): ns3::Vector3DChecker::Vector3DChecker(ns3::Vector3DChecker const & arg0) [copy constructor]
6322
    cls.add_constructor([param('ns3::Vector3DChecker const &', 'arg0')])
6323
    return
6324
6325
def register_Ns3Vector3DValue_methods(root_module, cls):
6326
    ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue() [constructor]
6327
    cls.add_constructor([])
6328
    ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue(ns3::Vector3DValue const & arg0) [copy constructor]
6329
    cls.add_constructor([param('ns3::Vector3DValue const &', 'arg0')])
6330
    ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue(ns3::Vector3D const & value) [constructor]
6331
    cls.add_constructor([param('ns3::Vector3D const &', 'value')])
6332
    ## vector.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::Vector3DValue::Copy() const [member function]
6333
    cls.add_method('Copy', 
6334
                   'ns3::Ptr< ns3::AttributeValue >', 
6335
                   [], 
6336
                   is_const=True, is_virtual=True)
6337
    ## vector.h (module 'core'): bool ns3::Vector3DValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
6338
    cls.add_method('DeserializeFromString', 
6339
                   'bool', 
6340
                   [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
6341
                   is_virtual=True)
6342
    ## vector.h (module 'core'): ns3::Vector3D ns3::Vector3DValue::Get() const [member function]
6343
    cls.add_method('Get', 
6344
                   'ns3::Vector3D', 
6345
                   [], 
6346
                   is_const=True)
6347
    ## vector.h (module 'core'): std::string ns3::Vector3DValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
6348
    cls.add_method('SerializeToString', 
6349
                   'std::string', 
6350
                   [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], 
6351
                   is_const=True, is_virtual=True)
6352
    ## vector.h (module 'core'): void ns3::Vector3DValue::Set(ns3::Vector3D const & value) [member function]
6353
    cls.add_method('Set', 
6354
                   'void', 
6355
                   [param('ns3::Vector3D const &', 'value')])
6356
    return
6357
6358
def register_Ns3AddressChecker_methods(root_module, cls):
6194
def register_Ns3AddressChecker_methods(root_module, cls):
6359
    ## address.h (module 'network'): ns3::AddressChecker::AddressChecker() [constructor]
6195
    ## address.h (module 'network'): ns3::AddressChecker::AddressChecker() [constructor]
6360
    cls.add_constructor([])
6196
    cls.add_constructor([])
(-)a/src/netanim/helper/point-to-point-dumbbell-helper.cc (-13 / +13 lines)
 Lines 24-30    Link Here 
24
// ns3 includes
24
// ns3 includes
25
#include "ns3/animation-interface.h"
25
#include "ns3/animation-interface.h"
26
#include "ns3/point-to-point-dumbbell-helper.h"
26
#include "ns3/point-to-point-dumbbell-helper.h"
27
#include "ns3/canvas-location.h"
27
#include "ns3/constant-position-mobility-model.h"
28
28
29
#include "ns3/node-list.h"
29
#include "ns3/node-list.h"
30
#include "ns3/point-to-point-net-device.h"
30
#include "ns3/point-to-point-net-device.h"
 Lines 175-199    Link Here 
175
175
176
  // Place the left router
176
  // Place the left router
177
  Ptr<Node> lr = GetLeft ();
177
  Ptr<Node> lr = GetLeft ();
178
  Ptr<CanvasLocation> loc = lr->GetObject<CanvasLocation> ();
178
  Ptr<ConstantPositionMobilityModel> loc = lr->GetObject<ConstantPositionMobilityModel> ();
179
  if (loc == 0)
179
  if (loc == 0)
180
    {
180
    {
181
      loc = CreateObject<CanvasLocation> ();
181
      loc = CreateObject<ConstantPositionMobilityModel> ();
182
      lr->AggregateObject (loc);
182
      lr->AggregateObject (loc);
183
    }
183
    }
184
  Vector lrl (ulx + xAdder, uly + yDist/2.0, 0);
184
  Vector lrl (ulx + xAdder, uly + yDist/2.0, 0);
185
  loc->SetLocation (lrl);
185
  loc->SetPosition (lrl);
186
  
186
  
187
  // Place the right router
187
  // Place the right router
188
  Ptr<Node> rr = GetRight ();
188
  Ptr<Node> rr = GetRight ();
189
  loc = rr->GetObject<CanvasLocation> ();
189
  loc = rr->GetObject<ConstantPositionMobilityModel> ();
190
  if (loc == 0)
190
  if (loc == 0)
191
    {
191
    {
192
      loc = CreateObject<CanvasLocation> ();
192
      loc = CreateObject<ConstantPositionMobilityModel> ();
193
      rr->AggregateObject (loc);
193
      rr->AggregateObject (loc);
194
    }
194
    }
195
  Vector rrl (ulx + xAdder * 2, uly + yDist/2.0, 0); // Right router location
195
  Vector rrl (ulx + xAdder * 2, uly + yDist/2.0, 0); // Right router location
196
  loc->SetLocation (rrl);
196
  loc->SetPosition (rrl);
197
197
198
  // Place the left leaf nodes
198
  // Place the left leaf nodes
199
  double theta = -M_PI_2 + thetaL;
199
  double theta = -M_PI_2 + thetaL;
 Lines 209-218    Link Here 
209
            }
209
            }
210
        }
210
        }
211
      Ptr<Node> ln = GetLeft (l);
211
      Ptr<Node> ln = GetLeft (l);
212
      loc = ln->GetObject<CanvasLocation> ();
212
      loc = ln->GetObject<ConstantPositionMobilityModel> ();
213
      if (loc == 0)
213
      if (loc == 0)
214
        {
214
        {
215
          loc = CreateObject<CanvasLocation> ();
215
          loc = CreateObject<ConstantPositionMobilityModel> ();
216
          ln->AggregateObject (loc);
216
          ln->AggregateObject (loc);
217
        }
217
        }
218
      Vector lnl (lrl.x - cos (theta) * xAdder,
218
      Vector lnl (lrl.x - cos (theta) * xAdder,
 Lines 226-232    Link Here 
226
        {
226
        {
227
          lnl.y = lry; // Set to lower right y
227
          lnl.y = lry; // Set to lower right y
228
        }
228
        }
229
      loc->SetLocation (lnl);
229
      loc->SetPosition (lnl);
230
      theta += thetaL;
230
      theta += thetaL;
231
    }
231
    }
232
  // Place the right nodes
232
  // Place the right nodes
 Lines 242-251    Link Here 
242
            }
242
            }
243
        }
243
        }
244
      Ptr<Node> rn = GetRight (r);
244
      Ptr<Node> rn = GetRight (r);
245
      loc = rn->GetObject<CanvasLocation> ();
245
      loc = rn->GetObject<ConstantPositionMobilityModel> ();
246
      if (loc == 0)
246
      if (loc == 0)
247
        {
247
        {
248
          loc = CreateObject<CanvasLocation> ();
248
          loc = CreateObject<ConstantPositionMobilityModel> ();
249
          rn->AggregateObject (loc);
249
          rn->AggregateObject (loc);
250
        }
250
        }
251
      Vector rnl (rrl.x + cos (theta) * xAdder, // Right node location
251
      Vector rnl (rrl.x + cos (theta) * xAdder, // Right node location
 Lines 259-265    Link Here 
259
        {
259
        {
260
          rnl.y = lry; // Set to lower right y
260
          rnl.y = lry; // Set to lower right y
261
        }
261
        }
262
      loc->SetLocation (rnl);
262
      loc->SetPosition (rnl);
263
      theta += thetaR;
263
      theta += thetaR;
264
    }
264
    }
265
}
265
}
(-)a/src/netanim/helper/point-to-point-grid-helper.cc (-4 / +4 lines)
 Lines 20-26    Link Here 
20
#include "ns3/animation-interface.h"
20
#include "ns3/animation-interface.h"
21
#include "ns3/internet-stack-helper.h"
21
#include "ns3/internet-stack-helper.h"
22
#include "ns3/point-to-point-helper.h"
22
#include "ns3/point-to-point-helper.h"
23
#include "ns3/canvas-location.h"
23
#include "ns3/constant-position-mobility-model.h"
24
#include "ns3/string.h"
24
#include "ns3/string.h"
25
#include "ns3/vector.h"
25
#include "ns3/vector.h"
26
#include "ns3/log.h"
26
#include "ns3/log.h"
 Lines 160-173    Link Here 
160
    for (uint32_t j = 0; j < m_xSize; ++j)
160
    for (uint32_t j = 0; j < m_xSize; ++j)
161
    {
161
    {
162
      Ptr<Node> node = GetNode (i, j);
162
      Ptr<Node> node = GetNode (i, j);
163
      Ptr<CanvasLocation> loc = node->GetObject<CanvasLocation> ();
163
      Ptr<ConstantPositionMobilityModel> loc = node->GetObject<ConstantPositionMobilityModel> ();
164
      if (loc ==0)
164
      if (loc ==0)
165
      {
165
      {
166
        loc = CreateObject<CanvasLocation> ();
166
        loc = CreateObject<ConstantPositionMobilityModel> ();
167
        node->AggregateObject (loc);
167
        node->AggregateObject (loc);
168
      }
168
      }
169
      Vector locVec (xLoc, yLoc, 0);
169
      Vector locVec (xLoc, yLoc, 0);
170
      loc->SetLocation (locVec);
170
      loc->SetPosition (locVec);
171
171
172
      xLoc += xAdder;
172
      xLoc += xAdder;
173
    }
173
    }
(-)a/src/netanim/helper/point-to-point-star-helper.cc (-7 / +7 lines)
 Lines 20-26    Link Here 
20
// ns3 includes
20
// ns3 includes
21
#include "ns3/animation-interface.h"
21
#include "ns3/animation-interface.h"
22
#include "ns3/point-to-point-star-helper.h"
22
#include "ns3/point-to-point-star-helper.h"
23
#include "ns3/canvas-location.h"
23
#include "ns3/constant-position-mobility-model.h"
24
24
25
#include "ns3/node-list.h"
25
#include "ns3/node-list.h"
26
#include "ns3/point-to-point-net-device.h"
26
#include "ns3/point-to-point-net-device.h"
 Lines 120-133    Link Here 
120
120
121
  // Place the hub
121
  // Place the hub
122
  Ptr<Node> hub = m_hub.Get (0);
122
  Ptr<Node> hub = m_hub.Get (0);
123
  Ptr<CanvasLocation> hubLoc =  hub->GetObject<CanvasLocation> ();
123
  Ptr<ConstantPositionMobilityModel> hubLoc =  hub->GetObject<ConstantPositionMobilityModel> ();
124
  if (hubLoc == 0)
124
  if (hubLoc == 0)
125
    {
125
    {
126
      hubLoc = CreateObject<CanvasLocation> ();
126
      hubLoc = CreateObject<ConstantPositionMobilityModel> ();
127
      hub->AggregateObject (hubLoc);
127
      hub->AggregateObject (hubLoc);
128
    }
128
    }
129
  Vector hubVec (ulx + xDist/2.0, uly + yDist/2.0, 0);
129
  Vector hubVec (ulx + xDist/2.0, uly + yDist/2.0, 0);
130
  hubLoc->SetLocation (hubVec);
130
  hubLoc->SetPosition (hubVec);
131
131
132
  double spokeDist;
132
  double spokeDist;
133
  if (xDist > yDist)
133
  if (xDist > yDist)
 Lines 143-158    Link Here 
143
  for (uint32_t i = 0; i < m_spokes.GetN (); ++i)
143
  for (uint32_t i = 0; i < m_spokes.GetN (); ++i)
144
    {
144
    {
145
      Ptr<Node> spokeNode = m_spokes.Get (i);
145
      Ptr<Node> spokeNode = m_spokes.Get (i);
146
      Ptr<CanvasLocation> spokeLoc = spokeNode->GetObject<CanvasLocation> ();
146
      Ptr<ConstantPositionMobilityModel> spokeLoc = spokeNode->GetObject<ConstantPositionMobilityModel> ();
147
      if (spokeLoc == 0)
147
      if (spokeLoc == 0)
148
        {
148
        {
149
          spokeLoc = CreateObject<CanvasLocation> ();
149
          spokeLoc = CreateObject<ConstantPositionMobilityModel> ();
150
          spokeNode->AggregateObject (spokeLoc);
150
          spokeNode->AggregateObject (spokeLoc);
151
        }
151
        }
152
        Vector spokeVec (hubVec.x + cos (theta*i) * spokeDist, 
152
        Vector spokeVec (hubVec.x + cos (theta*i) * spokeDist, 
153
                         hubVec.y + sin (theta*i) * spokeDist,
153
                         hubVec.y + sin (theta*i) * spokeDist,
154
                         0);
154
                         0);
155
        spokeLoc->SetLocation (spokeVec);
155
        spokeLoc->SetPosition (spokeVec);
156
    }
156
    }
157
}
157
}
158
158
(-)a/src/netanim/model/animation-interface.cc (-3 / +3 lines)
 Lines 36-42    Link Here 
36
#include "ns3/channel.h"
36
#include "ns3/channel.h"
37
#include "ns3/config.h"
37
#include "ns3/config.h"
38
#include "ns3/node.h"
38
#include "ns3/node.h"
39
#include "ns3/canvas-location.h"
39
#include "ns3/mobility-model.h"
40
#include "ns3/packet.h"
40
#include "ns3/packet.h"
41
#include "ns3/simulator.h"
41
#include "ns3/simulator.h"
42
42
 Lines 99-109    Link Here 
99
  for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i)
99
  for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i)
100
    {
100
    {
101
      Ptr<Node> n = *i;
101
      Ptr<Node> n = *i;
102
      Ptr<CanvasLocation> loc = n->GetObject<CanvasLocation> ();
102
      Ptr<MobilityModel> loc = n->GetObject<MobilityModel> ();
103
      if (loc)
103
      if (loc)
104
        {
104
        {
105
          // Location exists, dump it
105
          // Location exists, dump it
106
          Vector v = loc->GetLocation ();
106
          Vector v = loc->GetPosition ();
107
          ostringstream oss;
107
          ostringstream oss;
108
          oss << "0.0 N " << n->GetId () 
108
          oss << "0.0 N " << n->GetId () 
109
               << " " << v.x << " " << v.y << endl;
109
               << " " << v.x << " " << v.y << endl;
(-)a/src/netanim/wscript (-3 / +1 lines)
 Lines 1-11    Link Here 
1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
2
3
def build(bld):
3
def build(bld):
4
    module = bld.create_ns3_module('netanim', ['internet', 'point-to-point'])
4
    module = bld.create_ns3_module('netanim', ['internet', 'point-to-point', 'mobility'])
5
    module.includes = '.'
5
    module.includes = '.'
6
    module.source = [
6
    module.source = [
7
        'model/animation-interface.cc',
7
        'model/animation-interface.cc',
8
        'model/canvas-location.cc',
9
        'helper/point-to-point-dumbbell-helper.cc',
8
        'helper/point-to-point-dumbbell-helper.cc',
10
        'helper/point-to-point-grid-helper.cc',
9
        'helper/point-to-point-grid-helper.cc',
11
        'helper/point-to-point-star-helper.cc',
10
        'helper/point-to-point-star-helper.cc',
 Lines 15-21    Link Here 
15
    headers.module = 'netanim'
14
    headers.module = 'netanim'
16
    headers.source = [
15
    headers.source = [
17
        'model/animation-interface.h',
16
        'model/animation-interface.h',
18
        'model/canvas-location.h',
19
        'helper/point-to-point-dumbbell-helper.h',
17
        'helper/point-to-point-dumbbell-helper.h',
20
        'helper/point-to-point-grid-helper.h',
18
        'helper/point-to-point-grid-helper.h',
21
        'helper/point-to-point-star-helper.h',
19
        'helper/point-to-point-star-helper.h',

Return to bug 1106