INET Framework for OMNeT++/OMNEST
inet::physicallayer::Ieee80211IdealTransmitter Class Reference

#include <Ieee80211IdealTransmitter.h>

Inheritance diagram for inet::physicallayer::Ieee80211IdealTransmitter:
inet::physicallayer::Ieee80211TransmitterBase inet::physicallayer::FlatTransmitterBase inet::physicallayer::NarrowbandTransmitterBase inet::physicallayer::TransmitterBase inet::physicallayer::ITransmitter inet::physicallayer::IPrintableObject

Public Member Functions

 Ieee80211IdealTransmitter ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual const ITransmissioncreateTransmission (const IRadio *radio, const cPacket *packet, simtime_t startTime) const override
 Returns a transmission which describes the radio signal corresponding to the provided mac frame. More...
 
- Public Member Functions inherited from inet::physicallayer::Ieee80211TransmitterBase
 Ieee80211TransmitterBase ()
 
virtual ~Ieee80211TransmitterBase ()
 
virtual void setModeSet (const Ieee80211ModeSet *modeSet)
 
virtual void setMode (const IIeee80211Mode *mode)
 
virtual void setBand (const IIeee80211Band *band)
 
virtual void setChannel (const Ieee80211Channel *channel)
 
virtual void setChannelNumber (int channelNumber)
 
- Public Member Functions inherited from inet::physicallayer::FlatTransmitterBase
 FlatTransmitterBase ()
 
virtual int getHeaderBitLength () const
 
virtual void setHeaderBitLength (int headerBitLength)
 
virtual bps getBitrate () const
 
virtual void setBitrate (bps bitrate)
 
virtual W getMaxPower () const override
 Returns the maximum transmission power above which no transmission is ever transmitted. More...
 
virtual W getPower () const
 
virtual void setPower (W power)
 
- Public Member Functions inherited from inet::physicallayer::NarrowbandTransmitterBase
 NarrowbandTransmitterBase ()
 
virtual const IModulationgetModulation () const
 
virtual void setModulation (const IModulation *modulation)
 
virtual Hz getCarrierFrequency () const
 
virtual void setCarrierFrequency (Hz carrierFrequency)
 
virtual Hz getBandwidth () const
 
virtual void setBandwidth (Hz bandwidth)
 
- Public Member Functions inherited from inet::physicallayer::TransmitterBase
virtual m getMaxCommunicationRange () const override
 Returns the maximum transmission range. More...
 
virtual m getMaxInterferenceRange () const override
 Returns the maximum interference range. More...
 
- Public Member Functions inherited from inet::physicallayer::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string getInfoStringRepresentation () const
 
virtual std::string getDetailStringRepresentation () const
 
virtual std::string getDebugStringRepresentation () const
 
virtual std::string getTraceStringRepresentation () const
 
virtual std::string getCompleteStringRepresentation () const
 

Protected Member Functions

virtual void initialize (int stage) override
 
- Protected Member Functions inherited from inet::physicallayer::Ieee80211TransmitterBase
virtual const IIeee80211ModecomputeTransmissionMode (const TransmissionRequest *transmissionRequest) const
 
virtual const Ieee80211ChannelcomputeTransmissionChannel (const TransmissionRequest *transmissionRequest) const
 
virtual W computeTransmissionPower (const TransmissionRequest *transmissionRequest) const
 
- Protected Member Functions inherited from inet::physicallayer::TransmitterBase
virtual int numInitStages () const override
 

Protected Attributes

m communicationRange = m(NaN)
 
m interferenceRange = m(NaN)
 
m detectionRange = m(NaN)
 
- Protected Attributes inherited from inet::physicallayer::Ieee80211TransmitterBase
const Ieee80211ModeSetmodeSet
 
const IIeee80211Modemode
 
const IIeee80211Bandband
 
const Ieee80211Channelchannel
 
- Protected Attributes inherited from inet::physicallayer::FlatTransmitterBase
simtime_t preambleDuration
 
int headerBitLength
 
bps bitrate
 
W power
 
- Protected Attributes inherited from inet::physicallayer::NarrowbandTransmitterBase
const IModulationmodulation
 
Hz carrierFrequency
 
Hz bandwidth
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 

Constructor & Destructor Documentation

inet::physicallayer::Ieee80211IdealTransmitter::Ieee80211IdealTransmitter ( )
31  :
33 {
34 }
Ieee80211TransmitterBase()
Definition: Ieee80211TransmitterBase.cc:24

Member Function Documentation

const ITransmission * inet::physicallayer::Ieee80211IdealTransmitter::createTransmission ( const IRadio transmitter,
const cPacket *  macFrame,
simtime_t  startTime 
) const
overridevirtual

Returns a transmission which describes the radio signal corresponding to the provided mac frame.

This function never returns nullptr.

Implements inet::physicallayer::ITransmitter.

57 {
58  const TransmissionRequest *transmissionRequest = dynamic_cast<TransmissionRequest *>(macFrame->getControlInfo());
59  const IIeee80211Mode *transmissionMode = computeTransmissionMode(transmissionRequest);
60  if (transmissionMode->getDataMode()->getNumberOfSpatialStreams() > transmitter->getAntenna()->getNumAntennas())
61  throw cRuntimeError("Number of spatial streams is higher than the number of antennas");
62  const simtime_t duration = transmissionMode->getDuration(macFrame->getBitLength());
63  const simtime_t endTime = startTime + duration;
64  IMobility *mobility = transmitter->getAntenna()->getMobility();
65  const Coord startPosition = mobility->getCurrentPosition();
66  const Coord endPosition = mobility->getCurrentPosition();
67  const EulerAngles startOrientation = mobility->getCurrentAngularPosition();
68  const EulerAngles endOrientation = mobility->getCurrentAngularPosition();
69  const simtime_t preambleDuration = transmissionMode->getPreambleMode()->getDuration();
70  const simtime_t headerDuration = transmissionMode->getHeaderMode()->getDuration();
71  const simtime_t dataDuration = duration - headerDuration - preambleDuration;
72  return new Ieee80211IdealTransmission(transmitter, macFrame, startTime, endTime, preambleDuration, headerDuration, dataDuration, startPosition, endPosition, startOrientation, endOrientation, communicationRange, interferenceRange, detectionRange, transmissionMode, channel);
73 }
virtual const IIeee80211Mode * computeTransmissionMode(const TransmissionRequest *transmissionRequest) const
Definition: Ieee80211TransmitterBase.cc:63
const Ieee80211Channel * channel
Definition: Ieee80211TransmitterBase.h:38
simtime_t preambleDuration
Definition: FlatTransmitterBase.h:30
m communicationRange
Definition: Ieee80211IdealTransmitter.h:30
m interferenceRange
Definition: Ieee80211IdealTransmitter.h:31
m detectionRange
Definition: Ieee80211IdealTransmitter.h:32
void inet::physicallayer::Ieee80211IdealTransmitter::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::Ieee80211TransmitterBase.

37 {
38  if (stage == INITSTAGE_LOCAL) {
39  communicationRange = m(par("communicationRange"));
40  interferenceRange = m(par("interferenceRange"));
41  detectionRange = m(par("detectionRange"));
42  }
43 }
Local initializations.
Definition: InitStages.h:35
m communicationRange
Definition: Ieee80211IdealTransmitter.h:30
m interferenceRange
Definition: Ieee80211IdealTransmitter.h:31
m detectionRange
Definition: Ieee80211IdealTransmitter.h:32
value< double, units::m > m
Definition: Units.h:1047
std::ostream & inet::physicallayer::Ieee80211IdealTransmitter::printToStream ( std::ostream &  stream,
int  level 
) const
overridevirtual

Prints this object to the provided output stream.

Function calls to operator<< with pointers or references either const or not are all forwarded to this function.

Reimplemented from inet::physicallayer::Ieee80211TransmitterBase.

46 {
47  stream << "Ieee80211IdealTransmitter";
48  if (level <= PRINT_LEVEL_INFO)
49  stream << ", communicationRange = " << communicationRange;
50  if (level <= PRINT_LEVEL_TRACE)
51  stream << ", interferenceRange = " << interferenceRange
52  << ", detectionRange = " << detectionRange;
53  return Ieee80211TransmitterBase::printToStream(stream, level);
54 }
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: Ieee80211TransmitterBase.cc:52
m communicationRange
Definition: Ieee80211IdealTransmitter.h:30
m interferenceRange
Definition: Ieee80211IdealTransmitter.h:31
m detectionRange
Definition: Ieee80211IdealTransmitter.h:32

Member Data Documentation

m inet::physicallayer::Ieee80211IdealTransmitter::communicationRange = m(NaN)
protected
m inet::physicallayer::Ieee80211IdealTransmitter::detectionRange = m(NaN)
protected
m inet::physicallayer::Ieee80211IdealTransmitter::interferenceRange = m(NaN)
protected

The documentation for this class was generated from the following files: