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

#include <Ieee80211ScalarTransmitter.h>

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

Public Member Functions

 Ieee80211ScalarTransmitter ()
 
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
 

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
}
 
- Protected Member Functions inherited from inet::physicallayer::Ieee80211TransmitterBase
virtual void initialize (int stage) override
 
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 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
 

Constructor & Destructor Documentation

inet::physicallayer::Ieee80211ScalarTransmitter::Ieee80211ScalarTransmitter ( )
30  :
32 {
33 }
Ieee80211TransmitterBase()
Definition: Ieee80211TransmitterBase.cc:24

Member Function Documentation

const ITransmission * inet::physicallayer::Ieee80211ScalarTransmitter::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.

42 {
43  const TransmissionRequest *transmissionRequest = dynamic_cast<TransmissionRequest *>(macFrame->getControlInfo());
44  const IIeee80211Mode *transmissionMode = computeTransmissionMode(transmissionRequest);
45  const Ieee80211Channel *transmissionChannel = computeTransmissionChannel(transmissionRequest);
46  W transmissionPower = computeTransmissionPower(transmissionRequest);
47  bps transmissionBitrate = transmissionMode->getDataMode()->getNetBitrate();
48  if (transmissionMode->getDataMode()->getNumberOfSpatialStreams() > transmitter->getAntenna()->getNumAntennas())
49  throw cRuntimeError("Number of spatial streams is higher than the number of antennas");
50  const simtime_t duration = transmissionMode->getDuration(macFrame->getBitLength());
51  const simtime_t endTime = startTime + duration;
52  IMobility *mobility = transmitter->getAntenna()->getMobility();
53  const Coord startPosition = mobility->getCurrentPosition();
54  const Coord endPosition = mobility->getCurrentPosition();
55  const EulerAngles startOrientation = mobility->getCurrentAngularPosition();
56  const EulerAngles endOrientation = mobility->getCurrentAngularPosition();
57  int headerBitLength = transmissionMode->getHeaderMode()->getBitLength();
58  int64_t payloadBitLength = macFrame->getBitLength();
59  const simtime_t preambleDuration = transmissionMode->getPreambleMode()->getDuration();
60  const simtime_t headerDuration = transmissionMode->getHeaderMode()->getDuration();
61  const simtime_t dataDuration = duration - headerDuration - preambleDuration;
62  return new Ieee80211ScalarTransmission(transmitter, macFrame, startTime, endTime, preambleDuration, headerDuration, dataDuration, startPosition, endPosition, startOrientation, endOrientation, modulation, headerBitLength, payloadBitLength, carrierFrequency, bandwidth, transmissionBitrate, transmissionPower, transmissionMode, transmissionChannel);
63 }
Hz bandwidth
Definition: NarrowbandTransmitterBase.h:33
Hz carrierFrequency
Definition: NarrowbandTransmitterBase.h:32
compose< J, pow< s,-1 > > W
Definition: Units.h:770
virtual const IIeee80211Mode * computeTransmissionMode(const TransmissionRequest *transmissionRequest) const
Definition: Ieee80211TransmitterBase.cc:63
compose< b, pow< s,-1 > > bps
Definition: Units.h:985
const IModulation * modulation
Definition: NarrowbandTransmitterBase.h:31
simtime_t preambleDuration
Definition: FlatTransmitterBase.h:30
int headerBitLength
Definition: FlatTransmitterBase.h:31
virtual const Ieee80211Channel * computeTransmissionChannel(const TransmissionRequest *transmissionRequest) const
Definition: Ieee80211TransmitterBase.cc:81
virtual W computeTransmissionPower(const TransmissionRequest *transmissionRequest) const
Definition: Ieee80211TransmitterBase.cc:94
std::ostream & inet::physicallayer::Ieee80211ScalarTransmitter::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.

36 {
37  stream << "Ieee80211ScalarTransmitter";
38  return Ieee80211TransmitterBase::printToStream(stream, level);
39 }
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: Ieee80211TransmitterBase.cc:52

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