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

#include <Ieee80211OFDMMode.h>

Inheritance diagram for inet::physicallayer::Ieee80211OFDMMode:
inet::physicallayer::Ieee80211ModeBase inet::physicallayer::Ieee80211OFDMTimingRelatedParametersBase inet::physicallayer::IIeee80211Mode inet::physicallayer::IPrintableObject inet::physicallayer::Ieee80211ErpOfdmMode

Public Member Functions

 Ieee80211OFDMMode (const char *name, const Ieee80211OFDMPreambleMode *preambleMode, const Ieee80211OFDMSignalMode *signalMode, const Ieee80211OFDMDataMode *dataMode, Hz channelSpacing, Hz bandwidth)
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual const Ieee80211OFDMPreambleModegetPreambleMode () const override
 
virtual const Ieee80211OFDMSignalModegetHeaderMode () const override
 
virtual const Ieee80211OFDMDataModegetDataMode () const override
 
virtual const Ieee80211OFDMSignalModegetSignalMode () const
 
virtual const simtime_t getDuration (int dataBitLength) const override
 
virtual const simtime_t getSlotTime () const override
 
virtual const simtime_t getSifsTime () const override
 
virtual const simtime_t getRifsTime () const override
 
virtual const simtime_t getCcaTime () const override
 
virtual const simtime_t getPhyRxStartDelay () const override
 
virtual const simtime_t getRxTxTurnaroundTime () const override
 
virtual const simtime_t getPreambleLength () const override
 
virtual const simtime_t getPlcpHeaderLength () const override
 
virtual int getMpduMaxLength () const override
 
- Public Member Functions inherited from inet::physicallayer::Ieee80211ModeBase
 Ieee80211ModeBase (const char *name)
 
virtual const char * getName () const override
 
- Public Member Functions inherited from inet::physicallayer::IIeee80211Mode
IIeee80211PreambleMode_getPreambleMode () const
 
IIeee80211HeaderMode_getHeaderMode () const
 
IIeee80211DataMode_getDataMode () const
 
- 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 int getLegacyCwMin () const override
 
virtual int getLegacyCwMax () const override
 

Protected Attributes

const Ieee80211OFDMPreambleModepreambleMode
 
const Ieee80211OFDMSignalModesignalMode
 
const Ieee80211OFDMDataModedataMode
 

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::Ieee80211OFDMMode::Ieee80211OFDMMode ( const char *  name,
const Ieee80211OFDMPreambleMode preambleMode,
const Ieee80211OFDMSignalMode signalMode,
const Ieee80211OFDMDataMode dataMode,
Hz  channelSpacing,
Hz  bandwidth 
)
37  :
43 {
44 }
const Ieee80211OFDMDataMode * dataMode
Definition: Ieee80211OFDMMode.h:139
std::string name
Definition: Ieee80211ModeBase.h:29
Ieee80211ModeBase(const char *name)
Definition: Ieee80211ModeBase.h:31
const Ieee80211OFDMSignalMode * signalMode
Definition: Ieee80211OFDMMode.h:138
const Ieee80211OFDMPreambleMode * preambleMode
Definition: Ieee80211OFDMMode.h:137

Member Function Documentation

const simtime_t inet::physicallayer::Ieee80211OFDMMode::getCcaTime ( ) const
overridevirtual

Implements inet::physicallayer::IIeee80211Mode.

115 {
116  // < 4, < 8, < 16
117  if (channelSpacing == MHz(20))
118  return 4E-6;
119  else if (channelSpacing == MHz(10))
120  return 8E-6;
121  else if (channelSpacing == MHz(5))
122  return 16E-6;
123  else
124  throw cRuntimeError("Unknown channel spacing = %f", channelSpacing.get());
125 }
const value_type & get() const
Definition: Units.h:89
mega< Hz >::type MHz
Definition: Units.h:906
virtual const Ieee80211OFDMDataMode* inet::physicallayer::Ieee80211OFDMMode::getDataMode ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211Mode.

Referenced by inet::physicallayer::Ieee80211LayeredOFDMTransmitter::getBandwidth().

152 { return dataMode; }
const Ieee80211OFDMDataMode * dataMode
Definition: Ieee80211OFDMMode.h:139
virtual const simtime_t inet::physicallayer::Ieee80211OFDMMode::getDuration ( int  dataBitLength) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211Mode.

Reimplemented in inet::physicallayer::Ieee80211ErpOfdmMode.

155 { return preambleMode->getDuration() + signalMode->getDuration() + dataMode->getDuration(dataBitLength); }
const Ieee80211OFDMDataMode * dataMode
Definition: Ieee80211OFDMMode.h:139
virtual const simtime_t getDuration() const override
Definition: Ieee80211OFDMMode.h:104
virtual const simtime_t getDuration(int dataBitLength) const override
Definition: Ieee80211OFDMMode.cc:185
const Ieee80211OFDMSignalMode * signalMode
Definition: Ieee80211OFDMMode.h:138
virtual const simtime_t getDuration() const override
Definition: Ieee80211OFDMMode.h:82
const Ieee80211OFDMPreambleMode * preambleMode
Definition: Ieee80211OFDMMode.h:137
virtual const Ieee80211OFDMSignalMode* inet::physicallayer::Ieee80211OFDMMode::getHeaderMode ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211Mode.

151 { return signalMode; }
const Ieee80211OFDMSignalMode * signalMode
Definition: Ieee80211OFDMMode.h:138
virtual int inet::physicallayer::Ieee80211OFDMMode::getLegacyCwMax ( ) const
inlineoverrideprotectedvirtual

Implements inet::physicallayer::IIeee80211Mode.

143 { return 1023; }
virtual int inet::physicallayer::Ieee80211OFDMMode::getLegacyCwMin ( ) const
inlineoverrideprotectedvirtual

Implements inet::physicallayer::IIeee80211Mode.

142 { return 15; }
virtual int inet::physicallayer::Ieee80211OFDMMode::getMpduMaxLength ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211Mode.

166 { return 4095; }
const simtime_t inet::physicallayer::Ieee80211OFDMMode::getPhyRxStartDelay ( ) const
overridevirtual

Implements inet::physicallayer::IIeee80211Mode.

128 {
129  if (channelSpacing == MHz(20))
130  return 25E-6;
131  else if (channelSpacing == MHz(10))
132  return 49E-6;
133  else if (channelSpacing == MHz(5))
134  return 97E-6;
135  else
136  throw cRuntimeError("Unknown channel spacing = %f", channelSpacing.get());
137 }
const value_type & get() const
Definition: Units.h:89
mega< Hz >::type MHz
Definition: Units.h:906
virtual const simtime_t inet::physicallayer::Ieee80211OFDMMode::getPlcpHeaderLength ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211Mode.

165 { return signalMode->getDuration(); }
virtual const simtime_t getDuration() const override
Definition: Ieee80211OFDMMode.h:104
const Ieee80211OFDMSignalMode * signalMode
Definition: Ieee80211OFDMMode.h:138
virtual const simtime_t inet::physicallayer::Ieee80211OFDMMode::getPreambleLength ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211Mode.

164 { return preambleMode->getDuration(); }
virtual const simtime_t getDuration() const override
Definition: Ieee80211OFDMMode.h:82
const Ieee80211OFDMPreambleMode * preambleMode
Definition: Ieee80211OFDMMode.h:137
virtual const Ieee80211OFDMPreambleMode* inet::physicallayer::Ieee80211OFDMMode::getPreambleMode ( ) const
inlineoverridevirtual

Implements inet::physicallayer::IIeee80211Mode.

150 { return preambleMode; }
const Ieee80211OFDMPreambleMode * preambleMode
Definition: Ieee80211OFDMMode.h:137
const simtime_t inet::physicallayer::Ieee80211OFDMMode::getRifsTime ( ) const
overridevirtual

Implements inet::physicallayer::IIeee80211Mode.

Reimplemented in inet::physicallayer::Ieee80211ErpOfdmMode.

140 {
141  throw cRuntimeError("Undefined physical layer parameter");
142  return SIMTIME_ZERO;
143 }
const simtime_t inet::physicallayer::Ieee80211OFDMMode::getRxTxTurnaroundTime ( ) const
overridevirtual

Implements inet::physicallayer::IIeee80211Mode.

146 {
147  throw cRuntimeError("< 2");
148  return 0;
149 }
const simtime_t inet::physicallayer::Ieee80211OFDMMode::getSifsTime ( ) const
overridevirtual

Implements inet::physicallayer::IIeee80211Mode.

Reimplemented in inet::physicallayer::Ieee80211ErpOfdmMode.

103 {
104  if (channelSpacing == MHz(20))
105  return 16E-6;
106  else if (channelSpacing == MHz(10))
107  return 32E-6;
108  else if (channelSpacing == MHz(5))
109  return 64E-6;
110  else
111  throw cRuntimeError("Unknown channel spacing = %f", channelSpacing.get());
112 }
const value_type & get() const
Definition: Units.h:89
mega< Hz >::type MHz
Definition: Units.h:906
virtual const Ieee80211OFDMSignalMode* inet::physicallayer::Ieee80211OFDMMode::getSignalMode ( ) const
inlinevirtual
153 { return signalMode; }
const Ieee80211OFDMSignalMode * signalMode
Definition: Ieee80211OFDMMode.h:138
const simtime_t inet::physicallayer::Ieee80211OFDMMode::getSlotTime ( ) const
overridevirtual

Implements inet::physicallayer::IIeee80211Mode.

Reimplemented in inet::physicallayer::Ieee80211ErpOfdmMode.

91 {
92  if (channelSpacing == MHz(20))
93  return 9E-6;
94  else if (channelSpacing == MHz(10))
95  return 13E-6;
96  else if (channelSpacing == MHz(5))
97  return 21E-6;
98  else
99  throw cRuntimeError("Unknown channel spacing = %f", channelSpacing.get());
100 }
const value_type & get() const
Definition: Units.h:89
mega< Hz >::type MHz
Definition: Units.h:906
std::ostream & inet::physicallayer::Ieee80211OFDMMode::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::IPrintableObject.

Reimplemented in inet::physicallayer::Ieee80211ErpOfdmMode.

170 {
171  stream << "Ieee80211OFDMMode";
172  if (level <= PRINT_LEVEL_DEBUG)
173  stream << ", preambleMode = " << printObjectToString(preambleMode, level + 1)
174  << ", signalMode = " << printObjectToString(signalMode, level + 1);
175  if (level <= PRINT_LEVEL_DETAIL)
176  stream << ", dataMode = " << printObjectToString(dataMode, level + 1);
177  return stream;
178 }
const Ieee80211OFDMDataMode * dataMode
Definition: Ieee80211OFDMMode.h:139
std::string printObjectToString(const IPrintableObject *object, int level)
Definition: IPrintableObject.h:73
const Ieee80211OFDMSignalMode * signalMode
Definition: Ieee80211OFDMMode.h:138
const Ieee80211OFDMPreambleMode * preambleMode
Definition: Ieee80211OFDMMode.h:137

Member Data Documentation

const Ieee80211OFDMDataMode* inet::physicallayer::Ieee80211OFDMMode::dataMode
protected
const Ieee80211OFDMPreambleMode* inet::physicallayer::Ieee80211OFDMMode::preambleMode
protected
const Ieee80211OFDMSignalMode* inet::physicallayer::Ieee80211OFDMMode::signalMode
protected

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