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);
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
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...
SimpleOfdmWimaxChannel(void)
The channel object to attach Wimax NetDevices.
SimpleOfdmWimaxPhy class.
SimpleOfdmWimaxChannel class.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
bool GetIsFirstBlock(void)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
simpleOfdmSendParam class
PropModel
PropModel enumeration.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
~SimpleOfdmWimaxChannel(void)
Keep track of the current position and velocity of an object.
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.
double GetDistanceFrom(Ptr< const MobilityModel > position) const
WimaxPhy::ModulationType GetModulationType(void)
std::list< Ptr< SimpleOfdmWimaxPhy > > m_phyList
phy list
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
double GetRxPowerDbm(void)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetBurstSize(void)
std::size_t DoGetNDevices(void) const
Get number of devices function.
void SetPropagationModel(PropModel propModel)
sets the propagation model
Ptr< NetDevice > DoGetDevice(std::size_t i) const
Get device function.
ModulationType
ModulationType enumeration.
static void ScheduleWithContext(uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event with the given context.
Network layer to device interface.
Time Seconds(double value)
Construct a Time in the indicated unit.
uint8_t GetDirection(void)
uint64_t GetFrequency(void)
void EndSendDummyBlock(Ptr< SimpleOfdmWimaxPhy > rxphy, simpleOfdmSendParam *param)
End send dummy block function.
Ptr< PacketBurst > GetBurst(void)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< PropagationLossModel > m_loss
loss
void DoAttach(Ptr< WimaxPhy > phy)
Attach functiion.