ns-3
|
SpectrumChannel implementation which handles a single spectrum model. More...
#include <single-model-spectrum-channel.h>
Public Types | |
typedef std::vector< Ptr < SpectrumPhy > > | PhyList |
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::SingleModelSpectrumChannel. |
SpectrumChannel implementation which handles a single spectrum model.
All SpectrumPhy layers attached to this SpectrumChannel
void ns3::SingleModelSpectrumChannel::AddPropagationLossModel | ( | Ptr< PropagationLossModel > | loss | ) | [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.
void ns3::SingleModelSpectrumChannel::AddRx | ( | Ptr< SpectrumPhy > | phy | ) | [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 NS_LOG_FUNCTION.
void ns3::SingleModelSpectrumChannel::AddSpectrumPropagationLossModel | ( | Ptr< SpectrumPropagationLossModel > | loss | ) | [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, and NS_LOG_FUNCTION.
Referenced by ns3::LteHelper::LteHelper().
Ptr< NetDevice > ns3::SingleModelSpectrumChannel::GetDevice | ( | uint32_t | i | ) | const [virtual] |
i | index of NetDevice to retrieve |
This method must be implemented by subclasses.
Implements ns3::Channel.
References NS_LOG_FUNCTION.
uint32_t ns3::SingleModelSpectrumChannel::GetNDevices | ( | void | ) | const [virtual] |
This method must be implemented by subclasses.
Implements ns3::Channel.
References NS_LOG_FUNCTION.
TypeId ns3::SingleModelSpectrumChannel::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::SingleModelSpectrumChannel.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
Attributes defined in parent class ns3::Channel:
TraceSources defined for this type:
Reimplemented from ns3::SpectrumChannel.
References ns3::MakeTraceSourceAccessor(), NS_LOG_FUNCTION_NOARGS, and ns3::TypeId::SetParent().
void ns3::SingleModelSpectrumChannel::SetPropagationDelayModel | ( | Ptr< PropagationDelayModel > | delay | ) | [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, and NS_LOG_FUNCTION.
void ns3::SingleModelSpectrumChannel::StartTx | ( | Ptr< SpectrumSignalParameters > | params | ) | [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::Node::GetId(), ns3::NetDevice::GetNode(), ns3::MicroSeconds(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Simulator::Schedule(), and ns3::Simulator::ScheduleWithContext().