22 #include "ns3/simulator.h"
23 #include "ns3/callback.h"
24 #include "ns3/nstime.h"
25 #include "ns3/event-id.h"
26 #include "ns3/assert.h"
27 #include "ns3/net-device.h"
32 #include "ns3/mobility-model.h"
33 #include "ns3/cost231-propagation-loss-model.h"
57 static TypeId tid =
TypeId (
"ns3::SimpleOfdmWimaxChannel")
59 .SetGroupName (
"Wimax")
70 m_loss = CreateObject<RandomPropagationLossModel> ();
74 m_loss = CreateObject<FriisPropagationLossModel> ();
77 m_loss = CreateObject<LogDistancePropagationLossModel> ();
81 m_loss = CreateObject<Cost231PropagationLossModel> ();
97 m_loss = CreateObject<RandomPropagationLossModel> ();
101 m_loss = CreateObject<FriisPropagationLossModel> ();
104 m_loss = CreateObject<LogDistancePropagationLossModel> ();
108 m_loss = CreateObject<Cost231PropagationLossModel> ();
138 return (*iter)->GetDevice ();
159 double rxPowerDbm = 0;
162 senderMobility =
phy->GetDevice ()->GetNode ()->GetObject<
MobilityModel> ();
171 if (receiverMobility != 0 && senderMobility != 0 &&
m_loss != 0)
174 delay =
Seconds (distance/300000000.0);
187 if (dstNetDevice == 0)
189 dstNode = 0xffffffff;
222 int64_t currentStream = stream;
223 typedef std::list<Ptr<SimpleOfdmWimaxPhy> > PhyList;
227 currentStream += simpleOfdm->AssignStreams (currentStream);
229 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(void) 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.
SimpleOfdmWimaxChannel class.
~SimpleOfdmWimaxChannel(void)
Ptr< PropagationLossModel > m_loss
loss
void SetPropagationModel(PropModel propModel)
sets the propagation model
std::size_t DoGetNDevices(void) const
Get number of devices function.
void EndSendDummyBlock(Ptr< SimpleOfdmWimaxPhy > rxphy, simpleOfdmSendParam *param)
End send dummy block function.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void DoAttach(Ptr< WimaxPhy > phy)
Attach functiion.
Ptr< NetDevice > DoGetDevice(std::size_t i) const
Get device function.
std::list< Ptr< SimpleOfdmWimaxPhy > > m_phyList
phy list
static TypeId GetTypeId(void)
Register this type.
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.
SimpleOfdmWimaxChannel(void)
PropModel
PropModel enumeration.
@ LOG_DISTANCE_PROPAGATION
SimpleOfdmWimaxPhy class.
static void ScheduleWithContext(uint32_t context, Time const &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.
simpleOfdmSendParam class
uint32_t GetBurstSize(void)
uint8_t GetDirection(void)
WimaxPhy::ModulationType GetModulationType(void)
double GetRxPowerDbm(void)
uint64_t GetFrequency(void)
bool GetIsFirstBlock(void)
Ptr< PacketBurst > GetBurst(void)
#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.