27 #include "ns3/assert.h"
28 #include "ns3/callback.h"
29 #include "ns3/cost231-propagation-loss-model.h"
30 #include "ns3/event-id.h"
31 #include "ns3/mobility-model.h"
32 #include "ns3/net-device.h"
34 #include "ns3/nstime.h"
35 #include "ns3/simulator.h"
58 static TypeId tid =
TypeId(
"ns3::SimpleOfdmWimaxChannel")
60 .SetGroupName(
"Wimax")
70 m_loss = CreateObject<RandomPropagationLossModel>();
74 m_loss = CreateObject<FriisPropagationLossModel>();
77 m_loss = CreateObject<LogDistancePropagationLossModel>();
81 m_loss = CreateObject<Cost231PropagationLossModel>();
95 m_loss = CreateObject<RandomPropagationLossModel>();
99 m_loss = CreateObject<FriisPropagationLossModel>();
102 m_loss = CreateObject<LogDistancePropagationLossModel>();
106 m_loss = CreateObject<Cost231PropagationLossModel>();
135 return (*iter)->GetDevice();
156 double rxPowerDbm = 0;
168 if (receiverMobility && senderMobility &&
m_loss)
171 delay =
Seconds(distance / 300000000.0);
186 dstNode = 0xffffffff;
218 int64_t currentStream = stream;
222 currentStream += simpleOfdm->AssignStreams(currentStream);
224 return (currentStream - stream);
Keep track of the current position and velocity of an object.
double GetDistanceFrom(Ptr< const MobilityModel > position) const
Network layer to device interface.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
double CalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account all the PropagationLossModel(s) chained to the current one.
Smart pointer class similar to boost::intrusive_ptr.
SimpleOfdmSendParam class.
uint8_t GetDirection() const
WimaxPhy::ModulationType GetModulationType()
uint64_t GetFrequency() const
uint32_t GetBurstSize() const
Ptr< PacketBurst > GetBurst()
double GetRxPowerDbm() const
bool GetIsFirstBlock() const
SimpleOfdmWimaxChannel class.
~SimpleOfdmWimaxChannel() override
Ptr< PropagationLossModel > m_loss
loss
void SetPropagationModel(PropModel propModel)
sets the propagation model
void DoAttach(Ptr< WimaxPhy > phy) override
Attach function.
std::size_t DoGetNDevices() const override
Get number of devices function.
static TypeId GetTypeId()
Register this type.
std::list< Ptr< SimpleOfdmWimaxPhy > > m_phyList
phy list
void EndSendDummyBlock(Ptr< SimpleOfdmWimaxPhy > rxphy, SimpleOfdmSendParam *param)
End send dummy block function.
Ptr< NetDevice > DoGetDevice(std::size_t i) const override
Get device function.
void Send(Time BlockTime, uint32_t burstSize, Ptr< WimaxPhy > phy, bool isFirstBlock, bool isLastBlock, uint64_t frequency, WimaxPhy::ModulationType modulationType, uint8_t direction, double txPowerDbm, Ptr< PacketBurst > burst)
Sends a dummy fec block to all connected physical devices.
PropModel
PropModel enumeration.
@ LOG_DISTANCE_PROPAGATION
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
SimpleOfdmWimaxPhy class.
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
The channel object to attach Wimax NetDevices.
ModulationType
ModulationType enumeration.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.