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

#include <APSKDimensionalTransmitter.h>

Inheritance diagram for inet::physicallayer::APSKDimensionalTransmitter:
inet::physicallayer::DimensionalTransmitterBase inet::physicallayer::FlatTransmitterBase inet::physicallayer::IPrintableObject inet::physicallayer::NarrowbandTransmitterBase inet::physicallayer::TransmitterBase inet::physicallayer::ITransmitter inet::physicallayer::IPrintableObject

Public Member Functions

 APSKDimensionalTransmitter ()
 
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, const 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::DimensionalTransmitterBase
 DimensionalTransmitterBase ()
 
- 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
 
- 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...
 

Protected Member Functions

void initialize (int stage) override
 
- Protected Member Functions inherited from inet::physicallayer::DimensionalTransmitterBase
virtual ConstMappingcreatePowerMapping (const simtime_t startTime, const simtime_t endTime, Hz carrierFrequency, Hz bandwidth, W power) const
 
- Protected Member Functions inherited from inet::physicallayer::TransmitterBase
virtual int numInitStages () const override
 

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 Attributes inherited from inet::physicallayer::DimensionalTransmitterBase
DimensionSet dimensions
 
Mapping::InterpolationMethod interpolationMode
 
std::vector< TimeGainEntrytimeGains
 
std::vector< FrequencyGainEntryfrequencyGains
 
- 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::APSKDimensionalTransmitter::APSKDimensionalTransmitter ( )
28  :
31 {
32 }
DimensionalTransmitterBase()
Definition: DimensionalTransmitterBase.cc:27
FlatTransmitterBase()
Definition: FlatTransmitterBase.cc:24

Member Function Documentation

const ITransmission * inet::physicallayer::APSKDimensionalTransmitter::createTransmission ( const IRadio transmitter,
const cPacket *  macFrame,
const 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.

48 {
49  TransmissionRequest *controlInfo = dynamic_cast<TransmissionRequest *>(macFrame->getControlInfo());
50  W transmissionPower = controlInfo && !std::isnan(controlInfo->getPower().get()) ? controlInfo->getPower() : power;
51  bps transmissionBitrate = controlInfo && !std::isnan(controlInfo->getBitrate().get()) ? controlInfo->getBitrate() : bitrate;
52  const simtime_t headerDuration = headerBitLength / transmissionBitrate.get();
53  const simtime_t dataDuration = macFrame->getBitLength() / transmissionBitrate.get();
54  const simtime_t duration = preambleDuration + headerDuration + dataDuration;
55  const simtime_t endTime = startTime + duration;
56  IMobility *mobility = transmitter->getAntenna()->getMobility();
57  const Coord startPosition = mobility->getCurrentPosition();
58  const Coord endPosition = mobility->getCurrentPosition();
59  const EulerAngles startOrientation = mobility->getCurrentAngularPosition();
60  const EulerAngles endOrientation = mobility->getCurrentAngularPosition();
61  const ConstMapping *powerMapping = createPowerMapping(startTime, endTime, carrierFrequency, bandwidth, transmissionPower);
62  return new DimensionalTransmission(transmitter, macFrame, startTime, endTime, preambleDuration, headerDuration, dataDuration, startPosition, endPosition, startOrientation, endOrientation, headerBitLength, macFrame->getBitLength(), transmissionBitrate, modulation, carrierFrequency, bandwidth, powerMapping);
63 }
Hz bandwidth
Definition: NarrowbandTransmitterBase.h:33
virtual ConstMapping * createPowerMapping(const simtime_t startTime, const simtime_t endTime, Hz carrierFrequency, Hz bandwidth, W power) const
Definition: DimensionalTransmitterBase.cc:125
Hz carrierFrequency
Definition: NarrowbandTransmitterBase.h:32
bps bitrate
Definition: FlatTransmitterBase.h:32
W power
Definition: FlatTransmitterBase.h:33
compose< J, pow< s,-1 > > W
Definition: Units.h:770
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
void inet::physicallayer::APSKDimensionalTransmitter::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::DimensionalTransmitterBase.

35 {
38 }
virtual void initialize(int stage)
Definition: DimensionalTransmitterBase.cc:32
virtual void initialize(int stage) override
Definition: FlatTransmitterBase.cc:33
std::ostream & inet::physicallayer::APSKDimensionalTransmitter::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::DimensionalTransmitterBase.

41 {
42  stream << "APSKDimensionalTransmitter";
44  return DimensionalTransmitterBase::printToStream(stream, level);
45 }
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: FlatTransmitterBase.cc:44
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: DimensionalTransmitterBase.cc:115

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