|
|
| 41 |
/** |
41 |
/** |
| 42 |
* \ingroup propagation |
42 |
* \ingroup propagation |
| 43 |
* |
43 |
* |
| 44 |
* \brief Modelize the propagation loss through a transmission medium |
44 |
* \brief Models the propagation loss through a transmission medium |
| 45 |
* |
45 |
* |
| 46 |
* Calculate the receive power (dbm) from a transmit power (dbm) |
46 |
* Calculate the receive power (dbm) from a transmit power (dbm) |
| 47 |
* and a mobility model for the source and destination positions. |
47 |
* and a mobility model for the source and destination positions. |
|
|
| 49 |
class PropagationLossModel : public Object |
49 |
class PropagationLossModel : public Object |
| 50 |
{ |
50 |
{ |
| 51 |
public: |
51 |
public: |
|
|
52 |
/** |
| 53 |
* Get the type ID. |
| 54 |
* \brief Get the type ID. |
| 55 |
* \return the object TypeId |
| 56 |
*/ |
| 52 |
static TypeId GetTypeId (void); |
57 |
static TypeId GetTypeId (void); |
| 53 |
|
58 |
|
| 54 |
PropagationLossModel (); |
59 |
PropagationLossModel (); |
|
|
| 76 |
Ptr<PropagationLossModel> GetNext (); |
81 |
Ptr<PropagationLossModel> GetNext (); |
| 77 |
|
82 |
|
| 78 |
/** |
83 |
/** |
|
|
84 |
* Returns the Rx Power taking into account all the PropagatinLossModel(s) |
| 85 |
* chained to the current one. |
| 86 |
* |
| 79 |
* \param txPowerDbm current transmission power (in dBm) |
87 |
* \param txPowerDbm current transmission power (in dBm) |
| 80 |
* \param a the mobility model of the source |
88 |
* \param a the mobility model of the source |
| 81 |
* \param b the mobility model of the destination |
89 |
* \param b the mobility model of the destination |
|
|
| 99 |
int64_t AssignStreams (int64_t stream); |
107 |
int64_t AssignStreams (int64_t stream); |
| 100 |
|
108 |
|
| 101 |
private: |
109 |
private: |
| 102 |
PropagationLossModel (const PropagationLossModel &o); |
110 |
/** |
| 103 |
PropagationLossModel &operator = (const PropagationLossModel &o); |
111 |
* \brief Copy constructor |
|
|
112 |
* |
| 113 |
* Defined and unimplemented to avoid misuse |
| 114 |
*/ |
| 115 |
PropagationLossModel (const PropagationLossModel &); |
| 116 |
/** |
| 117 |
* \brief Copy constructor |
| 118 |
* |
| 119 |
* Defined and unimplemented to avoid misuse |
| 120 |
* \returns |
| 121 |
*/ |
| 122 |
PropagationLossModel &operator = (const PropagationLossModel &); |
| 123 |
|
| 124 |
/** |
| 125 |
* Returns the Rx Power taking into account only the particular |
| 126 |
* PropagatinLossModel. |
| 127 |
* |
| 128 |
* \param txPowerDbm current transmission power (in dBm) |
| 129 |
* \param a the mobility model of the source |
| 130 |
* \param b the mobility model of the destination |
| 131 |
* \returns the reception power after adding/multiplying propagation loss (in dBm) |
| 132 |
*/ |
| 104 |
virtual double DoCalcRxPower (double txPowerDbm, |
133 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 105 |
Ptr<MobilityModel> a, |
134 |
Ptr<MobilityModel> a, |
| 106 |
Ptr<MobilityModel> b) const = 0; |
135 |
Ptr<MobilityModel> b) const = 0; |
|
|
| 111 |
*/ |
140 |
*/ |
| 112 |
virtual int64_t DoAssignStreams (int64_t stream) = 0; |
141 |
virtual int64_t DoAssignStreams (int64_t stream) = 0; |
| 113 |
|
142 |
|
| 114 |
Ptr<PropagationLossModel> m_next; |
143 |
Ptr<PropagationLossModel> m_next; //!< Next propagation loss model in the list |
| 115 |
}; |
144 |
}; |
| 116 |
|
145 |
|
| 117 |
/** |
146 |
/** |
|
|
| 122 |
class RandomPropagationLossModel : public PropagationLossModel |
151 |
class RandomPropagationLossModel : public PropagationLossModel |
| 123 |
{ |
152 |
{ |
| 124 |
public: |
153 |
public: |
|
|
154 |
/** |
| 155 |
* \brief Get the type ID. |
| 156 |
* \return the object TypeId |
| 157 |
*/ |
| 125 |
static TypeId GetTypeId (void); |
158 |
static TypeId GetTypeId (void); |
| 126 |
|
159 |
|
| 127 |
RandomPropagationLossModel (); |
160 |
RandomPropagationLossModel (); |
| 128 |
virtual ~RandomPropagationLossModel (); |
161 |
virtual ~RandomPropagationLossModel (); |
| 129 |
|
162 |
|
| 130 |
private: |
163 |
private: |
| 131 |
RandomPropagationLossModel (const RandomPropagationLossModel &o); |
164 |
/** |
| 132 |
RandomPropagationLossModel & operator = (const RandomPropagationLossModel &o); |
165 |
* \brief Copy constructor |
|
|
166 |
* |
| 167 |
* Defined and unimplemented to avoid misuse |
| 168 |
*/ |
| 169 |
RandomPropagationLossModel (const RandomPropagationLossModel &); |
| 170 |
/** |
| 171 |
* \brief Copy constructor |
| 172 |
* |
| 173 |
* Defined and unimplemented to avoid misuse |
| 174 |
* \returns |
| 175 |
*/ |
| 176 |
RandomPropagationLossModel & operator = (const RandomPropagationLossModel &); |
| 133 |
virtual double DoCalcRxPower (double txPowerDbm, |
177 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 134 |
Ptr<MobilityModel> a, |
178 |
Ptr<MobilityModel> a, |
| 135 |
Ptr<MobilityModel> b) const; |
179 |
Ptr<MobilityModel> b) const; |
| 136 |
virtual int64_t DoAssignStreams (int64_t stream); |
180 |
virtual int64_t DoAssignStreams (int64_t stream); |
| 137 |
Ptr<RandomVariableStream> m_variable; |
181 |
Ptr<RandomVariableStream> m_variable; //!< random generator |
| 138 |
}; |
182 |
}; |
| 139 |
|
183 |
|
| 140 |
/** |
184 |
/** |
|
|
| 217 |
class FriisPropagationLossModel : public PropagationLossModel |
261 |
class FriisPropagationLossModel : public PropagationLossModel |
| 218 |
{ |
262 |
{ |
| 219 |
public: |
263 |
public: |
|
|
264 |
/** |
| 265 |
* \brief Get the type ID. |
| 266 |
* \return the object TypeId |
| 267 |
*/ |
| 220 |
static TypeId GetTypeId (void); |
268 |
static TypeId GetTypeId (void); |
| 221 |
FriisPropagationLossModel (); |
269 |
FriisPropagationLossModel (); |
| 222 |
/** |
270 |
/** |
|
|
| 256 |
double GetSystemLoss (void) const; |
304 |
double GetSystemLoss (void) const; |
| 257 |
|
305 |
|
| 258 |
private: |
306 |
private: |
| 259 |
FriisPropagationLossModel (const FriisPropagationLossModel &o); |
307 |
/** |
| 260 |
FriisPropagationLossModel & operator = (const FriisPropagationLossModel &o); |
308 |
* \brief Copy constructor |
|
|
309 |
* |
| 310 |
* Defined and unimplemented to avoid misuse |
| 311 |
*/ |
| 312 |
FriisPropagationLossModel (const FriisPropagationLossModel &); |
| 313 |
/** |
| 314 |
* \brief Copy constructor |
| 315 |
* |
| 316 |
* Defined and unimplemented to avoid misuse |
| 317 |
* \returns |
| 318 |
*/ |
| 319 |
FriisPropagationLossModel & operator = (const FriisPropagationLossModel &); |
| 320 |
|
| 261 |
virtual double DoCalcRxPower (double txPowerDbm, |
321 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 262 |
Ptr<MobilityModel> a, |
322 |
Ptr<MobilityModel> a, |
| 263 |
Ptr<MobilityModel> b) const; |
323 |
Ptr<MobilityModel> b) const; |
| 264 |
virtual int64_t DoAssignStreams (int64_t stream); |
324 |
virtual int64_t DoAssignStreams (int64_t stream); |
|
|
325 |
|
| 326 |
/** |
| 327 |
* Transforms a Dbm value to Watt |
| 328 |
* \param dbm the Dbm value |
| 329 |
* \return the Watts |
| 330 |
*/ |
| 265 |
double DbmToW (double dbm) const; |
331 |
double DbmToW (double dbm) const; |
|
|
332 |
|
| 333 |
/** |
| 334 |
* Transforms a Watt value to Dbm |
| 335 |
* \param w the Watt value |
| 336 |
* \return the Dbm |
| 337 |
*/ |
| 266 |
double DbmFromW (double w) const; |
338 |
double DbmFromW (double w) const; |
| 267 |
|
339 |
|
| 268 |
static const double PI; |
340 |
double m_lambda; //!< the carrier wavelength |
| 269 |
double m_lambda; |
341 |
double m_frequency; //!< the carrier frequency |
| 270 |
double m_frequency; |
342 |
double m_systemLoss; //!< the system loss |
| 271 |
double m_systemLoss; |
343 |
double m_minLoss; //!< the minimum loss |
| 272 |
double m_minLoss; |
|
|
| 273 |
}; |
344 |
}; |
| 274 |
|
345 |
|
| 275 |
/** |
346 |
/** |
|
|
| 303 |
class TwoRayGroundPropagationLossModel : public PropagationLossModel |
374 |
class TwoRayGroundPropagationLossModel : public PropagationLossModel |
| 304 |
{ |
375 |
{ |
| 305 |
public: |
376 |
public: |
|
|
377 |
/** |
| 378 |
* \brief Get the type ID. |
| 379 |
* \return the object TypeId |
| 380 |
*/ |
| 306 |
static TypeId GetTypeId (void); |
381 |
static TypeId GetTypeId (void); |
| 307 |
TwoRayGroundPropagationLossModel (); |
382 |
TwoRayGroundPropagationLossModel (); |
| 308 |
|
383 |
|
|
|
| 349 |
void SetHeightAboveZ (double heightAboveZ); |
424 |
void SetHeightAboveZ (double heightAboveZ); |
| 350 |
|
425 |
|
| 351 |
private: |
426 |
private: |
| 352 |
TwoRayGroundPropagationLossModel (const TwoRayGroundPropagationLossModel &o); |
427 |
/** |
| 353 |
TwoRayGroundPropagationLossModel & operator = (const TwoRayGroundPropagationLossModel &o); |
428 |
* \brief Copy constructor |
|
|
429 |
* |
| 430 |
* Defined and unimplemented to avoid misuse |
| 431 |
*/ |
| 432 |
TwoRayGroundPropagationLossModel (const TwoRayGroundPropagationLossModel &); |
| 433 |
/** |
| 434 |
* \brief Copy constructor |
| 435 |
* |
| 436 |
* Defined and unimplemented to avoid misuse |
| 437 |
* \returns |
| 438 |
*/ |
| 439 |
TwoRayGroundPropagationLossModel & operator = (const TwoRayGroundPropagationLossModel &); |
| 440 |
|
| 354 |
virtual double DoCalcRxPower (double txPowerDbm, |
441 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 355 |
Ptr<MobilityModel> a, |
442 |
Ptr<MobilityModel> a, |
| 356 |
Ptr<MobilityModel> b) const; |
443 |
Ptr<MobilityModel> b) const; |
| 357 |
virtual int64_t DoAssignStreams (int64_t stream); |
444 |
virtual int64_t DoAssignStreams (int64_t stream); |
|
|
445 |
|
| 446 |
/** |
| 447 |
* Transforms a Dbm value to Watt |
| 448 |
* \param dbm the Dbm value |
| 449 |
* \return the Watts |
| 450 |
*/ |
| 358 |
double DbmToW (double dbm) const; |
451 |
double DbmToW (double dbm) const; |
|
|
452 |
|
| 453 |
/** |
| 454 |
* Transforms a Watt value to Dbm |
| 455 |
* \param w the Watt value |
| 456 |
* \return the Dbm |
| 457 |
*/ |
| 359 |
double DbmFromW (double w) const; |
458 |
double DbmFromW (double w) const; |
| 360 |
|
459 |
|
| 361 |
static const double PI; |
460 |
double m_lambda; //!< the carrier wavelength |
| 362 |
double m_lambda; |
461 |
double m_frequency; //!< the carrier frequency |
| 363 |
double m_frequency; |
462 |
double m_systemLoss; //!< the system loss |
| 364 |
double m_systemLoss; |
463 |
double m_minDistance; //!< minimum distance for the model |
| 365 |
double m_minDistance; |
464 |
double m_heightAboveZ; //!< antenna height above the node's Z coordinate |
| 366 |
double m_heightAboveZ; |
|
|
| 367 |
}; |
465 |
}; |
| 368 |
|
466 |
|
| 369 |
/** |
467 |
/** |
|
|
| 389 |
class LogDistancePropagationLossModel : public PropagationLossModel |
487 |
class LogDistancePropagationLossModel : public PropagationLossModel |
| 390 |
{ |
488 |
{ |
| 391 |
public: |
489 |
public: |
|
|
490 |
/** |
| 491 |
* \brief Get the type ID. |
| 492 |
* \return the object TypeId |
| 493 |
*/ |
| 392 |
static TypeId GetTypeId (void); |
494 |
static TypeId GetTypeId (void); |
| 393 |
LogDistancePropagationLossModel (); |
495 |
LogDistancePropagationLossModel (); |
| 394 |
|
496 |
|
|
|
| 402 |
*/ |
504 |
*/ |
| 403 |
double GetPathLossExponent (void) const; |
505 |
double GetPathLossExponent (void) const; |
| 404 |
|
506 |
|
|
|
507 |
/** |
| 508 |
* Set the reference path loss at a given distance |
| 509 |
* \param referenceDistance reference distance |
| 510 |
* \param referenceLoss reference path loss |
| 511 |
*/ |
| 405 |
void SetReference (double referenceDistance, double referenceLoss); |
512 |
void SetReference (double referenceDistance, double referenceLoss); |
| 406 |
|
513 |
|
| 407 |
private: |
514 |
private: |
| 408 |
LogDistancePropagationLossModel (const LogDistancePropagationLossModel &o); |
515 |
/** |
| 409 |
LogDistancePropagationLossModel & operator = (const LogDistancePropagationLossModel &o); |
516 |
* \brief Copy constructor |
|
|
517 |
* |
| 518 |
* Defined and unimplemented to avoid misuse |
| 519 |
*/ |
| 520 |
LogDistancePropagationLossModel (const LogDistancePropagationLossModel &); |
| 521 |
/** |
| 522 |
* \brief Copy constructor |
| 523 |
* |
| 524 |
* Defined and unimplemented to avoid misuse |
| 525 |
* \returns |
| 526 |
*/ |
| 527 |
LogDistancePropagationLossModel & operator = (const LogDistancePropagationLossModel &); |
| 528 |
|
| 410 |
virtual double DoCalcRxPower (double txPowerDbm, |
529 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 411 |
Ptr<MobilityModel> a, |
530 |
Ptr<MobilityModel> a, |
| 412 |
Ptr<MobilityModel> b) const; |
531 |
Ptr<MobilityModel> b) const; |
| 413 |
virtual int64_t DoAssignStreams (int64_t stream); |
532 |
virtual int64_t DoAssignStreams (int64_t stream); |
|
|
533 |
|
| 534 |
/** |
| 535 |
* Creates a default reference loss model |
| 536 |
* \return a default reference loss model |
| 537 |
*/ |
| 414 |
static Ptr<PropagationLossModel> CreateDefaultReference (void); |
538 |
static Ptr<PropagationLossModel> CreateDefaultReference (void); |
| 415 |
|
539 |
|
| 416 |
double m_exponent; |
540 |
double m_exponent; //!< model exponent |
| 417 |
double m_referenceDistance; |
541 |
double m_referenceDistance; //!< reference distance |
| 418 |
double m_referenceLoss; |
542 |
double m_referenceLoss; //!< reference loss |
| 419 |
}; |
543 |
}; |
| 420 |
|
544 |
|
| 421 |
/** |
545 |
/** |
|
|
| 461 |
class ThreeLogDistancePropagationLossModel : public PropagationLossModel |
585 |
class ThreeLogDistancePropagationLossModel : public PropagationLossModel |
| 462 |
{ |
586 |
{ |
| 463 |
public: |
587 |
public: |
|
|
588 |
/** |
| 589 |
* \brief Get the type ID. |
| 590 |
* \return the object TypeId |
| 591 |
*/ |
| 464 |
static TypeId GetTypeId (void); |
592 |
static TypeId GetTypeId (void); |
| 465 |
ThreeLogDistancePropagationLossModel (); |
593 |
ThreeLogDistancePropagationLossModel (); |
| 466 |
|
594 |
|
| 467 |
// Parameters are all accessible via attributes. |
595 |
// Parameters are all accessible via attributes. |
| 468 |
|
596 |
|
| 469 |
private: |
597 |
private: |
| 470 |
ThreeLogDistancePropagationLossModel (const ThreeLogDistancePropagationLossModel& o); |
598 |
/** |
| 471 |
ThreeLogDistancePropagationLossModel& operator= (const ThreeLogDistancePropagationLossModel& o); |
599 |
* \brief Copy constructor |
|
|
600 |
* |
| 601 |
* Defined and unimplemented to avoid misuse |
| 602 |
*/ |
| 603 |
ThreeLogDistancePropagationLossModel (const ThreeLogDistancePropagationLossModel&); |
| 604 |
/** |
| 605 |
* \brief Copy constructor |
| 606 |
* |
| 607 |
* Defined and unimplemented to avoid misuse |
| 608 |
* \returns |
| 609 |
*/ |
| 610 |
ThreeLogDistancePropagationLossModel& operator= (const ThreeLogDistancePropagationLossModel&); |
| 472 |
|
611 |
|
| 473 |
virtual double DoCalcRxPower (double txPowerDbm, |
612 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 474 |
Ptr<MobilityModel> a, |
613 |
Ptr<MobilityModel> a, |
| 475 |
Ptr<MobilityModel> b) const; |
614 |
Ptr<MobilityModel> b) const; |
| 476 |
virtual int64_t DoAssignStreams (int64_t stream); |
615 |
virtual int64_t DoAssignStreams (int64_t stream); |
| 477 |
|
616 |
|
| 478 |
double m_distance0; |
617 |
double m_distance0; //!< Beginning of the first (near) distance field |
| 479 |
double m_distance1; |
618 |
double m_distance1; //!< Beginning of the second (middle) distance field. |
| 480 |
double m_distance2; |
619 |
double m_distance2; //!< Beginning of the third (far) distance field. |
| 481 |
|
620 |
|
| 482 |
double m_exponent0; |
621 |
double m_exponent0; //!< The exponent for the first field. |
| 483 |
double m_exponent1; |
622 |
double m_exponent1; //!< The exponent for the second field. |
| 484 |
double m_exponent2; |
623 |
double m_exponent2; //!< The exponent for the third field. |
| 485 |
|
624 |
|
| 486 |
double m_referenceLoss; |
625 |
double m_referenceLoss; //!< The reference loss at distance d0 (dB). |
| 487 |
}; |
626 |
}; |
| 488 |
|
627 |
|
| 489 |
/** |
628 |
/** |
|
|
| 509 |
class NakagamiPropagationLossModel : public PropagationLossModel |
648 |
class NakagamiPropagationLossModel : public PropagationLossModel |
| 510 |
{ |
649 |
{ |
| 511 |
public: |
650 |
public: |
|
|
651 |
/** |
| 652 |
* \brief Get the type ID. |
| 653 |
* \return the object TypeId |
| 654 |
*/ |
| 512 |
static TypeId GetTypeId (void); |
655 |
static TypeId GetTypeId (void); |
| 513 |
|
656 |
|
| 514 |
NakagamiPropagationLossModel (); |
657 |
NakagamiPropagationLossModel (); |
|
|
| 516 |
// Parameters are all accessible via attributes. |
659 |
// Parameters are all accessible via attributes. |
| 517 |
|
660 |
|
| 518 |
private: |
661 |
private: |
| 519 |
NakagamiPropagationLossModel (const NakagamiPropagationLossModel& o); |
662 |
/** |
| 520 |
NakagamiPropagationLossModel& operator= (const NakagamiPropagationLossModel& o); |
663 |
* \brief Copy constructor |
|
|
664 |
* |
| 665 |
* Defined and unimplemented to avoid misuse |
| 666 |
*/ |
| 667 |
NakagamiPropagationLossModel (const NakagamiPropagationLossModel&); |
| 668 |
/** |
| 669 |
* \brief Copy constructor |
| 670 |
* |
| 671 |
* Defined and unimplemented to avoid misuse |
| 672 |
* \returns |
| 673 |
*/ |
| 674 |
NakagamiPropagationLossModel& operator= (const NakagamiPropagationLossModel&); |
| 521 |
|
675 |
|
| 522 |
virtual double DoCalcRxPower (double txPowerDbm, |
676 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 523 |
Ptr<MobilityModel> a, |
677 |
Ptr<MobilityModel> a, |
| 524 |
Ptr<MobilityModel> b) const; |
678 |
Ptr<MobilityModel> b) const; |
| 525 |
virtual int64_t DoAssignStreams (int64_t stream); |
679 |
virtual int64_t DoAssignStreams (int64_t stream); |
| 526 |
|
680 |
|
| 527 |
double m_distance1; |
681 |
double m_distance1; //!< Distance1 |
| 528 |
double m_distance2; |
682 |
double m_distance2; //!< Distance2 |
| 529 |
|
683 |
|
| 530 |
double m_m0; |
684 |
double m_m0; //!< m for distances smaller than Distance1 |
| 531 |
double m_m1; |
685 |
double m_m1; //!< m for distances smaller than Distance2 |
| 532 |
double m_m2; |
686 |
double m_m2; //!< m for distances greater than Distance2 |
| 533 |
|
687 |
|
| 534 |
Ptr<ErlangRandomVariable> m_erlangRandomVariable; |
688 |
Ptr<ErlangRandomVariable> m_erlangRandomVariable; //!< Erlang random variable |
| 535 |
Ptr<GammaRandomVariable> m_gammaRandomVariable; |
689 |
Ptr<GammaRandomVariable> m_gammaRandomVariable; //!< Gamma random variable |
| 536 |
}; |
690 |
}; |
| 537 |
|
691 |
|
| 538 |
/** |
692 |
/** |
|
|
| 551 |
class FixedRssLossModel : public PropagationLossModel |
705 |
class FixedRssLossModel : public PropagationLossModel |
| 552 |
{ |
706 |
{ |
| 553 |
public: |
707 |
public: |
|
|
708 |
/** |
| 709 |
* \brief Get the type ID. |
| 710 |
* \return the object TypeId |
| 711 |
*/ |
| 554 |
static TypeId GetTypeId (void); |
712 |
static TypeId GetTypeId (void); |
| 555 |
|
713 |
|
| 556 |
FixedRssLossModel (); |
714 |
FixedRssLossModel (); |
|
|
| 563 |
void SetRss (double rss); |
721 |
void SetRss (double rss); |
| 564 |
|
722 |
|
| 565 |
private: |
723 |
private: |
| 566 |
FixedRssLossModel (const FixedRssLossModel &o); |
724 |
/** |
| 567 |
FixedRssLossModel & operator = (const FixedRssLossModel &o); |
725 |
* \brief Copy constructor |
|
|
726 |
* |
| 727 |
* Defined and unimplemented to avoid misuse |
| 728 |
*/ |
| 729 |
FixedRssLossModel (const FixedRssLossModel &); |
| 730 |
/** |
| 731 |
* \brief Copy constructor |
| 732 |
* |
| 733 |
* Defined and unimplemented to avoid misuse |
| 734 |
* \returns |
| 735 |
*/ |
| 736 |
FixedRssLossModel & operator = (const FixedRssLossModel &); |
| 737 |
|
| 568 |
virtual double DoCalcRxPower (double txPowerDbm, |
738 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 569 |
Ptr<MobilityModel> a, |
739 |
Ptr<MobilityModel> a, |
| 570 |
Ptr<MobilityModel> b) const; |
740 |
Ptr<MobilityModel> b) const; |
|
|
741 |
|
| 571 |
virtual int64_t DoAssignStreams (int64_t stream); |
742 |
virtual int64_t DoAssignStreams (int64_t stream); |
| 572 |
double m_rss; |
743 |
double m_rss; //!< the received signal strength |
| 573 |
}; |
744 |
}; |
| 574 |
|
745 |
|
| 575 |
/** |
746 |
/** |
|
|
| 582 |
class MatrixPropagationLossModel : public PropagationLossModel |
753 |
class MatrixPropagationLossModel : public PropagationLossModel |
| 583 |
{ |
754 |
{ |
| 584 |
public: |
755 |
public: |
|
|
756 |
/** |
| 757 |
* \brief Get the type ID. |
| 758 |
* \return the object TypeId |
| 759 |
*/ |
| 585 |
static TypeId GetTypeId (void); |
760 |
static TypeId GetTypeId (void); |
| 586 |
|
761 |
|
| 587 |
MatrixPropagationLossModel (); |
762 |
MatrixPropagationLossModel (); |
|
|
| 597 |
* \param symmetric If true (default), both a->b and b->a paths will be affected |
772 |
* \param symmetric If true (default), both a->b and b->a paths will be affected |
| 598 |
*/ |
773 |
*/ |
| 599 |
void SetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b, double loss, bool symmetric = true); |
774 |
void SetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b, double loss, bool symmetric = true); |
| 600 |
/// Set default loss (in dB, positive) to be used, infinity if not set |
775 |
|
| 601 |
void SetDefaultLoss (double); |
776 |
/** |
|
|
777 |
* Set the default propagation loss (in dB, positive) to be used, infinity if not set |
| 778 |
* \param defaultLoss the default proagation loss |
| 779 |
*/ |
| 780 |
void SetDefaultLoss (double defaultLoss); |
| 602 |
|
781 |
|
| 603 |
private: |
782 |
private: |
|
|
783 |
/** |
| 784 |
* \brief Copy constructor |
| 785 |
* |
| 786 |
* Defined and unimplemented to avoid misuse |
| 787 |
*/ |
| 788 |
MatrixPropagationLossModel (const MatrixPropagationLossModel &); |
| 789 |
/** |
| 790 |
* \brief Copy constructor |
| 791 |
* |
| 792 |
* Defined and unimplemented to avoid misuse |
| 793 |
* \returns |
| 794 |
*/ |
| 795 |
MatrixPropagationLossModel &operator = (const MatrixPropagationLossModel &); |
| 796 |
|
| 604 |
virtual double DoCalcRxPower (double txPowerDbm, |
797 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 605 |
Ptr<MobilityModel> a, |
798 |
Ptr<MobilityModel> a, |
| 606 |
Ptr<MobilityModel> b) const; |
799 |
Ptr<MobilityModel> b) const; |
|
|
800 |
|
| 607 |
virtual int64_t DoAssignStreams (int64_t stream); |
801 |
virtual int64_t DoAssignStreams (int64_t stream); |
| 608 |
private: |
802 |
private: |
| 609 |
/// default loss |
803 |
double m_default; //!< default loss |
| 610 |
double m_default; |
|
|
| 611 |
|
804 |
|
|
|
805 |
/// Typedef: Mobility models pair |
| 612 |
typedef std::pair< Ptr<MobilityModel>, Ptr<MobilityModel> > MobilityPair; |
806 |
typedef std::pair< Ptr<MobilityModel>, Ptr<MobilityModel> > MobilityPair; |
| 613 |
/// Fixed loss between pair of nodes |
807 |
|
| 614 |
std::map<MobilityPair, double> m_loss; |
808 |
std::map<MobilityPair, double> m_loss; //!< Propagation loss between pair of nodes |
| 615 |
}; |
809 |
}; |
| 616 |
|
810 |
|
| 617 |
/** |
811 |
/** |
|
|
| 627 |
class RangePropagationLossModel : public PropagationLossModel |
821 |
class RangePropagationLossModel : public PropagationLossModel |
| 628 |
{ |
822 |
{ |
| 629 |
public: |
823 |
public: |
|
|
824 |
/** |
| 825 |
* \brief Get the type ID. |
| 826 |
* \return the object TypeId |
| 827 |
*/ |
| 630 |
static TypeId GetTypeId (void); |
828 |
static TypeId GetTypeId (void); |
| 631 |
RangePropagationLossModel (); |
829 |
RangePropagationLossModel (); |
| 632 |
private: |
830 |
private: |
| 633 |
RangePropagationLossModel (const RangePropagationLossModel& o); |
831 |
/** |
| 634 |
RangePropagationLossModel& operator= (const RangePropagationLossModel& o); |
832 |
* \brief Copy constructor |
|
|
833 |
* |
| 834 |
* Defined and unimplemented to avoid misuse |
| 835 |
*/ |
| 836 |
RangePropagationLossModel (const RangePropagationLossModel&); |
| 837 |
/** |
| 838 |
* \brief Copy constructor |
| 839 |
* |
| 840 |
* Defined and unimplemented to avoid misuse |
| 841 |
* \returns |
| 842 |
*/ |
| 843 |
RangePropagationLossModel& operator= (const RangePropagationLossModel&); |
| 635 |
virtual double DoCalcRxPower (double txPowerDbm, |
844 |
virtual double DoCalcRxPower (double txPowerDbm, |
| 636 |
Ptr<MobilityModel> a, |
845 |
Ptr<MobilityModel> a, |
| 637 |
Ptr<MobilityModel> b) const; |
846 |
Ptr<MobilityModel> b) const; |
| 638 |
virtual int64_t DoAssignStreams (int64_t stream); |
847 |
virtual int64_t DoAssignStreams (int64_t stream); |
| 639 |
private: |
848 |
private: |
| 640 |
double m_range; |
849 |
double m_range; //!< Maximum Transmission Range (meters) |
| 641 |
}; |
850 |
}; |
| 642 |
|
851 |
|
| 643 |
} // namespace ns3 |
852 |
} // namespace ns3 |