#include <multi-model-spectrum-channel.h>
Public Member Functions | |
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< PacketBurst > p, Ptr< SpectrumValue > txPsd, SpectrumType st, Time duration, Ptr< SpectrumPhy > sender) |
virtual uint32_t | GetNDevices (void) const |
virtual Ptr< NetDevice > | GetDevice (uint32_t i) const |
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 void ns3::MultiModelSpectrumChannel::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.
virtual void ns3::MultiModelSpectrumChannel::AddSpectrumPropagationLossModel | ( | Ptr< SpectrumPropagationLossModel > | loss | ) | [virtual] |
set the propagation loss model to be used
loss | Ptr to the propagation loss model to be used. |
Implements ns3::SpectrumChannel.
void ns3::MultiModelSpectrumChannel::DoDispose | ( | ) | [protected, virtual] |
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.
i | index of NetDevice to retrieve |
This method must be implemented by subclasses.
Implements ns3::Channel.
virtual uint32_t ns3::MultiModelSpectrumChannel::GetNDevices | ( | void | ) | const [virtual] |
This method must be implemented by subclasses.
Implements ns3::Channel.
static TypeId ns3::MultiModelSpectrumChannel::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::MultiModelSpectrumChannel.
This object is accessible through the following paths with Config::Set and Config::Connect:
No Attributes defined for this type.
Attributes defined in parent class ns3::Channel:
No TraceSources defined for this type.
Reimplemented from ns3::SpectrumChannel.
virtual void ns3::MultiModelSpectrumChannel::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.
virtual void ns3::MultiModelSpectrumChannel::StartTx | ( | Ptr< PacketBurst > | p, | |
Ptr< SpectrumValue > | txPsd, | |||
SpectrumType | st, | |||
Time | duration, | |||
Ptr< SpectrumPhy > | sender | |||
) | [virtual] |
Used by attached PHY instances to transmit waveforms on the channel
p | the PacketBurst associated with the waveform being transmitted | |
txPsd | the Power Spectral Density of the waveform, in linear units. The exact unit will depend on the type of transmission medium involved: W for radio communications, Pa for underwater acoustic communications. Other transmission media to be defined. | |
st | spectrum type | |
duration | duration of the packet transmission. It is assumed that the Power Spectral Density remains constant for the whole duration of the transmission. In other words, all waveform have a rect shape with respect to time. | |
sender | the SpectrumPhy instance making this function call |
Implements ns3::SpectrumChannel.