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

#include <APSKScalarTransmitter.h>

Inheritance diagram for inet::physicallayer::APSKScalarTransmitter:
inet::physicallayer::FlatTransmitterBase inet::physicallayer::NarrowbandTransmitterBase inet::physicallayer::TransmitterBase inet::physicallayer::ITransmitter inet::physicallayer::IPrintableObject

Public Member Functions

 APSKScalarTransmitter ()
 
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::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::FlatTransmitterBase
virtual void initialize (int stage) override
 
- Protected Member Functions inherited from inet::physicallayer::TransmitterBase
virtual int numInitStages () const override
 
- 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::APSKScalarTransmitter::APSKScalarTransmitter ( )
29  :
31 {
32 }
FlatTransmitterBase()
Definition: FlatTransmitterBase.cc:24

Member Function Documentation

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

41 {
42  TransmissionRequest *controlInfo = dynamic_cast<TransmissionRequest *>(macFrame->getControlInfo());
43  W transmissionPower = controlInfo && !std::isnan(controlInfo->getPower().get()) ? controlInfo->getPower() : power;
44  bps transmissionBitrate = controlInfo && !std::isnan(controlInfo->getBitrate().get()) ? controlInfo->getBitrate() : bitrate;
45  const simtime_t headerDuration = headerBitLength / transmissionBitrate.get();
46  const simtime_t dataDuration = macFrame->getBitLength() / transmissionBitrate.get();
47  const simtime_t duration = preambleDuration + headerDuration + dataDuration;
48  const simtime_t endTime = startTime + duration;
49  IMobility *mobility = transmitter->getAntenna()->getMobility();
50  const Coord startPosition = mobility->getCurrentPosition();
51  const Coord endPosition = mobility->getCurrentPosition();
52  const EulerAngles startOrientation = mobility->getCurrentAngularPosition();
53  const EulerAngles endOrientation = mobility->getCurrentAngularPosition();
54  return new ScalarTransmission(transmitter, macFrame, startTime, endTime, preambleDuration, headerDuration, dataDuration, startPosition, endPosition, startOrientation, endOrientation, modulation, headerBitLength, macFrame->getBitLength(), carrierFrequency, bandwidth, transmissionBitrate, transmissionPower);
55 }
Hz bandwidth
Definition: NarrowbandTransmitterBase.h:33
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
std::ostream & inet::physicallayer::APSKScalarTransmitter::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::FlatTransmitterBase.

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

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