mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 10:03:58 +02:00
Add link params to model with attributes
This commit is contained in:
parent
1224169ff5
commit
27ee6a3697
8 changed files with 77 additions and 12 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "ns3/net-device-queue-interface.h"
|
||||
#include "ns3/ethernet-header.h"
|
||||
#include "ns3/ethernet-trailer.h"
|
||||
#include "ns3/double.h"
|
||||
#include "mock-channel.h"
|
||||
#include "mock-net-device.h"
|
||||
|
||||
|
@ -69,6 +70,11 @@ MockNetDevice::GetTypeId (void)
|
|||
TimeValue (Seconds (0.0)),
|
||||
MakeTimeAccessor (&MockNetDevice::m_tInterframeGap),
|
||||
MakeTimeChecker ())
|
||||
.AddAttribute ("TxPower",
|
||||
"Transmit power in dBm",
|
||||
DoubleValue (1.0),
|
||||
MakeDoubleAccessor (&MockNetDevice::m_txPower),
|
||||
MakeDoubleChecker<double> ())
|
||||
|
||||
//
|
||||
// Transmit queueing discipline for the device which includes its own set
|
||||
|
@ -765,4 +771,16 @@ MockNetDevice::IsPointToPoint() const
|
|||
return false;
|
||||
}
|
||||
|
||||
double
|
||||
MockNetDevice::GetTxPower () const
|
||||
{
|
||||
return m_txPower;
|
||||
}
|
||||
|
||||
void
|
||||
MockNetDevice::SetTxPower (double txPower)
|
||||
{
|
||||
m_txPower = txPower;
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue