mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 10:03:58 +02:00
Add user link parameters
This commit is contained in:
parent
bb3bcb627c
commit
7293dbbad1
12 changed files with 247 additions and 96 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/enum.h"
|
||||
#include "ns3/double.h"
|
||||
|
||||
#include "leo-mock-net-device.h"
|
||||
|
||||
|
@ -25,6 +26,16 @@ LeoMockNetDevice::GetTypeId (void)
|
|||
MakeEnumChecker (
|
||||
DeviceType::GND, "ns3::LeoMockNetDevice::NetDeviceType::GND",
|
||||
DeviceType::SAT, "ns3::LeoMockNetDevice::NetDeviceType::SAT"))
|
||||
.AddAttribute ("ReceiverGain",
|
||||
"Receiver gain in dBm",
|
||||
DoubleValue (0.0),
|
||||
MakeDoubleAccessor (&LeoMockNetDevice::m_rxGain),
|
||||
MakeDoubleChecker<double> ())
|
||||
.AddAttribute ("ReceiverLoss",
|
||||
"Receiver loss in dBm",
|
||||
DoubleValue (0.0),
|
||||
MakeDoubleAccessor (&LeoMockNetDevice::m_rxLoss),
|
||||
MakeDoubleChecker<double> ())
|
||||
;
|
||||
return tid;
|
||||
};
|
||||
|
@ -45,4 +56,10 @@ LeoMockNetDevice::SetDeviceType (LeoMockNetDevice::DeviceType deviceType)
|
|||
m_deviceType = deviceType;
|
||||
}
|
||||
|
||||
double
|
||||
LeoMockNetDevice::DoCalcRxPower (double rxPower) const
|
||||
{
|
||||
return rxPower - m_rxLoss + m_rxGain;
|
||||
}
|
||||
|
||||
}; /* namspace ns3 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue