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