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

(-)a/src/common/propagation-loss-model-test-suite.cc (-2 / +2 lines)
 Lines 374-384    Link Here 
374
bool
374
bool
375
MatrixPropagationLossModelTestCase::DoRun (void)
375
MatrixPropagationLossModelTestCase::DoRun (void)
376
{
376
{
377
  Ptr<Node> n[3];
377
  Ptr<Object> n[3];
378
  Ptr<MobilityModel> m[3];
378
  Ptr<MobilityModel> m[3];
379
  for (int i = 0; i < 3; ++i)
379
  for (int i = 0; i < 3; ++i)
380
    {
380
    {
381
      n[i] = CreateObject<Node> ();
381
      n[i] = CreateObject<Object> ();
382
      m[i] = CreateObject<ConstantPositionMobilityModel> ();
382
      m[i] = CreateObject<ConstantPositionMobilityModel> ();
383
      n[i]->AggregateObject (m[i]);
383
      n[i]->AggregateObject (m[i]);
384
    }
384
    }
(-)a/src/common/propagation-loss-model.cc (-1 / +1 lines)
 Lines 747-753    Link Here 
747
}
747
}
748
748
749
void
749
void
750
MatrixPropagationLossModel::SetLoss (Ptr<Node> a, Ptr<Node> b, double loss, bool symmetric)
750
MatrixPropagationLossModel::SetLoss (Ptr<Object> a, Ptr<Object> b, double loss, bool symmetric)
751
{
751
{
752
  Ptr<MobilityModel> ma = a->GetObject<MobilityModel> ();
752
  Ptr<MobilityModel> ma = a->GetObject<MobilityModel> ();
753
  Ptr<MobilityModel> mb = b->GetObject<MobilityModel> ();
753
  Ptr<MobilityModel> mb = b->GetObject<MobilityModel> ();
(-)a/src/common/propagation-loss-model.h (-5 / +4 lines)
 Lines 27-33    Link Here 
27
27
28
#include "ns3/object.h"
28
#include "ns3/object.h"
29
#include "ns3/random-variable.h"
29
#include "ns3/random-variable.h"
30
#include "ns3/node.h"
31
#include <map>
30
#include <map>
32
31
33
namespace ns3 {
32
namespace ns3 {
 Lines 495-508    Link Here 
495
  virtual ~MatrixPropagationLossModel ();
494
  virtual ~MatrixPropagationLossModel ();
496
  
495
  
497
  /**
496
  /**
498
   * \brief Set loss (in dB, positive) between pair of nodes.
497
   * \brief Set loss (in dB, positive) between pair of ns-3 objects (typically, nodes)
499
   * 
498
   * 
500
   * \param a           Source node
499
   * \param a           Source object
501
   * \param b           Destination node
500
   * \param b           Destination object
502
   * \param loss        a -> b path loss, positive in dB
501
   * \param loss        a -> b path loss, positive in dB
503
   * \param symmetric   If true (default), both a->b and b->a paths will be affected
502
   * \param symmetric   If true (default), both a->b and b->a paths will be affected
504
   */ 
503
   */ 
505
  void SetLoss (Ptr<Node> a, Ptr<Node> b, double loss, bool symmetric = true);
504
  void SetLoss (Ptr<Object> a, Ptr<Object> b, double loss, bool symmetric = true);
506
  /// Set default loss (in dB, positive) to be used, infinity if not set
505
  /// Set default loss (in dB, positive) to be used, infinity if not set
507
  void SetDefaultLoss (double);
506
  void SetDefaultLoss (double);
508
  
507
  

Return to bug 1019