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

#include <FlatTransmitterBase.h>

Inheritance diagram for inet::physicallayer::FlatTransmitterBase:
inet::physicallayer::NarrowbandTransmitterBase inet::physicallayer::TransmitterBase inet::physicallayer::ITransmitter inet::physicallayer::IPrintableObject inet::physicallayer::APSKDimensionalTransmitter inet::physicallayer::APSKScalarTransmitter inet::physicallayer::Ieee80211TransmitterBase inet::physicallayer::Ieee802154NarrowbandScalarTransmitter inet::physicallayer::Ieee80211DimensionalTransmitter inet::physicallayer::Ieee80211IdealTransmitter inet::physicallayer::Ieee80211ScalarTransmitter

Public Member Functions

 FlatTransmitterBase ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
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::ITransmitter
virtual const ITransmissioncreateTransmission (const IRadio *transmitter, const cPacket *macFrame, const simtime_t startTime) const =0
 Returns a transmission which describes the radio signal corresponding to the provided mac frame. 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::TransmitterBase
virtual int numInitStages () const override
 

Protected Attributes

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::FlatTransmitterBase::FlatTransmitterBase ( )
24  :
26  preambleDuration(-1),
27  headerBitLength(-1),
28  bitrate(bps(NaN)),
29  power(W(NaN))
30 {
31 }
bps bitrate
Definition: FlatTransmitterBase.h:32
W power
Definition: FlatTransmitterBase.h:33
NarrowbandTransmitterBase()
Definition: NarrowbandTransmitterBase.cc:25
compose< J, pow< s,-1 > > W
Definition: Units.h:770
compose< b, pow< s,-1 > > bps
Definition: Units.h:985
#define NaN
Definition: INETMath.h:103
simtime_t preambleDuration
Definition: FlatTransmitterBase.h:30
int headerBitLength
Definition: FlatTransmitterBase.h:31

Member Function Documentation

virtual bps inet::physicallayer::FlatTransmitterBase::getBitrate ( ) const
inlinevirtual

Referenced by inet::NetworkConfiguratorBase::computeWirelessLinkWeight().

46 { return bitrate; }
bps bitrate
Definition: FlatTransmitterBase.h:32
virtual int inet::physicallayer::FlatTransmitterBase::getHeaderBitLength ( ) const
inlinevirtual
43 { return headerBitLength; }
int headerBitLength
Definition: FlatTransmitterBase.h:31
virtual W inet::physicallayer::FlatTransmitterBase::getMaxPower ( ) const
inlineoverridevirtual

Returns the maximum transmission power above which no transmission is ever transmitted.

Returns a value in the range [0, +infinity] or NaN if unspecified.

Reimplemented from inet::physicallayer::TransmitterBase.

49 { return power; }
W power
Definition: FlatTransmitterBase.h:33
virtual W inet::physicallayer::FlatTransmitterBase::getPower ( ) const
inlinevirtual
50 { return power; }
W power
Definition: FlatTransmitterBase.h:33
void inet::physicallayer::FlatTransmitterBase::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::NarrowbandTransmitterBase.

Reimplemented in inet::physicallayer::Ieee80211TransmitterBase, inet::physicallayer::Ieee80211IdealTransmitter, inet::physicallayer::Ieee80211DimensionalTransmitter, and inet::physicallayer::APSKDimensionalTransmitter.

Referenced by inet::physicallayer::APSKDimensionalTransmitter::initialize(), and inet::physicallayer::Ieee80211TransmitterBase::initialize().

34 {
36  if (stage == INITSTAGE_LOCAL) {
37  preambleDuration = par("preambleDuration");
38  headerBitLength = par("headerBitLength");
39  bitrate = bps(par("bitrate"));
40  power = W(par("power"));
41  }
42 }
bps bitrate
Definition: FlatTransmitterBase.h:32
virtual void initialize(int stage) override
Definition: NarrowbandTransmitterBase.cc: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
Local initializations.
Definition: InitStages.h:35
simtime_t preambleDuration
Definition: FlatTransmitterBase.h:30
int headerBitLength
Definition: FlatTransmitterBase.h:31
std::ostream & inet::physicallayer::FlatTransmitterBase::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::NarrowbandTransmitterBase.

Reimplemented in inet::physicallayer::Ieee80211TransmitterBase, inet::physicallayer::Ieee80211IdealTransmitter, inet::physicallayer::Ieee80211DimensionalTransmitter, inet::physicallayer::APSKDimensionalTransmitter, inet::physicallayer::Ieee802154NarrowbandScalarTransmitter, inet::physicallayer::APSKScalarTransmitter, and inet::physicallayer::Ieee80211ScalarTransmitter.

Referenced by inet::physicallayer::APSKScalarTransmitter::printToStream(), inet::physicallayer::Ieee802154NarrowbandScalarTransmitter::printToStream(), inet::physicallayer::APSKDimensionalTransmitter::printToStream(), and inet::physicallayer::Ieee80211TransmitterBase::printToStream().

45 {
46  if (level <= PRINT_LEVEL_TRACE)
47  stream << ", preambleDuration = " << preambleDuration
48  << ", headerBitLength = " << headerBitLength
49  << ", bitrate = " << bitrate
50  << ", power = " << power;
51  return NarrowbandTransmitterBase::printToStream(stream, level);
52 }
bps bitrate
Definition: FlatTransmitterBase.h:32
W power
Definition: FlatTransmitterBase.h:33
simtime_t preambleDuration
Definition: FlatTransmitterBase.h:30
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: NarrowbandTransmitterBase.cc:42
int headerBitLength
Definition: FlatTransmitterBase.h:31
virtual void inet::physicallayer::FlatTransmitterBase::setBitrate ( bps  bitrate)
inlinevirtual

Referenced by inet::physicallayer::FlatRadioBase::setBitrate().

47 { this->bitrate = bitrate; }
bps bitrate
Definition: FlatTransmitterBase.h:32
virtual void inet::physicallayer::FlatTransmitterBase::setHeaderBitLength ( int  headerBitLength)
inlinevirtual
int headerBitLength
Definition: FlatTransmitterBase.h:31
virtual void inet::physicallayer::FlatTransmitterBase::setPower ( W  power)
inlinevirtual

Referenced by inet::physicallayer::FlatRadioBase::setPower().

51 { this->power = power; }
W power
Definition: FlatTransmitterBase.h:33

Member Data Documentation


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