ns-3
|
#include <multi-model-spectrum-channel.h>
Public Member Functions | |
virtual void | AddPropagationLossModel (Ptr< PropagationLossModel > loss) |
virtual void | AddSpectrumPropagationLossModel (Ptr< SpectrumPropagationLossModel > loss) |
virtual void | SetPropagationDelayModel (Ptr< PropagationDelayModel > delay) |
virtual void | AddRx (Ptr< SpectrumPhy > phy) |
add a SpectrumPhy to a channel, so it can receive packets | |
virtual void | StartTx (Ptr< SpectrumSignalParameters > params) |
virtual uint32_t | GetNDevices (void) const |
virtual Ptr< NetDevice > | GetDevice (uint32_t i) const |
virtual Ptr < SpectrumPropagationLossModel > | GetSpectrumPropagationLossModel (void) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::MultiModelSpectrumChannel. |
Protected Member Functions | |
void | DoDispose () |
This SpectrumChannel implementation can handle the presence of SpectrumPhy instances which can use different spectrum models, i.e., different SpectrumModel. The only requirement is that every SpectrumPhy instance uses the same SpectrumModel for the whole simulation.
|
virtual |
set the single-frequency propagation loss model to be used
loss | a pointer to the propagation loss model to be used. |
Implements ns3::SpectrumChannel.
References NS_ASSERT, and NS_LOG_FUNCTION.
|
virtual |
add a SpectrumPhy to a channel, so it can receive packets
This method is used to attach a SpectrumPhy instance to a SpectrumChannel instance, so that the SpectrumPhy can receive packets sent on that channel. Note that a SpectrumPhy that only transmits (without receiveing ever) does not need to be added to the channel.
This method is to be implemented by all classes inheriting from SpectrumChannel.
phy | the SpectrumPhy instance to be added to the channel as a receiver. |
Implements ns3::SpectrumChannel.
References ns3::SpectrumPhy::GetRxSpectrumModel(), ns3::SpectrumModel::GetUid(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
|
virtual |
set the frequency-dependent propagation loss model to be used
loss | a pointer to the propagation loss model to be used. |
Implements ns3::SpectrumChannel.
References NS_ASSERT.
|
protectedvirtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Object.
References NS_LOG_FUNCTION.
i | index of NetDevice to retrieve |
This method must be implemented by subclasses.
Implements ns3::Channel.
|
virtual |
This method must be implemented by subclasses.
Implements ns3::Channel.
|
static |
This method returns the TypeId associated to ns3::MultiModelSpectrumChannel.
Attributes defined for this type:
Attributes defined in parent class ns3::Channel:
TraceSources defined for this type:
Reimplemented from ns3::SpectrumChannel.
References ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
|
virtual |
set the propagation delay model to be used
delay | Ptr to the propagation delay model to be used. |
Implements ns3::SpectrumChannel.
References NS_ASSERT.
|
virtual |
Used by attached PHY instances to transmit signals on the channel
params | the parameters of the signals being transmitted |
Implements ns3::SpectrumChannel.
References ns3::PropagationLossModel::CalcRxPower(), ns3::SpectrumPropagationLossModel::CalcRxPowerSpectralDensity(), ns3::PropagationDelayModel::GetDelay(), ns3::AntennaModel::GetGainDb(), ns3::Node::GetId(), ns3::NetDevice::GetNode(), ns3::MobilityModel::GetPosition(), ns3::MicroSeconds(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Simulator::Schedule(), and ns3::Simulator::ScheduleWithContext().